Subversion Repositories Projects

Rev

Rev 393 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 393 Rev 396
Line 1... Line 1...
1
#ifndef PARSER_H
1
#ifndef PARSER_H
2
#define PARSER_H
2
#define PARSER_H
3
#include <string>
3
#include <string>
-
 
4
#include <cmath>
Line 4... Line 5...
4
 
5
 
5
/**
6
/**
6
 * The Parser gets values from the Mikrokopter-USART interface
7
 * The Parser gets values from the Mikrokopter-USART interface
7
 *  and parses them into a sRxData-Struct
8
 *  and parses them into a sRxData-Struct
Line -... Line 9...
-
 
9
 */
-
 
10
 
8
 */
11
using namespace std;
9
 
12
 
10
struct sRxData
13
struct sRxData
11
{
14
{
12
    char *input;
15
    char *input;
Line 18... Line 21...
18
class Parser {
21
class Parser {
19
    public:
22
    public:
20
        static bool decode64(sRxData &rx);
23
        static bool decode64(sRxData &rx);
21
        static string encode64(char data[150],unsigned int length);
24
        static string encode64(char data[150],unsigned int length);
Line 22... Line 25...
22
 
25
 
23
        static string add_CRC(char * TX, int length);
26
        static string add_CRC(string TX);
Line 24... Line 27...
24
        static string check_CRC(char * RX, int length);
27
        static bool check_CRC(string RX);
Line 25... Line 28...
25
 
28
 
26
        static float getFloat(long value, int count);
29
        static float getFloat(long value, int count);