From c51f7f72e8b9ffa0e3b839a2c3fa5c011b91fb47 Mon Sep 17 00:00:00 2001
From: Refik Hadzialic
Date: Sun, 22 Jul 2012 17:54:40 +0200
Subject: Writing RRLP

---
 vorlagen/thesis/src/kapitel_x.tex | 113 +++++++++++++++++++++++++++++++++++---
 1 file changed, 105 insertions(+), 8 deletions(-)

(limited to 'vorlagen/thesis/src/kapitel_x.tex')

diff --git a/vorlagen/thesis/src/kapitel_x.tex b/vorlagen/thesis/src/kapitel_x.tex
index 5020dc3..343581d 100644
--- a/vorlagen/thesis/src/kapitel_x.tex
+++ b/vorlagen/thesis/src/kapitel_x.tex
@@ -1424,22 +1424,22 @@ and ETSI TS 144 031 \citep{49.031V8.1.0} \citep{ETSITS144031}. ASN.1 is a conven
 for denoting the abstract syntax of data used inside of protocols or data 
 structures \citep[Chapter 8]{sharp2008principles} \citep{ITU-TX.680}. In other words, using ASN.1 it is possible 
 to describe data in an indepedent representation of programming languages in which a protocol is implemented.
-In this section only some of the used parts of the RRLP protocol 
+In this section, only some of the used parts of the RRLP protocol 
 inside of this thesis will be presented, more details can be found in the
 technical specifications \citep{49.031V8.1.0} \citep{ETSITS144031}. Structure 
-of the RRLP message can be seen in listing \ref{lst:RRLP}.
-\newpage
+of the RRLP message encoding for transmission can be seen in listing \ref{lst:RRLP}. 
+Further details on some of the unknown terms are given in listings
+\ref{lst:RRLPReq} and \ref{lst:RRLPReqData}. 
 \begin{lstlisting}[label=lst:RRLP,
-caption={\textbf{Structure of RRLP message in ASN.1 notation}},
-backgroundcolor=\color{light-gray}]
+caption={\textbf{Structure of the RRLP message in ASN.1}},
+backgroundcolor=\color{light-gray},
+basicstyle={\scriptsize\ttfamily}]
 RRLP-Messages
 -- { RRLP-messages }
 
 DEFINITIONS AUTOMATIC TAGS ::=
 
 BEGIN
-
-
 IMPORTS
   MsrPosition-Req, MsrPosition-Rsp, AssistanceData,
   ProtocolError
@@ -1462,9 +1462,106 @@ RRLP-Component ::= CHOICE {
   posCapabilityReq PosCapability-Req,
   posCapabilityRsp PosCapability-Rsp
 }
-
 END
 \end{lstlisting}
+An example how to build an RRLP request packet will be given,
+then it will be encoded using Packed Encoding Rules (PER). PER is one of the telecommunication
+standards used for encoding and decoding messages inside of protocols specified in the ASN.1 
+notation \citep{ITU-TX.691}.
+\begin{lstlisting}[label=lst:RRLPReq,
+caption={\textbf{Structure of the RRLP request in ASN.1}},
+backgroundcolor=\color{light-gray},
+basicstyle=\scriptsize\ttfamily]
+-- Measurement Position request component
+
+MsrPosition-Req ::= SEQUENCE {
+  positionInstruct PositionInstruct,
+  referenceAssistData ReferenceAssistData OPTIONAL,
+  msrAssistData MsrAssistData OPTIONAL,
+  systemInfoAssistData SystemInfoAssistData OPTIONAL,
+  gps-AssistData GPS-AssistData OPTIONAL,
+  extensionContainer ExtensionContainer OPTIONAL,
+  ...,
+  -- Release 98 extension element
+  rel98-MsrPosition-Req-extension Rel98-MsrPosition-Req-Extension OPTIONAL
+}
+\end{lstlisting}
+\begin{lstlisting}[label=lst:RRLPReqData,
+caption={\textbf{Structure of the data types from RRLP request in ASN.1}},
+backgroundcolor=\color{light-gray},
+basicstyle=\scriptsize\ttfamily]
+-- Position instructions
+PositionInstruct ::= SEQUENCE {
+  -- Method type
+  methodType MethodType,
+  positionMethod PositionMethod,
+  measureResponseTime MeasureResponseTime,
+  useMultipleSets UseMultipleSets,
+  environmentCharacter EnvironmentCharacter OPTIONAL
+}
+
+--
+MethodType ::= CHOICE {
+  msAssisted AccuracyOpt, -- accuracy is optional
+  msBased Accuracy, -- accuracy is mandatory
+  msBasedPref Accuracy, -- accuracy is mandatory
+  msAssistedPref Accuracy -- accuracy is mandatory
+}
+
+-- Accuracy of the location estimation
+AccuracyOpt ::= SEQUENCE {
+  accuracy Accuracy OPTIONAL
+}
+
+-- The values of this field are defined in 3GPP TS 03.32 (Uncertainty code)
+Accuracy ::= INTEGER (0..127)
+
+-- Position Method
+PositionMethod ::= ENUMERATED {
+  eotd (0),
+  gps (1),
+  gpsOrEOTD (2)
+}
+
+-- Measurement request response time
+MeasureResponseTime ::= INTEGER (0..7)
+
+-- useMultiple Sets, FFS!
+UseMultipleSets ::= ENUMERATED {
+  multipleSets (0), -- multiple sets are allowed
+  oneSet (1) -- sending of multiple is not allowed
+}
+\end{lstlisting}
+PER is intended for use in circumstances where
+minimizing the size of the representation of values is the major concern
+in the choice of encoding rules \citep{ITU-TX.691}. In other words, it compresses the data
+in the PDU packets by limiting the bit field length to the minimal amount of 
+bits required to define the minimal and maximal values defined in the standard. 
+There are two variations of PER, 
+aligned and nonaligned \citep{ITU-TX.691}. In the RRLP protocol the aligned type of PER
+is used. The major difference between aligned and nonaligned PER lies in the fact that some
+data structures are aligned on octet boundaries, i.e. there are some wasted padding bits which 
+are set to zero if not used. 
+
+Before proceeding with an example, summary for the used ASN.1 type
+elements will be provided otherwise it is not possible to proceed with an example
+RRLP request. A type of \textbf{SEQUENCE} is used to 
+reference a ``fixed, ordered list of types (some of which may be declared to be
+optional); each value of the sequence type is an ordered list of values,
+one from each component type'' \citep{ITU-TX.691} where the elements inside
+IE (fields) of \textbf{OPTIONAL} type do not need to be included and are not mandatory.
+Variables defined by \textbf{CHOICE} are used to reference ``a list of distinct types; 
+each value of the choice type is derived from the value of one of the
+component types'' \citep{ITU-TX.691}, i.e. only one element is selected from the 
+list and the elements of the list are defined according to their variable type.
+Variables of type \textbf{ENUMERATED} are ``simple types whose values are given
+distinct identifiers as part of the type notation'' \citep{ITU-TX.691}, these types
+are used to distinguish a choice by identifying it with an incremented number where the 
+first element is of value zero. Veriables defined by \textbf{INTEGER} are of the ``simple 
+type with distinguished values which are the positive and negative whole numbers,
+including zero (as a single value)'' \citep{ITU-TX.691}.
+
+At this point the meaning of RRLP data elements will be given. The IE  
 
 \subsection{RRLP Assistance data}
 
-- 
cgit v1.2.3-55-g7522

