Corrected DeviceCommunicationControl (DCC) for DISABLE_INITIATION state, which now allows I-Am in response to Who-Is. Did not add keep out for other initiated services like COV (to do).
This commit is contained in:
@@ -193,8 +193,8 @@ bool Device_Reinitialize(
|
||||
if (characterstring_ansi_same(&rd_data->password, "Jesus")) {
|
||||
switch (rd_data->state) {
|
||||
case BACNET_REINIT_COLDSTART:
|
||||
break;
|
||||
case BACNET_REINIT_WARMSTART:
|
||||
dcc_set_status_duration(COMMUNICATION_ENABLE, 0);
|
||||
break;
|
||||
case BACNET_REINIT_STARTBACKUP:
|
||||
break;
|
||||
|
||||
+10
-1
@@ -396,7 +396,8 @@ void apdu_handler(
|
||||
/* When network communications are completely disabled,
|
||||
only DeviceCommunicationControl and ReinitializeDevice APDUs
|
||||
shall be processed and no messages shall be initiated. */
|
||||
if (dcc_communication_disabled() &&
|
||||
if ((dcc_communication_disabled() ||
|
||||
dcc_communication_initiation_disabled()) &&
|
||||
((service_choice !=
|
||||
SERVICE_CONFIRMED_DEVICE_COMMUNICATION_CONTROL)
|
||||
&& (service_choice !=
|
||||
@@ -411,11 +412,19 @@ void apdu_handler(
|
||||
service_request_len, src, &service_data);
|
||||
break;
|
||||
case PDU_TYPE_UNCONFIRMED_SERVICE_REQUEST:
|
||||
/* When network communications are completely disabled,
|
||||
only DeviceCommunicationControl and ReinitializeDevice APDUs
|
||||
shall be processed and no messages shall be initiated. */
|
||||
if (dcc_communication_disabled())
|
||||
break;
|
||||
service_choice = apdu[1];
|
||||
service_request = &apdu[2];
|
||||
service_request_len = apdu_len - 2;
|
||||
/* When network communications have initiation disabled,
|
||||
WhoIs will be processed and I-Am initiated as response. */
|
||||
if (dcc_communication_initiation_disabled() &&
|
||||
(service_choice != SERVICE_UNCONFIRMED_WHO_IS))
|
||||
break;
|
||||
if (service_choice < MAX_BACNET_UNCONFIRMED_SERVICE) {
|
||||
if (Unconfirmed_Function[service_choice])
|
||||
Unconfirmed_Function[service_choice] (service_request,
|
||||
|
||||
Reference in New Issue
Block a user