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)
 
modm::ResumableResult< void > update_transmit ()
 
modm::ResumableResult< void > update_receive ()
 
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 ()
 
bool stopResumable (uint8_t id)
 

Protected Types

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

Protected Member Functions

modm::ResumableResult< void > send (Message &msg)
 
modm::ResumableResult< void > request ()
 
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

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