-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmsg.h
More file actions
38 lines (29 loc) · 709 Bytes
/
msg.h
File metadata and controls
38 lines (29 loc) · 709 Bytes
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
/*
* Authors:
* Lakshmi Pradeep <[email protected]>
* Hari Prasad Kalavakunta <[email protected]>
*/
typedef unsigned long long int u64_t;
typedef unsigned int u32_t;
typedef u32_t tangle_msg_type_t;
/* Request messages */
#define GET_UTC_FROM_RAW_REQ 2001
#define GET_RAW_FROM_UTC_REQ 2002
/* Response Messages */
#define GET_UTC_FROM_RAW_RES 3001
#define GET_RAW_FROM_UTC_RES 3002
typedef struct {
u32_t epoch;
}utc_time_t;
typedef struct {
u64_t sec;
u64_t nsec;
}raw_time_t;
typedef union {
utc_time_t utc_time;
raw_time_t raw_time;
} tangle_msg_input_t;
typedef struct tangle_api {
tangle_msg_type_t msg;
tangle_msg_input_t val;
} tangle_api_t;