#include <HardwareCanSourceTest.h>

Public Types | |
| typedef boost::shared_ptr< const HardwareCanSourceTest > | ConstPtr |
| Const shared pointer shorthand. More... | |
| enum | Pattern { P_LINEAR = 1, P_FIXED, P_CHANGING_RANDOM, P_CHANGING_WITH_REPEAT } |
| Different test patterns. More... | |
| typedef boost::shared_ptr< HardwareCanSourceTest > | Ptr |
| Shared pointer shorthand. More... | |
Public Member Functions | |
| virtual CanMessageStamped::Ptr | get () const |
| Returns the current data element. More... | |
| virtual bool | good () const |
Always returns true for the test source. More... | |
| virtual bool | isSeekable () const |
| This is a non-seekable source. More... | |
Static Public Member Functions | |
| static icl_sourcesink::URISchemeMap | supportedURISchemes () |
| URI schemes supported by this source. More... | |
Protected Member Functions | |
| bool | advance () |
| Advance to the next data element. More... | |
| unsigned int | createCanMessageId () |
| HardwareCanSourceTest (const std::string &uri="", const std::string &name="HardwareCanSourceTest") | |
| Constructor. More... | |
Private Attributes | |
| CanMessageStamped::Ptr | m_buffer |
| Buffers the latest generated message. More... | |
| boost::random::uniform_int_distribution< unsigned int > | m_can_id_distribution |
| Uniform distribution over possible CAN IDs. More... | |
| boost::random::uniform_int_distribution< uint8_t > | m_data_distribution |
| Uniform distribution over possible payload bytes. More... | |
| uint16_t | m_next_id |
| The next CAN message ID to be used. More... | |
| Pattern | m_pattern |
| The message generation pattern. More... | |
| float | m_rate |
| Data generation rate in Hz. More... | |
| boost::random::mt19937 | m_rng |
| Random number generator. More... | |
Friends | |
| class | icl_sourcesink::DataSourceFactory< HardwareCanSourceTest > |
| Provide access for the factory. More... | |
| class | icl_sourcesink::SourceSinkManager |
| Provide access for the manager. More... | |
This source creates its own tCanMessage elements for test purposes. Using a URI parameter, a pattern can be set which defines how the messages should be constructed.
Definition at line 44 of file HardwareCanSourceTest.h.
| typedef boost::shared_ptr<const HardwareCanSourceTest> icl_hardware::can::HardwareCanSourceTest::ConstPtr |
Const shared pointer shorthand.
Definition at line 50 of file HardwareCanSourceTest.h.
| typedef boost::shared_ptr<HardwareCanSourceTest> icl_hardware::can::HardwareCanSourceTest::Ptr |
Shared pointer shorthand.
Definition at line 48 of file HardwareCanSourceTest.h.
Different test patterns.
Definition at line 53 of file HardwareCanSourceTest.h.
|
protected |
Constructor.
Definition at line 37 of file HardwareCanSourceTest.cpp.
|
protected |
Advance to the next data element.
Definition at line 101 of file HardwareCanSourceTest.cpp.
|
protected |
Creates the next CAN message ID, according to the selected pattern generation method.
Definition at line 129 of file HardwareCanSourceTest.cpp.
|
inlinevirtual |
Returns the current data element.
Definition at line 91 of file HardwareCanSourceTest.h.
|
inlinevirtual |
Always returns true for the test source.
Definition at line 68 of file HardwareCanSourceTest.h.
|
inlinevirtual |
This is a non-seekable source.
Definition at line 97 of file HardwareCanSourceTest.h.
|
inlinestatic |
URI schemes supported by this source.
Definition at line 74 of file HardwareCanSourceTest.h.
|
friend |
Provide access for the factory.
Definition at line 111 of file HardwareCanSourceTest.h.
|
friend |
Provide access for the manager.
Definition at line 108 of file HardwareCanSourceTest.h.
|
private |
Buffers the latest generated message.
Definition at line 132 of file HardwareCanSourceTest.h.
|
private |
Uniform distribution over possible CAN IDs.
Definition at line 126 of file HardwareCanSourceTest.h.
|
private |
Uniform distribution over possible payload bytes.
Definition at line 129 of file HardwareCanSourceTest.h.
|
private |
The next CAN message ID to be used.
Definition at line 141 of file HardwareCanSourceTest.h.
|
private |
The message generation pattern.
Definition at line 138 of file HardwareCanSourceTest.h.
|
private |
Data generation rate in Hz.
Definition at line 135 of file HardwareCanSourceTest.h.
|
private |
Random number generator.
Definition at line 123 of file HardwareCanSourceTest.h.