Crc16 --> TransferCRC

This commit is contained in:
Pavel Kirienko
2014-02-25 17:58:31 +04:00
parent 366c5f5460
commit a6ab9c416f
9 changed files with 18 additions and 18 deletions
@@ -14,7 +14,7 @@ namespace uavcan
* Initial value: 0x0000
* Coefficient: 0x1021
*/
class Crc16
class TransportCRC
{
static const uint16_t Table[256];
uint16_t value_;
@@ -22,11 +22,11 @@ class Crc16
public:
enum { NumBytes = 2 };
Crc16()
TransportCRC()
: value_(0x0000)
{ }
Crc16(const uint8_t* bytes, unsigned int len)
TransportCRC(const uint8_t* bytes, unsigned int len)
: value_(0x0000)
{
add(bytes, len);
@@ -88,7 +88,7 @@ public:
class TransferListenerBase : public LinkedListNode<TransferListenerBase>
{
const DataTypeDescriptor& data_type_;
const Crc16 crc_base_; ///< Pre-initialized with data type hash, thus constant
const TransportCRC crc_base_; ///< Pre-initialized with data type hash, thus constant
bool checkPayloadCrc(const uint16_t compare_with, const ITransferBuffer& tbb) const;
@@ -21,7 +21,7 @@ class TransferSender
const uint64_t max_transfer_interval_;
const DataTypeDescriptor& data_type_;
const CanTxQueue::Qos qos_;
const Crc16 crc_base_;
const TransportCRC crc_base_;
Dispatcher& dispatcher_;