PX4 Firmware
PX4 Autopilot Software http://px4.io
px4::bst::BST Class Reference
Inheritance diagram for px4::bst::BST:
Collaboration diagram for px4::bst::BST:

Public Member Functions

 BST (int bus)
 
virtual ~BST ()
 
virtual int init ()
 
virtual int probe ()
 
virtual int info ()
 
virtual int ioctl (device::file_t *filp, int cmd, unsigned long arg)
 
void stop ()
 

Static Public Member Functions

static void start_trampoline (void *arg)
 

Private Member Functions

void start ()
 
void Run () override
 
template<typename T >
void send_packet (BSTPacket< T > &packet)
 
template<typename T_SEND , typename T_RECV >
void send_packet (BSTPacket< T_SEND > &packet_send, BSTPacket< T_RECV > &packet_recv)
 
uint16_t swap_uint16 (uint16_t val)
 Byte swap unsigned short. More...
 
int16_t swap_int16 (int16_t val)
 Byte swap short. More...
 
uint32_t swap_uint32 (uint32_t val)
 Byte swap unsigned int. More...
 
int32_t swap_int32 (int32_t val)
 Byte swap int. More...
 

Static Private Member Functions

static uint8_t crc8 (uint8_t *data, size_t len)
 

Private Attributes

bool _should_run = false
 
unsigned _interval = 100
 
uORB::Subscription _gps_sub {ORB_ID(vehicle_gps_position)}
 
uORB::Subscription _attitude_sub {ORB_ID(vehicle_attitude)}
 
uORB::Subscription _battery_sub {ORB_ID(battery_status)}
 

Detailed Description

Definition at line 111 of file bst.cpp.

Constructor & Destructor Documentation

◆ BST()

px4::bst::BST::BST ( int  bus)

Definition at line 192 of file bst.cpp.

Referenced by bst_main().

Here is the caller graph for this function:

◆ ~BST()

px4::bst::BST::~BST ( )
virtual

Definition at line 198 of file bst.cpp.

References _should_run.

Member Function Documentation

◆ crc8()

uint8_t px4::bst::BST::crc8 ( uint8_t *  data,
size_t  len 
)
staticprivate

Definition at line 314 of file bst.cpp.

Referenced by probe().

Here is the caller graph for this function:

◆ info()

virtual int px4::bst::BST::info ( )
inlinevirtual

Definition at line 122 of file bst.cpp.

◆ init()

int px4::bst::BST::init ( )
virtual

Definition at line 240 of file bst.cpp.

References ToneAlarmInterface::init(), and OK.

Referenced by bst_main().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ioctl()

virtual int px4::bst::BST::ioctl ( device::file_t filp,
int  cmd,
unsigned long  arg 
)
inlinevirtual

Definition at line 124 of file bst.cpp.

References stop().

Here is the call graph for this function:

◆ probe()

int px4::bst::BST::probe ( )
virtual

◆ Run()

◆ send_packet() [1/2]

template<typename T >
void px4::bst::BST::send_packet ( BSTPacket< T > &  packet)
inlineprivate

Definition at line 144 of file bst.cpp.

References px4::bst::BSTPacket< T >::crc, crc8(), px4::bst::BSTPacket< T >::length, and px4::bst::BSTPacket< T >::type.

Referenced by probe(), and Run().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ send_packet() [2/2]

template<typename T_SEND , typename T_RECV >
void px4::bst::BST::send_packet ( BSTPacket< T_SEND > &  packet_send,
BSTPacket< T_RECV > &  packet_recv 
)
inlineprivate

Definition at line 153 of file bst.cpp.

References px4::bst::BSTPacket< T >::crc, crc8(), data, px4::bst::BSTPacket< T >::length, and px4::bst::BSTPacket< T >::type.

Here is the call graph for this function:

◆ start()

void px4::bst::BST::start ( )
private

◆ start_trampoline()

static void px4::bst::BST::start_trampoline ( void *  arg)
static

◆ stop()

void px4::bst::BST::stop ( )

◆ swap_int16()

int16_t px4::bst::BST::swap_int16 ( int16_t  val)
inlineprivate

Byte swap short.

Definition at line 170 of file bst.cpp.

Referenced by Run().

Here is the caller graph for this function:

◆ swap_int32()

int32_t px4::bst::BST::swap_int32 ( int32_t  val)
inlineprivate

Byte swap int.

Definition at line 183 of file bst.cpp.

Referenced by Run().

Here is the caller graph for this function:

◆ swap_uint16()

uint16_t px4::bst::BST::swap_uint16 ( uint16_t  val)
inlineprivate

Byte swap unsigned short.

Definition at line 164 of file bst.cpp.

Referenced by probe(), and Run().

Here is the caller graph for this function:

◆ swap_uint32()

uint32_t px4::bst::BST::swap_uint32 ( uint32_t  val)
inlineprivate

Byte swap unsigned int.

Definition at line 176 of file bst.cpp.

Referenced by probe().

Here is the caller graph for this function:

Member Data Documentation

◆ _attitude_sub

uORB::Subscription px4::bst::BST::_attitude_sub {ORB_ID(vehicle_attitude)}
private

Definition at line 136 of file bst.cpp.

Referenced by Run().

◆ _battery_sub

uORB::Subscription px4::bst::BST::_battery_sub {ORB_ID(battery_status)}
private

Definition at line 137 of file bst.cpp.

Referenced by Run().

◆ _gps_sub

uORB::Subscription px4::bst::BST::_gps_sub {ORB_ID(vehicle_gps_position)}
private

Definition at line 135 of file bst.cpp.

Referenced by Run().

◆ _interval

unsigned px4::bst::BST::_interval = 100
private

Definition at line 133 of file bst.cpp.

Referenced by Run().

◆ _should_run

bool px4::bst::BST::_should_run = false
private

Definition at line 132 of file bst.cpp.

Referenced by Run(), and ~BST().


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