| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- package com.water.iot.model;
-
- import java.util.Map;
-
- /**
- * 设备指令
- */
- public class DeviceCommand {
- private String commandId;
- private String deviceSn;
- private String commandType; // read/write/control
- private String parameterKey;
- private Object parameterValue;
- private Map<String, Object> extraParams;
- private long timeout;
- private String requestId;
-
- // 构造方法和getter/setter
- public DeviceCommand(String commandId, String deviceSn, String commandType) {
- this.commandId = commandId;
- this.deviceSn = deviceSn;
- this.commandType = commandType;
- this.timeout = 30000; // 默认30秒
- }
-
- public String getCommandId() {
- return commandId;
- }
-
- public void setCommandId(String commandId) {
- this.commandId = commandId;
- }
-
- public String getDeviceSn() {
- return deviceSn;
- }
-
- public void setDeviceSn(String deviceSn) {
- this.deviceSn = deviceSn;
- }
-
- public String getCommandType() {
- return commandType;
- }
-
- public void setCommandType(String commandType) {
- this.commandType = commandType;
- }
-
- public String getParameterKey() {
- return parameterKey;
- }
-
- public void setParameterKey(String parameterKey) {
- this.parameterKey = parameterKey;
- }
-
- public Object getParameterValue() {
- return parameterValue;
- }
-
- public void setParameterValue(Object parameterValue) {
- this.parameterValue = parameterValue;
- }
-
- public Map<String, Object> getExtraParams() {
- return extraParams;
- }
-
- public void setExtraParams(Map<String, Object> extraParams) {
- this.extraParams = extraParams;
- }
-
- public long getTimeout() {
- return timeout;
- }
-
- public void setTimeout(long timeout) {
- this.timeout = timeout;
- }
-
- public String getRequestId() {
- return requestId;
- }
-
- public void setRequestId(String requestId) {
- this.requestId = requestId;
- }
- }
|