Changes

Jump to navigation Jump to search
----<br />
====Checksum====
----Add <code>uint16_t Landis_crc16 (uint16_t crc, const std::vector<uint8_t> &data here, size_t size) {</code> <code>// CoServ CRC = 0x45F8</code> <code>// Oncor CRC = 0x5FD6</code> <code>// Hard coded Poly 0x1021</code> <code>    uint16_t i = 0;</code> <code>    while (size--) {       </code> <code>crc ^= data[i] << 8;</code> <code>i++;</code> <code>for (unsigned k = 0; k < 8; k++)</code> <code>crc = crc & 0x8000 ? (crc << 1) ^ 0x1021 : crc << 1;     </code> <code>    }     </code> <code>return crc;</code>  <code>}</code>
----<br />
===Captured Meter Data===

Navigation menu