- Source:
Members
member
loggerName
Get the logger name for this client.
- Source:
member
serviceName :string
Type:
- string
- Source:
Methods
function
configureIntrospection(clock, qos, introspectionState)
Configure introspection.
Parameters:
| Name | Type | Description |
|---|---|---|
clock |
Clock | Clock to use for service event timestamps |
qos |
QoS | QoSProfile for the service event publisher |
introspectionState |
ServiceIntrospectionState | State to set introspection to |
- Source:
function
isServiceServerAvailable() → {boolean}
Checks if the service is available.
- Source:
Returns:
true if the service is available.
Type
boolean
function
sendRequest(request, callback) → {undefined}
Send the request and will be notified asynchronously if receiving the response.
Parameters:
| Name | Type | Description |
|---|---|---|
request |
object | The request to be submitted. |
callback |
ResponseCallback | Thc callback function for receiving the server response. |
- Source:
- See:
Returns:
Type
undefined
function
sendRequestAsync(request, optionsopt) → {Promise.<object>}
Send the request and return a Promise that resolves with the response.
Parameters:
| Name | Type | Attributes | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
request |
object | The request to be submitted. | |||||||||||||
options |
object |
<optional> |
Optional parameters for the request.
Properties
|
- Source:
Throws:
-
If the request times out (when options.timeout is exceeded).
-
If the request is manually aborted (via options.signal).
-
If the request fails for other reasons.Type Error
Returns:
Promise that resolves with the service response.
Type
Promise.<object>
function
(async) waitForService(timeout) → {Promise.<boolean>}
Wait until the service server is available or a timeout is reached. This
function polls for the service state so it may not return as soon as the
service is available.
Parameters:
| Name | Type | Description |
|---|---|---|
timeout |
number | The maximum amount of time to wait for, if timeout is `undefined` or `< 0`, this will wait indefinitely. |
- Source:
Returns:
true if the service is available.
Type
Promise.<boolean>