Resource Type: N/A
Reports the API version.
| Method | Description |
|---|---|
| read |
Reads the version resource. Example: read /version Example Response: {
"payload": {
"_links": {
"self": {
"href": "/version"
}
},
"apiVersion": "1.0.0"
},
"status": 1,
"type": "response"
}
|
Resource Type: N/A
| Item | Type | Schema | Description |
|---|---|---|---|
| runState | integer | readOnly, enum |
Running state of the system. Acceptable values are: 0 - Ready, 1 - Running, 2 - Conflict |
| autoStart | bool |
Determines if the system will auto start or not. When enabled, the system will automatically start as soon as the instance is launched. This could happen either on PC, when starting an instance, or when the device hosting the instance is booted.
|
|
| autoLiveSimEnabled | bool |
| Method | Description |
|---|---|
| read |
Reads the system properties. Example: read /system |
| update |
| Notification | |
|---|---|
| updated |
Occurs whenever the system properties change (i.e., sensor is started, stopped, etc.) Example: { "eventType": "updated", "path": "/system",
"content": {system properties} }
|
Resource Type: (Callable)
none
| Method | Description |
|---|---|
| call |
Starts the sensor system. Example: call /system/commands/start |
Resource Type: (Callable)
none
| Method | Description |
|---|---|
| call |
Stops the sensor system. Example: call /system/commands/stop |
Resource Type: (Callable)
| Method | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| call |
Start the upgrade with the provided package. Arguments:
Example: call /system/commands/upgrade {"skipValidation": false, "package": <binary data>}
or call /system/commands/upgrade {"skipValidation": false, "package": "upgradeFile.dat"}
A device restart may be required before using this resource to upgrade the device successfully. Changed in 1.0.x.x Use the Gocator Graphical User Interface to upgrade the device instead. |
Resource Type: (Callable)
none
| Method | Description |
|---|---|
| call |
Method Trait: (WearsFlash) (NoRestart) Factory restores the sensor configuration. Example: call /system/commands/factoryRestore
|
Resource Type: (Callable)
none
| Method | Description |
|---|---|
| call |
Performs a snapshot with the scanner. Example: call /system/commands/snapshot |
Resource Type: (Callable)
none
| Method | Description |
|---|---|
| call |
Performs a simulate with the scanner, which processes the last frame (if available) through the pipe. Example: call /system/commands/simulate |
Resource Type: (Callable)
| Method | Description | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| call |
Performs a backup operation based on the argument passed. If there is
no argument, then get all the files ie Jobs, workspace, global, replay
and support. Payload:
Response: The response for this transaction contains additional information besides the standard control message response fields.
Examples: To recreate what the GUI does during Maintenance > Backup: call /system/commands/archive {"contents": ["global", "allWorkspaces", "alljobs", "replay"]}
To recreate what the GUI does during Support > Download: call /system/commands/archive {"contents": ["global", "allWorkspaces", "alljobs", "replay", "support"]}
To recreate what the GUI does during Replay > Download: call /system/commands/archive {"contents": ["liveJob", "replay"]}
{
"status": 1,
"payload": {
"data": [ <binary data> ]
}
}
|
Resource Type: (Callable)
| Method | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| call |
Performs a restore operation based on the argument and the binary data passed. This will work only with both these fields present. Otherwise, it will return an error. Validation of data is also part of these resources. It means the contents filed are verified with the binary data passed. If any of the content field data is missing then the command will report an error. If contents are specified which are not in the provided archive, the request will fail. Note: Support data can not be restored.
To recreate what the GUI does during Maintenance > Restore: call /system/commands/restore {"data":{binary data}, contents": ["global", "allWorkspaces", "allJobs", "replay"]}
To recreate what the GUI does during Replay > Upload: call /system/commands/restore {"data":{binary data}, contents": ["liveJob", "replay"]}
|
Resource Type: N/A
| Item | Type | Schema | Description |
|---|---|---|---|
| version | string | readOnly |
Version of production build. This is based on the contents of AppInfo.xml. If there is no production build or AppInfo.xml file is missing then the default version is 0.0.0.0 |
| firesyncVersion | string | readOnly |
Version of underlying Firesync platform. |
| backendVersion | string | readOnly |
Version of the Gocator Backend firmware. |
| releaseType | string | readOnly |
Release type of production build. This is based on the contents of AppInfo.xml. Expected values are: "Beta" - If the build was built as a beta, or if AppInfo.xml is missing. "Release" - If the build was built as a release
If there is no production build or AppInfo.xml file is missing then the default release type is "Beta" |
| Method | Description |
|---|---|
| read |
This resource provides various additional information about the GoPxL application system and state. All properties in this resource are readonly and therefore only the read method is acceptable. Example: read /system/info |
Resource Type: N/A
Contains information about network interface configuration.
| Item | Type | Schema | Description |
|---|---|---|---|
| interfaces | array<interfacesInfo> | readOnly | An array of network interface objects. Will return readOnly if the interface cannot be updated. |
| interfaces/n/ | object | readOnly | Network interface object |
| interfaces/n/ipVersion | integer | readOnly | IP version. |
| interfaces/n/ipAddress | string | readOnly |
IP address. |
| interfaces/n/subnetMask | string | readOnly | subnet mask. |
| interfaces/n/gatewayAddress | string | readOnly |
Gateway IP |
| interfaces/n/dhcp | bool | readOnly |
IP auto configuration setting |
| Method | Description |
|---|---|
| read |
Read the ipConfig properties. Example: read /environ/ipConfig Example Response: {
"payload": {
"_links": {
"self": {
"href": "/environ/ipConfig"
}
},
"_schema": {
"properties": {
"interfaces": {
"items": [
{
"properties": {
"dhcp": {
"type": "boolean"
},
"gatewayAddress": {
"type": "string"
},
"ipAddress": {
"type": "string"
},
"ipVersion": {
"type": "integer"
},
"subnetMask": {
"type": "string"
}
},
"type": "object"
},
{
"properties": {
"dhcp": {
"type": "boolean"
},
"gatewayAddress": {
"type": "string"
},
"ipAddress": {
"type": "string"
},
"ipVersion": {
"type": "integer"
},
"subnetMask": {
"type": "string"
}
},
"type": "object"
},
{
"properties": {
"dhcp": {
"type": "boolean"
},
"gatewayAddress": {
"type": "string"
},
"ipAddress": {
"type": "string"
},
"ipVersion": {
"type": "integer"
},
"subnetMask": {
"type": "string"
}
},
"type": "object"
}
],
"type": "array"
}
},
"type": "object"
},
"interfaces": [
{
"dhcp": true,
"gatewayAddress": "0.0.0.0",
"ipAddress": "192.168.208.78",
"ipVersion": 4,
"subnetMask": "255.255.255.255"
},
{
"dhcp": true,
"gatewayAddress": "0.0.0.0",
"ipAddress": "10.0.0.178",
"ipVersion": 4,
"subnetMask": "255.255.255.0"
},
{
"dhcp": true,
"gatewayAddress": "0.0.0.0",
"ipAddress": "127.0.0.1",
"ipVersion": 4,
"subnetMask": "255.0.0.0"
}
]
},
"status": 1,
"type": "response"
}
|
| update |
Change the IP configuration of the system host (eg. Sensor or GoMax) Example: update /environ/ipConfig {"interfaces":[{"dhcp": true, "gatewayAddress": "0.0.0.0", "ipAddress": "90.23.29.25", "ipVersion": 4, "subnetMask": "255.255.0.0"}]}
Note: Only sensor network configuration can be updated. |
Resource Type: N/A
Contains information about runtime (application) types and controller types so that clients can learn about platform specific abilities of the GoPxL application instance they are connecting to. Only allowable method is "read", however this resource remains readable at all times - including when sensor is remote connected.
Changed in 1.0.x.x Resource added.
| Item | Type | Schema | Description |
|---|---|---|---|
| applicationType | integer |
enum, readOnly |
Enumeration of different application types:
Changed in 1.0.x.x Added. |
| controllerType | integer |
enum, readOnly |
Enumeration of different controller types:
Changed in 1.0.x.x Added. |
| partNumber | string | readOnly |
Model of the sensor. Changed in 1.0.x.x Added. |
| serialNumber | string | readOnly |
Unique serial number of a sensor. Changed in 1.0.x.x Added. |
| version | string | readOnly |
Version of the sensor firmware. Changed in 1.0.x.x Added. |
| model | string | readOnly |
Model name of the sensor. Changed in 1.0.x.x Added. |
| Method | Description |
|---|---|
| read |
{
"_links": {
"self": {
"href": "/api/environ/info"
}
},
"_schema": {
"properties": {
"applicationType": {
"readOnly": true,
"sortOrder": 0,
"title": "applicationType",
"type": "integer"
},
"controllerType": {
"readOnly": true,
"sortOrder": 1,
"title": "controllerType",
"type": "integer"
}
},
"sortOrder": 0,
"title": "",
"type": "object"
},
"applicationType": 2,
"controllerType": 1
}
|
Resource Type: N/A
Contains information about remote connection status as well as remote controller information including IP address, control port, and web port of the remote controller.
Changed in 1.0.x.x Resource Added.
| Item | Type | Schema | Description |
|---|---|---|---|
| remoteConnected | boolean |
readOnly |
Boolean of whether sensor is remote connected or not. |
| ipAddress | string |
readOnly |
IP Address of remote controller. |
| controlPort | integer | readOnly |
Control Port of remote controller. |
| webPort | integer | readOnly |
Web Port of remote controller. |
| Method | Description |
|---|---|
| read |
{
"_links": {
"self": {
"href": "/api/environ/remoteController"
}
},
"_schema": {
"properties": {
"controlPort": {
"readOnly": true,
"sortOrder": 200,
"title": "controlPort",
"type": "integer"
},
"ipAddress": {
"readOnly": true,
"sortOrder": 100,
"title": "ipAddress",
"type": "string"
},
"remoteConnected": {
"readOnly": true,
"sortOrder": 0,
"title": "remoteConnected",
"type": "boolean"
},
"webPort": {
"readOnly": true,
"sortOrder": 300,
"title": "webPort",
"type": "integer"
}
},
"sortOrder": 0,
"title": "",
"type": "object"
},
"controlPort": 0,
"ipAddress": "",
"remoteConnected": false,
"webPort": 0
}
|
Resource Type: (Collection - Unordered)
Contains a list of currently active problems that are updated on
start/simulate of the sensor. Note that this is not a
collection resource; it is a standard resource that contains an
array.
Problems are defined as anything that prevents the sensor from running
that the user is able to fix via configuration.
Problem messages will also be logged as a new Log entry in the /logs resource:
Each problem object follows the schema below:
| Item | Type | Schema | Description |
|---|---|---|---|
| msg | string | A message string describing the problem. | |
| severity | integer |
The severity of the problem that can be one of :
|
|
| source | string |
source of the problem. e.g., Pipe, Scanner, etc... |
| Method | Description |
|---|---|
| read |
Reads the current list of problems. Example: read /problems Example response {
"_links": {
"self": {
"href": "/api/problems"
}
},
"_schema": {
"properties": {
"msg": {
"type": "string"
},
"severity": {
"type": "integer"
},
"source": {
"type": "string"
}
},
"type": "object"
},
"items": [
{
"msg": "Data source required (at: ProfilePosition-0 tool[Profile Input]).",
"severity": 0,
"source": "Pipe"
}
]
}
|
| Event Type | Description |
|---|---|
| updated |
Occurs whenever the problems collection changes due to additions or deletions (or if all problems are resolved). Example: { "eventType": "updated", "path": "/problems",
"content": {updated /problems collection} }
|
Resource Type: N/A
ID: Auto-generated
A list of public logs. Note that this is not a collection resource; it is a resource that contains an array.
See /logs/summary for the first log id ("idStart" - see /logs/summary) and last log id ("idEnd" - see /logs/summary) which should be used to read logs.
Each log message has has common scheme elements listed below:
| Item | Type | Description |
|---|---|---|
| id | integer | ID of the log message. Unique. |
| level | integer |
Log level (warn, info, etc.)
|
| timestamp | integer | Timestamp of the message. This is the time elapsed since uptime in microseconds. |
| text | string | Locale specific log message. This message will be translated based on the system language. |
| Method | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| read |
Reads the /logs collection. Payload:
If either of these are out of the range [idStart, idEnd], kERROR_PARAMETER is thrown. If startId > endId, logs is empty. Examples: read /logs
read /logs {"startId": 1, "endId": 3}
|
Resource Type: (Callable)
Resource Type: N/A
| Attribute | Type | Description |
|---|---|---|
|
idStart |
integer | ID of the first available log |
|
idEnd |
integer | ID of the last available log |
| Method | Description |
|---|---|
| read |
Reads the /logs/summary information. Examples: read /logs/summary |
| Event Type | Description |
|---|---|
| updated |
Occurs whenever the log collection changes due to additions or deletions. Example: { "eventType": "updated", "path": "/logs/summary",
"content": {updated /logs idStart and idEnd} }
|
Resource Type: N/A
Represents some high-level job properties.
| Item | Type | Schema | Description |
|---|---|---|---|
| defaultJob | string | readOnly | Job ID (name) of the default job. |
| loadedJob | string | readOnly | Job ID (name) of the currently loaded job. |
| loadedJobDirty | bool | readOnly |
Boolean value indicating whether the currently loaded job contains unsaved data. |
| Method | Description |
|---|---|
| read |
Read high-level job information from the system. Examples: Read the high-level job information, and expands any embedded information such as /jobs/files resource within it. read /jobs { "expandLevel": -1 }
|
| Event Type | Description |
|---|---|
| updated |
Occurs whenever high-level job information changes, such as the default job, loaded job, and if the loaded job becomes dirty. The path indicates the /jobs resource. Example: { "eventType": "updated", "path": "/jobs",
"content": {updated jobs properties} }
|
Resource Type: (Callable)
| Method | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| call |
Loads the specified job. This becomes the loaded job, and is marked as clean to begin with. Arguments:
Example: To initiate a job from factory defaults: call /jobs/commands/load { "fromFactory": true }
call /jobs/commands/load { "name": "someJob" }
|
Resource Type: (Callable)
Methods
| Method | Description | ||||||
|---|---|---|---|---|---|---|---|
| call |
Method Trait: (WearsFlash)
Saves the current job to the
specified job name. If the job already exists it is overwritten. Arguments:
Example: call /jobs/commands/save { "name": "newJob" }
|
Resource Type: (Callable)
Methods
| Method | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| call |
Method Trait: (WearsFlash) Copies a job file under a new name. If the target name already exists, it is overwritten. Arguments:
Example: call /jobs/commands/copy { "sourceName": "job1",
"destName": "newJob1" }
A subsequent read upon /jobs/files will contain both /jobs/files/job1
and /jobs/files/newJob1 resources. |
Resource Type: (Callable)
| Method | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| call |
Method Trait: (WearsFlash) Renames a job file to another name. If the target name already
exists, it is overwritten. Arguments:
Example: call /jobs/commands/rename { "sourceName": "job1",
"destName": "renamedJob1" }
A subsequent read call on /jobs/files will no longer contain /jobs/files/job1 and will instead contain /jobs/files/renamedJob1 resource. |
Resource Type: (Callable)
| Method | Description | ||||||
|---|---|---|---|---|---|---|---|
| call |
Sets a job as the default job, which is loaded during application start. Arguments:
Example: call /jobs/commands/setDefault { "name": "defaultJob" }
|
Resource Type: (Collection - Unordered)
A collection of jobs within the system. Note that job names omit the ".job" extension.
| Method | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| read | Reads a list of job files. | |||||||||
| create |
Method Trait: (WearsFlash) Create a new job file, from uploaded content. Arguments:
Examples: create /jobs/files { "name": "newJob", "content": **binary content** }
|
| Event Type | Description |
|---|---|
| updated |
Occurs whenever the jobs collection changes. Unary additions and
deletions do not trigger this event. Example: { "eventType": "updated", "path": "/jobs/files",
"content": {updated /jobs/files collection} }
|
Resource Type: (CollectionItem)
ID: User-defined name
Represents the collection of job files. The parent resource can be queried to obtain a list of job files and their information.
Information about the job file specified by the ID, which is just the job name. This resource does not contain the contents of the job file (see next section).
Schema:
| Item | Type | Schema | Description |
|---|---|---|---|
| jobName | string | readOnly | Job name. |
| size | integer | readOnly | Size of the job file, in bytes. |
Methods
| Method | Description |
|---|---|
| read | Reads a specific job's properties. |
| delete |
Method Trait: (WearsFlash) Deletes a job files from the system. The path to the job name must be provided. If the job being deleted is the currently loaded job, then the loaded job is cleared and the job is set to dirty. Example: Delete a single job file: delete /jobs/files/myJob A special wildcard form applies to this delete method. The path of this jobs command can be wildcarded to delete all job files.
delete /jobs/files/*
|
| Event Type | Description |
|---|---|
| created |
Occurs whenever a job is created. The path indicates the new job id. Example: { "eventType": "created", "path": "/jobs/files/newJob",
"content": {new job properties} }
|
| updated |
Occurs whenever a job is updated (i.e., re-saved or overwritten with new content). The path indicates the job name that was updated. Example: { "content": {updated job properties}, "eventType": "updated", "path": "/jobs/files/updatedJob"}
|
| deleted |
Occurs whenever a job file is deleted. The path indicates the job name that was deleted. Example: { "eventType": "deleted", "path": "/jobs/files/deletedJob"}
|
Resource Type: (CollectionItem)
Represents the actual binary contents of the job file as a binary string, which can be read and updated.
| Item | Type | Description |
|---|---|---|
| content | binary | Contains the job data as raw binary. |
| Method | Description | ||||||
|---|---|---|---|---|---|---|---|
| read |
Reads a specific job's binary data. |
||||||
| update |
Method Trait: (WearsFlash) Updates a specific job's binary data. If the job being updated is the currently loaded job, then the loaded job is cleared and the job is set to dirty, to reflect that the current job no longer matches.
Examples: update /jobs/files/myJob/Data { "content": **binary content** }
|
Although this resource does not raise any event notifications of its own, changes to the binary data will raise event notifications on its parent – see /jobs/files/(id) -- Notifications.
Resource Type: N/A
Contains replay settings and state.
| Item | Type | Schema | Description |
|---|---|---|---|
| frameCount | integer | readOnly, minimum | The number of frames currently recorded. |
| memoryUsed | integer | readOnly, minimum | The amount of memory used by the recorded data (bytes). |
| memoryCapacity | integer | readOnly, minimum | The total amount of memory available for recording (bytes). |
| frameIndex | integer | readOnly, minimum | The frame index of the current playback cursor. |
| frameTime | integer | readOnly, minimum | The frame timestamp at the current playback cursor. 0 if the index is invalid. |
| Method | Description |
|---|---|
| read |
Reads the replay properties. |
| Notification | |
|---|---|
| updated |
Occurs whenever the properties change, e.g., when the frame count or
frame index changes. The server may throttle the update rate to avoid
notification spam. |
Resource Type: N/A
Contains the properties of the buffer data, most of the common buffer info is contained within /replay and some discussion should be had on whether to move some of the properties here.
| Item | Type | Schema | Description |
|---|---|---|---|
| displayName | culture-specific string | User configurable display name of the replay buffer. |
| Method | Description |
|---|---|
| read | Reads the current replay buffer properties |
| update | Updates the replay buffer properties |
Resource Type: N/A
A streamable binary resource that can be used to download and upload replay buffer data.
| Item | Type | Schema | Description |
|---|---|---|---|
| data | binary | The replay buffer in binary form |
| Method | Description |
|---|---|
| read | Reads the current replay buffer to be downloaded |
| update | Updates the replay buffer with a replay buffer provided by the client |
Resource Type: (Collection - Unordered)
A collection of replay
tracks.
Each "track" typically represents a stream of synchronized data,
captured from a single source (e.g., scanner).
| Method | Description |
|---|---|
| read |
Read all tracks from the replay module. Example: read /replay/tracks Example Response: {
"payload": {
"_embedded": {
"item": [
{
"_links": {
"self": {
"href": "/replay/tracks/0"
}
}
},
{
"_links": {
"self": {
"href": "/replay/tracks/1"
}
}
}
]
},
"_links": {
"self": {
"href": "/replay/tracks"
}
}
},
"status": 1,
"type": "response"
|
None.
Resource Type: (CollectionItem)
ID: Auto generated.
A track object.
|
Item |
Type |
Schema |
Description |
|---|---|---|---|
| id | string | readOnly | The ID within the collection (e.g., "0"). |
| displayName | culture-specific string | readOnly | Display name of the track. |
| engineId | string | readOnly | The ID of the scan engine, defined by scan engine plugin. e.g., "g2xxx", "test". |
| scannerId | string | readOnly | The scanner ID configured in scan engine. |
|
Method |
Description |
|---|---|
| read |
Reads the resource. Returns the properties of track. Example: read /replay/tracks/0
Example Response: {
"payload": {
"_embedded": {
"channels": [
{
"_links": {
"self": {
"href": "/replay/tracks/0/channels/0"
}
}
},
{
"_links": {
"self": {
"href": "/replay/tracks/0/channels/1"
}
}
}
]
},
"_links": {
"self": {
"href": "/replay/tracks/0"
}
},
"displayName": "New Scanner 1",
"engineId": "test",
"scannerId": "0"
},
"status": 1,
"type": "response"
}
|
None.
Resource Type: (Collection - Unordered)
A collection of replay channels. Channels usually represent the scanners and tool outputs, all associated to the same track.
| Method | Description |
|---|---|
| read |
Read all channels from the corresponding track. Example: read /replay/tracks/0/channels
Example Response: {
"payload": {
"_embedded": {
"item": [
{
"_links": {
"self": {
"href": "/replay/tracks/0/channels/0"
}
}
},
{
"_links": {
"self": {
"href": "/replay/tracks/0/channels/1"
}
}
}
]
},
"_links": {
"self": {
"href": "/replay/tracks/0/channels"
}
}
},
"status": 1,
"type": "response"
}
|
None.
Resource Type: (CollectionItem)
ID: Auto generated.
A channel object.
|
Item |
Type |
Schema |
Description |
|---|---|---|---|
| id | string | readOnly | The ID within the collection (e.g., "0"). |
| dataSourceId | string | readOnly | Pipe Id of added datasource. |
| displayName | culture-specific string | readOnly | Display name of the added datasource. |
| priority | int | readOnly | Priority of the recorded output as an unsigned 32-bit integer. Highest priority being 1 and 0 being undefined priority which will always be last.. |
|
Method |
Description |
|---|---|
| read |
Reads the resource. Returns the properties of channel added to track. Example: read /replay/tracks/0/channels/0
Example Response: {
"payload": {
"_links": {
"self": {
"href": "/replay/tracks/0/channels/1"
}
},
"dataSourceId": "scan:test:0:Stamp",
"displayName": "New Scanner 1: Stamp Output"
},
"status": 1,
"type": "response"
}
|
None.
Resource Type: N/A
Contains playback settings.
| Item | Type | Schema | Description |
|---|---|---|---|
| enabled | bool | Enables playback. When this is set to true, the system immediately disables scanner outputs and enables outputs from the replay system. When set to false, the outputs are reverted. | |
| loopEnabled | bool | Enables automatic looping of the data. | |
| mode | integer | enum |
Playback mode:
|
| speedFactor | number | A multiplier to the actual frame rate when using mode is 1. e.g., at 1.0, the playback is at the original speed, while with 10.0, the playback occurs 10 times faster, and 0.1, 10 times slower. | |
| frameRate | number | The fixed frame rate to use when mode is 2; |
| Method | Description |
|---|---|
| read |
Reads the playback settings. |
| update | Updates the playback settings. |
| Notification | |
|---|---|
| updated |
Occurs whenever the properties change. |
Resource Type: N/A
Contains recording settings.
| Item | Type | Schema | Description |
|---|---|---|---|
| enabled | bool |
Enables recording. When recording is enabled, live data is recorded into the buffer. If playback is also enabled, recording is implicitly disabled. |
|
| filtering | ReplayFiltering | Replay filtering settings. This is work in progress and should not be used. |
| Method | Description |
|---|---|
| read |
Reads the playback settings. |
| update | Updates the playback settings. |
| Notification | |
|---|---|
| updated |
Occurs whenever the properties change. |
Resource Type: (Callable)
Seeks to a specified position in the buffer. The data at the position is simulated.
Parameters:
| Item | Type | Schema | Description |
|---|---|---|---|
| positionDomain | integer | enum |
The "domain" of the position parameter:
|
| position | integer | The position to seek to. The meaning depends on positionDomain. |
| Method | Description |
|---|---|
| call |
Invokes the command. |
Resource Type: (Callable)
Starts playback and automatically stops at the specified position.
Parameters:
| Item | Type | Schema | Keywords | Description |
|---|---|---|---|---|
| positionDomain | integer | enum |
The "domain" of the position parameter:
|
|
| position | integer | The position to play to. The meaning depends on positionDomain. |
| Method | Description |
|---|---|
| call |
Invokes the command. |
Resource Type: (Callable)
Clears the replay buffer.
| Method | Description |
|---|---|
| call |
Invokes the command. |
Resource Type: (Collection - Unordered)
ID: auto-generated
A collection of data sources, which may come from tools, scan engines or the replay engine.
| Method | Description |
|---|---|
| read |
Returns the array of data sources. Example: read /dataSources |
| Notification | Description |
|---|---|
| embeddedUpdated |
Occurs whenever the dataSource collection changes due to additions, deletions, or moves/reorders during a job load. Changed in 1.0.x.xExample: { "eventType": "embeddedUpdated", "path": "/dataSources" }
|
ID: auto generated when a data source is added (can be from an tool or scanner output or any other type of pipe output that might be added later).
All items have the following schema:
| Item | Type | Schema | Keywords | Description |
|---|---|---|---|---|
| id | string | readOnly |
An ID of the corresponding data source. Examples:
These (as with any ID) should be treated as opaque strings. For convenience, they are picked by the system to reflect their underlying scanner or tool output, but this should not be relied upon by clients. It is possible that the format of these ID's may change in later versions of the application. A client should never parse this (or any) ID. |
|
| dataFormat | DataFormat | readOnly |
The data format of the output. See Common
Types. |
|
| displayName | culture-specific string |
The display name of the data source. It is the result of the concatenated display names of the scanner or tool, and its output. Examples:
|
Note all the above fields are read-only in the sense that clients can not change them by updating them on the dataSource resource directly. However, this does not mean they never change. For example, the display name may change if the underlying tool or scanner output's display name changes.
| Method | Description |
|---|---|
| read |
Read a specific dataSource. Example: read /dataSources/gocator:scanner-0:top:profile read /dataSources/tools:TestForward-0:output:Output0 |
| Event Type | Description |
|---|---|
| created |
Occurs whenever a datasource output (eg. from scanners or tools ) is
added. The path indicates the new data source output id. Example: { "eventType": "created", "path": "/dataSources/tools:TestForward-0:outputs:Output0",
"content": {new display source output properties} }
|
| updated |
Occurs whenever a datasource output (eg. from scanners or tools ) is updated. The path indicates the data source output id that was deleted. Example: { "eventType": "updated", "path": "path": "/dataSources/tools:TestForward-0:outputs:Output0",
"content": {display source output properties} }
|
| deleted |
Occurs whenever a datasource (eg. scanner or tool output) is deleted or gets disabled.. The path indicates the data source output id that was deleted. Example: { "eventType": "deleted", "path": "path": "/dataSources/tools:TestForward-0:outputs:Output0" }
|
Resource Type: N/A
Access the data for the dataSource. This resource can only be streamed.
Properties on this resource follow those documented for all Streamable resources here
Below, data is documented to specify that the "data" property is specifically a binary type.
|
Item |
Type |
Schema |
Description |
|---|---|---|---|
| data | binary | readOnly |
The binary data for the dataSource. Data streamed to the client from this resource will be formatted according to the serialization structures documented on Message Serialization Not all fields documented on the Message Serialization page apply when streaming. Any exceptions are noted on that page. |
| Method | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| stream |
Streams data from a specific dataSource. Arguments:
Example: stream /dataSources/gocator:scanner-0:top:profile/data
stream /dataSources/tools:TestForward-0:outputs:Output0/data {"period": 250000}
stream /dataSources/tools:TestForward-0:outputs:Output0/data {"streamLastFrame":true}
|
This section describes the general protocol definition of the scan resource, applying to all scan engines. This information can be used to implement a generic client that works with any scanners, Gocator or 3rd party.
Resource Type: N/A
Contains information about sensors discovered across all scan engines. All properties on this resource are read-only.
| Item | Type | Schema | Description |
|---|---|---|---|
| sensors | array | readOnly | Collection of visible sensor objects |
| sensors/n | object | readOnly | Visible sensor object |
| sensors/n/connectionMessage | culture-specific string | readOnly |
Describes some details about the error if the connection state is an error. Can be empty. The scan engine is not obligated to provide this. |
| sensors/n/connectionStatus | integer | readonly |
Connection state of the sensor.
|
| sensors/n/engineId | string | readOnly | Identifier of the scan engine, defined by scan engine plugin. e.g., "g2xxx". |
| sensors/n/isLocal | bool | readOnly | True if the sensor is local to the application (e.g., running on the sensor). False if the sensor is remote. |
| sensors/n/model | string | readOnly | Model of the sensor. Can be empty if the scan engine does not support discovering the model. |
| sensors/n/parameters | object | readOnly | Additional parameters depending on the scan engine. |
| sensors/n/serialNumber | string | readOnly | A string that uniquely identifies the sensor.
Serial numbers need not be strictly numerical. They may contain letters and and other typographic characters. For a Gocator sensor, it is the typically-numeric serial number represented as a string. |
| sensors/n/version | string | readOnly | Version of the sensor firmware. Can be empty if the scan engine does not support discovering the version. |
| Method | Description |
|---|---|
| read |
Reads the list of visible sensors, across all scan engines. Example response: {
"sensors": [
{
"connectionMessage": "",
"connectionStatus": 0,
"engineId": "g2xxx",
"isLocal": false,
"model": "2330",
"parameters": {
"ipAddress": "90.23.50.45",
"optionCode": 1
},
"serialNumber": "45045",
"version": "1.0.0.0"
},
{
"connectionMessage": "",
"connectionStatus": 0,
"engineId": "g5xxx",
"isLocal": false,
"model": "5512",
"parameters": {
"ipAddress": "90.55.52.68",
"optionCode": 1
},
"serialNumber": "55268",
"version": "1.0.0.0"
},
]
}
|
| Notification | |
|---|---|
| updated |
Occurs when the visible sensors for any scan engine changes. The path indicates the overall visible sensors list. Example notification: { "eventType": "updated", "path": "/scan/visibleSensors" }
|
Resource Type: (Collection - Unordered)
A collection of scan engines.
NOTE: The list of scan engines is determined by the available scan
engines loaded in the system.
Engines cannot be created or deleted directly via the protocol.
| Method | Description |
|---|---|
| read |
Reads all scan engines, the list of scan engines are returned as embedded items. Example response: {
"_embedded": {
"item": [
{
"_links": {
"self": {
"href": "/scan/engines/g2xxx"
}
}
},
{
"_links": {
"self": {
"href": "/scan/engines/g3xxx"
}
}
},
{
"_links": {
"self": {
"href": "/scan/engines/g5xxx"
}
}
},
{
"_links": {
"self": {
"href": "/scan/engines/test"
}
}
}
]
},
"_links": {
"self": {
"href": "/scan/engines"
}
}
}
|
None (as engines cannot be created or deleted directly via the protocol).
Resource Type: (CollectionItem)
A scan engine object.
| Item | Type | Schema | Description |
|---|---|---|---|
| displayName | culture-specific string | readOnly |
Display name of the engine, e.g., "Gocator Laser Profiler". |
| id | string | readOnly | Identifier of the scan engine, defined by scan engine plugin. e.g. "g2xxx". |
| maxSensorCount | readOnly, minimum, used | integer |
Max sensor count. Changed in 1.0.x.x Added. |
| Method | Description |
|---|---|
| read |
Reads a specific scan engine. Example response: {
"_links": {
"self": {
"href": "/scan/engines/g2xxx"
}
},
"displayName": "Gocator Laser Profiler",
"id": "g2xxx",
"maxSensorCount": 31
}
|
None (as engines cannot be created or deleted directly via the protocol).
Resource Type: N/A
Contains information about sensors discovered by a specific scan engine. All properties on this resource are read-only.
The format of this resource is identical to the format of Scanner Resources#/scan/visibleSensors except that it filters for only those sensors which are applicable to this scanEngine.
| Item | Type | Schema | Description |
|---|---|---|---|
| connectionMessage | string | readOnly |
Describes some details about the error if the connection state is an error. Can be empty. The scan engine is not obligated to provide this. |
| connectionStatus | integer | readonly |
Connection state of the sensor.
|
| engineId | string | readOnly | Identifier of the scan engine, defined by scan engine plugin. e.g., "g2xxx". |
| isLocal | bool | readOnly | True if the sensor is local to the application (e.g., running on the sensor). False if the sensor is remote. |
| model | string | readOnly | Model of the sensor. Can be empty if the scan engine does not support discovering the model. |
| parameters | object | readOnly | Additional parameters depending on the scan engine. |
| serialNumber | string | readOnly | A string that uniquely identifies the sensor.
Serial numbers need not be strictly numerical. They may contain letters and and other typographic characters. For a Gocator sensor, it is the serial number represented as a string. |
| version | string | readOnly | Version of the sensor firmware. Can be empty if the scan engine does not support discovering the version. |
Methods
| Method | Description |
|---|---|
| read |
Reads the list of visible sensors, for a specific scan engine. Example response: {
"sensors": [
{
"connectionMessage": "",
"connectionStatus": 0,
"engineId": "g2xxx",
"isLocal": false,
"model": "2330",
"parameters": {
"ipAddress": "90.23.50.45",
"optionCode": 1
},
"serialNumber": "45045",
"version": "1.0.0.0"
},
{
"connectionMessage": "",
"connectionStatus": 0,
"engineId": "g2xxx",
"isLocal": false,
"model": "2340",
"parameters": {
"ipAddress": "90.23.50.46",
"optionCode": 1
},
"serialNumber": "45046",
"version": "1.0.0.0"
},
]
}
|
| Notification | |
|---|---|
| updated |
Occurs when the visible sensors for a specific scan engine changes. The path indicates the specific scan engine's visible sensors list. Example notification: { "eventType": "updated", "path": "/scan/engines/g2xxx/visibleSensors" }
|
Resource Type: (Collection - Unordered)
A collection of scanners under the engine.
| Item | Type | Schema | Description |
|---|---|---|---|
| creationParams | object | readOnly | Custom scanner creation parameters, specific to the scan engine. |
| Method | Description |
|---|---|
| read |
Reads all scanners under the engine; the list of scanners are returned as embedded items. Example response: {
"_embedded": {
"item": [
{
"_links": {
"self": {
"href": "/scan/engines/g2xxx/scanners/scanner-0"
}
}
}
]
},
"_links": {
"self": {
"href": "/scan/engines/g2xxx/scanners"
}
},
"creationParams": {
"defaultSerialNumber": 0
}
}
|
| create |
Creates a scanner resource. Example request: create /scan/engines/g2xxx/scanners {"defaultSerialNumber": 12345}
|
| Event Type | Description |
|---|---|
| created |
Occurs when a new scanner is added. The path indicates the new scanner id. Example notification: { "eventType": "created", "path": "/scan/engines/g2xxx/scanners/scanner-0"}
|
| updated |
Occurs when a scanner's properties change. The path indicates the affected scanner id. Example notification: { "eventType": "updated", "path": "/scan/engines/g2xxx/scanners/scanner-0" }
|
| deleted |
Occurs when a scanner is deleted. The path indicates the scanner id that was deleted. Example notification: { "eventType": "deleted", "path": "/scan/engines/g2xxx/scanners/scanner-0" }
|
Resource Type: (CollectionItem)
ID: Auto generated when scanners are added.
A scanner object.
| Item | Type | Schema | Description |
|---|---|---|---|
| displayName | culture-specific string | User configurable display name of the scanner. | |
| id | string | readOnly | The identifier of the scanner within the collection (e.g., "scanner-0"). |
| parameters | object | Scanner parameters that vary depending on the scan engine. |
| Method | Description | ||||||
|---|---|---|---|---|---|---|---|
| read |
Reads the scanner resource. Example response: {
"_embedded": {
"go:content": [ // see /scan/engines/(engineId)/scanners/(scannerId)/(contentId)
{
"_links": {
"self": {
"href": "/scan/engines/g2xxx/scanners/scanner-0/alignment"
}
}
},
{
"_links": {
"self": {
"href": "/scan/engines/g2xxx/scanners/scanner-0/layout"
}
}
}
],
"go:output": [ // see /scan/engines/(engineId)/scanners/(scannerId)/outputs
{
"_links": {
"self": {
"href": "/scan/engines/g2xxx/scanners/scanner-0/outputs/sensor-0:profile"
}
}
},
{
"_links": {
"self": {
"href": "/scan/engines/g2xxx/scanners/scanner-0/outputs/stamp"
}
}
},
{
"_links": {
"self": {
"href": "/scan/engines/g2xxx/scanners/scanner-0/outputs/top:profile"
}
}
}
],
"go:sensor": [ // see /scan/engines/(engineId)/scanners/(scannerId)/sensors
{
"_links": {
"self": {
"href": "/scan/engines/g2xxx/scanners/scanner-0/sensors/sensor-0"
}
}
},
{
"_links": {
"self": {
"href": "/scan/engines/g2xxx/scanners/scanner-0/sensors/sensor-1"
}
}
}
]
},
"_links": {
"go:action": [ // see /scan/engines/(engineId)/scanners/(scannerId)/actions
{
"href": "/scan/engines/g2xxx/scanners/scanner-0/actions/autoLayout"
},
{
"href": "/scan/engines/g2xxx/scanners/scanner-0/actions/trigger"
}
],
"self": {
"href": "/scan/engines/g2xxx/scanners/scanner-0"
}
},
"displayName": "Gocator 0",
"id": "scanner-0",
"parameters": {
// scan-engine-specific scanner parameters
}
}
|
||||||
| update |
Updates the scanner resource. Arguments:
Example request: update /scan/engines/g2xxx/scanners/scanner-0 { "parameters": { "uniformSpacingEnabled": true } }
|
||||||
| delete |
Deletes the scanner resource. Example request: delete /scan/engines/g2xxx/scanners/scanner-0 |
| Notification | |
|---|---|
| created |
Occurs when a scanner is created. The path indicates the affected scanner. Example notification: { "eventType": "created", "path": "/scan/engines/g2xxx/scanners/scanner-0"}
|
| updated |
Occurs when a scanner's properties change. The path indicates the affected scanner. Example notification: { "eventType": "updated", "path": "/scan/engines/g2xxx/scanners/scanner-0"}
|
| deleted |
Occurs when a scanner resource has been deleted. The path indicates the affected scanner. Example notification: { "eventType": "deleted", "path": "/scan/engines/g2xxx/scanners/scanner-0"}
|
Resource Type: (Collection - Unordered)
The resource pertaining to alignment state & configuration.
| Item | Type | Schema | Description |
|---|---|---|---|
| alignState | enum | readOnly | Alignment state of the scanner. 0 = Not Aligned, 1 = Aligned, 2 = Aligning. |
| alignConfig | object | Alignment configuration. Configurations will vary between scanner types. See scanner-specific documentation for details. |
| Method | Description |
|---|---|
| read |
Returns the alignment state & config. Example response: {
"payload": {
"alignState": 0,
"alignConfig": {
"timeout": 120
}
},
"status": 1,
"type": "response"
}
|
| update |
Update the alignment configuration. The state is read-only and cannot be updated. update /scan/engines/g2xxx/scanners/scanner-0/alignment { "alignConfig": { "timeout": 90 } }
|
| Notification | |
|---|---|
| updated |
Occurs when the alignment configuration is updated or the alignment state changes. { "eventType": "updated", "path": "/scan/engines/g2xxx/scanners/scanner-0/alignment"}
|
Resource Type: (Collection - Unordered)
The resource pertaining to alignment transforms.
The contents of this resource are entirely up to the scanner type. Scanner-wide transforms will reside here. Sensor-specific transforms will reside in the sensor's transform resource.
See scanner-specific documentation for details.
| Method | Description |
|---|---|
| read |
Returns the alignment transforms. Example response: {
"payload": {
"_links": {
"self": {
"href": "/scan/engines/g2xxx/scanners/scanner-0/transform"
}
},
"encoderResolution": 1.0,
"speed": 100.0,
"transform": {
"xAngle": 0.0,
"xOffset": 0.0,
"yAngle": 0.0,
"yOffset": 0.0,
"zAngle": 0.0,
"zOffset": 0.0
}
},
"status": 1,
"type": "response"
}
|
| update |
Update the alignment transforms manually. This will not change the scanner's alignment state. update /scan/engines/g2xxx/scanners/scanner-0/transform { "transform": { "xAngle": -2.1} }
|
| Notification | |
|---|---|
| updated |
Occurs when the alignment configuration is updated or the alignment state changes. { "eventType": "updated", "path": "/scan/engines/g2xxx/scanners/scanner-0/alignment"}
|
Resource Type: (Collection - Unordered)
Resource Type: (Streamable)
Metrics for a given scanner. Each scanner type will have its own set of metrics.
This section does not describe metrics unique to Gocator or any of its scan engines. That information can be found through Standard Scanner Resources.
Methods
| Method | Description |
|---|---|
| read |
Reads the latest scanner metrics. Example: read /scan/engines/g2xxx/scanners/scanner-0/metrics which for example, returns: {
"payload": {
"_links": {
"self": {
"href": "/scan/engines/g2xxx/scanners/scanner-0/metrics"
}
},
"advanced": {
"overSpeedJitterCount": -9223372036854775808,
"overSpeedJitterMax": -1.7976931348623157e+308
},
"encoderFreq": 0,
"encoderValue": 0,
"g2Scanner": {},
"maxSpeed": 208.55397148676172,
"scanCount": -9223372036854775808,
"scannerDrops": 0,
"speed": -1.7976931348623157e+308,
"triggerDrops": 0
},
"status": 1,
"type": "response"
}
|
| stream |
Receive continuous stream of scanner metrics. Example: stream /scan/engines/g2xxx/scanners/scanner-0/metrics |
| cancelStream |
Cancel continuous stream of scanner metrics. Example: cancelStream /scan/engines/g2xxx/scanners/scanner-0/metrics |
Resource Type: (Collection - Unordered)
A collection of scanner outputs.
| Method | Description |
|---|---|
| read |
Returns the list of scanner outputs as embedded resources. Example response: {
"payload": {
"_embedded": {
"item": [
{
"_links": {
"self": {
"href": "/scan/engines/g2xxx/scanners/scanner-0/outputs/sensor-0:profile"
}
}
},
{
"_links": {
"self": {
"href": "/scan/engines/g2xxx/scanners/scanner-0/outputs/stamp"
}
}
},
{
"_links": {
"self": {
"href": "/scan/engines/g2xxx/scanners/scanner-0/outputs/top:profile"
}
}
}
]
},
"_links": {
"self": {
"href": "/scan/engines/g2xxx/scanners/scanner-0/outputs"
}
}
},
"status": 1,
"type": "response"
}
|
Resource Type: (CollectionItem)
ID: Predefined by scan engine.
A scanner output object.
| Item | Type | Schema | Description |
|---|---|---|---|
| dataFormat | object | readOnly | Data format of the output |
| dataSourceId | string | readOnly | The data source id ( i.e. "scan:g2xxx:scanner-0:top:surface") |
| displayName | culture-specific string | User configurable display name of the scanner output. | |
| enabled | bool | Whether the scanner output is enabled or not. | |
| id | string | readOnly | Identifier of the scanner output. |
| recordingEnabled | bool | Whether the output should be recorded or not. | |
| priority | integer | readOnly |
Priority of the scanner output as an unsigned 32-bit integer. Highest priority being 1 and 0 being undefined priority which will always be last. Changed in 0.3.x.x |
| Method | Description |
|---|---|
| read |
Returns the output parameters described above. Example response: {
"_links": {
"self": {
"href": "/scan/engines/g2xxx/scanners/scanner-0/outputs/stamp"
}
},
"dataFormat": {
"arrayed": false,
"type": 8
},
"dataSourceId": "scan:g2xxx:scanner-0:stamp",
"displayName": "Stamp",
"enabled": true,
"id": "stamp",
"recordingEnabled": true
}
|
| Update | updates the output resource. |
| Event Type | Description |
|---|---|
| created |
Occurs when a new output is added. The path indicates the new scanner output. Example: { "eventType": "created", "path": "/scan/engines/g2xxx/scanners/scanner-0/sensors/sensor-0/top:surface"}
|
| updated |
Occurs when a scanner output's properties change. The path indicates the affected scanner output. Example: { "eventType": "updated", "path": "/scan/engines/g2xxx/scanners/scanner-0/sensors/sensor-0/stamp" }
|
| deleted |
Occurs when a scanner output is deleted. The path indicates the scanner output that was deleted. Example: { "eventType": "deleted", "path": "/scan/engines/g2xxx/scanners/scanner-0/sensors/sensor-0/top:surface" }
|
Resource Type: (CollectionItem)
ID: Predefined by scan engine.
Custom scanner content resource defined by the scan engine. The format is a ParamSet object.
| Method | Description |
|---|---|
| read |
Reads scanner custom content. Example request: read /scan/engines/g2xxx/scanners/scanner-0/layout Example response: {
"_links": {
"self": {
"href": "/scan/engines/g2xxx/scanners/scanner-0/layout"
}
},
"grid": {
// ...
}
}
|
| update |
Updates the custom scanner content resource. Example request: update /scan/engines/g2xxx/scanners/scanner-0/layout {...}
|
| Notification | Description |
|---|---|
| updated |
Occurs when the custom scanner content resource changes. Example notification: { "eventType": "updated", "path": "/scan/engines/g2xxx/scanners/scanner-0/sensors/sensor-0/layout" }
|
Resource Type: (Callable)
Aligns the scanner according to configurations defined in the /alignment resource.
| Method | Description | ||||||
|---|---|---|---|---|---|---|---|
| call |
Changed in 1.0.x.x Aligns the scanner. Arguments:
Example request: call /scan/engines/g2xxx/scanners/scanner-0/commands/align {"interactive":false}
|
None.
Resource Type: (Callable)
Cancels running scanner alignment. If alignment is not running, does nothing.
| Method | Description |
|---|---|
| call |
Changed in 1.0.x.x Cancels scanner alignment. Example request call /scan/engines/g2xxx/scanners/scanner-0/commands/cancelAlign |
None.
Resource Type: (Callable)
Clears existing alignment. If alignment is running, cancels then clears.
| Method | Description |
|---|---|
| call |
Clears scanner alignment. Example request call /scan/engines/g2xxx/scanners/scanner-0/commands/clearAlign |
None.
Resource Type: (CollectionItem)
A collection of scanner actions defined by the scan engine.
| Method | Description |
|---|---|
| read |
Returns a list of custom scanner actions as embedded resources. Example request: read /scan/engines/engineId/scanners/scannerId/actions Example response: {
"_embedded": {
"item": [
{
"_links": {
"self": {
"href": "/scan/engines/engineId/scanners/scannerId/actions/sampleAction"
}
}
}
]
},
]
},
"_links": {
"self": {
"href": "/scan/engines/engineId/scanners/scannerId/actions"
}
}
}
|
None.
Resource Type: (CollectionItem, Callable)
ID: Predefined by scan engine.
A custom scanner callable action. It can also be read to obtain information about the action.
| Item | Type | Schema | Description |
|---|---|---|---|
| parameters | object | readOnly |
Describes the parameters that the custom
scanner action takes. |
| Method | Description |
|---|---|
| read |
Reads the scanner custom action resource. Example request: read /scan/engines/engineId/scanners/scannerId/actions/sampleAction Example response: {
"_links": {
"self": {
"href": "/scan/engines/engineId/scanners/scannerId/actions/sampleAction"
}
},
"_schema": {
"parameters": {
"properties": {
"arg1": {
"type": "string",
"title": "Argument 1"
}
}
}
},
"id": "trigger",
"parameters": {
"arg1": "default value"
}
}
|
| call |
Calls the action resource. Example request: call /scan/engines/engineId/scanners/scannerId/actions/sampleAction {arg1: "user value"}
|
None.
Resource Type: (Collection - Unordered)
A collection of sensors under the scanner.
| Item | Type | Schema | Description |
|---|---|---|---|
| creationParams | object | readOnly | Custom sensor creation parameters, specific to the scan engine. |
| Method | Description |
|---|---|
| read |
Reads all sensors under the scanner; the list of sensors are returned as embedded items. {
"_embedded": {
"item": [
{
"_links": {
"self": {
"href": "/scan/engines/g2xxx/scanners/scanner-0/sensors/sensor-0"
}
}
},
{
"_links": {
"self": {
"href": "/scan/engines/g2xxx/scanners/scanner-0/sensors/sensor-1"
}
}
}
] },
"_links": {
"self": {
"href": "/scan/engines/g2xxx/scanners/scanner-0/sensors"
}
},
"creationParams": {
"serialNumber": 0
}
},
}
|
| create |
Method Trait: (NoRestart)
System will not be restarted when adding
sensors. This applies if a scanner already has sensors and is already
running. After the addition of a sensor to the scanner, the system will
remain in stopped state. Example request: create /scan/engines/g2xxx/scanners/scanner-0/sensors {"serialNumber": 12345}
|
None.
Resource Type: (CollectionItem)
ID: Auto generated when sensors are added.
A sensor object.
| Item | Type | Schema | Description |
|---|---|---|---|
| displayName | culture-specific string | User configurable display name of the sensor. | |
| id | string | readOnly | Identifier of the sensor within the collection (e.g., "sensor-0"). |
| parameters | object | Additional parameters depending on the scan engine. | |
| connectionMessage | string | readonly |
Describes some details about the error if the connection status is an error. Can be empty. The scan engine is not obligated to provide this. |
| connectionStatus | integer | readonly |
Connection state of the sensor.
|
| model | string | readOnly | Model of the sensor. Can be empty if the scan engine does not support discovering the model. |
| serialNumber | string | readOnly | A string
that uniquely identifies the sensor.
Serial numbers need not be strictly numerical. They may contain letters and and other typographic characters. For a Gocator sensor, it is the typically-numeric serial number represented as a string. |
| version | string | readOnly | Version of the sensor firmware. Can be empty if the scan engine does not support discovering the version. |
| Method | Description | ||||||
|---|---|---|---|---|---|---|---|
| read |
Reads the sensor resource. Example response: {
"_embedded": {
"go:content": [ // see /scan/engines/(engineId)/scanners/(scannerId)/sensors/(sensorId)/content
{
"_links": {
"self": {
"href": "/scan/engines/g2xxx/scanners/scanner-0/sensors/sensor-0/alignment"
}
}
}
],
},
"_links": {
"go:actions": [ // see /scan/engines/(engineId)/scanners/(scannerId)/sensors/(sensorId)/actions
{
"href": "/scan/engines/g2xxx/scanners/scanner-0/sensors/sensor-0/actions/setAddress"
},
{
"href": "/scan/engines/g2xxx/scanners/scanner-0/sensors/sensor-0/actions/upgrade"
},
{
"href": "/scan/engines/g2xxx/scanners/scanner-0/sensors/sensor-0/actions/resetActiveArea"
},
],
"self": {
"href": "/scan/engines/g2xxx/scanners/scanner-0/sensors/sensor-0"
}
},
"displayName": "Sensor 0",
"id": "sensor-0",
"parameters": {
// scan-engine-specific sensor parameters
}
// SensorInfo properties
}
|
||||||
| update |
Updates the sensor resource. Arguments:
>Example request: update /scan/engines/test/scanners/0/sensors/sensor-0 {"parameters" : { "subSamplingSettings" : { "xSubsampling" : 1 } } }
|
||||||
| delete |
Deletes the sensor resource. Example request: delete /scan/engines/test/scanners/0/sensors/sensor-0 |
| Event Type | Description |
|---|---|
| created |
Occurs when a sensor is added to the scanner. The path indicates the affected sensor. Example notification: { "eventType": "created", "path": "/scan/engines/g2xxx/scanners/scanner-0/sensors/sensor-0"}
|
| updated |
Occurs when a sensor's properties change. The path indicates the affected sensor. Example notification: { "eventType": "updated", "path": "/scan/engines/g2xxx/scanners/scanner-0/sensors/sensor-0" }
|
| deleted |
Occurs when a sensor is removed from a scanner. The path indicates the affected sensor. Example notification: { "eventType": "deleted", "path": "/scan/engines/g2xxx/scanners/scanner-0/sensors/sensor-0" }
|
Resource Type: (Collection - Unordered)
The resource pertaining to alignment transforms at the sensor-level.
The contents of this resource are entirely up to the scanner & sensor type. Sensor-specific transforms will reside here.
See scanner-specific documentation for details.
| Method | Description |
|---|---|
| read |
Returns the alignment transforms. Example response: {
"payload": {
"_links": {
"self": {
"href": "/scan/engines/g2xxx/scanners/scanner-0/transform"
}
},
"encoderResolution": 1.0,
"speed": 100.0,
"transform": {
"xAngle": 0.0,
"xOffset": 0.0,
"yAngle": 0.0,
"yOffset": 0.0,
"zAngle": 0.0,
"zOffset": 0.0
}
},
"status": 1,
"type": "response"
}
|
| update |
Update the alignment transforms manually. This will not change the scanner's alignment state. update /scan/engines/g2xxx/scanners/scanner-0/transform { "transform": { "xAngle": -2.1} }
|
| Notification | |
|---|---|
| updated |
Occurs when the alignment configuration is updated or the alignment state changes. { "eventType": "updated", "path": "/scan/engines/g2xxx/scanners/scanner-0/alignment"}
|
Resource Type: (Collection - Unordered)
Resource Type: (Streamable)
Metrics for a given sensor. Each sensor type will have its own set of metrics, but the Gocator-specific ones will be listed here.
This section does not describe metrics unique to Gocator or any of its scan engines. That information can be found through Standard Scanner Resources.
Methods
| Method | Description |
|---|---|
| read |
Reads the latest sensor metrics. Example: read /scan/engines/g2xxx/scanners/0/sensors/sensor-0/metrics which for example returns: {
"payload": {
"_links": {
"self": {
"href": "/scan/engines/g2xxx/scanners/scanner-0/sensors/sensor-0/metrics"
}
},
"cameraBufferDrops0": 0,
"cameraBufferDrops1": -9223372036854775808,
"cameraTemp0": -9223372036854775808,
"cameraTemp1": -9223372036854775808,
"connectAttempts": 1,
"cpuCores": [
{
"used": 1
},
{
"used": 3
}
],
"cpuCoresUsedAvg": 2,
"cpuCoresUsedMax": 3,
"cpuTemp": 40259,
"expTimeTotal": 3298,
"intTemp": 31250,
"laserDriverTemp": 29812,
"laserSafety": true,
"masterConnected": false,
"masterStatus": false,
"maxSpots": 1256,
"memCapacity": 1053257728,
"memUsed": 128603264,
"networkIfs": [
{
"linkCapacity": 125000000,
"linkStatus": 32,
"rxBytes": 658570,
"rxRate": 3118,
"txBytes": 16242729,
"txRate": 61384
}
],
"storageVolumes": [
{
"capacity": 251133952,
"used": 87003136
},
{
"capacity": 6762496,
"used": 2347008
}
],
"syncSource": 2,
"triggerDrops": 0,
"upTime": 817
},
"status": 1,
"type": "response"
}
|
| stream |
Receive continuous stream of sensor metrics. Example: stream /scan/engines/g2xxx/scanners/0/sensors/sensor-0/metrics |
| cancelStream |
Cancel continuous stream of sensor metrics. Example: cancelStream /scan/engines/g2xxx/scanners/0/sensors/sensor-0/metrics |
Resource Type: (CollectionItem)
ID: Predefined by the scan engine.
Custom sensor content, specific to the scan engine. The format is a ParamSet object.
| Method | Description |
|---|---|
| read |
Reads sensor custom content. Example request: read /scan/engines/g2xxx/scanners/scanner-0/sensors/sensor-0/alignment Example response: {
"_links": {
"self": {
"href": "/scan/engines/g2xxx/scanners/scanner-0/sensors/sensor-0/alignment"
}
},
"targetParams": {
"alignmentType": 0,
"targetType": 0,
"targetValues": [],
"updateEncoderSpeedCalibration": false
},
"transform": {
"xAngle": 0.0,
"xOffset": 0.0,
"yAngle": 0.0,
"yOffset": 0.0,
"zAngle": 1.0,
"zOffset": 0.0
}
}
|
| update |
Updates the custom sensor content resource. Example request: update /scan/engines/g2xxx/scanners/scanner-0/sensors/sensor-0/alignment {...}
|
| Notification | |
|---|---|
| updated |
Occurs when the custom sensor content resource changes. Example notification: { "eventType": "updated", "path": "/scan/engines/g2xxx/scanners/scanner-0/sensors/sensor-0/alignment" }
|
Resource Type: (CollectionItem)
ID: Predefined by the scan engine.
A collection of sensor actions defined by the scan engine.
| Method | Description |
|---|---|
| read |
Returns a list of custom sensor actions as embedded resources. Example response: {
"_embedded": {
"item": [
{
"_links": {
"self": {
"href": "/scan/engines/g2xxx/scanners/scanner-0/sensors/sensor-0/actions/setAddress"
}
}
},
{
"_links": {
"self": {
"href": "/scan/engines/g2xxx/scanners/scanner-0/sensors/sensor-0/actions/upgrade"
}
}
},
{
"_links": {
"self": {
"href": "/scan/engines/g2xxx/scanners/scanner-0/sensors/sensor-0/actions/resetActiveArea"
}
}
}
]
},
"_links": {
"self": {
"href": "/scan/engines/g2xxx/scanners/scanner-0/sensors/sensor-0/actions"
}
}
}
|
None.
Resource Type: (CollectionItem, Callable)
ID: Predefined by scan engine.
A custom sensor callable action. It can also be read to obtain information about the action.
| Item | Type | Schema | Description |
|---|---|---|---|
| parameters | object | readOnly |
Describes the parameters that the custom
sensor action takes. |
| Method | Description |
|---|---|
| read |
Reads the sensor custom action resource. Example response: {
"_links": {
"self": {
"href": "/scan/engines/g2xxx/scanners/scanner-0/sensors/sensor-0/actions/setAddress"
}
},
"id": "setAddress",
"parameters": {
"address": "",
"dhcpEnabled": false,
"gateway": "",
"subnet": ""
}
}
|
| call |
Calls the sensor custom action resource. Example request: call /scan/engines/g2xxx/scanners/scanner-0/sensors/sensor-0/actions/setAddress {"address": "90.23.50.45, "dhcpEnabled": false, ...}
|
None.
This section describes some
commonly used property groups for Gocator scanners and sensors.
This section documents property groups, not resources. Nested items are nested as properties, e.g., "lightSleep" inside the "trigger" section means this:
{
"trigger: {
"lightSleep": {
// ...
}
}
}
It does not mean a "trigger/lightSleep" resource.
The following property groups commonly appear in Gocator scanner resources.
The following property groups commonly appear in Gocator sensor resources.
The following property groups commonly appear in Gocator alignment and layout content resources.
For the sake of brevity and reducing duplication, this section focuses on
documenting resources and properties specific to the G2 scan engine.
See Scanner Resources for general documentation of the
"/scan" resource.
See Scanner Resources /scan/engines/(engineId).
See Scanner Resources /scan/engines/(engineId)/visibleSensors.
| Item | Type | Schema | Description |
|---|---|---|---|
| parameters | object | readOnly |
G2 scan engine provided additional sensor information. Example: {
"parameters": {
"ipAddress": "90.23.50.45",
"optionCode": 1
}
}
|
| parameters/ipAddress | string | readOnly | Sensor IP address. |
| parameters/optionCode | integer | readOnly | License option code. |
See Scanner Resources /scan/engines/(engineId)/scanners.
| Item | Type | Schema | Description |
|---|---|---|---|
|
creationParams |
object | readOnly |
G2 scan engine required scanner creation parameters. |
| creationParams/defaultSerialNumber | string | readOnly |
Serial number of a sensor to add to the scanner. If 0, the scanner is created without a sensor. |
Resource Type: (CollectionItem)
ID: Auto generated when scanners are added.
A scanner object.
| Item | Type | Schema | Description |
| displayName | culture-specific string | User configurable display name of the scanner. | |
| id | string | readOnly | The identifier of the scanner within the collection (e.g., "scanner-0"). |
| parameters | object | Scanner parameters that vary depending on the scan engine. |
| Item | Type | Schema | Description |
|---|---|---|---|
|
parameters |
object |
G2 scan engine provided additional scanner information. |
|
| parameters/family | integer | readOnly, used |
Sensor family.
Changed in 1.0.x.x Removed. |
| parameters/runningState | integer |
readOnly, used, enum |
Run state.
Changed in 1.0.x.x Removed. |
| parameters/maxSensorCount | integer |
readOnly, minimum, used |
Max sensor count. Supported maxSensorCount is 31. Changed in 1.0.x.x Moved to Scanner Resources#/scan/engines/(engineId). |
|
parameters/scanModeSettings |
object |
G2 scan mode settings. Changed in 1.0.x.xParameter group created. |
|
| parameters/scanModeSettings/scanMode | integer | enum |
Scan mode.
Changed in 1.0.x.x Moved to scanModeSettings. |
| parameters/scanModeSettings/intensityEnabled | bool | used |
When this option is enabled, an intensity value will be produced for each data point. Changed in 1.0.x.x Moved to scanModeSettings. |
| parameters/scanModeSettings/uniformSpacingEnabled | bool | used |
When this option is enabled, data points are resampled to a uniform
spacing.
Changed in 1.0.x.x Moved to scanModeSettings. |
| parameters/scanModeSettings/spacingIntervalMode | integer | used, enum |
Spacing interval mode.
Changed in 1.0.x.x Moved to scanModeSettings. |
| parameters/spacingInterval | number | minimum, maximum, readOnly, used, actual | Spacing interval value. |
| parameters/scanModeSettings/surface | object |
See parameters/Surface below. Changed in 1.0.x.x Moved to scanModeSettings. |
|
| parameters/scanModeSettings/tempSafetyEnabled | bool | used |
Enables laser temperature safety control. Only applies to certain laser-based sensors. Changed in 1.0.x.x Moved to scanModeSettings. |
| parameters/scanModeSettings/profileMergeAlgorithm | integer | enum, used |
Changed in 1.0.x.x Moved to scanModeSettings and reserved for future. Profile combiner algorithm.
|
| parameters/scanModeSettings/arrayedOutputs | bool |
Changed in 1.0.x.x Moved to scanModeSettings. If enabled, data is output in an array format, rather than through individual outputs. |
|
| parameters/scanModeSettings/disableOutputs | bool | used |
Changed in 1.0.x.x Moved to scanModeSettings, and reserved for internal use only. Disable scanner outputs. |
| parameters/scanModeSettings/reduceProfileRate | bool | used |
Changed in 1.0.x.x Reserved for internal use only. In surface mode, reduces the profile rate to surface rate, defaults to true. |
|
parameters/scanModeSettings/surface |
object |
G2 surface parameters. Applicable when parameters/scanMode = 2 (Surface) |
|
| parameters/scanModeSettings/surface/type | integer | enum, used |
|
| parameters/scanModeSettings/surface/fixedLength | object | used |
Fixed length surface generation parameters. Applicable when parameters/scanModeSettings/surface/type = 1 (Fixed Length) |
| parameters/scanModeSettings/surface/fixedLength/startTrigger | integer | enum, actual, used |
|
| parameters/scanModeSettings/surface/fixedLength/inputIndex | integer | enum, actual, used | Input index. |
| parameters/scanModeSettings/surface/fixedLength/length | number | Surface length (mm). | |
| parameters/scanModeSettings/surface/variableLength | object | used |
Variable length surface generation parameters. Applicable when parameters/scanModeSettings/surface/type = 2 (Variable Length) |
| parameters/scanModeSettings/surface/variableLength/maxLength | number | Maximum surface length (mm). | |
| parameters/scanModeSettings/surface/rotational | object | used |
Rotational surface generation parameters. Applicable when parameters/scanModeSettings/surface/type = 3 (Rotational) |
|
Changed in 1.0.x.x Parameter removed. |
|||
| parameters/scanModeSettings/surface/rotational/ticksPerRev | number | readOnly |
Ticks per revolution. Changed in 1.0.x.x Added. |
| parameters/scanModeSettings/surface/continuous | object | used |
Changed in 1.0.x.x Continuous surface parameters added. Continuous surface generation parameters. Applicable when parameters/scanModeSettings/surface/type = 0 (Continuous) |
| parameters/scanModeSettings/surface/continuous/heightThreshold | number | Height threshold (mm). | |
| parameters/scanModeSettings/surface/continuous/thresholdDirection | integer | enum |
|
| parameters/scanModeSettings/surface/continuous/keepAllSingle | bool |
Changed in 1.0.x.x Added. Include one-sided data option. |
|
| parameters/scanModeSettings/surface/continuous/gapWidth | number | Gap width (mm). | |
| parameters/scanModeSettings/surface/continuous/gapLength | number | Gap length (mm). | |
| parameters/scanModeSettings/surface/continuous/paddingWidth | number | Padding width (mm). | |
| parameters/scanModeSettings/surface/continuous/paddingLength | number | Padding length (mm). | |
| parameters/scanModeSettings/surface/continuous/minArea | number | Minimum area (mm2). | |
| parameters/scanModeSettings/surface/continuous/maxLength | number | Maximum length (mm). | |
| parameters/scanModeSettings/surface/continuous/edgeFiltering | bool | Edge filtering option. | |
| parameters/scanModeSettings/surface/continuous/edgeKeepInterior | bool | Keep interior option for edge filtering. | |
| parameters/scanModeSettings/surface/continuous/edgeWidth | number | Edge filtering width (mm). | |
| parameters/scanModeSettings/surface/continuous/edgeLength | number | Edge filtering length(mm). | |
|
parameters/triggerSettings |
object |
Changed in 1.0.x.x Renamed to triggerSettings. See Gocator Scanner - Trigger. G2 adds additional trigger settings. |
|
| parameters/triggerSettings/externalInputZPulseEnabled | bool |
Changed in 1.0.x.x Moved to triggerSettings Enables the External Input based encoder Z Pulse feature. |
|
| parameters/triggerSettings/externalInputZPulseIndex | integer | used |
Changed in 1.0.x.x Moved to triggerSettings Input index to use for the input triggered z pulse feature. |
| parameters/triggerSettings/manualMultiplexing |
object |
Changed in 1.0.x.x Moved to triggerSettings |
|
| parameters/triggerSettings/preferMasterTimeEncoderEnabled | bool |
Changed in 1.0.x.x Moved to triggerSettings Prefer master time and encoder. |
|
|
parameters/filters |
object |
Changed in 1.0.x.x Added, |
|
|
|
|
|
|
|
|
object | used |
Changed in 1.0.x.x Removed. G2 advanced scanner parameters. |
See Scanner Resources#/scan/engines/(engineId)/scanners/(scannerId)/outputs.
See Scanner Resources#/scan/engines/(engineId)/scanners/(scannerId)/outputs/(outputId).
See Scanner Resources#/scan/engines/(engineId)/scanners/(scannerId)/actions.
See Scanner
Resources#/scan/engines/(engineId)/scanners/(scannerId)/sensors/(sensorId)/actions
For the sake of brevity and reducing duplication, this page focuses on documenting
resources and properties specific to the G3 scan engine.
See Scanner
Resources for general documentation of the "/scan" resource.
See Scanner Resources /scan/engines/(engineId).
See Scanner Resources /scan/engines/(engineId)/visibleSensors.
| Item | Type | Schema | Description |
|---|---|---|---|
| parameters | object | readonly |
G3 scan engine provides the following additional sensor information: Example: {
"parameters": {
"ipAddress": "90.35.89.3",
"optionCode": 1
}
}
|
| parameters/ipAddress | string | readonly | Sensor IP address. |
| parameters/optionCode | integer | readonly | License option code. |
See Scanner Resources#/scan/engines/(engineId)/scanners.
| Item | Type | Schema | Description |
|---|---|---|---|
|
creationParams |
ParamSet | readonly |
G3 scan engine required scanner creation parameters. |
| creationParams/defaultSerialNumber | string | readonly |
Serial number of a sensor to add to the scanner. If 0, the scanner is created without a sensor. |
Resource Type: (CollectionItem)
ID: Auto generated when scanners are added.
A scanner object.
| Item | Type | Schema | Description |
| displayName | culture-specific string | User configurable display name of the scanner. | |
| id | string | readOnly | The identifier of the scanner within the collection (e.g. "scanner-0"). |
| parameters | object | Scanner parameters that vary depending on the scan engine. |
| Item | Type | Schema | Description |
|---|---|---|---|
|
parameters |
object |
G3 scan engine provided additional scanner information. |
|
|
Scan Mode Settings |
|||
| parameters/scanModeSettings | object |
G3 scan mode settings. Changed in 1.0.x.xParameter group created. |
|
| parameters/scanModeSettings/scanMode | integer | enum |
Scan mode.
Changed in 1.0.x.x Moved to scanModeSettings. |
| parameters/scanModeSettings/intensityEnabled | bool | used |
When this option is enabled, an intensity value will be produced for each data point. Changed in 1.0.x.x Moved to scanModeSettings. |
| parameters/scanModeSettings/tempSafetyEnabled | bool | used |
Temperature safety support. If one of the scanner's sensors supports temperature safety this setting will show up. Defaults to false. Changed in 1.0.x.x Moved to scanModeSettings. |
| parameters/scanModeSettings/uniformSpacingEnabled | bool | used |
When this option is enabled, data points are resampled to a uniform
spacing.
Changed in 1.0.x.x Moved to scanModeSettings. |
| parameters/scanModeSettings/reduceOcclusion | integer | enum, used |
Current reduced occlusion mode.
Changed in 1.0.x.x Moved to scanModeSettings from sensor. |
| parameters/scanModeSettings/spacingInterval | number | used, minimum, maximum, |
Current point spacing. (millimeters) Changed in 1.0.x.x Moved to scanModeSettings from sensor. |
|
Trigger Settings |
|||
|
parameters/triggerSettings |
object |
G3 trigger parameters. Changed in 1.0.x.x Renamed to triggerSettings. |
|
| parameters/triggerSettings/source | integer | enum |
Trigger source.
|
| parameters/triggerSettings/maxFrameRateEnabled | bool | used | Trigger at maximum frame rate. |
| parameters/triggerSettings/frameRate | number | minimum, maximum, actual, used | Frame rate for time trigger (Hz). |
| parameters/triggerSettings/delay | number | minimum, maximum, used | Trigger delay. (µs) |
|
Filter Settings |
|||
| parameters/filters | object |
See Gocator Scanner - Surface Filters. Changed in 1.0.x.x Renamed to filters. |
For metrics common across all Gocator scanners, see Scanner Resources#/scan/engines/(engineId)/scanners/(scannerId)/metrics.
See Scanner Resources#/scan/engines/(engineId)/scanners/(scannerId)/outputs.
See Scanner Resources#/scan/engines/(engineId)/scanners/(scannerId)/outputs/(outputId).
See Scanner Resources#/scan/engines/(engineId)/scanners/(scannerId)/sensors/(sensorId)/(contentId).
G3 scan engine-specific alignment configuration, containing user alignment configurations that will be applied to the alignment process.
| Item | Type | Schema | Description |
| alignConfig/timeout | integer | Maximum time alignment can take. If this time is exceeded, alignment will be aborted. |
G2 scan engine-specific alignment transforms, containing user alignment transforms that will be applied to the scanner.
| Item | Type | Schema | Description |
| encoderResolution | number | exclusiveMinimum |
Encoder resolution for encoder-based triggering (mm/tick). Note: not used by G3. |
| speed | number | exclusiveMinimum |
Travel Speed of the sensor used in time mode (mm/s). Note: not used by G3. |
| transform | object | used |
Transformation object, consisting of offsets and angles. See Gocator Alignment - Transform. Changed in 1.0.x.x Reserved for future. |
See Scanner Resources#/scan/engines/(engineId)/scanners/(scannerId)/(contentId).
G3 scan engine layout content. The layout needs to be updated with sensors with the corresponding sensor-id and position in the grid.
| Item | Type | Schema | Description |
| type | integer |
Layout type.
Note: Reserved for future. |
|
| grid | object |
Grid Layout. See Gocator Layout - Grid. Note: Reserved for future. |
See Scanner Resources#/scan/engines/(engineId)/scanners/(scannerId)/actions.
See Scanner Resources#/scan/engines/(engineId)/scanners/(scannerId)/(contentId).
See Scanner Resources#/scan/engines/(engineId)/scanners/(scannerId)/actions/(actionId).
Parameters: none
Outputs: none
See Scanner Resources#/scan/engines/(engineId)/scanners/(scannerId)/sensors.
| Item | Type | Schema | Description |
|---|---|---|---|
|
creationParams |
ParamSet | readonly |
G3 scan engine required sensor creation parameters. |
| creationParams/serialNumber | string | readonly |
Serial number of a sensor to add to the scanner. |
Resource Type: (CollectionItem)
ID: Auto generated when sensors are added.
A sensor object.
| Item | Type | Schema | Description |
| displayName | culture-specific string | User configurable display name of the sensor. | |
| id | readonly | Identifier of the sensor within the collection (e.g. "sensor-0"). | |
| parameters | object | readonly | Additional parameters depending on the scan engine. |
| connectionMessage | string | readonly |
Describes some details about the error if the connection status is an error. Can be empty. The scan engine is not obligated to provide this. |
| connectionStatus | integer | readonly |
Connection state of the sensor.
|
| model | string | readonly | Model of the sensor. Can be empty if the scan engine does not support discovering the model. |
| serialNumber | string | readonly | A string that uniquely identifies the sensor.
Serial numbers need not be strictly numerical. They may contain letters and and other typographic characters. For a Gocator sensor, it is the serial number represented as a string. |
| version | string | readonly | Version of the sensor firmware. Can be empty if the scan engine does not support discovering the version. |
| Item | Type | Schema | Description |
|---|---|---|---|
|
parameters |
object |
G3 scan engine provided additional sensor information. |
|
| parameters/activeAreaSettings | object | extendedType |
See Sensor - Active Area. extendedType = TransformedBoxRegion Changed in 1.0.x.x Renamed to activeAreaSettings. |
|
Exposure Settings |
|||
| parameters/exposureSettings | object |
Changed in 1.0.x.x G3 Exposure settings Changed in 1.0.x.x Renamed to exposureSettings. |
|
| parameters/exposureSettings/exposureMode | integer | enum, used, readOnly |
Exposure mode.
|
| parameters/exposureSettings/intensitySequenceIndex | integer | used, minimum, maximum, |
Multiple exposure intensity index. Specifies which exposure in the parameters/exposureSettings/multipleExposures array to be used as an intensity image. |
| parameters/exposureSettings/intensityType | integer | enum, readOnly |
Intensity type, by default combine left and right camera intensity images.
|
| parameters/exposureSettings/videoPatternType | readOnly |
Specifies a preview pattern during live view image capturing (parameters/scanMode = image mode).
|
|
| parameters/exposureSettings/videoPatternIndex | integer | used, minimum, maximum, readOnly |
Specifies which scan pattern to use when parameters/exposureSettings/videoPatternType = 3 (Scan Sequence) |
| parameters/exposureSettings/singleExposure | number |
used, minimum, maximum, readOnly |
Exposure value (microseconds). |
| parameters/exposureSettings/multipleExposures | array<number> | minItems, maxItems, used, readOnly |
This contains a list of exposure values to use when parameters/exposureMode = 1 (Multiple Exposures). (microseconds). |
|
Advanced Settings |
|||
| parameters/advancedSettings | object |
Changed in 1.0.x.x Renamed to advancedSettings G3 advanced settings. |
|
| parameters/advancedSettings/contrastThreshold | integer | minimum, maximum, readOnly |
Specifies minimal color difference to consider the pixel (point) valid for decoding and triangulation.
|
| parameters/advancedSettings/materialType | integer | enum, readOnly |
Material type, changes projector patterns and pattern decoding scheme:
|
|
parameters/advancedSettings/plSupportedEncoding |
bool | used, read-only |
Changed in 1.0.x.x Added. Flag determining if the current encoding (Diffuse, Interreflective) is supported by sensor hardware. parameters/advancedSettings/materialType - determines current encoding type. If encoding is not supported, the sensor will perform a software emulation which is much slower. This is an information property. As such, it is designed to be read only. |
|
Advanced Camera Settings |
|||
|
parameters/advancedSettings/cameraSettings/ cameras |
array<object> |
Changed in 1.0.x.x Moved to advancedSettings G3 has two camera objects; analogGain does not apply. |
|
|
Advanced Projector Settings |
|||
| parameters/advancedSettings/projectorSettings | object |
Changed in 1.0.x.x Moved to advancedSettings G3 projector parameters. |
|
| parameters/advancedSettings/projectorSettings/intensity | number | minimum, maximum, readOnly |
Changed in 1.0.x.x Updated to use %. Current projector intensity in percentages (%). (The min/max of intensity is usually [0,100]%). |
| parameters/advancedSettings/projectorSettings/uniformity | number | minimum, maximum, readOnly |
Pattern uniformity coefficient. Balances center and sides of the projected image by lowering center intensity.
|
For metrics common across all Gocator sensors, see Gocator Property Groups - Sensor Metrics.
For
details on how to read & stream these metrics, see Scanner
Resources#/scan/engines/(engineId)/scanners/(scannerId)/sensors/(sensorId)/metrics.
Per online G3 Sensor:
| Item | Internal Type | Type | Description |
|---|---|---|---|
|
expTimeTotal |
k64s | integer |
Changed in 1.0.x.x Total projector exposure time (seconds). (In Gocator 6.x: Light Operation Time, ID: 21201) |
|
projectorTempPanel |
k64s | integer |
Changed in 1.0.x.x Projector filter array temperature (millidegrees C). |
|
projectorTempLight |
k64s | integer |
Changed in 1.0.x.x Projector illumination temperature (millidegrees C). |
See Scanner Resources#/scan/engines/(engineId)/scanners/(scannerId)/sensors/(sensorId)/actions.
For the sake of brevity and reducing duplication, this section focuses on
documenting resources and properties specific to the G5 scan engine.
See Scanner Resources for general documentation of the
"/scan" resource.
See Scanner Resources /scan/engines/(engineId).
See Scanner Resources /scan/engines/(engineId)/visibleSensors.
| Item | Type | Schema | Description |
|---|---|---|---|
| parameters | object | readOnly |
G5 scan engine provided additional sensor information. Example: {
"parameters": {
"ipAddress": "90.55.52.68",
"optionCode": 1
}
}
|
| parameters/ipAddress | string | readOnly | Sensor IP address. |
| parameters/optionCode | integer | readOnly | License option code. |
See Scanner Resources /scan/engines/(engineId)/scanners.
| Item | Type | Schema | Description |
|---|---|---|---|
|
creationParams |
object | readOnly |
G5 scan engine required scanner creation parameters. |
| creationParams/defaultSerialNumber | string | readOnly |
Serial number of a sensor to add to the scanner. If 0, the scanner is created without a sensor. |
Resource Type: (CollectionItem)
ID: Auto generated when scanners are added.
A scanner object.
| Item | Type | Schema | Description |
| displayName | culture-specific string | User configurable display name of the scanner. | |
| id | string | readOnly | The identifier of the scanner within the collection (e.g., "scanner-0"). |
| parameters | object | Scanner parameters that vary depending on the scan engine. |
| Item | Type | Schema | Description |
|---|---|---|---|
|
parameters |
object |
G5 scan engine provided additional scanner information. |
|
| parameters/family | integer | readOnly, used |
Sensor family.
Changed in 1.0.x.x Removed. |
| parameters/runningState | integer | readOnly, used |
Changed in 1.0.x.x Removed. Run state.
|
| integer | minimum, readOnly, used |
Max sensor count. Changed in 1.0.x.x Moved to Scanner Resources#/scan/engines/(engineId). 0.3.3.50 Supported maxSensorCount is 2. |
|
|
parameters/scanModeSettings |
object |
G5 scan mode settings. Changed in 1.0.x.x Parameter group created |
|
| parameters/scanModeSettings/scanMode | integer | enum |
The scan mode. Determines the primary data produced by the scanner.
Changed in 1.0.x.x Moved to scanModeSettings |
| parameters/scanModeSettings/intensityEnabled | bool | used |
When this option is enabled, an intensity value will be produced for each data point. |
| parameters/scanModeSettings/uniformSpacingEnabled | bool | used | When this option is enabled, data points are resampled to a uniform spacing. |
| parameters/scanModeSettings/arrayedOutputs | bool | used |
Combine top and bottom sensor outputs to array. 0.3.3.50 Added Changed in 1.0.x.x Parameter renamed |
| parameters/scanModeSettings/individualLayersEnabled | bool | used |
Separate layer outputs from arrayed output. Changed in 1.0.x.x Added. |
| parameters/scanModeSettings/spacingIntervalEnabled | bool | used |
Enables custom spacing interval. Changed in 1.0.x.x Parameter renamed |
| parameters/scanModeSettings/spacingInterval | number | minimum, maximum, used |
Custom spacing interval value (µm) Changed in 1.0.x.x Parameter renamed. |
| parameters/scanModeSettings/surface | object |
Parameter group containing settings which are relevant when scanMode = Surface Changed in 1.0.x.x Parameter group created |
|
| parameters/scanModeSettings/surface | object |
G5 surface parameters. Applicable when parameters/scanModeSettings/scanMode = 2 (Surface) Changed in 1.0.x.x Parameter group created |
|
| parameters/scanModeSettings/surface/type | integer | enum, used |
|
| parameters/scanModeSettings/surface/fixedLength |
object |
used |
Changed in 1.0.x.x Parameter path changed, moved under scanModeSettings. Fixed length surface generation parameters. Applicable when parameters/scanModeSettings/surface/type = 1 (Fixed Length) |
| parameters/scanModeSettings/surface/fixedLength/startTrigger | integer | enum, used |
Start trigger.
|
| parameters/scanModeSettings/surface/fixedLength/inputIndex | integer | enum, actual, used, minimum |
Input index.
|
| parameters/scanModeSettings/surface/fixedLength/length | number | Surface length (mm). | |
| parameters/scanModeSettings/surface/variableLength | object | used |
Changed in 1.0.x.x Added. Variable length surface generation parameters. Applicable when parameters/scanModeSettings/surface/type = 2 (Variable Length) |
| parameters/scanModeSettings/surface/variableLength/maxLength | number | readOnly | Maximum surface length (mm). |
| parameters/scanModeSettings/surface/rotational |
Changed in 1.0.x.x Added. Rotational surface generation parameters. Applicable when parameters/scanModeSettings/surface/type = 3 (Rotational) |
||
| parameters/scanModeSettings/surface/rotational/ticksPerRev | number | readOnly | Ticks per revolution. |
| parameters/scanModeSettings/surface/continuous | object | used |
Changed in 1.0.x.x Added. Continuous surface generation parameters. Applicable when parameters/scanModeSettings/surface/type = 0 (Continuous) |
| parameters/scanModeSettings/surface/continuous/heightThreshold |
number |
Height threshold (mm). | |
| parameters/scanModeSettings/surface/continuous/thresholdDirection |
integer |
|
|
| parameters/scanModeSettings/surface/continuous/gapWidth | number | Gap width (mm). | |
| parameters/scanModeSettings/surface/continuous/gapLength | number | Gap length (mm). | |
| parameters/scanModeSettings/surface/continuous/paddingWidth | number | Padding width (mm). | |
| parameters/scanModeSettings/surface/continuous/paddingLength | number | Padding length (mm). | |
| parameters/scanModeSettings/surface/continuous/minArea | number | Minimum area (mm2). | |
| parameters/scanModeSettings/surface/continuous/maxLength | number | Maximum length (mm). | |
| parameters/scanModeSettings/surface/continuous/edgeFiltering | bool | Edge filtering option. | |
| parameters/scanModeSettings/surface/continuous/edgeKeepInterior | bool | Keep interior option for edge filtering. | |
| parameters/scanModeSettings/surface/continuous/edgeWidth | number | Edge filtering width (mm). | |
| parameters/scanModeSettings/surface/continuous/edgeLength | number | Edge filtering length(mm). | |
|
parameters/triggerSettings |
object |
Changed in 1.0.x.x Renamed from trigger to triggerSettings. G5 trigger parameters. |
|
| parameters/triggerSettings/source | integer | enum |
Trigger source.
|
| parameters/triggerSettings/maxFrameRateEnabled | bool | used | Trigger at maximum frame rate. |
| parameters/triggerSettings/frameRate | number | minimum, maximum, actual, used | Frame rate for time trigger (Hz). |
| parameters/triggerSettings/encoderSpacing | number | minimum, maximum, used | Encoder spacing (mm, degrees for surface/rotational). |
| parameters/triggerSettings/encoderTriggerMode | integer | enum, used |
Encoder trigger mode.
|
| parameters/triggerSettings/schedulingUnits | integer | enum, used |
Scheduling units.
|
| parameters/triggerSettings/delay | number | minimum, maximum, used | Trigger delay. µs or mm depending on parameters/trigger/schedulingUnits = 0 (Time) or 1 (Encoder), respectively. |
| parameters/triggerSettings/gateEnabled | bool | actual, used |
Changed in 1.0.x.x Enables digital input gating. |
| parameters/triggerSettings/reversalDistanceAutoEnabled | bool | used | Whether or not to use auto-calculated value of reversal distance. |
| parameters/triggerSettings/reversalDistance | number | readOnly, used | Encoder reversal threshold (for jitter handling). |
| parameters/filters | object |
Changed in 1.0.x.x Added. |
|
| parameters/advanced | object |
Changed in 1.0.x.x Removed. |
See Scanner Resources#/scan/engines/(engineId)/scanners/(scannerId)/outputs.
See Scanner Resources#/scan/engines/(engineId)/scanners/(scannerId)/outputs/(outputId).
See Scanner Resources#/scan/engines/(engineId)/scanners/(scannerId)/actions.
See Scanner Resources#/scan/engines/(engineId)/scanners/(scannerId)/sensors/(sensorId)/actions.
Resource Type: N/A
Contains a list of tool types available to be created in the system. Tool Types are obtained from the Tool Registry
ToolType Schema:
| Item | Type | Schema | Description |
|---|---|---|---|
| type | string | readOnly | The type of the tool. e.g., TestAction, ProfileDemo |
| displayName | culture-specific string | readOnly | Name of the tool. e.g., Test Action Tool, Profile Demo Tool |
| description | culture-specific string | readOnly |
Describes the function and purpose of the tool |
| helpHtml | string | readOnly |
Html help string for this tool. If both helpURL and helpHtml is
specified helpURL will take precedence.
|
| helpUrl | string | readOnly | Html help string for this tool If both helpURL and helpHtml is specified helpURL will take precedence. |
| categories |
array<string> |
readOnly | Categories of the tool. A tool can be of multiple categories or no category |
| icon | object | readOnly |
Icon data and file extension described below Eventually this will be deprecated in favor of iconUrl |
| icon/mimeType | string | readOnly | common image file format extensions. e.g., png, gif |
| data | binary | readOnly |
raw binary of the image. |
Methods
| Method | Description |
|---|---|
| read |
Reads the list of tool types. Example: read /toolTypes Response {
"_links": {
"self": {
"href": "/api/toolTypes"
}
},
"items": [
{
"categories": [
"Sample"
],
"description": "Example Tool with anchored region",
"displayName": "Anchored Profile Region Tool",
"helpHtml": "",
"helpUrl": "",
"icon": {
"data": {
"bytes": [],
"subtype": null
},
"mimeType": ""
},
"type": "AnchoredProfileRegion"
}
]
}
|
Resource Type: (Collection - Ordered)
A collection of tools.
Methods
| Method | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| read |
Read all tools from the system. Example: read /tools {"expandLevel": -1}
response {
"_embedded": {
"item": [
{
"_links": {
"self": {
"href": "/api//tools/ToolType-0"
}
},
"ordIndex": 0
},
{
"_links": {
"self": {
"href": "/api//tools/ToolType-0"
}
},
"ordIndex": 1
}
]
},
"_links": {
"self": {
"href": "/api/tools"
}
}
}
|
||||||||||||
| create |
Adds a tool into the system. Arguments:
Examples: create /tools { "type": "TestForward" }
create /tools { "type": "TestForward", "position": 3 }
create /tools { "type": "TestForward", "autoConnect": true }
|
| Event Type | Description |
|---|---|
| updated |
Occurs whenever the ordered tool collection changes due to additions, deletions, or moves/reorders. Example: { "eventType": "updated", "path": "/tools",
"content": {list of tools} }
|
| embeddedUpdated |
Occurs whenever the ordered tool collection changes due to additions, deletions, or moves/reorders during a job load. Example: { "eventType": "embeddedUpdated", "path": "/tools" }
Changed in 1.0.x.x Added. |
Resource Type: (Callable)
Command to clone a tool to the position specified.
| Method | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| call |
Arguments:
Example: call /tools/commands/clone{ "toolId" : "TestParams-1", "position": 2 }
|
Resource Type: (Callable)
Command to move a tool to the position specified.
| Method | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| call |
Arguments:
Example: call /tools/commands/move { "toolId" : "TestForward-0", "position": 2 }
|
Resource Type: (Callable)
Command to reorder the tool list according to a provided list. The list of tools must contain the same number of tools and have no duplicates.
| Method | Description | ||||||
|---|---|---|---|---|---|---|---|
| call |
Arguments:
Example: call /tools/commands/reorder { "tools" : ["TestForward-2", "TestForward-1", "TestForward-0"] }
|
Resource Type: (Callable)
Command to reset all tool metrics (all metrics within each tool are reset to zero, NULL, or otherwise nominal values).
For more info on tool metrics, see Metrics Resources.
| Method | Description |
|---|---|
| call |
Example: call /tools/commands/resetMetrics |
Resource Type: (CollectionItem)
ID: auto generated when the tool is first added
Path parameters: by "extId", see Methods for which ones support path parameter expansion.
NOTE: Each tool should share the following common properties, but the schema for each tool within the collection may be different due to the ParamSet.
| Item | Type | Schema | Description |
|---|---|---|---|
| id | string | readOnly | Tool ID. This id should never be parsed or interpreted by any client. Tool id's are picked by the application according to unpredictable mechanisms. Do not rely on the format. |
| type | string | readOnly | Type name of the tool. |
| displayName | culture-specific string | User configurable display name of the tool. | |
| extId | string | User configurable external id of the tool. Once configured, this id will never change. This makes external id useful as a way of reliably referring to a tool from outside/external code (for example via the SDK). Additionally, external ids can be used as an alternative to id when querying tools on the collection (see the examples in the read method below). | |
| batched | boolean | readOnly |
Whether the tool is currently batched or not. Changed in 1.0.x.x Added. |
| isBatchable | boolean | readOnly |
Describes whether the tool is batchable or not. Batchability is determined solely by outputs (tools containing arrayed outputs aren't batchable). This property is only applicable to when a tool is going from unbatched → batched. When batched is true, this property is not applicable anymore and shouldn't be used in determining if a tool can be unbatched or not. Basically a tool that can be batched can be unbatched. Technically isBatchable being false doesn't prevent the system from batching the tool. However the system will not start with a non-batchable tool being batched Clients should prevent the option of batching tools with isBatchable being false. Changed in 1.0.x.x Added. |
| parameters | object | Custom parameters specific to the tool. | |
| inputs | ToolInput[] | Array of tool inputs. | |
| outputs | ToolOutput[] | Array of tool outputs. |
| Method | Description | ||||||
|---|---|---|---|---|---|---|---|
| read |
Read a specific tool. Path parameters: extId Example: read /tools/TestForward-0 { "expandLevel" : -1 }
Read tool by path parameter extId: read /tools/extId=My%20Tool%20Id |
||||||
| update |
Update a specific tool's properties. Path parameters: extId Arguments:
Examples: Update a tool's extId property: update /tools/TestForward-0 { "extId" : "My Tool Id" }
Update the tool's parameters property: update /tools/TestForward-0 { "parameters" : { "EnableAbsolute" : true } }
Update multiple tool properties at once: update /tools/TestForward-0 { "extIid" : "My Tool Id",
"parameters" : { "EnableAbsolute" : true,
"OutputCount" : 2 } }
Update tool by path parameter extId: update /tools/extId=My%20Tool%20Id { "parameters" : { "EnableAbsolute" : true } }
|
||||||
| delete |
Deletes tools from the system. The path to the tool must be provided. Path parameters: extId Examples: Delete a single tool: delete /tools/TestForward-0 Delete tool by path parameter extId: delete /tools/extId=My%20Tool%20Id A special wildcard form applies to this delete method. The path of this tools command can be wildcarded to delete all tools: delete /tools/* |
| Event Type | Description |
|---|---|
| created |
Occurs when a new tool is added. The path indicates the new tool id. Example: { "eventType" : "created", "path" : "/tools/TestForward-0",
"content" : {new tool properties} }
|
| updated |
Occurs whenever tool's own properties, or its list of inputs and outputs change. The path indicates the affected tool id. Example: { "eventType" : "updated", "path" : "/tools/TestForward-0",
"content" : {tool properties} }
|
| deleted |
Occurs whenever a tool is deleted. The path indicates the tool id that was deleted. Example: { "eventType": "deleted", "path": "/tools/TestForward-0" }
|
Resource Type: (Callable)
Command to batch a tool.
Changed in 1.0.x.x Added.
| Method | Description |
|---|---|
| call |
Example: call /tools/TestForward-0/commands/batch |
Resource Type: (Callable)
Command to unbatch a tool.
Changed in 1.0.x.x Added.
| Method | Description |
|---|---|
| call |
Example: call /tools/TestForward-0/commands/unbatch |
Resource Type: (Collection - Unordered)
A collection of tool inputs. This collection does not support creation and deletion via the protocol.
| Method | Description |
|---|---|
| read |
Reads the current list of tool inputs. Example(s): read /tools/TestForward-0/inputs |
| Event Type | Description |
|---|---|
| updated |
Occurs whenever the tool input collection changes due to additions, or deletions. The path indicates the inputs collection, scoped to the tool. Example: { "eventType" : "updated", "path" : "/tools/TestForward-0/inputs",
"content" : {updated tool inputs} }
|
Resource Type: (CollectionItem)
ID: Auto-generated by the tool
Path parameters: by "extId", see Methods for which ones support path parameter expansion.
Each tool input has the following common schema properties:
| Item | Type | Schema | Description |
|---|---|---|---|
| id | string | readOnly | Input ID. |
| displayName | culture-specific string | User configurable display name of the tool input. | |
| extId | string | User configurable external id of the tool input. | |
|
acceptedDataFormats |
DataFormat[] | readOnly |
List of acceptable data formats. See Common Types. Arrayed implies Scalar If DataFormat.arrayed is true, it is implied that the underlying tool still accepts scalar input of DataFormat.type. For example, the following means that scalar and arrayed profiles are accepted, but only scalar surfaces: "acceptedDataFormats": [
{
"arrayed": true,
"type": 3 (Uniform Profile)
},
{
"arrayed": false,
"type": 5 (Uniform Surface)
}
],
Also, note that within acceptedDataFormats, there can only be one entry per DataFormat.type. |
| optional | bool | readOnly |
Whether this is a required input or not. This is specified as part of the tool definition, by the tool developer. Usually, most
tool inputs are required by default, |
| dataSource | string |
ID of the data source to connect to the input. See /dataSources. If "(none)", the input is not connected. |
| Method | Description | ||||||
|---|---|---|---|---|---|---|---|
| read |
Reads a specific tool input. Path parameters: extId Example: read /tools/TestForward-0/inputs/Input0 Read tool input by path parameter extId: read /tools/TestForward-0/inputs/extId=My%20Input%20Id |
||||||
| update |
Updates a specific tool input. Path parameters: extId Arguments:
Example: Update a tool input extId: update /tools/TestForward-0/inputs/Input0 { "extId" : "My Input Id" }
Update tool input by path parameter extId: update /tools/TestForward-0/inputs/extId=My%20Input%20Id { "displayName" : "TestInput" }
|
| Event Type | Description |
|---|---|
| created |
Occurs whenever a tool input is added. The path indicates the new tool input
id. Example: {"eventType" : "created", "path" : "/tools/TestForward-0/inputs/Input1",
"content" : {new tool input properties} }
|
| updated |
Occurs whenever a tool input is updated. The path indicates the tool input id that was updated. Example: {"eventType" : "updated", "path" : "/tools/TestForward-0/inputs/Input1",
"content" : {tool input properties} }
|
| deleted |
Occurs whenever a tool input is deleted. The path indicates the tool input id that was deleted. Example: { "eventType" : "deleted", "path" : "/tools/TestForward-0/inputs/Input1" }
|
Resource Type: (Collection - Unordered)
A collection of tool outputs. This collection does not support creation and deletion via the protocol
| Method | Description |
|---|---|
| read |
Reads the current list of tool outputs. Example(s): read /tools/TestForward-0/outputs |
| Event Type | Description |
|---|---|
| updated |
Occurs whenever the tool output collection changes due to additions, or deletions. The path indicates the inputs collection, scoped to the tool. Example: { "eventType" : "updated", "path" : "/tools/TestForward-0/outputs",
"content" : {updated tool outputs} }
|
Resource Type: (CollectionItem)
ID: Auto-generated by the tool developer
Path parameters: by "extId", see Methods for which ones support path parameter expansion.
NOTE: Each tool output should share the following common properties, but the schema for each tool output within the collection may be different due to the ParamSet.
| Item | Type | Schema | Description |
|---|---|---|---|
| id | string | readOnly | Output ID. |
| displayName | culture-specific string | User configurable display name of the tool output. | |
| extId | string | User configurable external id of the tool output. | |
| dataSourceId | string | readOnly | Id of the output (e.g., tools:Tool1:outputs:Output0) used for identifying outputs in the backend framework when the output is enabled. If the output is disabled, it will be an empty string. |
| enabled | bool | Whether or not the output is enabled. | |
| recordingEnabled | bool | Whether or not the recording output is enabled. | |
|
dataFormat |
DataFormat | readOnly |
The data format of the output. See Common Types. Arrayed output format vs. scalar input data format If a tool outputs arrayed data, it will no longer be connectable to tool inputs that only accept scalar data format. To preserve the ability to be connectable to such tool inputs, define a separate tool output as scalar data format (for the data type of interest). |
| priority | integer | readOnly |
Priority of the tool output as an unsigned 32-bit integer. Highest priority being 1 and 0 being undefined priority which will always be last. Changed in 0.3.x.x Added. |
| parameters | object | Set of tool output parameters. |
| Method | Description | ||||||
|---|---|---|---|---|---|---|---|
| read |
Reads a specific tool output. Path parameters: extId Example: read /tools/TestForward-0/outputs/Output0 Read tool output by path parameter extId: read /tools/TestForward-0/outputs/extId=My%20Output%20Id |
||||||
| update |
Updates a specific tool output. Path parameters: extId Arguments:
Example: Update a tool output extId: update /tools/TestForward-0/outputs/Output0 { "extId" : "My Output Id" }
Update a tool output by path parameter extId: update /tools/TestForward-0/outputs/extId=My%20Output%20Id { "enabled" : true}
|
| Event Type | Description |
|---|---|
| created |
Occurs whenever a tool output is added. The path indicates the new tool output
id. Example: { "eventType" : "created", "path" : "/tools/TestForward-0/outputs/Output1",
"content" : {new tool output properties} }
|
| updated |
Occurs whenever a tool output is updated. The path indicates the tool output id that was updated. Example: { "eventType" : "updated", "path" : "/tools/TestForward-0/outputs/Output1",
"content" : {tool output properties} }
|
| deleted |
Occurs whenever a tool output is deleted. The path indicates the tool output id that was deleted. Example: { "eventType" : "deleted", "path" : "/tools/TestForward-0/outputs/Output1" }
|
Resource Type: (Streamable)
Contains tool metrics. Mapping to Gocator 6.x health indicators are provided where applicable.
Path parameters: by "extId", see Methods for which ones support path parameter expansion.
The metrics available per tool are broken down into:
| Item | Internal Type | Type | Schema | Description | Classic IndicatorId | Classic Instance | Classic Name | |
|---|---|---|---|---|---|---|---|---|
| toolStats/runTime | k64u | integer | The most recent time taken to execute the tool (microseconds). | 22004 | tool id | Tool-<tool id>/RunTime | ||
| toolStats/runTimeMin | k64u | integer | Minimum time spent for tool to process a sample (microseconds). | 22016 | tool id | Tool-<tool id>/MinRunTime | ||
| toolStats/runTimeMax | k64u | integer | Maximum time spent for tool to process a sample (microseconds). | 22017 | tool id | Tool-<tool id>/MaxRunTime | ||
| toolStats/runTimeAvg | k64u | integer | Average time for tool to process a sample (microseconds). | 22018 | tool id | Tool-<tool id>/AvgRunTime | ||
| toolStats/runTimeAvgPerc | k64u | integer | The average time to process a sample as a percentage of the total of all tool execution times (tenths of a percent). | 22019 | tool id | Tool-<tool id>/AvgRun% | ||
| <toolType>/... | various | N/A | Custom tool type specific metrics provided by the tool developer. | N/A | N/A | N/A | ||
| Measurement statistics are per tool output: | ||||||||
| /outputsByExtId/(outputExtId)/value | k64f | number |
Measurement Value. Could be null if a scan hasn't been acquired yet or was invalid. |
30000 | Gocator Output Id | Value | ||
| /outputsByExtId/(outputExtId)/passCount | k64u | integer |
Number of pass decisions. |
30001 | Gocator Output Id | PassCnt | ||
| /outputsByExtId/(outputExtId)/failCount | k64u | integer |
Number of fail decisions. |
30002 | Gocator Output Id | FailCnt | ||
| /outputsByExtId/(outputExtId)/lastDecision | k8s | integer |
Most recent decision (pass/fail/invalid). pass = 1 |
N/A | N/A | N/A | ||
| /outputsByExtId/(outputExtId)/max | k64f | number |
Maximum measurement value. Could be null if a scan hasn't been acquired yet or was invalid. |
30003 | Gocator Output Id | Max | ||
| /outputsByExtId/(outputExtId)/min | k64f | number |
Minimum measurement value. Could be null if a scan hasn't been acquired yet or was invalid. |
30004 | Gocator Output Id | Min | ||
| /outputsByExtId/(outputExtId)/range | k64f | number |
Measurement range value. Could be null if a scan hasn't been acquired yet or was invalid. |
|||||
| /outputsByExtId/(outputExtId)/avg | k64f | number |
Average measurement value. Could be null if a scan hasn't been acquired yet or was invalid. |
30005 | Gocator Output Id | Average | ||
| /outputsByExtId/(outputExtId)/stdDev | k64f | number |
Measurement value standard deviation. Could be null if a scan hasn't been acquired yet or was invalid. |
30006 | Gocator Output Id | StdDev | ||
| /outputsByExtId/(outputExtId)/invalidCount | k64u | integer |
Number of invalid values. |
30007 | Gocator Output Id | InvalidCnt | ||
| /outputsByExtId/(outputExtId)/type | std::string | string |
string denoting output type - "measurement" in this case. |
N/A | N/A | N/A | ||
| Point features are per tool output: | ||||||||
| /outputsByExtId/(outputExtId)/posX | k64f | number |
Point feature position X. Could be null if a scan hasn't been acquired yet or was invalid. |
|||||
| /outputsByExtId/(outputExtId)/posY | k64f | number |
Point feature position Y. Could be null if a scan hasn't been acquired yet or was invalid. |
|||||
| /outputsByExtId/(outputExtId)/posZ | k64f | number |
Point feature position Z. Could be null if a scan hasn't been acquired yet or was invalid. |
|||||
| /outputsByExtId/(outputExtId)/type | std::string | string |
string denoting output type - "pointFeature" in this case. |
N/A | N/A | N/A | ||
| Line features are per tool output: | ||||||||
| /outputsByExtId/(outputExtId)/posX | k64f | number |
Line feature position X. Could be null if a scan hasn't been acquired yet or was invalid. |
|||||
| /outputsByExtId/(outputExtId)/posY | k64f | number |
Line feature position Y. Could be null if a scan hasn't been acquired yet or was invalid. |
|||||
| /outputsByExtId/(outputExtId)/posZ | k64f | number |
Line feature position Z. Could be null if a scan hasn't been acquired yet or was invalid. |
|||||
| /outputsByExtId/(outputExtId)/dirX | k64f | number |
Line feature direction X. Could be null if a scan hasn't been acquired yet or was invalid. |
|||||
| /outputsByExtId/(outputExtId)/dirY | k64f | number |
Line feature direction Y. Could be null if a scan hasn't been acquired yet or was invalid. |
|||||
| /outputsByExtId/(outputExtId)/dirZ | k64f | number |
Line feature direction Z. Could be null if a scan hasn't been acquired yet or was invalid. |
|||||
| /outputsByExtId/(outputExtId)/type | std::string | string |
string denoting output type - "lineFeature" in this case. |
N/A | N/A | N/A | ||
| Plane features are per tool output: | ||||||||
| /outputsByExtId/(outputExtId)/normalX | k64f | number |
Plane feature normal X. Could be null if a scan hasn't been acquired yet or was invalid. |
|||||
| /outputsByExtId/(outputExtId)/normalY | k64f | number |
Plane feature normal Y. Could be null if a scan hasn't been acquired yet or was invalid. |
|||||
| /outputsByExtId/(outputExtId)/normalZ | k64f | number |
Plane feature normal Z. Could be null if a scan hasn't been acquired yet or was invalid. |
|||||
| /outputsByExtId/(outputExtId)/originDistance | k64f | number |
Plane feature origin distance. Could be null if a scan hasn't been acquired yet or was invalid. |
|||||
| /outputsByExtId/(outputExtId)/type | std::string | string |
string denoting output type - "planeFeature" in this case. |
N/A | N/A | N/A | ||
| Circle features are per tool output: | ||||||||
| /outputsByExtId/(outputExtId)/posX | k64f | number |
Circle feature position X. Could be null if a scan hasn't been acquired yet or was invalid. |
|||||
| /outputsByExtId/(outputExtId)/posY | k64f | number |
Circle feature position Y. Could be null if a scan hasn't been acquired yet or was invalid. |
|||||
| /outputsByExtId/(outputExtId)/posZ | k64f | number |
Circle feature position Z. Could be null if a scan hasn't been acquired yet or was invalid. |
|||||
| /outputsByExtId/(outputExtId)/normalX | k64f | number |
Circle feature normal X. Could be null if a scan hasn't been acquired yet or was invalid. |
|||||
| /outputsByExtId/(outputExtId)/normalY | k64f | number |
Circle feature normal Y. Could be null if a scan hasn't been acquired yet or was invalid. |
|||||
| /outputsByExtId/(outputExtId)/normalZ | k64f | number |
Circle feature normal Z. Could be null if a scan hasn't been acquired yet or was invalid. |
|||||
| /outputsByExtId/(outputExtId)/radius | k64f | number |
Circle feature radius. Could be null if a scan hasn't been acquired yet or was invalid. |
|||||
| /outputsByExtId/(outputExtId)/type | std::string | string |
string denoting output type - "circleFeature" in this case. |
N/A | N/A | N/A |
Methods
| Method | Description |
|---|---|
| read |
Reads the latest tool metrics. Path parameters: extId Example: read /tools/ProfileLine-0/metrics read /tools/extId=My%20Tool%20Id/metrics which for example returns: {
"payload": {
"_links": {
"self": {
"href": "/tools/ProfileLine-0/metrics"
}
},
"outputsByExtId": {
"Angle": {
"avg": null,
"failCount": 0,
"invalidCount": 0,
"lastDecision": null,
"max": null,
"min": null,
"passCount": 0,
"range": null,
"stdDev": null,
"type": "measurement",
"value": null
},
"ArithmeticAverage": {
"avg": null,
"failCount": 0,
"invalidCount": 0,
"lastDecision": null,
"max": null,
"min": null,
"passCount": 0,
"range": null,
"stdDev": null,
"type": "measurement",
"value": null
},
"Line": {
"dirX": null,
"dirY": null,
"dirZ": null,
"posX": null,
"posY": null,
"posZ": null,
"type": "lineFeature"
},
"MaxErrPoint": {
"posX": null,
"posY": null,
"posZ": null,
"type": "pointFeature"
},
"MaxError": {
"avg": null,
"failCount": 0,
"invalidCount": 0,
"lastDecision": null,
"max": null,
"min": null,
"passCount": 0,
"range": null,
"stdDev": null,
"type": "measurement",
"value": null
},
"MaxErrorX": {
"avg": null,
"failCount": 0,
"invalidCount": 0,
"lastDecision": null,
"max": null,
"min": null,
"passCount": 0,
"range": null,
"stdDev": null,
"type": "measurement",
"value": null
},
"MaxErrorZ": {
"avg": null,
"failCount": 0,
"invalidCount": 0,
"lastDecision": null,
"max": null,
"min": null,
"passCount": 0,
"range": null,
"stdDev": null,
"type": "measurement",
"value": null
},
"MinErrPoint": {
"posX": null,
"posY": null,
"posZ": null,
"type": "pointFeature"
},
"MinError": {
"avg": null,
"failCount": 0,
"invalidCount": 0,
"lastDecision": null,
"max": null,
"min": null,
"passCount": 0,
"range": null,
"stdDev": null,
"type": "measurement",
"value": null
},
"MinErrorX": {
"avg": null,
"failCount": 0,
"invalidCount": 0,
"lastDecision": null,
"max": null,
"min": null,
"passCount": 0,
"range": null,
"stdDev": null,
"type": "measurement",
"value": null
},
"MinErrorZ": {
"avg": null,
"failCount": 0,
"invalidCount": 0,
"lastDecision": null,
"max": null,
"min": null,
"passCount": 0,
"range": null,
"stdDev": null,
"type": "measurement",
"value": null
},
"Offset": {
"avg": null,
"failCount": 0,
"invalidCount": 0,
"lastDecision": null,
"max": null,
"min": null,
"passCount": 0,
"range": null,
"stdDev": null,
"type": "measurement",
"value": null
},
"Percentile": {
"avg": null,
"failCount": 0,
"invalidCount": 0,
"lastDecision": null,
"max": null,
"min": null,
"passCount": 0,
"range": null,
"stdDev": null,
"type": "measurement",
"value": null
},
"RZ": {
"avg": null,
"failCount": 0,
"invalidCount": 0,
"lastDecision": null,
"max": null,
"min": null,
"passCount": 0,
"range": null,
"stdDev": null,
"type": "measurement",
"value": null
},
"StdDev": {
"avg": null,
"failCount": 0,
"invalidCount": 0,
"lastDecision": null,
"max": null,
"min": null,
"passCount": 0,
"range": null,
"stdDev": null,
"type": "measurement",
"value": null
}
},
"toolStats": {
"runTime": 0,
"runTimeAvg": 0,
"runTimeAvgPerc": 0,
"runTimeMax": 0,
"runTimeMin": 0
}
},
"status": 1,
"type": "response"
}
|
| stream |
Receive continuous stream of tool metrics. Path parameters: extId Example: stream /tools/ProfileLine-0/metrics stream /tools/extId=My%20Tool%20Id/metrics |
| cancelStream |
Cancel continuous stream of tool metrics. Path parameters: extId Example: cancelStream /tools/ProfileLine-0/metrics cancelStream /tools/extId=My%20Tool/metrics |
Resource Type: N/A
Array of callable custom actions provided by the tool developer. Note that this is not a collection resource; it is a resource that contains an array.
| Method | Description |
|---|---|
| read |
Reading from /tools/(id)/actions will return an array of links to custom actions provided by the tool developer. Example: read /tools/TestActions-0/actions |
Resource Type: (Callable)
ID: Named by the tool developer
Path parameters: by "extId", see methods table for which methods support path parameters.
To invoke the command through the protocol, do a call on the path given e.g call /tools/tool1/actions/reset
Each tool action has the following common schema properties:
| Item | Type | Schema | Description |
|---|---|---|---|
| id | string | readOnly |
An ID of the Tool Action that uniquely identifies the registered action. |
| displayName | culture-specific string | User configurable display name of the tool action. | |
| extId | string |
User configurable external id of the tool action. |
| Method | Description |
|---|---|
| call |
Calls the custom tool action. Path parameters: extId Arguments are currently not supported for custom tool actions. Example: call /tools/TestActions-0/actions/FlipBool Call a tool action by path parameter extId: call /tools/TestActions-0/actions/extId=My%20Tool%20Action |
None. Although the action itself doesn't raise an event notification, the side effects of a custom action could result in event notifications upon the parent tool (see /tools/(id) -- Notifications).
This section describes the control service (/controls) resources, which apply to all control services. This information can be used to implement a generic client that works with any control service be it from LMI or 3rd party.
Specific details about the Gocator standard set of control services are found in subpages.
Resource Type: (Collection - Unordered)
A collection of control services. The list of control services is determined by the available control services loaded in the system. Control services in this unordered collection cannot be created or deleted directly via the service.
Properties
None
Methods
| Method | Description |
|---|---|
| read |
Return list of control services available in the system Example: Read Available Services Example
read /controls Example Response: Read Available Services
{
"payload": {
"_embedded": {
"item": [
{
"_links": {
"self": {
"href": "/controls/gocator"
}
}
},
]
},
"_links": {
"self": {
"href": "/controls"
}
}
},
"status": 1,
"type": "response"
}
|
Notifications
None.
Resource Type: (CollectionItem)
Information about a specific control service.
Properties:
| Item | Type | Schema | Description | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| displayName | string | readOnly |
Display name of the control service that is culture-specific (i.e., translatable). This is the name that a client should display to the user. Each service defines the value of its "displayName". |
||||||||||||||
| enabled | bool | Used to enable or disable the control service. | |||||||||||||||
| id | string | readOnly |
Identifier name of the service type. This identifier name is the one used in the REST URI to access this service. Each service defines the value of its "id". |
||||||||||||||
| parameters | object | List of configurable parameters for the control service. Each control service has its own set of parameters. | |||||||||||||||
| status | enum | readOnly |
Status of the service. This item is updated when the "enabled" property is changed from true to false or vice versa. 0.3.4.20 Added these enumerated values for this field:
|
Methods
| Method | Description |
|---|---|
| read |
Return property information about the specified control service. Example: Read Controls Gocator Example
read /controls/gocator Example Response: Read Controls Gocator
{
"payload": {
"_embedded": {
"go:datasources": {
"_links": {
"self": {
"href": "/controls/gocator/outputs"
}
}
}
},
"_links": {
"self": {
"href": "/controls/gocator"
}
},
"displayName": "Gocator",
"enabled": false,
"id": "gocator",
"parameters": {
"timeout": 1.0,
"timeoutEnabled": false
},
"status": 1
},
"status": 1,
"type": "response"
}
|
| update |
Change parameters for a service such as enable/disable service, or change a service specific parameter. To see what can be changed, do a "read /controls/(serviceId)", specifying the specific service for which you want information. Example: Update Protocol Property
update /controls/gocator {"enabled" : true}
update /controls/gocator {"enabled" : false}
update /controls/gocator {"enabled" : true, "parameters" : {"timeoutEnabled":true,"timeout":1.2}}
|
| sub |
Subscribe to resource to get all the properties of the service whenever a property is changed with the UPDATE method. Example:
Subscribe Gocator
sub /controls/gocator
Example Response:
Subscribed Notification
{
"payload": {
"content": {
"_embedded": {
"go:datasources": {
"_links": {
"self": {
"href": "/controls/gocator/outputs"
}
}
},
},
"_links": {
"self": {
"href": "/controls/gocator"
}
},
"_schema": {
"properties": {
"enabled": {
"type": "boolean"
},
"parameters": {
"properties": {
"timeout": {
"type": "number"
},
"timeoutEnabled": {
"type": "boolean"
}
},
"type": "object"
}
},
"type": "object"
},
"enabled": true,
"parameters": {
"timeout": 1.0,
"timeoutEnabled": false
}
},
"eventType": "updated",
"path": "/controls/gocator"
},
"status": 1,
"type": "notification"
}
{
"payload": null,
"status": 1,
"type": "response"
}
|
Notifications
| Notification | |
|---|---|
| updated |
Occurs whenever a control property has changed.
|
Resource Type: N/A
This resource manages a control service's output map.
All services have this common parameter.
| Item | Type | Schema | Description |
|---|---|---|---|
|
acceptedDataFormats |
DataFormat[] | readOnly |
List of acceptable data formats. See Common Types. Each service output map defines its acceptable data format (scan data types). |
Output map can be one of the following types:
StandardOutputs:
An output map of StandardOutputItem.
| Item | Type | Description |
|---|---|---|
| map | An array of StandardOutputItem. | |
| attributes | StandardOutputsAttributes | Description of the StandardOutputs information. |
StandardOutputItem:
| Item | Type | Description |
|---|---|---|
| outputId |
16u |
An id used to uniquely identify the associated data source. Valid range is 0..216-2. Value of 216-1 is reserved for internal use. Note: If the client enters an output id value that is greater than 216 (65535), the output id will get truncated to a 16 bit value. e.g., Client enters output id equal to 65537. 65537 is equal to 0x10001. However, the output id will be processed as 0x0001 which is equal to 1. |
| source | string | A selected data source identifier. |
StandardOutputsAttributes
| Item | Type | Schema | Description |
|---|---|---|---|
| outputIdMin | 16u | Read-only |
Changed in 0.3.x.x added this field. The minimum output id value for a standard output item. |
| outputIdMax | 16u | Read-only |
Changed in 0.3.x.x added this field. The maximum output id value for a standard output item. |
RegisterOutputs;
An output map of RegisterOutputItem and attributes of the register output map.
| Item | Type | Description |
|---|---|---|
| map |
An array of RegisterOutputItem. |
|
| attributes | RegisterOutputsAttributes | Description of the RegisterOutputs register information. |
RegisterOutputItem:
| Item | Type | Description |
|---|---|---|
| outputId |
16u |
An id used to uniquely identify the associated data source. Valid range is 0..216-2. Value of 216-1 is reserved for internal use. Note: If the client enters an output id value that is greater than 216 (65535), the output id will get truncated to a 16 bit value. e.g., Client enters output id equal to 65537. 65537 is equal to 0x10001. However, the output id will be processed as 0x0001 which is equal to 1. |
| source | string | A selected data source identifier. |
| dataOffset |
16u |
A byte offset into the data source data received from the sensor. |
| dataLength |
16u |
A byte length specifying number of bytes to return from the data source data received from the sensor, starting from the "dataOffset" into the data source data. |
RegisterOutputsAttributes:
| Item | Type | Schema | Description |
|---|---|---|---|
| start | 16u | Read-only | The starting register number/address. |
| count | 16u | Read-only | Number of registers in the RegisterOutputs output map table. |
| itemSize | 16u | Read-only | The size of each register in the register map, in bytes. |
TextIdStandardOutputs:
This is similar to the StandardOutputs, but uses a string for the output id.
| Item | Type | Keywords | Description |
|---|---|---|---|
| map | An array of TextIdStandardOutputItem. |
TextIdStandardOutputItem:
| Item | Type | Description |
|---|---|---|
| outputId | string | An id used to uniquely identify the associated data source. |
| source | string | A selected data source identifier. |
Properties:
| Item | Type | Description |
|---|---|---|
| map |
StandardOutputs[] or RegisterOutputs[] or |
An array of either output map items. A control service supports one of the possible types. See above for details. |
Methods:
| Method | Description |
|---|---|
| read |
Read the outputs map from the service. Example: Read Controls Gocator Outputs Example
read /controls/gocator/outputs Example Response: Note this example is for a service that uses the StandardOutputs output map. Read Controls Gocator Outputs
{
"payload": {
"_links": {
"self": {
"href": "/controls/gocator/outputs"
}
},
"acceptedDataFormats": [
{
"arrayed": false,
"type": 19
}
],
"attributes": {
"outputIdMax": 65534,
"outputIdMin": 0
},
"map": [
{
"outputId": 0,
"source": "output1"
},
{
"outputId": 1,
"source": "output2"
}
]
},
"status": 1,
"type": "response"
}
|
| sub |
Subscribe to the output map resource to receive the entire outputs map when outputs map is updated with the CALL method. Example: Subscribe Gocator
sub /controls/gocator/outputs Example Output: Subscribed Notification
{
"payload": null,
"status": 1,
"type": "response"
}
|
Notifications:
| Notification | |
|---|---|
| updated |
Occurs whenever the output map has changed.
|
Resource Type: (Callable)
ADD command: to add an entry to the outputs map.
Properties
none
Methods
| Method | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| call |
Arguments:
Examples:
Add An Entry
call /controls/gocator/outputs/commands/add {"source":"scan:test:0:Output", "outputId":0}
call /controls/gocator/outputs/commands/add {"source":"scan:test:1:Output", "outputId":1}
call /controls/gocator/outputs/commands/add {"source":"scan:test:0:Output", "outputId":0, "autoShift", true}
call /controls/gocator/outputs/commands/add {"source":"scan:test:1:Output", "outputId":1, "autoShift", false}
|
Resource Type: (Callable)
REMOVE command: to remove an entry from the outputs map.
Properties
none
Methods
| Method | |||||||
|---|---|---|---|---|---|---|---|
|
call |
Arguments:
Examples:
Remove An Entry
call /controls/gocator/outputs/commands/remove {"outputId":0}
call /controls/gocator/outputs/commands/remove {"outputId":1}
|
Resource Type: (Callable)
UPDATE command: to change the output id of an existing entry.
Properties
none
Methods
| Method | |||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Call |
Arguments:
Examples:
Update An Entry
// Change entry with outputId 0 to outputId 1, only when no overlap condition is detected.
call /controls/gocator/outputs/commands/updateId {"map": [{"outputId": 0}, {"outputId": 1}]}
// Change entry with outputId 0 to outputId 1, only when no overlap condition is detected.
call /controls/gocator/outputs/commands/updateId {"map": [{"outputId": 0}, {"outputId": 1}], "autoShift": false}
// Change entry with outputId 0 to outputId 1, even when overlap condition is detected.
call /controls/gocator/outputs/commands/updateId {"map": [{"outputId": 0}, {"outputId": 1}], "autoShift": true}
|
Resource Type: (Callable)
ADDALL command: to add a list of data sources to the output map table. The list of data sources do not include output ids. The back end always auto-generate the NUMERIC output ids.
For TEXT output id, if it is provided, then it is used, otherwise missing TEXT output id is auto-generated using the "source" string.
Properties
none
Methods
| Method | |||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Call |
Arguments:
Examples:
Add Multiple Entries
call /controls/gocator/outputs/commands/addAll {"map": [ { "source": "tools:ProfileInfo-0:outputs:MaxZ" }, { "source": "tools:ProfileInfo-1:outputs:MaxY" } ] }
|
Resource Type: (Callable)
REMOVEALL command: to remove all entries in the output map table.
Properties
none
Methods
| Method | |
|---|---|
| Call |
Arguments: None Examples:
Remove All Entries
call /controls/gocator/outputs/commands/removeAll |
Resource Type: (Callable)
COMPACTID command to renumber consecutively the output ids. Starting output id depends on the output map type.
For StandardOutputs, starting default output id is 0.
For RegisterOutputs, the starting output id is start register value specified in the RegisterOutputsAttributes.
For TextIdStandardOutputs, this operation is not supported.
See StandardOutputItem, RegisterOutputItem, and TextIdStandardOutputItem for more information about these types.
Properties
none
Methods
| Method | |
|---|---|
| Call |
Arguments: None Examples:
Compact Output Ids
call /controls/gocator/outputs/commands/compactId |
Resource Type: (Streamable)
This resource manages a control service metrics.
Properties:
Each service defines its own set of metrics. Clients can only read the metrics.
Common Metrics:
| Item | Internal Type | Type | Description |
|---|---|---|---|
|
Changed in 0.3.x.x Added controlDrops |
k64u | integer |
All services contain this generic drops metric. How each service updates this metric depends on the service. Generally, services that promise lossless data will increment this drop if they cannot fulfill this promise. Services that are lossy or otherwise cannot drop generally will not update this at all. |
Methods:
| Method | Descripton |
|---|---|
| read |
Read the metrics maintained by the service. Example:
Read Metrics
read /controls/gocator/metrics
Example Response:
Read Metrics Output
{
"payload": {
"_links": {
"self": {
"href": "/controls/gocator/metrics"
}
},
"controlDrops": 0,
"ethernetOutput": 0,
"ethernetOutputCount": 0,
"ethernetRate": 0
},
"status": 1,
"type": "response"
}
|
| stream |
Stream metrics from the service Examples:
Stream Metrics
stream /controls/gocator/metrics |
| cancelStream |
Stop streaming metrics from the service Examples: Cancel Streaming Metrics
cancelStream /controls/gocator/metrics |
Changed in 1.0.x.x Resource added.
htmlResource Type: N/A
Methods
| Method | |
|---|---|
| Read |
Returns the list of register assembly links supported by this service. Example: Read Register Assemblies
read /controls/test/registerAssemblies Example Response: Read Register Assemblies Response
{
"payload": {
"_embedded": {
"item": [
{
"_links": {
"self": {
"href": "/controls/test/registerAssemblies/testAssembly-0"
}
}
},
{
"_links": {
"self": {
"href": "/controls/test/registerAssemblies/testAssembly-1"
}
}
}
]
},
"_links": {
"self": {
"href": "/controls/test/registerAssemblies"
}
}
},
"status": 1,
"type": "response"
}
The example shows the service has two register assemblies with identifiers:
|
Resource Type: N/A
Properties
|
Item |
Type |
Schema |
Description |
||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| supportedBlockTypes | array<object> | Array of register block types that are supported by the control service's register assembly. | |||||||||||||||
| supportedBlockTypes/n | object | Register block type object. | |||||||||||||||
| supportedBlockTypes/n/type | string | readOnly |
Internal id that uniquely identifies the register block type. Changed in 0.3.x.x Added the following Internal names for the block types:
|
||||||||||||||
| supportedBlockTypes/n/displayName | culture-specific string | readOnly |
Culturally-sensitive name that can be presented to the user to describe the register block. |
||||||||||||||
| supportedBlockTypes/n/registerCount | integer | readOnly | Number of registers that this register block uses. | ||||||||||||||
| supportedBlockTypes/n/instanceCount | integer | readOnly | Number of instances of this register block type that have been added to the register assembly. | ||||||||||||||
| supportedBlockTypes/n/minInstanceCount | integer | readOnly | Minimum number of instances of this register block type that must exist in the register assembly. | ||||||||||||||
| supportedBlockTypes/n/maxInstanceCount | integer | readOnly | Maximum number of instances of this register block type that can exist in the register assembly. | ||||||||||||||
|
blocks |
array<object> | Array of register block objects that have been added to the register assembly. | |||||||||||||||
| blocks/n | object | Register block object. | |||||||||||||||
| blocks/n/type | string | readOnly | Internal id that uniquely identifies the register block type. | ||||||||||||||
| blocks/n/outputId | integer |
The output id uniquely identifies the register block in the register assembly. For one register block type (identified by type), there may be multiple register blocks - each each individual register block is identified by outputId. If a global address space is used, the output id represents the starting register address of the register block. Valid range is 0..216-1. |
|||||||||||||||
| blocks/n/scannerId | string | used |
Identifies the scanner for which the register block is associated. |
||||||||||||||
| blocks/n/displayName | culture-specific string |
Culturally-sensitive name to describe the register block. displayName defaults to be the same as the title of the corresponding register block type. |
|||||||||||||||
| blocks/n/dataSource | string |
The data source of the register block. If the block type is a scan output block type (e.g., measurement/stamp block), this field is present. Otherwise, the dataSource field is not present. |
|||||||||||||||
| attributes | |||||||||||||||||
| attributes/isGlobalAddressSpaceUsed | bool | readOnly | True if the control service uses a global address space. False otherwise. | ||||||||||||||
|
attributes/outputIdMax |
integer |
readOnly |
The maximum register address value of the service register assembly. Changed in 0.3.x.x renamed from registerAddressMax. Removed "used" schema attribute. |
||||||||||||||
|
attributes/outputIdMin |
integer |
readOnly |
The minimum register address value of the service register assembly. Changed in 0.3.x.x renamed from registerAddressMin. Removed "used" schema attribute. |
Methods
| Method | |
|---|---|
| read |
Read the list of supported blocks types and added block instances for the specified register assembly use by the control protocol. Different control protocols may support different register block types. Returns commands as links. Example: Read Register Assembly
read /controls/test/registerAssemblies/testAssembly-0 Example Response: Read Register Assembly Output
{
"payload": {
"_links": {
"go:command": [
{
"href": "/controls/test/registerAssemblies/testAssembly-0/commands/add"
},
{
"href": "/controls/test/registerAssemblies/testAssembly-0/commands/remove"
},
{
"href": "/controls/test/registerAssemblies/testAssembly-0/commands/compact"
},
{
"href": "/controls/test/registerAssemblies/testAssembly-0/commands/update"
}
],
"self": {
"href": "/controls/test/registerAssemblies/testAssembly-0"
}
},
"attributes": {
"id": "testAssembly-0",
"isGlobalAddressSpaceUsed": true,
"outputIdMax": 3000,
"outputIdMin": 0
},
"blocks": [
{
"displayName": "Control Input",
"outputId": 0,
"scannerId": "",
"type": "ControlInput"
},
{
"displayName": "Control Output",
"outputId": 267,
"scannerId": "",
"type": "ControlOutput"
},
{
"displayName": "System State",
"outputId": 470,
"scannerId": "",
"type": "System"
},
{
"displayName": "Sensor Group State",
"outputId": 746,
"scannerId": "",
"type": "Scanner"
}
],
"supportedBlockTypes": [
{
"category": 1,
"displayName": "Control Input",
"hasDataSource": false,
"instanceCount": 1,
"maxInstanceCount": 1,
"minInstanceCount": 1,
"registerCount": 267,
"type": "ControlInput"
},
{
"category": 2,
"displayName": "Control Output",
"hasDataSource": false,
"instanceCount": 1,
"maxInstanceCount": 1,
"minInstanceCount": 1,
"registerCount": 203,
"type": "ControlOutput"
},
{
"category": 3,
"displayName": "System State",
"hasDataSource": false,
"instanceCount": 1,
"maxInstanceCount": 1,
"minInstanceCount": 1,
"registerCount": 276,
"type": "System"
},
{
"category": 4,
"displayName": "Sensor Group State",
"hasDataSource": false,
"instanceCount": 1,
"maxInstanceCount": 1,
"minInstanceCount": 1,
"registerCount": 218,
"type": "Scanner"
},
{
"category": 5,
"displayName": "Stamp",
"hasDataSource": true,
"instanceCount": 0,
"maxInstanceCount": 65534,
"minInstanceCount": 0,
"registerCount": 233,
"type": "Stamp"
},
{
"category": 6,
"displayName": "Measurement",
"hasDataSource": true,
"instanceCount": 0,
"maxInstanceCount": 65534,
"minInstanceCount": 0,
"registerCount": 5,
"type": "Measurement"
}
]
},
"status": 1,
"type": "response"
}
|
Resource Type: (CollectionItem)
A collection of commands for the control service's register assembly.
Methods:
|
Method |
Description |
|---|---|
| read |
Returns a list of register assembly commands as embedded resources. Example: Read Register Assembly Commands
read /controls/test/registerAssemblies/testAssembly-0/commands Example response: ead Register Assembly Actions
{
"payload": {
"_embedded": {
"item": [
{
"_links": {
"self": {
"href": "/controls/test/registerAssemblies/testAssembly-0/commands/add"
}
}
},
{
"_links": {
"self": {
"href": "/controls/test/registerAssemblies/testAssembly-0/commands/remove"
}
}
},
{
"_links": {
"self": {
"href": "/controls/test/registerAssemblies/testAssembly-0/commands/compact"
}
}
},
{
"_links": {
"self": {
"href": "/controls/test/registerAssemblies/testAssembly-0/commands/update"
}
}
}
]
},
"_links": {
"self": {
"href": "/controls/test/registerAssemblies/testAssembly-0/commands"
}
}
},
"status": 1,
"type": "response"
}
|
Resource Type: (CollectionItem, Callable)
ADD command: to add one or more register blocks to the register assembly.
This command can also be read to obtain information about the command.
Properties
|
Item |
Type |
Schema |
Description |
|---|---|---|---|
| id | string | The identifier of the register assembly command. | |
| parameters | object |
Describes the parameters that the register assembly command can take. |
Methods
| Method | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| read |
Returns the input parameters for the command. Example: Read Register Assembly Command Add
read /controls/modbus/registerAssemblies/registerAssembly-0/commands/add Example response: Read Register Assembly Add
{
"payload": {
"_links": {
"self": {
"href": "/controls/modbus/registerAssemblies/registerAssembly-0/commands/add"
}
},
"id": "add",
"parameters": {
"autoShift": false,
"blocks": []
}
},
"status": 1,
"type": "response"
}
|
|||||||||||||||||||||||||||
| call |
If one or more of the register blocks listed in the "blocks" array cannot be added, a user log warning will be generated with a corresponding error message. The invalid block entry will be skipped and the rest of the blocks in the "blocks" array will be added to the register assembly. If one or more of the register blocks listed in "blocks" are successfully added to the register assembly, the add command will return successfully. If none of the register blocks listed in "blocks" were able to be added to the register assembly, the add command will return an error. Arguments:
Examples: The add command can be used for the following scenarios:
|
Resource Type: (CollectionItem, Callable)
REMOVE command: to remove one or more register blocks from the register assembly.
This commandcan also be read to obtain information about the command.
Properties
|
Item |
Type |
Schema |
Description |
|---|---|---|---|
| id | string | The identifier of the register assembly command. | |
| parameters | object |
Describes the parameters that the register assembly command can take. |
Methods
| Method | |||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| read |
Returns the input parameters for the command. Example response: Read Register Assembly Remove
{
"payload": {
"_links": {
"self": {
"href": "/controls/modbus/registerAssemblies/registerAssembly-0/commands/remove"
}
},
"id": "remove",
"parameters": {
"blockIds": []
}
},
"status": 1,
"type": "response"
}
|
||||||||||||
| call |
If one or more of the register blocks listed in the "blockIds" array cannot be removed, a user log warning will be generated with a corresponding error message. The invalid block entry will be skipped and the rest of the blocks in the "blockIds" array will be removed from the register assembly. If one or more of the register blocks listed in "blockIds" are successfully removed from the register assembly, the remove command will return successfully. If none of the register blocks listed in "blockIds" were able to be removed from the register assembly, the removed command will return an error.
Examples: The remove command can be used for the following scenarios:
|
Resource Type: (CollectionItem, Callable)
COMPACT command: to compact the output ids in the register assembly to eliminate unused space between register blocks.
This command can also be read to obtain information about the command.
Properties
|
Item |
Type |
Schema |
Description |
|---|---|---|---|
| id | string | The identifier of the register assembly command. | |
| parameters | object |
Describes the parameters that register assembly commands can take. |
Methods
| Method | |||||||
|---|---|---|---|---|---|---|---|
| read |
Returns the input parameters for the command. Example response: Read Register Assembly Compact
{
"payload": {
"_links": {
"self": {
"href": "/controls/modbus/registerAssemblies/registerAssembly-0/commands/compact"
}
},
"id": "compact",
"parameters": {
"startingOutputId": null
}
},
"status": 1,
"type": "response"
}
|
||||||
| call |
Arguments:
Examples: The compact command can be used for the following scenarios:
|
Resource Type: (CollectionItem, Callable)
UPDATE command: to update a register block in the register assembly.
This command can also be read to obtain information about the command.
Properties
|
Item |
Type |
Schema |
Description |
|---|---|---|---|
| id | string | The identifier of the register assembly command. | |
| parameters | object |
Describes the parameters that the register assembly command can take. |
Methods
| Method | |||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| read |
Returns the input parameters for the command. Example response: >Read Register Assembly Update
{
"payload": {
"_links": {
"self": {
"href": "/controls/modbus/registerAssemblies/registerAssembly-0/commands/update"
}
},
"id": "update",
"parameters": {
"autoShift": false,
"newParams": {
"dataSource": "",
"displayName": "",
"outputId": null,
"scannerId": ""
},
"outputId": null
}
},
"status": 1,
"type": "response"
}
|
||||||||||||||||||||||||
| call |
Arguments:
Examples: Update block example
call /controls/modbus/registerAssemblies/registerAssembly-0/commands/update {
"outputId":100,
"autoShift":true,
"newParams":{
"dataSource":"tool1:data:source:id",
"outputId":200,
"scannerId":"scanner-0",
"displayName":"New Display Name"}}
|
This section describes the standard control protocol resources called Gocator Data Protocol that is included with each LMI Gocator release. Please refer to Control Resources page for general background on the control resources.
Gocator supports the properties and parameters documented for Control Resources /controls/(serviceId)
In addition, GDP adds the following:
Properties:
| Item | Type | Schema | Description |
|---|---|---|---|
| displayName | string | readOnly | Set to "Gocator" |
| id | string | readOnly |
Set to "gocator". |
Parameters:
| Item | Type | Schema | Description |
|---|---|---|---|
| timeoutEnabled | bool | When enabled, a blocked write operation times out and causes the connection to close. | |
| timeout | number | minimum, maximum | The timeout value in us. |
Uses the StandardOutputs output map.
Metrics behavior and base functionality is covered for all Control protocols in Control Resources /controls/(protocolId)/metrics
In addition to this, the gocator control protocol adds the following metrics:
Metrics:
| Item | Type | Schema | Description | Gocator IndicatorId | Gocator Instance | Gocator Name |
|---|---|---|---|---|---|---|
| ethernetOutput | integer |
Number of bytes sent out by the Gocator Data Protocol over the Ethernet interface via TCP. |
21003 | N/A | gocator/netTp | |
| ethernetOutputCount | integer | Number of messages sent by the Gocator Data Protocol over the Ethernet interface via TCP. | N/A | N/A | N/A | |
| ethernetRate | integer | The rate of transmission out the Ethernet interface in bytes per second over the Ethernet interface via TCP. | 21004 | N/A | gocator/netRate | |
|
controlDrops |
integer |
Note: this is a generic metric across all control services, but this implementation is GDP-specific. Number of dropped scan results. Changed in 0.3.x.x Added this metric. |
21012 |
N/A |
gocator/serverDrops |
|
| inputBufferMsgCount | integer | Current number of messages in Gocator Data Protocol's input buffer(s). This buffer is used to temporarily store the messages as they are received by the Gocator Data Protocol. | N/A | N/A | N/A | |
| maxInputBufferMsgCount | integer | Maximum number of messages that Gocator Data Protocol's input buffer(s) can contain. | N/A | N/A | N/A | |
| outputBufferMsgCount | integer | Current number of messages in Gocator Data Protocol's output buffer(s). This buffer is used to store messages destined to Gocator Data Protocol clients. | N/A | N/A | N/A | |
| maxOutputBufferMsgCount | integer | Maximum number of messages that Gocator Data Protocol's output buffer(s) can contain. | N/A | N/A | N/A |
Note:
ethernetOutput will keep its last known value during the following scenarios:
ethernetOutput will reset to 0 when scanner starts again.
ethernetRate is calculated upon every metrics refresh/update trigger, currently at 4hz.
GDP server holds one or more of internal message queue for buffering. if during its operation, its internal buffer is full, the messages will start to get dropped, thus a serverDrops will be reported.
controlDrops may happen for various reasons,
When controlDrops happens, it is likely for the same metric update period, the ethernetOutput does not increment (no additional data is sent), and ethernetRate is likely 0 (no additional data is sent in a given time).
Note that when GDP server is not able to handle the rate of incoming messages, one or a combination of the following conditions will occur,
Because camera buffer has a total buffer size limit, and GDP server internal queue has a total number of messages limit, thus whether the messages are dropped in camera buffer or GDP controlDrops is influenced by many factors such as the individual messages size, number of messages over a period of time, etc.
When inputBufferMsgCount reaches maxInputBufferMsgCount, controlDrops happen.
Both maxInputBufferMsgCount and maxOutputBufferMsgCount are dependent on the following,
The number of GDP clients and outputs are multiplied with the number of results each buffer can contain to get the maximum number of messages. The one exception is that when there are no GDP outputs, the maximum number becomes the number of GDP clients multiplied by the number of results each buffer can contain.
This section describes the standard control protocol resources called HMI Protocol that is included with each LMI Gocator release. Please refer to Control Resources page for general background on the control resources.
HMI supports the properties and parameters documented for Control Resources /controls/(serviceId)
In addition, HMI adds the following:
Properties:
| Item | Type | Schema | Description |
|---|---|---|---|
| displayName | string | readOnly |
Set to "HMI" |
| id | string | readOnly |
Set to "hmi". |
Parameters:
| Item | Type | Schema | Description | ||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| appUrl | string | readOnly | The web URL used to connect to the HMI application. Defaults to "Undefined". | ||||||||||||||||||||||
| appName | string | readOnly | The name of the HMI application. Defaults to "GoHMI". | ||||||||||||||||||||||
| appState | integer | readOnly, enum |
The status of the HMI application. The fields for this enumeration are:
|
||||||||||||||||||||||
| connectVersion | string | readOnly | The version of the Smart HMI WebIQ Connect that is running on the same platform as the Gocator software. |
Uses TextIdStandardOutputs output map.
For the AddAll command, the output ids are optional. If they are missing, they will be auto-generated
using the "source" string.
If it is present, then the client provided output id is used.
Currently there are no HMI metrics defined.
Resource Type: (CollectionItem)
A collection of HMI application actions defined by the HMI service.
| Method | Description |
|---|---|
| read |
Returns a list of actions for the HMI service as embedded resources. Examples: HMI Service Actions Example
read /controls/hmi/actions
Output:
{
"payload": {
"_embedded": {
"item": [
{
"_links": {
"self": {
"href": "/controls/hmi/actions/activate"
}
}
},
{
"_links": {
"self": {
"href": "/controls/hmi/actions/deactivate"
}
}
},
{
"_links": {
"self": {
"href": "/controls/hmi/actions/createApp"
}
}
},
{
"_links": {
"self": {
"href": "/controls/hmi/actions/removeApp"
}
}
},
{
"_links": {
"self": {
"href": "/controls/hmi/actions/downloadApp"
}
}
},
{
"_links": {
"self": {
"href": "/controls/hmi/actions/uploadApp"
}
}
}
]
},
"_links": {
"self": {
"href": "/controls/hmi/actions"
}
}
},
"status": 1,
"type": "response"
}
|
None.
Resource Type: (CollectionItem, Callable)
ID: Predefined by HMI service.
A custom HMI service callable action. It can also be read to obtain information about the action such as the parameters supported.
| Item | Type | Schema | Description | |||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| parameters | object | readOnly |
Describes the parameters that the custom HMI service action takes.
|
| Method | Description |
|---|---|
| read |
Reads the HMI service custom action resource. Example response: read /controls/hmi/actions/uploadApp
Output:
{
"payload": {
"_links": {
"self": {
"href": "/controls/hmi/actions/uploadApp"
}
},
"id": "uploadApp",
"parameters": {
"data": []
}
},
"status": 1,
"type": "response"
}
|
| call |
Calls the action resource. Example request: call /controls/hmi/actions/uploadApp {"parameters": {"data": ** binary byte stream **}}
|
None.
This section describes the standard control protocol resources called Modbus Protocol that is included with each LMI Gocator release. Please refer to Control Resources page for general background on the control resources.
Modbus supports the properties and parameters documented for Control Resources /controls/(serviceId)
In addition, Modbus adds the following:
Properties:
| Item | Type | Schema | Description |
|---|---|---|---|
| displayName | string | readOnly |
Set to "Modbus" |
| id | string | readOnly |
Set to "modbus". |
Parameters:
| Item | Type | Schema | Description |
|---|---|---|---|
| resultBufferEnabled | boolean |
Used to enable/disable buffering of scan outputs. Buffering should be enabled when part detection is used and if multiple objects may be detected within a time frame shorter than the polling rate of the PLC. If buffering is enabled, the PLC must send the 'Buffer Advance' command to advance the queue before reading the measurement results. |
Currently no Modbus metrics are defined.
Modbus does NOT support the "outputs" resource.
Changed in 1.0.x.x added support for registerAssemblies resource.
Modbus supports the "registerAssemblies" resource. It has just one instance of the resource whose identifier is "registerAssembly-0".
/controls/modbus/registerAssemblies/registerAssembly-0
Modbus register assembly instance has the following properties:
Properties:
|
Item |
Type |
Schema |
Description |
||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| supportedBlockTypes | array<object> | Array of register block types that are supported by the control service's register assembly. | |||||||||||||||
| supportedBlockTypes/n/type | string | readOnly |
Internal id that uniquely identifies the register block type. Changed in 0.3.x.x added the following set of block type names. Block type names used by Modbus are:
|
||||||||||||||
| attributes | |||||||||||||||||
| attributes/isGlobalAddressSpaceUsed | bool | readOnly | True | ||||||||||||||
|
attributes/outputIdMax |
integer |
readOnly. |
The maximum register address value of the service register assembly. Changed in 0.3.x.x changed name from registerAddressMax to outputIdMax.
|
||||||||||||||
|
attributes/outputIdMin |
integer |
readOnly. |
The minimum register address value of the service register assembly. Changed in 0.3.x.x changed name from registerAddressMin to outputIdMin.
|
This section describes the standard control protocol resources called Ethernet ASCII Protocol that is included with each LMI Gocator release. Please refer to Control Resources page for general background on the control resources.
Ethernet ASCII supports the properties and parameters documented for Control Resources /controls/(serviceId)
In addition, Ethernet ASCII adds the following:
| Item | Type | Schema | Description |
|---|---|---|---|
| displayName | string | readOnly |
Set to "Ethernet ASCII" |
| id | string | readOnly |
Set to "e-ascii". |
Parameters:
| Item | Type | Schema | Description |
|---|---|---|---|
| allowAsync | bool |
Indicates whether user has enabled Ethernet ASCII to send data to the client asynchronously. When enabled, scan output data is sent to the Ethernet ASCII client without the client requesting the data. The format of the output depends on "asyncFormatMode" setting. When disabled, data is sent only upon explicit request from the Ethernet ASCII client. Regardless of the value of this setting, it is always possible to poll for scan output data. 0.3.3.5 added this parameter. |
|
| commandDelimiter | character |
Determines the delimter used to separate command fields and output fields. Default value is ",". |
|
| controlPort | number |
16-bit port number of TCP connection used to connect to the Ethernet ASCII service. Default value is 8190. Minimum value is 0. Maximum value is 65534. |
|
| customFormat | string |
This is the formatting of output data (stamp and/or measurement data) the user wants to sent to the Ethernet ASCII client. Applicable to both
Default value is "%time, %value[0] %decision[0]" |
|
| delimiterTermination | string |
A string that the Ethernet ASCII service uses to terminate a line of output to the Ethernet ASCII client. Default value is "%r%n". |
|
| invalidValue | string |
A string that the Ethernet ASCII service uses to indicate that a measurement value is invalid. Default value is "INVALID". |
|
| asyncFormatMode | number |
User configured output format mode that the Ethernet ASCII service should use when sending data to the Ethernet ASCII client in asynchronous mode operation. 0 = Standard formatting of output. The output format is "M<id><delim>V<value><delim>D<decision><delim>" 1 = Standard formatting of output with encoder and frame index. The output format is "T<time><delim>E<encoder><delim>M<id><delim>V<value><delim>D<decision><delim>" 2 = custom formatting (see customFormat description above). Default value is 0 ("Standard") |
Ethernet ASCII does NOT support the "outputs" resource
Changed in 1.0.x.x added support for registerAssemblies resource.
Ethernet ASCII supports the "registerAssemblies" resource. It has just one instance of the resource whose identifier is "registerAssembly-0".
/controls/e-ascii/registerAssemblies/registerAssembly-0
Ethernet ASCII register assembly instance has the following properties:
Properties
| Item | Type | Schema | Description | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| supportedBlockTypes | array<object> | Array of register block types that are supported by the control service's register assembly. | |||||||||
| supportedBlockTypes/n/type | string | readOnly |
Internal id that uniquely identifies the register block type. Changed in 0.3.x.x added the following block names. Block type names used by Ethernet ASCII are:
|
||||||||
| attributes | |||||||||||
| attributes/isGlobalAddressSpaceUsed | bool | readOnly | False | ||||||||
|
attributes/outputIdMax |
integer |
readOnly. |
The maximum register address value of the service register assembly. Changed in 0.3.x.x renamed from registerAddressMax to outputIdMax.
|
||||||||
|
attributes/outputIdMin |
integer |
readOnly. |
The minimum register address value of the service register assembly. Changed in 0.3.x.x renamed from registerAddressMin to outputIdMin.
|
This section describes the standard control protocol resources called Ethernet/IP Protocol that is included with each LMI Gocator release. Please refer to the Control Resources page for general background on the control resources.
EtherNet/IP supports the properties and parameters documented for Control Resources /controls/(serviceId)
In addition, EtherNet/IP adds the following:
Properties:
|
Item |
Type |
Schema |
Description |
|---|---|---|---|
| displayName | string | readOnly |
Set to "EtherNet/IP" |
| id | string | readOnly |
Set to "ethernetIp". |
| enabled | boolean | read/write |
Set to true for enabling EtherNet/IP service Set to false for disabling EtherNet/IP service |
Parameters:
|
Item |
Type |
Schema |
Description |
||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| bufferEnabled | boolean |
Used to enable/disable buffering of scan outputs. Buffering should be enabled when part detection is used and if multiple objects may be detected within a time frame shorter than the polling rate of the PLC. |
|||||||||||||
| isBigEndianOutput | boolean | Output in Big Endian Format | |||||||||||||
| implicitTriggerOverride | enum |
Implicit Trigger Override
|
Currently no EtherNet/IP metrics are defined.
EtherNet/IP does NOT support the "outputs" resource.
Changed in 1.0.x.x added support for registerAssemblies resource.
Ethernet/IP supports the "registerAssemblies" resource. It has multiple instances of the register assembly resource whose identifier are:
| Register Assembly Name | Register Assembly Id | Rest API |
|---|---|---|
| Command Input | commandInput | "/controls/ethernetIp/registerAssemblies/commandInput" |
| Command Output | commandOutput | "/controls/ethernetIp/registerAssemblies/commandOutput" |
| Implicit Command Input | implicitCommandInput | "/controls/ethernetIp/registerAssemblies/implicitCommandInput" |
| Scan Output | scanOutput | "/controls/ethernetIp/registerAssemblies/scanOutput" |
| Sensor Group State | scannerState | "/controls/ethernetIp/registerAssemblies/scannerState" |
| System State | systemState | "/controls/ethernetIp/registerAssemblies/systemState" |
NOTE: Each register assembly in EtherNet/IP has an corresponding object
in EtherNet/IP protocol. The mandatory
objects doesn't have a register assemblies in EtherNet/IP.
Register assembly cannot
be created or deleted via the EtherNet/IP protocol.
|
Method |
Description |
|
|---|---|---|
| read |
Reads all register assemblies, the list of register assemblies are returned as embedded items. Example response:
|
EtherNet/IP register assembly Command Input instance has the following properties:
Properties:
|
Item |
Type |
Schema |
Description |
||||
|---|---|---|---|---|---|---|---|
|
supportedBlockTypes |
array<object> |
Array of register block types that are supported by the control service's register assembly. |
|||||
| supportedBlockTypes/n/type | string | readOnly |
Internal id that uniquely identifies the register block type. Block type names used by EtherNet/IP is:
|
||||
| attributes | |||||||
| attributes/isGlobalAddressSpaceUsed | bool | readOnly | True | ||||
|
attributes/outputIdMin |
integer |
readOnly |
The minimum register address value of the service register assembly.
|
||||
|
attributes/outputIdMax |
integer |
readOnly |
The maximum register address value of the service register assembly.
|
EtherNet/IP register assembly Command Output instance has the following properties:
Properties:
|
Item |
Type |
Schema |
Description |
||||
|---|---|---|---|---|---|---|---|
|
supportedBlockTypes |
array<object> |
Array of register block types that are supported by the control service's register assembly. |
|||||
| supportedBlockTypes/n/type | string | readOnly |
Internal id that uniquely identifies the register block type. Block type names used by EtherNet/IP is:
|
||||
| attributes | |||||||
| attributes/isGlobalAddressSpaceUsed | bool | readOnly | True | ||||
|
attributes/outputIdMin |
integer |
readOnly |
The minimum register address value of the service register assembly.
|
||||
|
attributes/outputIdMax |
integer |
readOnly |
The maximum register address value of the service register assembly.
|
EtherNet/IP register assembly Implicit Command Input instance has the following properties:
Properties:
|
Item |
Type |
Schema |
Description |
||||
|---|---|---|---|---|---|---|---|
|
supportedBlockTypes |
array<object> |
Array of register block types that are supported by the control service's register assembly. |
|||||
| supportedBlockTypes/n/type | string | readOnly |
Internal id that uniquely identifies the register block type. Block type names used by EtherNet/IP is:
|
||||
| attributes | |||||||
| attributes/isGlobalAddressSpaceUsed | bool | readOnly | True | ||||
|
attributes/outputIdMin |
integer |
readOnly |
The minimum register address value of the service register assembly.
|
||||
|
attributes/outputIdMax |
integer |
readOnly |
The maximum register address value of the service register assembly.
|
EtherNet/IP register assembly Scan Output instance has the following properties:
Properties:
|
Item |
Type |
Schema |
Description |
||||||
|---|---|---|---|---|---|---|---|---|---|
|
supportedBlockTypes |
array<object> |
Array of register block types that are supported by the control service's register assembly. |
|||||||
| supportedBlockTypes/n/type | string | readOnly |
Internal id that uniquely identifies the register block type. Block type names used by EtherNet/IP is:
|
||||||
| attributes | |||||||||
| attributes/isGlobalAddressSpaceUsed | bool | readOnly | True | ||||||
|
attributes/outputIdMin |
integer |
readOnly |
The minimum register address value of the service register assembly.
|
||||||
|
attributes/outputIdMax |
integer |
readOnly |
The maximum register address value of the service register assembly.
|
EtherNet/IP register assembly Sensor Group State instance has the following properties:
Properties:
|
Item |
Type |
Schema |
Description |
||||
|---|---|---|---|---|---|---|---|
|
supportedBlockTypes |
array<object> |
Array of register block types that are supported by the control service's register assembly. |
|||||
| supportedBlockTypes/n/type | string | readOnly |
Internal id that uniquely identifies the register block type. Block type names used by EtherNet/IP is:
|
||||
| attributes | |||||||
| attributes/isGlobalAddressSpaceUsed | bool | readOnly | True | ||||
|
attributes/outputIdMin |
integer |
readOnly |
The minimum register address value of the service register assembly.
|
||||
|
attributes/outputIdMax |
integer |
readOnly |
The maximum register address value of the service register assembly.
|
EtherNet/IP register assembly System State instance has the following properties:
Properties:
|
Item |
Type |
Schema |
Description |
||||
|---|---|---|---|---|---|---|---|
|
supportedBlockTypes |
array<object> |
Array of register block types that are supported by the control service's register assembly. |
|||||
| supportedBlockTypes/n/type | string | readOnly |
Internal id that uniquely identifies the register block type. Block type names used by EtherNet/IP is:
|
||||
| attributes | |||||||
| attributes/isGlobalAddressSpaceUsed | bool | readOnly | True | ||||
|
attributes/outputIdMin |
integer |
readOnly |
The minimum register address value of the service register assembly.
|
||||
|
attributes/outputIdMax |
integer |
readOnly |
The maximum register address value of the service register assembly.
|
This page describes the standard control protocol resources called PROFINET Protocol that is included with each LMI Gocator release. Please refer to Control Resources page for general background on the control resources.
PROFINET supports the properties and parameters documented for Control Resources /controls/(serviceId)
In addition, PROFINET adds the following:
Properties:
| Item | Type | Schema | Description |
|---|---|---|---|
| displayName | string | readOnly |
Set to "Profinet" |
| id | string | readOnly |
Set to "profinet". |
Currently no PROFINET metrics are defined.
PROFINET does NOT support the "outputs" resource.
Changed in 1.0.x.x added support for registerAssemblies resource.
PROFINET supports the "registerAssemblies" resource. It has multiple instances of the resource whose identifier are:
| Register Assembly Name | Register Assembly Id | Rest API |
|---|---|---|
| Command Input | commandInput | "/controls/profinet/registerAssemblies/commandInput" |
| Command Output | commandOutput | "/controls/profinet/registerAssemblies/commandOutput" |
| Stamp Scan Output | stamp | "/controls/profinet/registerAssemblies/stamp" |
| Measurement Scan Output | measurement | "/controls/profinet/registerAssemblies/measurement" |
| Sensor Group State | scannerState | "/controls/profinet/registerAssemblies/scannerState" |
| System State | systemState | "/controls/profinet/registerAssemblies/systemState" |
NOTE: Each module in PROFINET has corresponding register assembly support.
Register assembly
cannot be created or deleted via the PROFINET protocol.
|
Method |
Description |
|
|---|---|---|
| read |
Reads all register assemblies, the list of register assemblies are returned as embedded items. Example response:
|
PROFINET register assembly Command Input instance has the following properties:
Properties:
|
Item |
Type |
Schema |
Description |
||||
|---|---|---|---|---|---|---|---|
|
supportedBlockTypes |
array<object> |
Array of register block types that are supported by the control service's register assembly. |
|||||
| supportedBlockTypes/n/type | string | readOnly |
Internal id that uniquely identifies the register block type. Block type names used by Ethernet/IP is:
|
||||
| attributes | |||||||
| attributes/isGlobalAddressSpaceUsed | bool | readOnly | True | ||||
|
attributes/outputIdMin |
integer |
readOnly |
The minimum register address value of the service register assembly.
|
||||
|
attributes/outputIdMax |
integer |
readOnly |
The maximum register address value of the service register assembly.
|
PROFINET register assembly Command Output instance has the following properties:
Properties:
|
Item |
Type |
Schema |
Description |
||||
|---|---|---|---|---|---|---|---|
|
supportedBlockTypes |
array<object> |
Array of register block types that are supported by the control service's register assembly. |
|||||
| supportedBlockTypes/n/type | string | readOnly |
Internal id that uniquely identifies the register block type. Block type names used by PROFINET is:
|
||||
| attributes | |||||||
| attributes/isGlobalAddressSpaceUsed | bool | readOnly | True | ||||
|
attributes/outputIdMin |
integer |
readOnly |
The minimum register address value of the service register assembly.
|
||||
|
attributes/outputIdMax |
integer |
readOnly |
The maximum register address value of the service register assembly.
|
PROFINET register assembly Stamp Scan Output instance has the following properties:
Properties:
|
Item |
Type |
Schema |
Description |
||||
|---|---|---|---|---|---|---|---|
|
supportedBlockTypes |
array<object> |
Array of register block types that are supported by the control service's register assembly. |
|||||
| supportedBlockTypes/n/type | string | readOnly |
Internal id that uniquely identifies the register block type. Block type names used by PROFINET is:
|
||||
| attributes | |||||||
| attributes/isGlobalAddressSpaceUsed | bool | readOnly | True | ||||
|
attributes/outputIdMin |
integer |
readOnly |
The minimum register address value of the service register assembly.
|
||||
|
attributes/outputIdMax |
integer |
readOnly |
The maximum register address value of the service register assembly.
|
PROFINET register assembly Measurement Scan Output instance has the following properties:
Properties:
|
Item |
Type |
Schema |
Description |
||||
|---|---|---|---|---|---|---|---|
|
supportedBlockTypes |
array<object> |
Array of register block types that are supported by the control service's register assembly. |
|||||
| supportedBlockTypes/n/type | string | readOnly |
Internal id that uniquely identifies the register block type. Block type names used by PROFINET is:
|
||||
| attributes | |||||||
| attributes/isGlobalAddressSpaceUsed | bool | readOnly | True | ||||
|
attributes/outputIdMin |
integer |
readOnly |
The minimum register address value of the service register assembly.
|
||||
|
attributes/outputIdMax |
integer |
readOnly |
The maximum register address value of the service register assembly.
|
PROFINET register assembly Sensor Group State instance has the following properties:
Properties:
|
Item |
Type |
Schema |
Description |
||||
|---|---|---|---|---|---|---|---|
|
supportedBlockTypes |
array<object> |
Array of register block types that are supported by the control service's register assembly. |
|||||
| supportedBlockTypes/n/type | string | readOnly |
Internal id that uniquely identifies the register block type. Block type names used by PROFINET is:
|
||||
| attributes | |||||||
| attributes/isGlobalAddressSpaceUsed | bool | readOnly | True | ||||
|
attributes/outputIdMin |
integer |
readOnly |
The minimum register address value of the service register assembly.
|
||||
|
attributes/outputIdMax |
integer |
readOnly |
The maximum register address value of the service register assembly.
|
PROFINET register assembly System State instance has the following properties:
Properties:
|
Item |
Type |
Schema |
Description |
||||
|---|---|---|---|---|---|---|---|
|
supportedBlockTypes |
array<object> |
Array of register block types that are supported by the control service's register assembly. |
|||||
| supportedBlockTypes/n/type | string | readOnly |
Internal id that uniquely identifies the register block type. Block type names used by PROFINET is:
|
||||
| attributes | |||||||
| attributes/isGlobalAddressSpaceUsed | bool | readOnly | True | ||||
|
attributes/outputIdMin |
integer |
readOnly |
The minimum register address value of the service register assembly.
|
||||
|
attributes/outputIdMax |
integer |
readOnly |
The maximum register address value of the service register assembly.
|
Resource Type: N/A
Contains a list of routine types available to the system.
For description of routine types available, see Routine Resources.
ToolType Schema:
| Item | Type | Schema | Description |
|---|---|---|---|
| description | string | readOnly | Describes the function and purpose of the routine. |
| displayName | culture-specific string | readOnly | Name of the routine. e.g: "Simple test routine", "Alignment prototype routine". |
| helpHtml | string | readOnly | Html help string for this routine. If both helpURL and helpHtml is specified helpURL will take precedence. |
| helpUrl | string | readOnly | Html help URL string for this routine. If both helpURL and helpHtml is specified helpURL will take precedence. |
| type | string | readOnly |
The name of this routine's type, e.g., "Simple", "Alignment". |
Methods
| Method | Description |
|---|---|
| read |
Reads the list of routine types available. Example: read /routineTypes |
Resource Type:
A collection of routines.
Methods
| Method | Description | ||||||
|---|---|---|---|---|---|---|---|
| read |
Read all routines loaded in the system. Example: read /routines {"expandLevel": -1}
|
||||||
| create |
Adds a routine instance into the system. Arguments:
Examples: create /routines {"type": "Alignment"}
|
| Event Type | Description |
|---|---|
| created |
Occurs whenever a new routine instance is created. Example: { "eventType": "created", "path": "/routines/routineId" }
|
| updated |
Occurs when all the routines are deleted at once using the wildcard (*) in the delete command Example: "eventType": "updated", "path": "/routines" |
Resource Type: (CollectionItem)
ID: auto generated when the routine is first added
NOTE: Each routine should share the following common properties, but
the schema for each routine within the collection may be different due
to different 'parameters'.
All items are read only except parameter items which can be
modified prior to running of the routine's processing.
| Item | Type | Schema | Description |
|---|---|---|---|
| currentProgress | integer | readOnly, minimum | Progress of the run task currently executing in a routine step. Value can range from 0 - 100 in units of percent. |
| currentStep | integer | readOnly, minimum | Value indicating current stage of the alignment process. Can range from 0 to 'totalSteps' parameter. |
| currentStepInfo | string | readOnly | Description of the step the routine is currently in. |
| description | culture-specific string | readOnly | Description of the routine. |
| displayName | culture-specific string | readOnly | Display name of the routine. |
| helpHtml | string | readOnly | Help info (in html) about the tool. |
| id | string | readOnly | Id of the instance of the routine. |
| parameters | object | Modifiable parameters of the routine. Dependent on the specific routine type. | |
| results | object | readOnly | Results returned after performing the routine. Dependent on the specific routine type. |
| state | integer | readOnly, enum | Current state of the routine: 0 = READY, 1 = RUNNING, 2 = WAITING, 3 = DONE, 4 = ABORTED 5 = FAILED. |
| stateDetails | string | readOnly | Description details of the current state. Usually used to provide info for FAILED state but can be used for other states. |
| totalSteps | integer | readOnly, minimum | Total steps in the alignment process. |
| type | string | readOnly | Type of the routine. |
| Method | Description | ||||||
|---|---|---|---|---|---|---|---|
| read |
Read a specific routine. Example: read /routines/routineId { "expandLevel": -1 }
|
||||||
| update |
Update a specific routine's parameters. Arguments:
Examples: Update routine's delay parameter: update /routines/routineId { "parameters": { "delay": 2000000 }}
Update multiple routine properties at once: update /routines/routineId { "parameters": { "delay": 2000000, "delayMul": 200 }}
|
||||||
| delete |
Deletes a routine from the system, typically when the routine is completed or aborted. The path to the routine instance must be provided. Examples: Delete a single routine: delete /routines/routineId A special wildcard form applies to this delete method. The path of this routines command can be wildcarded to delete all routines: delete /routines/* |
| Event Type | Description |
|---|---|
| created |
Occurs when a new routine is added. The path indicates the new routine id. Example: {"eventType": "created", "path": "/routines/routineId"}
|
| updated |
Occurs whenever routine's parameters change. The path indicates the affected routine id. Example: "eventType": "updated", "path": "/routines/routineId" |
| deleted |
Occurs whenever a routine is deleted, usually after the routine is completed or aborted. The path indicates the routine id that was deleted. Example: {"eventType": "deleted", "path": "/routines/routineId"}
|
Throughout this document, the annotation is used to indicated that a Resource, or particular aspect of a Resource is currently "in-progress" and subject to change.
The routines are listed here separately for easier searching and lookup.
Resource Type: N/A
Contains information on what an alignment routine contains and how it is designed to function.
All parameters listed are read only except where specified as "modifiable".
| Routine parameters | Type | Schema | Description |
|---|---|---|---|
| currentProgress | integer | readOnly | Progress of the run task currently executing in a routine step. Value can range from 0 - 100 in units of percent. |
| currentStep | integer | readOnly | Value indicating current stage of the alignment process. Can range from 0 to 'totalSteps' parameter. |
| currentStepInfo | string | readOnly | Description of the step the routine is currently in. |
| description | culture-specific string | readOnly |
Description of this routine. |
| displayName | culture-specific string | readOnly | Display name of the routine. |
| helpHtml | string | readOnly | General info (in html) for this routine. Can be used anytime during the routine to convey current information about the routine. |
| id | string | readOnly | Id of the instance of the routine. |
| parameters | object | Modifiable parameters values for alignment routine - see Alignment Routine Parameters below | |
| results | object | readOnly |
Results after performing the alignment. Empty {} if no results or not yet available, otherwise alignment transformation values for each sensor: xOffset |
| state | integer | readOnly, enum | Current state of the routine: 0 = READY, 1 = RUNNING, 2 = WAITING, 3 = DONE, 4 = ABORTED, 5 = FAILED. |
| stateDetails | string | readOnly | Description details of the current state. Usually used to provide info for FAILED state but can be used for other states. |
| totalSteps | integer | readOnly |
Total steps in the alignment process. |
| type | string | readOnly | Type of routine. |
| parameters | object | Modifiable parameters values for alignment routine | |
| parameters/motionType | object | Contains alignmentType (see below) and updateEncoderSpeedCalibration parameters. | |
| parameters/formatType | object | Contains the parameters for all alignment targets and their alignment target parameters - see below. | |
| parameters/processingDelay | integer |
Time to delay while simulating aligning process in microseconds. CurrentProgress will range from 0 - 100% in 20% increments after each delay. |
|
| parameters/scannerEngineId | string | Id of the scanner engine to use for alignment. If set to non-empty string, will bypass the first step of the alignment routine prompting for engine and scanner id. | |
| parameters/scannerId | string | Id of scanner instance to use for alignment |
All motionType and formatType parameter values are assumed to be of type integer unless specified in brackets, e.g., (number). Enumerations have their actual integer value shown in brackets, e.g (0).
| Method | Description |
|---|---|
| create |
Create an alignment routine. The routine is ready to be configured with the scan engine and scanner ids to use for alignment. Example: create /routines { "type": "Alignment" }
|
| update |
Update the alignment routine with the scan engine and scanner id to
use for alignment. Example: update /routines/Alignment-0 {"parameters": {"scannerEngineId": "g2xxx", "scannerId": "scanner-0"}}
|
| call /routines/*id*/$commands/continue |
Proceed with the configuration or actual performing of the alignment once the routine target(s) has been configured. Example: call /routines/Alignment-0/$commands/continue |
| call /routines/*id*/$commands/abort |
Abort the performing of the alignment process. Example: call /routines/Alignment-0/$commands/abort |
| delete |
Delete the alignment routine. Example: delete /routines/Alignment-0 |
| EventType | Description |
|---|---|
| create |
When the alignment routine is created. Example: eventType: created, path: /routines/Alignment-0 |
| delete |
When the alignment routine is deleted. Example: eventType: deleted, path: /routines/Alignment-0 |
| update |
When the alignment routine parameters, status, currentStep or result has changed. Example: eventType: updated, path: /routines/Alignment-0 |
| Sequence | REST Protocol Commands/Responses | Description |
|---|---|---|
|
create /routines {"type": "Alignment"}
|
state = WAITING (2) currentStep = 1 currrentProgress = 0 result = {} |
| 2. Update scanner engine id and scanner id to use for alignment - optional as "g2xxx" and "scanner-0" are the defaults. |
update /routines/Alignment-0 {"parameters": {"scannerEngineId": "g2xxx", "scannerId": "scanner-0"}}
|
state = WAITING (2) currentStep = 1 currrentProgress = 0 result = {} |
| 3. Continue to the next alignment routine step to set up the alignment target parameters. |
call /routines/Alignment-0/$commands/continue |
state = WAITING (2) currentStep = 2 currentProgress = 0 result = {} |
|
4. Configure the routine's parameters for alignment (e.g., set alignment type to moving alignment) |
update /routines/Alignment-0 { "parameters": {"motionType": {"alignmentType": 1}}}
|
state = WAITING (2) currentStep = 2 currentProgress = 0 result = {} |
| 5. Configure moving alignment target to moving disk |
update /routines/Alignment-0 { "parameters": {"formatType": {"movingTarget": 1}}}
|
state = WAITING (2) currentStep = 2 currentProgress = 0 result = {} |
| 6. Configure moving disk parameters |
update /routines/Alignment-0 { "parameters": {"formatType": {"movingDiskParams":
{"properties": {"height": 15.0, "diameter": 40.0}}}}}
|
state = WAITING (2) currentStep = 2 currentProgress = 0 result = {} |
| 7. Start alignment process |
call /routines/Alignment-0/$commands/continue |
state = RUNNING (1) currentStep = 2 currentProgress = 0 result = {} |
| 8. Wait for progress notification events |
"updated", "path": "/routines/Alignment-0" repeatedly every few seconds |
state = RUNNING (1) currentStep = 3 currentProgress = 0 - 100 in 5 steps of 20% result = {} |
| 9. Wait for completion of alignment process |
state = DONE (3) currentStep = 3 currentProgress = 100 result = {status, xOffset, yOffset, zOffset, xAngle, yAngle, zAngle} |
|
| 10. Remove routine |
delete /routines/Alignment-0 |
The equivalent of health indicators in Gocator are called Metrics in GoPxL.
This is in and of itself, a better name, because the Gocator health indicators evolved (over time) to mean much more than just "health" information. Although over temperature information can be associated with sensor "health" – tool execution statistics, and measurement pass/fail counts do not necessarily reflect the "health" of the sensor. The term "metrics" simply means to measure something and is more appropriate. Some of the metrics continue to be associated with health, while other metrics are associated with statistics (min, max, average, and std deviation).
The subsequent sections describe the main areas that the Gocator Health system was altered:
The health channel in Gocator provides indicators for all entities in the system, all the time. Clients cannot choose to express interest in only a subset of health indicators.
For GoPxL, the metrics system is more
scalable, by allowing client to explicitly express interest in only the metrics they are interested in.
Part of this means dividing up metrics into different metrics groupings, so that interest for specific groups can be indicated. The metrics groupings also serve to uniquely scope and identify a metric, so that Gocator Classic's Indicator Id is no longer required.
At the highest level, the following metrics groupings exist for GoPxL Metrics:
| Metrics Path | Description | Gocator example indicator |
|---|---|---|
| /system | System level metrics. |
(2007) GC_INDICATOR_CPU_USAGE |
|
/scan |
Scan metrics. This may be sub-divided further into metrics per instance of scan engines, scanners, and scan sensors. |
(2211) GC_INDICATOR_CAMERA_RATE |
| /tools | Tool execution, measurement and feature metrics. These may be further sub-divided into metrics that are per tool. |
(22004) GV_INDICATOR_RUNTIME (30000) GC_INDICATOR_MEASUREMENT_PASS_COUNT |
| /controls | Industrical protocol metrics. These may be further sub-divided into metrics per industrical protocol type (i.e., Gocator, Ascii, Ehternet/IP, Modbus, PROFINET, Hardware, etc.). |
(21003) GC_INDICATOR_ETHERNET_OUTPUT (21014) GC_INDICATOR_ANALOG_OUTPUT_DROP_V2 (21006) GC_INDICATOR_DIGITAL_OUTPUT_HIGH_COUNT (21007) GC_INDICATOR_DIGITAL_OUTPUT_LOW_COUNT |
A full listing of metrics (and mappings back to legacy health indicators) will be populated and maintained for GoPxL on the Metrics Resources page.
Resetting of health indicators in Gocator was a global operation (resetting ALL indicators at once).
In GoPxL, the resetting of metrics will be be grouping specific. In some cases, a reset operation will apply to multiple instances within a metrics group. For example:
| Metrics Path | Description |
|---|---|
| /system/commands/resetMerics | Resets system level metrics. |
| /tools/commands/resetMetrics | Resets all metrics for EACH tool. |
In Gocator Classic, adding a metric in the tool system required supporting changes in the GoSensor library (specifically GsHealth) in order to output the metric. In GoPxL, this is no longer the case and offers tool developers the
advantages of the open-closed principle with respect to metrics. This added convenience should be of increased importance as we
attempt to grant more independence to tool development.
The tool developer is able to expose custom metrics within their own tool type implementation (usually based upon CommonTool) via the ITool and CommonTool base classes:
/*! @class ITool ITool.h
* @brief Main tool interface class
* @ingroup GoPipe-Tools
*/
class ITool
{
public:
//...
/**
* Returns metrics specific to the tool implementation.
*
* @return Reference to tool implementation specific metrics.
*/
virtual MetricsGroup& Metrics() = 0;
/**
* Resets metrics specific to the tool implementation.
*/
virtual void ResetMetrics() = 0;
//...
};
/*! @class CommonTool
* @brief base class for user defined tools that has to be derived from to create tools
* @ingroup GoPipe-Tools
*/
class GoPipeClass CommonTool : public ITool
{
protected:
//...
/**
* Initializes the tool.
*
* @param host
* @param params A property object containing params to initialize the tool with.
* @param metrics A metrics object containing metrics to initialize the tool with.
*/
void Init(IToolHost& host, Go::Properties::Node& params, MetricsGroup& metrics);
/**
* Returns common tool specific metrics, defined by the tool developer.
*
* @return Reference to common tool specific metrics.
*/
MetricsGroup& Metrics() override;
/**
* Resets metrics specific to the tool implementation.
*
* @remarks Throws kERROR_UNIMPLEMENTED if tool developer
* is using custom metrics and does not override this.
*/
void ResetMetrics() override;
//...
};
GoPxL metrics originate from the domain module that hosts the calculation. This is contrast to the approach in Classic, where all health indicators were "routed" through the Firesync health probe system.
For lower-level hardware probes that are only available from Firesync, there may still be a singleton health class in GoPxL to bridge and provide such metrics to modules that require it (such as certain system or scanner metrics).
Visibility of metrics will be via the REST protocol, which will mostly replace the multiple alternative mechanisms in Gocator for viewing health such as:
If there is a need to restore some of these mechanisms for GoPxL, we will revisit them after the initial availability of metrics through the REST protocol is completed.
The Gocator Health system was limited to outputting data as integer values.
GoPxL Metrics are intended to support more output data types, by leveraging the designs associated with flexible parameters and Schema and Data Types
Metrics resources can be read from to learn about the schema:
read /system/metrics
the response contains the schema:
======== read /system/metrics ========
{
"payload": { "_links": {
"self": { "href": "/system/metrics" }
},
"_schema": {
"properties": {
"fault": {
"properties": {
"overheat": { "type": "boolean" },
"overheatDuration": { "type": "integer" }
},
"type": "object"
},
"performance": {
"properties": {
"cpuTotalUsed": { "type": "integer" },
"memCapacity": { "type": "integer" },
"memUsed": { "type": "integer" },
"type": "object"
},
"status": {
"properties": {
"encoderFreq": { "type": "integer" },
"encoderValue": { "type": "integer" },
"upTime": { "type": "integer" }
},
"type": "object"
}
},
"type": "object"
},
"fault": {
"overheat": false,
"overheatDuration": 0
},
"performance": {
"cpuTotalUsed": 2,
"memCapacity": 1053257728,
"memUsed": 127340960,
},
"status": {
"encoderFreq": 0,
"encoderValue": 0,
"upTime": 8738
}
},
"status": 1,
"type": "response"
}
GoPxL Metrics will leverage the Streaming system. To start and cancel streaming of metrics resources, the usual methods will be used:
stream /system/metrics cancelStream /system/metrics
A streaming API for metrics reporting within GoPxL is:
/**
* Interface of a metrics reporter.
*/
template <typename... KeyArgs>
class IMetricsReporter
{
public:
virtual ~IMetricsReporter()
{
}
/**
* Retrieves the last metrics report.
*
* @param reportKey Key for resolving the metrics report.
* @return An @ref IMetricsSource that hosts the metrics report.
*
* @remarks The @ref IMetricsSource provides an interface to retrieve the resolved metrics
* via @ref GoCommon::MetricsGroup.
*/
virtual const IMetricsSource& LastReport(KeyArgs... reportKey) = 0;
/**
* Adds a metrics report handler.
*
* @param fx A callback function.
* @param reportKey Key for resolving the metrics report.
* @return A callbackId used to remove the report handler.
*
* @remarks The @ref IMetricsSource provides an interface to retrieve the resolved metrics
* via @ref GoCommon::MetricsGroup.
*/
virtual Go::Event<const IMetricsSource&>::CallbackId AddReportHandler(std::function<void(const IMetricsSource&)> fx,
KeyArgs... reportKey) = 0;
/**
* Removes a metrics report handler from the map.
* The event in the map will only be removed when all handlers are removed.
*
* @param callbackId The callbackId of the callback to remove.
* @param reportKey An optional key provided to resolve the metrics report.
*
* @remarks The @ref IMetricsSource provides an interface to retrieve the resolved metrics
* via @ref GoCommon::MetricsGroup.
*/
virtual void RemoveReportHandler(Go::Event<const IMetricsSource&>::CallbackId callbackId,
KeyArgs... reportKey) = 0;
};
Access to metrics from GoPxLSdk clients (including access for GoHMI) will be accomplished via the REST API discussed previously on this design page.
When jobs are being switched on the GoPxL sensor, ephemeral ids (eg. /tools/TestForward-12) could fluctuate, causing issues with resource paths declared within third party products such as (SmartHMI WebIQ Designer).
To avoid this issue, URI path parameters are employed:
stream /tools/extId=My%20Tool/metrics cancelStream /tools/extId=My%20Tool/metrics
The "extId" of the resource is under the control of the user and can be made non-changing even as different jobs are loaded.
Conventional (i.e., non HMI) GoPxLSdk clients should also be able to use the same strategy to address resource paths in a more stable manner.
The GoPxLSdk includes support for JSON Pointer (rfc6901). This makes it easy to declaratively specify an individual metric from a streamed metrics report.
Some examples, given the following metrics json:
======== read /system/metrics ========
{
"payload": { "_links": {
"self": { "href": "/system/metrics" }
},
"fault": {
"overheat": false,
"overheatDuration": 0
},
"performance": {
"cpuTotalUsed": 2,
"memCapacity": 1053257728,
"memUsed": 127340960,
},
"status": {
"encoderFreq": 0,
"encoderValue": 0,
"upTime": 8738
}
},
"status": 1,
"type": "response"
}
The following json pointers can be specified:
/fault/overheat /fault/overheatDuration /performance/cpuTotalUsed /performance/memCapacity>/
GoPxL Data Protocol (GDP) is intended for rapid delivery of the dataSource content to SDK users. The implementation of the server is such that it is optimized for rapid transmission of many messages. As such, messages are serialized using proprietary formats, documented on the Message Serialization page.
Connections are typically long running. A client will establish a connection for as long as they are ever interested in receiving data. The data which is to be delivered is stored as configuration, which is exposed on the REST API and documented on the GoPxL Data Protocol (GDP) Resources page. This configuration, like most other configuration, can be saved in and loaded from a job. As a result, the types of data that are sent over the long running connection can vary over time, as jobs are loaded or unloaded.
The protocol is designed to be relatively stateless, however there are some stateful aspects if the client intends to recover the various types of grouping/collections which are represented in the message structure. These are discussed further in the Message Grouping section below.
See Versioning and Compatibility for more information about the standards and practices which are adhered to in maintaining compatibility.
Most of the GDP protocol's flexibility comes through the use of attribute sections, mentioned in the section below.
When flexibility is required, structures within messages (referred to as field "Sections") shall be described with a count of bytes. This allows optional fields to be added to the end of section structures without necessitating a breaking change. Many messages contain an “attribute size” that a parser can use to skip past any unparsed attributes and continue reading. This means the attributeSize field describes the size of the attributes in the respective section. This allows the client to be able to read as much as it knows, and then skip all unreadable attributes to the start of the next section if available. New fields to any message, in future updates to the protocol format, will be added to the end of attribute sections and before subsequent sections.
Unless stated otherwise, attributeSize fields are considered part of the section they measure. This means attributeSize fields include themselves.
The Command Attribute Section (CAS) is common to every single message sent. It is it is own section and immediately follows the header. The CAS contains fields that allow clients to recover common information which is present on all messages. Some of these fields are focused on connections and message grouping (discussed below), while other fields are data-specific and provide important information for correct interpretation of the data itself (such as the transform and bounding box fields). In some cases, these fields are, themselves, optional. Clients should only read these optional fields when it is correct to do so, as documented.
For the purposes of being able to compare messages, the protocol supports two formal types of grouping:
Arrays are potentially emitted from a single output on given data source (ie tool or scanner) for a given frame. They are a way of representing multiple objects within a given instant in time. Arrays can not contain Arrays
Sets are similar to Arrays, however they apply across all outputs from all data sources. Since a tree of tools typically descends from a single data source, the rate of data produced by that tree is determined by the rate of data produced by the source. Every message from every node in the tree contains the same "stamp" message, and this is used by the system to collect all messages into a Set. All messages from a given Set are sent to the client with appropriate meta data to recover the Set on the client. It is possible for many Arrays to be contained within a single Set. Sets can not contain Sets.
The information to collect both Arrays and Sets is found in the common attribute section (CAS).
This section describes the serialization format of messages for scan data messages sent to external clients such as the GUI or SDK.
Message Header is revised from Gocator as the control field is no longer needed. Since GoPxL will allow multiple scanners running at different rates, a single isLast flag received by the client is insufficient in identifying a complete data set.
All messages will contain a message header section
Header
|
Field |
Type |
Offset |
Description |
|
size |
32u |
0 |
Count of bytes in message (including this field), (min: 6, current: 6). |
| type | 16u | 4 | Message Type identifier |
A common attribute section to describe attributes common to all messages. All messages will contain
this section
This section (like any other) is subject to change - fields can be added at any time. This is permissible by the section growth rules outlined in GoPxL Data Protocol (GDP)#BackwardCompatibility
|
Field |
Type |
Offset |
Description |
|
commonAttrSize |
32u |
0 |
Common attribute section size (bytes). This has the same use as "attributeSize" in all messages - it describes the size of the attributes section below (including itself) so a client can read only to a certain point and know where to move on to start reading the next section. It is important that clients use this field during deserialization. As stated above, fields can be added in susbequent versions of the protocol and these additions are not considered breaking changes. It is the responsibility of the client to use the size field to ensure deserialization of later sections and data happens at the correct buffer offset. Includes itself (will always be greater than 4). |
| spaceType | 8u | 4 |
Determines the data space type for this data message. Can be one of 0 – None or Null space. Represents a non-existent data space. In this space, the transform field doesn't apply. Usually reserved for signal-type messages or custom data types, but also applies to the Stamp message. 1 – Data space. Data exists within a 3D Euclidean space with units of length defined in mm. 2 – Image Space. Data exists within a 2D Euclidean space with units of length defined in pixels (px). |
|
hasTransform |
8u | 5 |
Determines if this data message has a transform. 0 – transform is not present and not sent. Clients should interpret the transform as identity. 1 – transform for data message is present and sent. |
| transform | Transform3d 32f | 6 |
Optional: only sent if hasTransform=1. If hasTransform=0, transform is identity. Transformation matrix (3x4) of 32-bit floating point values:
Applying this transform to the associated data results in the data being put into the common frame of reference. This is typically true when spaceType = 1 (Data Space), but transform can also apply when spaceType = 2 (Image space). Transform does not apply when spaceType = 0 (None or Null Space) The order in which values are serialized is as follows: xx, xy, xz, xt, yx, yy, yz, yt, zx, zy, zz, zt Number of bytes for transform data = 12 * 4 (4 bytes per 32-bit floating point value) = 48 bytes. |
| hasBoundingBox | 8u |
6 if hasTransform= 0 or 54 if hasTransform= 1 |
Determines if this data message has a bounding box or not. 0 – no bounding box sent. 1 – bounding box sent. |
| boundingBox | Rectangle3d 32f |
7 if hasTransform= 0 or 55 if hasTransform= 1 |
Optional: only sent if hasBoundingBox is 1. Bounding box fields are represented as 32-bit floating point numbers sent in the following order:
Number of bytes for bounding box data = 6 * 4 (4 bytes for each 32-bit floating point value) = 24 bytes. |
| arrayCount | 32u |
7 if hasTransform= 0 and hasBoundingBox = 0 or 55 if hasTransform= 1 and hasBoundingBox = 0 or 31 if hasTransform= 0 and hasBoundingBox = 1 or 79 if hasTransform= 1 and hasBoundingBox = 1 |
Any message could be a member of an arrayed output. If this is the case, this field indicates the count of messages in the array. If the message is not in an array (ie it is a non-arrayed output) the value of this field will be 0. |
| arrayIndex | 32u |
arrayCount offset + 4 |
This field only applies if arrayCount is >= 1 and refers to the index of this message in the source array that contains the individual messages in the source array. If arrayCount is 0, ignore this arrayIndex field. |
| dataSourceIdLength (DSIL) |
16u |
arrayIndex offset + 4 |
Length of the dataSource id in bytes. |
| dataSourceId | char[] | dataSourceIdLength offset + 2 |
DataSource Id used to identify the source of the message and distinguish multiple arrayed
messages. |
| stampSourceIdLength (SSIL) |
16u |
dataSourceId offset + DSIL | Length of the scanner Id in bytes. |
| stampSourceId | char[] |
stampSourceIdLength offset + 2 |
Unique Id string used to identify the set that this message belongs to. As of writing, this is the "ScannerId", however in the future this will change to either the dataSourceId for the stamp output associated with this data or perhaps a more opaque uniuqe ID. Regardless, clients should treat this as an opaque ID, used solely for collecting many messages into a collection that describes a set. Null terminator is ABSENT. |
|
dataSetId |
64u |
stampSourceId offset + SSIL |
Unique id for the data set that this message belongs to. This field could be based on the frameIndex of the message's associated stamp message (ie a monotonically increasing unsigned integer which counts the total number of stamps/frames generated by the stamp source), however this is not strictly necessary. This field's primary purpose is to allow clients to group all messages that belong to the same frame, including the stamp. It is particularly useful when receiving messages asynchronously such as when streaming dataSources via the REST API. While dataSetId is often equal to frameIndex, clients should retrieve frameIndex from the stamp message and not from this field directly. Note this field is for internal LMI use only. Behavior of this field may change without notice. |
| isLastMsg | 8u | dataSetId offset + 8 |
Boolean indicator. When it is set to true, the current message is the last message within the current dataSet. All messages in a given dataSet should have equal dataSetId's, but isLastMsg makes for more convenient logic on the client side. When clients are connected via GDP protocol, messages are always sent as a set. Recollecting messages into a dataSet is done by waiting until the isLastMsg arrives, starting a new dataSet, and collecting messages again until the next isLastMsg. 0 – not the last message in the dataSet. 1 – this is the last message in the dataSet. Note this field is only applicable to serialization via GDP for SDK clients. When obtaining these messages via Resource Streaming the /dataSources/(id)/data resource, this field is undefined and should not be used. |
| gdpId | 16u | isLastMsg offset + 1 |
Changed in 0.3.x.x Added. Gocator data protocol Identifier. This value corresponds to the 'output id' the 'dataSourceId' was assigned to in the 'Gocator Connection' panel on the UI, thus it identifies which data source the current msg belongs to. This is only used for Gocator data protocol serialization, and defaults to (65535U) when not used. Note 0 is a valid Gocator data protocol ID. |
|
Name |
Type |
|
Signal |
1 |
|
Null |
10 |
|
Stamp |
11 |
|
Uniform Profile |
12 |
| Profile Point Cloud | 13 |
|
Uniform Surface |
14 |
|
Point Cloud Surface |
15 |
| Image | 16 |
| Spots | 17 |
| Mesh | 18 |
| Measurement | 19 |
| Rendering | 70 |
| Point Feature | 71 |
| Line Feature | 72 |
| Plane Feature | 73 |
| Circle Feature | 74 |
| Health | 100 |
Informs clients that all prior scan data messages on a stream are invalidated.
|
Field |
Type |
Description |
||
|
header |
Header |
Message header (see above). |
||
| commonAttrs | CommonAttrs | Common Attribute Section (see above) | ||
|
attributeSize |
16u |
Size of attributes, in bytes, including this field. |
||
Informs clients that the message contains no scan data, but could contain some error status information about why scan data is absent or could not be produced.
|
Field |
Type |
Description |
||
|
header |
Header |
Message header (see above). |
||
| commonAttrs | CommonAttrs | Common Attribute Section (see above) | ||
|
nullAttrs |
NullAttrs |
Null Attribute Section (see below) |
||
|
Field |
Type |
Description |
||
|
attributeSize |
16u |
Size of attributes, in bytes, including this field. |
||
|
errorStatus |
32s |
Error status related to the message |
||
|
Field |
Type |
Description |
|
header |
Header |
Message header (see above). |
| commonAttrs | CommonAttrs | Common Attribute Section (see above) |
|
stampAttrs |
StampAttrs |
Stamp Attribute Section (see below) |
|
Field |
Type |
Description |
|
attributeSize |
16u |
Size of attributes, in bytes, including this field. |
|
frameIndex |
64u |
Frame index (counts up from zero). |
|
timetick |
64u |
The time tick is a 64-bit positive integer that is guaranteed to increase monotonically starting from zero. |
|
encoder |
64s |
Current encoder value (ticks). |
|
encoderAtZ |
64s |
Encoder value latched at z/index mark (ticks). |
|
status |
64u |
Bit field containing various frame information: Bit 0: sensor digital input state Bit 4: master digital input state Bit 8-9: inter-frame digital pulse trigger (Master digital input if master is connected, otherwise sensor digital input. Value is cleared after each frame and clamped at 3 if more than 3 pulses are received). |
|
reserved |
64u |
Reserved. |
| Scanner | Timetick Interpretation |
|---|---|
| Gocator |
The timetick is a 64-bit positive integer that can be converted to microseconds by the following calculation: Time in microseconds = timetick / 1.024 |
| AVT 2-D Camera | The timetick is a 64-bit positive integer that represents nanoseconds. |
|
Field |
Type |
Description |
|
header |
Header |
Message header (see above). |
| commonAttrs | CommonAttrs | Common Attribute Section (see above) |
|
profileAttrs |
ProfileAttrs |
Profile Attribute Section (see below). |
|
ranges[W] |
16s |
Profile ranges. Width (W) is from ProfileAttrs. |
| intensity[iW] | 8u |
Intensity arrays. Width (iW) is from ProfileAttrs. |
|
Field |
Type |
Description |
|
attributeSize |
16u |
Size of attributes, in bytes, including this field. |
|
width (W) |
32u |
Number of points per profile array. |
| intensity width (iW) | 32u | Number of intensity values per intensity array. |
|
xScale |
64f |
X scale (nm). X scale (mm). |
|
zScale |
64f |
Z scale (nm). Z scale (mm). |
|
xOffset |
64f |
X offset (µm). X offset (mm). |
|
zOffset |
64f |
Z offset (µm). Z offset (mm). |
| exposure |
32f |
Exposure in microseconds (us). |
|
Field |
Type |
Description |
|
header |
Header |
Message header (see above). |
| commonAttrs | CommonAttrs | Common Attribute Section (see above) |
|
profileAttrs |
ProfileAttrs |
Profile Attribute Section (same as for Uniform Profile. See above.). |
|
ranges[W] |
Point16s |
Profile ranges. A Point16s is made up of two k16s fields: X-value and Y-value. Width (W) is from ProfileAttrs. |
| intensity[iW] | 8u |
Intensity arrays. Width (iW) is from ProfileAttrs. |
|
Field |
Type |
Description |
|
header |
Header |
Message header (see above). |
| commonAttrs | CommonAttrs | Common Attribute Section (see above) |
|
surfaceAttrs |
SurfaceAttrs |
Surface Attribute Section (see below). NOTE: the isAdjacent field in SurfaceAttrs is NOT applicable to Uniform Surface and is therefore ABSENT from the SurfaceAttrs for Uniform Surface. |
|
ranges[L][W] |
16s |
Surface ranges. Length (L) and Width (W) are from SurfaceAttrs. |
| intensities[iL][iW] | 8u |
Surface intensities. Length (iL) and Width (iW) are from SurfaceAttrs. |
|
Field |
Type |
Description |
|
attributeSize |
16u |
Size of attributes, in bytes, including this field. |
|
length (L) |
32u |
Surface length (rows). |
|
width (W) |
32u |
Surface width (columns). |
| intensity length (iL) | 32u | Surface intensity length. |
| intensity width (iW) | 32u | Surface intensity width. |
|
xScale |
64f |
X scale (nm). (scaled by 1000000) X scale (mm). |
|
yScale |
64f |
Y scale (nm). Y scale (mm). |
|
zScale |
64f |
Z scale (nm). Z scale (mm). |
|
xOffset |
64f |
X offset (µm). (scaled by 1000) X offset (mm). |
|
yOffset |
64f |
Y offset (µm). Y offset (mm). |
|
zOffset |
64f |
Z offset (µm). Z offset (mm). |
| surfaceId |
32u |
Surface Id of the message (used to identify messages with unchanged data) The value is calculated based on the surface and intensity data, it is scale and offset values and the transform applied to it. |
|
exposure |
32f |
Exposure in microseconds (us). |
|
isAdjacent |
8u |
NOTE: This field is present ONLY for Point Cloud Surface. For Uniform Surface, this field is ABSENT. Is the data Adjacent/Sorted (ie is it graphable) 0 = not adjacent. 1 = adjacent. |
|
How FE GUI interprets this property:
|
|
Field |
Type |
Description |
|
header |
Header |
Message header (see above). |
| commonAttrs | CommonAttrs | Common Attribute Section (see above) |
|
surfaceAttrs |
SurfaceAttrs |
Surface Attribute Section (see above under Uniform Surface). NOTE: the isAdjacent field in SurfaceAttrs applies to Point Cloud Surface and is therefore PRESENT in the SurfaceAttrs for Point Cloud Surface. |
|
ranges[L][W] |
Point3d16s |
Surface ranges, sent as a tuple of 3 16-bit signed integer values. Each 16-bit value should be scaled and offset with the respective values from SurfaceAtts. For example Point3d16s range = ranges[L][W]; Length (L) and Width (W) are from SurfaceAttrs. |
| intensities[iL][iW] | 8u |
Surface intensities. Length (iL) and Width (iW) are from SurfaceAttrs. |
|
Field |
Type |
Description |
|
header |
Header |
Message header (see above). |
| commonAttrs | CommonAttrs | Common Attribute Section (see above) |
| imageAttrs |
ImageAttrs |
Image Attributes section (see below). |
|
pixels[H][W] |
(variable) |
Array of image pixels, where the size of each pixel depends on the pixelSize attr. Height, H, is from ImageAttrs. Width, W, is from ImageAttrs. |
|
Field |
Type |
Description |
|
attributeSize |
16u |
Size of attributes, in bytes, including this field |
|
height (H) |
32u |
Image height, in pixels. |
|
width (W) |
32u |
Image width, in pixels. |
|
pixelSize |
32u |
Pixel size, in bytes. |
|
pixelFormat |
32s |
Pixel format: 1 – 8-bit greyscale 2 – 8-bit color filter 3 – 8-bits-per-channel color (B, G, R, X) |
|
colorFilter |
32s |
Color filter array alignment: 0 – None 1 – Bayer BG/GR 2 – Bayer GB/RG 3 – Bayer RG/GB 4 – Bayer GR/BG |
|
reserved |
16u |
Reserved |
|
exposure |
32f |
Exposure in microseconds (us). |
|
flippedX |
8u |
0 = Indicates whether the pixels should NOT be flipped horizontally. 1 = Indicates whether the pixels should be flipped horizontally. |
|
flippedY |
8u |
0 = Indicates whether the pixels should NOT be flipped vertically. 1 = Indicates whether the pixels should be flipped vertically. |
|
transposed |
8u |
0 = Indicates whether the pixels should NOT be transposed. 1 = Indicates whether the pixels should be transposed. Note: transposed should always be applied after flippedX and flippedY. |
|
Field |
Type |
Description |
||
|
header |
Header |
Message header (see above) |
||
| commonAttrs | CommonAttrs | Common Attribute Section (see above) | ||
|
spotAttrs |
SpotAttrs |
Spot Attribute Section (see below) |
||
| spots |
Array of (C) Spot Objects described below |
Pair of values (slice, center) to determine location of each spot depending on value of "columnBased" flag. If columnBased flag is true (1):
If columnBased flag is false (0):
Spots may be flipped horizontally (FlippedX) or vertically (FlippedY) depending on whether the scale values (centerScale, sliceScale) are positive or negative. Negative scale values indicate the position of the spots are to be flipped horizontally (X) and/or vertically (Y) while positive scale values do not flip the spots. For reference, the following illustrates the results of flipping the spots. |
||
|
Field |
Type |
Description |
||
|
attributeSize |
16u |
Size of attributes, in bytes, including this field. |
||
| spotCount (C) | 32u | Number of spots | ||
| exposure |
32f |
Exposure in microseconds (us). |
||
| columnBased | 8u |
Determines if the spots data is column-based or row-based. 0 = row-based slices, 1 = column-based slices |
||
| sliceScale | 32f | Scale applied to the slice value to obtain its pixel position from origin. | ||
| sliceOffset | 32f | Offset applied to the slice value to obtain its pixel position from origin. | ||
| centerScale | 32f | Scale applied to the center value to obtain its pixel position from origin. | ||
| centerOffset | 32f | Offset applied to the slice value to obtain its pixel position from origin. | ||
| maxSliceCount | 32u |
Changed in 0.3.x.x Added. If row based, this value is the image height. if column based, his value is the image width. |
||
| spotCenterMin | 32u |
Changed in 0.3.x.x Added. Minimum allowable raw value of a spot's center. This is not the minimum of the actual spot center values, it is the minimum allowable raw value for spots in this message. There may not actually be a spot with a center value equal to spotCenterMin. |
||
| spotCenterMax | 32u |
Changed in 0.3.x.x Added. Maximum allowable raw value of a spot's center. if row based, this value is typically the originating image width. if column based, this value is typically the originating image height. This is not the maximum of the actual spot center values, it is the maximum allowable raw value for spots in this message. There may not actually be a spot with a center value equal to spotCenterMax. |
||
|
Field |
Type |
Description |
| slice | 16u | Raw slice value of spot |
|
center |
32u |
Raw center value of spot within a slice. |
|
Field |
Type |
Description |
||
|
header |
Header |
Message header (see above). |
||
| commonAttrs | CommonAttrs | Common Attribute Section (see above) | ||
|
meshAttrs |
MeshAttrs |
Mesh Attribute Section (see below) |
||
| channels[channelCount] | MeshChannel |
Array of mesh channel data. Channel count (channelCount) is from MeshAttrs. |
||
|
Field |
Type |
Description |
||
|
attributeSize |
16u |
Size of attributes, in bytes, including this field. |
||
|
hasData |
8u |
0 = No data has been allocated 1 = data has been allocated |
||
| systemChannelCount | 32u | Number of system channels (currently 6) | ||
| maxUserChannelCount | 32u | Maximum number of user channels supported (currently 5) | ||
| userChannelCount | 32u | Number of currently active user channels | ||
| channelCount | 32u | Number of all channels, including all system and active user channels | ||
| offset | Point3d64f | Offset of mesh data | ||
| range | Point3d64f | Range of mesh data | ||
|
Field |
Type |
Description |
|
meshChannelAttrs |
MeshChannelAttrs |
Mesh Channel Attribute Section (see below). |
|
buffer[allocateCount] |
various |
Data buffer of various types depending on channel ID. Channel ID.
Allocate Count (allocateCount) is from MeshChannelAttrs. |
|
Field |
Type |
Description |
|
attributesSize |
16u |
Size of attributes, in bytes, including this field. |
|
id |
32u |
Channel ID.
|
|
type |
32u |
Channel type.
|
|
state |
32s |
Channel state.
|
|
flag |
32u |
Channel flag is an user specified field. It can be used to send any optional data to determine how to deserialize user channel data. |
|
allocateCount |
32u |
Number of allocated channel data items. System channels (channel id from 0 to 5) – Equal to number of items ( i.e., allocateCount for vertex channel is number of Point3d32f allocated). User channels (channel id 6 or higher) – Equal to number of bytes (8u) of entire buffer. |
|
usedCount |
32u |
Number of used channel data items. |
|
Field |
Type |
Description |
|
header |
Header |
Message header (see above). |
| commonAttrs | CommonAttrs | Common Attribute Section (see above) |
|
value |
64f |
Measurement value. |
|
decision |
8u |
Measurement decision. 0 = the measurement passed. 1 = the measurement failed because it is outside of the acceptable range. |
|
Field |
Type |
Description |
|
header |
Header |
Message header (see above). |
| commonAttrs | CommonAttrs | Common Attribute Section (see above) |
|
renderingAttrs |
RenderingAttrs |
Rendering Attribute Section (see below) All counts of each graphic primitive were moved into this attribute section as of Changed in 0.3.x.x Added. |
| pointSets[pointSetCount] | PointSet Array |
List of PointSet primitive objects - described below. Number of PointSet items is given by pointSetCount. |
| lineSets[lineSetCount] | LineSet Array |
List of LineSet primitive objects - described below. Number of LineSet items is given by lineSetCount. |
| regions[regionCount] | Region Array |
List of Region primitive objects - described below. Number of Region items is given by regionCount. |
| planes[planeCount] | Plane Array |
List of Plane primitive object - described below. Number of Plane items is given by planeCount. |
| rays[rayCount] | Ray Array |
List of Ray primitive object - described below. Number of Ray items is given by rayCount. |
| labels[labelCount] | Label Array |
List of Label primitive object - described below. Number of Label items is given by labelCount. |
| positions[positionCount] | Position Array |
List of Position primitive object - described below. Number of Position items is given by positionCount. |
|
Field |
Type |
Description |
||
|
attributeSize |
16u |
Size of attributes, in bytes, including this field. |
||
| pointSetCount | 16u |
number of point sets (PointSet) contained in the graphics object. Changed in 0.3.x.x |
||
| lineSetCount | 16u |
number of line sets (LineSet) contained in the graphics object. Changed in 0.3.x.x Added. |
||
| regionCount | 16u |
number of regions (Region) contained in the graphics object. Changed in 0.3.x.x Added. |
||
| planeCount | 16u |
number of planes (Plane) contained in the graphics object. Changed in 0.3.x.x Added. |
||
| rayCount | 16u |
number of rays (Ray) contained in the graphics object. Changed in 0.3.x.x Added. |
||
| labelCount | 16u |
number of labels (Label) contained in the graphics object. Changed in 0.3.x.x Added. |
||
| positionCount | 16u |
number of positions (Position) contained in the graphics object. Changed in 0.3.x.x Added. |
||
|
Field |
Type |
Description |
| pointSetAttrs | PointSetAttrs | PointSet Attributes section. See below. |
| points[C] |
Point32f |
Array of points. Array of points where count C is from PointSetAttrs |
|
Field |
Type |
Description |
|
attributeSize |
16u |
Size of attributes, in bytes, including this field. |
|
size |
32f |
size of points in the point set. |
| color | 32u |
color of points in the point set (0xAARRGGBB) where: RR - red value GG - green value BB - blue value |
| shape | 32s | shape of points in the point set |
| pointCount (C) |
16u |
number of points in the point set |
|
Field |
Type |
Description |
|
linesetAttrs |
LineSetAttrs |
LineSet Attributes section. See below. |
| points[C] |
Point32f |
Array of points. Array of points where C is from LineSetAttrs. |
|
Field |
Type |
Description |
|
attributeSize |
16u |
Size of attributes, in bytes, including this field. |
|
width |
32f |
Width of the lines in the line set. |
| color | 32u |
Color of the lines in the line set. |
| hasStartPointArrow | 8u |
whether each line of the line set should have start point arrow or not. 0 = does not have start point arrow. 1 = has start point arrow. |
| hasEndPointArrow | 8u |
whether each line of the line set should have end point arrow or not. 0 = does not have end point arrow. 1 = has end point arrow arrow. |
| lineSetPointCount (C) |
16u |
number of points in the line set (every line in the set has a start point and an end point) |
|
Field |
Type |
Description |
|
x |
32f |
x coordinate of point. |
| y | 32f | y coordinate of point. |
| z | 32f | z coordinate of point. |
|
Field |
Type |
Offset |
Description |
|
x |
32s |
0 |
x coordinate of point. |
| y | 32s | 4 | y coordinate of point. |
| z | 32s | 8 | z coordinate of point. |
A region can be one of the following type of regions:
Region2d
|
Field |
Type |
Description |
| type |
8u |
Type of region. Value is always zero (0). |
|
attributeSize |
16u |
Size of attributes, in bytes, including this field. |
| x |
64f |
X component of the center of the region. |
| z |
64f |
Z component of the center of the region. |
| width |
64f |
Width of the region along X axis. |
| height |
64f |
Height of the region along Z axis. |
| y angle |
64f |
Y angle rotation of the region. |
|
Field |
Type |
Description |
| type |
8u |
Type of region. Value is always 1. |
|
attributeSize |
16u |
Size of attributes, in bytes, including this field. |
| x |
64f |
X component of the center of the region. |
| y |
64f |
Y component of the center of the region. |
| z |
64f |
Z component of the center of the region. |
| width |
64f |
Width of the region along X axis. |
| length |
64f |
Length of the region along Y axis. |
| height |
64f |
Height of the region along Z axis. |
| z angle |
64f |
Z angle rotation of the region. |
|
Field |
Type |
Description |
|
attributeSize |
16u |
Size of attributes, in bytes, including this field. |
|
distance |
32f |
Distance from origin to the plane. |
|
xNormal |
32f |
X component of the normal vector. |
| yNormal |
32f |
Y component of the Normal vector. |
| zNormal |
32f |
Z component of the normal vector. |
|
Field |
Type |
Description |
|
attributeSize |
16u |
Size of attributes, in bytes, including this field. |
|
xPosition |
32f |
x component of the position. |
| yPosition |
32f |
y component of the position. |
| zPosition |
32f |
z component of the position. |
|
xDirection |
32f |
x component of the direction. |
| yDirection |
32f |
y component of the direction. |
| zDirection |
32f |
z component of the direction. |
| width |
32f |
width of the ray. |
| color | 32u |
color of the ray. |
|
Field |
Type |
Description |
|
attributeSize |
16u |
Size of attributes, in bytes, including this field. |
|
labelLength (L) |
16u |
Length of the label text. |
|
label |
char[L] |
label text. Text has no null terminator. |
| x |
64f |
x position component of the label. |
| y |
64f |
y position component of the label. |
| z |
64f |
z position component of the label. |
|
Field |
Type |
Description |
|
attributeSize |
16u |
Size of attributes, in bytes, including this field. |
| x |
64f |
x component of the position of the label. |
| y |
64f |
y component of the position of the label. |
| z |
64f |
z component of the position of the label. |
| type | 8u |
type of position Can be one of :
|
|
Field |
Type |
Description |
||
|
header |
Header |
Message header (see above). |
||
| commonAttrs | CommonAttrs | Common Attribute Section (see above) | ||
| xPoint |
64f |
X component of the position of the point. |
||
| yPoint |
64f |
Y component of the position of the point. |
||
| zPoint |
64f |
Z component of the position of the point. |
||
|
Field |
Type |
Description |
||
|
header |
Header |
Message header (see above). |
||
| commonAttrs | CommonAttrs | Common Attribute Section (see above) | ||
| xPoint |
64f |
X component of the position of the point. |
||
| yPoint |
64f |
Y component of the position of the point. |
||
| zPoint |
64f |
Z component of the position of the point. |
||
| xDirection |
64f |
X component of direction vector. |
||
| yDirection |
64f |
Y component of direction vector. |
||
| zDirection |
64f |
Z component of direction vector. |
||
|
Field |
Type |
Description |
||
|
header |
Header |
Message header (see above). |
||
| commonAttrs | CommonAttrs | Common Attribute Section (see above) | ||
| xNormal |
64f |
X component of the normal vector. |
||
| yNormal |
64f |
Y component of the normal vector. |
||
| zNormal |
64f |
Z component of the normal vector. |
||
| originDistance |
64f |
Distance to origin. |
||
|
Field |
Type |
Description |
||
|
header |
Header |
Message header (see above). |
||
| commonAttrs | CommonAttrs | Common Attribute Section (see above) | ||
| xPoint |
64f |
X component of the center point of the circle. |
||
| yPoint |
64f |
Y component of the center point of the circle. |
||
| zPoint |
64f |
Z component of the center point of the circle. |
||
| xNormal |
64f |
X component of normal vector of the plane the circle is lying in. |
||
| yNormal |
64f |
Y component of normal vector of the plane the circle is lying in. |
||
| zNormal |
64f |
Z component of normal vector of the plane the circle is lying in. |
||
| radius |
64f |
Radius of the circle. |
||
This sections focuses on Data Types as described in the Back End, none of this information should be used by clients. For message serialization information, see Message Serialization Format
The types here are used in a few places including the Message Serialization message header
| Name | Value | Notes |
|---|---|---|
| Signal | 1 | Used to signal the GUI to clear the visualizer |
| Null | 10 | Null Message carrying a status message from tool developers |
| Stamp | 11 | Represents the stamp message, which contains the time and encoder values for the data the moment the data was collected. Stamps are always in "None" spaceType. |
| Uniform Profile | 12 | A uniform (aka "resampled) profile. Primary data structure is a 1-dimensional array of Z values. X values are implied by array index. Profiles are always in "Data" spaceType, and have XZ values with units of mm. |
| Profile Point Cloud | 13 | A non-uniform (aka "raw") profile. Primary data structure is a 2-dimensional array of XZ values. Profiles are always in "Data" spaceType, and have XZ values with units of mm. |
| Uniform Surface | 14 | A uniform (aka "resampled) surface. Primary data structure is a 2-dimensional array of Z values. X and Y values are implied by array indices. Surfaces are always in "Data" spaceType, and have XYZ values with units of mm. |
| Point Cloud Surface | 15 | A non-uniform (aka "raw") surface. Primary data structure is a 1-dimensional array of XYZ values. Surfaces are always in "Data" spaceType, and have XYZ values with units of mm. |
| Image | 16 | A 2-dimensional image object. Numerous pixel formats are supported. Images are always in "Image" spaceType, and have XY values with units of pixels. |
| Spots | 17 | A non-uniform (aka "raw") array of spots. Primary data structure is a 2-dimensional array of XY values. Spots are always in "Image" spaceType, and have XY values with units of pixels. |
| Mesh | 18 | A non-uniform (aka "raw") surface. Primary data structure is a 1-dimensional array of XYZ values (vertices), with additional information about vertex connections (edges). Meshes are always in "Data" spaceType, and have XYZ values with units of mm. |
| Measurement | 19 | A simple message, which contains a scalar value and a decision. Measurements can be in either "Data" or "Image" spaceType. |
| Rendering | 70 | A complex message, which represents graphics to be displayed for visualization. Primary data structure is an array of "graphics" objects, each representing a primitive drawing of some form. Graphics can be in either "Data" or "Image" spaceType, so their units could be mm or pixels, respectively. |
| Point Feature | 71 | A structure representing an XYZ point. Point Features can be in either "Data" or "Image" spaceType, so their units could be mm or pixels, respectively. |
| Line Feature | 72 | A structure representing a Line, consisting of a position and a direction along the line's axis. Line Features can be in either "Data" or "Image" spaceType, so their units could be mm or pixels, respectively. |
| Plane Feature | 73 | A structure representing a Plane, consisting of a position and a normal to the plane. Plane Features can be in either "Data" or "Image" spaceType, so their units could be mm or pixels, respectively. |
| Circle Feature | 74 | A structure representing a Circle, consisting of a position, a normal to the circle's plane, and a radius. Circle Features can be in either "Data" or "Image" spaceType, so their units could be mm or pixels, respectively. |
| Item | Type | Schema | Keywords | Description |
|---|---|---|---|---|
| type | integer | readOnly | The type of data. See above Data Types | |
| arrayed | bool | readOnly |
Whether the data can be arrayed or not. |
A common set of status codes is used throughout numerous protocols. These could be in response to API methods (ie read, update, delete, create, call), or they could be more application specific. Generally, statuses will be represented numerically, and any time programming flow needs to alter depending on statuses, numeric representation should be used. However, it is sometimes convenient to format statuses as a string, hence string forms are defined as well.
| Name | numeric value | string value | Description |
|---|---|---|---|
| OK | 1 | "ok" | Operation successful. |
| ERROR | 0 | "error" | General error. |
| ERROR_STATE | -1000 | "state" | Operation cannot be completed in the current state. |
| ERROR_NOT_FOUND | -999 | "notFound" | Item was not found. |
| ERROR_COMMAND | -998 | "command" | Command was not recognized. |
| ERROR_PARAMETER | -997 | "parameter" | Parameter was not valid. |
| ERROR_UNIMPLEMENTED | -996 | "unimplemented" | Feature is not implemented. |
| ERROR_MEMORY | -994 | "memory" | Out of memory. |
| ERROR_TIMEOUT | -993 | "timeout" | Action timed out. |
| ERROR_INCOMPLETE | -992 | "incomplete" | Data incomplete (e.g., buffer insufficient for results). |
| ERROR_STREAM | -991 | "stream" | Error in communication stream (e.g., network, file). |
| ERROR_CLOSED | -990 | "closed" | Resource is no longer available. |
| ERROR_VERSION | -989 | "version" | Incompatible version. |
| ERROR_ABORT | -988 | "abort" | Operation aborted. |
| ERROR_ALREADY_EXISTS | -987 | "alreadyExists" | Request conflicts with existing item. |
| ERROR_NETWORK | -986 | "network" | Network setup/resource error. |
| ERROR_HEAP | -985 | "heap" | Heap error (leak/double-free). |
| ERROR_FORMAT | -984 | "format" | Data parsing/formatting error. |
| ERROR_READ_ONLY | -983 | "readOnly" | Object is read-only (cannot be written). |
| ERROR_WRITE_ONLY | -982 | "writeOnly" | Object is write-only (cannot be read). |
| ERROR_BUSY | -981 | "busy" | Agent is busy (cannot service request). |
| ERROR_CONFLICT | -980 | "conflict" | Current state has one or more configuration or resource conflicts. |
| ERROR_OS | -979 | "os" | Generic error reported by underlying OS. |
| ERROR_DEVICE | -978 | "device" | Hardware device error. |
| ERROR_FULL | -977 | "full" | Resource is already fully utilized. |
| ERROR_IN_PROGRESS | -976 | "inProgress" | Operation is in progress, but not yet complete. |
More status may be added over time, so applications should interpret unknown negative status codes as ERROR.
A general JSON representation of parameters. The parameters are provided by the application dynamically and varies from case to case.
A paramSet is an object container type used to store custom parameters for scanners, routines, tools, and many more things. ParamSets always have a Schema and clients are expected to use the schema for validation and annotation - paramSets form the foundation for which the client can generate a dynamic parameters list. ParamSets are used abundantly throughout GoPxL application and can consist of any number of data type objects listed in Schema and Data Types including primitive types, container types and extended types. ParamSet is an alias for the Group extendedType but ParamSet is typically used as the top-level container group for parameters within the aforementioned classes.
Nesting - note that there are no explicit limits placed on the number of nested groups in the ParamSet. This may be an issue for some clients. The GoPxL GUI client will only show 3 levels of nesting. After that, additional nesting levels will be combined into a single level.
For example, the ParamSet for a simple tool might look like this:
read /tools/SomeToolId
{
...
"_schema": {
"properties": {
...
"parameters": {
"properties": {
"float": {
"sortOrder": 2,
"title": "Float",
"type": "number"
},
"int": {
"sortOrder": 0,
"title": "Int",
"type": "integer"
},
"changeInputFormat": {
"sortOrder": 8,
"title": "Change Input Format",
"type": "boolean"
},
},
"sortOrder": 0,
"title": "",
"type": "object"
},
...
},
"type": "object"
},
...
"parameters": {
"float": 3.14,
"int": -100,
"changeInputFormat": false,
},
...
}
Some content has been removed from the response for brevity. In this case, the "parameters" property/field is the paramSet, and the associated schema applies.
This represents the status of a control service.
| Name | Value |
|---|---|
| Running | 0 |
| Stopped | 1 |
| Starting | 2 |
| Stopping | 3 |
| Failed To Start | 4 |
| Failed To Stop | 5 |
This represents the status of an HMI application started up by the HMI service.
| Name | Value | Description |
|---|---|---|
| Service Not Started | 0 | HMI control service is not enabled (started). |
| Ready | 1 | HMI application is ready to use. |
| Running | 2 | HMI application is running (activated). |
| Not Found | 3 | HMI application was not found. |
| Has Workspace | 4 | HMI application has a workspace (is loaded in the WebIQ Designer). |
| Not Compatible | 5 | HMI application was created with higher version of WebIQ Connect than the one that is being used by the GoPxL. |
| Error | 6 | Unexpected WebIQ Connect API call error. |
| Connect Is Already Up | 7 |
WebIQ Connect is already running so this HMI control service cannot be started. The WebIQ Connect might have been started by another GoPxL instance (by enabling/starting HMI control service on that GoPxL instance). |
| Service Is Launching | 8 | HMI control service has been enabled and is starting up. |
| Application Is Stopping | 9 | HMI application is being stopped. |
Every resource is identified by an URI relative to the "model root".
For example, a resource at "/scan/engines" may have a physical path of http://192.168.1.10/api/scan/engines on a RESTful server.
NOTE: URI implies a more formally structured and fully-specified definition of with distinct components, of which path is one of them:
(see https://tools.ietf.org/html/rfc3986#section-3)
For the purposes of discussion in Resource Reference, we use "path" as a looser term in line with its componentized meaning and in line with the term "Relative URI" discussed in the Resource Design.
GoPxL implements scheme specific functionality for path parameters.
This is within the guidelines laid out in Uniform Resource Identifier (URI): Generic Syntax http://tools.ietf.org/html/rfc3986#section-3.3.
When indicated in the REST API Reference (via parentheses), Gocator follows the "Simple String Expansion" as described in https://tools.ietf.org/html/rfc6570#section-3.2.2 and https://swagger.io/docs/specification/serialization/#path.
Examples of the path parameter expansion of the basic URI template are as follows. The expansion of the "(id)" can be done as a primitive value id or by external id. In the primitive value id expansion, "TestForward-0" is substituted for the generic "(id)". In the external id expansion, an external id is specified using the syntax "extId=<external id value.". In the example, "(id)" is replaced with "My Tool" expressed as an external id "extdId=My%20Tool".
| URI Template | Primitive value id | By external id |
|---|---|---|
| /tools/(id) |
/tools/TestForward-0 |
/tools/extId=My%20Tool When looking up by extIds, the extId parameter needs to be url-encoded according to https://tools.ietf.org/html/rfc3986#section-2.1. Typically this means percent-encoding spaces as "%20", but it also means that any of the URI reserved characters should also be percent encoded. |
Throughout the Resource Reference, the properties of the respective resources are documented in table form. This is easy to read, but it presents some challenges when dealing with the typically nested and hierarchical nature of JSON documents. For this reason, JSON Pointer syntax (rfc6901) is used as a convenient way of flattening documents for the purposes of documentation
Given a JSON document like this
{
"prop1": 42,
"prop2": {
"prop3": true
},
"prop4": [{
"prop5": "inner"
}]
}
You can expect to see a table documenting this document like this
| Item | Type | Schema | Description |
|---|---|---|---|
| prop1 | number |
Prop 1 Description |
|
| prop2 | object |
Prop 2 Description |
|
| prop2/prop3 | boolean | Prop 3 Description | |
| prop4 | array |
Prop 4 Description |
|
| prop4/n | object | Prop 4 contents Description | |
| prop4/n/prop5 | string |
Prop 5 Description |
The "schema" column refers to the Schema Keywords you can expect to find for the given property (see next section).
This approach works well assuming that JSON arrays are homogenous and contain collections of like-types. As a general rule, in GoPxL API, the contents of JSON arrays are always homogenous. That is to say, their schema will always be of the same type and extendedType.
In general, a property may have any of the standard schema keywords defined in Schema and Data Types. For example, a client should in theory expect that any field may be "not used" (used = 0) and act accordingly.
However in practice only some of the properties will ever set "used" to 0. Throughout the Resource Reference, any "Schema" column lists the relevant keywords for each property, as a hint to aid in the implementation of any clients. It should be emphasized that this is only a hint, not an exhaustive reference. Well written clients are encouraged to support all documented schema keywords, and implement client-side "Assertions" or "Annotations" accordingly.
In a RESTful API model, patterns that occur across multiple resources and methods and are often re-used to encourage consistency and to reduce complexity. Such patterns can be referred to as Resource Types and Traits and aids in the discussion of Resources here.
Throughout the Resource Reference, links such as (Callable) indicate the applicability of the patterns associated with a certain resource type or trait.
Certain resource methods inherently write to persistent storage. Consequently, regularly calling such methods on platforms where the persistent
storage is backed by flash memory can lead to premature flash memory wear over time.
Please take this into consideration when
working with the Gocator application, or when designing Gocator applicaiton clients, especially when running on embedded platforms.
For example many methods within the /jobs resource write to persistent storage.
Usually, when a resource is modification occurs (update/create/delete/call), the system restarts (ie stops and starts) automatically if the
system is running/started when the modification occurs. If this trait is not specified, it can be assumed that any update to the respective resource, while the system is running, will trigger a restart
sequence.
There are, however, some resources where this does not apply such as reset, factory restore and sensor
creation (buddying) noted in the resource reference.
In read methods, resources may return embedded resources that are partially represented, and can be expanded further using an argument.
Unless otherwise stated, ALL read methods within the Resource Reference support the expandLevel argument. For resources with no sub-resources, the expandLevel has no effect.
| Item | Type | Description |
|---|---|---|
| expandLevel | int |
0, 1, 2.. n: Levels of sub resources to recursively expand. -1: To expand all child resources. Default Value: 0 Examples: read /tools {} { "expandLevel" : 2 }
read /tools {} { "expandLevel" : -1 }
|
In read methods, schema information is made available automatically in the resource response. To turn this off, use the includeSchema argument by setting this argument to false.
Unless otherwise stated, ALL read methods within this Resource API supports the includeSchema argument.
| Item | Type | Description |
|---|---|---|
| includeSchema | bool |
Whether to include schema information in the read response. Default Value: true Examples: To disable sending back the schema for this read request. read /tools {} { "includeSchema" : false }
|
In read methods, specific fields may be selectively requested instead of all properties. To selectively narrow down a read request, use the fields argument.
Unless otherwise stated, ALL read methods within the Resource Reference supports the fields argument.
| Item | Type | Description |
|---|---|---|
| fields | fields-array |
Read only specific fields instead of all properties Examples: read /tools {} { "fields" : {"displayName" : ""}}
read /tools {} { "fields" : {"id" : "", "displayName" : ""} }
|
Standard resources contain purely JSON properties and the typical read and update methods apply to be able to retrieve the current state and modify it. Not all properties are always modifiable, and readOnly state is documented in the _schema.
Standard Resources have a "_schema" keyword, which is documented more on the Schema and Data Types page.
Most resources fall into this type. Unless stated otherwise, resources should be assumed to be Standard.
Properties
Standard resource properties apply to both read and update methods. The structure of the read response and the update request should follow the documented property structure. Complex property structures are documented using JSON Pointer convention.
Example: The string property called "exampleProp" is a JSON pointer into the Standard Resource's JSON structure.
| Item | Type | Schema | Description |
|---|---|---|---|
| exampleProp | string |
Description of the property. The description includes the set of possible values if values are limited and pre-determined. |
Methods
This lists the applicable REST methods for the resource. For example, if the resource supports both the READ and UPDATE methods, the methods would be documented as follows.
| Method | Description |
|---|---|
| read |
Reads the resource. The response will contain properties documented above in the Properties section for the resource. Examples: read /path/to/resource |
| update |
Updates (modifies) the resource. The request should contain properties documented in the Properties section above for the resource. Examples: update /path/to/resource { "exampleProp": value }
|
This resource type exists primarily to explicitly distinguish from Standard Resource types. Since Standard Resources are so prevalent in this API, the Standard Resource type is implied unless stated otherwise. The NonStandard Resource Type is used to explicitly document when a resource does not follow typical conventions.
Non Standard Resource payload/documents may be binary, strings, or any other JSON value type, as defined by "payload" in the Request Response Type Message .
No method support or behavior is implied for Non Standard Resources. Each supported method will be documented explicitly.
RESTful APIs are typically designed to facilitate mapping of methods to HTML primitives (ie. read to GET and update to POST). More involved, domain-specific operations however, may not easily fit into HTML patterns, so a callable Resource Type pattern is used to represent such custom operations.
A callable resource may have properties like a Standard resource. If it does, then the properties are documented in a Properties section just like Standard resources.
Methods
This lists the applicable REST methods for the resource. The CALL method must be supported because this is a Callable resource. Some Callable resources may also be read-able.
| Method | Description |
|---|---|
| read |
Reads the schema of the callable resource, perhaps providing information about the arguments that the callable resource supports. The output may also contain a list of supported operations that can be called. Examples: read /scanners/commands |
| call |
Invokes the operation. Arguments may need to be provided depending on the resource. Examples: Invocation of a callable resource with no arguments: call /system/commands/start Invocation of a callable resource with arguments: call /tools/commands/reorder { "tools": ["TestForward-2, TestForward-1, TestForward-0] }
|
Observable resources offer the ability to asynchronously notify a client of events affecting the content and composition of resources.
Clients must subscribe to a resource to receive event notifications from the resource. The resource path to subscribe to can be specified with a special wild-cardable path-expression using the wild card character "*".
Unless otherwise stated, ALL resources within this Resource API are observable.. If a resource does not raise any event notifications however, the would be no point to subscribe to it however..
Resource Path-Expressions for subscription
Different ways of expression the subscribed resource is shown below:
| Match Intent | Description |
|---|---|
| Specific Resource |
Match a specific resource at the given path. Example: sub /tools/TestFoward-0 sub /tools/ProfileTool-1/inputs/Input0 |
| Sub-Resources |
Match any resource or sub-resource at the given path using a wild card "*". Example: sub /tools/* sub /scanners/* |
| Mix |
Match either a specific or sub-resource, allowing for wildcarded sub-resources along the way. Example: Match specific resource, allowing for sub-resources along the way: sub /tools/Profile*/inputs/Input0
sub /tools/Profile*/inputs/* |
Methods
Observable resources all support the following methods.
| Method | Description |
|---|---|
|
sub path-expression |
Subscribes to event notifications from the given path. Examples: Subscribe to event notifications from a single tool: sub /tools/TestForward-0 Subscribe to all tools within the tools collection (ie. /tools/(id)), as well as all inputs and outputs within each tool (ie. /tools/(id)/inputs, and /tools/(id)/outputs). sub /tools/* |
| unSub path-expression |
Unsubscribes event notifications from the given path. Examples: unSub /tools/TestForward-0 unSub /tools/* |
| listSub | Lists all current subscriptions. |
| clearSub | Clears all current subscriptions. |
Subscriptions using path-expressions are multiple and explicit:
Multiple path-expressions can subscribed to, and each is explicit even if they overlap by nature of wildcarding.
Duplicate subscriptions are automatically ignored.
| Method Sequence | listSub Response |
|---|---|
|
sub /tools/TestForward-0 |
{ "subscriptions" : [
"/tools/*",
"/tools/TestForward-0"
]}
|
|
sub /tools/TestForward-0 |
{ "subscriptions" : [
"/tools/TestForward-0"
]}
|
Subscriptions using path-expressions are wholistic:
Even if multiple overlapping path-expressions are subscribed to, only one event notification will be send to the client's connection session.
For example, given a single event notification from the /tools/TestForward-0 resource, the following sets of subscriptions are equivalent and will result in one event notification sent to the subscribing client.
or
Event Notifications Content
Resources that support event notifications will list the event notifications that they raise underneath a section called Notifications (see Notification Type Response Message).
If the section is missing, it can be assumed that the particular resource DOES NOT raise any event notifications.
Collection resources often support the ability to:
Collection resources all contain an embedded "item", which is the collection of the child items.
Note that child items may or may not share the same schema. For example, each tool within the /tools collection could hold a different schema from one another.
Unordered Collections
Unless explicitly indicated, collection resources are unordered, and may be returned in alphabetical order, or the order in which resources were added to the collection. This order should not be relied upon by clients.
Ordered Collections
If a collection is ordered, it will be indicated as:
| Resource Type: (Collection - Ordered) |
Ordered collections return an explicit zero-based "ordIndex" property when the resource is read.
Methods
Collection resources commonly support the following methods:
| Method | Description | |||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| read |
Returns an embedded "item", which is the collection of all the child items within the collection. The embedded "item" property is omitted from the documentation, and can be assumed to exist for all collection resources. Example: {
"_links": {
"self": {
"href": "/tools"
}
},
"_embedded": {
"item": [
{
"_links": {
"self": {
"href": "/tools/id1"
}
},
"ordIndex": 0
},
{
"_links": {
"self": {
"href": "/tools/id2"
}
},
"ordIndex": 1
}
]
}
}
|
|||||||||||||||||||||||
| create |
Adds a new item to the collection. The arguments for adding items to the collection are resource-specific. Example: create /tools {"type" : "TestForward" }
|
|||||||||||||||||||||||
| call |
This method applies only to an Ordered Collection which has Callable resource characteristics. The operations supported are:
|
Notifications
| Event Type | Description |
|---|---|
| updated |
For an unordered collection, this is rarely raised, except if the collection supports operations that affect large sections of the collection, for example a clear all function. Unary additions and deletions to a collection are raised upon the collection item's resource and are sufficient for unordered collections. For ordered collections, this event is raised whenever there are additions, deletions, or re-orderings of the collection since the "order" of the collection may have changed.
Example output is abbreviated for clarity. {
"eventType" : "updated",
"path" : "/tools",
"payload": {list of tools}
}
{
"eventType" : "updated",
"path" : "/jobs/files",
"payload": {list of job files}
}
|
Resources within a collection often support a method for deletion if the collection can be modified. Unless explicitly indicated, collection resources are unordered, and may be returned in alphabetical order, or the order in which resources were added to the collection. This order should not be relied upon by clients.
Methods
| Method | Description |
|---|---|
| read | Reads a specific item within the collection. |
| delete | Deletes a specific item from within the collection. |
Notifications
| Event Type | |
|---|---|
| created |
Occurs whenever an item is added to the collection which can happen indirectly via another request. Example: { "eventType" : "created", "path" : "/tools/TestForward-0",
"content" : {new tool properties} }
|
| deleted |
Occurs whenever an item is removed from the collection. Example: { "eventType" : "deleted", "path" : "/tools/TestForward-0"}
|
Streamable resources offer the ability to continuously deliver a "stream" of data to a client. The information may be:
Methods
Streams must be initiated and canceled upon the client connection, and are resource specific:
| Method | Argument | Description |
|---|---|---|
|
stream |
resource |
Streams data from the given resource. Examples: Stream data from a scanner output or tool output: stream /dataSources/scan:test:0:Output/data stream /dataSources/tools:ProfileInfo-0:outputs:PointCount/data Stream metrics from a tool: stream /tools/extId=My%20Tool%20Id/metrics |
| cancelStream | resource |
Cancels streaming from the given resource. Use the same resource path as the one used for the stream request. Examples: cancelStream /dataSources/scan:test:0:Output/data cancelStream /dataSources/tools:ProfileInfo-0:outputs:PointCount/data cancelStream /tools/extId=My%20Tool%20Id/metrics |
| listStream | Lists all current streams that have been request by the client |
Stream Responses
See Stream Type Response Message.
Examples
Data received from a stream.
{ "streamStatus": "streaming",
"streamId" : 1,
"path" : "/dataSources/scan:test:0:Output/data",
"data" : {stream data}
}
Indication that streaming has completed for a finite (non-continuous) stream.
{ "streamStatus": "complete",
"streamId" : 1,
"path" : "/someFiniteStream/data"
}
Indication that streaming terminated abnormally.
{ "streamStatus": "abort",
"streamId" : 1,
"path" : "/tools/TestForward=0/metrics"
}
A client must know the "shape" of an object to be able to use it. The "shape" in this case refers to the structure of the object, the types of each of its members, and other meta data describing the object and its fields. Traditionally, the shape is defined as a part of the protocol. However there are times where a client must discover this shape at runtime, without prior knowledge.
Some notable examples that require this dynamic discovery:
The schema system allows the shape of an object to be expressed through a standardized format. It designed to be extensible so that meta data can be added over time without breaking compatibility. A client can simply choose to ignore meta data that it does not understand.
The design of the schema documents is based on the design of JSON Schema and is more-or-less a subset of functionality. Many of the concepts and terminologies are borrowed from this spec, so as to minimize the possibility of confusion caused by inconsistency. Future developers familiar with JSON schema should find themselves at home working with our schema format. This approach should allow us to claim compliance with JSON Schema Validation standard, at which point many existing 3rd party tools and libraries may become usable.
Our implementation has the following non-inclusive set of limitations from the official JSON schema spec:
This list may change over time.
The schema of a document can be optionally sent inline with the document, as a special "_schema" field. A protocol client must request the document when they Read a resource. A simple example of a resource response, when the schema has been requested is as follows:
{
source: 0,
maxFrameRateEnabled: true,
frameRate: 300,
BurstScan: {
enabled: true,
count: 300
},
_schema: {
type: object,
properties: {
source: {
type: integer,
enum: [0,1,2]
}
maxFrameRateEnabled: {
type: boolean
},
frameRate: {
type: number,
used: true
},
// ...
}
}
}
It is also possible to read the document without the schema.
If the data described is an object or array, then each of its children also has a schema value. A schema value is always read-only, and is essentially a JSON object containing a set of properties. Within the context of a schema document, these properties are referred to as "keywords".
A keyword falls into one or both of these categories:
The list of acceptable keywords depends on the type of the data being described. Keywords that are not known to a client should simply be ignored.
The type of an object falls into one of two categories:
These types and extended types are described in more detail later.
Validation is a process of checking a complete instance for assertions. Each assertion works independently of any other keyword and adds constraints that an instance must satisfy in order to successfully validate. Assertion keywords that are absent never result in more restrictive validation. In some cases, this no-op behavior is identical to a keyword that exists with certain values.
Validation assertions only constrain values within a certain primitive type. When the type of the instance is not of the type targeted by the keyword, the instance is considered to conform to the assertion. For example, the "maxLength" keyword will only restrict certain strings (that are too long) from being valid. If the instance is a number, boolean, null, array, or object, then it is valid against this assertion. However in practise, this is irrelevant because overloading a property with generally incompatible types should typically be avoided.
This is the base of all other data types. Keywords defined here are applicable to to all types.
| Keyword | Category | Type | Description |
|---|---|---|---|
| type | Assertion | string or array of strings |
Enumerates the possible JSON types of the field. Available types are “object”, “array”, “number”, "integer", “boolean”, “string”, "binary", and “null”. An instance validates if and only if the instance is in any of the sets listed for this keyword. Type can be an array of strings. For example ["object"] or even ["object,"string"]. However GoPxL's use of JSON schema makes very limited use of this capability. Arrays will only be used on one of the following 2 ways
Official JSON Schema spec does not support "binary", but GoPxL's spec does. This is because GoPxL's protocol supports both JSON and MsgPack resource serialization methods. For JSON-serialized resources, a schema document instance which is defined as type=binary implies that the instance must be a base64 encoded string. In "pure" JSON Schema, this is equivalent to: { type: "string",contentEncoding: "base64"} GoPxL won't support the contentEncoding keyword, since its needs are met by the custom type=binary. For more information on the contentEncoding keyword, see here |
| extendedType | Annotation | string |
Augments the type with a more specific type name, for clients that are able to use this information. Using the extendedType, assumptions can be made about the structure and meaning of a value. Note that the use of extendedType is optional; the schema should be fully intepretable even when the extendedType is ignored. For example, a field with a type="object" and extendedType="ProfileRegion" can be treated as a generic object. However for clients that understand the extended type "ProfileRegion", it can choose to represent the value specifically as a "region" rather than a simple map of values. This permits a mechanism of type inheritance, but should be used carefully - we do not intend to capture the complete inheritance chain in the schema. For instance, consider if ProfileRegion extends from Region which extends from Object: in this case, extendedType=ProfileRegion and type=Object. The fact that ProfileRegion extends from Region is not represented in schema. The "extendedType" keyword offers much of the same functionality as the "format" keyword in official JSON Schema spec which has a few pre-defined formats. GoPxL does not support nor use any of these defined formats. In the future, the "extendedType" keyword may be deprecated in favor of the "format" keyword. |
| readOnly | Both | boolean |
If "readOnly" has a value of boolean true, it indicates that the value of the instance is managed exclusively by the Back End and not the Front End, and attempts by a Front End to modify the value of this property are expected to be ignored or rejected, at the Back End's discretion. This keyword can apply both to single-value instances (number, integer, boolean, string, binary, null) as well as multi-value instances (object, array). For multi-value instances, the entire instance is considered readOnly, including any children. |
| used | Annotation | boolean |
A property is normally used. It is not used if its associated feature is disabled; in this case, the current value has no effect on operation. The 'used' field is the manner by which the Back End can hint to the Front End that a particular property is "applicable" or "no longer applicable". When 'used' is false, the Front End should strive to remove all visible entities related to such property from its display. |
| actual | Annotation | (ValueType) |
Sometimes the actual value of a property is overriden by a system-calculated one. For example, if the user specifies 100.0 for the "frameRate", but "enableMaxFrameRate" is enabled, the actual frame rate used is the system-calculated max, which might be something like 203.6 Hz. In this case, the property value is still 100.0, but it's "actual" schema value is 203.6. |
| title | Annotation | culture-specific string | This keyword is used to decorate (typically graphically) a client interface with information about this instance. A title will preferably be short, and is often used as the "label" in dynamically generated forms. |
| unit | Annotation | string | Specifies the unit of a value, e.g. "mm" or "μs". |
| description | Annotation | culture-specific string | This keyword is used to decorate (typically graphically) a client interface with information about this instance. A description could be long, as it is intended to provide an explanation about the purpose and correct use of the instance described by this schema. |
A primitive type is a simple value, described by a set of keywords. All primitive types use the keywords from the common base type, and may add their own.
// Data
"enableAutoSide": true
// Schema Document
"enableAutoSide": {
"title": "Enable Auto Side",
"type": "boolean",
"unit": "",
"readOnly": true,
"used": true
}
A boolean has no additional keywords.
| Keyword | Category | Type | Description |
|---|---|---|---|
| minimum | Assertion | (ValueType) | If the instance is a number, then and instance only validates against this keyword if the instance is greater than or exactly equal to this keyword's value. |
| maximum | Assertion | (ValueType) | If the instance is a number, then this keyword validates only if the instance is less than or exactly equal to this keyword's value. |
| exclusiveMinimum | Assertion | (ValueType) | If the instance is a number, then the instance is valid only if it has a value strictly greater than (not equal to) this keyword's value. |
| exclusiveMaximum | Assertion | (ValueType) | If the instance is a number, then the instance is valid only if it has a value strictly less than (not equal to) this keyword's value. |
| multipleOf | Assertion | (ValueType) | A numeric instance is valid only if division by this keyword's value results in an integer (possibly negative). Put another way, this is equal to saying propVal % keywordVal == 0 |
| scale | Annotation | integer |
Determines how the user should interpret a change in this number's magnitude. When this schema keyword is absent, it is expected that clients will assume the scale is linear. Options are:
|
Same as number.
| Keyword | Category | Type | Description |
|---|---|---|---|
| minLength | Assertion | integer |
A string instance is valid against this keyword if its length is greater than, or equal to, the value of this keyword. The value of this keyword MUST be a non-negative integer. |
| maxLength | Assertion | integer |
A string instance is valid against this keyword if its length is less than, or equal to, the value of this keyword. The value of this keyword MUST be a non-negative integer. |
| Keyword | Category | Type | Description |
|---|---|---|---|
| enum | Both | (ValueType) | An instance validates successfully against this keyword if its value is equal to one of the elements in this keyword's array value. Elements in the array might be of any value, including null. |
| enumText | Both | culture-specific string[] | Provides a text description for each of the values in "enum". It should have the same length as enum, and all items should be in the same order. The value of this string may change as the user selects a different system language, so clients should not depend on enumText value for runtime behavior. |
"selectedSide": {
"enum": [
0,
1,
2
],
"enumText": [
"Left",
"Right",
"Auto"
],
"title": "Selected Side",
"type": "integer",
"unit": "",
"used": true,
"visible": true
}
An object contains child properties, which may be objects themselves.
| Keyword | Category | Type | Description |
|---|---|---|---|
| properties | Assertion | Schema |
This keyword determines how child instances validate for objects, and does not directly validate the immediate instance itself. This is similar to the "items" keyword for arrays. Validation succeeds if, for each name that appears in both the instance and as a name within this keyword's value, the child instance for that name successfully validates against the corresponding schema. Name's within this keyword's value which do not match to names in the instance are ignored. |
| required | Assertion | string[] |
An object instance is valid against this keyword if every item in the array is the name of a property in the instance. The value of this keyword MUST be an array. Elements of this array, if any, MUST be strings, and MUST be unique. |
An object can be decorated with an "extendedType", which means it follows a predefined shape. See "extendedType" in the Type Base section for more information. The actual extended types are described later.
An object is sometimes referred to as a "Property Group" or "Group". Later in this document, "Group" is defined in a bit more detail, with a specific example. However, it's worth reiterating that a Group is really just an object, from the perspective of the protocol and the schema system.
An array can contain either primitive items or objects (which may or may not have extended types).
| Keyword | Category | Type | Description |
|---|---|---|---|
| items | Assertion | Schema[] |
This keyword determines how child instances validate for arrays, and does not directly validate the immediate instance itself. This is similar to the "properties" keyword for objects. If "items" is a schema, validation succeeds if all elements in the array successfully validate against that schema. If "items" is an array of schemas, validation succeeds if each element of the instance validates against the schema at the same position, if any. |
| minItems | Assertion | integer |
An array instance is valid against "minItems" if its size is greater than, or equal to, the value of this keyword. The value of this keyword MUST be a non-negative integer. |
| maxItems | Assertion | integer |
An array instance is valid against "maxItems" if its size is less than, or equal to, the value of this keyword. The value of this keyword MUST be a non-negative integer. |
// Data
"intArray": [
1,
2,
3
]
// Schema
"intArray": {
"items": {
"type": "integer"
},
"title": "Int Array",
"type": "array",
"unit": "",
"used": true,
"visible": true
}
// Data
"regions": [
{
"height": 0.0,
"width": 0.0,
"x": 1000.0,
"z": 0.0
},
{
"height": 0.0,
"width": 0.0,
"x": 1000.1,
"z": 0.0
},
{
"height": 0.0,
"width": 0.0,
"x": 1000.2,
"z": 0.0
}
]
// Schema
"regions": {
"items": [
{
"extendedType": "",
"properties": {
"width": {
"type": "number",
},
"height": {
"type": "number",
},
"x": {
"type": "number",
},
"y": {
"type": "number",
},
"zAngle": {
"type": "number",
}
},
"title": "",
"type": "object",
"visible": true
},
{
// ...
},
{
// ...
}
],
"type": "array"
}
Extended types typically contain no extra keywords, and are defined by the set of contained fields. They are typically Groups but not always. Every extended type has a unique extendedType keyword so they can be specially handled beyond the regular types.
// Schema document for an extended object
{
"type": "object",
"extendedType": "MyExtendedObjectType",
"properties": {
"propA": {
"type": "number"
},
},
"title": "My Extended Object Type"
}
// Schema document for an extended array
{
"type": "array",
"extendedType": "MyExtendedArrayType",
"items": {
"type": "number"
},
"title": "My Extended Array Type"
}
// Schema document for an extended string array
{
"type": "string",
"extendedType": "MyExtendedStringType",
"title": "My Extended String Type"
}
Base type: object
Extended type: <empty string> or not specified
A group contains properties - it is a parent container for parameters.
All base keywords apply to groups. In particular, the "title" keyword contains a short description for the group, which can be used to name the group of controls in the UI.
A group is really just an "object" defined above in "container types" but it is defined here as a base for many (but not all) extended types.
{
"type": "object",
"properties": {
"propA": {
"type": "number"
},
},
"title": "My Group (which is just an object)"
}
Base type: array
Extended type: "Transform3d"
A 16 element array representing a 4 x 4 3D affine transformation matrix as shown below. If the transform is invalid, the array will be empty (ie it will have count=0 and have no elements in it).
This transform is primarily intended for transforming anchored regions by supporting translation and rotation only. Use of this transform for scaling and skewing regions is neither recommended nor supported.
[xx, xy, xz, xt, yx, yy, yz, yt, zx, zy, zz, zt, 0, 0, 0, 1]
| Index | Type | Description |
|---|---|---|
| 0 | number | xx component of the 3D transformation matrix |
| 1 | number | xy component of the 3D transformation matrix |
| 2 | number | xz component of the 3D transformation matrix |
| 3 | number | xt component of the 3D transformation matrix |
| 4 | number | yx component of the 3D transformation matrix |
| 5 | number | yy component of the 3D transformation matrix |
| 6 | number | yz component of the 3D transformation matrix |
| 7 | number | yt component of the 3D transformation matrix |
| 8 | number | zx component of the 3D transformation matrix |
| 9 | number | zy component of the 3D transformation matrix |
| 10 | number | zz component of the 3D transformation matrix |
| 11 | number | zt component of the 3D transformation matrix |
| 12 | number | 0 |
| 13 | number | 0 |
| 14 | number | 0 |
| 15 | number | 1 |
{
"type": "array",
"extendedType": "Transform3d",
"items": {
"type": "number"
},
"title": "Transform Matrix",
...
}
Base type: object
Extended type: "TransformedBoxRegion"
| Field | Type (ext type) | Description |
|---|---|---|
| x | number | Optional. The x coordinate of the region center. |
| y | number | Optional. The y coordinate of the region center. |
| z | number | Optional. The z coordinate of the region center. |
| width | number | Optional. The width of the region (x). |
| length | number | Optional. The length of the region (y). |
| height | number | Optional. The height of the region (z). |
| xAngle | number | Optional. Angle of rotation around the x axis. |
| yAngle | number | Optional. Angle of rotation around the y axis. |
| zAngle | number | Optional. Angle of rotation around the z axis. |
| transformMatrix |
array (Transform3d) |
Optional. Transform3d array which defines the transform that applies to the region. If this field is missing, clients should assume the region is not transformed. This is effectively the same as having an identity matrix. |
Optional - any of these fields may or may not be present for this extendedType. Clients must handle the case where any or all of these fields may not exist.
{
"type": "object",
"extendedType": "TransformedBoxRegion",
"title": "My Region",
"properties": {
"height": {
"sortOrder": 5,
"title": "Height (Z)",
"type": "number"
},
"transformMatrix": {
"items": {
"type": "number"
},
"readOnly": true,
"sortOrder": 9,
"title": "Transform Matrix",
"type": "array",
"extendedType": "Transform3d"
},
"width": {
"sortOrder": 3,
"title": "Width (X)",
"type": "number"
},
"x": {
"sortOrder": 0,
"title": "X",
"type": "number"
},
"yAngle": {
"sortOrder": 7,
"title": "Y Angle",
"type": "number",
"used": false
},
"z": {
"sortOrder": 2,
"title": "Z",
"type": "number"
}
},
...
}
The term "client" refers to the station issuing the request, wishing to discover available GoPxL application servers on the network. For example, the LMI SDK is an example of a discovery protocol client.The term "server" refers to the station issuing the response, in this case this is the GoPxL application, running on a sensor, a GoMax, or on a Windows/Linux computer/platform.
The protocol uses UDP.GoPxL discovery server listens for any client requests on UDP destination (dst) port = 3320 (by default). The client may choose any source (src) port it wishes to send the request from. GoPxL discovery server may emit it's own messages, also with dst port = 3320.
This means that clients will "see" other client requests. This is intended by the protocol design, and clients should use message id's to ignore other client requests (see below).
The discovery client broadcasts the following message to any network it wishes to discover GoPxL servers:
Broadcast Message
|
Field |
Type |
Offset |
Description |
|
Length |
unsigned int64 |
0 |
24 |
|
Message Id |
unsigned int64 |
8 |
0x0001 |
|
Signature |
unsigned int64 |
16 |
0x4C58504F47494D4C // "LMIGOPXL" |
Typically, clients will iterate over every interface and issue the above network-directed broadcast appropriately on each interface.
The application discovery server on the sensor/GoMax/PC GoPxL application typically responds to a discover message with the following announce message to the clients. Clients should not treat the announce message as a "reply", as any other client may have issued a discover message as well. Announcements can happen at any time - in the future, the application could even be configured to announce periodically based on a timer, without the need for discover messages:
Reply Message
|
Field |
Type |
Offset |
Description |
||||||
|
Length |
unsigned int64 |
0 |
32 + payload length | ||||||
|
Message Id |
unsigned int64 |
8 |
0x1001 |
||||||
|
Signature |
unsigned int64 |
16 |
0x4C58504F47494D4C // "LMIGOPXL" |
||||||
| MsgStatus | kStatus | 24 |
Status of the message, the values used:
|
||||||
| Message Payload | string | 32 | JSON String |
The message payload is coded in JSON, which contains string key - value pairs. The message contains only the key - value pairs that are valid for the message.
The possible keys are:
| Key Name | Type | Description |
|---|---|---|
| SerialNumber | string | If discovered GoPxL is running on LMI device, this is the device serial number |
| DeviceModel | string | If discovered GoPxL is running on LMI device, this is the device model number |
| AppName | string | Name of the application instance |
| AppId | string | Unique ID of the application instance. Mandatory. |
| AppVersion | string | Version of the application instance |
| ControlPort | number | Raw socket REST API port. Typically 3600 but can vary to avoid port conflicts. |
| WebPort | number | HTTP server port, typically 80 but can vary to avoid port conflicts. This port is used both for browsers to retrieve the Web GUI, but also for WebSocket connections to the REST API (at path /ws/controlAsync) |
| GdpPort | number | Gocator Data Protocol port. Typically 3196 but can vary to avoid port conflicts. |
| IsRemote | boolean | True if LMI device is remotely connected/controlled from another GoPxL instance. Remote sensors should generally not to be connected to via the control API. This includes websocket connections on path /ws/controlAsync, as well as raw socket connections on ControlPort. |
| Address | string | Configured host address. When GoPxL is running on PC, this could be the address of any reachable interface. When running on LMI device, it shall be of the primary ethernet interface (eg interface 1). |
| Mask | string | Configured host subnet mask. When GoPxL is running on PC, this could be the subnet mask of any reachable interface. When running on LMI device, it shall be of the primary ethernet interface (eg interface 1). |
| Gateway | string | Configured host gateway. When GoPxL is running on PC, this could be the gateway of any reachable interface. When running on LMI device, it shall be of the primary ethernet interface (eg interface 1). |
| Dhcp | boolean | True if DHCP is enabled. When GoPxL is running on PC, this could be the DHCP state of any reachable interface. When running on LMI device, it shall be of the primary ethernet interface (eg interface 1). |
| AddressConflict | boolean | The IP address may have been automatically assigned due to an address conflict. |
An example of the reply message payload from the sensor:
'{"SerialNumber":"DeviceModel","45045":"2330"}'
The client, upon receiving the reply, verifies the header fields (Length, Message Id and Signature). Then the remaining bytes in the stream of bytes starting at location for Message Payload is to be treated as a string, and parsed using a JSON parser.
The discovery client can send the SetIp message to the server using a direct address. If the server is out of reach e.g. after the factory default, the message can be sent also using broadcasting.
The discovery client sends the following message to the GoPxL server to set a new IP address to the device:
Message
|
Field |
Type |
Offset |
Description |
|
Length |
unsigned int64 |
0 |
24 + payload length |
|
Message Id |
unsigned int64 |
8 |
0x0003 |
|
Signature |
unsigned int64 |
16 |
0x4C58504F47494D4C // "LMIGOPXL" |
| Message Payload | string | 24 | JSON String |
The message payload is coded in JSON, which contains string key - value pairs. The possible keys are:
| Key Name | Type | Description |
|---|---|---|
| AppId | string | Unique ID of the application instance. Mandatory. |
There is no response message sent for this request, as typically devices reboot immediately upon changing their IP address. Clients are required to do a new discover message after the SetIp request to update their statuses.
The Control Protocol consists of four significant concepts:
This document describes the correct use of the socket connections and the Carrier and Control messaging layer, as well as the structure of the messages allowed on these layers. The Control Messages Content forms the basis of the GoPxL REST API and is described in Resource Reference.
Connections to the Control Protocol can be made either by websocket or raw socket. Data can arrive both synchronously (ie in response to a request) or asynchronously (ie without request, as a result of prior subscriptions). As a result, these connections are generally intended to be long-lasting. Rather than establishing a connection, issuing a request, receiving the response, and then disconnecting, clients are encouraged to maintain a connection for the life time of the application, disconnecting and reconnecting only occasionally.
Mentioned below, the IP address, Control Port, and Web Port are dynamic. GoPxL can be run multiple times on a given machine, in which case Ports have to be selected by the application dynamically to avoid conflict. The selected ports are available in the discovery messages, the format is described in GoPxL Discovery Protocol.
The GUI client is also hosted from the Web Port.
A raw socket connection can be made to the following IP and ports:
IP address: <IP Address>, Port: <Control Port>
By default, the Control Port is set 3210, but it can vary to avoid conflicts.
A websocket connection can be made to the following URLs:
http://<IP Address>:<Web Port>/ws/controlAsync
Normally, the Web Port is 80, but it can vary to avoid conflicts.
In this version of the protocol, the Web Socket behaves like a stream (as it is a thin wrapper around a raw socket). Data events received by the client are not guaranteed to be complete Carrier Messages (see below) and/or may have more than a single Carrier Message. Well written websocket clients must buffer the event.data and conservatively attempt to deserialize carrier messages off the buffer. If a given data event does not provide enough bytes to satisfy the length, it must be saved and future data events appended until totalBytes > length. It is not guaranteed that future data events will ever result in the buffer reaching 0. For example, the most recent data event may contain data which complete the current carrier message, and also begins a new one.
All JSON control messages are relayed between server and client through a binary-based message transfer mechanism, referred to as carrier messages. In other words, all control messages are contained within the payload of carrier messages.
The carrier messages have the concept of "Requests" or "Responses", but only as a way of informing the user agent (either client or server) about serialization concerns.
In the event of a malformed carrier message (ie one that can't be deserialized) the server will respond with an empty message (ie one with no data) and an error status (ie carrier status != OK). The connection may also be closed by the server, however this behavior is not mandatory. In practice, Carrier Status != OK should almost never happen.
In the header, the MessageType field has the following values, where each value corresponds to a message format that is supported:
| Value | Description |
|---|---|
| MessagePack | The request/response is a message pack request/response |
| JSON | The request/response is a plain JSON request/response |
| Field | Type | Description |
|---|---|---|
| Length | 32u | Entire message size (including this field). |
| MessageType | 16u | The request message type (format). Must be 0xB000 (Msgpack binary format) |
| DataLength | 32u | Size of the data field in bytes. |
| Data | byte[] | Msgpack binary encoded payload of length DataLength. |
| Field | Type | Description |
|---|---|---|
| Length | 32u | Entire message size (including this field). |
| MessageType | 16u | The command message type (repeated from request). |
| Status | 32s | Request result as Status. Will always be kOK unless there was a data communication or data formatting/parsing error. |
| DataLength | 32u | Size of data field in bytes. |
| Data | byte[] | Msgpack binary encoded payload of length DataLength. |
| Field | Type | Description |
|---|---|---|
| Length | 32u | Request size (including this field). |
| MessageType | 16u | The request message type (format). Must be 0xB001 (JSON format). |
| DataLength | 32u | Size of the data field in bytes. |
| Data | char[] | JSON-encoded (string) payload of length DataLength. |
| Field | Type | Description |
|---|---|---|
| Length | 32u | Response size (including this field). |
| MessageType | 16u | The message type (repeated from request). |
| Status | 32s | Request result as Status. Will always be kOK unless there was a data communication or data formatting/parsing error. |
| DataLength | 32u | Size of data field in bytes. |
| Data | char[] | JSON-encoded (string) payload of length DataLength. |
Throughout the documentation you will see "JSON" used in reference to the value of a potential property type. The terms "JSON" and "MessagePack" (or "MsgPack") are used interchangeably for the purposes of documentation, since they have the same abstract format. Both JSON and MessagePack can serialize complex objects and properties of the same type (although MessagePack has native support for binary data). A list of all possible JSON/MessagePack value types is documented here.
GoPxL overloads JSON standard to include binary data. For MessagePack serialized REST connections, this is supported natively. For JSON serialized REST connections, binary data is converted into a standard number array. For example, a property defined as binary which contains the string "hello\0" would look like
[104, 101, 108, 108, 111, 0]
The order of fields is not guaranteed.
A JSON/msgpack request message has the following fields:
| Field | Type | Required | Description |
|---|---|---|---|
| method | string | Yes |
Must be one of the following method strings:
Each method is described in detail here Over time, as the protocol evolves and changes, this list may grow. Methods will rarely, if ever, be removed. Such an act would be a breaking protocol change. |
| path | string | Yes | the path of the resource, eg "/system/commands" |
| payload | JSON | No |
If the resource requires request data (sometimes called "arguments", but not to be confused with "args" below), they should be in the payload object. If no request data is required the payload should be an empty object "{}" or null (as specified in the Resource Reference). |
| args | JSON | No |
Additional method arguments passed to the request handler. Args modify the way the method is processed, and are not typically handled by the resource request. These are defined within the context of application logic,
rather than the protocol. If no argument data is required the "args" field should be an empty object "{}" or null. |
Examples:
{
"method": "read",
"path": "/system/info",
"payload": {},
"args" : {}
}
{
"method": "read",
"path": "/tools",
"payload": {},
"args" : {"expandLevel": -1}
}
{
"method": "create",
"path": "/tools",
"payload": {"type": "TestForward", "position": 3, "autoConnect": true},
"args" : {}
}
There are generally three types of response messages:
Response messages all contain the following fields. Some response type messages (eg. notification) can have additional fields. These additional fields are described in more detail in the sections on the specific response type messages.
| Field | Type | Required | Description | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| path | string | Sometimes |
Changed in 1.0.x.x The "path" field is the resource path in the request message, if the request supplied a resource path. This value can also be duplicated inside the "payload" field. For example, in the following example:
|
||||||||
| payload | JSON | No |
When applicable (as specified in the Resource Reference), contains the response of the request. This can be any valid JSON/MsgPack value. If no payload is available, it can be a JSON null, especially for the last message in a streamed sequence. When the type is "response", the payload contains the content relevant to the request. When the type is "notification", the payload contains the content pertaining to the relative URI path raising the event notification. |
||||||||
| status | signed integer | Yes |
Status of the request. See here for a list of possible status codes. This status code is not related to the carrier message layer. For example, a request for a resource which doesn't exist would return status == OK in the carrier message and status != OK in the Control message. Think of the carrier message status = OK as meaning "message received" and the control message status != OK as meaning "request failed". When response status is not OK, there may be errors in the payload to help explain the failure. See Error Handling for more detail about how error messages are provided in this case. |
||||||||
| type | string | Yes |
This field indicates the type of response message. There are three response message types:
|
Request Response Type Message
Request response type of response message are response messages from the server for the client's request. This type of response message has all the fields for a basic response message described above.
Example: read request to the resource "/logs/summary". In this example, the "path" field value is also present in the "payload/_links/self/href" field.
{
"path" : "/logs/summary",
"payload": {
"_links": {
"self": {
"href": "/logs/summary"
}
},
"idEnd": 3,
"idStart": 1
},
"status": 1,
"type": "response"
}
Notification Type Message
Notification type response messages are messages from the server sent asynchronously to the client, that is not a response to an explicit client request. For notification type messages, an "eventType" field is present at the top level, in addition to the basic response message fields.
| Field | Type | Required | Description |
|---|---|---|---|
| eventType | string | Yes |
Changed in 1.0.x.x Additional field specifically for notification type messages. A string that Indicates the reason why the notification message was generated. Possible values are:
|
| path | string | Yes |
Changed in 1.0.x.x The path is the resource that generated the notification. |
| payload | json | No | Content associated with the event notification. This is usually all the properties normally provided via a read of the same resource. |
Example: This shows a notification from the "/system" resource to which client has subscribed.
Commands used for this example:
sub /system/*
call /system/commands/start
{
"eventType": "updated",
"path": "/system",
"payload": {
"_links": {
"self": {
"href": "/system"
}
},
"_schema": {
"properties": {
"autoLiveSimEnabled": {
"sortOrder": 200,
"title": "autoLiveSimEnabled",
"type": "boolean"
},
"autoStart": {
"sortOrder": 100,
"title": "autoStart",
"type": "boolean"
},
"runState": {
"enum": [
0,
1,
2
],
"enumText": [
"Ready",
"Running",
"Conflict"
],
"readOnly": true,
"sortOrder": 0,
"title": "runState",
"type": "integer"
}
},
"sortOrder": 0,
"title": "",
"type": "object"
},
"autoLiveSimEnabled": true,
"autoStart": false,
"runState": 1
},
"status": 1,
"type": "notification"
}
Some resources can be "streamed", see Notification and Streaming. These streamable resources send data asynchronously from the server to the client when the data is available, without needing the client to explicit ask for the new data.
Two additional fields are present in this type of response message: "streamId" and "streamStatus".
| Field | Type | Required | Description |
|---|---|---|---|
| path | string | Yes |
Changed in 1.0.x.x The "path" field is the streamable resource path that generated the stream data. Typically this is the value as the original stream request resource path. |
| streamId | unsigned integer | Yes |
Changed in 1.0.x.x Additional field specifically for stream type messages. Internally generated identifier for this particular data stream. This value is returned by the stream request response message. |
| streamStatus | string | Yes |
Changed in 1.0.x.x Additional field specifically for stream type messages. Possible values are:
|
Example:
Commands used for this example:
stream "/dataSources/scan:g2xxx:scanner-0:top:profile:uniform/data"
{
"path": "/dataSources/scan:g2xxx:scanner-0:top:profile:uniform/data",
"payload": {
"type": 12,
"commonAttrSize": 151,
"hasTransform": true,
...
"xOffset": -16.25,
"zOffset": 0.0004,
"exposure": 100.09765625
},
"status": 1,
"streamId": 1,
"streamStatus": "streaming"
"type": "stream"
}
Not all resources support streaming, and some resources may only support streaming. Error is returned when trying to access these resources in an unsupported manner.
Payload could be a binary or it could be JSON data. This is specified in the documentation of the respective resource.
For brevity, the documentation adopts a shorthand when providing examples of requests. The shorthand follows the following general syntax
METHOD PATH {PAYLOAD} [{ARGUMENTS}]
Arguments are optional, and are therefore only documented where appropriate.
Some examples of this in use are as follows
read /logs {"startId": 1, "endId": 3}
read /scanners/profile-scanner-0 {} {"expandLevel":0}
delete /jobs/files/myJob
create /jobs/files {"name": "newJob", "content": [binary data]}
call /system/commands/restore {"data":[binary data], "contents": ["currentJob", "replay"]}
stream /dataSources/tools:TestForward-0:outputs:Output0/data {"period": 250000}
sub /tools/Profile*/inputs/*
Additionally, most response examples only include the "payload" portion of the response format, since the "status". "type", and "stream" components are either implied, redundant, or irrelevant. Where additional clarification is needed, these sections may be included.