crc.h
Go to the documentation of this file.
1 /**************************************************************************************************
2  Software License Agreement (BSD License)
3 
4  Copyright (c) 2011-2013, LAR toolkit developers - University of Aveiro - http://lars.mec.ua.pt
5  All rights reserved.
6 
7  Redistribution and use in source and binary forms, with or without modification, are permitted
8  provided that the following conditions are met:
9 
10  *Redistributions of source code must retain the above copyright notice, this list of
11  conditions and the following disclaimer.
12  *Redistributions in binary form must reproduce the above copyright notice, this list of
13  conditions and the following disclaimer in the documentation and/or other materials provided
14  with the distribution.
15  *Neither the name of the University of Aveiro nor the names of its contributors may be used to
16  endorse or promote products derived from this software without specific prior written permission.
17 
18  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
19  IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
20  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
21  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22  DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
24  IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
25  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 ***************************************************************************************************/
44 #ifndef _CRC_H_
45 #define _CRC_H_
46 
50 //####################################################################
51 // Includes:
52 //####################################################################
53 
54 //System Includes
55 //all system includes go here
56 #include <stdio.h>
57 #include <stdlib.h>
58 #include <string.h>
59 
60 
61 //####################################################################
62 // Typedefs:Declare here structs that have interesting params for ####
63 // other modules besides this one, but that will not be sent through #
64 // messages. A function to install this struct with param daemon #####
65 // should be declared ################################################
66 //####################################################################
67 
68 //####################################################################
69 // Prototypes: public functions can be declared here ################
70 //####################################################################
71 
72 #define CRC_VERSION "1.16"
73 #define FALSE 0
74 #define TRUE 1
75 
76 unsigned short update_crc_16(unsigned short crc, char c);
77 unsigned long update_crc_32(unsigned long crc, char c);
78 unsigned short update_crc_ccitt(unsigned short crc, unsigned char c);
79 unsigned short update_crc_dnp(unsigned short crc, char c);
80 unsigned short update_crc_kermit(unsigned short crc, char c);
81 unsigned short update_crc_sick(unsigned short crc, char c, char prev_byte);
82 
83 #endif
84 
unsigned short update_crc_sick(unsigned short crc, char c, char prev_byte)
Definition: crc.cpp:190
unsigned short update_crc_dnp(unsigned short crc, char c)
Definition: crc.cpp:273
unsigned short update_crc_kermit(unsigned short crc, char c)
Definition: crc.cpp:246
unsigned long update_crc_32(unsigned long crc, char c)
Definition: crc.cpp:300
unsigned short update_crc_ccitt(unsigned short crc, unsigned char c)
Definition: crc.cpp:162
unsigned short update_crc_16(unsigned short crc, char c)
Definition: crc.cpp:219


atlasmv_base
Author(s): David Gameiro, Jorge Almeida
autogenerated on Mon Mar 2 2015 01:31:28