123
Fork of LG by
Device.h@74:f4d9c3403578, 2016-02-27 (annotated)
- Committer:
- Diletant
- Date:
- Sat Feb 27 18:42:37 2016 +0000
- Revision:
- 74:f4d9c3403578
- Child:
- 76:1c54a614564d
Device settings&protocol update. Device.h; Not completed!!!
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Diletant | 74:f4d9c3403578 | 1 | #ifndef __DEVICE_H__ |
Diletant | 74:f4d9c3403578 | 2 | #define __DEVICE_H__ |
Diletant | 74:f4d9c3403578 | 3 | |
Diletant | 74:f4d9c3403578 | 4 | #include "DeviceSettings.h" |
Diletant | 74:f4d9c3403578 | 5 | #include "DeviceProtocol.h" |
Diletant | 74:f4d9c3403578 | 6 | |
Diletant | 74:f4d9c3403578 | 7 | typedef enum _DeviceLatchMode { |
Diletant | 74:f4d9c3403578 | 8 | DeviceLatch10kHz,//internal latch by pulses 10 kHz (power on default mode) |
Diletant | 74:f4d9c3403578 | 9 | DeviceLatchMeander, //internal latch by signed meander pulses |
Diletant | 74:f4d9c3403578 | 10 | DeviceLatchRS422, //external latch by RS422 B_Delta_PS request |
Diletant | 74:f4d9c3403578 | 11 | DeviceLatchPulse //external latch by pulse request |
Diletant | 74:f4d9c3403578 | 12 | } DeviceLatchMode; |
Diletant | 74:f4d9c3403578 | 13 | |
Diletant | 74:f4d9c3403578 | 14 | typedef enum _DeviceDeltaMode { |
Diletant | 74:f4d9c3403578 | 15 | DeviceDeltaModePS, |
Diletant | 74:f4d9c3403578 | 16 | DeviceDeltaModeBINS, |
Diletant | 74:f4d9c3403578 | 17 | DeviceDeltaModeSF |
Diletant | 74:f4d9c3403578 | 18 | } DeviceDeltaMode; |
Diletant | 74:f4d9c3403578 | 19 | |
Diletant | 74:f4d9c3403578 | 20 | typedef struct _DeviceLatchState { |
Diletant | 74:f4d9c3403578 | 21 | //Latch mode |
Diletant | 74:f4d9c3403578 | 22 | DeviceLatchMode mode; |
Diletant | 74:f4d9c3403578 | 23 | } DeviceLatchState; |
Diletant | 74:f4d9c3403578 | 24 | |
Diletant | 74:f4d9c3403578 | 25 | typedef struct _DeviceCountersState { |
Diletant | 74:f4d9c3403578 | 26 | //Latch |
Diletant | 74:f4d9c3403578 | 27 | DeviceLatchState latch; |
Diletant | 74:f4d9c3403578 | 28 | //Delta command mode |
Diletant | 74:f4d9c3403578 | 29 | DeviceDeltaMode deltaMode; |
Diletant | 74:f4d9c3403578 | 30 | } DeviceCountersState; |
Diletant | 74:f4d9c3403578 | 31 | |
Diletant | 74:f4d9c3403578 | 32 | typedef struct _Device { |
Diletant | 74:f4d9c3403578 | 33 | DeviceSettings settings; |
Diletant | 74:f4d9c3403578 | 34 | |
Diletant | 74:f4d9c3403578 | 35 | DeviceRequest request; |
Diletant | 74:f4d9c3403578 | 36 | DeviceResponse response; |
Diletant | 74:f4d9c3403578 | 37 | DeviceProtocolDecoder decoder; |
Diletant | 74:f4d9c3403578 | 38 | DeviceProtocolEncoder encoder; |
Diletant | 74:f4d9c3403578 | 39 | |
Diletant | 74:f4d9c3403578 | 40 | DeviceCountersState counters; |
Diletant | 74:f4d9c3403578 | 41 | } Device; |
Diletant | 74:f4d9c3403578 | 42 | |
Diletant | 74:f4d9c3403578 | 43 | #endif /* __DEVICE_H__ */ |