DeviceCapability
A DeviceCapability connects a Device and a Capability. This is necessary because different devices can have the same capability, but with slight differences e.g. regarding the actual values of some properties.
For example, a recorder A can have a preroll of 5 seconds for the capability of type “Record” while recorder B has a preroll of 10 seconds. The value is important to control the devices when performing a record command, but is in most cases irrelevant for the chosen device for an action.
Properties
Property | Possible Values | Example | Description |
---|---|---|---|
id | string | 0B | External ID of the DeviceCapability. |
capability | see Capability. | The Capability that is assigned to a Device by this DeviceCapability. | |
config | string (JSON) |
CODE
| The values for the properties defined in the capability. |
Example JSON Snippet
{
"id": "0B",
"capability": {
"id": "0B",
"content": "{\"action\":\"Record\",\"input\":{\"targetPath\":{\"type\":\"string\",\"optional\":\"true\"},\"profileName\":{\"type\":\"string\",\"optional\":\"true\"}},\"output\":{\"pathToFile\":{\"type\":\"string\"}},\"properties\":{\"preroll\":{\"type\":\"integer\",\"kind\":\"fix\"}}, \"events\": [ \"RecorderMock.fileCreated\", \"RecorderMock.recordingFailed\", \"RecorderMock.recordingStarted\", \"RecorderMock.recordingFinished\" ]}",
"capabilityType": "Record",
"needsStopCommand": true
},
"config": "{\"preroll\":5}"
}