Public Member Functions | Private Member Functions | Private Attributes | List of all members
urcl::comm::ScriptSender Class Reference

The ScriptSender class starts a TCPServer for a robot to connect to and waits for a request to receive a program. This program is then delivered to the requesting robot. More...

#include <script_sender.h>

Public Member Functions

 ScriptSender ()=delete
 
 ScriptSender (uint32_t port, const std::string &program)
 Creates a ScriptSender object, including a new TCPServer. More...
 

Private Member Functions

void connectionCallback (const int filedescriptor)
 
void disconnectionCallback (const int filedescriptor)
 
void messageCallback (const int filedescriptor, char *buffer)
 
void sendProgram (const int filedescriptor)
 

Private Attributes

std::string program_
 
const std::string PROGRAM_REQUEST_ = std::string("request_program\n")
 
std::thread script_thread_
 
TCPServer server_
 

Detailed Description

The ScriptSender class starts a TCPServer for a robot to connect to and waits for a request to receive a program. This program is then delivered to the requesting robot.

Definition at line 45 of file script_sender.h.

Constructor & Destructor Documentation

urcl::comm::ScriptSender::ScriptSender ( )
delete
urcl::comm::ScriptSender::ScriptSender ( uint32_t  port,
const std::string &  program 
)
inline

Creates a ScriptSender object, including a new TCPServer.

Parameters
portPort to start the server on
programProgram to send to the robot upon request

Definition at line 55 of file script_sender.h.

Member Function Documentation

void urcl::comm::ScriptSender::connectionCallback ( const int  filedescriptor)
inlineprivate

Definition at line 71 of file script_sender.h.

void urcl::comm::ScriptSender::disconnectionCallback ( const int  filedescriptor)
inlineprivate

Definition at line 76 of file script_sender.h.

void urcl::comm::ScriptSender::messageCallback ( const int  filedescriptor,
char *  buffer 
)
inlineprivate

Definition at line 81 of file script_sender.h.

void urcl::comm::ScriptSender::sendProgram ( const int  filedescriptor)
inlineprivate

Definition at line 90 of file script_sender.h.

Member Data Documentation

std::string urcl::comm::ScriptSender::program_
private

Definition at line 67 of file script_sender.h.

const std::string urcl::comm::ScriptSender::PROGRAM_REQUEST_ = std::string("request_program\n")
private

Definition at line 69 of file script_sender.h.

std::thread urcl::comm::ScriptSender::script_thread_
private

Definition at line 66 of file script_sender.h.

TCPServer urcl::comm::ScriptSender::server_
private

Definition at line 65 of file script_sender.h.


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


ur_client_library
Author(s): Thomas Timm Andersen, Simon Rasmussen, Felix Exner, Lea Steffen, Tristan Schnell
autogenerated on Sun May 9 2021 02:16:26