Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
p6crc16.h
Go to the documentation of this file.
1 
10 #ifndef P6CRC16_H__
11 #define P6CRC16_H__ 1
12 
13 #include "p6com.h"
14 
15 
16 #ifdef __cplusplus
17 namespace P6R {
18 extern "C" {
19 #endif
20 
31 static const P6CRC16FLAGS P6CRC16_NOFLAGS = 0x00000000;
32 static const P6CRC16FLAGS P6CRC16_USEDEFAULTS = 0x00000001;
33 
34 
44 #undef INTERFACE
45 #define INTERFACE p6ICRC16
47 {
74  P6DECLCOMMETHOD(initialize)(P6THIS_ P6CRC16FLAGS flags,
75  P6UINT16 polynomial,
76  P6UINT16 initValue,
77  P6UINT16 finalXOR,
78  P6BOOL reflected
79  ) P6PURE;
80 
109  P6DECLCOMMETHOD(reset)(P6THIS_ P6CRC16FLAGS flags,
110  P6UINT16 polynomial,
111  P6UINT16 initValue,
112  P6UINT16 finalXOR,
113  P6BOOL reflected
114  ) P6PURE;
115 
133  P6DECLCOMMETHOD(firstBlock)(P6THIS_ P6UINT8* pBlock, P6UINT32 blockSize ) P6PURE;
134 
150  P6DECLCOMMETHOD(nextBlock)(P6THIS_ P6UINT8* pBlock, P6UINT32 blockSize ) P6PURE;
151 
165  P6DECLCOMMETHOD(getCRC)(P6THIS_ P6UINT16* pCRC16 ) P6PURE;
166 };
167 
168 
169 // {49EAB11F-F78E-4360-A4FF-F02CEC488F42}
170 #define IF_p6ICRC16 {0x49eab11f,0xf78e,0x4360,{0xa4,0xff,0xf0,0x2c,0xec,0x48,0x8f,0x42}}
171 
172 // {84041833-27D7-4be5-BE40-F90910F1E682}
173 #define COMP_p6CRC16 {0x84041833,0x27d7,0x4be5,{0xbe,0x40,0xf9,0x9,0x10,0xf1,0xe6,0x82}}
174 
175 #ifdef __cplusplus
176 }
177 } // namespace
178 #endif
179 
180 
181 #endif
182 
183 
184 
185 
uint32_t P6UINT32
Definition: p6types.h:77
#define P6PURE
Definition: p6defs.h:192
unsigned char P6BOOL
Boolean type.
Definition: p6types.h:133
Cyclic Redundancy Check 16 bits.
Definition: p6crc16.h:46
unsigned char P6UINT8
Definition: p6types.h:71
The base interface all [p6]COM components must derive from and implement.
Definition: p6comdef.h:97
uint16_t P6UINT16
Definition: p6types.h:75
#define P6DECLCOMMETHOD(method)
Definition: p6defs.h:189
#define P6THIS_
Definition: p6defs.h:193
P6COM definitions and interfaces.
P6UINT32 P6CRC16FLAGS
P6CRC16FLAGS.
Definition: p6crc16.h:30
#define P6DECLAREIF_(iface, baseif)
Definition: p6defs.h:188