石墨消解仪后端用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

2 years ago
2 years ago
2 years ago
  1. const sensor_data = {
  2. command: "envDataReport",
  3. messageId: "xxxxx-xxxxx-xxxxx-xxxxx",
  4. timestamp: 231245, //unix时间戳ms
  5. positionM: 0.0, //横向距离
  6. env: [
  7. {
  8. mac: "00:28:f8:6f:a3:92",
  9. position_index: 11,
  10. vehicle_index: 1,
  11. co2: 500.0,
  12. temperature: 24.0,
  13. humidity: 50,
  14. },
  15. {
  16. mac: "01:xx:xx:xx:xx:xx",
  17. position_index: 12,
  18. vehicle_index: 1,
  19. co2: 500.0,
  20. temperature: 24.0,
  21. humidity: 50,
  22. },
  23. {
  24. mac: "xx:xx:xx:xx:xx:xx",
  25. position_index: 13,
  26. vehicle_index: 1,
  27. co2: 500.0,
  28. temperature: 24.0,
  29. humidity: 50,
  30. },
  31. {
  32. mac: "xx:xx:xx:xx:xx:xx",
  33. position_index: 14,
  34. vehicle_index: 1,
  35. co2: 500.0,
  36. temperature: 24.0,
  37. humidity: 50,
  38. },
  39. ],
  40. };
  41. const feed_data = {
  42. command: "feedingEventReport",
  43. messageId: "xxxxx-xxxxx-xxxxx-xxxxx",
  44. eventType: "startFeeding",
  45. timestamp: "2023-04-19 16:22:11", //unix时间戳ms
  46. };
  47. module.exports = {
  48. sensor_data,
  49. feed_data,
  50. };