41 , callback_(std::move(cb))
80 if (b->
data()->payload.size() != 6)
85 parent_->callback_(tgt);
BufferPtr< T > get_buffer_deleter(Buffer< T > *b)
Helper function to create a BufferPtr of an appropriate type without having to explicitly specify the...
Base class for all QMember types that hold data in an expandable format.
T * data()
get a pointer to the start of the data.
void register_handler(HandlerType *handler, ID id, ID mask)
Adds a new handler to this dispatcher.
void unregister_handler_all(HandlerType *handler)
Removes all instances of a handler from this dispatcher.
virtual void send(MessageType *message, unsigned priority=UINT_MAX)=0
Entry point to the flow.
MessageType * alloc()
Synchronously allocates a message buffer from the pool of this flow.
MessageHandler * global_message_write_flow()
MessageDispatchFlow * dispatcher()
VerifiedHandler(NodeBrowser *parent)
void send(Buffer< GenMessage > *b, unsigned) override
This class helps establishing a list of all (live) nodes on the network.
void refresh()
Requests a pong from every live node.
std::function< void(NodeID n)> CallbackFunction
Function prototype for the callback.
NodeBrowser(Node *node, CallbackFunction cb)
Constructor.
~NodeBrowser()
Destructor.
VerifiedHandler handler_
Callback registerd in the interface.
void unregister_callbacks()
Remove callbacks from the interface.
void register_callbacks()
Register with the interface for messages we want to listen to.
Base class for NMRAnet nodes conforming to the asynchronous interface.
string EMPTY_PAYLOAD
A global class / variable for empty or not-yet-initialized payloads.
uint64_t NodeID
48-bit NMRAnet Node ID type
NodeID buffer_to_node_id(const string &buf)
Converts a 6-byte-long buffer to a node ID.
@ MTI_VERIFY_NODE_ID_GLOBAL
verify a Node ID globally
@ MTI_EXACT
match mask for a single MTI
@ MTI_VERIFIED_NODE_ID_NUMBER
respond to a verify Node ID request
@ MTI_INITIALIZATION_COMPLETE
initialization complete