Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008 #ifndef SERIALHELPER_HPP_
00009 #define SERIALHELPER_HPP_
00010
00011 #include <telekyb_defines/telekyb_defines.hpp>
00012
00013 namespace TELEKYB_NAMESPACE {
00014
00015 class SerialHelper {
00016 public:
00017 static int appendCRC ( char* buffer, unsigned int bufferPosition );
00018
00019 static int encodeData ( char* buffer,
00020 const char* prefix, unsigned int prefixLength,
00021 const char* message, unsigned int messageLength );
00022
00023 static int decodeData(char* buffer, unsigned int targetLength, const char* message);
00024
00025 static bool checkCRC (const char* message, unsigned int messageLength);
00026 };
00027
00028 }
00029 #endif