Fixed gateway demo build, and cleaned up prototype warnings. Thanks, Bryan Evenson!

This commit is contained in:
skarg
2014-06-10 15:28:10 +00:00
parent 8da7c09bee
commit fa1c457f2f
6 changed files with 51 additions and 29 deletions
+3
View File
@@ -22,8 +22,11 @@ SRCS = main.c \
$(BACNET_OBJECT)/bi.c \ $(BACNET_OBJECT)/bi.c \
$(BACNET_OBJECT)/bo.c \ $(BACNET_OBJECT)/bo.c \
$(BACNET_OBJECT)/bv.c \ $(BACNET_OBJECT)/bv.c \
$(BACNET_OBJECT)/channel.c \
$(BACNET_OBJECT)/command.c \
$(BACNET_OBJECT)/csv.c \ $(BACNET_OBJECT)/csv.c \
$(BACNET_OBJECT)/lc.c \ $(BACNET_OBJECT)/lc.c \
$(BACNET_OBJECT)/lo.c \
$(BACNET_OBJECT)/lsp.c \ $(BACNET_OBJECT)/lsp.c \
$(BACNET_OBJECT)/ms-input.c \ $(BACNET_OBJECT)/ms-input.c \
$(BACNET_OBJECT)/mso.c \ $(BACNET_OBJECT)/mso.c \
+1 -1
View File
@@ -1185,7 +1185,7 @@ bool Channel_Write_Member_Value(
* *
* @return true if values are within range and present-value is sent. * @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, struct bacnet_channel_object * pChannel,
BACNET_APPLICATION_DATA_VALUE * value, BACNET_APPLICATION_DATA_VALUE * value,
uint8_t priority) uint8_t priority)
+19
View File
@@ -170,6 +170,25 @@ extern "C" {
uint32_t instance, uint32_t instance,
BACNET_PROPERTY_ID propertyIdentifier, BACNET_PROPERTY_ID propertyIdentifier,
uint32_t arrayIndex); 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); void Channel_Init(void);
+2
View File
@@ -131,6 +131,8 @@ extern "C" {
bool Lighting_Output_Egress_Time_Set( bool Lighting_Output_Egress_Time_Set(
uint32_t object_instance, uint32_t object_instance,
uint32_t seconds); uint32_t seconds);
bool Lighting_Output_Egress_Active(
uint32_t object_instance);
uint32_t Lighting_Output_Default_Fade_Time( uint32_t Lighting_Output_Default_Fade_Time(
uint32_t object_instance); uint32_t object_instance);
+25 -27
View File
@@ -37,6 +37,7 @@
#include "wp.h" #include "wp.h"
#include "lsp.h" #include "lsp.h"
#include "handlers.h" #include "handlers.h"
#include "proplist.h"
#ifndef MAX_LIFE_SAFETY_POINTS #ifndef MAX_LIFE_SAFETY_POINTS
#define MAX_LIFE_SAFETY_POINTS 7 #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 */ /* Writable out-of-service allows others to play with our Present Value */
/* without changing the physical output */ /* without changing the physical output */
static bool Life_Safety_Point_Out_Of_Service[MAX_LIFE_SAFETY_POINTS]; static bool Life_Safety_Point_Out_Of_Service[MAX_LIFE_SAFETY_POINTS];
/* These arrays are used by the ReadPropertyMultiple handler and
/* These three arrays are used by the ReadPropertyMultiple handler */ property-list property (as of protocol-revision 14) */
static const int Life_Safety_Point_Properties_Required[] = { static const int Properties_Optional[] = {
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[] = {
PROP_DESCRIPTION, PROP_DESCRIPTION,
-1 -1
}; };
static const int Life_Safety_Point_Properties_Proprietary[] = { static const int Properties_Proprietary[] = {
-1 -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( void Life_Safety_Point_Property_Lists(
const int **pRequired, const int **pRequired,
const int **pOptional, const int **pOptional,
const int **pProprietary) const int **pProprietary)
{ {
if (pRequired) if (pRequired) {
*pRequired = Life_Safety_Point_Properties_Required; *pRequired = property_list_required(OBJECT_LIFE_SAFETY_POINT);
if (pOptional) }
*pOptional = Life_Safety_Point_Properties_Optional; if (pOptional) {
if (pProprietary) *pOptional = Properties_Optional;
*pProprietary = Life_Safety_Point_Properties_Proprietary; }
if (pProprietary) {
*pProprietary = Properties_Proprietary;
}
return; return;
} }
+1 -1
View File
@@ -1665,7 +1665,7 @@ static int local_read_property(
* Attempt to fetch the logged property and store it in the Trend Log * * Attempt to fetch the logged property and store it in the Trend Log *
****************************************************************************/ ****************************************************************************/
void TL_fetch_property( static void TL_fetch_property(
int iLog) int iLog)
{ {
uint8_t ValueBuf[MAX_APDU]; /* This is a big buffer in case someone selects the device object list for example */ uint8_t ValueBuf[MAX_APDU]; /* This is a big buffer in case someone selects the device object list for example */