radio_tool 0.2.1
Loading...
Searching...
No Matches
ailunce_fw.hpp
1
18#pragma once
19
20#include <radio_tool/fw/fw.hpp>
21
22#include <fstream>
23#include <memory>
24
26{
28 {
29 public:
30 AilunceFW() {}
31
32 auto Read(const std::string& file) -> void override;
33 auto Write(const std::string& file) -> void override;
34 auto ToString() const->std::string override;
35 auto Decrypt() -> void override;
36 auto Encrypt() -> void override;
37 auto SetRadioModel(const std::string&) -> void override;
38 auto IsCompatible(const FirmwareSupport* Other) const -> bool override;
39
43 auto GetRadioModel() const -> const std::string override;
44
48 static auto SupportsFirmwareFile(const std::string& file) -> bool;
49
53 static auto SupportsRadioModel(const std::string& model) -> bool;
54
58 static auto Create() -> std::unique_ptr<FirmwareSupport>
59 {
60 return std::make_unique<AilunceFW>();
61 }
62
63 private:
64 std::string radio_model;
65 auto ApplyXOR() -> void;
66
67 };
68} // namespace radio_tool::fw
auto ToString() const -> std::string override
Definition: ailunce_fw.cpp:51
auto SetRadioModel(const std::string &) -> void override
Definition: ailunce_fw.cpp:91
auto IsCompatible(const FirmwareSupport *Other) const -> bool override
Definition: ailunce_fw.cpp:130
auto Decrypt() -> void override
Definition: ailunce_fw.cpp:95
static auto Create() -> std::unique_ptr< FirmwareSupport >
Definition: ailunce_fw.hpp:58
static auto SupportsRadioModel(const std::string &model) -> bool
Definition: ailunce_fw.cpp:81
auto Encrypt() -> void override
Definition: ailunce_fw.cpp:100
auto Read(const std::string &file) -> void override
Definition: ailunce_fw.cpp:26
static auto SupportsFirmwareFile(const std::string &file) -> bool
Definition: ailunce_fw.cpp:65
auto Write(const std::string &file) -> void override
Definition: ailunce_fw.cpp:41
auto GetRadioModel() const -> const std::string override
Definition: ailunce_fw.cpp:86