From 1dad528da875e3037c6d0391a4b1f4e6f552c493 Mon Sep 17 00:00:00 2001 From: skarg Date: Mon, 13 Oct 2008 19:00:25 +0000 Subject: [PATCH] Added optional active/inactive text properties to Binary Output object. --- bacnet-stack/demo/object/bo.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/bacnet-stack/demo/object/bo.c b/bacnet-stack/demo/object/bo.c index 6e806d91..6d6ff6ef 100644 --- a/bacnet-stack/demo/object/bo.c +++ b/bacnet-stack/demo/object/bo.c @@ -64,6 +64,8 @@ static const int Binary_Output_Properties_Required[] = { static const int Binary_Output_Properties_Optional[] = { PROP_DESCRIPTION, + PROP_ACTIVE_TEXT, + PROP_INACTIVE_TEXT, -1 }; @@ -305,6 +307,16 @@ int Binary_Output_Encode_Property_APDU( present_value = RELINQUISH_DEFAULT; apdu_len = encode_application_enumerated(&apdu[0], present_value); break; + case PROP_ACTIVE_TEXT: + characterstring_init_ansi(&char_string,"on" ); + apdu_len = + encode_application_character_string(&apdu[0], &char_string); + break; + case PROP_INACTIVE_TEXT: + characterstring_init_ansi(&char_string,"off" ); + apdu_len = + encode_application_character_string(&apdu[0], &char_string); + break; default: *error_class = ERROR_CLASS_PROPERTY; *error_code = ERROR_CODE_UNKNOWN_PROPERTY;