ChimeraTK-DeviceAccess  03.18.00
ChimeraTK::Rebot::Connection Class Reference

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...
 

Detailed Description

Handles the communication over TCP protocol with RebotDevice-based devices.

Definition at line 19 of file Connection.h.

Constructor & Destructor Documentation

◆ Connection()

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.

Member Function Documentation

◆ close()

void ChimeraTK::Rebot::Connection::close ( )

Closes a connection with the device.

Definition at line 50 of file Connection.cc.

◆ isOpen()

bool ChimeraTK::Rebot::Connection::isOpen ( )

Get the connection state.

Definition at line 58 of file Connection.cc.

◆ open()

void ChimeraTK::Rebot::Connection::open ( )

Opens a connection to the device.

Definition at line 17 of file Connection.cc.

◆ read()

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.

◆ write()

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.


The documentation for this class was generated from the following files: