![]() |
B2BITS FIX Antenna C++ 2.34.0
|
Represents single BATS unit. More...
#include <B2BITS_BatsUnitService.h>
Public Member Functions | |
| virtual void | connect (ServiceListener *serviceListener)=0 |
| Connects the service to the mutlicast group. | |
| virtual void | disconnect ()=0 |
| Disconnects the service from the mutlicast group. | |
| virtual Application * | getApplication () const =0 |
| Returns @Application. | |
| virtual const std::string & | getChannelID () const =0 |
| Returns channel id. | |
| virtual IUdpMock * | getMock ()=0 |
| virtual const RuntimeParameters & | getParams () const =0 |
| Returns parameters. | |
| virtual System::u8 | getUnitID () const =0 |
| Returns unit id. | |
| virtual bool | hasInstrumentSubscriptions () const =0 |
| Checks if service has instrument subscriptions. | |
| virtual bool | isConnected ()=0 |
| Returns true if service is in connected state. | |
| virtual void | setCredentials (const std::string &userName, const std::string &password, const std::string &subId)=0 |
| Sets SPIN/GRP credentials. | |
| virtual void | subscribeToInstrument (const std::string &symbol, System::u16 depth, InstrumentListener *listener, bool dispatchMessages=true)=0 |
| Subscribe listener to updates for particular symbol. | |
| virtual void | subscribeToSymbolMapping (SymbolMappingListener *listener)=0 |
| Subscribe listener to symbol mapping messages. | |
| virtual void | unsubscribeFromInstrument (const std::string &symbol)=0 |
| Unsubscribe symbol listener. | |
| virtual void | unsubscribeFromSymbolMapping (SymbolMappingListener *listener)=0 |
| Unsubscribe symbol mapping listener. | |
Represents single BATS unit.
|
pure virtual |
Connects the service to the mutlicast group.
Starts all threads required by the service. serviceListener should stay alive until service is disconnected. Service becomes connected if this method succeds
| serviceListener | Optional listener to receive notification from the unit |
| Utils::Exception | if error eccurs |
|
pure virtual |
Disconnects the service from the mutlicast group.
This method returns returns immediately, service becomes disconnected only after ServiceListener::Notification::Disconnected notification. Does nothing if service is already disconnected.
| no |
|
pure virtual |
|
pure virtual |
Returns channel id.
| no |
|
pure virtual |
|
pure virtual |
Returns parameters.
| no |
|
pure virtual |
Returns unit id.
| no |
|
pure virtual |
Checks if service has instrument subscriptions.
|
pure virtual |
Returns true if service is in connected state.
true if service is connected | no |
|
pure virtual |
Sets SPIN/GRP credentials.
| userName | must not exceed 4 characters |
| password | must not exceed 10 characters |
| Session | subId, must not exceed 4 characters |
| Utils::Exception | if parameters are incorrect |
|
pure virtual |
Subscribe listener to updates for particular symbol.
| symbol | Name of BATS symbol, must not exceed 8 characters |
| depth | Depth of order book, if set to 0 incremental updates will not be delivered |
| listener | Required observer to receive messages and updates |
| dispatchMessages | When set to true service delivers raw PITCH messages |
| Utils::Exception | if error occurs |
|
pure virtual |
Subscribe listener to symbol mapping messages.
| listener | Observer to receive mapping messages from unit, cannot be null cannot be used twice |
| Utils::Exception | parameter is incorrect or if error occurs |
|
pure virtual |
Unsubscribe symbol listener.
| listener | Listener to unsubscribe |
| Utils::Exception | if error occurs |
|
pure virtual |
Unsubscribe symbol mapping listener.
| listener | Listener to unsubscribe |
| Utils::Exception | if error occurs |