PX4 Firmware
PX4 Autopilot Software http://px4.io
uavcan_kinetis::BusEvent Class Reference

All bus events are reported as POLLIN. More...

#include <thread.hpp>

Inheritance diagram for uavcan_kinetis::BusEvent:
Collaboration diagram for uavcan_kinetis::BusEvent:

Public Member Functions

 BusEvent (CanDriver &can_driver)
 
 ~BusEvent ()
 
void registerSignalCallback (SignalCallbackHandler handler)
 
bool wait (uavcan::MonotonicDuration duration)
 
void signalFromInterrupt ()
 

Private Types

using SignalCallbackHandler = void(*)()
 

Private Attributes

SignalCallbackHandler signal_cb_ {nullptr}
 
sem_t sem_
 

Detailed Description

All bus events are reported as POLLIN.

Definition at line 29 of file thread.hpp.

Member Typedef Documentation

◆ SignalCallbackHandler

Definition at line 31 of file thread.hpp.

Constructor & Destructor Documentation

◆ BusEvent()

uavcan_kinetis::BusEvent::BusEvent ( CanDriver can_driver)

Definition at line 14 of file uc_kinetis_thread.cpp.

References sem_.

◆ ~BusEvent()

uavcan_kinetis::BusEvent::~BusEvent ( )

Definition at line 20 of file uc_kinetis_thread.cpp.

References sem_.

Member Function Documentation

◆ registerSignalCallback()

void uavcan_kinetis::BusEvent::registerSignalCallback ( SignalCallbackHandler  handler)
inline

Definition at line 40 of file thread.hpp.

References signal_cb_, signalFromInterrupt(), and wait().

Here is the call graph for this function:

◆ signalFromInterrupt()

void uavcan_kinetis::BusEvent::signalFromInterrupt ( )

Definition at line 52 of file uc_kinetis_thread.cpp.

References sem_, and signal_cb_.

Referenced by registerSignalCallback().

Here is the caller graph for this function:

◆ wait()

bool uavcan_kinetis::BusEvent::wait ( uavcan::MonotonicDuration  duration)

Definition at line 25 of file uc_kinetis_thread.cpp.

References sem_.

Referenced by registerSignalCallback().

Here is the caller graph for this function:

Member Data Documentation

◆ sem_

sem_t uavcan_kinetis::BusEvent::sem_
private

Definition at line 34 of file thread.hpp.

Referenced by BusEvent(), signalFromInterrupt(), wait(), and ~BusEvent().

◆ signal_cb_

SignalCallbackHandler uavcan_kinetis::BusEvent::signal_cb_ {nullptr}
private

Definition at line 33 of file thread.hpp.

Referenced by registerSignalCallback(), and signalFromInterrupt().


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