PX4 Firmware
PX4 Autopilot Software http://px4.io
IUavcanSensorBridge Class Referenceabstract

A sensor bridge class must implement this interface. More...

#include <sensor_bridge.hpp>

Inheritance diagram for IUavcanSensorBridge:
Collaboration diagram for IUavcanSensorBridge:

Public Member Functions

virtual ~IUavcanSensorBridge ()=default
 
virtual const char * get_name () const =0
 Returns ASCII name of the bridge. More...
 
virtual int init ()=0
 Starts the bridge. More...
 
virtual unsigned get_num_redundant_channels () const =0
 Returns number of active redundancy channels. More...
 
virtual void print_status () const =0
 Prints current status in a human readable format to stdout. More...
 
- Public Member Functions inherited from ListNode< IUavcanSensorBridge *>
void setSibling (IUavcanSensorBridge * sibling)
 
const IUavcanSensorBridgegetSibling () const
 

Static Public Member Functions

static void make_all (uavcan::INode &node, List< IUavcanSensorBridge *> &list)
 Sensor bridge factory. More...
 

Static Public Attributes

static constexpr unsigned MAX_NAME_LEN = 20
 

Additional Inherited Members

- Protected Attributes inherited from ListNode< IUavcanSensorBridge *>
IUavcanSensorBridge_list_node_sibling
 

Detailed Description

A sensor bridge class must implement this interface.

Author
Pavel Kirienko pavel.nosp@m..kir.nosp@m.ienko.nosp@m.@gma.nosp@m.il.co.nosp@m.m

Definition at line 49 of file sensor_bridge.hpp.

Constructor & Destructor Documentation

◆ ~IUavcanSensorBridge()

virtual IUavcanSensorBridge::~IUavcanSensorBridge ( )
virtualdefault

Member Function Documentation

◆ get_name()

virtual const char* IUavcanSensorBridge::get_name ( ) const
pure virtual

Returns ASCII name of the bridge.

Implemented in UavcanGnssBridge, UavcanMagnetometerBridge, UavcanBarometerBridge, UavcanBatteryBridge, and UavcanFlowBridge.

◆ get_num_redundant_channels()

virtual unsigned IUavcanSensorBridge::get_num_redundant_channels ( ) const
pure virtual

Returns number of active redundancy channels.

Implemented in UavcanCDevSensorBridgeBase, and UavcanGnssBridge.

Referenced by UavcanCDevSensorBridgeBase::UavcanCDevSensorBridgeBase().

Here is the caller graph for this function:

◆ init()

virtual int IUavcanSensorBridge::init ( )
pure virtual

Starts the bridge.

Returns
Non-negative value on success, negative on error.

Implemented in UavcanGnssBridge, UavcanMagnetometerBridge, UavcanBarometerBridge, UavcanBatteryBridge, and UavcanFlowBridge.

◆ make_all()

void IUavcanSensorBridge::make_all ( uavcan::INode &  node,
List< IUavcanSensorBridge *> &  list 
)
static

Sensor bridge factory.

Creates all known sensor bridges and puts them in the linked list.

Author
Pavel Kirienko pavel.nosp@m..kir.nosp@m.ienko.nosp@m.@gma.nosp@m.il.co.nosp@m.m

Definition at line 50 of file sensor_bridge.cpp.

Referenced by UavcanNode::init().

Here is the caller graph for this function:

◆ print_status()

virtual void IUavcanSensorBridge::print_status ( ) const
pure virtual

Prints current status in a human readable format to stdout.

Implemented in UavcanCDevSensorBridgeBase, and UavcanGnssBridge.

Referenced by UavcanCDevSensorBridgeBase::UavcanCDevSensorBridgeBase().

Here is the caller graph for this function:

Member Data Documentation

◆ MAX_NAME_LEN

constexpr unsigned IUavcanSensorBridge::MAX_NAME_LEN = 20
static

Definition at line 52 of file sensor_bridge.hpp.


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