<?cs def:copy(from,from_str) ?> <?cs if:(from && !node.0)?>

  • <?cs set:node.0[from_str] = from?>

<?cs /if?> <?cs if:(node[from_str] && !node.0)?>

  • <?cs set:node.0[from_str] = node[from_str]?>

<?cs /if?> <?cs /def?>

<?cs def:copy_list(from,from_str) ?>

  • <?cs if:(from.no_header && !node.0)?>

    • <?cs set:node.0[from_str].no_header = from.no_header?>

    <?cs /if?> <?cs if:(node[from_str].no_header && !node.0)?>

    • <?cs set:node.0[from_str].no_header = node[from_str].no_header?>

    <?cs /if?> <?cs each:_e=from?>

    • <?cs each:_sube=_e?>

      • <?cs set:node.0[from_str][name(_e)][name(_sube)] = _sube?>

      <?cs /each?>

    <?cs /each?> <?cs each:_g=from.group?>

    • <?cs each:_subg=_g?>

      • <?cs set:node.0[from_str].group[name(_g)][name(_subg)] = _subg?> <?cs each:_subge=_subg?>

        • <?cs set:node.0[from_str].group[name(_g)][name(_subg)][name(_subge)] = _subge?>

        <?cs /each?>

      <?cs /each?>

    <?cs /each?> <?cs each:_e=node[from_str]?>

    • <?cs each:_sube=_e?>

      • <?cs set:node.0[from_str][name(_e)][name(_sube)] = _sube?>

      <?cs /each?>

    <?cs /each?> <?cs each:_g=node[from_str].group?>

    • <?cs each:_subg=_g?>

      • <?cs set:node.0[from_str].group[name(_g)][name(_subg)] = _subg?> <?cs each:_subge=_subg?>

        • <?cs set:node.0[from_str].group[name(_g)][name(_subg)][name(_subge)] = _subge?>

        <?cs /each?>

      <?cs /each?>

    <?cs /each?>

<?cs /def?>

<?cs call:copy(name,"name")?> <?cs call:copy(desc,"desc")?> <?cs call:copy_list(pub,"pub")?> <?cs call:copy_list(goal,"goal")?> <?cs call:copy_list(result,"result")?> <?cs call:copy_list(feedback,"feedback")?> <?cs call:copy_list(act_called,"act_called")?> <?cs call:copy_list(sub,"sub")?> <?cs call:copy_list(srv,"srv")?> <?cs call:copy_list(srv_called,"srv_called")?> <?cs call:copy_list(param,"param")?> <?cs call:copy_list(param_set,"param_set")?> <?cs call:copy_list(req_tf,"req_tf")?> <?cs call:copy_list(prov_tf,"prov_tf")?>

  • <?cs each:_n=node?>

    • <?cs each:_l=_n?>

      • <?cs each:_e=_l?>

        • <?cs if:(name(_e) != 'group')?>

          • <?cs each:_sube=_e?>

            • <?cs set:_l.group.0[name(_e)][name(_sube)] = _sube?>

            <?cs /each?>

          <?cs /if?>

        <?cs /each?>

      <?cs /each?>

    <?cs /each?>

<?cs def:action_list(name,var,node_name)?>

<?cs if:(subcount(var))?> <?cs if:!var.no_header?>

<?cs var:__name?>

<?cs /if?> <?cs each:_group=var.group?> <?cs if:_group.name?>

<?cs var:_group.name ?>

<?cs var:_group.desc ?>

<?cs /if?> <?cs each:_elem=_group?> <?cs if:(name(_elem) != 'name' && name(_elem) != 'desc')?> <?cs var:_elem.name ?> (<?cs var:_elem.type ?>)

  • <?cs var:_elem.desc ?>

<?cs /if?> <?cs /each ?> <?cs /each ?> <?cs /if?>

<?cs /def?>

<?cs def:topic_list(name,var,node_name)?>

<?cs if:(subcount(var))?> <?cs if:!var.no_header?>

<?cs var:__name?>

<?cs /if?> <?cs each:_group=var.group?> <?cs if:_group.name?>

<?cs var:_group.name ?>

<?cs var:_group.desc ?>

<?cs /if?> <?cs each:_elem=_group?> <?cs if:(name(_elem) != 'name' && name(_elem) != 'desc')?> <?cs var:_elem.name ?> (<?cs var:_elem.type ?>)

  • <?cs var:_elem.desc ?>

<?cs /if?> <?cs /each ?> <?cs /each ?> <?cs /if?>

<?cs /def?>

<?cs def:service_list(name,var,node_name)?>

<?cs if:(subcount(var))?> <?cs if:!var.no_header?>

<?cs var:__name?>

<?cs /if?> <?cs each:_group=var.group?> <?cs if:_group.name?>

<?cs var:_group.name ?>

<?cs var:_group.desc ?>

<?cs /if?> <?cs each:_elem=_group?> <?cs if:(name(_elem) != 'name' && name(_elem) != 'desc')?> <?cs var:_elem.name ?> (<?cs var:_elem.type ?>)

  • <?cs var:_elem.desc ?>

<?cs /if?> <?cs /each ?> <?cs /each ?> <?cs /if?>

<?cs /def?>

<?cs def:param_list(name,var,node_name)?>

<?cs if:(subcount(var))?> <?cs if:!var.no_header?>

<?cs var:__name?>

<?cs /if?> <?cs each:_group=var.group?> <?cs if:_group.name?>

<?cs var:_group.name ?>

<?cs var:_group.desc ?>

<?cs /if?> <?cs each:_elem=_group?> <?cs if:(name(_elem) != 'name' && name(_elem) != 'desc')?> <?cs var:_elem.name ?> (<?cs var:_elem.type ?><?cs if:(_elem.default)?>, default: <?cs var:_elem.default ?><?cs /if?>)

  • <?cs var:_elem.desc ?>

<?cs /if?> <?cs /each ?> <?cs /each ?> <?cs /if?>

<?cs /def?>

<?cs def:tf_list(name,var,node_name)?>

<?cs if:(subcount(var))?> <?cs if:!var.no_header?>

<?cs var:__name?>

<?cs /if?> <?cs each:_group=var.group?> <?cs if:_group.name?>

<?cs var:_group.name ?>

<?cs var:_group.desc ?>

<?cs /if?> <?cs each:_elem=_group?> <?cs if:(name(_elem) != 'name' && name(_elem) != 'desc')?> <?cs var:_elem.from ?><?cs var:_elem.to ?>

  • <?cs var:_elem.desc ?>

<?cs /if?> <?cs /each ?> <?cs /each ?> <?cs /if?>

<?cs /def?>

<?cs each:_node=node ?>

<?cs if:_node.name?>

<?cs var:_node.name ?>

<?cs var:_node.desc ?>

  • <?cs if:subcount(_node.sub) || subcount(_node.pub)?>

Topics    <?cs /if?> <?cs if:subcount(_node.srv) || subcount(_node.srv_called)?> Services    <?cs /if?> <?cs if:subcount(_node.param) || subcount(_node.param_set)?> Params    <?cs /if?> <?cs if:subcount(_node.req_tf)|| subcount(_node.prov_tf)?> tf    <?cs /if?> <?cs if:subcount(_node.act_called)?> Actions    <?cs /if?> All    <?cs /if?> <?cs if:!_node.name?> Hide <?cs /if?> <?cs call:topic_list("Action Goal", _node.goal,_node.name)?> <?cs call:topic_list("Action Result", _node.result, _node.name)?> <?cs call:topic_list("Action Feedback", _node.feedback, _node.name)?> <?cs call:action_list("Actions Called", _node.act_called, _node.name)?> <?cs call:topic_list("Subscribed Topics", _node.sub, _node.name)?> <?cs call:topic_list("Published Topics", _node.pub, _node.name)?> <?cs call:service_list("Services", _node.srv, _node.name)?> <?cs call:service_list("Services Called", _node.srv_called, _node.name)?> <?cs call:param_list("Parameters", _node.param, _node.name)?> <?cs call:param_list("Parameters Set", _node.param_set, _node.name)?> <?cs call:tf_list("Required tf Transforms", _node.req_tf, _node.name)?> <?cs call:tf_list("Provided tf Transforms", _node.prov_tf, _node.name)?>

<?cs /each ?>

Wiki: CS/NodeAPISeeSaw (last edited 2010-03-31 07:00:59 by MeloneeWise)