The Component can process up to four channels of messages. The message type is specified when the component is created. The Component is inherited from ComponentBase. Your component can inherit from Component, and implement Init() & Proc(...), They are picked up by the CyberRT. There are 4 specialization implementations.
More...
#include <component.h>
|
| Component () |
|
| ~Component () override |
|
bool | Initialize (const ComponentConfig &config) override |
| init the component by protobuf object. More...
|
|
bool | Process (const std::shared_ptr< M0 > &msg0, const std::shared_ptr< M1 > &msg1, const std::shared_ptr< M2 > &msg2, const std::shared_ptr< M3 > &msg3) |
|
virtual | ~ComponentBase () |
|
virtual bool | Initialize (const TimerComponentConfig &config) |
|
virtual void | Shutdown () |
|
template<typename T > |
bool | GetProtoConfig (T *config) const |
|
template<typename M0 = NullType, typename M1 = NullType, typename M2 = NullType, typename M3 = NullType>
class apollo::cyber::Component< M0, M1, M2, M3 >
The Component can process up to four channels of messages. The message type is specified when the component is created. The Component is inherited from ComponentBase. Your component can inherit from Component, and implement Init() & Proc(...), They are picked up by the CyberRT. There are 4 specialization implementations.
- Template Parameters
-
M0 | the first message. |
M1 | the second message. |
M2 | the third message. |
M3 | the fourth message. |
- Warning
- The Init & Proc functions need to be overloaded, but don't want to be called. They are called by the CyberRT Frame.
◆ Component()
template<typename M0 = NullType, typename M1 = NullType, typename M2 = NullType, typename M3 = NullType>
◆ ~Component()
template<typename M0 = NullType, typename M1 = NullType, typename M2 = NullType, typename M3 = NullType>
◆ Initialize()
template<typename M0 , typename M1 , typename M2 , typename M3 >
init the component by protobuf object.
- Parameters
-
config | which is defined in 'cyber/proto/component_conf.proto' |
- Returns
- returns true if successful, otherwise returns false
Reimplemented from apollo::cyber::ComponentBase.
◆ Process()
template<typename M0, typename M1, typename M2, typename M3>
bool apollo::cyber::Component< M0, M1, M2, M3 >::Process |
( |
const std::shared_ptr< M0 > & |
msg0, |
|
|
const std::shared_ptr< M1 > & |
msg1, |
|
|
const std::shared_ptr< M2 > & |
msg2, |
|
|
const std::shared_ptr< M3 > & |
msg3 |
|
) |
| |
The documentation for this class was generated from the following file: