Public Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
uavcan_linux::NodeBase< NodeType > Class Template Reference

#include <helpers.hpp>

Inheritance diagram for uavcan_linux::NodeBase< NodeType >:
Inheritance graph
[legend]

Public Member Functions

DriverPackPtrgetDriverPack ()
 
const DriverPackPtrgetDriverPack () const
 
template<typename DataType >
BlockingServiceClientPtr< DataType > makeBlockingServiceClient ()
 
template<typename DataType >
PublisherPtr< DataType > makePublisher (uavcan::MonotonicDuration tx_timeout=uavcan::Publisher< DataType >::getDefaultTxTimeout())
 
template<typename DataType >
ServiceClientPtr< DataType > makeServiceClient (const typename uavcan::ServiceClient< DataType >::Callback &cb)
 
template<typename DataType >
ServiceServerPtr< DataType > makeServiceServer (const typename uavcan::ServiceServer< DataType >::Callback &cb)
 
template<typename DataType >
SubscriberPtr< DataType > makeSubscriber (const typename uavcan::Subscriber< DataType >::Callback &cb)
 
TimerPtr makeTimer (uavcan::MonotonicDuration period, const typename uavcan::Timer::Callback &cb)
 
TimerPtr makeTimer (uavcan::MonotonicTime deadline, const typename uavcan::Timer::Callback &cb)
 
 NodeBase (DriverPackPtr driver_pack)
 
 NodeBase (uavcan::ICanDriver &can_driver, uavcan::ISystemClock &clock)
 

Static Protected Member Functions

static void enforce (int error, const std::string &msg)
 
template<typename DataType >
static std::string getDataTypeName ()
 

Protected Attributes

DriverPackPtr driver_pack_
 

Detailed Description

template<typename NodeType>
class uavcan_linux::NodeBase< NodeType >

Generic wrapper for node objects with some additional convenience functions.

Definition at line 170 of file platform_specific_components/linux/libuavcan/include/uavcan_linux/helpers.hpp.

Constructor & Destructor Documentation

◆ NodeBase() [1/2]

template<typename NodeType >
uavcan_linux::NodeBase< NodeType >::NodeBase ( uavcan::ICanDriver can_driver,
uavcan::ISystemClock clock 
)
inline

Simple forwarding constructor, compatible with uavcan::Node.

Definition at line 195 of file platform_specific_components/linux/libuavcan/include/uavcan_linux/helpers.hpp.

◆ NodeBase() [2/2]

template<typename NodeType >
uavcan_linux::NodeBase< NodeType >::NodeBase ( DriverPackPtr  driver_pack)
inlineexplicit

Takes ownership of the driver container via the shared pointer.

Definition at line 202 of file platform_specific_components/linux/libuavcan/include/uavcan_linux/helpers.hpp.

Member Function Documentation

◆ enforce()

template<typename NodeType >
static void uavcan_linux::NodeBase< NodeType >::enforce ( int  error,
const std::string &  msg 
)
inlinestaticprotected

◆ getDataTypeName()

template<typename NodeType >
template<typename DataType >
static std::string uavcan_linux::NodeBase< NodeType >::getDataTypeName ( )
inlinestaticprotected

◆ getDriverPack() [1/2]

template<typename NodeType >
DriverPackPtr& uavcan_linux::NodeBase< NodeType >::getDriverPack ( )
inline

◆ getDriverPack() [2/2]

template<typename NodeType >
const DriverPackPtr& uavcan_linux::NodeBase< NodeType >::getDriverPack ( ) const
inline

◆ makeBlockingServiceClient()

template<typename NodeType >
template<typename DataType >
BlockingServiceClientPtr<DataType> uavcan_linux::NodeBase< NodeType >::makeBlockingServiceClient ( )
inline

Allocates uavcan_linux::BlockingServiceClient in the heap using shared pointer. The service client will be initialized immediately.

Exceptions
uavcan_linux::Exception.

Definition at line 268 of file platform_specific_components/linux/libuavcan/include/uavcan_linux/helpers.hpp.

◆ makePublisher()

template<typename NodeType >
template<typename DataType >
PublisherPtr<DataType> uavcan_linux::NodeBase< NodeType >::makePublisher ( uavcan::MonotonicDuration  tx_timeout = uavcan::Publisher<DataType>::getDefaultTxTimeout())
inline

Allocates uavcan::Publisher in the heap using shared pointer. The publisher will be initialized immediately.

Exceptions
uavcan_linux::Exception.

Definition at line 226 of file platform_specific_components/linux/libuavcan/include/uavcan_linux/helpers.hpp.

◆ makeServiceClient()

template<typename NodeType >
template<typename DataType >
ServiceClientPtr<DataType> uavcan_linux::NodeBase< NodeType >::makeServiceClient ( const typename uavcan::ServiceClient< DataType >::Callback &  cb)
inline

Allocates uavcan::ServiceClient in the heap using shared pointer. The service client will be initialized immediately.

Exceptions
uavcan_linux::Exception.

Definition at line 254 of file platform_specific_components/linux/libuavcan/include/uavcan_linux/helpers.hpp.

◆ makeServiceServer()

template<typename NodeType >
template<typename DataType >
ServiceServerPtr<DataType> uavcan_linux::NodeBase< NodeType >::makeServiceServer ( const typename uavcan::ServiceServer< DataType >::Callback &  cb)
inline

Allocates uavcan::ServiceServer in the heap using shared pointer. The server will be started immediately.

Exceptions
uavcan_linux::Exception.

Definition at line 241 of file platform_specific_components/linux/libuavcan/include/uavcan_linux/helpers.hpp.

◆ makeSubscriber()

template<typename NodeType >
template<typename DataType >
SubscriberPtr<DataType> uavcan_linux::NodeBase< NodeType >::makeSubscriber ( const typename uavcan::Subscriber< DataType >::Callback &  cb)
inline

Allocates uavcan::Subscriber in the heap using shared pointer. The subscriber will be started immediately.

Exceptions
uavcan_linux::Exception.

Definition at line 213 of file platform_specific_components/linux/libuavcan/include/uavcan_linux/helpers.hpp.

◆ makeTimer() [1/2]

template<typename NodeType >
TimerPtr uavcan_linux::NodeBase< NodeType >::makeTimer ( uavcan::MonotonicDuration  period,
const typename uavcan::Timer::Callback cb 
)
inline

Allocates uavcan::Timer in the heap using shared pointer. The timer will be started immediately in periodic mode.

Definition at line 291 of file platform_specific_components/linux/libuavcan/include/uavcan_linux/helpers.hpp.

◆ makeTimer() [2/2]

template<typename NodeType >
TimerPtr uavcan_linux::NodeBase< NodeType >::makeTimer ( uavcan::MonotonicTime  deadline,
const typename uavcan::Timer::Callback cb 
)
inline

Allocates uavcan::Timer in the heap using shared pointer. The timer will be started immediately in one-shot mode.

Definition at line 279 of file platform_specific_components/linux/libuavcan/include/uavcan_linux/helpers.hpp.

Member Data Documentation

◆ driver_pack_

template<typename NodeType >
DriverPackPtr uavcan_linux::NodeBase< NodeType >::driver_pack_
protected

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


uavcan_communicator
Author(s):
autogenerated on Fri Dec 13 2024 03:10:05