ChimeraTK-DeviceAccess
03.18.00
|
Handles the communication over TCP protocol with RebotDevice-based devices. More...
#include <Connection.h>
Public Member Functions | |
Connection (std::string address, std::string port, uint32_t connectionTimeout_sec) | |
Gets an IP address and port of the device but does not open the connection. More... | |
void | open () |
Opens a connection to the device. More... | |
void | close () |
Closes a connection with the device. More... | |
std::vector< uint32_t > | read (uint32_t numWordsToRead) |
Receives uint32_t words from the socket. More... | |
void | write (const std::vector< uint32_t > &data) |
Sends a std::vector of bytes to the socket. More... | |
bool | isOpen () |
Get the connection state. More... | |
Handles the communication over TCP protocol with RebotDevice-based devices.
Definition at line 19 of file Connection.h.
ChimeraTK::Rebot::Connection::Connection | ( | std::string | address, |
std::string | port, | ||
uint32_t | connectionTimeout_sec | ||
) |
Gets an IP address and port of the device but does not open the connection.
Definition at line 13 of file Connection.cc.
void ChimeraTK::Rebot::Connection::close | ( | ) |
Closes a connection with the device.
Definition at line 50 of file Connection.cc.
bool ChimeraTK::Rebot::Connection::isOpen | ( | ) |
Get the connection state.
Definition at line 58 of file Connection.cc.
void ChimeraTK::Rebot::Connection::open | ( | ) |
Opens a connection to the device.
Definition at line 17 of file Connection.cc.
std::vector< uint32_t > ChimeraTK::Rebot::Connection::read | ( | uint32_t | numWordsToRead | ) |
Receives uint32_t words from the socket.
Definition at line 32 of file Connection.cc.
void ChimeraTK::Rebot::Connection::write | ( | const std::vector< uint32_t > & | data | ) |
Sends a std::vector of bytes to the socket.
Definition at line 42 of file Connection.cc.