RTC Toolkit
1.0.0
|
Fake DDS subscriber. More...
Public Member Functions | |
FakeDdsSubscriber (uint8_t num_topics, uint8_t batch_size) | |
virtual AgnosticDataSamples & | GetSamples () noexcept override |
Returns reference to data structure holding taken data samples. More... | |
virtual std::error_code | Take (std::chrono::nanoseconds timeout) noexcept override |
Fakes taking new samples. More... | |
virtual size_t | GetNumberOfTopics () const noexcept override |
Returns the number of configured topics. More... | |
virtual const std::string & | GetTopicName (size_t index) const noexcept override |
Returns a string containing the name of a configured topic. More... | |
virtual std::error_code | ReturnLoan (std::uint8_t idx, DdsSampleSeq &samples, DdsInfoSeq &infos) noexcept override |
Returns loaned sample sequence. More... | |
Public Member Functions inherited from rtctk::telSub::DdsSubscriberIf | |
DdsSubscriberIf () RTCTK_NOEXCEPT | |
virtual | ~DdsSubscriberIf () RTCTK_NOEXCEPT |
Fake DDS subscriber.
|
inline |
|
inlineoverridevirtualnoexcept |
Returns the number of configured topics.
This returns the number of topics that were configured during construction of the subscriber object. This corresponds to the size of the DdsParams::m_topics vector passed to the constructor.
Implements rtctk::telSub::DdsSubscriberIf.
|
inlineoverridevirtualnoexcept |
Returns reference to data structure holding taken data samples.
To update structure with new samples TakeSamples() must be used.
Implements rtctk::telSub::DdsSubscriberIf.
|
inlineoverridevirtualnoexcept |
Returns a string containing the name of a configured topic.
This returns the name of a configured DDS topic as a string. The topic name is associated with the index'th DDS reader and will also identify the topic for samples
[index], which is the output parameter vector filled by TakeSamples containing newly arrived DDS samples for the index'th DDS reader.
[in] | index | This selects which topic name to fetch. The value must be in the range 0 <= index and index < GetNumberOfTopics(). |
Implements rtctk::telSub::DdsSubscriberIf.
|
inlineoverridevirtualnoexcept |
Returns loaned sample sequence.
After invoking this method successfully the provided sequences will be emptied.
idx | Topic index. |
samples | Sample sequence. |
infos | Sample information sequence. |
Implements rtctk::telSub::SeqLoanerIf.
|
inlineoverridevirtualnoexcept |
Fakes taking new samples.
All it does is to update sample ids to be consecutive and return success.
Implements rtctk::telSub::DdsSubscriberIf.