WASimCommander::Client namespace. Defines/declares everything needed to interact with the WASimCommander Client API, including the WASimClient class itself. More...
Classes | |
struct | ClientEvent |
Client Event data, delivered via callback. More... | |
struct | DataRequestRecord |
DataRequestRecord inherits and extends WASimCommander::DataRequest with data pertinent for use by a data consumer/Client. In particular, any value data sent from the server is stored here as a byte array in the data member (a std::vector of unsigned char ). More... | |
struct | ListResult |
Structure for delivering list results, eg. of local variables sent from Server. More... | |
struct | RegisteredEvent |
Structure to hold data for registered (reusable) calculator events. Used to submit events with WASimClient::registerEvent() . More... | |
struct | VariableRequest |
Structure for using with WASimClient::getVariable() and WASimClient::setVariable() to specify information about the variable to set or get. Variables and Units can be specified by name or by numeric ID. Only some variable types have an associated numeric ID ('A', 'L', 'T' types) and only some variable types accept a Unit specifier ('A', 'C', 'E', 'L' types). Using numeric IDs, if already known, is more efficient on the server side since it saves the lookup step. More... | |
class | WASimClient |
WASimCommander Client implementation. Handles all aspects of communication with the WASimCommander Server WASM module. More... | |
Typedefs | |
using | clientEventCallback_t = std::function< void __stdcall(const ClientEvent &)> |
Callback function for Client events. More... | |
using | listResultsCallback_t = std::function< void __stdcall(const ListResult &)> |
Callback function for delivering list results, eg. of local variables sent from Server. More... | |
using | dataCallback_t = std::function< void __stdcall(const DataRequestRecord &)> |
Callback function for subscription result data. More... | |
using | logCallback_t = std::function< void __stdcall(const LogRecord &, LogSource)> |
Callback function for log entries (from both Client and Server). More... | |
using | commandCallback_t = std::function< void __stdcall(const Command &)> |
Callback function for commands sent from server. More... | |
Enumerations | |
enum class | ClientStatus : uint8_t { Idle = 0x00 , Initializing = 0x01 , SimConnected = 0x02 , Connecting = 0x04 , Connected = 0x08 , ShuttingDown = 0x10 , AllConnected = SimConnected | Connected } |
Client status flags. More... | |
enum class | ClientEventType : uint8_t { None = 0 , SimConnecting , SimConnected , SimDisconnecting , SimDisconnected , ServerConnecting , ServerConnected , ServerDisconnected } |
Client event type enumeration. More... | |
enum class | LogSource : uint8_t { Client , Server } |
Log entry source, Client or Server. More... | |
Functions | |
static bool | isCustomKeyEventName (const std::string &name) |
Variables | |
static const uint32_t | CUSTOM_KEY_EVENT_ID_MIN = 0x00020000 |
Starting ID range for "Custom Key Events" for use with registerCustomKeyEvent() generated IDs. (This corresponds to the value of 1 + THIRD_PARTY_EVENT_ID_MAX constant from SimConnect SDK header file 'MSFS/Legacy/gauges.h'.) More... | |
static const uint32_t | CUSTOM_KEY_EVENT_LEGACY_TRIGGER_FLAG = 0x80000000 |
Enumeration name strings | |
static const std::vector< const char * > | ClientStatusNames = { "Idle", "Initializing", "SimConnected", "Connecting", "Connected", "ShuttingDown" } |
Client::ClientStatus enum names. More... | |
static const std::vector< const char * > | ClientEventTypeNames |
Client::ClientEventType enum names. More... | |
static const std::vector< const char * > | LogSourceNames = { "Client", "Server" } |
Client::LogSource enum names. More... | |
Return result values | |
static const HRESULT | E_NOT_CONNECTED = 2250L | ( 7 << 16) | 0x80000000 |
Error result: server not connected. More... | |
static const HRESULT | E_TIMEOUT = 1460L | ( 7 << 16) | 0x80000000 |
Error result: timeout communicating with server. More... | |
WASimCommander::Client namespace. Defines/declares everything needed to interact with the WASimCommander Client API, including the WASimClient class itself.
struct WASimCommander::Client::ClientEvent |
Client Event data, delivered via callback.
Class Members | ||
---|---|---|
ClientEventType | eventType | The type of event. See enum docs for details. |
ClientStatus | status | Current status flag(s). See enum docs for details. |
string | message | A short message about the event (eg. "Server Connected") |
struct WASimCommander::Client::ListResult |
Structure for delivering list results, eg. of local variables sent from Server.
Class Members | ||
---|---|---|
typedef vector< pair< int, string > > | listResult_t | A mapping of IDs to names. |
Class Members | ||
---|---|---|
LookupItemType | listType | the type of items being listed |
HRESULT | result |
Execution result, one of: S_OK , E_FAIL , E_TIMEOUT |
listResult_t | list | Mapping of numeric item IDs to name strings. |
using WASimCommander::Client::clientEventCallback_t = typedef std::function<void __stdcall(const ClientEvent &)> |
Callback function for Client events.
Definition at line 72 of file WASimClient.h.
using WASimCommander::Client::listResultsCallback_t = typedef std::function<void __stdcall(const ListResult &)> |
Callback function for delivering list results, eg. of local variables sent from Server.
Definition at line 73 of file WASimClient.h.
using WASimCommander::Client::dataCallback_t = typedef std::function<void __stdcall(const DataRequestRecord &)> |
Callback function for subscription result data.
Definition at line 74 of file WASimClient.h.
using WASimCommander::Client::logCallback_t = typedef std::function<void __stdcall(const LogRecord &, LogSource)> |
Callback function for log entries (from both Client and Server).
Definition at line 75 of file WASimClient.h.
using WASimCommander::Client::commandCallback_t = typedef std::function<void __stdcall(const Command &)> |
Callback function for commands sent from server.
Definition at line 76 of file WASimClient.h.
|
strong |
Client status flags.
Definition at line 35 of file enums_impl.h.
|
strong |
Client event type enumeration.
Definition at line 54 of file enums_impl.h.
|
strong |
Log entry source, Client or Server.
Enumerator | |
---|---|
Client | Log record from WASimClient. |
Server | Log record from WASimModule (Server) |
Definition at line 73 of file enums_impl.h.
|
inlinestatic |
Definition at line 1903 of file WASimClient.cpp.
|
static |
Client::ClientStatus enum names.
Definition at line 50 of file enums_impl.h.
|
static |
Client::ClientEventType enum names.
Definition at line 67 of file enums_impl.h.
|
static |
Client::LogSource enum names.
Definition at line 80 of file enums_impl.h.
|
static |
Error result: server not connected.
Definition at line 56 of file WASimClient.h.
|
static |
Error result: timeout communicating with server.
Definition at line 59 of file WASimClient.h.
|
static |
Starting ID range for "Custom Key Events" for use with registerCustomKeyEvent()
generated IDs. (This corresponds to the value of 1 + THIRD_PARTY_EVENT_ID_MAX
constant from SimConnect SDK header file 'MSFS/Legacy/gauges.h'.)
Definition at line 65 of file WASimClient.h.
|
static |
Definition at line 63 of file WASimClient.cpp.