
package cz.vutbr.feec.packets.ttp;

import cz.vutbr.feec.packets.IPacket;
import cz.vutbr.feec.packets.PacketGenerateException;
import cz.vutbr.feec.packets.PacketParseException;
import cz.vutbr.feec.packets.PacketUtils;

import org.apache.commons.lang.builder.ToStringBuilder;


public class FTS_GB_LMidVectorGroup  implements IPacket {
	
	private long landmarkIDvector;
	
	public int generate(byte[] buffer, int offset)
			throws PacketGenerateException {
		assert PacketUtils.checkSize(getLandmarkIDvector(), 32);
		PacketUtils.setOctet4(buffer, offset, getLandmarkIDvector());
		return 4;
	}
	/**
	 * "Not use this function"
	 */
	public int parse(byte[] buffer, int offset, int length){
/*			throws PacketParseException {
			setLandmarkIDvector(PacketUtils.getOctet4(buffer, offset));*/
		return 4;
	
	}
	
	public int parse(byte[] buffer, int offset)
	throws PacketParseException {
	setLandmarkIDvector(PacketUtils.getOctet4(buffer, offset));
return 4;
}

	public long getLandmarkIDvector() {
		return landmarkIDvector;
	}

	public void setLandmarkIDvector(long landmarkIDvector) {
		this.landmarkIDvector = landmarkIDvector;
	}

	/**
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		return new ToStringBuilder(this).append("landmarkIDvector",
				this.landmarkIDvector).toString();
	}

}
