diff options
author | Harald Welte <laforge@osmocom.org> | 2024-03-27 21:54:20 +0100 |
---|---|---|
committer | laforge <laforge@osmocom.org> | 2024-04-02 20:22:14 +0000 |
commit | af3e21687a16545ecc9600066c3a00bf285c91d1 (patch) | |
tree | f3254f17baf1d72189030161ceb5e60ae3f4a9a6 /library | |
parent | 37ee0ed83ca11a50a46cb582482ea72401b3253f (diff) |
hnbgw: Introduce tests about UE registration
We didn't have any test coverage for HNBAP UE registration so far.
Let's start with two basic tests:
* normal / successful case
* abnormal case: UE Register without prior HNB Register
Change-Id: Ice2743d376ab8041646259fa25117d6fd0e8c2fd
Diffstat (limited to 'library')
-rw-r--r-- | library/hnbap/HNBAP_Templates.ttcn | 166 |
1 files changed, 166 insertions, 0 deletions
diff --git a/library/hnbap/HNBAP_Templates.ttcn b/library/hnbap/HNBAP_Templates.ttcn index 2576d174..7a86e0c9 100644 --- a/library/hnbap/HNBAP_Templates.ttcn +++ b/library/hnbap/HNBAP_Templates.ttcn @@ -232,6 +232,172 @@ ts_HNBAP_HNBRegisterReject(template (value) Cause cause) := { } } +/* 9.1.6 UE REGISTER REQUEST */ +template (present) HNBAP_PDU +tr_HNBAP_UERegisterRequest(template (present) UE_Identity ue_id) := { + initiatingMessage := { + procedureCode := id_UERegister, + criticality := reject, + value_ := { + uERegisterRequest := { + protocolIEs := { + { + id := HNBAP_Constants.id_UE_Identity, + criticality := reject, + value_ := { UE_Identity := ue_id } + }, { + id := HNBAP_Constants.id_Registration_Cause, + criticality := ignore, + value_ := { Registration_Cause := normal } + }, { + id := HNBAP_Constants.id_UE_Capabilities, + criticality := ignore, + value_ := { + UE_Capabilities := { + access_stratum_release_indicator := ?, + csg_capability := ? + } + } + } + }, + protocolExtensions := * /* TODO: CriticalityDiagnostics, BackoffTimer */ + } + } + } +} + +template (value) HNBAP_PDU +ts_HNBAP_UERegisterRequest(template (value) UE_Identity ue_id) := { + initiatingMessage := { + procedureCode := id_UERegister, + criticality := reject, + value_ := { + uERegisterRequest := { + protocolIEs := { + { + id := HNBAP_Constants.id_UE_Identity, + criticality := reject, + value_ := { UE_Identity := ue_id } + }, { + id := HNBAP_Constants.id_Registration_Cause, + criticality := ignore, + value_ := { Registration_Cause := normal } + }, { + id := HNBAP_Constants.id_UE_Capabilities, + criticality := ignore, + value_ := { + UE_Capabilities := { + access_stratum_release_indicator := rel_8_and_beyond, + csg_capability := not_csg_capable, + iE_Extensions := omit + } + } + } + }, + protocolExtensions := omit /* TODO: CriticalityDiagnostics, BackoffTimer */ + } + } + } +} + +/* 9.1.7 UE REGISTER ACCEPT */ +template (present) HNBAP_PDU +tr_HNBAP_UERegisterAccept(template (present) UE_Identity ue_id) := { + successfulOutcome := { + procedureCode := id_UERegister, + criticality := reject, + value_ := { + uERegisterAccept := { + protocolIEs := { + { + id := HNBAP_Constants.id_UE_Identity, + criticality := reject, + value_ := { UE_Identity := ue_id } + }, { + id := HNBAP_Constants.id_Context_ID, + criticality := reject, + value_ := { Context_ID := ? } + }, * + }, + protocolExtensions := * /* TODO: CriticalityDiagnostics, BackoffTimer */ + } + } + } +} + +template (value) HNBAP_PDU +ts_HNBAP_UERegisterAccept(template (value) UE_Identity ue_id, + template (value) BIT24 context_id) := { + successfulOutcome := { + procedureCode := id_UERegister, + criticality := reject, + value_ := { + uERegisterAccept := { + protocolIEs := { + { + id := HNBAP_Constants.id_UE_Identity, + criticality := reject, + value_ := { UE_Identity := ue_id } + }, { + id := HNBAP_Constants.id_Context_ID, + criticality := reject, + value_ := { Context_ID := context_id } + } + }, + protocolExtensions := omit /* TODO: CriticalityDiagnostics, BackoffTimer */ + } + } + } +} + +/* 9.1.8 UE REGISTER REJECT */ +template (present) HNBAP_PDU +tr_HNBAP_UERegisterReject(template (present) UE_Identity ue_id, template (present) Cause cause := ?) := { + unsuccessfulOutcome := { + procedureCode := id_UERegister, + criticality := reject, + value_ := { + uERegisterReject := { + protocolIEs := { + { + id := HNBAP_Constants.id_UE_Identity, + criticality := reject, + value_ := { UE_Identity := ue_id } + }, { + id := HNBAP_Constants.id_Cause, + criticality := ignore, + value_ := { Cause := cause } + }, * + }, + protocolExtensions := * /* TODO: CriticalityDiagnostics, BackoffTimer */ + } + } + } +} +template (value) HNBAP_PDU +ts_HNBAP_UERegisterReject(template (value) UE_Identity ue_id, template (value) Cause cause) := { + unsuccessfulOutcome := { + procedureCode := id_UERegister, + criticality := reject, + value_ := { + uERegisterReject := { + protocolIEs := { + { + id := HNBAP_Constants.id_UE_Identity, + criticality := reject, + value_ := { UE_Identity := ue_id } + }, { + id := HNBAP_Constants.id_Cause, + criticality := ignore, + value_ := { Cause := cause } + } + }, + protocolExtensions := omit /* TODO: CriticalityDiagnostics, BackoffTimer */ + } + } + } +} + /* 9.1.9 HNB DE-REGISTER */ template (value) HNBAP_PDU ts_HNBAP_HNBDe_Register(template (value) Cause cause) := { |