DCC initiation disabled, only proceess and initiate allowed services for protocol-revision 20 (#868)
This commit is contained in:
@@ -496,8 +496,9 @@ void apdu_retries_set(uint8_t value)
|
|||||||
only DeviceCommunicationControl and ReinitializeDevice APDUs
|
only DeviceCommunicationControl and ReinitializeDevice APDUs
|
||||||
shall be processed and no messages shall be initiated.
|
shall be processed and no messages shall be initiated.
|
||||||
When the initiation of communications is disabled,
|
When the initiation of communications is disabled,
|
||||||
all APDUs shall be processed and responses returned as
|
only DeviceCommunicationControl, ReinitializeDevice,
|
||||||
required... */
|
ConfirmedAuditNotification APDUs shall be processed
|
||||||
|
and responses returned as required... */
|
||||||
static bool apdu_confirmed_dcc_disabled(uint8_t service_choice)
|
static bool apdu_confirmed_dcc_disabled(uint8_t service_choice)
|
||||||
{
|
{
|
||||||
bool status = false;
|
bool status = false;
|
||||||
@@ -511,6 +512,18 @@ static bool apdu_confirmed_dcc_disabled(uint8_t service_choice)
|
|||||||
status = true;
|
status = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
#if (BACNET_PROTOCOL_REVISION >= 20)
|
||||||
|
} else if (dcc_communication_initiation_disabled()) {
|
||||||
|
switch (service_choice) {
|
||||||
|
case SERVICE_CONFIRMED_DEVICE_COMMUNICATION_CONTROL:
|
||||||
|
case SERVICE_CONFIRMED_REINITIALIZE_DEVICE:
|
||||||
|
case SERVICE_CONFIRMED_AUDIT_NOTIFICATION:
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
status = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
@@ -523,7 +536,8 @@ static bool apdu_confirmed_dcc_disabled(uint8_t service_choice)
|
|||||||
* If the request is valid and the 'Enable/Disable' parameter is
|
* If the request is valid and the 'Enable/Disable' parameter is
|
||||||
* DISABLE_INITIATION, the responding BACnet-user shall
|
* DISABLE_INITIATION, the responding BACnet-user shall
|
||||||
* discontinue the initiation of messages except for I-Am
|
* discontinue the initiation of messages except for I-Am
|
||||||
* requests issued in accordance with the Who-Is service procedure.
|
* requests issued in accordance with the Who-Is service procedure
|
||||||
|
* and UnconfirmedAuditNotification requests.
|
||||||
*
|
*
|
||||||
* @param service_choice Service, like SERVICE_UNCONFIRMED_WHO_IS
|
* @param service_choice Service, like SERVICE_UNCONFIRMED_WHO_IS
|
||||||
*
|
*
|
||||||
@@ -542,6 +556,9 @@ static bool apdu_unconfirmed_dcc_disabled(uint8_t service_choice)
|
|||||||
switch (service_choice) {
|
switch (service_choice) {
|
||||||
case SERVICE_UNCONFIRMED_WHO_IS:
|
case SERVICE_UNCONFIRMED_WHO_IS:
|
||||||
case SERVICE_UNCONFIRMED_WHO_HAS:
|
case SERVICE_UNCONFIRMED_WHO_HAS:
|
||||||
|
#if (BACNET_PROTOCOL_REVISION >= 20)
|
||||||
|
case SERVICE_UNCONFIRMED_AUDIT_NOTIFICATION:
|
||||||
|
#endif
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
status = true;
|
status = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user