diff options
author | Romain Forlot <romain.forlot@iot.bzh> | 2019-11-26 16:07:15 +0100 |
---|---|---|
committer | Romain Forlot <romain.forlot@iot.bzh> | 2019-11-26 16:07:15 +0100 |
commit | 0d65a0be7d834b23de99e73bba5407185f54aeca (patch) | |
tree | d97480eb71cf39a13d7c89a297ff5a3b9aaa5bfb /src/openxc/decoder.hpp | |
parent | 839bbf458685383634c03e8cec2238f70c6f0382 (diff) |
Add management of version and new decoder signature.halibut_8.0.6halibut_8.0.5halibut_8.0.4halibut/8.0.6halibut/8.0.5halibut/8.0.48.0.68.0.58.0.4halibut
This commit allows to generate a file according to the version.
And adds the wrapper function for new decoder between v1 and v2.
Bug-AGL: SPEC-2780
Bug-AGL: SPEC-2976
Change-Id: I169d5a8213d6a14e5d77b600e14b36f0878b3efe
Signed-off-by: Arthur Guyader <arthur.guyader@iot.bzh>
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'src/openxc/decoder.hpp')
-rw-r--r-- | src/openxc/decoder.hpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/openxc/decoder.hpp b/src/openxc/decoder.hpp new file mode 100644 index 0000000..719b609 --- /dev/null +++ b/src/openxc/decoder.hpp @@ -0,0 +1,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); +}; |