DESERT 3.5.1
Loading...
Searching...
No Matches
UDPPosition Class Reference

#include <udpposition.h>

Inheritance diagram for UDPPosition:
Collaboration diagram for UDPPosition:

Public Member Functions

 UDPPosition ()
 
virtual ~UDPPosition ()=default
 
virtual double getX ()
 
virtual double getY ()
 
virtual double getZ ()
 
virtual int command (int argc, const char *const *argv)
 
virtual void setX (double x)
 
virtual void setY (double y)
 
virtual void setZ (double z)
 
int debugLevel () const
 
void setPosition (const PositionData &pos)
 

Private Attributes

int debug_
 
unsigned int m_UdpReceivePort
 
unsigned int m_SocketReadTimeout {50000}
 
std::mutex mutex_
 
PositionListener< UDPPosition > * p_PositionListener {nullptr}
 

Detailed Description

Definition at line 52 of file udpposition.h.

Constructor & Destructor Documentation

◆ UDPPosition()

UDPPosition::UDPPosition ( )

Constructor.

Definition at line 60 of file udpposition.cpp.

◆ ~UDPPosition()

virtual UDPPosition::~UDPPosition ( )
virtualdefault

Destructor.

Member Function Documentation

◆ command()

int UDPPosition::command ( int  argc,
const char *const *  argv 
)
virtual

TCL command interpreter setdest <integer value>integer value>integer value>: set the movement pattern: the firts two values define the point to be reached (i.e., the direction of the movement) and the third value defines the speed to be used

Moreover it inherits all the OTcl method of Position

Parameters
argcnumber of arguments in argv
argvarray of strings which are the comand parameters (Note that argv[0] is the name of the object)
Returns
TCL_OK or TCL_ERROR whether the command has been dispatched succesfully or no

Definition at line 67 of file udpposition.cpp.

◆ debugLevel()

int UDPPosition::debugLevel ( ) const
inline

Definition at line 110 of file udpposition.h.

◆ getX()

double UDPPosition::getX ( )
virtual

Method that return the current projection of the node on the x-axis.

If it's necessary (updating time ia expired), update the position values before returns it.

Definition at line 120 of file udpposition.cpp.

◆ getY()

double UDPPosition::getY ( )
virtual

Method that return the current projection of the node on the y-axis.

If it's necessary (updating time ia expired), update the position values before returns it.

Definition at line 126 of file udpposition.cpp.

◆ getZ()

double UDPPosition::getZ ( )
virtual

Method that return the current projection of the node on the z-axis.

If it's necessary (updating time ia expired), update the position values before returns it.

Definition at line 132 of file udpposition.cpp.

◆ setPosition()

void UDPPosition::setPosition ( const PositionData pos)

Definition at line 109 of file udpposition.cpp.

◆ setX()

void UDPPosition::setX ( double  x)
virtual

Definition at line 138 of file udpposition.cpp.

◆ setY()

void UDPPosition::setY ( double  y)
virtual

Definition at line 143 of file udpposition.cpp.

◆ setZ()

void UDPPosition::setZ ( double  z)
virtual

Definition at line 148 of file udpposition.cpp.

Member Data Documentation

◆ debug_

int UDPPosition::debug_
private

Definition at line 114 of file udpposition.h.

◆ m_SocketReadTimeout

unsigned int UDPPosition::m_SocketReadTimeout {50000}
private

Socket timeout for select() call in [us].

Definition at line 118 of file udpposition.h.

◆ m_UdpReceivePort

unsigned int UDPPosition::m_UdpReceivePort
private

Position receive port number for UDP socket.

Definition at line 116 of file udpposition.h.

◆ mutex_

std::mutex UDPPosition::mutex_
private

Definition at line 120 of file udpposition.h.

◆ p_PositionListener

PositionListener<UDPPosition>* UDPPosition::p_PositionListener {nullptr}
private

Definition at line 121 of file udpposition.h.


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