diff --git a/bacnet-stack/demo/gateway/Makefile b/bacnet-stack/demo/gateway/Makefile index 98381bc1..3921bba2 100644 --- a/bacnet-stack/demo/gateway/Makefile +++ b/bacnet-stack/demo/gateway/Makefile @@ -22,8 +22,11 @@ SRCS = main.c \ $(BACNET_OBJECT)/bi.c \ $(BACNET_OBJECT)/bo.c \ $(BACNET_OBJECT)/bv.c \ + $(BACNET_OBJECT)/channel.c \ + $(BACNET_OBJECT)/command.c \ $(BACNET_OBJECT)/csv.c \ $(BACNET_OBJECT)/lc.c \ + $(BACNET_OBJECT)/lo.c \ $(BACNET_OBJECT)/lsp.c \ $(BACNET_OBJECT)/ms-input.c \ $(BACNET_OBJECT)/mso.c \ diff --git a/bacnet-stack/demo/object/channel.c b/bacnet-stack/demo/object/channel.c index 27ffa9c6..1eff49c7 100644 --- a/bacnet-stack/demo/object/channel.c +++ b/bacnet-stack/demo/object/channel.c @@ -1185,7 +1185,7 @@ bool Channel_Write_Member_Value( * * @return true if values are within range and present-value is sent. */ -bool Channel_Write_Members( +static bool Channel_Write_Members( struct bacnet_channel_object * pChannel, BACNET_APPLICATION_DATA_VALUE * value, uint8_t priority) diff --git a/bacnet-stack/demo/object/channel.h b/bacnet-stack/demo/object/channel.h index 1b914cf2..1db72c13 100644 --- a/bacnet-stack/demo/object/channel.h +++ b/bacnet-stack/demo/object/channel.h @@ -170,6 +170,25 @@ extern "C" { uint32_t instance, BACNET_PROPERTY_ID propertyIdentifier, uint32_t arrayIndex); + uint16_t Channel_Control_Groups_Element( + uint32_t object_instance, + int32_t array_index); + bool Channel_Control_Groups_Element_Set( + uint32_t object_instance, + int32_t array_index, + uint16_t value); + bool Channel_Value_Copy(BACNET_CHANNEL_VALUE * cvalue, + BACNET_APPLICATION_DATA_VALUE * value); + int Channel_Value_Encode(uint8_t *apdu, int apdu_max, + BACNET_CHANNEL_VALUE * value); + int Channel_Coerce_Data_Encode( + uint8_t * apdu, + unsigned max_apdu, + BACNET_APPLICATION_DATA_VALUE * value, + BACNET_APPLICATION_TAG tag); + bool Channel_Write_Member_Value( + BACNET_WRITE_PROPERTY_DATA * wp_data, + BACNET_APPLICATION_DATA_VALUE * value); void Channel_Init(void); diff --git a/bacnet-stack/demo/object/lo.h b/bacnet-stack/demo/object/lo.h index 60072a38..1bfcb1b7 100644 --- a/bacnet-stack/demo/object/lo.h +++ b/bacnet-stack/demo/object/lo.h @@ -131,6 +131,8 @@ extern "C" { bool Lighting_Output_Egress_Time_Set( uint32_t object_instance, uint32_t seconds); + bool Lighting_Output_Egress_Active( + uint32_t object_instance); uint32_t Lighting_Output_Default_Fade_Time( uint32_t object_instance); diff --git a/bacnet-stack/demo/object/lsp.c b/bacnet-stack/demo/object/lsp.c index efb81522..01da80d6 100644 --- a/bacnet-stack/demo/object/lsp.c +++ b/bacnet-stack/demo/object/lsp.c @@ -37,6 +37,7 @@ #include "wp.h" #include "lsp.h" #include "handlers.h" +#include "proplist.h" #ifndef MAX_LIFE_SAFETY_POINTS #define MAX_LIFE_SAFETY_POINTS 7 @@ -53,45 +54,42 @@ static BACNET_LIFE_SAFETY_OPERATION /* Writable out-of-service allows others to play with our Present Value */ /* without changing the physical output */ static bool Life_Safety_Point_Out_Of_Service[MAX_LIFE_SAFETY_POINTS]; - -/* These three arrays are used by the ReadPropertyMultiple handler */ -static const int Life_Safety_Point_Properties_Required[] = { - PROP_OBJECT_IDENTIFIER, - PROP_OBJECT_NAME, - PROP_OBJECT_TYPE, - PROP_PRESENT_VALUE, - PROP_TRACKING_VALUE, - PROP_STATUS_FLAGS, - PROP_EVENT_STATE, - PROP_OUT_OF_SERVICE, - PROP_RELIABILITY, - PROP_MODE, - PROP_ACCEPTED_MODES, - PROP_SILENCED, - PROP_OPERATION_EXPECTED, - -1 -}; - -static const int Life_Safety_Point_Properties_Optional[] = { +/* These arrays are used by the ReadPropertyMultiple handler and + property-list property (as of protocol-revision 14) */ +static const int Properties_Optional[] = { PROP_DESCRIPTION, -1 }; -static const int Life_Safety_Point_Properties_Proprietary[] = { +static const int Properties_Proprietary[] = { -1 }; +/** + * Returns the list of required, optional, and proprietary properties. + * Used by ReadPropertyMultiple service. + * + * @param pRequired - pointer to list of int terminated by -1, of + * BACnet required properties for this object. + * @param pOptional - pointer to list of int terminated by -1, of + * BACnet optkional properties for this object. + * @param pProprietary - pointer to list of int terminated by -1, of + * BACnet proprietary properties for this object. + */ void Life_Safety_Point_Property_Lists( const int **pRequired, const int **pOptional, const int **pProprietary) { - if (pRequired) - *pRequired = Life_Safety_Point_Properties_Required; - if (pOptional) - *pOptional = Life_Safety_Point_Properties_Optional; - if (pProprietary) - *pProprietary = Life_Safety_Point_Properties_Proprietary; + if (pRequired) { + *pRequired = property_list_required(OBJECT_LIFE_SAFETY_POINT); + } + if (pOptional) { + *pOptional = Properties_Optional; + } + if (pProprietary) { + *pProprietary = Properties_Proprietary; + } return; } diff --git a/bacnet-stack/demo/object/trendlog.c b/bacnet-stack/demo/object/trendlog.c index e7032701..98daa70c 100644 --- a/bacnet-stack/demo/object/trendlog.c +++ b/bacnet-stack/demo/object/trendlog.c @@ -1665,7 +1665,7 @@ static int local_read_property( * Attempt to fetch the logged property and store it in the Trend Log * ****************************************************************************/ -void TL_fetch_property( +static void TL_fetch_property( int iLog) { uint8_t ValueBuf[MAX_APDU]; /* This is a big buffer in case someone selects the device object list for example */