-
Notifications
You must be signed in to change notification settings - Fork 0
/
ecimsgh.h
63 lines (56 loc) · 1.58 KB
/
ecimsgh.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
/*
* ecimsgh.h
*
* Author : kolja gavaATbergamoblog.it
*
* Creation : 21 05 2005
*
* ****************************************************************************
* File : $RCSfile: ecimsgh.h,v $
* Version : $Revision: 1.2 $
* Modified by : $Author: kolja_gava $ ($Date: 2005/09/30 15:43:08 $)
* Licence : GPL
* ****************************************************************************
*
* eci messages Handler between eci process
*
* ATTENTION : process initializing EciMsgQueue must call deallocEciMsgQueue function on exit.
* Remember to handle all termination signal (at least : SIGTERM, SIGINT, SIGQUIT)
*
*/
#ifndef ECIMSGH_H
#define ECIMSGH_H
/*eciadsl process type list*/
enum EciadslProcessType{
ECI_PT_SYNCH=0x0000000000000001,
ECI_PT_PPP=0x0000000000000100,
ECI_PT_UI=0x0000000000010000,
ECI_PT_UNKNOWN=0x0000000001000000
};
/*eciadsl msg command list*/
enum EciadslMsgCmd{
ECI_MC_NO_ACTION=0,
ECI_MC_DO_FIRM=1,
ECI_MC_FIRMED=2,
ECI_MC_DO_SYNCH=3,
ECI_MC_SYNCHED=4,
ECI_MC_DO_CONNECT=5,
ECI_MC_CONNECTED=6,
ECI_MC_BANDWIDTH=7,
ECI_MC_DO_DISCONNECT=8,
ECI_MC_DISCONNECTED=9,
ECI_MC_CMD_FAILED=10,
ECI_MC_CONNECTION_FAILED=11
};
#define ECI_MSG_MAX_DATA_SIZE 10
struct eci_msg{
long sender;
enum EciadslMsgCmd ecicmd;
unsigned short datasize;
char data[ECI_MSG_MAX_DATA_SIZE];
};
inline int rcvEciMsg(struct eci_msg* ecimsg, int wait, int force_read);
inline int sndEciMsg(enum EciadslMsgCmd msgcmd, char * data, int datasize, long DestEciPT, int wait);
inline int initEciMsgQueue(long EciPT);
inline int deallocEciMsgQueue();
#endif