Create a generic byte sum function with the following prototype:
uint8_t ByteSum(T item);
uint8_t ByteSum(std::string item);
uint8_t ByteSum(char *item)
The function should take in any integral type (
It should then sum the bytes (into a uin8_t), disregarding overflow.
This uint8_t is then returned.
Once implementation is tested, use it inside the SetChecksum() functions of each packet data type.
Create a generic byte sum function with the following prototype: uint8_t ByteSum(T item); uint8_t ByteSum(std::string item); uint8_t ByteSum(char *item)
The function should take in any integral type ( It should then sum the bytes (into a uin8_t), disregarding overflow. This uint8_t is then returned.
Once implementation is tested, use it inside the SetChecksum() functions of each packet data type.