InertiaSDK

Loading...
Searching...
No Matches
ExternalConnSettings.h
1#pragma once
2
3 namespace inertia
4{
5
7 struct INERTIA_API ExternalConnWriter
8 : std::enable_shared_from_this<ExternalConnWriter>
9{
11 virtual ~ExternalConnWriter();
12
16 virtual void Write(std::vector<uint8_t> const& data) = 0;
17};
18
19
21 struct INERTIA_API ExternalConnReader
22 : std::enable_shared_from_this<ExternalConnReader>
23{
25 virtual ~ExternalConnReader();
26
30 virtual void Receive(std::vector<uint8_t> const& data) = 0;
31};
32
33
38 struct INERTIA_API ExternalConnSettings
39{
40 std::wstring name;
41
47 mutable std::shared_ptr<ExternalConnWriter> writer;
48
54 mutable std::shared_ptr<ExternalConnReader> reader;
55
57 ExternalConnSettings();
58
63 ExternalConnSettings(std::wstring const& name, std::shared_ptr<ExternalConnWriter> const& writer);
64
69 ExternalConnSettings(std::wstring const& argString);
70
71#ifdef WITH_BOOST_PROGRAM_OPTIONS
76 static const po::options_description GetOptionDescription();
77#endif
78
83 std::wstring const ToString() const;
84};
85
86}
inertia
Definition FlashCommands.h:6
inertia::ExternalConnReader
Definition ExternalConnSettings.h:23
inertia::ExternalConnReader::~ExternalConnReader
virtual ~ExternalConnReader()
inertia::ExternalConnReader::Receive
virtual void Receive(std::vector< uint8_t > const &data)=0
inertia::ExternalConnSettings::writer
std::shared_ptr< ExternalConnWriter > writer
Definition ExternalConnSettings.h:47
inertia::ExternalConnSettings::ExternalConnSettings
ExternalConnSettings(std::wstring const &name, std::shared_ptr< ExternalConnWriter > const &writer)
inertia::ExternalConnSettings::reader
std::shared_ptr< ExternalConnReader > reader
Definition ExternalConnSettings.h:54
inertia::ExternalConnSettings::ExternalConnSettings
ExternalConnSettings()
inertia::ExternalConnSettings::name
std::wstring name
The name of the connection.
Definition ExternalConnSettings.h:40
inertia::ExternalConnSettings::ExternalConnSettings
ExternalConnSettings(std::wstring const &argString)
inertia::ExternalConnSettings::ToString
std::wstring const ToString() const
inertia::ExternalConnSettings::GetOptionDescription
static const po::options_description GetOptionDescription()
inertia::ExternalConnWriter
Definition ExternalConnSettings.h:9
inertia::ExternalConnWriter::~ExternalConnWriter
virtual ~ExternalConnWriter()
inertia::ExternalConnWriter::Write
virtual void Write(std::vector< uint8_t > const &data)=0