model_for_examples.json 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  1. {
  2. "schema":"https://iotx-tsl.oss-ap-southeast-1.aliyuncs.com/schema.json",
  3. "profile":{
  4. "productKey":"a1pkcDf0Xv0"
  5. },
  6. "services":[
  7. {
  8. "outputData":[
  9. ],
  10. "identifier":"set",
  11. "inputData":[
  12. {
  13. "identifier":"PowerSwitch",
  14. "dataType":{
  15. "specs":{
  16. "0":"关闭",
  17. "1":"开启"
  18. },
  19. "type":"bool"
  20. },
  21. "name":"电源开关"
  22. }
  23. ],
  24. "method":"thing.service.property.set",
  25. "name":"set",
  26. "required":true,
  27. "callType":"async",
  28. "desc":"属性设置"
  29. },
  30. {
  31. "outputData":[
  32. {
  33. "identifier":"PowerSwitch",
  34. "dataType":{
  35. "specs":{
  36. "0":"关闭",
  37. "1":"开启"
  38. },
  39. "type":"bool"
  40. },
  41. "name":"电源开关"
  42. },
  43. {
  44. "identifier":"Counter",
  45. "dataType":{
  46. "specs":{
  47. "min":"0",
  48. "max":"99999",
  49. "step":"1"
  50. },
  51. "type":"int"
  52. },
  53. "name":"计数器演示"
  54. }
  55. ],
  56. "identifier":"get",
  57. "inputData":[
  58. "PowerSwitch",
  59. "Counter"
  60. ],
  61. "method":"thing.service.property.get",
  62. "name":"get",
  63. "required":true,
  64. "callType":"async",
  65. "desc":"属性获取"
  66. },
  67. {
  68. "outputData":[
  69. {
  70. "identifier":"Result",
  71. "dataType":{
  72. "specs":{
  73. "min":"1",
  74. "max":"10000000",
  75. "step":"1"
  76. },
  77. "type":"int"
  78. },
  79. "name":"计算结果"
  80. }
  81. ],
  82. "identifier":"Operation_Service",
  83. "inputData":[
  84. {
  85. "identifier":"NumberA",
  86. "dataType":{
  87. "specs":{
  88. "min":"0",
  89. "max":"1000000",
  90. "step":"1"
  91. },
  92. "type":"int"
  93. },
  94. "name":"数值A"
  95. },
  96. {
  97. "identifier":"NumberB",
  98. "dataType":{
  99. "specs":{
  100. "min":"1",
  101. "max":"1000000",
  102. "step":"1"
  103. },
  104. "type":"int"
  105. },
  106. "name":"数值B"
  107. }
  108. ],
  109. "method":"thing.service.Operation_Service",
  110. "name":"数值计算服务演示",
  111. "required":false,
  112. "callType":"sync"
  113. }
  114. ],
  115. "properties":[
  116. {
  117. "identifier":"PowerSwitch",
  118. "dataType":{
  119. "specs":{
  120. "0":"关闭",
  121. "1":"开启"
  122. },
  123. "type":"bool"
  124. },
  125. "name":"电源开关",
  126. "accessMode":"rw",
  127. "required":false
  128. },
  129. {
  130. "identifier":"Counter",
  131. "dataType":{
  132. "specs":{
  133. "min":"0",
  134. "max":"99999",
  135. "step":"1"
  136. },
  137. "type":"int"
  138. },
  139. "name":"计数器演示",
  140. "accessMode":"r",
  141. "required":true
  142. }
  143. ],
  144. "events":[
  145. {
  146. "outputData":[
  147. {
  148. "identifier":"PowerSwitch",
  149. "dataType":{
  150. "specs":{
  151. "0":"关闭",
  152. "1":"开启"
  153. },
  154. "type":"bool"
  155. },
  156. "name":"电源开关"
  157. },
  158. {
  159. "identifier":"Counter",
  160. "dataType":{
  161. "specs":{
  162. "min":"0",
  163. "max":"99999",
  164. "step":"1"
  165. },
  166. "type":"int"
  167. },
  168. "name":"计数器演示"
  169. }
  170. ],
  171. "identifier":"post",
  172. "method":"thing.event.property.post",
  173. "name":"post",
  174. "type":"info",
  175. "required":true,
  176. "desc":"属性上报"
  177. },
  178. {
  179. "outputData":[
  180. {
  181. "identifier":"ErrorCode",
  182. "dataType":{
  183. "specs":{
  184. "0":"故障类型0",
  185. "1":"故障类型1",
  186. "2":"故障类型2"
  187. },
  188. "type":"enum"
  189. },
  190. "name":"故障编号"
  191. }
  192. ],
  193. "identifier":"HardwareError",
  194. "method":"thing.event.HardwareError.post",
  195. "name":"故障事件演示",
  196. "type":"error",
  197. "required":false
  198. }
  199. ]
  200. }