Structure to hold data for registered (reusable) calculator events. Used to submit events with WASimClient::registerEvent()
.
More...
#include "structs.h"
Public Member Functions | |
RegisteredEvent (uint32_t eventId=-1, const std::string &code="", const std::string &name="") | |
Default implicit constructor. More... | |
RegisteredEvent (RegisteredEvent const &)=default | |
Public Attributes | |
uint32_t | eventId = -1 |
A unique ID for this event. The ID can later be used to modify, trigger, or remove this event. More... | |
std::string | code {} |
The calculator code string to execute as the event action. The code is pre-compiled and stored on the server for quicker execution. Maximum length is WASimCommander::STRSZ_CMD value minus the name string length, if one is used. More... | |
std::string | name {} |
Optional custom name for this event. The name is for use with SimConnect_MapClientEventToSimEvent(id, "event_name") and SimConnect_TransmitClientEvent(id) . Default is to use the event ID as a string. If the custom event name contains a period (. ) then it is used as-is. Otherwise "WASimCommander.[client_name]." will be prepended to the name. More... | |
Structure to hold data for registered (reusable) calculator events. Used to submit events with WASimClient::registerEvent()
.
WASimClient also holds a list of all registered events which have been added using WASimClient::registerEvent()
. These requests are available for reference using WASimClient::registeredEvent()
and WASimClient::registeredEvents()
methods.
WASimCommander::Client::RegisteredEvent::RegisteredEvent | ( | uint32_t | eventId = -1 , |
const std::string & | code = "" , |
||
const std::string & | name = "" |
||
) |
Default implicit constructor.
Definition at line 87 of file WASimClient.cpp.
uint32_t WASimCommander::Client::RegisteredEvent::eventId = -1 |
std::string WASimCommander::Client::RegisteredEvent::code {} |
The calculator code string to execute as the event action. The code is pre-compiled and stored on the server for quicker execution. Maximum length is WASimCommander::STRSZ_CMD
value minus the name
string length, if one is used.
std::string WASimCommander::Client::RegisteredEvent::name {} |
Optional custom name for this event. The name is for use with SimConnect_MapClientEventToSimEvent(id, "event_name")
and SimConnect_TransmitClientEvent(id)
. Default is to use the event ID as a string. If the custom event name contains a period (.
) then it is used as-is. Otherwise "WASimCommander.[client_name]." will be prepended to the name.
eventId
). When updating an existing event on the server, it is not necessary to include the name again, only the eventId
is required (and the code to execute, of course). Maximum length for the name string is the value of WASimCommander::STRSZ_ENAME
.