Replacing hardcoded NORMAL event state with the factual objects event… Co-authored-by: Tomasz Kazimierz Motyl <tomasz.motyl@se.com>
This commit is contained in:
committed by
GitHub
parent
5bb2546efb
commit
c71b2e3a66
@@ -915,7 +915,9 @@ int Binary_Value_Read_Property(BACNET_READ_PROPERTY_DATA *rpdata)
|
||||
case PROP_STATUS_FLAGS:
|
||||
/* note: see the details in the standard on how to use these */
|
||||
bitstring_init(&bit_string);
|
||||
bitstring_set_bit(&bit_string, STATUS_FLAG_IN_ALARM, false);
|
||||
bitstring_set_bit(
|
||||
&bit_string, STATUS_FLAG_IN_ALARM,
|
||||
pObject->Event_State != EVENT_STATE_NORMAL);
|
||||
state = Binary_Value_Fault(rpdata->object_instance);
|
||||
bitstring_set_bit(&bit_string, STATUS_FLAG_FAULT, state);
|
||||
bitstring_set_bit(&bit_string, STATUS_FLAG_OVERRIDDEN, false);
|
||||
@@ -924,8 +926,8 @@ int Binary_Value_Read_Property(BACNET_READ_PROPERTY_DATA *rpdata)
|
||||
apdu_len = encode_application_bitstring(&apdu[0], &bit_string);
|
||||
break;
|
||||
case PROP_EVENT_STATE:
|
||||
apdu_len =
|
||||
encode_application_enumerated(&apdu[0], EVENT_STATE_NORMAL);
|
||||
apdu_len = encode_application_enumerated(
|
||||
&apdu[0], Binary_Value_Event_State(rpdata->object_instance));
|
||||
break;
|
||||
case PROP_OUT_OF_SERVICE:
|
||||
state = Binary_Value_Out_Of_Service(rpdata->object_instance);
|
||||
|
||||
Reference in New Issue
Block a user