17 enum { NREGISTERS = 32, NCHANNELS = 16, LUT_SIZE = 16, INFO_SIZE = 64 };
20 int registers[NREGISTERS];
21 short channels[NCHANNELS];
26 DSM(
const string& name =
"") : name(name) { clear(); }
28 void setName(
const string& basename,
int layer,
int dsm);
32 inline void DSM::clear()
34 fill(registers,registers+NREGISTERS,0);
35 fill(channels,channels+NCHANNELS,0);
36 fill(lut,lut+LUT_SIZE,0);
37 fill(info,info+INFO_SIZE,0);
41 inline void DSM::setName(
const string& basename,
int layer,
int dsm)
44 ss << basename << layer << setw(2) << setfill(
'0') << dsm+1;
48 inline void DSM::dump()
50 printf(
"%s: ", name.c_str());
51 for (
int ch = 0; ch < 8; ++ch)
52 printf(
"%04x ", (
unsigned short)channels[ch]);