Constructor
class
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
member
domainId
Get the domain ID of this context.
- Source:
member
handle
Get the handle referencing the internal context object. Do not modify it yourself: only pass it to *rclnodejs* functions!
- Source:
member
isOk
Check that the context is valid.
- Deprecated:
- since 0.18.0, Use Context.isValid()
- Source:
member
nodes
Access the nodes managed by this context.
- Source:
member
(static) instances
Access the list of usable (initialized/valid) contexts.
- Source:
Methods
function
isDefaultContext() → {boolean}
Test if this context is the default one.
- Source:
Returns:
whether this is the default context
Type
boolean
function
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
function
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
function
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
function
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
function
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
function
tryShutdown() → {undefined}
Try to shut down the context.
- Source:
Throws:
If there is a problem shutting down the context.
Type
Error
Returns:
Type
undefined
function
(static) defaultContext() → {Context}
Get the global default Context object.
- Source:
Returns:
The default Context
Type
Context