API Documentation

RuntimeInfo

The RuntimeInfo API provides C++ wrapping convenience to some functionality available in polysync_node.h.

Specifically, psync_node_get_discovered_message_types() and psync_node_get_discovered_nodes().

Usage #include <PolySyncRuntimeInfo.hpp>

MessageTypeInfo

The MessageTypeInfo class provides convenience for wrapping the ps_type_name_info type.

MessageTypeInfo::MessageTypeInfo ( … )

The default constructor.

MessageTypeInfo::MessageTypeInfo ( … )

The constructor taking the wrapped PolySync C type.

Parameters
in/out type name description
in ps_type_name_info info The struct that contains the necessary data.

MessageTypeInfo::getMessagetype ( ) const

This will get the PolySync message type.

Returns
  • ps_msg_type - Value determined at runtime for this data model type

MessageTypeInfo::getName ( ) const

This will get the string representation of the message type.

Returns
  • std::string - Application’s name for this type

MessageTypeInfo::getTypeName ( ) const

Returns
  • std::string - PolySync data model type name

MessageTypeInfo::setMessageType ( … )

The setter for _typeName.

Parameters
in/out type name description
in ps_msg_type messageType The message type to set.
Returns
  • void

MessageTypeInfo::setName ( … )

The setter for _name.

Parameters
in/out type name description
in const std::string & name The name to set.
Returns
  • void

MessageTypeInfo::setTypeName ( … )

The setter for _typeName.

Parameters
in/out type name description
in const std::string & typeName The type name to set.
Returns
  • void

RuntimeInfo

A convenience class for querying the PolySync bus for runtime data.

RuntimeInfo::RuntimeInfo ( … )

The RuntimeInfo constructor.

Parameters
in/out type name description
in const Node & node A node reference is necessary for a query to the PolySync bus to determine which runtime domain to collect data for.

virtual RuntimeInfo::~RuntimeInfo ( )

RuntimeInfo::getDiscoveredNodeIds ( )

This will get a vector of ps_identifier for nodes that exist on the same PolySync domain as _node.

Returns
Exceptions
  • DTCException on failure with the following DTC values:
    • DTC_USAGE - If argument is invalid
    • DTC_CONFIG - If node reference is invalid
    • DTC_UNAVAILABLE - If configuration is not set to maintain the information about “associated” participants

RuntimeInfo::getDiscoveredMessageTypes ( )

This will get a vector of MessageTypeInfo objects that correspond to message types existing on the same PolySync domain as _node.

Returns
Exceptions
  • DTCException on failure with the following DTC values:
    • DTC_USAGE - If argument is invalid
    • DTC_CONFIG - If node reference is invalid
    • DTC_UNAVAILABLE - If configuration is not set to maintain the information about “associated” participants