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 provisioningTime of 5 seconds for the capability of type “Record” while recorder B has a provisioningTime 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 |
VCR-0B |
External ID of the DeviceCapability. |
|
capability |
see Capability. |
The Capability that is assigned to a Device by this DeviceCapability. |
|
|
config |
string (JSON) |
|
The values for the properties defined in the capability. |
|
deviceId |
string |
VCR-0B |
ID of the device this DeviceCapability refers to |
|
capabilityId |
string |
VCR-Wj |
ID of the capability this DeviceCapability refers to |
Example JSON Snippet
{
"id": "VCR-0B",
"capability": {
"id": "VCR-0B",
"content": "{\"action\":\"Record\",\"input\":{\"targetPath\":{\"type\":\"string\",\"optional\":\"true\"},\"profileName\":{\"type\":\"string\",\"optional\":\"true\"}},\"output\":{\"pathToFile\":{\"type\":\"string\"}},\"properties\":{\"provisioningTime\":{\"type\":\"integer\",\"kind\":\"fix\"}}, \"events\": [ \"RecorderMock.fileCreated\", \"RecorderMock.recordingFailed\", \"RecorderMock.recordingStarted\", \"RecorderMock.recordingFinished\" ]}",
"capabilityType": "Record",
"needsStopCommand": true
},
"config": "{\"provisioningTime\":5}",
"deviceId": "VCR-aJ",
"capabilityId": "VCR-xY"
}