Subversion Repositories Projects

Rev

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

Rev 451 Rev 513
Line 1... Line 1...
1
#ifndef PARSER_H
1
#ifndef PARSER_H
2
#define PARSER_H
2
#define PARSER_H
3
#include "Kopter.h"
3
#include "Kopter.h"
-
 
4
#include "FlightLog.h"
4
#include <cmath>
5
#include <cmath>
5
#include <string>
6
#include <string>
6
 
7
 
7
/**
8
/**
8
 * The Parser gets values from the Mikrokopter-USART interface
9
 * The Parser gets values from the Mikrokopter-USART interface
9
 *  and parses them into a sRxData-Struct
10
 *  and parses them into a sRxData-Struct
10
 */
11
 */
11
 
12
 
12
class Parser {
13
class Parser {
13
    public:
14
    public:
14
        static void create_frame(char cmd, int address, char * data, unsigned int length);
15
        static void create_frame(char * send_data, char cmd, int address, char * data, unsigned int length);
15
 
16
 
16
        static int decode64(char * data, int len, unsigned char *ptrOut, int offset);
17
        static int decode64(char * data, int len, unsigned char *ptrOut, int offset);
17
        static void encode64(char data[150],unsigned int length);
18
        static void encode64(char data[150],unsigned int length);
18
 
19
 
19
        static void add_CRC(char * tx, int length);
20
        static void add_CRC(char * tx, int length);