rllib
1
Main Page
Classes
Files
File List
File Members
All
Classes
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
lib
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,
31
MSG_RECEIVE
= 1,
32
MSG_SDO_READ
= 0,
33
MSG_SDO_WRITE
= 1,
34
MSG_PDO_RECEIVE
= 3,
35
MSG_CONNECT
= 5,
36
MSG_DISCONNECT
= 6,
37
MSG_PDO_TRANSMIT
= 4,
38
MSG_NMT_TRANSMIT
= 7,
39
MSG_RESTART_BOARD
= 8,
40
MSG_GET_NODE_STATE
= 9
41
};
42
43
45
51
class
rlCanOpenDaemon
{
52
public
:
53
57
rlCanOpenDaemon
();
58
62
rlCanOpenDaemon
(
int
_port,
char
* _iniFileName=0);
63
65
~rlCanOpenDaemon
();
66
68
int
getPort
();
69
73
void
start
();
74
76
rlCanOpen
*
nodes
;
77
81
rlThread
daemon_thread
;
82
83
private
:
84
int
port
;
85
86
};
87
88
// parameter struct for passing parameters to handler thread
89
struct
THREADTRANSFER
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
Generated by
1.8.2