Compare Revisions

The credentials to download the source code are:
 Username: svnusers
 Password: svnusers

Ignore whitespace Rev 1834 → Rev 1835

/trunk/javasrc/codec/org/etsi/ttcn/codec/its/adapter/AcFsapPrimitive.java
0,0 → 1,37
/**
* @author ETSI / STF462 / Alexandre Berge
* @version $URL$
* $Id$
*/
package org.etsi.ttcn.codec.its.adapter;
 
import org.etsi.ttcn.codec.CodecBuffer;
import org.etsi.ttcn.codec.MainCodec;
import org.etsi.ttcn.codec.generic.Union;
import org.etsi.ttcn.common.ByteHelper;
import org.etsi.ttcn.tci.UnionValue;
 
public class AcFsapPrimitive extends Union {
 
public AcFsapPrimitive(MainCodec mainCodec) {
super(mainCodec);
}
 
@Override
protected void preEncode(CodecBuffer buf, UnionValue uv) {
String variant = uv.getPresentVariantName();
int primitiveId = -1;
 
// Append AcGnPrimitive message id
buf.appendBytes(ByteHelper.intToByteArray(2, 1)); // AdapterControl Primitive identifer for AcFsapPrimitive
 
// Append primitive command identifier
if(variant.equals("inSapPrimitivesUp")) {
primitiveId = 0;
}
else if(variant.equals("stopTransmission")) {
primitiveId = 1;
}
buf.appendBytes(ByteHelper.intToByteArray(primitiveId, 1));
}
}
Property changes:
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+URL Id
\ No newline at end of property
Added: svn:mergeinfo
## -0,0 +0,1 ##
Merged /branches/STF462/javasrc/codec/org/etsi/ttcn/codec/its/adapter/AcFsapPrimitive.java:r1124-1422
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property