12 const unsigned channelInverseGrayCode[] = {0, 1, 3, 2, 7, 6, 4, 5, 15, 14, 12, 13, 8, 9, 11, 10};
29 memcpy(
this, &frame, 2);
35 assert(channel >= 1 && channel <= 16);
40 channelIndex = channel - 1;
41 unsigned scaBin = channelIndex * 6 + layerIndex;
48 for (
unsigned i = 0;
i < 16; ++
i) {
56 for (
int channel = 1; channel <= 16; ++channel) {
57 const unsigned short *shortWord =
reinterpret_cast<const unsigned short *
>(&controllerWord);
65 for (uint16_t pos = 0; pos < 96; ++pos)
67 (((CRC & 0x7ffc) >> 2) | ((0x0003 & CRC) << 13)) ^ ((CRC & 0x7ffc) >> 1);
72 for (
int ichannel = 1; ichannel <= 16; ++ichannel) {
CSCCFEBSCAControllerWord()
const unsigned channelInverseGrayCode[]
void setControllerWord(const CSCCFEBSCAControllerWord &controllerWord)
std::ostream & operator<<(std::ostream &out, const ALILine &li)
CSCCFEBSCAControllerWord scaControllerWord(int layer) const
unpacked from the controller words for each channel in the layer
constexpr std::array< uint8_t, layerIndexSize > layer
CSCCFEBDataWord * timeSample(int index) const
input from 0 to 95
unsigned short controllerData
combined from all 16 strips to make a word
const unsigned layerInverseGrayCode[]
unsigned short theSamples[96]