40#ifndef UWTOKENBUS_HDR_H
41#define UWTOKENBUS_HDR_H
48constexpr size_t TOKENIDMAX = std::numeric_limits<tokenid_t>::max();
98#define HDR_TOKENBUS(p) \
99 (hdr_tokenbus::access(p))
Header of the token bus protocol.
tokenid_t token_id_
progressive token id, indicates which node has the token
size_t getSize() const
Returns the size of this header.
static struct hdr_tokenbus * access(const Packet *p)
Returns a pointer to the tokenbus header of the packet p.
static int offset_
Required by the PacketHeaderManager.
tokenid_t & tokenId()
Returns a reference to the token_id variable.
static int & offset()
Returns a reference to the offset variable.
constexpr size_t TOKENIDMAX
uint_least16_t tokenid_t
set here the size of the tokenid counter