Arianna autonomous DAQ firmware
Dependencies: mbed SDFileSystemFilinfo AriSnProtocol NetServicesMin AriSnComm MODSERIAL PowerControlClkPatch DS1820OW
Diff: SnConfigFrame.h
- Revision:
- 116:8099b754fbb4
- Parent:
- 114:554fa3a956b4
- Child:
- 117:fd6798ba2e26
--- a/SnConfigFrame.h Fri Dec 04 02:57:12 2015 +0000 +++ b/SnConfigFrame.h Tue May 03 02:01:35 2016 +0000 @@ -84,7 +84,9 @@ + (2u*sizeof(uint8_t)) // connect and listen TOs for Irid & Afar + sizeof(uint16_t) - sizeof(uint8_t); // run mode from 8 to 16 bit integer static const uint32_t kMaxSizeOfV13 = kMaxSizeOfV12; // same as V12 (just signifies SST4CH_1GHz) - + static const uint32_t kMaxSizeOfV14 = kMaxSizeOfV12; // same as V12 (just signifies SST4CH512) + static const uint32_t kMaxSizeOfV15 = kMaxSizeOfV12; // same as V12 (just signifies SST4CH512_1GHz) + static const uint32_t kMaxSizeOf = kMaxSizeOfV7; // should be the biggest one enum EDatPackBit { @@ -132,7 +134,8 @@ kRSListOneCW = BIT(5), // if 0, only clear run/seq list after files sent from it kIgnoreSDcard = BIT(6), // if 0, read/write data to SD card as normal. if 1, function as though no SD card is present kComPwrSimple = BIT(7), // if 0, comm periphs powered as needed during comm win. if 1, power adjusted once at start/finish of comm win - kCommEachEvent = BIT(8) // if 0, comm windows only after comm period of seconds. if 1, comm winodows also after each event that qualifies for saving to SD card + kCommEachEvent = BIT(8), // if 0, comm windows only after comm period of seconds. if 1, comm winodows also after each event that qualifies for saving to SD card + kSkipTrgStartReset = BIT(9) // if 0, the digitizer (SST) is reset when the mbed starts waiting for triggers. if 0, no reset occurs, which can cause an immediate readout if the chip had triggered before the mbed was ready }; // i/o version @@ -273,9 +276,15 @@ maxsize = kMaxSizeOfV12; } else if (rv==13) { maxsize = kMaxSizeOfV13; + } else if (rv==14) { + maxsize = kMaxSizeOfV14; + } else if (rv==15) { + maxsize = kMaxSizeOfV15; } uint32_t sz = maxsize; if (rv<11) { + // less than V11? then we need to account for the dynamic + // length of the label :( with V12+, the length is always the same const int32_t lbldiff = kConfLblLen - lblLen; sz = maxsize - lbldiff; if ((lbldiff!=0) && (rv>=4)) { @@ -339,6 +348,7 @@ bool IsIgnoringSDcard() const { return ((fRunMode & kIgnoreSDcard)!=0); } bool IsCommPowerSimple() const { return ((fRunMode & kComPwrSimple)!=0); } bool IsCommWindowEachEvent() const { return ((fRunMode & kCommEachEvent)!=0); } + bool IsSkippingTrgStartReset() const { return ((fRunMode & kSkipTrgStartReset)!=0); } bool IsLowPowerMode() const { return fIsLowPower; } const char* GetLabel() const { return fLabel; } uint32_t GetLabelStrLen() const { return strlen(fLabel); } @@ -999,9 +1009,18 @@ static void SetMacAddress(); static uint64_t GetMacAddress() { +#ifdef DEBUG + printf("GetMacAddress call: fgMacAdr=%012llX\r\n", fgMacAdr>>16); // 64 -> 48 bits +#endif if (fgMacAdr==0) { +#ifdef DEBUG + printf("Calling SetMacAddress()\r\n"); +#endif SetMacAddress(); } +#ifdef DEBUG + printf("GetMacAddress return: fgMacAdr=%012llX\r\n", fgMacAdr>>16); // 64 -> 48 bits +#endif return fgMacAdr; }