Class VisionaryControl
Defined in File VisionaryControl.h
Class Documentation
-
class VisionaryControl
Public Types
Public Functions
-
VisionaryControl()
-
~VisionaryControl()
-
bool open(ProtocolType type, const std::string &hostname, uint8_t sessionTimeout_s = kSessionTimeout_s)
Opens a connection to a Visionary sensor
- Parameters:
type – [in] protocol type the sensor understands (CoLa-A, CoLa-B or CoLa-2). This information is found in the sensor documentation.
hostname – [in] name or IP address of the Visionary sensor.
sessionTimeout_s – [in] timeout of session in seconds
- Return values:
true – The connection to the sensor successfully was established.
false – The connection attempt failed; the sensor is either
switched off or has a different IP address or name
not available using for PCs network settings (different subnet)
the protocol type or the port did not match. Please check your sensor documentation.
-
void close()
Close a connection
Closes the control connection. It is allowed to call close of a connection that is not open. In this case this call is a no-op.
-
bool login(IAuthentication::UserLevel userLevel, const std::string password)
Login to the device.
- Parameters:
userLevel – [in] The user level to login as.
password – [in] Password for the selected user level.
- Returns:
error code, 0 on success
-
bool logout()
Logout from the device.
- Returns:
True if logout was successful, false otherwise.
-
std::string getDeviceIdent()
Get device information by calling the “DeviceIdent” method on the device.
- Returns:
True if successful, false otherwise.
-
bool startAcquisition()
Start streaming the data by calling the “PLAYSTART” method on the device. Works only when acquisition is stopped.
- Returns:
True if successful, false otherwise.
-
bool stepAcquisition()
Trigger a single image on the device. Works only when acquisition is stopped.
- Returns:
True if successful, false otherwise.
-
bool stopAcquisition()
Stops the data stream. Works always, also when acquisition is already stopped before.
-
bool getDataStreamConfig()
Tells the device that there is a streaming channel by invoking a method named GetBlobClientConfig.
- Returns:
True if successful, false otherwise.
-
CoLaCommand sendCommand(CoLaCommand &command)
Send a CoLaBCommand to the device and waits for the result.
- Parameters:
command – Command to send
- Returns:
The response.
Public Static Attributes
-
static const uint8_t kSessionTimeout_s = 5u
Default session timeout in seconds.
-
VisionaryControl()