aboutsummaryrefslogtreecommitdiffstats
path: root/src/openxc/decoder.hpp
blob: 719b6096fceb014ce147ba5d33a1950d7ad140f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include <string>
#include <map>
#include <iostream>

enum class states
{
    NATIVE,
    NEW,
    PROCESSED
};

typedef std::map<std::string, states> map_decoders;
typedef std::pair<std::string,states> pair_decoder;

class decoder_t
{
    public:
        static std::string patchs_;
        static map_decoders decoders_states_;
        static void init_decoder();
        static std::string add_decoder(std::string decoder, std::string version_file, std::string version_low_can);
        static std::string patch_version(std::string decoder, std::string version_file, std::string version_low_can);
        static std::string generate_name_decoder(std::string decoder, std::string version_file, std::string version_low_can);
        static std::string apply_patch();


        static void v1_to_v2(std::string decoder);
};