
Ò»¡¢¹¦ÄܽéÉÜ£º£¨Í¬¹ÙÍø˵Ã÷Ê飩
Êý¾Ý¶Áд¹¦ÄÜÊ×ÒªÊÇ·þÎñÆ÷ͨ¹ýÁ´Â·Í¨µÀÏ·¢²éѯºÍÉèÖÃÃüÁͨ¹ý¸ÃÃüÁîÖ±½Ó»ñÈ¡µãλÊý¾Ý»òÕßÐ޸ĵãλÊý¾ÝµÄ²Ù×÷¡£ºÍÖ÷¶¯Éϱ¨ ¹¦ÄÜ¿ÉÒÔͬʱÔËÐС£Êý¾ÝµÄ¶ÁºÍд¹¦ÄÜÐèÒª¿ªÆôʹÄÜ£¬É趨ºÃµãλ¶ÁдµÄÐÒ鷽ʽ£¬Ôƶ˰´ÕÕÉ趨ºÃµÄͨÐÅÐÒé½øÐеãλÊý¾ÝµÄ»ñÈ¡ºÍÐ޸ĿØÖÆ¡£
×¢£º±ßÔµÍø¹ØµÄÊý¾Ý¶Áд¹¦ÄÜ£¬Ö»ÄܶÁºÍдÒѾÅäÖúõĵã±íÊý¾Ý£¬·Çµã±íÊý¾ÝÎÞ·¨²Ù×÷¡£
ͨµÀÑ¡Ôñ£ºÈç¹ûÑ¡ÔñMQTT£¬°¢ÀïÔÆ£¬AWSµÈMQTTͨÐÅ·½Ê½µÄͨµÀ£¬ÐèÒªµ¥¶ÀÅäÖöÁдµÄ¶©Ôĺͷ¢²¼Ö÷Ìâ¡£
¶Áд·½Ê½£ºÖ§³ÖModbusRTU£¬ModbusTCPºÍJson£¬ÆäÖÐJson¾ßÓй̶¨µÄÐÒé¡£
Json ¶ÁдÃüÁî¸ñʽ£º£¨¿ÉÒÔͬʱ»ñÈ¡¶à¸öµãλÊý¾Ý£©
{"rw_prot":{"Ver":"ÐÒé°æ±¾","dir":"Êý¾Ý×ßÏò","id":"ÐÅÏ¢±àºÅ","r_data":[{"name":"µãλÃû³Æ"}],"w_data":[{"name":"µãλÃû³Æ ","value":"data"}]}}
Json¶ÁдÃüÁî×Ö¶Î˵Ã÷
×Ö¶ÎÃû³Æ | ×Ö¶Î˵Ã÷ | ×Ö¶ÎÑ¡Ôñ |
rw_prot | ÐÒé°üÍ· | |
ver | ÐÒé°æ±¾ | 1.0.1 |
dir | Êý¾Ý×ßÏò£¬·þÎñÆ÷Ï·¢ÃüÁîÌîÈëdown | down£º·þÎñÆ÷Ï·¢ |
id | ·þÎñÆ÷Ï·¢Êý¾ÝµÄ±àÂ룬¿ÉÒÔ×÷ΪÐòÁÐʶ±ðʹÓà | ¹Ë¿Í×Ô¶¨Ò壬É豸»Ø¸´²»×ö¸Ä±ä |
r_data | Êý¾Ý¶ÁÈ¡×ֶΠ| |
w_data | Êý¾Ý¿ØÖÆ×ֶΠ| |
name | µãλÃû³Æ£¬ºÍµã±íÖеĵãλÃû³ÆÒ»Ö¼´¿É´úÈëµãλ | |
value | ¶ÁдÃüÁîÖнöÓÐдÓÐvalue×ֶΣ¬ÎªÐ´ÈëµÄÓÐЧֵ |
Json¶Áд»Ø¸´¸ñʽ£º
{"rw_prot": {"Ver": "ÐÒé°æ±¾","dir": "Êý¾Ý×ßÏò","id": "ÐÅÏ¢±àºÅ","r_data": [{"name": "µãλÃû³Æ","value": "data","err": "´íÎóÂë"}],"w_data": [{"name": "µãλÃû³Æ","value": "data","err": "´íÎóÂë"}]}}
Json¶Áд»Ø¸´×Ö¶Î˵Ã÷£º
×Ö¶ÎÃû³Æ | ×Ö¶Î˵Ã÷ | ×Ö¶ÎÑ¡Ôñ |
rw_prot | ÐÒé°üÍ· | |
ver | ÐÒé°æ±¾ | 1.0.1 |
dir | Êý¾Ý×ßÏò£¬É豸»Ø¸´ÄÚÈÝÌîÈëup | up£ºÉ豸»Ø¸´ |
id | ÐÅϢʶ±ðÂ룬±£³ÖºÍÏ·¢ÃüÁîÒ»Ö | |
r_data | Êý¾Ý¶ÁÈ¡×ֶΠ| |
w_data | Êý¾Ý¿ØÖÆ×ֶΠ| |
name | µãλÃû³Æ£¬¶ÔÓ¦µã±íÖеĵãλ | |
value | µãλ¶ÔÓ¦µÄÓÐЧÊý¾Ý | ¶Á´íÎó£¬valueÓÐЧֵΪ¿Õ д´íÎó£¬valueֵΪÀúÊ·Öµ |
err | ´íÎóÂë | 0£ºÊý¾ÝÕý³£Ö´ÐÐ 1£ºÊý¾Ý´íÎóÖ´ÐÐ |
Json×ֶδíÎó»Ø¸´£º
Json¸ñʽ´íÎó£ºÉ豸²»×ö»Ø¸´
ver£¬dir£¬idÈý¸ö×ֶΣ¬ÈÎÒâÒ»¸ö´íÎó£¬Ôò°´ÕÕ´íÎóÐÒé½øÐлظ´¡£
ÆäËû×Ö¶ÎÕýÈ·£¬r_data»òw_data×ֶνö´íÎóÒ»¸ö£¬Ôò´íÎóµÄ×Ö¶ÎÉáÆú£¬ÕýÈ·×ֶνøÐлظ´£»Èç¹ûÁ½¸ö×ֶζ¼´íÎ󣬰´ÕÕ´íÎóÐÒé»Ø¸´¡£
´íÎóÐÒ飺"rw_prot": {"Ver": "1.0.1","dir": "up","err":"1"}
×Ö¶ÎÃû³Æ | ×Ö¶Î˵Ã÷ | ×Ö¶ÎÑ¡Ôñ |
rw_prot | ÐÒé°üÍ· | |
ver | ÐÒé°æ±¾ | 1.0.1 |
dir | Êý¾Ý×ßÏò£¬Éϱ¨ºÍÏ·¢Á½ÖÖ | up£ºÉ豸»Ø¸´ |
err | ´íÎóÂë | 0£ºÕý³£Ö´ÐÐ 1£º´íÎóÖ´ÐÐ |
˵Ã÷£º
¶ÁдÃüÁî´íÎóʱ£¬¶ÁÃüÁî»Ø¸´ÄÚÈݵÄvalueֵΪ¿Õ£¬Ð´ÃüÁîµÄ»Ø¸´ÄÚÈݵÄvalueֵΪÀúÊ·Êý¾ÝÖµ¡£
¶Áд²Ù×÷×î´óÉÏÏÞΪ¶Áд¸÷5¸öÊý¾Ýµãλͬʱ²Ù×÷¡£
¶þ¡¢Ê¾Àý
µã±íʾÀý£º
1¡¢ ¶Á1¸öµãλֵ£º
Ï·¢£º
{
"rw_prot": {
"Ver": "1.0.1",
"dir": "down",
"id": "123",
"r_data": [{
"name": "node0201"
}]
}
}
ÏìÓ¦£º
{"rw_prot":{"Ver":"1.0.1","dir":"up","id":"123","r_data":[{"name":"node0201","value":"1","err":"0"}]}}
2¡¢¶Á2¸öµãλֵ£º
Ï·¢£º
{
"rw_prot": {
"Ver": "1.0.1",
"dir": "down",
"id": "123",
"r_data": [{
"name": "node0201"
},
{
"name": "node0202"
}]
}
}
ÏìÓ¦£º
{"rw_prot":{"Ver":"1.0.1","dir":"up","id":"123","r_data":[{"name":"node0201","value":"1","err":"0"},{"name":"node0202","value":"2","err":"0"}]}}
3¡¢¶Á3¸öµãλֵ£º
Ï·¢£º
{
"rw_prot": {
"Ver": "1.0.1",
"dir": "down",
"id": "123",
"r_data": [{
"name": "node0201"
},
{
"name": "node0202"
},
{
"name": "node0203"
}]
}
}
ÏìÓ¦£º
{"rw_prot":{"Ver":"1.0.1","dir":"up","id":"123","r_data":[{"name":"node0201","value":"1","err":"0"},{"name":"node0202","value":"2","err":"0"},{"name":"node0203","value":"3","err":"0"}]}}
4¡¢¶Á4¸öµãλֵ£º
Ï·¢£º
{
"rw_prot": {
"Ver": "1.0.1",
"dir": "down",
"id": "123",
"r_data": [{
"name": "node0201"
},
{
"name": "node0202"
},
{
"name": "node0203"
},
{
"name": "node0204"
}]
}
}
ÏìÓ¦£º
{"rw_prot":{"Ver":"1.0.1","dir":"up","id":"123","r_data":[{"name":"node0201","value":"1","err":"0"},{"name":"node0202","value":"2","err":"0"},{"name":"node0203","value":"3","err":"0"},{"name":"node0204","value":"4","err":"0"}]}}
5¡¢¶Á5¸öµãλֵ£º
Ï·¢£º
{
"rw_prot": {
"Ver": "1.0.1",
"dir": "down",
"id": "123",
"r_data": [{
"name": "node0201"
},
{
"name": "node0202"
},
{
"name": "node0203"
},
{
"name": "node0204"
},
{
"name": "node0205"
}]
}
}
ÏìÓ¦£º
{"rw_prot":{"Ver":"1.0.1","dir":"up","id":"123","r_data":[{"name":"node0201","value":"1","err":"0"},{"name":"node0202","value":"2","err":"0"},{"name":"node0203","value":"3","err":"0"},{"name":"node0204","value":"4","err":"0"},{"name":"node0205","value":"5","err":"0"}]}}
6¡¢Ð´1¸öµãλ£º
Ï·¢£º
{
"rw_prot": {
"Ver": "1.0.1",
"dir": "down",
"id": "123",
"w_data": [{
"name": "node0201",
"value": "100"
}]
}
}
ÏìÓ¦£º
{"rw_prot":{"Ver":"1.0.1","dir":"up","id":"123","w_data":[{"name":"node0201","value":"100","err":"0"}]}}
7¡¢Ð´2¸öµãλ£º
Ï·¢£º
{
"rw_prot": {
"Ver": "1.0.1",
"dir": "down",
"id": "123",
"w_data": [{
"name": "node0201",
"value": "100"
},
{
"name": "node0202",
"value": "200"
}]
}
}
ÏìÓ¦£º
{"rw_prot":{"Ver":"1.0.1","dir":"up","id":"123","w_data":[{"name":"node0201","value":"100","err":"0"},{"name":"node0202","value":"200","err":"0"}]}}
8¡¢Ð´3¸öµãλ£º
Ï·¢£º
{
"rw_prot": {
"Ver": "1.0.1",
"dir": "down",
"id": "123",
"w_data": [{
"name": "node0201",
"value": "100"
},
{
"name": "node0202",
"value": "200"
},
{
"name": "node0203",
"value": "300"
}]
}
}
ÏìÓ¦£º
{"rw_prot":{"Ver":"1.0.1","dir":"up","id":"123","w_data":[{"name":"node0201","value":"100","err":"0"},{"name":"node0202","value":"200","err":"0"},{"name":"node0203","value":"300","err":"0"}]}}
9¡¢Ð´4¸öµãλ£º
Ï·¢£º
{
"rw_prot": {
"Ver": "1.0.1",
"dir": "down",
"id": "123",
"w_data": [{
"name": "node0201",
"value": "100"
},
{
"name": "node0202",
"value": "200"
},
{
"name": "node0203",
"value": "300"
},
{
"name": "node0204",
"value": "400"
}]
}
}
ÏìÓ¦£º
{"rw_prot":{"Ver":"1.0.1","dir":"up","id":"123","w_data":[{"name":"node0201","value":"100","err":"0"},{"name":"node0202","value":"200","err":"0"},{"name":"node0203","value":"300","err":"0"},{"name":"node0204","value":"400","err":"0"}]}}
10¡¢Ð´5¸öµãλ£º
Ï·¢£º
{
"rw_prot": {
"Ver": "1.0.1",
"dir": "down",
"id": "123",
"w_data": [{
"name": "node0201",
"value": "100"
},
{
"name": "node0202",
"value": "200"
},
{
"name": "node0203",
"value": "300"
},
{
"name": "node0204",
"value": "400"
},
{
"name": "node0205",
"value": "500"
}]
}
}
ÏìÓ¦£º
{"rw_prot":{"Ver":"1.0.1","dir":"up","id":"123","w_data":[{"name":"node0201","value":"100","err":"0"},{"name":"node0202","value":"200","err":"0"},{"name":"node0203","value":"300","err":"0"},{"name":"node0204","value":"400","err":"0"},{"name":"node0205","value":"500","err":"0"}]}}
11¡¢¶Á1¸öµãλд1¸öµãλ£º
Ï·¢£º
{
"rw_prot": {
"Ver": "1.0.1",
"dir": "down",
"id": "123",
"r_data": [{
"name": "node0202"
}],
"w_data": [{
"name": "node0201",
"value": "100"
}]
}
}
ÏìÓ¦£º
{"rw_prot":{"Ver":"1.0.1","dir":"up","id":"123","r_data":[{"name":"node0202","value":"200","err":"0"}],"w_data":[{"name":"node0201","value":"100","err":"0"}]}}
12¡¢¶Á2¸öµãλд2¸öµãλ£º
Ï·¢£º
{
"rw_prot": {
"Ver": "1.0.1",
"dir": "down",
"id": "123",
"r_data": [{
"name": "node0201"
},
{
"name": "node0202"
}],
"w_data": [{
"name": "node0201",
"value": "100"
},
{
"name": "node0202",
"value": "200"
}]
}
}
ÏìÓ¦£º
{"rw_prot":{"Ver":"1.0.1","dir":"up","id":"123","r_data":[{"name":"node0201","value":"100","err":"0"},{"name":"node0202","value":"200","err":"0"}],"w_data":[{"name":"node0201","value":"100","err":"0"},{"name":"node0202","value":"200","err":"0"}]}}
13¡¢¶Á3¸öµãλд3¸öµãλ£º
Ï·¢£º
{
"rw_prot": {
"Ver": "1.0.1",
"dir": "down",
"id": "123",
"r_data": [{
"name": "node0201"
},
{
"name": "node0202"
},
{
"name": "node0203"
}],
"w_data": [{
"name": "node0201",
"value": "100"
},
{
"name": "node0202",
"value": "200"
},
{
"name": "node0203",
"value": "300"
}]
}
}
ÏìÓ¦£º
{"rw_prot":{"Ver":"1.0.1","dir":"up","id":"123","r_data":[{"name":"node0201","value":"100","err":"0"},{"name":"node0202","value":"200","err":"0"},{"name":"node0203","value":"300","err":"0"}],"w_data":[{"name":"node0201","value":"100","err":"0"},{"name":"node0202","value":"200","err":"0"},{"name":"node0203","value":"300","err":"0"}]}}
14¡¢¶Á4¸öµãλд4¸öµãλ£º
Ï·¢£º
{
"rw_prot": {
"Ver": "1.0.1",
"dir": "down",
"id": "123",
"r_data": [{
"name": "node0201"
},
{
"name": "node0202"
},
{
"name": "node0203"
},
{
"name": "node0204"
}],
"w_data": [{
"name": "node0201",
"value": "100"
},
{
"name": "node0202",
"value": "200"
},
{
"name": "node0203",
"value": "300"
},
{
"name": "node0204",
"value": "400"
}]
}
}
ÏìÓ¦£º
{"rw_prot":{"Ver":"1.0.1","dir":"up","id":"123","r_data":[{"name":"node0201","value":"100","err":"0"},{"name":"node0202","value":"200","err":"0"},{"name":"node0203","value":"300","err":"0"},{"name":"node0204","value":"400","err":"0"}],"w_data":[{"name":"node0201","value":"100","err":"0"},{"name":"node0202","value":"200","err":"0"},{"name":"node0203","value":"300","err":"0"},{"name":"node0204","value":"400","err":"0"}]}}
15¡¢¶Á5¸öµãλд5¸öµãλ£º
Ï·¢£º
{
"rw_prot": {
"Ver": "1.0.1",
"dir": "down",
"id": "123",
"r_data": [{
"name": "node0201"
},
{
"name": "node0202"
},
{
"name": "node0203"
},
{
"name": "node0204"
},
{
"name": "node0205"
}],
"w_data": [{
"name": "node0201",
"value": "100"
},
{
"name": "node0202",
"value": "200"
},
{
"name": "node0203",
"value": "300"
},
{
"name": "node0204",
"value": "400"
},
{
"name": "node0205",
"value": "500"
}]
}
}
ÏìÓ¦£º
{"rw_prot":{"Ver":"1.0.1","dir":"up","id":"123","r_data":[{"name":"node0201","value":"100","err":"0"},{"name":"node0202","value":"200","err":"0"},{"name":"node0203","value":"300","err":"0"},{"name":"node0204","value":"400","err":"0"},{"name":"node0205","value":"500","err":"0"}],"w_data":[{"name":"node0201","value":"100","err":"0"},{"name":"node0202","value":"200","err":"0"},{"name":"node0203","value":"300","err":"0"},{"name":"node0204","value":"400","err":"0"},{"name":"node0205","value":"500","err":"0"}]}}
16¡¢ DO1±ÕºÏ£¬DO2¶Ï¿ª
Ï·¢£º
{
"rw_prot": {
"Ver": "1.0.1",
"dir": "down",
"id": "123",
"w_data": [{
"name": "DO1",
"value": "1"
},
{
"name": "DO2",
"value": "0"
}]
}
}
ÏìÓ¦£º
{"rw_prot":{"Ver":"1.0.1","dir":"up","id":"123","w_data":[{"name":"DO1","value":"1","err":"0"},{"name":"DO2","value":"0","err":"0"}]}}
±àдÈË£ºÂíÁáÓñ ±àдÈÕÆÚ£º2024-06-14
ÉóºËÈË£ºÒü´ÔÐÀ ÉóºËÈÕÆÚ£º2024-07-04
¶©Õý°æ±¾£ºV1.0 ¶©ÕýÄÚÈÝ£º³õ¸å