IoT::Modbus::RTU

class CRC16

File Information

Library: IoT/Modbus/RTU
Package: RTU
Header: IoT/Modbus/RTU/CRC16.h

Description

A utility class for computing a CRC16 checksum as used in the Modbus RTU protocol.

Member Summary

Member Functions: checksum, reset, update

Constructors

CRC16

CRC16() = default;

Destructor

~CRC16

~CRC16() = default;

Member Functions

checksum inline

Poco::UInt16 checksum() const;

Returns the computed checksum.

reset inline

void reset();

Resets the CRC16 so it can be reused.

update

Poco::UInt16 update(
    Poco::UInt8 byte
);

Updates the CRC with an additional byte and returns the updated CRC.

Securely control IoT edge devices from anywhere   Connect a Device