Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
175 lines (171 sloc) 5.32 KB
name: "Random-Integer-Generator"
manufacturer: "IOTech"
model: "Device-Random-01"
labels:
- "device-random-example"
description: "Example of Device-Random"
deviceResources:
-
name: "RandomValue_Int8"
description: "Generate random int8 value"
properties:
value:
{ type: "Int8", readWrite: "R", minimum: "-128", maximum: "127", defaultValue: "0" }
units:
{ type: "String", readWrite: "R", defaultValue: "random int8 value" }
-
name: "Min_Int8"
description: "Minimum of random int8 value"
properties:
value:
{ type: "Int8", readWrite: "R", minimum: "-128", maximum: "127", defaultValue: "-128" }
units:
{ type: "String", readWrite: "R", defaultValue: "random int8 minimum value" }
-
name: "Max_Int8"
description: "Maximum of random int8 value"
properties:
value:
{ type: "Int8", readWrite: "R", minimum: "-128", maximum: "127", defaultValue: "127" }
units:
{ type: "String", readWrite: "R", defaultValue: "random int8 maximum value" }
-
name: "RandomValue_Int16"
description: "Generate random int16 value"
properties:
value:
{ type: "Int16", readWrite: "R", minimum: "-32768", maximum: "32767", defaultValue: "0" }
units:
{ type: "String", readWrite: "R", defaultValue: "random int16 value" }
-
name: "Min_Int16"
description: "Minimum of random int16 value"
properties:
value:
{ type: "Int16", readWrite: "R", minimum: "-32768", maximum: "32767", defaultValue: "-32768" }
units:
{ type: "String", readWrite: "R", defaultValue: "random int16 minimum value" }
-
name: "Max_Int16"
description: "Maximum of random int16 value"
properties:
value:
{ type: "Int16", readWrite: "R", minimum: "-32768", maximum: "32767", defaultValue: "32767" }
units:
{ type: "String", readWrite: "R", defaultValue: "random int16 maximum value" }
-
name: "RandomValue_Int32"
description: "Generate random int32 value"
properties:
value:
{ type: "Int32", readWrite: "R", minimum: "-2147483648", maximum: "2147483647", defaultValue: "0" }
units:
{ type: "String", readWrite: "R", defaultValue: "random int32 value" }
-
name: "Min_Int32"
description: "Minimum of random int32 value"
properties:
value:
{ type: "Int32", readWrite: "R", minimum: "-2147483648", maximum: "2147483647", defaultValue: "-2147483648" }
units:
{ type: "String", readWrite: "R", defaultValue: "random int32 minimum value" }
-
name: "Max_Int32"
description: "Maximum of random int32 value"
properties:
value:
{ type: "Int32", readWrite: "R", minimum: "-2147483648", maximum: "2147483647", defaultValue: "2147483647" }
units:
{ type: "String", readWrite: "R", defaultValue: "random int32 maximum value" }
resources:
-
name: "GenerateRandomValue_Int8"
get:
- { operation: "get", object: "RandomValue_Int8", property: "value", parameter: "RandomValue_Int8" }
set:
- { operation: "set", object: "Min_Int8", property: "value", parameter: "Min_Int8" }
- { operation: "set", object: "Max_Int8", property: "value", parameter: "Max_Int8" }
-
name: "GenerateRandomValue_Int16"
get:
- { operation: "get", object: "RandomValue_Int16", property: "value", parameter: "RandomValue_Int16" }
set:
- { operation: "set", object: "Min_Int16", property: "value", parameter: "Min_Int16" }
- { operation: "set", object: "Max_Int16", property: "value", parameter: "Max_Int16" }
-
name: "GenerateRandomValue_Int32"
get:
- { operation: "get", object: "RandomValue_Int32", property: "value", parameter: "RandomValue_Int32" }
set:
- { operation: "set", object: "Min_Int32", property: "value", parameter: "Min_Int32" }
- { operation: "set", object: "Max_Int32", property: "value", parameter: "Max_Int32" }
commands:
-
name: "GenerateRandomValue_Int8"
get:
path: "/api/v1/device/{deviceId}/GenerateRandomValue_Int8"
responses:
-
code: "200"
description: ""
expectedValues: ["RandomValue_Int8"]
-
code: "503"
description: "service unavailable"
expectedValues: []
put:
path: "/api/v1/device/{deviceId}/GenerateRandomValue_Int8"
parameterNames: ["Min_Int8","Max_Int8"]
responses:
-
code: "200"
description: ""
-
code: "503"
description: "service unavailable"
-
name: "GenerateRandomValue_Int16"
get:
path: "/api/v1/device/{deviceId}/GenerateRandomValue_Int16"
responses:
-
code: "200"
description: ""
expectedValues: ["RandomValue_Int16"]
-
code: "503"
description: "service unavailable"
expectedValues: []
put:
path: "/api/v1/device/{deviceId}/GenerateRandomValue_Int16"
parameterNames: ["Min_Int16","Max_Int16"]
responses:
-
code: "200"
description: ""
-
code: "503"
description: "service unavailable"
-
name: "GenerateRandomValue_Int32"
get:
path: "/api/v1/device/{deviceId}/GenerateRandomValue_Int32"
responses:
-
code: "200"
description: ""
expectedValues: ["RandomValue_Int32"]
-
code: "503"
description: "service unavailable"
expectedValues: []
put:
path: "/api/v1/device/{deviceId}/GenerateRandomValue_Int32"
parameterNames: ["Min_Int32","Max_Int32"]
responses:
-
code: "200"
description: ""
-
code: "503"
description: "service unavailable"