API Documentation

CommandMessage

This is used to send a command to another node, which if handled correctly, should respond with an appropriate ResponseMessage.

CommandMessage::CommandMessage ( )

A default constructor.

CommandMessage::CommandMessage ( … )

A copy constructor.

Parameters
in/out type description
in const CommandMessage & Instance being copied.

CommandMessage::CommandMessage ( … )

This will pair with a node to construct and enable publishing.

Parameters
in/out type description
in Node & Reference to node.

CommandMessage::CommandMessage ( … )

This will pair with a node to construct and enable publishing and messaging.

Parameters
in/out type description
in Node & Reference to node.
in ps_msg_ref Message to copy.

CommandMessage::CommandMessage ( … )

A convenience constructor from a related type.

Parameters
in/out type description
in const ps_command_msg & Instance of related type.

CommandMessage::~CommandMessage ( )

A default destructor.

CommandMessage::print ( … )

This will print internal values.

Parameters
in/out type description
in std::ostream & Output stream that defaults to std::cout.
Returns
  • void

CommandMessage::get_ps_command_msg ( ) const

This will provide convenient access to a related type.

Returns

CommandMessage::operator= ( … )

An assignment operator.

Parameters
in/out type description
in const CommandMessage & Instance to copy.
Returns

static CommandMessage::getName ( )

This will get the message name. It is useful in functions requiring message names, such as getMessageTypeByName.

Returns
  • std::string

CommandMessage::getHeader ( ) const

This will get the PolySync message header.

Returns

CommandMessage::setHeader ( … )

Parameters
in/out type description
in MsgHeader & Message header.
Returns
  • void

CommandMessage::getHeaderType ( ) const

This will get the message type identifier.

Returns

CommandMessage::setHeaderType ( … )

This will set the message type identifier.

Parameters
in/out type description
in ps_msg_type Message type identifier.
Returns
  • void

CommandMessage::getHeaderTimestamp ( ) const

This will get the message timestamp. [microseconds]

Returns

CommandMessage::setHeaderTimestamp ( … )

This will set the message timestamp. [microseconds]

Parameters
in/out type description
in ps_timestamp In microseconds.
Returns
  • void

CommandMessage::getHeaderSrcGuid ( ) const

This will get the message producer’s GUID.

Returns

CommandMessage::setHeaderSrcGuid ( … )

This will set the message producer’s GUID.

Parameters
in/out type description
in ps_guid Message producer’s GUID.
Returns
  • void

CommandMessage::getDestinationGuid ( ) const

This will get the destination GUID.

Returns

CommandMessage::setDestinationGuid ( … )

This will set the destination GUID.

Parameters
in/out type description
in ps_guid The new destination GUID.
Returns
  • void

CommandMessage::getId ( ) const

This will get the command type identifier.

Returns

CommandMessage::setId ( … )

This will set the command type identifier.

Parameters
in/out type description
in ps_command_id The command identifier.
Returns
  • void

CommandMessage::getTimestamp ( ) const

This will get the time associated with the command.

Returns

CommandMessage::setTimestamp ( … )

This will set the time associated with the command.

Parameters
in/out type description
in ps_timestamp The command timestamp.
Returns
  • void

CommandMessage::getData ( ) const

This will get the data associated with the command.

Returns
  • std::vector< datamodel::ParameterValue >

CommandMessage::setData ( … )

This will set the data associated with the command.

Parameters
in/out type description
in const std::vector< datamodel::ParameterValue > & The command data.
Returns
  • void