Arianna autonomous DAQ firmware
Dependencies: mbed SDFileSystemFilinfo AriSnProtocol NetServicesMin AriSnComm MODSERIAL PowerControlClkPatch DS1820OW
SnCommWinSBD.cpp@110:d1da040a0cf2, 2015-11-24 (annotated)
- Committer:
- uci1
- Date:
- Tue Nov 24 21:52:27 2015 +0000
- Revision:
- 110:d1da040a0cf2
- Parent:
- 84:80b15993944e
- Child:
- 116:8099b754fbb4
Stn32 (slow) with conf name. SD stall fix. No interface chip. Safety nets.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
uci1 | 37:ff95e7070f26 | 1 | #include "SnCommWinSBD.h" |
uci1 | 37:ff95e7070f26 | 2 | |
uci1 | 37:ff95e7070f26 | 3 | #include "SnCommSBD.h" |
uci1 | 37:ff95e7070f26 | 4 | |
uci1 | 41:d6f5e2f09e07 | 5 | SnCommWinSBD::SnCommWinSBD(COMM_SERIALTYPE* sbd) : |
uci1 | 40:1324da35afd4 | 6 | SnCommWin(new SnCommSBD(sbd)) { |
uci1 | 37:ff95e7070f26 | 7 | |
uci1 | 37:ff95e7070f26 | 8 | } |
uci1 | 84:80b15993944e | 9 | /* |
uci1 | 37:ff95e7070f26 | 10 | SnCommWin::ECommWinResult SnCommWinSBD::OpenWindow(const uint32_t timeout, |
uci1 | 37:ff95e7070f26 | 11 | const bool sendStatus, |
uci1 | 37:ff95e7070f26 | 12 | const SnConfigFrame& conf, |
uci1 | 37:ff95e7070f26 | 13 | const SnEventFrame& evt, |
uci1 | 37:ff95e7070f26 | 14 | const SnPowerFrame& pow, |
uci1 | 37:ff95e7070f26 | 15 | const uint16_t seq, |
uci1 | 37:ff95e7070f26 | 16 | const float thmrate, |
uci1 | 37:ff95e7070f26 | 17 | const float evtrate, |
uci1 | 56:0bba0ef15697 | 18 | const uint32_t powerOnTime, |
uci1 | 56:0bba0ef15697 | 19 | const SnTempFrame& temper, |
uci1 | 37:ff95e7070f26 | 20 | char* const genBuf) { |
uci1 | 84:80b15993944e | 21 | */ |
uci1 | 84:80b15993944e | 22 | SnCommWin::ECommWinResult SnCommWinSBD::OpenWindow(const bool sendStatus, |
uci1 | 84:80b15993944e | 23 | const SnConfigFrame& conf, |
uci1 | 84:80b15993944e | 24 | const SnPowerFrame& pow, // com win power |
uci1 | 84:80b15993944e | 25 | const SnEventFrame& stEvent, |
uci1 | 84:80b15993944e | 26 | const uint16_t seq, |
uci1 | 84:80b15993944e | 27 | const float thmrate, |
uci1 | 84:80b15993944e | 28 | const float evtrate, |
uci1 | 84:80b15993944e | 29 | const uint32_t powerOnTime, |
uci1 | 84:80b15993944e | 30 | const SnTempFrame& temper, // com win temp |
uci1 | 84:80b15993944e | 31 | char* const genBuf, |
uci1 | 84:80b15993944e | 32 | const uint32_t timeout_clock) { |
uci1 | 84:80b15993944e | 33 | |
uci1 | 37:ff95e7070f26 | 34 | #ifdef DEBUG |
uci1 | 37:ff95e7070f26 | 35 | printf("SnCommWinSBD::OpenWindow\r\n"); |
uci1 | 37:ff95e7070f26 | 36 | #endif |
uci1 | 37:ff95e7070f26 | 37 | |
uci1 | 84:80b15993944e | 38 | const bool canCon = fComm->Connect(timeout_clock); |
uci1 | 37:ff95e7070f26 | 39 | |
uci1 | 37:ff95e7070f26 | 40 | #ifdef DEBUG |
uci1 | 37:ff95e7070f26 | 41 | printf("canCon=%d\r\n",(int)canCon); |
uci1 | 37:ff95e7070f26 | 42 | #endif |
uci1 | 37:ff95e7070f26 | 43 | |
uci1 | 37:ff95e7070f26 | 44 | SnCommWin::ECommWinResult ret = canCon ? SnCommWin::kConnected |
uci1 | 37:ff95e7070f26 | 45 | : SnCommWin::kCanNotConnect; |
uci1 | 37:ff95e7070f26 | 46 | |
uci1 | 37:ff95e7070f26 | 47 | if (canCon && sendStatus) { |
uci1 | 84:80b15993944e | 48 | //ret = SendStatus(conf, evt, pow, seq, thmrate, evtrate, powerOnTime, temper, genBuf, timeout); |
uci1 | 84:80b15993944e | 49 | ret = SendStatus(conf, pow, stEvent, seq, thmrate, evtrate, |
uci1 | 84:80b15993944e | 50 | powerOnTime, temper, |
uci1 | 84:80b15993944e | 51 | genBuf, timeout_clock); |
uci1 | 84:80b15993944e | 52 | |
uci1 | 37:ff95e7070f26 | 53 | } |
uci1 | 41:d6f5e2f09e07 | 54 | |
uci1 | 41:d6f5e2f09e07 | 55 | #ifdef DEBUG |
uci1 | 41:d6f5e2f09e07 | 56 | printf("SBD OpenWindow returning %d\r\n",(int)ret); |
uci1 | 41:d6f5e2f09e07 | 57 | #endif |
uci1 | 37:ff95e7070f26 | 58 | |
uci1 | 37:ff95e7070f26 | 59 | return ret; |
uci1 | 37:ff95e7070f26 | 60 | |
uci1 | 37:ff95e7070f26 | 61 | } |
uci1 | 37:ff95e7070f26 | 62 |