ValuePoint API
Version: 1.0.0
Status:
ValuePoint interface for Thunder framework.
(Defined with IValuePoint in IValuePoint.h)
Table of Contents
Introduction
Scope
This document describes purpose and functionality of the ValuePoint interface (version 1.0.0). It includes detailed specification about its properties provided and notifications sent.
Case Sensitivity
All identifiers of the interfaces described in this document are case-sensitive. Thus, unless stated otherwise, all keywords, entities, properties, relations and actions should be treated as such.
Acronyms, Abbreviations and Terms
The table below provides and overview of acronyms used in this document and their definitions.
Acronym | Description |
---|---|
API | Application Programming Interface |
HTTP | Hypertext Transfer Protocol |
JSON | JavaScript Object Notation; a data interchange format |
JSON-RPC | A remote procedure call protocol encoded in JSON |
The table below provides and overview of terms and abbreviations used in this document and their definitions.
Term | Description |
---|---|
callsign | The name given to an instance of a plugin. One plugin can be instantiated multiple times, but each instance the instance name, callsign, must be unique. |
References
Ref ID | Description |
---|---|
HTTP | HTTP specification |
JSON-RPC | JSON-RPC 2.0 specification |
JSON | JSON specification |
Thunder | Thunder API Reference |
Description
ValuePoint JSON-RPC interface.
Properties
The following properties are provided by the ValuePoint interface:
ValuePoint interface properties:
Property | R/W | Description |
---|---|---|
identifier | read-only | Each IValuePoint instance has a unique identifier that identifies the instance |
bundle | read-only | If this IValuePoint belongs to a bundle that has multiple IValuePoints the id that identifies the bundle and the result will be Core::ERROR_NONE |
condition | read-only | Current state/condition of this IValuePoint |
type | read-only | Characteristics of this IValuePoint(IElement) |
minimum | read-only | The minimum value this IValuePoint(IElement) can reach |
maximum | read-only | The maximum value this IValuePoint(IElement) can reach |
value | read/write | The current value of this IValuePoint |
metadata | read-only | There most be more than meets the eye, report it as a JSON string |
identifier property
Provides access to the each IValuePoint instance has a unique identifier that identifies the instance. The value returned here return the unique ID of this IValuePoint.
This property is read-only.
Value
Name | Type | M/O | Description |
---|---|---|---|
(property) | integer | mandatory | Each IValuePoint instance has a unique identifier that identifies the instance. The value returned here return the unique ID of this IValuePoint |
Example
Get Request
{
"jsonrpc": "2.0",
"id": 42,
"method": "<callsign>.1.identifier"
}
Get Response
{
"jsonrpc": "2.0",
"id": 42,
"result": 0
}
bundle property
Provides access to the if this IValuePoint belongs to a bundle that has multiple IValuePoints the id that identifies the bundle and the result will be Core::ERROR_NONE. If it does not belong to a bundle, this call returns Core::ERROR_UNAVAILABLE,.
This property is read-only.
Value
Name | Type | M/O | Description |
---|---|---|---|
(property) | integer | mandatory | If this IValuePoint belongs to a bundle that has multiple IValuePoints the id that identifies the bundle and the result will be Core::ERROR_NONE. If it does not belong to a bundle, this call returns Core::ERROR_UNAVAILABLE, |
Example
Get Request
{
"jsonrpc": "2.0",
"id": 42,
"method": "<callsign>.1.bundle"
}
Get Response
{
"jsonrpc": "2.0",
"id": 42,
"result": 0
}
condition property
Provides access to the current state/condition of this IValuePoint.
This property is read-only.
Value
Name | Type | M/O | Description |
---|---|---|---|
(property) | string | mandatory | Current state/condition of this IValuePoint (must be one of the following: ACTIVATED, CONSTRUCTING, DEACTIVATED) |
Example
Get Request
{
"jsonrpc": "2.0",
"id": 42,
"method": "<callsign>.1.condition"
}
Get Response
{
"jsonrpc": "2.0",
"id": 42,
"result": "ACTIVATED"
}
type property
Provides access to the characteristics of this IValuePoint(IElement).
This property is read-only.
Value
Name | Type | M/O | Description |
---|---|---|---|
(property) | integer | mandatory | Characteristics of this IValuePoint(IElement) |
Example
Get Request
{
"jsonrpc": "2.0",
"id": 42,
"method": "<callsign>.1.type"
}
Get Response
{
"jsonrpc": "2.0",
"id": 42,
"result": 0
}
minimum property
Provides access to the the minimum value this IValuePoint(IElement) can reach.
This property is read-only.
Value
Name | Type | M/O | Description |
---|---|---|---|
(property) | integer | mandatory | The minimum value this IValuePoint(IElement) can reach |
Example
Get Request
{
"jsonrpc": "2.0",
"id": 42,
"method": "<callsign>.1.minimum"
}
Get Response
{
"jsonrpc": "2.0",
"id": 42,
"result": 0
}
maximum property
Provides access to the the maximum value this IValuePoint(IElement) can reach.
This property is read-only.
Value
Name | Type | M/O | Description |
---|---|---|---|
(property) | integer | mandatory | The maximum value this IValuePoint(IElement) can reach |
Example
Get Request
{
"jsonrpc": "2.0",
"id": 42,
"method": "<callsign>.1.maximum"
}
Get Response
{
"jsonrpc": "2.0",
"id": 42,
"result": 0
}
value property
Provides access to the the current value of this IValuePoint.
Value
Name | Type | M/O | Description |
---|---|---|---|
(property) | object | mandatory | The current value of this IValuePoint |
(property).value | integer | mandatory | ... |
Name | Type | M/O | Description |
---|---|---|---|
(property) | integer | mandatory | Represent the current value of this IValuePoint |
Example
Get Request
{
"jsonrpc": "2.0",
"id": 42,
"method": "<callsign>.1.value"
}
Get Response
{
"jsonrpc": "2.0",
"id": 42,
"result": 0
}
Set Request
{
"jsonrpc": "2.0",
"id": 42,
"method": "<callsign>.1.value",
"params": {
"value": 0
}
}
Set Response
{
"jsonrpc": "2.0",
"id": 42,
"result": "null"
}
metadata property
Provides access to the there most be more than meets the eye, report it as a JSON string.
This property is read-only.
Value
Name | Type | M/O | Description |
---|---|---|---|
(property) | string | mandatory | There most be more than meets the eye, report it as a JSON string |
Example
Get Request
{
"jsonrpc": "2.0",
"id": 42,
"method": "<callsign>.1.metadata"
}
Get Response
{
"jsonrpc": "2.0",
"id": 42,
"result": "..."
}
Notifications
Notifications are autonomous events triggered by the internals of the implementation and broadcasted via JSON-RPC to all registered observers. Refer to [Thunder] for information on how to register for a notification.
The following events are provided by the ValuePoint interface:
ValuePoint interface events:
Notification | Description |
---|---|
update | Signal event any change in value |
metadata | Signal event any change in Metadata |
update notification
Signal event any change in value.
Notification Parameters
Name | Type | M/O | Description |
---|---|---|---|
params | object | mandatory | ... |
params.id | integer | mandatory | Id of the value |
Example
Registration
{
"jsonrpc": "2.0",
"id": 42,
"method": "<callsign>.1.register",
"params": {
"event": "update",
"id": "myid"
}
}
Notification
{
"jsonrpc": "2.0",
"method": "myid.update",
"params": {
"id": 0
}
}
The client ID parameter is passed within the notification designator, i.e.
<client-id>.update
.
metadata notification
Signal event any change in Metadata.
Notification Parameters
Name | Type | M/O | Description |
---|---|---|---|
params | object | mandatory | ... |
params.id | integer | mandatory | Id of the Metadata |
Example
Registration
{
"jsonrpc": "2.0",
"id": 42,
"method": "<callsign>.1.register",
"params": {
"event": "metadata",
"id": "myid"
}
}
Notification
{
"jsonrpc": "2.0",
"method": "myid.metadata",
"params": {
"id": 0
}
}
The client ID parameter is passed within the notification designator, i.e.
<client-id>.metadata
.