Skip to content

Struct baton_node

ClassList > baton_node

Node state. More...

  • #include <baton_node.h>

Public Attributes

Type Name
uint8_t ack_frame
ACK being sent.
struct baton_channel channel
One channel per node index.
struct baton_node_config config
Copy of the configuration.
uint8_t current
Master: index of the polled slave - 1.
uint32_t cycle_count
Master: number of cycles started.
uint32_t cycle_start
Master: start of the current cycle.
bool initialized
baton_node_init() succeeded.
uint32_t last_housekeep_ms
Last TTL scan.
struct baton_link link
Byte-level link.
uint8_t link_state
Master/slave state machine.
uint32_t link_timer
Start of the current wait.
uint8_t node_address
Index 0 = master, 1..n = slaves.
uint8_t node_count
Master + slaves.
uint32_t now_ms
Time of the last baton_node_process() .
uint32_t others_mask
Node mask of all other nodes.
uint8_t poll_seq
Slave: sequence number of the last POLL.
struct baton_queue queue
[HIGH], [NORMAL].
uint8_t queue_high_memory
HIGH queue storage.
uint8_t queue_normal_memory
NORMAL queue storage.
uint8_t retries
Slave: retransmissions to slot_peer in this slot.
uint8_t self_index
Index of this node.
uint8_t slot_k
Slave: iteration counter over the other slaves.
uint32_t slot_nack
Slave: peers that did not acknowledge in this slot.
uint8_t slot_pass
Slave: 0 = reachable peers, 1 = peers considered dead.
uint8_t slot_peer
Slave: node index being served.
uint8_t slot_rr
Slave: round-robin start, advanced every slot.
uint32_t slot_start
Slave: time of the POLL that started the slot.
uint8_t state_data
State mailboxes, in list order.
uint32_t state_dirty
Node mask: still to be sent to.
uint8_t state_length
Current length of each state.
struct baton_stats stats
Node-level counters.
uint8_t tx_frame
POLL, RESP or DATA being sent.

Detailed Description

Treat the members as private; use the functions below.

Public Attributes Documentation

variable ack_frame

ACK being sent.

uint8_t baton_node::ack_frame[BATON_FRAME_OVERHEAD];


variable channel

One channel per node index.

struct baton_channel baton_node::channel[BATON_MAX_NODES];


variable config

Copy of the configuration.

struct baton_node_config baton_node::config;


variable current

Master: index of the polled slave - 1.

uint8_t baton_node::current;


variable cycle_count

Master: number of cycles started.

uint32_t baton_node::cycle_count;


variable cycle_start

Master: start of the current cycle.

uint32_t baton_node::cycle_start;


variable initialized

baton_node_init() succeeded.

bool baton_node::initialized;


variable last_housekeep_ms

Last TTL scan.

uint32_t baton_node::last_housekeep_ms;


Byte-level link.

struct baton_link baton_node::link;


Master/slave state machine.

uint8_t baton_node::link_state;


Start of the current wait.

uint32_t baton_node::link_timer;


variable node_address

Index 0 = master, 1..n = slaves.

uint8_t baton_node::node_address[BATON_MAX_NODES];


variable node_count

Master + slaves.

uint8_t baton_node::node_count;


variable now_ms

Time of the last baton_node_process() .

uint32_t baton_node::now_ms;


variable others_mask

Node mask of all other nodes.

uint32_t baton_node::others_mask;


variable poll_seq

Slave: sequence number of the last POLL.

uint8_t baton_node::poll_seq;


variable queue

[HIGH], [NORMAL].

struct baton_queue baton_node::queue[2];


variable queue_high_memory

HIGH queue storage.

uint8_t baton_node::queue_high_memory[BATON_QUEUE_HIGH_SIZE];


variable queue_normal_memory

NORMAL queue storage.

uint8_t baton_node::queue_normal_memory[BATON_QUEUE_NORMAL_SIZE];


variable retries

Slave: retransmissions to slot_peer in this slot.

uint8_t baton_node::retries;


variable self_index

Index of this node.

uint8_t baton_node::self_index;


variable slot_k

Slave: iteration counter over the other slaves.

uint8_t baton_node::slot_k;


variable slot_nack

Slave: peers that did not acknowledge in this slot.

uint32_t baton_node::slot_nack;


variable slot_pass

Slave: 0 = reachable peers, 1 = peers considered dead.

uint8_t baton_node::slot_pass;


variable slot_peer

Slave: node index being served.

uint8_t baton_node::slot_peer;


variable slot_rr

Slave: round-robin start, advanced every slot.

uint8_t baton_node::slot_rr;


variable slot_start

Slave: time of the POLL that started the slot.

uint32_t baton_node::slot_start;


variable state_data

State mailboxes, in list order.

uint8_t baton_node::state_data[BATON_STATE_DATA_SIZE];


variable state_dirty

Node mask: still to be sent to.

uint32_t baton_node::state_dirty[BATON_STATE_COUNT+1U];


variable state_length

Current length of each state.

uint8_t baton_node::state_length[BATON_STATE_COUNT+1U];


variable stats

Node-level counters.

struct baton_stats baton_node::stats;


variable tx_frame

POLL, RESP or DATA being sent.

uint8_t baton_node::tx_frame[BATON_FRAME_MAX];



The documentation for this class was generated from the following file inc/baton_node.h