Newer
Older
package org.etsi.ttcn.codec.its.fntp;
import org.etsi.ttcn.codec.CodecBuffer;
import org.etsi.ttcn.codec.MainCodec;
import org.etsi.ttcn.codec.generic.Record;
import org.etsi.ttcn.tci.RecordValue;
import org.etsi.ttcn.tci.Type;
import org.etsi.ttcn.tci.Value;
public class FntpInd extends Record {
public FntpInd(MainCodec mainCodec) {
super(mainCodec);
}
@Override
protected void preDecodeField(String fieldName, CodecBuffer buf, Type decodingHypothesis, RecordValue rv) {
System.out.println("FntpInd.preDecodeField: " + fieldName + " - " + decodingHypothesis.getName());
if(fieldName.equals("receptionTime")) {
buf.overwriteWith(receptionTime);
}
}
@Override
protected void preDecode(CodecBuffer buf, Type decodingHypothesis) {
int msgLen = buf.getNbBits() - 6/*Time48IAT*/ * Byte.SIZE;
receptionTime = buf.getBuffer(msgLen, 6 * Byte.SIZE);
}
private CodecBuffer receptionTime = null;
} // End of class FntpInd