diff options
Diffstat (limited to 'sysinfo/GSM_Types.ttcn')
-rw-r--r-- | sysinfo/GSM_Types.ttcn | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/sysinfo/GSM_Types.ttcn b/sysinfo/GSM_Types.ttcn index 98f6dd5..4529371 100644 --- a/sysinfo/GSM_Types.ttcn +++ b/sysinfo/GSM_Types.ttcn @@ -303,9 +303,25 @@ module GSM_Types { bitstring ra length(8), uint5_t t1p, uint6_t t3, - uint5_t t1 + uint5_t t2 } with { variant "" }; + template RequestReference t_RequestReference(template bitstring ra, template uint5_t t1p, template uint6_t t3, template uint5_t t2) := { + ra := ra, + t1p := t1p, + t3 := t3, + t2 := t2 + } + + /* compute the expected request reference for given RA + FN */ + function f_compute_ReqRef(uint8_t ra, GsmFrameNumber fn) return RequestReference { + var RequestReference req_ref := { ra := int2bit(ra, 8) }; + req_ref.t1p := (fn / 1326) mod 32; + req_ref.t2 := fn mod 26; + req_ref.t3 := fn mod 51; + return req_ref + } + /* 10.5.2.40 */ type integer TimingAdvance (0..219); |