Arianna autonomous DAQ firmware
Dependencies: mbed SDFileSystemFilinfo AriSnProtocol NetServicesMin AriSnComm MODSERIAL PowerControlClkPatch DS1820OW
SnConstants.h@3:24c5f0f50bf1, 2012-07-31 (annotated)
- Committer:
- uci1
- Date:
- Tue Jul 31 04:59:16 2012 +0000
- Revision:
- 3:24c5f0f50bf1
- Parent:
- 1:e392595b4b76
- Child:
- 8:95a325df1f6b
Test bench version. Communications not completed. Debugging output present. But will read the local config file and save events that can be used for testing.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
uci1 | 1:e392595b4b76 | 1 | #ifndef SN_SnConstants |
uci1 | 1:e392595b4b76 | 2 | #define SN_SnConstants |
uci1 | 1:e392595b4b76 | 3 | |
uci1 | 1:e392595b4b76 | 4 | #include "SnBitUtils.h" |
uci1 | 1:e392595b4b76 | 5 | |
uci1 | 1:e392595b4b76 | 6 | // |
uci1 | 1:e392595b4b76 | 7 | // constants |
uci1 | 1:e392595b4b76 | 8 | // |
uci1 | 1:e392595b4b76 | 9 | static const uint32_t kBStime = 946684800u; // 1/1/2000 00:00:00 UTC |
uci1 | 1:e392595b4b76 | 10 | static const uint32_t kWDFailsafe = 1200u; |
uci1 | 1:e392595b4b76 | 11 | static const uint8_t kNchans = 4u; |
uci1 | 1:e392595b4b76 | 12 | static const uint8_t kNsamps = 128u; |
uci1 | 1:e392595b4b76 | 13 | static const uint8_t kNfpgaDacs = 4u; |
uci1 | 3:24c5f0f50bf1 | 14 | static const uint8_t kNplas = 5u;//72; |
uci1 | 1:e392595b4b76 | 15 | static const uint16_t kNoTrigPla = 0x0000u; |
uci1 | 1:e392595b4b76 | 16 | static const uint8_t kNcomms = 1u; |
uci1 | 1:e392595b4b76 | 17 | |
uci1 | 1:e392595b4b76 | 18 | static const uint32_t kAbsMaxTimer = 1800u; // timers use integers counting us and can't go longer than ~ this many secs |
uci1 | 1:e392595b4b76 | 19 | // NOTE: these times below must be less than kAbsMaxTimer (this is not checked, however) |
uci1 | 1:e392595b4b76 | 20 | static const uint32_t kConnectTimeout = 30u; // seconds |
uci1 | 1:e392595b4b76 | 21 | static const uint32_t kListenTimeout = 30u; // seconds |
uci1 | 1:e392595b4b76 | 22 | static const uint32_t kCommWinLongPrdTk = 300u; // seconds |
uci1 | 3:24c5f0f50bf1 | 23 | static const uint32_t kSecsPerYear = 3600u*24u*365u; |
uci1 | 3:24c5f0f50bf1 | 24 | |
uci1 | 1:e392595b4b76 | 25 | static const uint16_t kTotSamps = kNchans*kNsamps; |
uci1 | 1:e392595b4b76 | 26 | static const uint16_t kTotDacs = kNchans*kNfpgaDacs; |
uci1 | 1:e392595b4b76 | 27 | |
uci1 | 1:e392595b4b76 | 28 | enum ESnTrgTypes { |
uci1 | 3:24c5f0f50bf1 | 29 | kThmTrg=0, kFrcTrg=1, kExtTrg=2, |
uci1 | 1:e392595b4b76 | 30 | kNumTrgs |
uci1 | 1:e392595b4b76 | 31 | }; |
uci1 | 1:e392595b4b76 | 32 | |
uci1 | 1:e392595b4b76 | 33 | static const uint8_t kTrgBW[kNumTrgs] = { BIT(0), BIT(1), BIT(2) }; |
uci1 | 1:e392595b4b76 | 34 | |
uci1 | 1:e392595b4b76 | 35 | |
uci1 | 1:e392595b4b76 | 36 | |
uci1 | 0:664899e0b988 | 37 | #endif // SN_SnConstants |