library: Add templates to initialize CellId, RAI, LAI

Change-Id: Ie9d86e1b651dff279e7d50a4282bf14fbed5bb76
This commit is contained in:
Pau Espin 2021-01-08 17:11:03 +01:00 committed by laforge
parent 7b761e2850
commit 8bd54cf77a
2 changed files with 13 additions and 0 deletions

View File

@ -420,12 +420,20 @@ type record LocationAreaIdentification {
BcdMccMnc mcc_mnc,
uint16_t lac
} with { variant "" };
template (value) LocationAreaIdentification ts_LAI(BcdMccMnc mcc_mnc, uint16_t lac) := {
mcc_mnc := mcc_mnc,
lac := lac
};
/* 24.008 10.5.5.15 */
type record RoutingAreaIdentification {
LocationAreaIdentification lai,
uint8_t rac
} with { variant "" };
template (value) RoutingAreaIdentification ts_RAI(template (value) LocationAreaIdentification lai, uint8_t rac) := {
lai := lai,
rac := rac
};
external function enc_RoutingAreaIdentification(RoutingAreaIdentification rai) return octetstring
with { extension "prototype(convert)" extension "encode(RAW)" }

View File

@ -733,6 +733,11 @@ octetstring sdu) := {
CellIdentity cell_id
} with { variant "" };
template (value) BssgpCellId ts_BssgpCellId(template (value) RoutingAreaIdentification rai, CellIdentity cell_id) := {
ra_id := rai,
cell_id := cell_id
};
type enumerated BssgpCause {
BSSGP_CAUSE_PROC_OVERLOAD ('00'H),
BSSGP_CAUSE_EQUIMENT_FAILURE ('01'H),