Binary_Input.PV can also be writeable if its Out_Of-Service(OOS) is set to TRUE similar to Analog , Multi-State-Input objects. But the checking of OOS is not there in the Binary_Input_Write_Property method. Below is the code snippet from version 1.0.0. Am I missing something?
switch (wp_data->object_property) {
case PROP_PRESENT_VALUE:
status =
WPValidateArgType(&value, BACNET_APPLICATION_TAG_
&wp_data->error_class, &wp_data->error_code);
if (status) {
if (value.type.Enumerated <= MAX_BINARY_PV) {
Binary_Input_Present_Value_Set(wp_data->object_instance,
(BACNET_BINARY_PV)value.type.Enumerated);
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The rule in BACnet for Present_Value properties that are associated with Out_Of_Service is that Present_Value must be writable when Out_Of_Service is true.
The inverse(s) is not required, however. If Out_Of_Service is not configurable or writable to true (it is always false), then Present_Value is never required to be writable (except for commandable objects - i.e. Output objects). Also, Present_Value is allowed to be writable, even if Out_Of_Service is false.
Last edit: Steve Karg 2023-06-06
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
Binary_Input.PV can also be writeable if its Out_Of-Service(OOS) is set to TRUE similar to Analog , Multi-State-Input objects. But the checking of OOS is not there in the Binary_Input_Write_Property method. Below is the code snippet from version 1.0.0. Am I missing something?
switch (wp_data->object_property) {
case PROP_PRESENT_VALUE:
status =
WPValidateArgType(&value, BACNET_APPLICATION_TAG_
&wp_data->error_class, &wp_data->error_code);
if (status) {
if (value.type.Enumerated <= MAX_BINARY_PV) {
Binary_Input_Present_Value_Set(wp_data->object_instance,
(BACNET_BINARY_PV)value.type.Enumerated);
The rule in BACnet for Present_Value properties that are associated with Out_Of_Service is that Present_Value must be writable when Out_Of_Service is true.
The inverse(s) is not required, however. If Out_Of_Service is not configurable or writable to true (it is always false), then Present_Value is never required to be writable (except for commandable objects - i.e. Output objects). Also, Present_Value is allowed to be writable, even if Out_Of_Service is false.
Last edit: Steve Karg 2023-06-06