FEDRA emulsion software from the OPERA Collaboration
PAVProtocolDef.h
Go to the documentation of this file.
1#ifndef _PAVPROTOCOLDEF_H_
2#define _PAVPROTOCOLDEF_H_/****************************
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*****************************/
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__
62typedef Char_t int8;
63typedef Short_t int16;
64typedef Int_t int32;
65typedef Long64_t int64;
66typedef UChar_t uint8;
67typedef UShort_t uint16;
68typedef UInt_t uint32;
69typedef ULong64_t uint64;
70#else
71#ifdef _MSC_VER
72typedef __int8 int8;
73typedef __int16 int16;
74typedef __int32 int32;
75typedef __int64 int64;
76//typedef __int128 int128;
77typedef unsigned __int8 uint8;
78typedef unsigned __int16 uint16;
79typedef unsigned __int32 uint32;
80typedef unsigned __int64 uint64;
81//typedef unsigned int128 uint128;
82#else
83typedef int8_t int8;
84typedef int16_t int16;
85typedef int32_t int32;
86typedef int64_t int64;
87//typedef __int128 int128;
88typedef uint8_t uint8;
89typedef uint16_t uint16;
90typedef uint32_t uint32;
91typedef uint64_t uint64;
92//typedef unsigned int128 uint128;
93#endif
94#endif
95
96typedef int64 Int64;
97
98typedef float float32;
99typedef double float64;
100
101#endif
102
double float64
Definition: PAVProtocolDef.h:99
UChar_t uint8
Definition: PAVProtocolDef.h:66
int64 Int64
Definition: PAVProtocolDef.h:96
Long64_t int64
Definition: PAVProtocolDef.h:65
Short_t int16
Definition: PAVProtocolDef.h:63
Char_t int8
Definition: PAVProtocolDef.h:62
float float32
Definition: PAVProtocolDef.h:98
Int_t int32
Definition: PAVProtocolDef.h:64
ULong64_t uint64
Definition: PAVProtocolDef.h:69
UShort_t uint16
Definition: PAVProtocolDef.h:67
UInt_t uint32
Definition: PAVProtocolDef.h:68
__int64 int64
Definition: nidaqmx.h:67