|
|
| NodeID () |
| | Construct a new NodeID with "any" node UUID.
|
| | NodeID (boost::array< uint8_t, 16 > id) |
| | Construct a new NodeID with the specified UUID bytes.
|
| | NodeID (boost::uuids::uuid id) |
| | Construct a new NodeID with the specified boost::uuids::uuid.
|
| | NodeID (const NodeID &id) |
| | Copy construct a new NodeID.
|
| | NodeID (boost::string_ref id) |
| | Construct a new NodeID parsing a string UUID.
|
| const boost::array< uint8_t, 16 > | ToByteArray () const |
| | Convert the NodeID UUID to bytes.
|
| virtual std::string | ToString () const |
| | Convert the NodeID UUID to string with "B" format.
|
| virtual std::string | ToString (boost::string_ref format) const |
| | Convert the NodeID UUID to specified format.
|
|
bool | operator== (const NodeID &id2) const |
| | Test if NodeID is equal.
|
|
bool | operator!= (const NodeID &id2) const |
| | Test if NodeID is not equal.
|
|
NodeID & | operator= (const NodeID &id) |
| | Assignment operator.
|
| bool | IsAnyNode () const |
| | Is the NodeID UUID all zeros.
|
| RR_OVIRTUAL std::string | RRType () RR_OVERRIDE |
| | Gets the type of the object as a string. This string is in C++ format, using two colons to separate namespaces instead of dots.
|
NodeID UUID storage and generation.
Robot Raconteur uses NodeID and NodeName to uniquely identify a node. NodeID is a UUID (Universally Unique ID), while NodeName is a string. The NodeID is expected to be unique, while the NodeName is set by the user and may not be unique. The NodeID class represents the UUID NodeID.
A UUID is a 128-bit randomly generated number that is statistically guaranteed to be unique to a very high probability. NodeID uses the Boost.UUID library to generate, manage, and store the UUID.
The UUID can be loaded from a string, bytes, or generated randomly at runtime. It can be converted to a string.
The LocalTransport and ServerNodeSetup classes will automatically assign a NodeID to a node when the local transport is started with a specified node name. The generated NodeID is stored on the local system, and is associated with the node name. It will be loaded when a node is started with the same NodeName.
NodeID with all zeros is considered "any" node.
| virtual std::string RobotRaconteur::NodeID::ToString |
( |
boost::string_ref | format | ) |
const |
|
virtual |
Convert the NodeID UUID to specified format.
Format may either be "B" for the 8-4-4-4-12 UUID with brackets, "D" for the 8-4-4-4-12 UUID without brackets, or "N" for 32 UUID format with no dashes or brackets
"B" format:
{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}
"D" format:
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
"N" format:
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
- Parameters
-
| format | "B", "D", or "N" for the format |
- Returns
- std::string