An object - Representing a validator in ROS.
- Source:
Methods
(static) isValidFullTopicName(topic) → {boolean}
Check if a fully-qualified topic name is valid without throwing.
Parameters:
| Name | Type | Description |
|---|---|---|
topic |
string | The name of topic/service. Must be fully-qualified and already expanded. |
- Source:
Returns:
True if valid, false otherwise.
- Type
- boolean
(static) isValidNamespace(namespace) → {boolean}
Check if a namespace is valid without throwing.
Parameters:
| Name | Type | Description |
|---|---|---|
namespace |
string | The namespace to be validated. |
- Source:
Returns:
True if valid, false otherwise.
- Type
- boolean
(static) isValidNodeName(name) → {boolean}
Check if a node name is valid without throwing.
Parameters:
| Name | Type | Description |
|---|---|---|
name |
string | The name of node. |
- Source:
Returns:
True if valid, false otherwise.
- Type
- boolean
(static) isValidTopicName(topic) → {boolean}
Check if a topic name is valid without throwing.
Parameters:
| Name | Type | Description |
|---|---|---|
topic |
string | The name of topic/service. Does not have to be fully-qualified. |
- Source:
Returns:
True if valid, false otherwise.
- Type
- boolean
(static) validateFullTopicName(topic) → {true}
Validate a given topic or service name, and throw an error if invalid.
Parameters:
| Name | Type | Description |
|---|---|---|
topic |
string | The name of topic/service. Must be fully-qualified and already expanded. |
- Source:
Throws:
-
-
If topic is not a string.
- Type
- TypeValidationError
-
-
-
If the topic name is invalid.
- Type
- NameValidationError
-
Returns:
Always returns true if valid.
- Type
- true
(static) validateNamespace(namespace) → {true}
Validate a given namespace, and throw an error if invalid.
Parameters:
| Name | Type | Description |
|---|---|---|
namespace |
string | The namespace to be validated. |
- Source:
Throws:
-
-
If namespace is not a string.
- Type
- TypeValidationError
-
-
-
If the namespace is invalid.
- Type
- NameValidationError
-
Returns:
Always returns true if valid.
- Type
- true
(static) validateNodeName(name) → {true}
Validate a given node name, and throw an error if invalid.
Parameters:
| Name | Type | Description |
|---|---|---|
name |
string | The name of node. |
- Source:
Throws:
-
-
If name is not a string.
- Type
- TypeValidationError
-
-
-
If the node name is invalid.
- Type
- NameValidationError
-
Returns:
Always returns true if valid.
- Type
- true
(static) validateTopicName(topic) → {true}
Validate a given topic or service name, and throw an error if invalid.
Parameters:
| Name | Type | Description |
|---|---|---|
topic |
string | The name of topic/service. Does not have to be fully-qualified. |
- Source:
Throws:
-
-
If topic is not a string.
- Type
- TypeValidationError
-
-
-
If the topic name is invalid.
- Type
- NameValidationError
-
Returns:
Always returns true if valid.
- Type
- true