Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
sick_scan_xd::test::TestServerThread Class Reference

#include <test_server_thread.h>

Public Member Functions

virtual bool start (void)
 
virtual bool stop (void)
 
 TestServerThread (rosNodePtr nh=0, const std::string &scanner_name="undefined", int ip_port=2112)
 
virtual ~TestServerThread ()
 

Protected Member Functions

bool run (void)
 

Protected Attributes

int m_ip_port
 
rosNodePtr m_nh
 
bool m_run_server_thread
 
std::string m_scanner_name
 
std::thread * m_server_thread
 

Detailed Description

class TestServerThread runs a thread to listen and accept tcp connections from clients and generates telegrams to test sick_scan ros driver.

Definition at line 83 of file tools/test_server/include/sick_scan/test_server/test_server_thread.h.

Constructor & Destructor Documentation

◆ TestServerThread()

sick_scan_xd::test::TestServerThread::TestServerThread ( rosNodePtr  nh = 0,
const std::string &  scanner_name = "undefined",
int  ip_port = 2112 
)

Constructor. The server thread does not start automatically, call start() and stop() to start and stop the server.

Parameters
[in]nhros node handle
[in]scanner_namescanner type, f.e. "sick_ldmrs"
[in]ip_portip port for tcp connections, default: 2112

Definition at line 82 of file tools/test_server/src/test_server_thread.cpp.

◆ ~TestServerThread()

sick_scan_xd::test::TestServerThread::~TestServerThread ( )
virtual

Destructor. Stops the server thread and closes all tcp connections.

Definition at line 90 of file tools/test_server/src/test_server_thread.cpp.

Member Function Documentation

◆ run()

bool sick_scan_xd::test::TestServerThread::run ( void  )
protected

◆ start()

bool sick_scan_xd::test::TestServerThread::start ( void  )
virtual

Starts the server thread, starts to listen and accept tcp connections from clients.

Returns
true on success, false on failure.

Definition at line 98 of file tools/test_server/src/test_server_thread.cpp.

◆ stop()

bool sick_scan_xd::test::TestServerThread::stop ( void  )
virtual

Stops the server thread and closes all tcp connections.

Returns
true on success, false on failure.

Definition at line 109 of file tools/test_server/src/test_server_thread.cpp.

Member Data Documentation

◆ m_ip_port

int sick_scan_xd::test::TestServerThread::m_ip_port
protected

◆ m_nh

rosNodePtr sick_scan_xd::test::TestServerThread::m_nh
protected

◆ m_run_server_thread

bool sick_scan_xd::test::TestServerThread::m_run_server_thread
protected

◆ m_scanner_name

std::string sick_scan_xd::test::TestServerThread::m_scanner_name
protected

◆ m_server_thread

std::thread* sick_scan_xd::test::TestServerThread::m_server_thread
protected

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


sick_scan_xd
Author(s): Michael Lehning , Jochen Sprickerhof , Martin Günther
autogenerated on Fri Oct 25 2024 02:47:21