Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ITS - Intelligent Transport Systems
ITS
Commits
b725cbfe
Commit
b725cbfe
authored
Nov 20, 2014
by
berge
Browse files
/!\ FIXING BRANCH/MERGE ISSUES /!\
Re-inserting lost file
parent
d11515b3
Changes
1
Hide whitespace changes
Inline
Side-by-side
javasrc/codec/org/etsi/ttcn/codec/its/adapter/AcFsapPrimitive.java
0 → 100644
View file @
b725cbfe
/**
* @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
));
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment