Return the agent_id of the specified node.
MCO_RET mco_iot_replicator_get_agent_id(mco_iot_replicator_h repl,
mco_iot_agent_id_t *agent_id);
| repl | The replicator object |
| agent_id | The address of the agent_id to be returned |
This function returns the agent_id of the specified replicator.
{
mco_iot_comm_h comm;
mco_iot_replicator_h repl;
mco_iot_comm_params_t comm_params;
mco_iot_replicator_params_t repl_params;
iot_comm_callback_t device_cbs = {&on_connect, 0, 0, &on_disconnect, &on_destroy};
mco_iot_agent_id_t agent_id;
...
mco_iot_comm_params_init(&comm_params);
CHECK(mco_iot_comm_create(&comm_params, &comm));
CHECK(mco_iot_comm_register_callback(comm, &device_cbs, 0));
mco_iot_replicator_params_init(&repl_params);
CHECK(mco_iot_replicator_create(db, comm, &repl_params, &repl));
CHECK(mco_iot_replicator_get_agent_id(repl, &agent_id));
...
}