<% function formatParams(params) { const items = _.pairs(params).reduce((str, [name, val]) => { const formatted = _.isObject(val) ? formatParams(val) : formatParamValue(val); return str + `
  • ${_.escape(name)} ${formatted}
  • `; }, ""); return ``; } function formatParamValue(value) { if (_.isString(value) && value.length > 80) { return _.escape(value.substr(0, 80)) + "…"; } else { return _.escape(value.toString()); } } %>

    ROS Master Status

    <% if (status) { %>

    Parameters

    <%= formatParams(params) %>

    Topics

    <% for (const name of _.union(Object.keys(publishers), Object.keys(subscribers))) { %> <% } %>
    Name Publishers Subscribers
    <%- name %> <%- _.has(publishers, name) ? publishers[name].join(", ") : "" %> <%- _.has(subscribers, name) ? subscribers[name].join(", ") : "" %>

    Services

    <% for (const [name, providers] of _.pairs(services)) { %> <% } %>
    Name Providers
    <%- name %> <%- services[name].join(", ") %>
    <% } else { %>

    The ROS master is not running.

    <% } %>