Method | Description | |
---|---|---|
Crc16 ( ) : System |
Creates a new instance of the Crc16 class. The checksum starts off with a value of 0x0000.
|
|
Crc16 ( ChecksumType checksumType ) : System |
Creates a new instance of the Crc16 class.
|
|
Reset ( ) : void |
Resets the CRC-16 data checksum as if no update was ever called.
|
|
Reset ( ChecksumType checksumType ) : void |
Resets the CRC-16 data checksum as if no update was ever called.
|
|
Update ( byte value ) : void |
Updates the checksum with the byte value.
|
|
Update ( byte buffer, int offset, int count ) : void |
Adds the byte array to the data checksum.
|
public Crc16 ( ChecksumType checksumType ) : System | ||
checksumType | ChecksumType | /// Type of calculation to perform, CRC-16 or ModBus. /// |
return | System |
public Reset ( ChecksumType checksumType ) : void | ||
checksumType | ChecksumType | Type of CRC calculation. CRC-16 resets to 0x0000, ModBus resets to 0xFFFF |
return | void |
public Update ( byte value ) : void | ||
value | byte | The |
return | void |
public Update ( byte buffer, int offset, int count ) : void | ||
buffer | byte | The buffer which contains the data |
offset | int | The offset in the buffer where the data starts |
count | int | The number of data bytes to update the CRC with. |
return | void |