Implement parsing for proprietary events (complex-event-type) (#420)
* Implement parsing for proprietary events (complex-event-type) * Fix unit test linking for event.c --------- Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
This commit is contained in:
+634
-448
File diff suppressed because it is too large
Load Diff
@@ -48,6 +48,20 @@ typedef enum {
|
||||
** Based on UnconfirmedEventNotification-Request
|
||||
*/
|
||||
|
||||
|
||||
// TODO make these configurable from env?
|
||||
|
||||
/** Enable decoding of complex-event-type property-values. If set to 0, the values are decoded and discarded. */
|
||||
#ifndef BACNET_DECODE_COMPLEX_EVENT_TYPE_PARAMETERS
|
||||
#define BACNET_DECODE_COMPLEX_EVENT_TYPE_PARAMETERS 1
|
||||
#endif
|
||||
|
||||
/** Max complex-event-type property-values to decode. Events with more values fail to decode. */
|
||||
#ifndef BACNET_COMPLEX_EVENT_TYPE_MAX_PARAMETERS
|
||||
#define BACNET_COMPLEX_EVENT_TYPE_MAX_PARAMETERS 5
|
||||
#endif
|
||||
|
||||
|
||||
typedef struct BACnet_Event_Notification_Data {
|
||||
uint32_t processIdentifier;
|
||||
BACNET_OBJECT_ID initiatingObjectIdentifier;
|
||||
@@ -168,6 +182,14 @@ typedef struct BACnet_Event_Notification_Data {
|
||||
/* OPTIONAL - Set authenticationFactor.format_type to
|
||||
AUTHENTICATION_FACTOR_MAX if not being used */
|
||||
} accessEvent;
|
||||
#if (BACNET_DECODE_COMPLEX_EVENT_TYPE_PARAMETERS == 1)
|
||||
/*
|
||||
* complex-event-type - a sequence of values, used for proprietary event types
|
||||
*/
|
||||
struct {
|
||||
BACNET_PROPERTY_VALUE values[BACNET_COMPLEX_EVENT_TYPE_MAX_PARAMETERS];
|
||||
} complexEventType;
|
||||
#endif
|
||||
} notificationParams;
|
||||
} BACNET_EVENT_NOTIFICATION_DATA;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user