FEDRA emulsion software from the OPERA Collaboration
PAVProtocolDef.h
Go to the documentation of this file.
1 #ifndef _PAVPROTOCOLDEF_H_
2 #define _PAVPROTOCOLDEF_H_
3 
4 /****************************
5 * messge stucture:
6 * [msg size][data crc32][protocol version][data]
7 * msg size = size of (data & crc), 4 bytes
8 * data crc32 is obtained using algorithm described below, 4 bytes
9 * protocol version=PAVPROT_VERSION, 2b
10 *
11 * data structure depends on messge type:
12 * [msg type=PAVPROT_MSGXML, 1b][xml string size, incl 0 char if present, 4b][string]
13 * [msg type=PAVPROT_MSGRAW, 1b][raw data size,4b][raw data]
14 *
15 *****************************/
16 /*
17  CRC-32 description
18  Name : "CRC-32"
19  Width : 32
20  Poly : 04C11DB7
21  Init : FFFFFFFF
22  RefIn : True
23  RefOut : True
24  XorOut : FFFFFFFF
25  Check : CBF43926
26 */
27 
28 #ifndef _MSC_VER
29 #include "inttypes.h"
30 #endif
31 
32 
33 #define PAVPROT_VERSION 1
34 
35 #define PAVPROT_MSGXML 1
36 #define PAVPROT_MSGRAW 2
37 
38 #define PAVPROT_OK 0
39 #define PAVPROT_ERROR 1
40 #define PAVPROT_BUSY 2
41 #define PAVPROT_CANCELED 3
42 #define PAVPROT_FINISHED 4
43 #define PAVPROT_SEQVIOLATION 5
44 #define PAVPROT_XMLERROR 6
45 #define PAVPROT_MSGERROR 7
46 
47 #define PAVPROT_CLIENTVERSION 0.2
48 #define PAVPROT_MSGRAW 2
49 
50 #define PAVPROT_NODE_ROOT "PAVProtocol"
51 #define PAVPROT_NODE_SMP "SetModuleParams"
52 #define PAVPROT_NODE_GMP "GetModuleParams"
53 #define PAVPROT_NODE_SPP "SetPathParams"
54 #define PAVPROT_NODE_GPP "GetPathParams"
55 #define PAVPROT_NODE_MARKS "FindMarks"
56 #define PAVPROT_NODE_START "Start"
57 #define PAVPROT_NODE_STOP "Stop"
58 #define PAVPROT_NODE_MESS "Message"
59 
60 //ToDo: Remove all the folowing(defined in last PAVDef.h):
61 #ifdef __CINT__
62 typedef Char_t int8;
63 typedef Short_t int16;
64 typedef Int_t int32;
65 typedef Long64_t int64;
66 typedef UChar_t uint8;
67 typedef UShort_t uint16;
68 typedef UInt_t uint32;
69 typedef ULong64_t uint64;
70 #else
71 #ifdef _MSC_VER
72 typedef __int8 int8;
73 typedef __int16 int16;
74 typedef __int32 int32;
75 typedef __int64 int64;
76 //typedef __int128 int128;
77 typedef unsigned __int8 uint8;
78 typedef unsigned __int16 uint16;
79 typedef unsigned __int32 uint32;
80 typedef unsigned __int64 uint64;
81 //typedef unsigned int128 uint128;
82 #else
83 typedef int8_t int8;
84 typedef int16_t int16;
85 typedef int32_t int32;
86 typedef int64_t int64;
87 //typedef __int128 int128;
88 typedef uint8_t uint8;
89 typedef uint16_t uint16;
90 typedef uint32_t uint32;
91 typedef uint64_t uint64;
92 //typedef unsigned int128 uint128;
93 #endif
94 #endif
95 
96 typedef int64 Int64;
97 
98 typedef float float32;
99 typedef double float64;
100 
101 #endif
102 
double float64
Definition: PAVProtocolDef.h:99
uint8_t uint8
Definition: PAVProtocolDef.h:88
int64 Int64
Definition: PAVProtocolDef.h:96
int64_t int64
Definition: PAVProtocolDef.h:86
int16_t int16
Definition: PAVProtocolDef.h:84
int8_t int8
Definition: PAVProtocolDef.h:83
float float32
Definition: PAVProtocolDef.h:98
int32_t int32
Definition: PAVProtocolDef.h:85
uint64_t uint64
Definition: PAVProtocolDef.h:91
uint16_t uint16
Definition: PAVProtocolDef.h:89
uint32_t uint32
Definition: PAVProtocolDef.h:90
__int64 int64
Definition: nidaqmx.h:67