Public Member Functions | Private Member Functions | Private Attributes | List of all members
urcl::control::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_
 
comm::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 47 of file script_sender.h.

Constructor & Destructor Documentation

◆ ScriptSender() [1/2]

urcl::control::ScriptSender::ScriptSender ( )
delete

◆ ScriptSender() [2/2]

urcl::control::ScriptSender::ScriptSender ( uint32_t  port,
const std::string &  program 
)

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 34 of file script_sender.cpp.

Member Function Documentation

◆ connectionCallback()

void urcl::control::ScriptSender::connectionCallback ( const int  filedescriptor)
private

Definition at line 44 of file script_sender.cpp.

◆ disconnectionCallback()

void urcl::control::ScriptSender::disconnectionCallback ( const int  filedescriptor)
private

Definition at line 49 of file script_sender.cpp.

◆ messageCallback()

void urcl::control::ScriptSender::messageCallback ( const int  filedescriptor,
char *  buffer 
)
private

Definition at line 54 of file script_sender.cpp.

◆ sendProgram()

void urcl::control::ScriptSender::sendProgram ( const int  filedescriptor)
private

Definition at line 63 of file script_sender.cpp.

Member Data Documentation

◆ program_

std::string urcl::control::ScriptSender::program_
private

Definition at line 62 of file script_sender.h.

◆ PROGRAM_REQUEST_

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

Definition at line 64 of file script_sender.h.

◆ script_thread_

std::thread urcl::control::ScriptSender::script_thread_
private

Definition at line 61 of file script_sender.h.

◆ server_

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

Definition at line 60 of file script_sender.h.


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


ur_client_library
Author(s): Thomas Timm Andersen, Simon Rasmussen, Felix Exner, Lea Steffen, Tristan Schnell
autogenerated on Tue Jul 4 2023 02:09:47