libuav original

Dependents:   UAVCAN UAVCAN_Subscriber

Embed: (wiki syntax)

« Back to documentation index

INodeDiscoveryHandler Class Reference

INodeDiscoveryHandler Class Reference

The allocator must implement this interface. More...

#include <node_discoverer.hpp>

Inherited by NodeDiscoveryHandler, and AbstractServer [protected].

Public Types

enum  NodeAwareness
 

These values represent the level of awareness of a certain node by the server.

More...

Public Member Functions

virtual bool canDiscoverNewNodes () const =0
 In order to avoid bus congestion, normally only leader can discover new nodes.
virtual NodeAwareness checkNodeAwareness (NodeID node_id) const =0
 It is OK to do full log traversal in this method, because the unique ID collector will cache the result when possible.
virtual void handleNewNodeDiscovery (const UniqueID *unique_id_or_null, NodeID node_id)=0
 This method will be called when a new node responds to GetNodeInfo request.

Detailed Description

The allocator must implement this interface.

Definition at line 29 of file node_discoverer.hpp.


Member Enumeration Documentation

These values represent the level of awareness of a certain node by the server.

Definition at line 40 of file node_discoverer.hpp.


Member Function Documentation

virtual bool canDiscoverNewNodes (  ) const [pure virtual]

In order to avoid bus congestion, normally only leader can discover new nodes.

virtual NodeAwareness checkNodeAwareness ( NodeID  node_id ) const [pure virtual]

It is OK to do full log traversal in this method, because the unique ID collector will cache the result when possible.

virtual void handleNewNodeDiscovery ( const UniqueID *  unique_id_or_null,
NodeID  node_id 
) [pure virtual]

This method will be called when a new node responds to GetNodeInfo request.

If this method fails to register the node, the node will be queried again later and this method will be invoked again. Unique ID will be UAVCAN_NULLPTR if the node is assumed to not implement the GetNodeInfo service.