MCPcopy Create free account
hub / github.com/ON4QZ/QSSTV / CChannelCode

Method CChannelCode

src/drmtx/common/mlc/ChannelCode.cpp:175–189  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

173}
174
175CChannelCode::CChannelCode()
176{
177 /* Create table for parity bit */
178 for (int j = 0; j < 1 << SIZEOF__BYTE; j++)
179 {
180 /* XOR all bits in byResult.
181 We observe always the LSB by masking using operator "& 1". To get
182 access to all bits in "byResult" we shift the current bit so long
183 until it reaches the mask (at zero) by using operator ">> i". The
184 actual XOR operation is done by "^=" */
185 vecbiParity[j] = 0;
186 for (int i = 0; i < MC_CONSTRAINT_LENGTH; i++)
187 vecbiParity[j] ^= (j >> i) & 1;
188 }
189}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected