Feature/access event notification (#156)
* Added event notification for access event. Thank you, Ojdanic Andrijana! * Added event notification for command failure. Thank you, Ojdanic Andrijana! * Fix event notification ztest * Fix event notification ztest * Added ztest for command failure and access event * fix zassert_equal test function args * fix zassert_equal test function args * fix zassert_true test function args. Fix verifyBaseEventState(). * Fix octetstring_value_same to use zassert_true Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
This commit is contained in:
+33
-4
@@ -32,12 +32,18 @@
|
||||
#include "bacnet/timestamp.h"
|
||||
#include "bacnet/bacpropstates.h"
|
||||
#include "bacnet/bacdevobjpropref.h"
|
||||
#include "bacnet/authentication_factor.h"
|
||||
|
||||
typedef enum {
|
||||
CHANGE_OF_VALUE_BITS,
|
||||
CHANGE_OF_VALUE_REAL
|
||||
} CHANGE_OF_VALUE_TYPE;
|
||||
|
||||
typedef enum {
|
||||
COMMAND_FAILURE_BINARY_PV,
|
||||
COMMAND_FAILURE_UNSIGNED
|
||||
} COMMAND_FAILURE_TYPE;
|
||||
|
||||
/*
|
||||
** Based on UnconfirmedEventNotification-Request
|
||||
*/
|
||||
@@ -87,10 +93,20 @@ typedef struct BACnet_Event_Notification_Data {
|
||||
BACNET_BIT_STRING statusFlags;
|
||||
} changeOfValue;
|
||||
/*
|
||||
** EVENT_COMMAND_FAILURE
|
||||
**
|
||||
** Not Supported!
|
||||
*/
|
||||
** EVENT_COMMAND_FAILURE
|
||||
*/
|
||||
struct {
|
||||
union {
|
||||
BACNET_BINARY_PV binaryValue;
|
||||
BACNET_UNSIGNED_INTEGER unsignedValue;
|
||||
} commandValue;
|
||||
COMMAND_FAILURE_TYPE tag;
|
||||
BACNET_BIT_STRING statusFlags;
|
||||
union {
|
||||
BACNET_BINARY_PV binaryValue;
|
||||
BACNET_UNSIGNED_INTEGER unsignedValue;
|
||||
} feedbackValue;
|
||||
} commandFailure;
|
||||
/*
|
||||
** EVENT_FLOATING_LIMIT
|
||||
*/
|
||||
@@ -139,6 +155,19 @@ typedef struct BACnet_Event_Notification_Data {
|
||||
BACNET_BIT_STRING statusFlags;
|
||||
uint32_t exceededLimit;
|
||||
} unsignedRange;
|
||||
/*
|
||||
** EVENT_ACCESS_EVENT
|
||||
*/
|
||||
struct {
|
||||
BACNET_ACCESS_EVENT accessEvent;
|
||||
BACNET_BIT_STRING statusFlags;
|
||||
BACNET_UNSIGNED_INTEGER accessEventTag;
|
||||
BACNET_TIMESTAMP accessEventTime;
|
||||
BACNET_DEVICE_OBJECT_REFERENCE accessCredential;
|
||||
BACNET_AUTHENTICATION_FACTOR authenticationFactor;
|
||||
/* OPTIONAL - Set authenticationFactor.format_type to
|
||||
AUTHENTICATION_FACTOR_MAX if not being used */
|
||||
} accessEvent;
|
||||
} notificationParams;
|
||||
} BACNET_EVENT_NOTIFICATION_DATA;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user