package com.its.vms.xnettcp.vms.process;

import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
public class TcpServerSendData {
    public static final int DATA_RES_DEVICE_ID = 0;
    public static final int DATA_REQ_CONTROL = 1;

    private long requestTime;
    private int command;
    private Object data;

    public TcpServerSendData(int command, Object data) {
        this.requestTime = System.currentTimeMillis();
        this.command = command;
        this.data = data;
    }

    public long elapsed() {
        return System.currentTimeMillis() - this.requestTime;
    }

}
