HORIBA C++ SDK
Library for HORIBA devices
Loading...
Searching...
No Matches
horiba::communication::WebSocketCommunicator Class Reference

Represents a communication channel with the ICL using a websocket. More...

#include <websocket_communicator.h>

Inheritance diagram for horiba::communication::WebSocketCommunicator:

Public Member Functions

 WebSocketCommunicator (std::string host, std::string port)
 Constructs a communication channel with the ICL based on a host and port.
 
 ~WebSocketCommunicator () override=default
 
void open () override
 Opens the communication channel with the ICL.
 
void close () override
 Closes the communication channel with the ICL.
 
bool is_open () override
 Checks if the communication channel is open or not.
 
Response request_with_response (const Command &command) override
 Sends a command to the ICL and returns the response.
 
- Public Member Functions inherited from horiba::communication::Communicator
virtual ~Communicator ()=default
 

Detailed Description

Represents a communication channel with the ICL using a websocket.

Constructor & Destructor Documentation

◆ WebSocketCommunicator()

horiba::communication::WebSocketCommunicator::WebSocketCommunicator ( std::string host,
std::string port )

Constructs a communication channel with the ICL based on a host and port.

Parameters
hostThe host to connect to
portThe port to connect to

◆ ~WebSocketCommunicator()

horiba::communication::WebSocketCommunicator::~WebSocketCommunicator ( )
overridedefault

Member Function Documentation

◆ close()

void horiba::communication::WebSocketCommunicator::close ( )
overridevirtual

Closes the communication channel with the ICL.

Implements horiba::communication::Communicator.

◆ is_open()

bool horiba::communication::WebSocketCommunicator::is_open ( )
overridevirtual

Checks if the communication channel is open or not.

Returns
True if the communication channel is open, false otherwise

Implements horiba::communication::Communicator.

◆ open()

void horiba::communication::WebSocketCommunicator::open ( )
overridevirtual

Opens the communication channel with the ICL.

Implements horiba::communication::Communicator.

◆ request_with_response()

Response horiba::communication::WebSocketCommunicator::request_with_response ( const Command & command)
overridevirtual

Sends a command to the ICL and returns the response.

Parameters
commandThe command for the ICL
Returns
The response from the ICL

Implements horiba::communication::Communicator.


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