Index: trunk/firmware/sources/timeEngined/libnmea++/parse/code_parser.cpp =================================================================== diff --git a/trunk/firmware/sources/timeEngined/libnmea++/parse/code_parser.cpp b/trunk/firmware/sources/timeEngined/libnmea++/parse/code_parser.cpp deleted file mode 10644 --- a/trunk/firmware/sources/timeEngined/libnmea++/parse/code_parser.cpp (revision 204) +++ /dev/null (revision 205) @@ -1,44 +0,0 @@ -/* - * code_parser.cpp - * - * Created on: Oct 29, 2014 - * Author: Alan Aguilar Sologuren - */ - -#include "code_parser.h" -#include -#include - -code_parser::code_parser(): -parser(nullptr){ - subscribe_nmea_codes(supported_codes); -} - -code_parser::~code_parser() { - -} - -bool code_parser::parse_nmea(nmea_code* nc, gnss_info* gi) { - char * cd = to_upper(nc->get_parameter(0)) - parser=supported_codes[cd]; - if(parser!=nullptr) - { - parser(nc,gi); - return true; - } - return false; -} - -char * code_parser::to_upper(const char* str){ - size_t sz = strlen(str); - char * p2up = new char[sz+1]; - char * ptr=p2up; - strcpy(p2up,str); - while(*ptr != '\0'){ - if(islower(*ptr)){ - *ptr = toupper(*ptr); - } - ptr++; - } - return ptr; -} Index: trunk/firmware/sources/timeEngined/libnmea++/parse/code_parser.h =================================================================== diff --git a/trunk/firmware/sources/timeEngined/libnmea++/parse/code_parser.h b/trunk/firmware/sources/timeEngined/libnmea++/parse/code_parser.h deleted file mode 10644 --- a/trunk/firmware/sources/timeEngined/libnmea++/parse/code_parser.h (revision 204) +++ /dev/null (revision 205) @@ -1,31 +0,0 @@ -/* - * code_parser.h - * - * Created on: Oct 29, 2014 - * Author: Alan Aguilar Sologuren - */ - -#ifndef PARSE_CODE_PARSER_H_ -#define PARSE_CODE_PARSER_H_ - -#include "nmea_defs.h" -/** - * class code_parser - * se encarga de decodificar la informacion de una trama NMEA - * - */ -class code_parser { -public: - code_parser(); - virtual ~code_parser(); - - bool parse_nmea(nmea_code*, gnss_info*); - -private: - pnmea_parse parser; - code supported_codes; - - char * to_upper(const char*); -}; - -#endif /* PARSE_CODE_PARSER_H_ */ Index: trunk/firmware/sources/timeEngined/libnmea++/parse/gpalm_parse.cpp =================================================================== diff --git a/trunk/firmware/sources/timeEngined/libnmea++/parse/gpalm_parse.cpp b/trunk/firmware/sources/timeEngined/libnmea++/parse/gpalm_parse.cpp deleted file mode 10644 --- a/trunk/firmware/sources/timeEngined/libnmea++/parse/gpalm_parse.cpp (revision 204) +++ /dev/null (revision 205) @@ -1,12 +0,0 @@ -/* - * gpalm_parse.cpp - * - * Created on: Oct 29, 2014 - * Author: Alan Aguilar Sologuren - */ - -#include "nmea_defs.h" - -int gpalm_parse(nmea_code*, gnss_info*){ - return 0; -} Index: trunk/firmware/sources/timeEngined/libnmea++/parse/gpgga_parse.cpp =================================================================== diff --git a/trunk/firmware/sources/timeEngined/libnmea++/parse/gpgga_parse.cpp b/trunk/firmware/sources/timeEngined/libnmea++/parse/gpgga_parse.cpp --- a/trunk/firmware/sources/timeEngined/libnmea++/parse/gpgga_parse.cpp (revision 204) +++ b/trunk/firmware/sources/timeEngined/libnmea++/parse/gpgga_parse.cpp (revision 205) @@ -5,9 +5,9 @@ * Author: Alan Aguilar Sologuren */ -#include "nmea_defs.h" -#include -#include +#include "../nmea_defs.h" +#include +#include int gpgga_parse(nmea_code* gga, gnss_info* info){ gnss_time utc; Index: trunk/firmware/sources/timeEngined/libnmea++/parse/gpgsa_parse.cpp =================================================================== diff --git a/trunk/firmware/sources/timeEngined/libnmea++/parse/gpgsa_parse.cpp b/trunk/firmware/sources/timeEngined/libnmea++/parse/gpgsa_parse.cpp --- a/trunk/firmware/sources/timeEngined/libnmea++/parse/gpgsa_parse.cpp (revision 204) +++ b/trunk/firmware/sources/timeEngined/libnmea++/parse/gpgsa_parse.cpp (revision 205) @@ -5,7 +5,7 @@ * Author: Alan Aguilar Sologuren */ -#include "nmea_defs.h" +#include "../nmea_defs.h" int gpgsa_parse(nmea_code*, gnss_info*){ return 0; Index: trunk/firmware/sources/timeEngined/libnmea++/parse/gpgsv_parse.cpp =================================================================== diff --git a/trunk/firmware/sources/timeEngined/libnmea++/parse/gpgsv_parse.cpp b/trunk/firmware/sources/timeEngined/libnmea++/parse/gpgsv_parse.cpp --- a/trunk/firmware/sources/timeEngined/libnmea++/parse/gpgsv_parse.cpp (revision 204) +++ b/trunk/firmware/sources/timeEngined/libnmea++/parse/gpgsv_parse.cpp (revision 205) @@ -5,7 +5,7 @@ * Author: Alan Aguilar Sologuren */ -#include "nmea_defs.h" +#include "../nmea_defs.h" int gpgsv_parse(nmea_code*, gnss_info*){ return 0; Index: trunk/firmware/sources/timeEngined/libnmea++/parse/gprmc_parse.cpp =================================================================== diff --git a/trunk/firmware/sources/timeEngined/libnmea++/parse/gprmc_parse.cpp b/trunk/firmware/sources/timeEngined/libnmea++/parse/gprmc_parse.cpp --- a/trunk/firmware/sources/timeEngined/libnmea++/parse/gprmc_parse.cpp (revision 204) +++ b/trunk/firmware/sources/timeEngined/libnmea++/parse/gprmc_parse.cpp (revision 205) @@ -5,7 +5,7 @@ * Author: Alan Aguilar Sologuren */ -#include "nmea_defs.h" +#include "../nmea_defs.h" int gprmc_parse(nmea_code*, gnss_info*){ return 0; Index: trunk/firmware/sources/timeEngined/libnmea++/parse/gpvtg_parse.cpp =================================================================== diff --git a/trunk/firmware/sources/timeEngined/libnmea++/parse/gpvtg_parse.cpp b/trunk/firmware/sources/timeEngined/libnmea++/parse/gpvtg_parse.cpp --- a/trunk/firmware/sources/timeEngined/libnmea++/parse/gpvtg_parse.cpp (revision 204) +++ b/trunk/firmware/sources/timeEngined/libnmea++/parse/gpvtg_parse.cpp (revision 205) @@ -5,7 +5,7 @@ * Author: Alan Aguilar Sologuren */ -#include "nmea_defs.h" +#include "../nmea_defs.h" int gpvtg_parse(nmea_code*, gnss_info*){ return 0; Index: trunk/firmware/sources/timeEngined/libnmea++/parse/nmea_defs.cpp =================================================================== diff --git a/trunk/firmware/sources/timeEngined/libnmea++/parse/nmea_defs.cpp b/trunk/firmware/sources/timeEngined/libnmea++/parse/nmea_defs.cpp deleted file mode 10644 --- a/trunk/firmware/sources/timeEngined/libnmea++/parse/nmea_defs.cpp (revision 204) +++ /dev/null (revision 205) @@ -1,37 +0,0 @@ -/* - * nmea_defs.cpp - * - * Created on: Oct 30, 2014 - * Author: Alan Aguilar Sologuren - */ - -#include "nmea_defs.h" - - -void subscribe_nmea_codes(code& supported_codes){ - // standard NMEA codes - supported_codes["GPALM"] = &gpalm_parse; - // GARMIN's NMEA codes - supported_codes["PGRMI"] = &pgrmi_parse; - supported_codes["PGRMC"] = &pgrmc_parse; - supported_codes["PGRMC1"] = &pgrmc1_parse; - supported_codes["PGRMO"] = &pgrmo_parse; - - /** - * receptor transmite estos codigos - */ - // standard NMEA codes - supported_codes["GPGGA"] = &gpgga_parse; - supported_codes["GPGSA"] = &gpgsa_parse; - supported_codes["GPGSV"] = &gpgsv_parse; - supported_codes["GPRMC"] = &gprmc_parse; - supported_codes["GPVTG"] = &gpvtg_parse; - supported_codes["GPGLL"] = &gpgll_parse; - // GARMIN's NMEA codes - supported_codes["PGRME"] = &pgrme_parse; - supported_codes["PGRMF"] = &pgrmf_parse; - supported_codes["PGRMM"] = &pgrmm_parse; - supported_codes["PGRMT"] = &pgrmt_parse; - supported_codes["PGRMV"] = &pgrmv_parse; - supported_codes["PGRMB"] = &pgrmb_parse; -} Index: trunk/firmware/sources/timeEngined/libnmea++/parse/nmea_defs.h =================================================================== diff --git a/trunk/firmware/sources/timeEngined/libnmea++/parse/nmea_defs.h b/trunk/firmware/sources/timeEngined/libnmea++/parse/nmea_defs.h deleted file mode 10644 --- a/trunk/firmware/sources/timeEngined/libnmea++/parse/nmea_defs.h (revision 204) +++ /dev/null (revision 205) @@ -1,46 +0,0 @@ -/* - * nmea_defs.h - * - * Created on: Oct 29, 2014 - * Author: Alan Aguilar Sologuren - */ - -#pragma once - -#ifndef PARSE_NMEA_DEFS_H_ -#define PARSE_NMEA_DEFS_H_ - -#include "../nmea_code.h" -#include "../gnss_info.h" -#include -#include - - -typedef int (*pnmea_parse)(nmea_code*, gnss_info*); -typedef std::map code; - - -int gpalm_parse(nmea_code*, gnss_info*); -int pgrmi_parse(nmea_code*, gnss_info*); -int pgrmc_parse(nmea_code*, gnss_info*); -int pgrmc1_parse(nmea_code*, gnss_info*); -int pgrmo_parse(nmea_code*, gnss_info*); - -int gpgga_parse(nmea_code*, gnss_info*); -int gpgsa_parse(nmea_code*, gnss_info*); -int gpgsv_parse(nmea_code*, gnss_info*); -int gprmc_parse(nmea_code*, gnss_info*); -int gpvtg_parse(nmea_code*, gnss_info*); -int gpgll_parse(nmea_code*, gnss_info*); -int pgrme_parse(nmea_code*, gnss_info*); -int pgrmf_parse(nmea_code*, gnss_info*); -int pgrmm_parse(nmea_code*, gnss_info*); -int pgrmt_parse(nmea_code*, gnss_info*); -int pgrmv_parse(nmea_code*, gnss_info*); -int pgrmb_parse(nmea_code*, gnss_info*); - - - -void subscribe_nmea_codes(code&); - -#endif /* PARSE_NMEA_DEFS_H_ */ Index: trunk/firmware/sources/timeEngined/libnmea++/parse/pgrmb_parse.cpp =================================================================== diff --git a/trunk/firmware/sources/timeEngined/libnmea++/parse/pgrmb_parse.cpp b/trunk/firmware/sources/timeEngined/libnmea++/parse/pgrmb_parse.cpp --- a/trunk/firmware/sources/timeEngined/libnmea++/parse/pgrmb_parse.cpp (revision 204) +++ b/trunk/firmware/sources/timeEngined/libnmea++/parse/pgrmb_parse.cpp (revision 205) @@ -5,7 +5,7 @@ * Author: Alan Aguilar Sologuren */ -#include "nmea_defs.h" +#include "../nmea_defs.h" int pgrmb_parse(nmea_code*, gnss_info*){ return 0; Index: trunk/firmware/sources/timeEngined/libnmea++/parse/pgrmc1_parse.cpp =================================================================== diff --git a/trunk/firmware/sources/timeEngined/libnmea++/parse/pgrmc1_parse.cpp b/trunk/firmware/sources/timeEngined/libnmea++/parse/pgrmc1_parse.cpp deleted file mode 10644 --- a/trunk/firmware/sources/timeEngined/libnmea++/parse/pgrmc1_parse.cpp (revision 204) +++ /dev/null (revision 205) @@ -1,12 +0,0 @@ -/* - * pgrmc1_parse.cpp - * - * Created on: Oct 29, 2014 - * Author: Alan Aguilar Sologuren - */ - -#include "nmea_defs.h" - -int pgrmc1_parse(nmea_code*, gnss_info*){ - return 0; -} Index: trunk/firmware/sources/timeEngined/libnmea++/parse/pgrmc_parce.cpp =================================================================== diff --git a/trunk/firmware/sources/timeEngined/libnmea++/parse/pgrmc_parce.cpp b/trunk/firmware/sources/timeEngined/libnmea++/parse/pgrmc_parce.cpp deleted file mode 10644 --- a/trunk/firmware/sources/timeEngined/libnmea++/parse/pgrmc_parce.cpp (revision 204) +++ /dev/null (revision 205) @@ -1,12 +0,0 @@ -/* - * pgrmc_parce.cpp - * - * Created on: Oct 29, 2014 - * Author: Alan Aguilar Sologuren - */ - -#include "nmea_defs.h" - -int pgrmc_parse(nmea_code*, gnss_info*){ - return 0; -} Index: trunk/firmware/sources/timeEngined/libnmea++/parse/pgrme_parse.cpp =================================================================== diff --git a/trunk/firmware/sources/timeEngined/libnmea++/parse/pgrme_parse.cpp b/trunk/firmware/sources/timeEngined/libnmea++/parse/pgrme_parse.cpp --- a/trunk/firmware/sources/timeEngined/libnmea++/parse/pgrme_parse.cpp (revision 204) +++ b/trunk/firmware/sources/timeEngined/libnmea++/parse/pgrme_parse.cpp (revision 205) @@ -5,7 +5,7 @@ * Author: Alan Aguilar Sologuren */ -#include "nmea_defs.h" +#include "../nmea_defs.h" int pgrme_parse(nmea_code*, gnss_info*){ return 0; Index: trunk/firmware/sources/timeEngined/libnmea++/parse/pgrmf_parse.cpp =================================================================== diff --git a/trunk/firmware/sources/timeEngined/libnmea++/parse/pgrmf_parse.cpp b/trunk/firmware/sources/timeEngined/libnmea++/parse/pgrmf_parse.cpp --- a/trunk/firmware/sources/timeEngined/libnmea++/parse/pgrmf_parse.cpp (revision 204) +++ b/trunk/firmware/sources/timeEngined/libnmea++/parse/pgrmf_parse.cpp (revision 205) @@ -5,7 +5,7 @@ * Author: Alan Aguilar Sologuren */ -#include "nmea_defs.h" +#include "../nmea_defs.h" int pgrmf_parse(nmea_code*, gnss_info*){ return 0; Index: trunk/firmware/sources/timeEngined/libnmea++/parse/pgrmi_parse.cpp =================================================================== diff --git a/trunk/firmware/sources/timeEngined/libnmea++/parse/pgrmi_parse.cpp b/trunk/firmware/sources/timeEngined/libnmea++/parse/pgrmi_parse.cpp deleted file mode 10644 --- a/trunk/firmware/sources/timeEngined/libnmea++/parse/pgrmi_parse.cpp (revision 204) +++ /dev/null (revision 205) @@ -1,12 +0,0 @@ -/* - * pgrmi_parse.cpp - * - * Created on: Oct 29, 2014 - * Author: Alan Aguilar Sologuren - */ - -#include "nmea_defs.h" - -int pgrmi_parse(nmea_code*, gnss_info*){ - return 0; -} Index: trunk/firmware/sources/timeEngined/libnmea++/parse/pgrmm_parse.cpp =================================================================== diff --git a/trunk/firmware/sources/timeEngined/libnmea++/parse/pgrmm_parse.cpp b/trunk/firmware/sources/timeEngined/libnmea++/parse/pgrmm_parse.cpp --- a/trunk/firmware/sources/timeEngined/libnmea++/parse/pgrmm_parse.cpp (revision 204) +++ b/trunk/firmware/sources/timeEngined/libnmea++/parse/pgrmm_parse.cpp (revision 205) @@ -5,7 +5,7 @@ * Author: Alan Aguilar Sologuren */ -#include "nmea_defs.h" +#include "../nmea_defs.h" int pgrmm_parse(nmea_code*, gnss_info*){ return 0; Index: trunk/firmware/sources/timeEngined/libnmea++/parse/pgrmo_parse.cpp =================================================================== diff --git a/trunk/firmware/sources/timeEngined/libnmea++/parse/pgrmo_parse.cpp b/trunk/firmware/sources/timeEngined/libnmea++/parse/pgrmo_parse.cpp deleted file mode 10644 --- a/trunk/firmware/sources/timeEngined/libnmea++/parse/pgrmo_parse.cpp (revision 204) +++ /dev/null (revision 205) @@ -1,12 +0,0 @@ -/* - * pgrmo_parse.cpp - * - * Created on: Oct 29, 2014 - * Author: Alan Aguilar Sologuren - */ - -#include "nmea_defs.h" - -int pgrmo_parse(nmea_code*, gnss_info*){ - return 0; -} Index: trunk/firmware/sources/timeEngined/libnmea++/parse/pgrmt_parse.cpp =================================================================== diff --git a/trunk/firmware/sources/timeEngined/libnmea++/parse/pgrmt_parse.cpp b/trunk/firmware/sources/timeEngined/libnmea++/parse/pgrmt_parse.cpp --- a/trunk/firmware/sources/timeEngined/libnmea++/parse/pgrmt_parse.cpp (revision 204) +++ b/trunk/firmware/sources/timeEngined/libnmea++/parse/pgrmt_parse.cpp (revision 205) @@ -5,7 +5,7 @@ * Author: Alan Aguilar Sologuren */ -#include "nmea_defs.h" +#include "../nmea_defs.h" int pgrmt_parse(nmea_code*, gnss_info*){ return 0; Index: trunk/firmware/sources/timeEngined/libnmea++/parse/pgrmv_parse.cpp =================================================================== diff --git a/trunk/firmware/sources/timeEngined/libnmea++/parse/pgrmv_parse.cpp b/trunk/firmware/sources/timeEngined/libnmea++/parse/pgrmv_parse.cpp --- a/trunk/firmware/sources/timeEngined/libnmea++/parse/pgrmv_parse.cpp (revision 204) +++ b/trunk/firmware/sources/timeEngined/libnmea++/parse/pgrmv_parse.cpp (revision 205) @@ -5,7 +5,7 @@ * Author: Alan Aguilar Sologuren */ -#include "nmea_defs.h" +#include "../nmea_defs.h" int pgrmv_parse(nmea_code*, gnss_info*){ return 0;