Public Types | Public Member Functions | Private Attributes | List of all members
urcl::ToolCommSetup Class Reference

Class holding a tool communication configuration. More...

#include <tool_communication.h>

Public Types

using RxIdleCharsT = Limited< float >
 
using StopBitsT = Limited< uint32_t >
 
using TxIdleCharsT = Limited< float >
 

Public Member Functions

uint32_t getBaudRate () const
 Return the baud rate currently stored. More...
 
Parity getParity () const
 Return the parity currently stored. More...
 
RxIdleCharsT::Datatype getRxIdleChars () const
 Return the number of rx idle chars currently stored. More...
 
StopBitsT::Datatype getStopBits () const
 Return the number of stop bits currently stored. More...
 
ToolVoltage getToolVoltage () const
 Return the tool voltage currently stored. More...
 
TxIdleCharsT::Datatype getTxIdleChars () const
 Return the number of tx idle chars currently stored. More...
 
void setBaudRate (const uint32_t baud_rate)
 Setup the tool communication baud rate that will be configured on the robot. This will not immediately change values on the robot, it will only be stored inside the ToolCommSetup object. More...
 
void setParity (const Parity parity)
 Setup the tool communication parity that will be configured on the robot. This will not immediately change values on the robot, it will only be stored inside the ToolCommSetup object. More...
 
void setRxIdleChars (const RxIdleCharsT::Datatype rx_idle_chars)
 Setup the tool communication number of idle chars for the rx channel that will be configured on the robot. This will not immediately change values on the robot, it will only be stored inside the ToolCommSetup object. More...
 
void setStopBits (const StopBitsT::Datatype stop_bits)
 Setup the tool communication number of stop bits that will be configured on the robot. This will not immediately change values on the robot, it will only be stored inside the ToolCommSetup object. More...
 
void setToolVoltage (const ToolVoltage tool_voltage)
 Setup the tool voltage that will be configured on the robot. This will not immediately change values on the robot, it will only be stored inside the ToolCommSetup object. More...
 
void setTxIdleChars (const TxIdleCharsT::Datatype tx_idle_chars)
 Setup the tool communication number of idle chars for the tx channel that will be configured on the robot. This will not immediately change values on the robot, it will only be stored inside the ToolCommSetup object. More...
 
 ToolCommSetup ()
 
 ~ToolCommSetup ()=default
 

Private Attributes

uint32_t baud_rate_
 
const std::set< uint32_t > baud_rates_allowed_
 
Parity parity_
 
RxIdleCharsT rx_idle_chars_
 
StopBitsT stop_bits_
 
ToolVoltage tool_voltage_
 
TxIdleCharsT tx_idle_chars_
 

Detailed Description

Class holding a tool communication configuration.

Definition at line 118 of file tool_communication.h.

Member Typedef Documentation

Definition at line 125 of file tool_communication.h.

Definition at line 124 of file tool_communication.h.

Definition at line 126 of file tool_communication.h.

Constructor & Destructor Documentation

urcl::ToolCommSetup::ToolCommSetup ( )

Definition at line 32 of file tool_communication.cpp.

urcl::ToolCommSetup::~ToolCommSetup ( )
default

Member Function Documentation

uint32_t urcl::ToolCommSetup::getBaudRate ( ) const
inline

Return the baud rate currently stored.

Definition at line 171 of file tool_communication.h.

Parity urcl::ToolCommSetup::getParity ( ) const
inline

Return the parity currently stored.

Definition at line 156 of file tool_communication.h.

RxIdleCharsT::Datatype urcl::ToolCommSetup::getRxIdleChars ( ) const
inline

Return the number of rx idle chars currently stored.

Definition at line 207 of file tool_communication.h.

StopBitsT::Datatype urcl::ToolCommSetup::getStopBits ( ) const
inline

Return the number of stop bits currently stored.

Definition at line 189 of file tool_communication.h.

ToolVoltage urcl::ToolCommSetup::getToolVoltage ( ) const
inline

Return the tool voltage currently stored.

Definition at line 140 of file tool_communication.h.

TxIdleCharsT::Datatype urcl::ToolCommSetup::getTxIdleChars ( ) const
inline

Return the number of tx idle chars currently stored.

Definition at line 225 of file tool_communication.h.

void urcl::ToolCommSetup::setBaudRate ( const uint32_t  baud_rate)

Setup the tool communication baud rate that will be configured on the robot. This will not immediately change values on the robot, it will only be stored inside the ToolCommSetup object.

Parameters
baud_ratemust be one of baud_rates_allowed_ or an exception will be thrown

Definition at line 42 of file tool_communication.cpp.

void urcl::ToolCommSetup::setParity ( const Parity  parity)
inline

Setup the tool communication parity that will be configured on the robot. This will not immediately change values on the robot, it will only be stored inside the ToolCommSetup object.

Definition at line 149 of file tool_communication.h.

void urcl::ToolCommSetup::setRxIdleChars ( const RxIdleCharsT::Datatype  rx_idle_chars)
inline

Setup the tool communication number of idle chars for the rx channel that will be configured on the robot. This will not immediately change values on the robot, it will only be stored inside the ToolCommSetup object.

Parameters
rx_idle_charsmust be inside [1.0, 40] or this will throw an exception.

Definition at line 200 of file tool_communication.h.

void urcl::ToolCommSetup::setStopBits ( const StopBitsT::Datatype  stop_bits)
inline

Setup the tool communication number of stop bits that will be configured on the robot. This will not immediately change values on the robot, it will only be stored inside the ToolCommSetup object.

Parameters
stop_bitsmust be inside [1,2] or this will throw an exception.

Definition at line 182 of file tool_communication.h.

void urcl::ToolCommSetup::setToolVoltage ( const ToolVoltage  tool_voltage)
inline

Setup the tool voltage that will be configured on the robot. This will not immediately change values on the robot, it will only be stored inside the ToolCommSetup object.

Definition at line 132 of file tool_communication.h.

void urcl::ToolCommSetup::setTxIdleChars ( const TxIdleCharsT::Datatype  tx_idle_chars)
inline

Setup the tool communication number of idle chars for the tx channel that will be configured on the robot. This will not immediately change values on the robot, it will only be stored inside the ToolCommSetup object.

Parameters
tx_idle_charsmust be inside [0.0, 40] or this will throw an exception.

Definition at line 218 of file tool_communication.h.

Member Data Documentation

uint32_t urcl::ToolCommSetup::baud_rate_
private

Definition at line 242 of file tool_communication.h.

const std::set<uint32_t> urcl::ToolCommSetup::baud_rates_allowed_
private
Initial value:
{ 9600,
19200,
38400,
57600,
115200,
static_cast<uint32_t>(1e6),
static_cast<uint32_t>(2e6),
static_cast<uint32_t>(5e6) }

Definition at line 231 of file tool_communication.h.

Parity urcl::ToolCommSetup::parity_
private

Definition at line 241 of file tool_communication.h.

RxIdleCharsT urcl::ToolCommSetup::rx_idle_chars_
private

Definition at line 244 of file tool_communication.h.

StopBitsT urcl::ToolCommSetup::stop_bits_
private

Definition at line 243 of file tool_communication.h.

ToolVoltage urcl::ToolCommSetup::tool_voltage_
private

Definition at line 240 of file tool_communication.h.

TxIdleCharsT urcl::ToolCommSetup::tx_idle_chars_
private

Definition at line 245 of file tool_communication.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 Sun May 9 2021 02:16:26