rllib  1
rlcanopendaemon.h
Go to the documentation of this file.
1 /***************************************************************************
2  rlcanopen.cpp - description
3  -------------------
4  begin : Tue March 03 2004
5  copyright : (C) 2004 by Marc Bräutigam, Christian Wilmes, R. Lehrig
6  email : lehrig@t-online.de
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This library is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU LESSER GENERAL PUBLIC LICENSE as *
13  * published by the Free Software Foundation *
14  * *
15  ***************************************************************************/
16 #ifndef DAEMON
17 #define DAEMON
18 
19 #include <stdio.h>
20 #include <stdlib.h>
21 #include <string.h>
22 #include "rlthread.h"
23 #include "rlcutil.h"
24 #include "rlsocket.h"
25 #include "rlwthread.h"
26 #include "rlcanopen.h"
27 
28 
29  enum rl_msg {
30  MSG_SEND = 0,
41  };
42 
43 
45 
52  public:
53 
57  rlCanOpenDaemon();
58 
62  rlCanOpenDaemon(int _port, char* _iniFileName=0);
63 
66 
68  int getPort();
69 
73  void start();
74 
77 
82 
83  private:
84  int port;
85 
86 };
87 
88 // parameter struct for passing parameters to handler thread
90 {
91  int socketdescr; // socket descriptor identifying the new connection
92  rlCanOpenDaemon* daemonptr; // pointer to daemon object
93 };
94 
95 
96 
97 
98 
99 
100 #endif
rlThread daemon_thread
main class which provides canopen API functions and manages all nodes.
Definition: rlcanopen.h:55
canopen tcp/ip interface for concurrent device-access of multiple clientprocesses ...
rlCanOpen * nodes
rlCanOpenDaemon * daemonptr
~rlCanOpenDaemon()
destructor destroys rlcanopen object
int getPort()
returns value of current port
void start()
runs service in endless loop
rlCanOpenDaemon()
empty constructor initializes on port 5000.
rl_msg