<?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)?> <?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)?> <?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)?> <?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)?> <?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)?> <?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?>

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

<?cs /each ?>

Wiki: CS/NodeAPI (last edited 2013-10-08 22:52:54 by WilliamWoodall)