智慧水务管理系统 - 精河县供水工程综合管理平台

DeviceCommand.java 2.0KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. package com.water.iot.model;
  2. import java.util.Map;
  3. /**
  4. * 设备指令
  5. */
  6. public class DeviceCommand {
  7. private String commandId;
  8. private String deviceSn;
  9. private String commandType; // read/write/control
  10. private String parameterKey;
  11. private Object parameterValue;
  12. private Map<String, Object> extraParams;
  13. private long timeout;
  14. private String requestId;
  15. // 构造方法和getter/setter
  16. public DeviceCommand(String commandId, String deviceSn, String commandType) {
  17. this.commandId = commandId;
  18. this.deviceSn = deviceSn;
  19. this.commandType = commandType;
  20. this.timeout = 30000; // 默认30秒
  21. }
  22. public String getCommandId() {
  23. return commandId;
  24. }
  25. public void setCommandId(String commandId) {
  26. this.commandId = commandId;
  27. }
  28. public String getDeviceSn() {
  29. return deviceSn;
  30. }
  31. public void setDeviceSn(String deviceSn) {
  32. this.deviceSn = deviceSn;
  33. }
  34. public String getCommandType() {
  35. return commandType;
  36. }
  37. public void setCommandType(String commandType) {
  38. this.commandType = commandType;
  39. }
  40. public String getParameterKey() {
  41. return parameterKey;
  42. }
  43. public void setParameterKey(String parameterKey) {
  44. this.parameterKey = parameterKey;
  45. }
  46. public Object getParameterValue() {
  47. return parameterValue;
  48. }
  49. public void setParameterValue(Object parameterValue) {
  50. this.parameterValue = parameterValue;
  51. }
  52. public Map<String, Object> getExtraParams() {
  53. return extraParams;
  54. }
  55. public void setExtraParams(Map<String, Object> extraParams) {
  56. this.extraParams = extraParams;
  57. }
  58. public long getTimeout() {
  59. return timeout;
  60. }
  61. public void setTimeout(long timeout) {
  62. this.timeout = timeout;
  63. }
  64. public String getRequestId() {
  65. return requestId;
  66. }
  67. public void setRequestId(String requestId) {
  68. this.requestId = requestId;
  69. }
  70. }