Arianna autonomous DAQ firmware
Dependencies: mbed SDFileSystemFilinfo AriSnProtocol NetServicesMin AriSnComm MODSERIAL PowerControlClkPatch DS1820OW
Diff: SnStatusFrame.h
- Revision:
- 56:0bba0ef15697
- Parent:
- 40:1324da35afd4
- Child:
- 61:42cbfc02e0e0
--- a/SnStatusFrame.h Fri Jan 03 13:03:01 2014 +0000 +++ b/SnStatusFrame.h Thu Oct 30 06:42:17 2014 +0000 @@ -7,6 +7,7 @@ #include "SnCommWin.h" #include "SnConfigFrame.h" #include "SnEventFrame.h" +#include "SnTempFrame.h" #include "SnSDUtils.h" #include "Watchdog.h" @@ -37,6 +38,9 @@ kMaxSizeOfV2 + sizeof(uint32_t) + sizeof(float); static const uint32_t kMaxSizeOfV4 = kMaxSizeOfV3 - sizeof(uint32_t); static const uint32_t kMaxSizeOfV5 = kMaxSizeOfV4 + sizeof(uint8_t); + static const uint32_t kMaxSizeOfV6 = kMaxSizeOfV5 + sizeof(uint8_t) + sizeof(uint32_t); // iov and power on time + static const uint32_t kMaxSizeOfV7 = kMaxSizeOfV6 + sizeof(float); // temperature + static const uint32_t kMaxSizeOfV8 = kMaxSizeOfV7 + sizeof(uint8_t); static const uint32_t kMaxSizeOf = kMaxSizeOfV1; @@ -71,6 +75,12 @@ return kMaxSizeOfV4; } else if (rv==5) { return kMaxSizeOfV5; + } else if (rv==6) { + return kMaxSizeOfV6; + } else if (rv==7) { + return kMaxSizeOfV7; + } else if (rv==8) { + return kMaxSizeOfV8; } else { return kMaxSizeOf; } @@ -85,6 +95,8 @@ const uint16_t seq, const float thmrate, const float evtrate, + const uint32_t powerOnTime, + const SnTempFrame& temper, const uint8_t loseLSB, const uint8_t loseMSB, const uint16_t wvBase) { @@ -132,7 +144,14 @@ // watchdog reset bit cleared after status received successfully, not here const uint8_t wdreset = Watchdog::didWatchdogReset(); x = SnBitUtils::WriteTo(x, wdreset); + + // the config i/o version we expect (might be needed to send a new config to the station) + x = SnBitUtils::WriteTo(x, conf.kIOVers); + x = SnBitUtils::WriteTo(x, powerOnTime); + x = SnBitUtils::WriteTo(x, temper.GetTemperature()); + x = SnBitUtils::WriteTo(x, static_cast<uint8_t>(SnSDUtils::IsInitOk())); + return SnCommWin::kOkMsgSent; }