Skip to main content

EventNotificationMessage Struct

Notification of a system event for logging purposes (MessageType::EVENT_NOTIFICATION, version 1). More...

Declaration

struct point_one::fusion_engine::messages::EventNotificationMessage { ... }

Included Headers

Base struct

structMessagePayload

The base class for all message payloads. More...

Enumerations Index

enum classEventType : uint8_t { ... }

Public Member Attributes Index

uint16_tevent_description_len_bytes = 0

The number of bytes in the event description string. More...

uint64_tevent_flags = 0

A bitmask of flags associated with the event. More...

int64_tsystem_time_ns = 0

The system time when the event occurred (in ns). More...

EventTypetype = EventType::LOG

The type of event that occurred. More...

Public Static Functions Index

static P1_CONSTEXPR_FUNC const char *to_string (EventType type)

Public Static Attributes Index

static constexpr MessageTypeMESSAGE_TYPE = MessageType::EVENT_NOTIFICATION
static constexpr uint8_tMESSAGE_VERSION = 0

Description

Notification of a system event for logging purposes (MessageType::EVENT_NOTIFICATION, version 1).

This message is followed by a string describing the event or additional binary content, depending on the type of event. The length of the description is event_description_len_bytes. Strings are not null-terminated.

 {MessageHeader, EventNotificationMessage, "Description"}

Definition at line 213 of file device.h.

Enumerations

EventType

enum class point_one::fusion_engine::messages::EventNotificationMessage::EventType : uint8_t
strong
Enumeration values
LOGEvent containing a logged message string from the device (= 0)
RESETEvent indicating a device reset occurred (= 1)
CONFIG_CHANGENotification that the user configuration has been changed (= 2)
COMMANDNotification that the user performed a command (e.g., configuration request, fault injection enable/disable) (= 3)
COMMAND_RESPONSERecord containing the response to a user command (= 4)

Definition at line 214 of file device.h.

214 enum class EventType : uint8_t {
215 /**
216 * Event containing a logged message string from the device.
217 */
218 LOG = 0,
219 /**
220 * Event indicating a device reset occurred. The event flags will be set to
221 * the requested reset bitmask, if applicable (see @ref ResetRequest). The
222 * payload will contain a string describing the cause of the reset.
223 */
224 RESET = 1,
225 /**
226 * Notification that the user configuration has been changed. Intended for
227 * diagnostic purposes.
228 */
229 CONFIG_CHANGE = 2,
230 /**
231 * Notification that the user performed a command (e.g., configuration
232 * request, fault injection enable/disable).
233 */
234 COMMAND = 3,
235 /**
236 * Record containing the response to a user command. Response events are not
237 * output on the interface on which the command was received; that interface
238 * will receive the response itself.
239 */
241 };

Public Member Attributes

event_description_len_bytes

uint16_t point_one::fusion_engine::messages::EventNotificationMessage::event_description_len_bytes = 0

The number of bytes in the event description string.

Definition at line 278 of file device.h.

278 uint16_t event_description_len_bytes = 0;

event_flags

uint64_t point_one::fusion_engine::messages::EventNotificationMessage::event_flags = 0

A bitmask of flags associated with the event.

Definition at line 275 of file device.h.

275 uint64_t event_flags = 0;

system_time_ns

int64_t point_one::fusion_engine::messages::EventNotificationMessage::system_time_ns = 0

The system time when the event occurred (in ns).

Definition at line 272 of file device.h.

272 int64_t system_time_ns = 0;

type

EventType point_one::fusion_engine::messages::EventNotificationMessage::type = EventType::LOG

The type of event that occurred.

Definition at line 267 of file device.h.

267 EventType type = EventType::LOG;

Public Static Functions

to_string()

P1_CONSTEXPR_FUNC const char * point_one::fusion_engine::messages::EventNotificationMessage::to_string (EventType type)
inline static

Definition at line 243 of file device.h.

243 static P1_CONSTEXPR_FUNC const char* to_string(EventType type) {
244 switch (type) {
245 case EventType::LOG:
246 return "Log";
247
248 case EventType::RESET:
249 return "Reset";
250
251 case EventType::CONFIG_CHANGE:
252 return "Config Change";
253
254 case EventType::COMMAND:
255 return "Command";
256
257 case EventType::COMMAND_RESPONSE:
258 return "Command Response";
259 }
260 return "Unknown";
261 }

Public Static Attributes

MESSAGE_TYPE

constexpr MessageType point_one::fusion_engine::messages::EventNotificationMessage::MESSAGE_TYPE = MessageType::EVENT_NOTIFICATION
constexpr static

Definition at line 263 of file device.h.

263 static constexpr MessageType MESSAGE_TYPE = MessageType::EVENT_NOTIFICATION;

MESSAGE_VERSION

constexpr uint8_t point_one::fusion_engine::messages::EventNotificationMessage::MESSAGE_VERSION = 0
constexpr static

Definition at line 264 of file device.h.

264 static constexpr uint8_t MESSAGE_VERSION = 0;

The documentation for this struct was generated from the following file:


Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.