Data structure for sending Key Events to the sim with up to 5 event values. Events are specified using numeric MSFS Event IDs (names can be resolved to IDs via Lookup
command). This supports the new functionality in MSFS SU10 with trigger_key_event_EX1()
Gauge API function (similar to SimConnect_TransmitClientEvent_EX1()
). The server will respond with an Ack/Nak for a SendKey
command, echoing the given token
. For events with zero or one value, the SendKey
command can be used instead.
More...
#include "WASimCommander.h"
Public Member Functions | |
KeyEvent (uint32_t eventId=0, std::initializer_list< uint32_t > values={}, uint32_t token=0) | |
Default constructor with all parameters optional. The values initializer list may contain up to 5 members (any additional are ignored). More... | |
Public Attributes | |
uint32_t | eventId |
The event ID to trigger. Value is one of KEY_* macro values in MSFS/Legacy/gauges.h. Event names can be resolved to IDs via Lookup command. More... | |
uint32_t | values [5] = {0} |
Up to 5 values to pass to the event handler. All are optional, defaults are zero. More... | |
uint32_t | token |
A unique ID for this event trigger. Echoed back by server in command Ack/Nak responses. Optional use for client implementations. More... | |
uint32_t | reserved |
Padding for alignment, unused. More... | |
Data structure for sending Key Events to the sim with up to 5 event values. Events are specified using numeric MSFS Event IDs (names can be resolved to IDs via Lookup
command). This supports the new functionality in MSFS SU10 with trigger_key_event_EX1()
Gauge API function (similar to SimConnect_TransmitClientEvent_EX1()
). The server will respond with an Ack/Nak for a SendKey
command, echoing the given token
. For events with zero or one value, the SendKey
command can be used instead.
Definition at line 218 of file WASimCommander.h.
|
inlineexplicit |
Default constructor with all parameters optional. The values
initializer list may contain up to 5 members (any additional are ignored).
Definition at line 227 of file WASimCommander.h.
uint32_t WASimCommander::KeyEvent::eventId |
The event ID to trigger. Value is one of KEY_*
macro values in MSFS/Legacy/gauges.h. Event names can be resolved to IDs via Lookup
command.
Definition at line 220 of file WASimCommander.h.
uint32_t WASimCommander::KeyEvent::values[5] = {0} |
Up to 5 values to pass to the event handler. All are optional, defaults are zero.
Definition at line 221 of file WASimCommander.h.
uint32_t WASimCommander::KeyEvent::token |
A unique ID for this event trigger. Echoed back by server in command Ack/Nak responses. Optional use for client implementations.
Definition at line 222 of file WASimCommander.h.
uint32_t WASimCommander::KeyEvent::reserved |
Padding for alignment, unused.
Definition at line 223 of file WASimCommander.h.