iLab Neuromorphic Robotics Toolkit  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
nrt::blackboard::RemoteCommand Struct Reference

#include <nrt/Core/Blackboard/Network/RemoteCommand.H>

Blackboard remote command description.

This class is used to specify remote commands via a generic text-based interface. The class holds both command args and possible return args, if any.

Definition at line 79 of file RemoteCommand.H.

Public Member Functions

 RemoteCommand (Command c=Command::NoOp)
 Constructor with just a command and no args yet.
 
void clear ()
 Clear all the args.
 
template<typename T >
void set (std::string const &key, T const &value)
 Helper function to set an arg value from a type T.
 
template<typename T >
void serset (std::string const &key, T const &value)
 Helper function to set an arg value from a type T, using serialization. More...
 
template<typename T = std::string>
get (std::string const &key) const
 Helper function to get an arg value and throw if not found.
 
template<typename T >
serget (std::string const &key) const
 Helper function to get an arg value using serialization and throw if not found. More...
 
template<class Archive >
void serialize (Archive &ar)
 Serialization.
 

Public Attributes

Command command
 The command. More...
 

Member Function Documentation

template<typename T >
void nrt::blackboard::RemoteCommand::serset ( std::string const &  key,
T const &  value 
)
inline

Helper function to set an arg value from a type T, using serialization.

Use this version for types that are serializable an for which boost::lexical_cast fails

Definition at line 108 of file RemoteCommandImpl.H.

References BBTHROWX.

template<typename T >
T nrt::blackboard::RemoteCommand::serget ( std::string const &  key) const
inline

Helper function to get an arg value using serialization and throw if not found.

Use this version for types that are serializable an for which boost::lexical_cast fails

Definition at line 74 of file RemoteCommandImpl.H.

References BBTHROW, and BBTHROWX.

Member Data Documentation

Command nrt::blackboard::RemoteCommand::command

The command.

Can't be const because of serialization, but you should treat it as const!

Definition at line 86 of file RemoteCommand.H.

Referenced by serialize().


The documentation for this struct was generated from the following files: