rllib  1
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros
Public Member Functions | Public Attributes | Private Attributes | List of all members
rlCanOpenDaemon Class Reference

canopen tcp/ip interface for concurrent device-access of multiple clientprocesses More...

#include <rlcanopendaemon.h>

Collaboration diagram for rlCanOpenDaemon:
Collaboration graph
[legend]

Public Member Functions

 rlCanOpenDaemon ()
 empty constructor initializes on port 5000.
 
 rlCanOpenDaemon (int _port, char *_iniFileName=0)
 main constructor sets port and inifilename.
 
 ~rlCanOpenDaemon ()
 
int getPort ()
 
void start ()
 runs service in endless loop
 

Public Attributes

rlCanOpennodes
 
rlThread daemon_thread
 

Private Attributes

int port
 

Detailed Description

canopen tcp/ip interface for concurrent device-access of multiple clientprocesses

this is a multi threaded server process, which listens on a tcp port for incomming connections. It runs the only recommended instance of rlcanopen class for beeing the very only process accessing the device. Different processes who concurrently try to access the device will be queued autmaticly by daemonprocess. These processes are inteded to communicate through rlcanopenclient.

Definition at line 51 of file rlcanopendaemon.h.

Constructor & Destructor Documentation

rlCanOpenDaemon::rlCanOpenDaemon ( )

empty constructor initializes on port 5000.

empty constructor initializes on port 5000. creates a new rlCanOpen Object which performs all access to canopen device

Definition at line 253 of file rlcanopendaemon.cpp.

{
nodes = new rlCanOpen();
port = 5000;
}
rlCanOpenDaemon::rlCanOpenDaemon ( int  _port,
char *  _iniFileName = 0 
)

main constructor sets port and inifilename.

main constructor sets port and inifilename. creates a new rlCanOpen Object which performs all access to canopen device

Definition at line 259 of file rlcanopendaemon.cpp.

{
if (_iniFileName!=0){
nodes = new rlCanOpen(_iniFileName);
}
else{
nodes = new rlCanOpen();
}
port = _port;
}
rlCanOpenDaemon::~rlCanOpenDaemon ( )

destructor destroys rlcanopen object

Definition at line 272 of file rlcanopendaemon.cpp.

{
rlDebugPrintf("destruktor rlCanOpenDaemon\n");
if (nodes!=0){
delete nodes;
}
}

Member Function Documentation

int rlCanOpenDaemon::getPort ( )

returns value of current port

Definition at line 280 of file rlcanopendaemon.cpp.

{
return port;
}
void rlCanOpenDaemon::start ( )

runs service in endless loop

daemon creates a listener thread which handels incoming connections by himself creating clientconnection threads for each client connecting to the daemon.

Definition at line 288 of file rlcanopendaemon.cpp.

{
/* NO NO this has to be done by the user RL 17.06.2004
while(1){
rlsleep(100);
}
*/
}

Member Data Documentation

rlThread rlCanOpenDaemon::daemon_thread

rlThread object which manages basic thread functionality e.g. locking to prevent threads from concurrently accessing the canopen device

Definition at line 81 of file rlcanopendaemon.h.

rlCanOpen* rlCanOpenDaemon::nodes

pointer to rlCanOpen Object which performs all access to canopen device

Definition at line 76 of file rlcanopendaemon.h.

int rlCanOpenDaemon::port
private

Definition at line 84 of file rlcanopendaemon.h.


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