| module BSSGP_Types { |
| |
| import from General_Types all; |
| import from Osmocom_Types all; |
| import from GSM_Types all; |
| |
| type enumerated BssgpPduType { |
| DL_UNITDATA ('00'H), |
| UL_UNITDATA ('01'H), |
| RA_CAPABILITY ('02'H), |
| DL_MBMS_UNITDATA ('04'H), |
| UL_MBMS_UNITDATA ('05'H), |
| /* between GMM SAPs */ |
| PAGING_PS ('06'H), |
| PAGING_CS ('07'H), |
| RA_CAPABILITY_UPDATE ('08'H), |
| RA_CAPABILITY_UPDATE_ACK ('09'H), |
| RADIO_STATUS ('0A'H), |
| SUSPEND ('0B'H), |
| SUSPEND_ACK ('0C'H), |
| SUSPEND_NACK ('0D'H), |
| RESUME ('0E'H), |
| RESUME_ACK ('0F'H), |
| RESUME_NACK ('10'H), |
| /* between NM SAPs */ |
| BVC_BLOCK ('20'H), |
| BVC_BLOCK_ACK ('21'H), |
| BVC_RESET ('22'H), |
| BVC_RESET_ACK ('23'H), |
| BVC_UNBLOCK ('24'H), |
| BVC_UNBLOCK_ACK ('25'H), |
| FLOW_CONTROL_BVC ('26'H), |
| FLOW_CONTROL_BVC_ACK ('27'H), |
| FLOW_CONTROL_MS ('28'H), |
| FLOW_CONTROL_MS_ACK ('29'H), |
| FLUSH_LL ('2A'H), |
| FLUSH_LL_ACK ('2B'H), |
| LLC_DISCARDED ('2C'H), |
| FLOW_CONTROL_PFC ('2D'H), |
| FLOW_CONTROL_PFC_ACK ('2E'H), |
| SGSN_INVOKE_TRACE ('40'H), |
| STATUS ('41'H) |
| /* between PFM SAPs : TODO */ |
| /* between LCS SAPs : TODO */ |
| /* between RIM SAPs : TODO */ |
| /* between MBMS SAPs : TODO */ |
| } with { variant "FIELDLENGTH(8)" }; |
| |
| type enumerated BssgpIEI { |
| ALIGNMENT_OCTETS ('00'H), |
| BMAX_DEFAULT_MS ('01'H), |
| BSS_AREA_INDICATION ('02'H), |
| BUCKET_LEAK_RATE ('03'H), |
| BVCI ('04'H), |
| BVC_BUCKET_SIZE ('05'H), |
| BVC_MEASUREMENT ('06'H), |
| CAUSE ('07'H), |
| CELL_ID ('08'H), |
| CHENNEL_NEEDED ('09'H), |
| DRX_PARAMETERS ('0A'H), |
| EMLPP_PRIORITY ('0B'H), |
| FLUSH_ACTION ('0C'H), |
| IMSI ('0D'H), |
| LLC_PDU ('0E'H), |
| LLC_FRAMES_DISCARDED ('0F'H), |
| LOCATION_AREA ('10'H), |
| MOBILE_IDENTITY ('11'H), |
| MS_BUCKET_SIZE ('12'H), |
| MS_RADIO_ACCESS_CAPABILITY ('13'H), |
| OMC_ID ('14'H), |
| PDU_IN_ERROR ('15'H), |
| PDU_LIFETIME ('16'H), |
| PRIORITY ('17'H), |
| QOS_PROFILE ('18'H), |
| RADIO_CAUSE ('19'H), |
| RA_CAP_UPD_CAUSE ('1A'H), |
| ROUTEING_AREA ('1B'H), |
| R_DEFAULT_MS ('1C'H), |
| SUSPE_DN_REFERENCE_NR ('1D'H), |
| TAG ('1E'H), |
| TLLI ('1F'H), |
| TMSI ('20'H), |
| TRACE_REFERENCE ('21'H), |
| TRACE_TYPE ('22'H), |
| TRANSACTION_ID ('23'H), |
| TRIGGER_ID ('24'H), |
| NUMBER_OF_OCTETS_AFFECTED ('25'H), |
| LSA_IDENTIFIER_LIST ('26'H), |
| LSA_INFORMATION ('27'H), |
| PACKET_FLOW_IDENTIFIER ('28'H), |
| PACKET_FLOW_TIMER ('29'H), |
| AGGREGATE_BSS_QOS_PROFILE ('3a'H), |
| FEATURE_BITMAP ('3b'H), |
| BUCKET_FILL_RATIO ('3c'H), |
| SERVICE_UTRAN_CCO ('3d'H), |
| NSEI ('3e'H), |
| RRLP_APDU ('3f'H), |
| LCS_QOS ('40'H), |
| LCS_CLIENT_TYPE ('41'H), |
| REQUESTED_GPS_ASSIST_DATA ('42'H), |
| LOCATION_TYPE ('43'H), |
| LOCATION_ESTIMATE ('44'H), |
| POSITIONING_DATA ('45'H), |
| DECIPHERING_KEYS ('46'H), |
| LCS_PRIORITY ('47'H), |
| LCS_CAUSE ('48'H), |
| LCS_CAPABILITY ('49'H), |
| RRLP_FLAGS ('4a'H), |
| RIM_APPLICATION_IDENTITY ('4b'H), |
| RIM_SEQUENCE_NUMBER ('4c'H), |
| RAN_INFO_REUEST_AC ('4d'H), |
| RAN_INFO_AC ('4e'H), |
| RIM_PDU_INDICATIONS ('4f'H), |
| PFC_FLOC_CONTROL_PARAMETERS ('52'H), |
| GLOBAL_CN_ID ('53'H), |
| RIM_ROUTING_INFORMATION ('54'H), |
| RIM_PROTOCOL_VERSION_NUMBER ('55'H), |
| APP_ERROR_CONTAINER ('56'H), |
| /* FIXME */ |
| EXTENDED_FEATURE_BITMAP ('69'H) |
| } with { variant "FIELDLENGTH(8)" }; |
| |
| /* 11.3.28 */ |
| type record BssgpQosProfile { |
| uint16_t r, |
| BIT2 spare, |
| boolean c_r, |
| boolean t, |
| boolean a, |
| uint3_t precedence |
| } with { variant (c_r) "FIELDLENGTH(1)" |
| variant (t) "FIELDLENGTH(1)" |
| variant (a) "FIELDLENGTH(1)" |
| }; |
| |
| /* 11.3.84 */ |
| type record BssgpFeatureBitmap { |
| boolean mbms, |
| boolean enh_radio_status, |
| boolean pfc_fc, |
| boolean rim, |
| boolean lcs, |
| boolean inr, |
| boolean cbl, |
| boolean pfc |
| } with { variant "" }; |
| |
| /* 11.3.47 */ |
| type record BssgpServiceUtranCco { |
| uint5_t spare, |
| uint3_t value_part |
| } with { variant "" }; |
| |
| /* 11.3.84 */ |
| type record BssgpExtendedFeatureBitmap { |
| BIT7 spare, |
| BIT1 ps_handover |
| } with { variant "" }; |
| |
| type uint16_t BssgpPduLifetime; |
| |
| /* TS 48.008 3.2.2.18 */ |
| type record BssmapPriority { |
| BIT1 spare, |
| boolean pci, |
| uint4_t level, |
| boolean qa, |
| boolean pvi |
| } with { variant "" }; |
| |
| type BssmapPriority BssgpPriority; |
| |
| type uint32_t BssgpTlli; |
| |
| type uint16_t BssgpBvci; |
| type uint8_t BssgpCause; |
| |
| type record BssgpCellId { |
| RoutingAreaIdentification ra_id, |
| CellIdentity cell_id |
| } with { variant "" }; |
| |
| type union BssgpIeUnion { |
| uint16_t bmax_default_ms, /* 11.3.2 */ |
| uint16_t bucket_leak_rate, /* 11.3.4 */ |
| uint16_t bvc_bucket_size, /* 11.3.5 */ |
| BssgpBvci bvci, /* 11.3.6 */ |
| uint16_t bvc_measurement, /* 11.3.7 */ |
| BssgpCause cause, /* 11.3.8 */ |
| BssgpCellId cell_id, /* 11.3.9 */ |
| DrxParameter drx_parameter, /* 11.3.11 */ |
| LocationAreaIdentification lai, /* 11.3.17 */ |
| MobileIdentity mobile_id, /* 11.3.20 */ |
| BssgpPduLifetime pdu_lifetime, /* 11.3.25 */ |
| BssgpPriority priority, /* 11.3.27 */ |
| BssgpQosProfile qos_profile, /* 11.3.28 */ |
| BssgpTlli tlli, /* 11.3.25 */ |
| uint16_t r_default_ms, /* 11.3.32 */ |
| BssgpServiceUtranCco svc_utran_cco, /* 11.3.47 */ |
| BssgpFeatureBitmap feature_bitmap, /* 11.3.40 */ |
| BssgpExtendedFeatureBitmap ext_feature_bitmap, /* 11.3.84 */ |
| octetstring other |
| }; |
| |
| type record BssgpTLV { |
| BssgpIEI iei, |
| /* we cannot express a variable-length "length" field with extension octets in the TTCN-3 |
| * syntax, so we simply assume a plain 16 bit length value here and have a 'pseudl-BSSGP' |
| * translator in front which explands all variable-length "length" fields to 16bits */ |
| uint16_t len, |
| BssgpIeUnion u |
| } with { |
| variant (u) "CROSSTAG( |
| bmax_default_ms, iei = BMAX_DEFAULT_MS; |
| bucket_leak_rate, iei = BUCKET_LEAK_RATE; |
| bvc_bucket_size, iei = BVC_BUCKET_SIZE; |
| bvci, iei = BVCI; |
| bvc_measurement, iei = BVC_MEASUREMENT; |
| cause, iei = CAUSE; |
| cell_id, iei = CELL_ID; |
| drx_parameter, iei = DRX_PARAMETERS; |
| lai, iei = LOCATION_AREA; |
| priority, iei = PRIORITY; |
| mobile_id, iei = MOBILE_IDENTITY; |
| pdu_lifetime, iei = PDU_LIFETIME; |
| qos_profile, iei = QOS_PROFILE; |
| tlli, iei = TLLI; |
| r_default_ms, iei = R_DEFAULT_MS; |
| svc_utran_cco, iei = SERVICE_UTRAN_CCO; |
| feature_bitmap, iei = FEATURE_BITMAP; |
| ext_feature_bitmap, iei = EXTENDED_FEATURE_BITMAP; |
| other, OTHERWISE)" |
| variant (len) "LENGTHTO(u)" |
| }; |
| |
| type record of BssgpTLV BssgpTLVs; |
| |
| /* 10.2.1 */ |
| type record BssgpDlUnitdata { |
| BssgpTlli tlli, |
| BssgpQosProfile qos_profile, |
| BssgpTLV pdu_lifetime, |
| /* optional parts */ |
| BssgpTLVs tlvs |
| } with { variant "" }; |
| |
| /* 10.2.2 */ |
| type record BssgpUlUnitdata { |
| BssgpTlli tlli, |
| BssgpQosProfile qos_profile, |
| BssgpTLV cell_id, |
| /* optional parts */ |
| BssgpTLVs tlvs |
| } with { variant "" }; |
| |
| type record BssgpNormalPdu { |
| BssgpTLVs tlvs optional |
| } with { variant "" }; |
| |
| type union BssgpPduUnion { |
| BssgpDlUnitdata dl_unitdata, |
| BssgpUlUnitdata ul_unitdata, |
| BssgpNormalPdu other |
| }; |
| |
| type record BssgpPdu { |
| BssgpPduType pdu_type, |
| BssgpPduUnion u |
| } with { |
| variant (u) "CROSSTAG( |
| dl_unitdata, pdu_type = DL_UNITDATA; |
| ul_unitdata, pdu_type = UL_UNITDATA; |
| other, OTHERWISE)" |
| } |
| |
| external function dec_BssgpPdu(in octetstring stream) return BssgpPdu |
| with { extension "prototype(convert) decode(RAW)" }; |
| |
| } with { encode "RAW" }; |