Add management of version and new decoder signature.
[src/low-level-can-generator.git] / src / openxc / decoder.hpp
1 #include <string>
2 #include <map>
3 #include <iostream>
4
5 enum class states
6 {
7     NATIVE,
8     NEW,
9     PROCESSED
10 };
11
12 typedef std::map<std::string, states> map_decoders;
13 typedef std::pair<std::string,states> pair_decoder;
14
15 class decoder_t
16 {
17     public:
18         static std::string patchs_;
19         static map_decoders decoders_states_;
20         static void init_decoder();
21         static std::string add_decoder(std::string decoder, std::string version_file, std::string version_low_can);
22         static std::string patch_version(std::string decoder, std::string version_file, std::string version_low_can);
23         static std::string generate_name_decoder(std::string decoder, std::string version_file, std::string version_low_can);
24         static std::string apply_patch();
25
26
27         static void v1_to_v2(std::string decoder);
28 };