Map27
 All Classes Functions Variables Enumerations Enumerator Pages
FCS.h
1 // FCS.h
2 //
3 // Author: Mike McCauley (mikem@airspayce.com)
4 // Copyright (C) 2013 Mike McCauley
5 // $Id: Address.h,v 1.2 2013/07/14 07:15:46 mikem Exp mikem $
6 
7 #ifndef MAP27_FCS_H
8 #define MAP27_FCS_H
9 
10 #include <stdint.h>
11 
22 class Map27FCS
23 {
24 public:
25 
28  Map27FCS();
29 
32  void init();
33 
36  void update(uint8_t ch);
37 
41  void update(uint8_t* buf, uint16_t len);
42 
45  uint16_t final();
46 
51  static uint16_t fcs(uint8_t* buf, uint16_t len);
52 
53 private:
54  uint16_t _fcs;
55 };
56 
57 
58 #endif
Class for calculating Map27 Frame Check Sequence.
Definition: FCS.h:22
Map27FCS()
Definition: FCS.cpp:42
static uint16_t fcs(uint8_t *buf, uint16_t len)
Definition: FCS.cpp:71
void init()
Definition: FCS.cpp:47
void update(uint8_t ch)
Definition: FCS.cpp:52