InertiaSDK

Loading...
Searching...
No Matches
StreamListener.h
1#pragma once
2
3 namespace inertia
4{
5
7 enum ProgressUpdateType : unsigned
8{
9 PROGRESS_DOWNLOAD = 0,
10 PROGRESS_FILL_LOSS_ANALYZE = 1,
11 PROGRESS_FILL_LOSS_REQ_DATA = 2,
12 PROGRESS_FILL_LOSS_MERGE = 3,
13 PROGRESS_CONVERT = 4,
14 PROGRESS_REPLAY = 5,
15 PROGRESS_MERGE = 6,
16 PROGRESS_UPLOAD = 7
17};
18
19
25 struct INERTIA_API StreamListener
26 : std::enable_shared_from_this<StreamListener>
27{
33 virtual void StatusUpdate(std::wstring const& source, const bool isOpen, std::wstring const& feedback) const;
34
42 virtual void Received(std::wstring const& source, const unsigned addrID, ConfigVectorPtr const& configs, CommandVectorPtr const& commands, SampleVectorPtr const& samples) const;
43
48 virtual void Received(std::wstring const& source, std::vector<uint8_t> const& data) const;
49
55 virtual void SendConfig(std::wstring const& destination, const unsigned addrID, ConfigPtr const& config) const;
56
62 virtual void SendCommand(std::wstring const& destination, const unsigned addrID, CommandPtr const& command) const;
63
71 virtual void ProgressUpdate(std::wstring const& source, const unsigned addrID, const ProgressUpdateType type, const int count, std::wstring const& message) const;
72
78 virtual void ReceivedServiceResponse(std::wstring const& source, const unsigned addrID, ServicePtr const& response) const;
79
81 virtual ~StreamListener();
82};
83
84}
inertia
Definition FlashCommands.h:6
inertia::ServicePtr
std::shared_ptr< ServiceResponse > ServicePtr
Pointer to a ServiceResponse.
Definition platform.h:55
inertia::CommandPtr
std::shared_ptr< InertiaCommands > CommandPtr
Pointer to an InertiaCommands.
Definition platform.h:45
inertia::ProgressUpdateType
ProgressUpdateType
Definition StreamListener.h:8
inertia::PROGRESS_UPLOAD
@ PROGRESS_UPLOAD
Progress update for flash upload.
Definition StreamListener.h:16
inertia::PROGRESS_REPLAY
@ PROGRESS_REPLAY
Progress update for replaying file.
Definition StreamListener.h:14
inertia::PROGRESS_CONVERT
@ PROGRESS_CONVERT
Progress update for converting file.
Definition StreamListener.h:13
inertia::PROGRESS_DOWNLOAD
@ PROGRESS_DOWNLOAD
Progress update for flash download.
Definition StreamListener.h:9
inertia::PROGRESS_FILL_LOSS_REQ_DATA
@ PROGRESS_FILL_LOSS_REQ_DATA
Progress update for fill loss requesting data.
Definition StreamListener.h:11
inertia::PROGRESS_FILL_LOSS_MERGE
@ PROGRESS_FILL_LOSS_MERGE
Progress update for fill loss merge.
Definition StreamListener.h:12
inertia::PROGRESS_MERGE
@ PROGRESS_MERGE
Progress update for merging files.
Definition StreamListener.h:15
inertia::PROGRESS_FILL_LOSS_ANALYZE
@ PROGRESS_FILL_LOSS_ANALYZE
Progress update for fill loss analysis.
Definition StreamListener.h:10
inertia::ConfigVectorPtr
std::shared_ptr< std::vector< InertiaConfig > > ConfigVectorPtr
Pointer to a vector of InertiaConfig.
Definition platform.h:42
inertia::ConfigPtr
std::shared_ptr< InertiaConfig > ConfigPtr
Pointer to an InertiaConfig.
Definition platform.h:41
inertia::CommandVectorPtr
std::shared_ptr< std::vector< InertiaCommands > > CommandVectorPtr
Pointer to a vector of InertiaCommands.
Definition platform.h:46
inertia::SampleVectorPtr
std::shared_ptr< std::vector< Sample > > SampleVectorPtr
Pointer to a vector of Sample.
Definition platform.h:49
inertia::StreamListener
Asynchronous callbacks.
Definition StreamListener.h:27
inertia::StreamListener::SendCommand
virtual void SendCommand(std::wstring const &destination, const unsigned addrID, CommandPtr const &command) const
inertia::StreamListener::StatusUpdate
virtual void StatusUpdate(std::wstring const &source, const bool isOpen, std::wstring const &feedback) const
inertia::StreamListener::SendConfig
virtual void SendConfig(std::wstring const &destination, const unsigned addrID, ConfigPtr const &config) const
inertia::StreamListener::Received
virtual void Received(std::wstring const &source, std::vector< uint8_t > const &data) const
inertia::StreamListener::~StreamListener
virtual ~StreamListener()
inertia::StreamListener::ProgressUpdate
virtual void ProgressUpdate(std::wstring const &source, const unsigned addrID, const ProgressUpdateType type, const int count, std::wstring const &message) const
inertia::StreamListener::ReceivedServiceResponse
virtual void ReceivedServiceResponse(std::wstring const &source, const unsigned addrID, ServicePtr const &response) const
inertia::StreamListener::Received
virtual void Received(std::wstring const &source, const unsigned addrID, ConfigVectorPtr const &configs, CommandVectorPtr const &commands, SampleVectorPtr const &samples) const