InertiaSDK

Loading...
Searching...
No Matches
InertiaCommand.h
1#pragma once
2
3 namespace inertia
4{
5
7 enum InertiaCommandGroups : unsigned {
8 CommandService = 1,
9 CommandFlash = 2,
10 CommandLogging = 3,
11 CommandRemoteIO = 4,
12 CommandIOConfig = 5,
13 CommandScheduler = 6,
14 CommandGCC = 7,
15 CommandUnknown = 0xff
16};
17
18
19 struct INERTIA_API InertiaCommand
20{
21 protected:
22 InertiaCommand();
23 InertiaCommand(const uint8_t* packet, const unsigned max_size);
24 InertiaCommand(std::wstring const& argString);
25 virtual ~InertiaCommand();
26 InertiaCommand(InertiaCommand const&) = default;
27 InertiaCommand& operator = (InertiaCommand const&) = default;
28
29 public:
30 virtual InertiaCommandGroups GetGroup() const = 0;
31 virtual uint8_t GetType() const = 0;
32 virtual bool IsResponse() const = 0;
33
34 virtual void GetBytes(std::vector<uint8_t>& out) const = 0;
35 virtual const std::wstring ToString() const = 0;
36};
37
38
39 struct INERTIA_API BoolValue
40{
41 protected:
42 BoolValue(const uint8_t* packet, const unsigned max_size);
43 BoolValue(std::wstring const& argString);
44
45 void GetBytes(std::vector<uint8_t>& out) const;
46 const std::wstring ToString() const;
47
48#ifdef WITH_BOOST_PROGRAM_OPTIONS
49 static const po::options_description GetOptionDescription();
50#endif
51
52 public:
53 bool result;
54};
55
56}
inertia
Definition FlashCommands.h:6
inertia::InertiaCommandGroups
InertiaCommandGroups
Definition InertiaCommand.h:7