package net.northking.cctp.upperComputer.driver.agent.command;

import net.northking.cctp.upperComputer.driver.agent.command.protocol.ProtocolCommand;

import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;

public class WatchMemoryUsageCommand implements ProtocolCommand<Long[]> {
    private static WatchMemoryUsageCommand instance = null;

    public static WatchMemoryUsageCommand getInstance() {
        if (instance == null) {
            instance = new WatchMemoryUsageCommand();
        }
        return instance;
    }

    @Override
    public int getCommandId() {
        return 14;
    }

    @Override
    public void doSend(DataOutput output) throws IOException {

    }

    @Override
    public Long[] buildReceive(DataInput input) throws IOException {
        Long[] data = new Long[2];
        data[0] = input.readLong(); //总共
        data[1] = input.readLong(); //空余
        return data;
    }
}
