Add templates for LLC_DISCARDED

Change-Id: I587ec89471083e339065f6371ffe6253d49007bf
Related: SYS#5210
This commit is contained in:
Daniel Willmann 2020-11-24 18:37:49 +01:00 committed by laforge
parent 91a8e25b57
commit 00c0bbf272
1 changed files with 57 additions and 0 deletions

View File

@ -161,6 +161,17 @@ module Osmocom_Gb_Types {
return int2oct(valueof(inp), len);
}
private function f_hex_or_wc(template integer inp, integer len) return template hexstring {
if (istemplatekind(inp, "omit")) {
return omit;
} else if (istemplatekind(inp, "*")) {
return *;
} else if (istemplatekind(inp, "?")) {
return ?;
}
return int2hex(valueof(inp), len);
}
template (value) NS_VCI ts_NS_IE_NSVCI(Nsvci nsvci) := {
iEI := '01'O,
ext := '1'B,
@ -806,6 +817,26 @@ octetstring sdu) := {
}
}
private function t_LLC_FRAMES_DISCARDED(template integer frames_discarded)
return template LLC_Frames_Discarded {
var template LLC_Frames_Discarded r;
if (istemplatekind(frames_discarded, "omit")) {
return omit;
} else if (istemplatekind(frames_discarded, "*")) {
return *;
} else {
r := {
iEI := '0F'O,
ext := '1'B,
lengthIndicator := {
length1 := 2
},
number_of_frames_discarded := f_hex_or_wc(frames_discarded, 2)
}
return r;
}
}
private function t_BSSGP_BVCI(template BssgpBvci bvci)
return template BVCI {
var template BVCI r;
@ -1848,6 +1879,32 @@ octetstring sdu) := {
}
}
/* 10.4.3 */
template (value) PDU_BSSGP ts_BSSGP_LLC_DISCARDED(GprsTlli tlli, template (value) integer frames_discarded,
template (value) BssgpBvci bvci,
template (value) integer oct_deleted) := {
pDU_BSSGP_LLC_DISCARDED := {
bssgpPduType := '2C'O,
tLLI := ts_BSSGP_TLLI(tlli),
lLC_Frames_Discarded := t_LLC_FRAMES_DISCARDED(frames_discarded),
bVCI := t_BSSGP_BVCI(bvci),
number_of_octets_deleted := t_NO_OCT_AFF(oct_deleted),
pFI := omit
}
}
template PDU_BSSGP tr_BSSGP_LLC_DISCARDED(template GprsTlli tlli, template integer frames_discarded,
template BssgpBvci bvci,
template integer oct_deleted) := {
pDU_BSSGP_LLC_DISCARDED := {
bssgpPduType := '2C'O,
tLLI := ts_BSSGP_TLLI(tlli),
lLC_Frames_Discarded := t_LLC_FRAMES_DISCARDED(frames_discarded),
bVCI := t_BSSGP_BVCI(bvci),
number_of_octets_deleted := t_NO_OCT_AFF(oct_deleted),
pFI := *
}
}
/* 10.2.3 */
template (value) PDU_BSSGP ts_BSSGP_RA_CAP(GprsTlli tlli,
template (omit) MSRadioAccessCapabilityV_BSSGP racap := omit) := {