Constructor
new Context()
Create a new instance in uninitialized state.
Call rcl.init(context) to initialize this context state for
use in creating nodes, etc.
- Source:
Members
handle
Get the handle referencing the internal context object. Do not modify it yourself: only pass it to *rclnodejs* functions!
- Source:
isOk
Check that the context is valid.
- Deprecated:
- since 0.18.0, Use Context.isValid()
- Source:
nodes
Access the nodes managed by this context.
- Source:
(static) instances
Access the list of usable (initialized/valid) contexts.
- Source:
Methods
isDefaultContext() → {boolean}
Test if this context is the default one.
- Source:
Returns:
whether this is the default context
- Type
- boolean
isInitialized() → {boolean}
Test if this context has been initialized, i.e., rcl.init(context),
and not shutdown.
- Source:
Returns:
True if context has been initialized; otherwise false
- Type
- boolean
isShutdown() → {boolean}
Test if this context has been shutdown, i.e., context.shutdown().
- Source:
Returns:
True if context has been shutdown; otherwise false
- Type
- boolean
isUninitialized() → {boolean}
Test if this context has not been initialized by rcl.init(context).
- Source:
Returns:
True if context has been initialized; otherwise false
- Type
- boolean
isValid() → {boolean}
Check that the context is in a usable state, i.e., it
has been initialized and not yet shutdown.
- Source:
Returns:
whether this context is (still) valid
- Type
- boolean
shutdown() → {undefined}
Shut down the context including destroying all nodes.
- Source:
Throws:
-
If there is a problem shutting down the context.
- Type
- Error
Returns:
- Type
- undefined
tryShutdown() → {undefined}
Try to shut down the context.
- Source:
Throws:
-
If there is a problem shutting down the context.
- Type
- Error
Returns:
- Type
- undefined
(static) defaultContext() → {Context}
Get the global default Context object.
- Source:
Returns:
The default Context
- Type
- Context