Broadcast C++ Toolkit
|
Public Types | |
enum | EventType { STOP, AUTHENTICATE, CONNECTION_CHANGED, CONNECTION_RECOVERY, CONNECT, DISCONNECT, LOGIN, SUBSCRIBE, UNSUBSCRIBE, REQUEST_FILE, SNAPSHOT_COMPLETE, RECOVER, RECOVERY_COMPLETE, REQUEST_SNAPSHOT, COUNT } |
Set of possible event types. More... | |
Public Member Functions | |
Event (const Event &other) | |
Event & | operator= (const Event &other) |
const Error & | error () const |
Gets the Error associated with this event. More... | |
EventType | type () const |
Gets the EventType of this Event. | |
const std::string & | id () const |
Gets the unique id of this Event. | |
bool | has_value (const std::string &key) const |
Checks if a value with the given key exists in the Event. More... | |
const std::string & | get_value (const std::string &key) const |
Gets the value for the given key. More... | |
const std::string & | all_values () const |
Gets all key-value pairs in the event. More... | |
Static Public Member Functions | |
static std::string | to_string (EventType type) |
Gets the string representation of the given Event::EventType enum. | |
Friends | |
struct | EventImpl |
Set of possible event types.
Events are most commonly spawned to indicate the completion of the associated asynchronous method. Events and their associated methods are listed below.
Enumerator | |
---|---|
STOP | |
AUTHENTICATE | |
CONNECTION_CHANGED |
This Event can be spawned independently of any asynchronous function call. Whenever the FEConsumer was connected and becomes disconnected or was disconnected and becomes connected, this Event will be spawned. Note that this is true even if the synchronous interface is used. |
CONNECTION_RECOVERY |
Similar to CONNECTION_CHANGED, this event will be spawned after an attempt to recover a lost connection to the server to indicate the success of that attempt |
CONNECT | |
DISCONNECT | |
LOGIN | |
SUBSCRIBE | |
UNSUBSCRIBE | |
REQUEST_FILE | |
SNAPSHOT_COMPLETE |
FEConsumer::subscribe() or FEConsumer::subscribe_async() with snapshots. |
RECOVER |
FEConsumer::recover_async() |
RECOVERY_COMPLETE |
FEConsumer::recover() or FEConsumer::recover_async() |
REQUEST_SNAPSHOT |
FEConsumer::request_snapshot_async() |
COUNT |
Dummy value indicating number of EventTypes. |
const std::string& FactSet::Datafeed::Event::all_values | ( | ) | const |
Gets all key-value pairs in the event.
const Error& FactSet::Datafeed::Event::error | ( | ) | const |
Gets the Error associated with this event.
const std::string& FactSet::Datafeed::Event::get_value | ( | const std::string & | key | ) | const |
Gets the value for the given key.
Some events will contain additional information depending on the type of the event. See below for tables containing keys by event type and their meanings.
Key | Type | Description |
---|---|---|
Host | std::string | Value of host argument from request. |
User | std::string | Value of user argument from request. |
Serial | std::string | Value of serial argument from request. |
KeyId | std::string | Value of key_id argument from request. |
Key | std::string | Value of key argument from request. |
Counter | std::string | Value of counter argument from request. |
Path | std::string | Value of path argument from request. |
ForceInput | bool | Value of force_input argument from request. |
Key | Type | Description |
---|---|---|
Topic | std::string | Value of topic argument from request. |
SnapshotMode | FEConsumer::SnapshotMode | Value of snapshot_mode argument from request. |
DataMode | FEConsumer::DataMode | Value of data_mode argument from request. |
Key | Type | Description |
---|---|---|
Topic | std::string | Value of topic argument from request. |
Key | Type | Description |
---|---|---|
Connected | bool | True if the FEConsumer is currently connected, false otherwise. |
Key | Type | Description |
---|---|---|
LastHeartbeat | std::chrono::system_clock::rep | Timestamp of the last heartbeat received in number of ticks since epoch. |
#LOG_IN
Key | Type | Description |
---|---|---|
RequestFiles | bool | Value of request_files argument from request. |
Key | Type | Description |
---|---|---|
Filename | string | Value of filename argument from request. |
Key | Type | Description |
---|---|---|
Topic | std::string | Value of topic argument from request. |
SnapshotCount | uint32_t | Number of snapshot messages received. |
key | Key to query. |
bool FactSet::Datafeed::Event::has_value | ( | const std::string & | key | ) | const |
Checks if a value with the given key exists in the Event.