石墨消解仪后端用nodejs编写,与嵌入式端交互和前端交互均用ws
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.
 

52 lines
1.0 KiB

const sensor_data = {
command: "envDataReport",
messageId: "xxxxx-xxxxx-xxxxx-xxxxx",
timestamp: 231245, //unix时间戳ms
positionM: 0.0, //横向距离
env: [
{
mac: "00:28:f8:6f:a3:92",
position_index: 11,
vehicle_index: 1,
co2: 500.0,
temperature: 24.0,
humidity: 50,
},
{
mac: "01:xx:xx:xx:xx:xx",
position_index: 12,
vehicle_index: 1,
co2: 500.0,
temperature: 24.0,
humidity: 50,
},
{
mac: "xx:xx:xx:xx:xx:xx",
position_index: 13,
vehicle_index: 1,
co2: 500.0,
temperature: 24.0,
humidity: 50,
},
{
mac: "xx:xx:xx:xx:xx:xx",
position_index: 14,
vehicle_index: 1,
co2: 500.0,
temperature: 24.0,
humidity: 50,
},
],
};
const feed_data = {
command: "feedingEventReport",
messageId: "xxxxx-xxxxx-xxxxx-xxxxx",
eventType: "startFeeding",
timestamp: "2023-04-19 16:22:11", //unix时间戳ms
};
module.exports = {
sensor_data,
feed_data,
};