Commit 483b6ecb authored by garciay's avatar garciay

Change SSP & ITS-AID types for transferring from lower layer to upper layer

parent c80c1861
......@@ -65,7 +65,6 @@ public class CodecFactory {
org.etsi.ttcn.codec.its.btp.Plugin.init();
org.etsi.ttcn.codec.its.security.Plugin.init();
org.etsi.ttcn.codec.its.facilities.Plugin.init();
org.etsi.ttcn.codec.its.mapspat.Plugin.init();
}
}
......
......@@ -22,7 +22,7 @@ public class FacilitiesInd extends Record {
protected void preDecode(CodecBuffer buf, Type decodingHypothesis) {
// System.out.println(">>> FacilitiesInd.preDecode: " + decodingHypothesis);
int msgLen = buf.getNbBits() - 8 - 8 - 8 - 32 - 8 - 16 - 16;
int msgLen = buf.getNbBits() - 8 - 8 - 8 - 32 - 8 - 16 - 16 - 128 - 32; // FIXME Add support of SSP (Bit128) & ITS-AID (UInt32) extra fields: fixed size (128) is not nice!
int offset = 0;
messageBuffer = buf.getBuffer(offset, msgLen); offset += msgLen;
......@@ -33,6 +33,8 @@ public class FacilitiesInd extends Record {
gnTc = buf.getBuffer(offset, 8); offset += 8;
btpDestinationPort = buf.getBuffer(offset, 16); offset += 16;
btpInfo = buf.getBuffer(offset, 16); offset += 16;
ssp = buf.getBuffer(offset, 128); offset += 128;
its_aid = buf.getBuffer(offset, 32); offset += 32;
}
@Override
......@@ -60,6 +62,12 @@ public class FacilitiesInd extends Record {
else if(fieldName.equals("btpInfo")) {
buf.overwriteWith(btpInfo);
}
else if(fieldName.equals("ssp")) {
buf.overwriteWith(ssp);
}
else if(fieldName.equals("its_aid")) {
buf.overwriteWith(its_aid);
}
else {
buf.overwriteWith(messageBuffer);
}
......@@ -84,4 +92,6 @@ public class FacilitiesInd extends Record {
private CodecBuffer gnTc = null;
private CodecBuffer btpDestinationPort = null;
private CodecBuffer btpInfo = null;
private CodecBuffer ssp = null;
private CodecBuffer its_aid = null;
}
......@@ -15,7 +15,10 @@ public class Plugin {
CodecFactory cf = CodecFactory.getInstance();
cf.setCodec(TciTypeClass.RECORD, "LibIts_Interface", "CamInd", FacilitiesInd.class);
cf.setCodec(TciTypeClass.RECORD, "LibIts_Interface", "DenmInd", FacilitiesInd.class);
cf.setCodec(TciTypeClass.RECORD, "LibIts_Interface", "MapInd", FacilitiesInd.class);
cf.setCodec(TciTypeClass.RECORD, "LibIts_Interface", "SpatInd", FacilitiesInd.class);
cf.setCodec(TciTypeClass.RECORD, "LibIts_Interface", "IvimInd", FacilitiesInd.class);
cf.setCodec(TciTypeClass.RECORD, "LibIts_Interface", "MapemInd", FacilitiesInd.class);
cf.setCodec(TciTypeClass.RECORD, "LibIts_Interface", "SpatemInd", FacilitiesInd.class);
cf.setCodec(TciTypeClass.RECORD, "LibIts_Interface", "SremInd", FacilitiesInd.class);
cf.setCodec(TciTypeClass.RECORD, "LibIts_Interface", "SsemInd", FacilitiesInd.class);
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment