46 int main(
int argc,
char **argv)
51 LOG(INFO) <<
"Use case : Basic registration" <<
NL;
58 LOG(INFO) <<
"Create the node instances ..." <<
NL;
66 LOG(INFO) <<
"Create the base instance ..." <<
NL;
69 LOG(INFO) <<
"Create transport instance" <<
NL;
78 LOG(INFO) <<
"Network setup ..." <<
NL;
81 loop.add_node(&node1,
"node_1");
82 loop.add_node(&node2,
"node_2");
89 LOG(INFO) <<
"Registering node1 ... " <<
NL;
90 node1.unit0()->device_management()->register_device();
91 LOG(INFO) <<
"Node1 address ... " << node1.address() <<
NL;
94 assert(node1.address() == 1);
99 LOG(INFO) <<
"Registering node2 ... " <<
NL;
100 node2.unit0()->device_management()->register_device();
101 LOG(INFO) <<
"Node2 address ... " << node2.address() <<
NL;
104 assert(node2.address() == 2);
106 LOG(INFO) <<
"There should be two registered devices ... " 107 << base.
unit0()->device_management()->entries().size() <<
NL;
109 assert(base.
unit0()->device_management()->entries().size() == 2);
This class represents a HAN-FUN Concentrator.
This is the top level include file for the HAN-FUN library.
This file contains the prototypes of the debug functionality in HAN-FUN.
constexpr uint16_t BROADCAST_ADDR
HAN-FUN Broadcast - device address.
Template for HAN-FUN concentrator devices.
#define NL
Helper define for new-line and stream clear.
CoreServices * unit0() const
Get the unit 0 used by this concentrator device.
This file contains an implementation of a HAN-FUN transport layer to be used in the example applicati...
#define UNUSED(x)
Helper macro to remove warning about unused function/method argument.
#define LOG(X)
Log messages with the level given by X.
Template for declaring HAN-FUN node devices.