mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
added new function node_type_name()
This commit is contained in:
parent
5a267813d0
commit
8f6b38cd63
3 changed files with 11 additions and 3 deletions
|
@ -157,4 +157,7 @@ int node_type_start(struct node_type *vt, struct super_node *sn);
|
|||
*/
|
||||
int node_type_stop(struct node_type *vt);
|
||||
|
||||
/** Return a printable representation of the node-type. */
|
||||
char * node_type_name(struct node_type *vt);
|
||||
|
||||
/** @} */
|
|
@ -36,7 +36,7 @@ int node_type_start(struct node_type *vt, struct super_node *sn)
|
|||
if (vt->state != STATE_DESTROYED)
|
||||
return 0;
|
||||
|
||||
info("Initializing " YEL("%s") " node type which is used by %zu nodes", plugin_name(vt), list_length(&vt->instances));
|
||||
info("Initializing " YEL("%s") " node type which is used by %zu nodes", node_type_name(vt), list_length(&vt->instances));
|
||||
{ INDENT
|
||||
ret = vt->init ? vt->init(sn) : 0;
|
||||
}
|
||||
|
@ -54,7 +54,7 @@ int node_type_stop(struct node_type *vt)
|
|||
if (vt->state != STATE_STARTED)
|
||||
return 0;
|
||||
|
||||
info("De-initializing " YEL("%s") " node type", plugin_name(vt));
|
||||
info("De-initializing " YEL("%s") " node type", node_type_name(vt));
|
||||
{ INDENT
|
||||
ret = vt->deinit ? vt->deinit() : 0;
|
||||
}
|
||||
|
@ -64,3 +64,8 @@ int node_type_stop(struct node_type *vt)
|
|||
|
||||
return ret;
|
||||
}
|
||||
|
||||
char * node_type_name(struct node_type *vt)
|
||||
{
|
||||
return plugin_name(vt);
|
||||
}
|
|
@ -253,7 +253,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
ret = node_type_start(node->_vt, &sn);
|
||||
if (ret)
|
||||
error("Failed to intialize node type: %s", node_name(node));
|
||||
error("Failed to intialize node type: %s", node_type_name(node->_vt));
|
||||
|
||||
ret = node_check(node);
|
||||
if (ret)
|
||||
|
|
Loading…
Add table
Reference in a new issue