You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
1、事件上行时: 设备应主动发送的事件报文
Topic: /oneM2M/req/switch1/in-cse
payload:
{
"op": 1,
"to": "/in-cse/switch1/status",
"fr": "/in-cse/switch1",
"rqi": "1234",
"ty": 7,
"pc": {
"m2m:event": {
"lbl": "lable",
"cnf": "0",
"con": {
"time": "9: 00--12: 00",
"reserver": "小王",
}
}
}
}
2、事件上行后: 设备收到的事件的响应
Topic: /oneM2M/resp/switch1/in-cse
payload:
{
"rsc": 2001,
"rqi": "1234",
"to": "/in-cse/switch1/@event@status",
"fr": "/in-cse/switch1",
"pc": {
"ri": "EVENTAC1E915B00647ED4BC28003"
}
}
3、方法下行:
{
"op": 5,
"rqi": "669",
"to": "/in-cse/switch1/control",
"fr": "/CSE-001",
"ty": 7,
"pc": {
"m2m:cin": {
"cnf": "42",
"con": "{\"devid\": \"123\",\"ctrl_cho_status\":\"1\",\"disable_btn0\":\"1\",\"switch_cho_status\":\"1\",\"night_tip_light\":\"1\"}"
}
}
}
4、方法下行后: 设备应该回复的信息( 此方法并未规划方法的出参[返回值 ],现在以返回值 为output1、output2( 其value均为字符串) 进行示例)
Publishing on topic: /oneM2M/resp/in-cse/switch1
Payload:
{
"rsc": 2001,
"rqi": $rqi,
"to": "/in-cse/switch1",
"fr": "/in-cse",
"ty": 7,
"rsp": {
"output1": "11",
"output2": "22"
}
}