#include <scripting_interface.hpp>
◆ ~ScriptContextInterface()
| virtual kanzi::connect::ScriptContextInterface::~ScriptContextInterface |
( |
| ) |
|
|
inlinevirtual |
◆ initialize()
Initialize the context.
- Returns
- true on success.
◆ registerScriptContextExtensions()
| virtual void kanzi::connect::ScriptContextInterface::registerScriptContextExtensions |
( |
| ) |
|
|
protectedpure virtual |
Extend the script context, relevant only for classes inheriting concrete implementations of API.
◆ registerService()
| virtual void kanzi::connect::ScriptContextInterface::registerService |
( |
const string & |
identifier, |
|
|
int |
sessionId |
|
) |
| |
|
inlinevirtual |
Register a service to be used within a script.
Registering a service to script context allows accessing its methods, events and runtime-data on a script using notation [ServiceIdentifier]:[method|event|runtimedata-name], e.g. "System:demo.range".
- Parameters
-
| identifier | An identifier of a service to be registered. |
| sessionId | Session identifier on SimpleConnectedClientSharedPtr |
◆ reset()
| virtual void kanzi::connect::ScriptContextInterface::reset |
( |
| ) |
|
|
pure virtual |
Release resources and context.
◆ runOnce()
Run a script.
- Parameters
-
| script | ECMAScript E5/E5.1 as a string. |
| service | A service to host the script. |
- Returns
- true if there is more work to do and script should keep running on further iterations.
◆ runScript()
Execute a script.
- Parameters
-
| description | Description of method arguments and return value. |
| message | Arguments for the method. |
| service | Attached service. |
- Returns
- Reply message according to method description or null pointer.
◆ unregisterService()
| virtual void kanzi::connect::ScriptContextInterface::unregisterService |
( |
const string & |
identifier | ) |
|
|
inlinevirtual |
Unregister a service.
- Parameters
-
| identifier | An identifier of a service to be unregistered. |
The documentation for this class was generated from the following file:
- connect/interface/scripting_interface.hpp