{
	"schema": "https://iot-ap.ikonke.com/model/gateway_2.json",
    "productType":"gw",
    "profile":{
		"heartbeat": "3000",
		"productCode": "2",
		"productName": "网关"
    },
    "properties":[
        {
            "identifier":"NetChannelState",
            "dataType":{
                "specs":{
                    "0":"关闭",
                    "1":"打开"
                },
                "type":"bool"
            },
            "name":"组网通道状态",
            "accessMode":"rw",
            "required":true
        },
        {
            "identifier":"WhiteListState",
            "dataType":{
                "specs":{
                    "0":"关闭",
                    "1":"打开"
                },
                "type":"bool"
            },
            "name":"白名单状态",
            "accessMode":"rw",
            "required":false
        },
        {
            "identifier":"OnlineDetectionState",
            "dataType":{
                "specs":{
                    "0":"关闭",
                    "1":"打开"
                },
                "type":"bool"
            },
            "name":"在线侦测开关状态",
            "accessMode":"rw",
            "required":false
        },
        {
            "identifier":"SN",
            "dataType":{
                "specs":{
                    "length":"50"
                },
                "type":"text"
            },
            "name":"设备SN",
            "accessMode":"r",
            "required":false
        },
        {
            "identifier":"IPAddress",
            "dataType":{
                "specs":{
                    "length":"255"
                },
                "type":"text"
            },
            "name":"IP地址",
            "accessMode":"r",
            "required":false
        },
        {
            "identifier":"MACAddress",
            "dataType":{
                "specs":{
                    "length":"128"
                },
                "type":"text"
            },
            "name":"MAC地址",
            "accessMode":"r",
            "required":false
        },
        {
            "identifier":"Port",
            "dataType":{
                "specs":{
                    "min":"0",
                    "max":"65535",
                    "step":"1"
                },
                "type":"int"
            },
            "name":"网关通信端口号",
            "accessMode":"r",
            "required":false
        },
        {
            "identifier":"Version",
            "dataType":{
                "specs":{
                    "length":"255"
                },
                "type":"text"
            },
            "name":"版本",
            "accessMode":"r",
            "required":false
        }],
    "services":[
        {
            "outputData":[
            ],
            "identifier":"set",
            "inputData":[
                {
                    "identifier":"NetChannelState",
                    "dataType":{
                        "specs":{
                            "0":"关闭",
                            "1":"打开"
                        },
                        "type":"bool"
                    },
                    "name":"组网通道状态"
                },
                {
                    "identifier":"WhiteListState",
                    "dataType":{
                        "specs":{
                            "0":"关闭",
                            "1":"打开"
                        },
                        "type":"bool"
                    },
                    "name":"白名单状态"
                },
                {
                    "identifier":"OnlineDetectionState",
                    "dataType":{
                        "specs":{
                            "0":"关闭",
                            "1":"打开"
                        },
                        "type":"bool"
                    },
                    "name":"在线侦测开关状态"
                }],
            "method":"thing.service.property.set",
            "name":"set",
            "required":true,
            "callType":"async",
            "desc":"属性设置"
        },
        {
            "outputData":[
                {
                    "identifier":"NetChannelState",
                    "dataType":{
                        "specs":{
                            "0":"关闭",
                            "1":"打开"
                        },
                        "type":"bool"
                    },
                    "name":"组网通道状态"
                },
                {
                    "identifier":"WhiteListState",
                    "dataType":{
                        "specs":{
                            "0":"关闭",
                            "1":"打开"
                        },
                        "type":"bool"
                    },
                    "name":"白名单状态"
                },
                {
                    "identifier":"OnlineDetectionState",
                    "dataType":{
                        "specs":{
                            "0":"关闭",
                            "1":"打开"
                        },
                        "type":"bool"
                    },
                    "name":"在线侦测开关状态"
                },
                {
                    "identifier":"SN",
                    "dataType":{
                        "specs":{
                            "length":"50"
                        },
                        "type":"text"
                    },
                    "name":"设备SN"
                },
                {
                    "identifier":"IPAddress",
                    "dataType":{
                        "specs":{
                            "length":"255"
                        },
                        "type":"text"
                    },
                    "name":"IP地址"
                },
                {
                    "identifier":"MACAddress",
                    "dataType":{
                        "specs":{
                            "length":"128"
                        },
                        "type":"text"
                    },
                    "name":"MAC地址"
                },
                {
                    "identifier":"Port",
                    "dataType":{
                        "specs":{
                            "min":"0",
                            "max":"65535",
                            "step":"1"
                        },
                        "type":"int"
                    },
                    "name":"网关通信端口号"
                },
                {
                    "identifier":"Version",
                    "dataType":{
                        "specs":{
                            "length":"255"
                        },
                        "type":"text"
                    },
                    "name":"版本",
                    "accessMode":"r"
                }],
            "identifier":"get",
            "inputData":[
                "NetChannelState",
                "WhiteListState",
                "OnlineDetectionState",
                "SN",
                "IPAddress",
                "MACAddress",
                "Port",
                "Version"],
            "method":"thing.service.property.get",
            "name":"get",
            "required":true,
            "callType":"async",
            "desc":"属性获取"
        },
        {
            "outputData":[
            ],
            "identifier":"restoreFactory",
            "inputData":[
            ],
            "method":"thing.service.restoreFactory",
            "name":"restoreFactory",
            "required":false,
            "callType":"async",
            "desc":"恢复出厂设置"
        },
        {
            "outputData":[
            ],
            "identifier":"addWhiteList",
            "inputData":[
                {
                    "identifier":"Devices",
                    "dataType":{
                        "specs":{
                            "item":{
                                "specs":[
                                    {
                                        "identifier":"MACAddress",
                                        "dataType":{
                                            "specs":{
                                                "length":"128"
                                            },
                                            "type":"text"
                                        },
                                        "name":"MAC地址"
                                    },
                                    {
                                        "identifier":"ProductId",
                                        "dataType":{
                                            "specs":{
                                                "length":"2048"
                                            },
                                            "type":"text"
                                        },
                                        "name":"产品id"
                                    }],
                                "type":"struct"
                            },
                            "size":"512"
                        },
                        "type":"array"
                    },
                    "name":"设备列表"
                }],
            "method":"thing.service.addWhiteList",
            "name":"添加设备白名单",
            "required":false,
            "callType":"async"
        },
        {
            "outputData":[
            ],
            "identifier":"deleteWhiteList",
            "inputData":[
                {
                    "identifier":"Devices",
                    "dataType":{
                        "specs":{
                            "item":{
                                "specs":[
                                    {
                                        "identifier":"MACAddress",
                                        "dataType":{
                                            "specs":{
                                                "length":"128"
                                            },
                                            "type":"text"
                                        },
                                        "name":"MAC地址"
                                    }],
                                "type":"struct"
                            },
                            "size":"512"
                        },
                        "type":"array"
                    },
                    "name":"设备列表"
                }],
            "method":"thing.service.deleteWhiteList",
            "name":"删除白名单",
            "required":false,
            "callType":"async"
        },
        {
            "outputData":[
            ],
            "inputData":[
            ],
            "identifier":"getWhiteList",
            "method":"thing.service.getWhiteList",
            "name":"获取白名单列表",
            "required":false,
            "callType":"async"
        }],
    "events":[
        {
            "outputData":[
                {
                    "identifier":"NetChannelState",
                    "dataType":{
                        "specs":{
                            "0":"关闭",
                            "1":"打开"
                        },
                        "type":"bool"
                    },
                    "name":"组网通道状态"
                },
                {
                    "identifier":"WhiteListState",
                    "dataType":{
                        "specs":{
                            "0":"关闭",
                            "1":"打开"
                        },
                        "type":"bool"
                    },
                    "name":"白名单状态"
                },
                {
                    "identifier":"OnlineDetectionState",
                    "dataType":{
                        "specs":{
                            "0":"关闭",
                            "1":"打开"
                        },
                        "type":"bool"
                    },
                    "name":"在线侦测开关状态"
                },
                {
                    "identifier":"SN",
                    "dataType":{
                        "specs":{
                            "length":"50"
                        },
                        "type":"text"
                    },
                    "name":"设备SN"
                },
                {
                    "identifier":"IPAddress",
                    "dataType":{
                        "specs":{
                            "length":"255"
                        },
                        "type":"text"
                    },
                    "name":"IP地址"
                },
                {
                    "identifier":"MACAddress",
                    "dataType":{
                        "specs":{
                            "length":"128"
                        },
                        "type":"text"
                    },
                    "name":"MAC地址"
                },
                {
                    "identifier":"Port",
                    "dataType":{
                        "specs":{
                            "min":"0",
                            "max":"65535",
                            "step":"1"
                        },
                        "type":"int"
                    },
                    "name":"网关通信端口号"
                }],
            "identifier":"property",
            "method":"thing.event.property.post",
            "name":"property",
            "type":"info",
            "required":true,
            "desc":"属性上报"
        },
        {
            "outputData":[
            ],
            "identifier":"whiteListAddedNotification",
            "method":"thing.event.whiteListAddedNotification.post",
            "name":"添加设备白名单通知",
            "type":"info",
            "required":false
        },
        {
            "outputData":[
            ],
            "identifier":"whiteListDeletedNotification",
            "method":"thing.event.whiteListDeletedNotification.post",
            "name":"删除设备白名单通知",
            "type":"info",
            "required":false
        },
        {
            "outputData":[
                {
                    "identifier":"Devices",
                    "dataType":{
                        "specs":{
                            "item":{
                                "specs":[
                                    {
                                        "identifier":"SN",
                                        "dataType":{
                                            "specs":{
                                                "length":"50"
                                            },
                                            "type":"text"
                                        },
                                        "name":"设备sn"
                                    },
                                    {
                                        "identifier":"deviceId",
                                        "dataType":{
                                            "specs":{
                                                "length":"128"
                                            },
                                            "type":"text"
                                        },
                                        "name":"设备ID"
                                    },
                                    {
                                        "identifier":"MACAddress",
                                        "dataType":{
                                            "specs":{
                                                "length":"128"
                                            },
                                            "type":"text"
                                        },
                                        "name":"MAC地址"
                                    },
                                    {
                                        "identifier":"ProductId",
                                        "dataType":{
                                            "specs":{
                                                "length":"2048"
                                            },
                                            "type":"text"
                                        },
                                        "name":"产品id"
                                    }],
                                "type":"struct"
                            },
                            "size":"512"
                        },
                        "type":"array"
                    },
                    "name":"设备列表"
                }],
            "identifier":"getWhiteListNotification",
            "method":"thing.event.getWhiteList.post",
            "name":"getWhiteList",
            "type":"info",
            "required":false,
            "desc":"获取白名单通知消息"
        },
        {
            "outputData":[
            ],
            "identifier":"restoreFactoryNotification",
            "method":"thing.event.restoreFactoryNotification.post",
            "name":"恢复出厂通知消息",
            "type":"info",
            "required":false
        },
        {
            "outputData":[
                {
                    "identifier":"ErrorCode",
                    "dataType":{
                        "specs":{
                            "0":"正常"
                        },
                        "type":"enum"
                    },
                    "name":"故障代码"
                }],
            "identifier":"error",
            "method":"thing.event.error.post",
            "name":"故障上报",
            "type":"error",
            "required":false
        }]
}
