modm API documentation
modm::amnb::Node< TxBufferSize, MaxHeapAllocation > Class Template Reference

#include <modm/communication/amnb/node.hpp>

Inheritance diagram for modm::amnb::Node< TxBufferSize, MaxHeapAllocation >:
modm::Resumable< 6 >

Public Member Functions

 Node (Device &device, uint8_t address)
 
template<size_t Actions>
 Node (Device &device, uint8_t address, Action (&actions)[Actions])
 
template<size_t Listeners>
 Node (Device &device, uint8_t address, Listener (&listeners)[Listeners])
 
template<size_t Actions, size_t Listeners>
 Node (Device &device, uint8_t address, Action (&actions)[Actions], Listener (&listeners)[Listeners])
 
void setAddress (uint8_t address)
 
void setSeed (uint16_t seed)
 
bool broadcast (uint8_t command)
 
bool broadcast (uint8_t command, const uint8_t *data, size_t length)
 
template<typename T >
bool broadcast (uint8_t command, const T &argument)
 
template<class ReturnType = void, class ErrorType = void>
modm::ResumableResult< Result< ReturnType, ErrorType > > request (uint8_t from, uint8_t command)
 
template<class ReturnType = void, class ErrorType = void>
modm::ResumableResult< Result< ReturnType, ErrorType > > request (uint8_t from, uint8_t command, const uint8_t *data, size_t length)
 
template<class ReturnType = void, class ErrorType = void, class T >
modm::ResumableResult< Result< ReturnType, ErrorType > > request (uint8_t from, uint8_t command, const T &argument)
 
void update ()
 
bool areAllResumablesRunning (std::initializer_list< uint8_t > ids) const
 
bool areAnyResumablesRunning () const
 
bool areAnyResumablesRunning (std::initializer_list< uint8_t > ids) const
 
bool isResumableRunning (uint8_t id) const
 
bool joinResumables (std::initializer_list< uint8_t > ids) const
 
void stopAllResumables ()
 Force all resumable functions to stop running.
 
bool stopResumable (uint8_t id)
 Force the specified resumable function to stop running.
 

Protected Types

enum  ResponseStatus : uint8_t { NotWaiting = 0, Waiting, Received }
 

Protected Member Functions

modm::ResumableResult< void > transmit ()
 
modm::ResumableResult< void > send (Message &msg)
 
modm::ResumableResult< void > request ()
 
modm::ResumableResult< void > receive ()
 
bool handleRxMessage (bool complete)
 
void setSeed ()
 
void reschedule (uint8_t mask)
 

Protected Attributes

Interface< MaxHeapAllocation > interface
 
Action *const actionList {nullptr}
 
Listener *const listenerList {nullptr}
 
modm::ShortPreciseTimeout tx_timer
 
modm::ShortTimeout response_timer
 
modm::BoundedQueue< Message, TxBufferSize > tx_queue
 
Message request_msg
 
Message rx_msg
 
uint16_t lfsr
 
const uint8_t actionCount {0}
 
const uint8_t listenerCount {0}
 
uint8_t address
 
uint8_t tx_counter
 
bool is_rx_msg_for_us
 
enum modm::amnb::Node::ResponseStatus NotWaiting
 

Static Protected Attributes

static constexpr uint8_t MIN_TX_TRIES {20}
 
static constexpr uint8_t PRIORITY_BITS {6}
 
static constexpr uint8_t RESCHEDULE_MASK_SHORT {7}
 
static constexpr uint8_t RESCHEDULE_MASK_LONG {11}
 

Detailed Description

template<size_t TxBufferSize = 2, size_t MaxHeapAllocation = 0>
class modm::amnb::Node< TxBufferSize, MaxHeapAllocation >

Author
Niklas Hauser

Member Function Documentation

bool modm::Resumable< 1 >::areAllResumablesRunning ( std::initializer_list< uint8_t >  ids) const
inheritedinline
Returns
true if all of the specified resumable function are running, else false
bool modm::Resumable< 1 >::areAnyResumablesRunning ( ) const
inheritedinline
Returns
true if any resumable function of this class is running, else false
bool modm::Resumable< 1 >::areAnyResumablesRunning ( std::initializer_list< uint8_t >  ids) const
inheritedinline
Returns
true if any of the specified resumable function are running, else false
bool modm::Resumable< 1 >::isResumableRunning ( uint8_t  id) const
inheritedinline
Returns
true if the specified resumable function is running, else false
bool modm::Resumable< 1 >::joinResumables ( std::initializer_list< uint8_t >  ids) const
inheritedinline
Returns
true if none of the specified resumable function are running, else false

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