OpenJAUS Software Development Kit
4.3.1
|
This is a brief description. More...
#include <SystemTree.h>
Classes | |
class | Callback |
Public Member Functions | |
const std::map< short, SubsystemInfo *> & | getSubsystems () const |
Accessor to get the value of subsystems. More... | |
uint16_t | getThisSubsytem () const |
Accessor to get the value of thisSubsytem. More... | |
bool | setThisSubsytem (uint16_t thisSubsytem) |
Accessor to set value of thisSubsytem. More... | |
uint8_t | getThisNode () const |
Accessor to get the value of thisNode. More... | |
bool | setThisNode (uint8_t thisNode) |
Accessor to set value of thisNode. More... | |
const system::Mutex & | getMutex () const |
Accessor to get the value of mutex. More... | |
bool | hasComponent (const transport::Address &address) |
bool | hasComponent (uint16_t subsystemId, uint8_t nodeId, uint8_t componentId) |
Operation hasComponent. More... | |
bool | hasNode (const transport::Address &address) |
bool | hasNode (uint16_t subsystemId, uint8_t nodeId) |
Operation hasNode. More... | |
bool | hasSubsystem (const transport::Address &address) |
bool | hasSubsystem (uint16_t subsystemId) |
Operation hasSubsystem. More... | |
bool | hasComponentIdentification (ComponentInfo &component) |
Operation hasComponentIdentification. More... | |
bool | hasComponentIdentification (const transport::Address &address) |
bool | hasComponentIdentification (uint16_t subsystemId, uint8_t nodeId, uint8_t componentId) |
Operation hasComponentIdentification. More... | |
bool | hasNodeIdentification (NodeInfo &node) |
Operation hasNodeIdentification. More... | |
bool | hasNodeIdentification (const transport::Address &address) |
bool | hasNodeIdentification (uint16_t subsystemId, uint8_t nodeId) |
Operation hasNodeIdentification. More... | |
bool | hasSubsystemIdentification (SubsystemInfo &subsystem) |
Operation hasSubsystemIdentification. More... | |
bool | hasSubsystemIdentification (const transport::Address &address) |
bool | hasSubsystemIdentification (uint16_t subsystemId) |
Operation hasSubsystemIdentification. More... | |
bool | hasComponentConfiguration (ComponentInfo &component) |
Operation hasComponentConfiguration. More... | |
bool | hasComponentConfiguration (const transport::Address &address) |
bool | hasComponentConfiguration (uint16_t subsystemId, uint8_t nodeId, uint8_t componentId) |
Operation hasComponentConfiguration. More... | |
bool | hasNodeConfiguration (NodeInfo &node) |
Operation hasNodeConfiguration. More... | |
bool | hasNodeConfiguration (const transport::Address &address) |
bool | hasNodeConfiguration (uint16_t subsystemId, uint8_t nodeId) |
Operation hasNodeConfiguration. More... | |
bool | hasSubsystemConfiguration (SubsystemInfo &subsystem) |
Operation hasSubsystemConfiguration. More... | |
bool | hasSubsystemConfiguration (const transport::Address &address) |
bool | hasSubsystemConfiguration (uint16_t subsystemId) |
Operation hasSubsystemConfiguration. More... | |
ComponentInfo | getComponent (ComponentInfo &component, bool &success) |
Operation getComponent. More... | |
ComponentInfo | getComponent (const transport::Address &address, bool &success) |
Operation getComponent. More... | |
ComponentInfo | getComponent (uint16_t subsystemId, uint8_t nodeId, uint8_t componentId, bool &success) |
Operation getComponent. More... | |
NodeInfo | getNode (NodeInfo &node, bool &success) |
Operation getNode. More... | |
NodeInfo | getNode (const transport::Address &address, bool &success) |
Operation getNode. More... | |
NodeInfo | getNode (uint16_t subsystemId, uint8_t nodeId, bool &success) |
Operation getNode. More... | |
SubsystemInfo | getSubsystem (SubsystemInfo &subsystem, bool &success) |
Operation getSubsystem. More... | |
SubsystemInfo | getSubsystem (const transport::Address &address, bool &success) |
Operation getSubsystem. More... | |
SubsystemInfo | getSubsystem (uint16_t subsystemId, bool &success) |
Operation getSubsystem. More... | |
bool | addService (transport::Address address, std::string uri, int versionMajor, int versionMinor) |
Operation addService. More... | |
bool | addComponent (ComponentInfo &component) |
Operation addComponent. More... | |
bool | addComponent (const transport::Address &address) |
bool | addComponent (uint16_t subsystemId, uint8_t nodeId, uint8_t componentId) |
Operation addComponent. More... | |
bool | addNode (NodeInfo &node) |
Operation addNode. More... | |
bool | addNode (const transport::Address &address) |
bool | addNode (uint16_t subsystemId, uint8_t nodeId) |
Operation addNode. More... | |
bool | addSubsystem (SubsystemInfo &subsystem) |
Operation addSubsystem. More... | |
bool | addSubsystem (const transport::Address &address) |
bool | addSubsystem (short subsystemId) |
Operation addSubsystem. More... | |
bool | replaceComponent (ComponentInfo &component) |
Operation replaceComponent. More... | |
bool | removeComponent (ComponentInfo &component) |
Operation removeComponent. More... | |
bool | removeComponent (const transport::Address &address) |
bool | removeComponent (uint16_t subsystemId, uint8_t nodeId, uint8_t componentId) |
Operation removeComponent. More... | |
bool | removeNode (NodeInfo &node) |
Operation removeNode. More... | |
bool | removeNode (const transport::Address &address) |
bool | removeNode (uint16_t subsystemId, uint8_t nodeId) |
Operation removeNode. More... | |
bool | removeSubsystem (SubsystemInfo &subsystem) |
Operation removeSubsystem. More... | |
bool | removeSubsystem (const transport::Address &address) |
bool | removeSubsystem (uint16_t subsystemId) |
Operation removeSubsystem. More... | |
void | lock () |
Operation lock. More... | |
void | unlock () |
Operation unlock. More... | |
unsigned char | getAvailableComponentId (uint16_t subsystemId, uint8_t nodeId) |
Operation getAvailableComponentId. More... | |
unsigned char | getAvailableNodeId (uint16_t subsystemId) |
Operation getAvailableNodeId. More... | |
uint16_t | getAvailableSubsystemId () |
Operation getAvailableSubsystemId. More... | |
bool | setComponentIdentification (const transport::Address &address, std::string name) |
Operation setComponentIdentification. More... | |
bool | setNodeIdentification (const transport::Address &address, std::string name) |
Operation setNodeIdentification. More... | |
bool | setSubsystemIdentification (const transport::Address &address, std::string name) |
Operation setSubsystemIdentification. More... | |
bool | addLocalComponent (const transport::Address &address) |
Operation addLocalComponent. More... | |
virtual std::string | toString () const |
std::vector< uint16_t > | getSubsystemIds () |
std::string | toXml (unsigned char level=0) const |
std::vector< transport::Address > | lookupService (std::string uri, int versionMajor=Service::ANY_VERSION, int versionMinor=Service::ANY_VERSION, transport::Address addressHint=transport::Address(transport::Address::ANY_SUBSYSTEM, transport::Address::ANY_NODE, transport::Address::ANY_COMPONENT)) |
std::vector< transport::Address > | lookupComponent (std::string name, transport::Address addressHint=transport::Address(transport::Address::ANY_SUBSYSTEM, transport::Address::ANY_NODE, transport::Address::ANY_COMPONENT)) |
void | setIdentification (const transport::Address &address, std::string subsystemName, std::string nodeName, std::string componentName) |
void | addUnsolicitedSender (const transport::Address &source, const transport::Address &destination) |
void | addOnItemAddCallback (void(*onAddItemCallback)(void *object, const transport::Address &address), void *object) |
void | removeOnItemAddCallback (void(*onAddItemCallback)(void *object, const transport::Address &address), void *object) |
void | addOnLocalComponentAddCallback (void(*onAddLocalComponentCallback)(void *object, const transport::Address &address), void *object) |
Execute the provided callback when a local component is added. More... | |
void | removeOnLocalComponentAddCallback (void(*onAddLocalComponentCallback)(void *object, const transport::Address &address), void *object) |
void | addOnUnsolicitedSenderAddCallback (void(*onAddUnsolicitedSenderCallback)(void *object, const transport::Address &source, const transport::Address &destination), void *object) |
void | removeOnUnsolicitedSenderAddCallback (void(*onAddUnsolicitedSenderCallback)(void *object, const transport::Address &source, const transport::Address &destination), void *object) |
void | addServices (const transport::Address &address, std::vector< model::Service *> *serviceList) |
Static Public Member Functions | |
static SystemTree & | instance () |
Protected Member Functions | |
NodeInfo * | findNode (short subsId, unsigned char nodeId) |
ComponentInfo * | findComponent (short subsId, unsigned char nodeId, unsigned char cmptId) |
Protected Attributes | |
std::map< short, SubsystemInfo *> | subsystems |
uint16_t | thisSubsytem |
uint8_t | thisNode |
system::Mutex | mutex |
Private Member Functions | |
SystemTree () | |
virtual | ~SystemTree () |
void | executeOnItemAddCallbacks (const openjaus::transport::Address &address) |
void | executeOnLocalComponentAddCallbacks (const openjaus::transport::Address &address) |
void | executeOnAddUnsolicitedSenderCallbacks (const transport::Address &source, const transport::Address &destination) |
bool | addComponentInternal (const transport::Address &address) |
bool | addComponentInternal (uint16_t subsystemId, uint8_t nodeId, uint8_t componentId) |
Private Attributes | |
system::Mutex | onItemAddCallbacksLock |
system::Mutex | onLocalComponentAddCallbacksLock |
system::Mutex | onUnsolicitedSenderAddCallbacksLock |
std::vector< SystemTree::Callback > | onItemAddCallbacks |
std::vector< SystemTree::Callback > | onLocalComponentAddCallbacks |
std::vector< SystemTree::Callback > | onUnsolicitedSenderAddCallbacks |
Friends | |
OPENJAUS_EXPORT friend std::ostream & | operator<< (std::ostream &output, const SystemTree &object) |
OPENJAUS_EXPORT friend std::ostream & | operator<< (std::ostream &output, const SystemTree *object) |
Detailed description.
|
private |
|
privatevirtual |
bool openjaus::model::SystemTree::addComponent | ( | ComponentInfo & | component | ) |
component |
|
inline |
address |
bool openjaus::model::SystemTree::addComponent | ( | uint16_t | subsystemId, |
uint8_t | nodeId, | ||
uint8_t | componentId | ||
) |
subsystemId | |
nodeId | |
componentId |
|
inlineprivate |
|
private |
bool openjaus::model::SystemTree::addLocalComponent | ( | const transport::Address & | address | ) |
address |
bool openjaus::model::SystemTree::addNode | ( | NodeInfo & | node | ) |
node |
|
inline |
address |
bool openjaus::model::SystemTree::addNode | ( | uint16_t | subsystemId, |
uint8_t | nodeId | ||
) |
subsystemId | |
nodeId |
void openjaus::model::SystemTree::addOnItemAddCallback | ( | void(*)(void *object, const transport::Address &address) | onAddItemCallback, |
void * | object | ||
) |
void openjaus::model::SystemTree::addOnLocalComponentAddCallback | ( | void(*)(void *object, const transport::Address &address) | onAddLocalComponentCallback, |
void * | object | ||
) |
Note: Adding a local component will execute both this callback as well as the OnItemAddCallback.
void openjaus::model::SystemTree::addOnUnsolicitedSenderAddCallback | ( | void(*)(void *object, const transport::Address &source, const transport::Address &destination) | onAddUnsolicitedSenderCallback, |
void * | object | ||
) |
bool openjaus::model::SystemTree::addService | ( | transport::Address | address, |
std::string | uri, | ||
int | versionMajor, | ||
int | versionMinor | ||
) |
address | |
uri | |
versionMajor | |
versionMinor |
void openjaus::model::SystemTree::addServices | ( | const transport::Address & | address, |
std::vector< model::Service *> * | serviceList | ||
) |
bool openjaus::model::SystemTree::addSubsystem | ( | SubsystemInfo & | subsystem | ) |
subsystem |
|
inline |
address |
bool openjaus::model::SystemTree::addSubsystem | ( | short | subsystemId | ) |
subsystemId |
void openjaus::model::SystemTree::addUnsolicitedSender | ( | const transport::Address & | source, |
const transport::Address & | destination | ||
) |
|
private |
|
private |
|
private |
|
protected |
|
protected |
unsigned char openjaus::model::SystemTree::getAvailableComponentId | ( | uint16_t | subsystemId, |
uint8_t | nodeId | ||
) |
subsystemId | |
nodeId |
unsigned char openjaus::model::SystemTree::getAvailableNodeId | ( | uint16_t | subsystemId | ) |
subsystemId |
uint16_t openjaus::model::SystemTree::getAvailableSubsystemId | ( | ) |
ComponentInfo openjaus::model::SystemTree::getComponent | ( | ComponentInfo & | component, |
bool & | success | ||
) |
component | |
success |
ComponentInfo openjaus::model::SystemTree::getComponent | ( | const transport::Address & | address, |
bool & | success | ||
) |
address | |
success |
ComponentInfo openjaus::model::SystemTree::getComponent | ( | uint16_t | subsystemId, |
uint8_t | nodeId, | ||
uint8_t | componentId, | ||
bool & | success | ||
) |
subsystemId | |
nodeId | |
componentId | |
success |
const system::Mutex & openjaus::model::SystemTree::getMutex | ( | ) | const |
node | |
success |
NodeInfo openjaus::model::SystemTree::getNode | ( | const transport::Address & | address, |
bool & | success | ||
) |
address | |
success |
NodeInfo openjaus::model::SystemTree::getNode | ( | uint16_t | subsystemId, |
uint8_t | nodeId, | ||
bool & | success | ||
) |
subsystemId | |
nodeId | |
success |
SubsystemInfo openjaus::model::SystemTree::getSubsystem | ( | SubsystemInfo & | subsystem, |
bool & | success | ||
) |
subsystem | |
success |
SubsystemInfo openjaus::model::SystemTree::getSubsystem | ( | const transport::Address & | address, |
bool & | success | ||
) |
address | |
success |
SubsystemInfo openjaus::model::SystemTree::getSubsystem | ( | uint16_t | subsystemId, |
bool & | success | ||
) |
subsystemId | |
success |
std::vector< uint16_t > openjaus::model::SystemTree::getSubsystemIds | ( | ) |
const std::map< short, SubsystemInfo *> & openjaus::model::SystemTree::getSubsystems | ( | ) | const |
uint8_t openjaus::model::SystemTree::getThisNode | ( | ) | const |
uint16_t openjaus::model::SystemTree::getThisSubsytem | ( | ) | const |
|
inline |
address |
bool openjaus::model::SystemTree::hasComponent | ( | uint16_t | subsystemId, |
uint8_t | nodeId, | ||
uint8_t | componentId | ||
) |
subsystemId | |
nodeId | |
componentId |
bool openjaus::model::SystemTree::hasComponentConfiguration | ( | ComponentInfo & | component | ) |
component |
|
inline |
address |
bool openjaus::model::SystemTree::hasComponentConfiguration | ( | uint16_t | subsystemId, |
uint8_t | nodeId, | ||
uint8_t | componentId | ||
) |
subsystemId | |
nodeId | |
componentId |
bool openjaus::model::SystemTree::hasComponentIdentification | ( | ComponentInfo & | component | ) |
component |
|
inline |
address |
bool openjaus::model::SystemTree::hasComponentIdentification | ( | uint16_t | subsystemId, |
uint8_t | nodeId, | ||
uint8_t | componentId | ||
) |
subsystemId | |
nodeId | |
componentId |
|
inline |
address |
bool openjaus::model::SystemTree::hasNode | ( | uint16_t | subsystemId, |
uint8_t | nodeId | ||
) |
subsystemId | |
nodeId |
bool openjaus::model::SystemTree::hasNodeConfiguration | ( | NodeInfo & | node | ) |
node |
|
inline |
address |
bool openjaus::model::SystemTree::hasNodeConfiguration | ( | uint16_t | subsystemId, |
uint8_t | nodeId | ||
) |
subsystemId | |
nodeId |
bool openjaus::model::SystemTree::hasNodeIdentification | ( | NodeInfo & | node | ) |
node |
|
inline |
address |
bool openjaus::model::SystemTree::hasNodeIdentification | ( | uint16_t | subsystemId, |
uint8_t | nodeId | ||
) |
subsystemId | |
nodeId |
|
inline |
address |
bool openjaus::model::SystemTree::hasSubsystem | ( | uint16_t | subsystemId | ) |
subsystemId |
bool openjaus::model::SystemTree::hasSubsystemConfiguration | ( | SubsystemInfo & | subsystem | ) |
subsystem |
|
inline |
address |
bool openjaus::model::SystemTree::hasSubsystemConfiguration | ( | uint16_t | subsystemId | ) |
subsystemId |
bool openjaus::model::SystemTree::hasSubsystemIdentification | ( | SubsystemInfo & | subsystem | ) |
subsystem |
|
inline |
address |
bool openjaus::model::SystemTree::hasSubsystemIdentification | ( | uint16_t | subsystemId | ) |
subsystemId |
|
static |
void openjaus::model::SystemTree::lock | ( | ) |
std::vector< transport::Address > openjaus::model::SystemTree::lookupComponent | ( | std::string | name, |
transport::Address | addressHint = transport::Address(transport::Address::ANY_SUBSYSTEM, transport::Address::ANY_NODE,transport::Address::ANY_COMPONENT) |
||
) |
std::vector< transport::Address > openjaus::model::SystemTree::lookupService | ( | std::string | uri, |
int | versionMajor = Service::ANY_VERSION , |
||
int | versionMinor = Service::ANY_VERSION , |
||
transport::Address | addressHint = transport::Address(transport::Address::ANY_SUBSYSTEM, transport::Address::ANY_NODE,transport::Address::ANY_COMPONENT) |
||
) |
bool openjaus::model::SystemTree::removeComponent | ( | ComponentInfo & | component | ) |
component |
|
inline |
address |
bool openjaus::model::SystemTree::removeComponent | ( | uint16_t | subsystemId, |
uint8_t | nodeId, | ||
uint8_t | componentId | ||
) |
subsystemId | |
nodeId | |
componentId |
bool openjaus::model::SystemTree::removeNode | ( | NodeInfo & | node | ) |
node |
|
inline |
address |
bool openjaus::model::SystemTree::removeNode | ( | uint16_t | subsystemId, |
uint8_t | nodeId | ||
) |
subsystemId | |
nodeId |
void openjaus::model::SystemTree::removeOnItemAddCallback | ( | void(*)(void *object, const transport::Address &address) | onAddItemCallback, |
void * | object | ||
) |
void openjaus::model::SystemTree::removeOnLocalComponentAddCallback | ( | void(*)(void *object, const transport::Address &address) | onAddLocalComponentCallback, |
void * | object | ||
) |
void openjaus::model::SystemTree::removeOnUnsolicitedSenderAddCallback | ( | void(*)(void *object, const transport::Address &source, const transport::Address &destination) | onAddUnsolicitedSenderCallback, |
void * | object | ||
) |
bool openjaus::model::SystemTree::removeSubsystem | ( | SubsystemInfo & | subsystem | ) |
subsystem |
|
inline |
address |
bool openjaus::model::SystemTree::removeSubsystem | ( | uint16_t | subsystemId | ) |
subsystemId |
bool openjaus::model::SystemTree::replaceComponent | ( | ComponentInfo & | component | ) |
component |
bool openjaus::model::SystemTree::setComponentIdentification | ( | const transport::Address & | address, |
std::string | name | ||
) |
address | |
name |
void openjaus::model::SystemTree::setIdentification | ( | const transport::Address & | address, |
std::string | subsystemName, | ||
std::string | nodeName, | ||
std::string | componentName | ||
) |
bool openjaus::model::SystemTree::setNodeIdentification | ( | const transport::Address & | address, |
std::string | name | ||
) |
address | |
name |
bool openjaus::model::SystemTree::setSubsystemIdentification | ( | const transport::Address & | address, |
std::string | name | ||
) |
address | |
name |
bool openjaus::model::SystemTree::setThisNode | ( | uint8_t | thisNode | ) |
thisNode | The value of the new thisNode. |
bool openjaus::model::SystemTree::setThisSubsytem | ( | uint16_t | thisSubsytem | ) |
thisSubsytem | The value of the new thisSubsytem. |
|
virtual |
std::string openjaus::model::SystemTree::toXml | ( | unsigned char | level = 0 | ) | const |
void openjaus::model::SystemTree::unlock | ( | ) |
|
friend |
|
friend |
|
protected |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
protected |
|
protected |
|
protected |