Go to the documentation of this file.
40 const std::string& hostname,
41 uint8_t sessionTimeout_s)
46 std::unique_ptr<TcpSocket> pTransport(
new TcpSocket());
48 if (pTransport->connect(hostname, htons(type)) != 0)
53 std::unique_ptr<IProtocolHandler> pProtocolHandler;
68 if (!pProtocolHandler->openSession(sessionTimeout_s))
70 pTransport->shutdown();
74 std::unique_ptr<ControlSession> pControlSession;
75 pControlSession = std::unique_ptr<ControlSession>(
new ControlSession(*pProtocolHandler));
77 std::unique_ptr<IAuthentication> pAuthentication;
UserLevel
Available CoLa user levels.
Class for reading data from a CoLaCommand.
bool startAcquisition()
Start streaming the data by calling the "PLAYSTART" method on the device. Works only when acquisition...
Builder for constructing CoLaCommands.
CoLaError::Enum getError()
Get error.
bool getDataStreamConfig()
Tells the device that there is a streaming channel by invoking a method named GetBlobClientConfig.
ProtocolType
The numbers used for the protocols are the port numbers.
std::string getDeviceIdent()
Get device information by calling the "DeviceIdent" method on the device.
std::unique_ptr< ControlSession > m_pControlSession
bool stopAcquisition()
Stops the data stream. Works always, also when acquisition is already stopped before.
std::unique_ptr< IProtocolHandler > m_pProtocolHandler
bool login(IAuthentication::UserLevel userLevel, const std::string password)
std::unique_ptr< TcpSocket > m_pTransport
CoLaCommand sendCommand(CoLaCommand &command)
Send a CoLaBCommand to the device and waits for the result.
bool logout()
Logout from the device.
bool open(ProtocolType type, const std::string &hostname, uint8_t sessionTimeout_s=kSessionTimeout_s)
bool stepAcquisition()
Trigger a single image on the device. Works only when acquisition is stopped.
std::unique_ptr< IAuthentication > m_pAuthentication
std::string readFlexString()
Read a flex string, and advance position according to string size.
const CoLaCommand build()