forked from xLightsSequencer/xLights
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathControl.h
50 lines (39 loc) · 1.23 KB
/
Control.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
#ifndef CONTROL_H
#define CONTROL_H
#include <cstdint>
#define FPP_CTRL_PORT 32320
#define FPP_CTRL_CSV_PORT 32321
// 239.F.P.P
#define MULTISYNC_MULTICAST_ADDRESS "239.70.80.80"
#define CTRL_PKT_SYNC 1
#define CTRL_PKT_EVENT 2
#define CTRL_PKT_BLANK 3
#define CTRL_PKT_PING 4
#define CTRL_PKT_CMD 6
// Force the structures to not be aligned on boundaries
#ifdef _MSC_VER
#define PACK( __Declaration__ ) __pragma( pack(push, 1) ) __Declaration__ __pragma( pack(pop) )
#elif defined(__WXWINDOWS__)
#pragma pack(push)
#pragma pack(1)
#define PACK( __Declaration__ ) __Declaration__
#else
#define PACK( __Declaration__ ) __attribute__((packed)) __Declaration__
#endif
PACK( typedef struct { char fppd[4]; uint8_t pktType; uint16_t extraDataLen; } ControlPkt);
#define CTRL_PKT_SYNC 1
#define CTRL_PKT_EVENT 2
#define CTRL_PKT_BLANK 3
#define CTRL_PKT_PING 4
#define CTRL_PKT_CMD 6
#define SYNC_PKT_START 0
#define SYNC_PKT_STOP 1
#define SYNC_PKT_SYNC 2
#define SYNC_FILE_SEQ 0
#define SYNC_FILE_MEDIA 1
PACK( typedef struct { uint8_t pktType; uint8_t fileType; uint32_t frameNumber; float secondsElapsed; char filename[1]; } SyncPkt);
#ifdef _MSC_VER
#elif defined(__WXWINDOWS__)
#pragma pack(pop)
#endif
#endif /* _CONTROL_H */