InertiaSDK

Loading...
Searching...
No Matches
Public Member Functions | List of all members
inertia::StreamListener Struct Reference

Asynchronous callbacks. More...

`#include <StreamListener.h>`

Inheritance diagram for inertia::StreamListener:
[legend]
Collaboration diagram for inertia::StreamListener:
[legend]

## Public Member Functions
virtual void | StatusUpdate (std::wstring const &source, const bool isOpen, std::wstring const &feedback) const
virtual void | Received (std::wstring const &source, const unsigned addrID, ConfigVectorPtr const &configs, CommandVectorPtr const &commands, SampleVectorPtr const &samples) const
virtual void | Received (std::wstring const &source, std::vector< uint8_t > const &data) const
virtual void | SendConfig (std::wstring const &destination, const unsigned addrID, ConfigPtr const &config) const
virtual void | SendCommand (std::wstring const &destination, const unsigned addrID, CommandPtr const &command) const
virtual void | ProgressUpdate (std::wstring const &source, const unsigned addrID, const ProgressUpdateType type, const int count, std::wstring const &message) const
virtual void | ReceivedServiceResponse (std::wstring const &source, const unsigned addrID, ServicePtr const &response) const
virtual | ~StreamListener ()

## Detailed Description

Asynchronous callbacks.

Class used to provide asynchronous callbacks. Extend this class and overwrite the virtual methods to receive the callbacks.

## Constructor & Destructor Documentation

## ◆ ~StreamListener()

virtual inertia::StreamListener::~StreamListener | ( |  | ) |
| virtual

Destructor

## Member Function Documentation

## ◆ ProgressUpdate()

virtual void inertia::StreamListener::ProgressUpdate | ( | std::wstring const & | source,
|  | const unsigned | addrID,
|  | const ProgressUpdateType | type,
|  | const int | count,
|  | std::wstring const & | message ) const
| virtual

Callback with progress information.

Parameters

  source | the name of the source
  addrID | the applicable node
  type | the type of progress
  count | progress indicator, e.g. percentage (depends on type)
  message | textual progress message

## ◆ Received() [1/2]

virtual void inertia::StreamListener::Received | ( | std::wstring const & | source,
|  | const unsigned | addrID,
|  | ConfigVectorPtr const & | configs,
|  | CommandVectorPtr const & | commands,
|  | SampleVectorPtr const & | samples ) const
| virtual

Callback with received processed data.

Parameters

  source | the name of the source
  addrID | the applicable node
  configs | the received configurations
  commands | the received commands
  samples | the received samples

## ◆ Received() [2/2]

virtual void inertia::StreamListener::Received | ( | std::wstring const & | source,
|  | std::vector< uint8_t > const & | data ) const
| virtual

Callback with received raw data.

Parameters

  source | the name of the source
  data | the raw data

## ◆ ReceivedServiceResponse()

virtual void inertia::StreamListener::ReceivedServiceResponse | ( | std::wstring const & | source,
|  | const unsigned | addrID,
|  | ServicePtr const & | response ) const
| virtual

Callback with received service information.

Parameters

  source | the name of the source
  addrID | the applicable node
  response | service response message

## ◆ SendCommand()

virtual void inertia::StreamListener::SendCommand | ( | std::wstring const & | destination,
|  | const unsigned | addrID,
|  | CommandPtr const & | command ) const
| virtual

Callback when a command is being sent.

Parameters

  destination | e.g. the serial device name
  addrID | the applicable node
  command | the command to send

## ◆ SendConfig()

virtual void inertia::StreamListener::SendConfig | ( | std::wstring const & | destination,
|  | const unsigned | addrID,
|  | ConfigPtr const & | config ) const
| virtual

Callback when a configuration is being sent.

Parameters

  destination | (e.g. serial port)
  addrID | the applicable node
  config | the configuration to send

## ◆ StatusUpdate()

virtual void inertia::StreamListener::StatusUpdate | ( | std::wstring const & | source,
|  | const bool | isOpen,
|  | std::wstring const & | feedback ) const
| virtual

Indicate a status change (opened, closed) of the source, for example a connection or replay.

Parameters

  source | the name of the source
  isOpen | true when source is opened, false when closed
  feedback | additional textual status information

The documentation for this struct was generated from the following file:

- StreamListener.h