Classes | Public Types | Public Member Functions | Public Attributes
NodeRegisterManager Class Reference

#include <NodeRegisterManager.h>

List of all members.

Classes

struct  NodeRegisters
class  RegisterInfo

Public Types

typedef boost::unordered_map
< std::string, NodeRegisters
NodeRegisterMap
typedef NodeRegisterMap::iterator NodeRegisterMapIterator
typedef boost::unordered_map
< std::string, RegisterInfo
RegisterInfoMap
typedef boost::shared_ptr
< RegisterInfoMap
RegisterInfoMapPtr

Public Member Functions

void addNode (const std::string &nodeName, const std::string &xmlFile)
 Add a node to the node register.
RegisterInfo getControlInfo (const std::string &nodeName, const std::string &registerName)
 Get Control information about the passed register.
uint16_t getControlValue (const std::string &nodeName, const std::string &prop)
 Get control value of specified node.
unsigned int getNodeCount ()
std::string getNodeType (const std::string &nodeName)
RegisterInfo getStatusInfo (const std::string &nodeName, const std::string &registerName)
 Get Status information about the passed register.
uint16_t getStatusValue (const std::string &nodeName, const std::string &prop)
 Get status value of specified node.
bool hasControlProperty (const std::string &nodeName, const std::string &prop)
 Check to see if node has certain control property.
bool hasNode (const std::string &nodeName)
bool hasStatusProperty (const std::string &nodeName, const std::string &prop)
 Check to see if node has certain status property.
 NodeRegisterManager ()
void resetControlValues (const std::string &nodeName)
 Reset control values of a specified node.
void setControlValue (const std::string &nodeName, const std::string &prop, uint16_t value)
 Set control value of specified node.
void show (const std::string &nodeName)
 Display control and status values of a node.
void showControl (const std::string &nodeName)
 Display control value of given node.
void showStatus (const std::string &nodeName)
 Display status value of given node.
virtual ~NodeRegisterManager ()

Public Attributes

NodeRegisterMap nodeRegisterMap

Detailed Description

Definition at line 12 of file NodeRegisterManager.h.


Member Typedef Documentation

typedef boost::unordered_map<std::string, NodeRegisters> NodeRegisterManager::NodeRegisterMap

Definition at line 42 of file NodeRegisterManager.h.

typedef NodeRegisterMap::iterator NodeRegisterManager::NodeRegisterMapIterator

Definition at line 43 of file NodeRegisterManager.h.

typedef boost::unordered_map<std::string, RegisterInfo> NodeRegisterManager::RegisterInfoMap

Definition at line 33 of file NodeRegisterManager.h.

Definition at line 34 of file NodeRegisterManager.h.


Constructor & Destructor Documentation

Definition at line 10 of file NodeRegisterManager.cpp.

Definition at line 14 of file NodeRegisterManager.cpp.


Member Function Documentation

void NodeRegisterManager::addNode ( const std::string &  nodeName,
const std::string &  xmlFile 
)

Add a node to the node register.

Parameters:
nodeNamestring name of the node to add
xmlFilexml file to load registers from

Definition at line 27 of file NodeRegisterManager.cpp.

NodeRegisterManager::RegisterInfo NodeRegisterManager::getControlInfo ( const std::string &  nodeName,
const std::string &  registerName 
)

Get Control information about the passed register.

Parameters:
nodeNameName of the node that information is requested for
registerNameName of the register that information is requested for
Returns:
Register Control Information
Exceptions:
runtime_errorif the register name given is invalid, or a node name is invalid

Definition at line 112 of file NodeRegisterManager.cpp.

uint16_t NodeRegisterManager::getControlValue ( const std::string &  nodeName,
const std::string &  prop 
)

Get control value of specified node.

Parameters:
nodeNameName of node to retrieve information from
propProperty to return the value of (control)
Returns:
Register value of property
Exceptions:
runtime_errorif the property name or node name is invalid

Definition at line 304 of file NodeRegisterManager.cpp.

Returns:
The size (# of nodes) of the nodeRegisterMap

Definition at line 65 of file NodeRegisterManager.cpp.

std::string NodeRegisterManager::getNodeType ( const std::string &  nodeName)
Parameters:
nodeNameName of the node to check for in the nodeRegisterMap
Returns:
String value for the type of node

Definition at line 87 of file NodeRegisterManager.cpp.

NodeRegisterManager::RegisterInfo NodeRegisterManager::getStatusInfo ( const std::string &  nodeName,
const std::string &  registerName 
)

Get Status information about the passed register.

Parameters:
nodeNameName of the node the information is requested for
registerNameName of the register that information is requested for
Returns:
Register Status Information
Exceptions:
runtime_errorif the register name given is invalid, or a node name is invalid

Definition at line 152 of file NodeRegisterManager.cpp.

uint16_t NodeRegisterManager::getStatusValue ( const std::string &  nodeName,
const std::string &  prop 
)

Get status value of specified node.

Parameters:
nodeNameName of node to retrieve information from
propProperty to return the value of (status)
Returns:
Register value of property
Exceptions:
runtime_errorif the property name or node name is invalid

Definition at line 266 of file NodeRegisterManager.cpp.

bool NodeRegisterManager::hasControlProperty ( const std::string &  nodeName,
const std::string &  prop 
)

Check to see if node has certain control property.

Parameters:
nodeNameName of node to check
propControl Property that specified node is being checked for
Returns:
Boolean value for whether the register has the specified control property
Exceptions:
runtime_errorif the node name is invalid

Definition at line 192 of file NodeRegisterManager.cpp.

bool NodeRegisterManager::hasNode ( const std::string &  nodeName)
Parameters:
nodeNameName of the node to check for in the nodeRegisterMap
Returns:
Boolean value for whether the nodeRegisterMap has the specified node

Definition at line 76 of file NodeRegisterManager.cpp.

bool NodeRegisterManager::hasStatusProperty ( const std::string &  nodeName,
const std::string &  prop 
)

Check to see if node has certain status property.

Parameters:
nodeNameName of node to check
propStatus Property that specified node is being checked for
Returns:
Boolean value for whether the register has the specified status property
Exceptions:
runtime_errorif the node name is invalid

Definition at line 229 of file NodeRegisterManager.cpp.

void NodeRegisterManager::resetControlValues ( const std::string &  nodeName)

Reset control values of a specified node.

Parameters:
nodeNameName of node to reset control values in
Exceptions:
runtime_errorif the node name is invalid

Definition at line 385 of file NodeRegisterManager.cpp.

void NodeRegisterManager::setControlValue ( const std::string &  nodeName,
const std::string &  prop,
uint16_t  value 
)

Set control value of specified node.

Parameters:
nodeNameName of node where the property will be set
propProperty to edit with new value
valueNew value to set the property to
Exceptions:
runtime_errorif the property name or node name is invalid

Definition at line 342 of file NodeRegisterManager.cpp.

void NodeRegisterManager::show ( const std::string &  nodeName)

Display control and status values of a node.

Parameters:
nodeNameName of node where from information is retrieved and displayed

Definition at line 422 of file NodeRegisterManager.cpp.

void NodeRegisterManager::showControl ( const std::string &  nodeName)

Display control value of given node.

Parameters:
nodeNameName of node to retrieve information from

Definition at line 469 of file NodeRegisterManager.cpp.

void NodeRegisterManager::showStatus ( const std::string &  nodeName)

Display status value of given node.

Parameters:
nodeNameName of node to retrieve information from

Definition at line 443 of file NodeRegisterManager.cpp.


Member Data Documentation

Definition at line 66 of file NodeRegisterManager.h.


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


robot_instance
Author(s):
autogenerated on Sat Jun 8 2019 20:43:12