All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.yamcs.simulator.launchland.AckData Maven / Gradle / Ivy

There is a newer version: 4.10.2
Show newest version
package org.yamcs.simulator.launchland;

import java.nio.ByteBuffer;

import org.yamcs.simulator.CCSDSPacket;

public class AckData {

//    private float timestamp; //TODO not used?
//    private int commandReceived;

    public AckData(CCSDSPacket packet) {
        ByteBuffer buffer = packet.getUserDataBuffer();
//        commandReceived = (int) buffer.get(0);
    }

    public AckData() {
    }

    public void fillPacket(CCSDSPacket packet, int bufferOffset, int commandReceived) {
        ByteBuffer buffer = packet.getUserDataBuffer();
        buffer.position(bufferOffset);
        buffer.put((byte) commandReceived);
    }

    @Override
    public String toString() {
        return String.format("[AckData]");
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy