Import code to generate RRLP ephemeris data from u-blox GPS receiver
taken from http://www.246tnt.com/files/rrlp-20091101.tar.bz2
This commit is contained in:
commit
341542b9d3
|
@ -0,0 +1,2 @@
|
|||
See the included gpl-2.0.txt or gpl-3.0.txt depending on your
|
||||
preferences.
|
|
@ -0,0 +1,44 @@
|
|||
|
||||
ASN1C=../../../tmp/rrlp/asn1c/asn1c/asn1c
|
||||
ASN1_INCLUDE=/home/tnt/tmp/rrlp/asn1c/skeletons
|
||||
CC=gcc
|
||||
CFLAGS=-I$(ASN1_INCLUDE) -Iasn1_gen -O3 -Wall
|
||||
|
||||
ASN1_FILES=$(wildcard asn1/*.asn)
|
||||
|
||||
|
||||
all: rrlp-test
|
||||
|
||||
|
||||
rrlp-test: libgsm-asn1.a gps.o ubx.o ubx-parse.o rrlp.o main.o
|
||||
$(CC) -o $@ gps.o ubx.o ubx-parse.o rrlp.o main.o -L. -lgsm-asn1
|
||||
|
||||
|
||||
#
|
||||
# ASN1 file autogeneration (need recursive makefile call)
|
||||
#
|
||||
|
||||
ASN1_SOURCES = $(wildcard asn1_gen/*.c)
|
||||
ASN1_OBJECTS = $(ASN1_SOURCES:.c=.o)
|
||||
|
||||
libgsm-asn1.a: $(ASN1_FILES)
|
||||
mkdir -p asn1_gen && \
|
||||
cd asn1_gen && \
|
||||
$(ASN1C) -fskeletons-copy -fnative-types -gen-PER $(addprefix ../,$^)
|
||||
@rm asn1_gen/converter-sample.c asn1_gen/Makefile.am.sample
|
||||
@$(MAKE) libgsm-asn1.a.submake
|
||||
|
||||
libgsm-asn1.a.submake: $(ASN1_OBJECTS)
|
||||
$(AR) rcs libgsm-asn1.a $^
|
||||
|
||||
.PHONY: libgsm-asn1.a.submake
|
||||
|
||||
|
||||
#
|
||||
# Clean
|
||||
#
|
||||
|
||||
clean:
|
||||
rm -Rf asn1_gen
|
||||
rm -f libgsm-asn1.a *.o rrlp-test
|
||||
|
|
@ -0,0 +1,131 @@
|
|||
-- $Id: MAP-BS-Code.asn 28149 2009-04-25 17:45:34Z etxrab $
|
||||
-- 3GPP TS 29.002 V8.9.0 (2009-04)
|
||||
-- 17.7.10 Bearer Service Codes
|
||||
|
||||
MAP-BS-Code {
|
||||
itu-t identified-organization (4) etsi (0) mobileDomain (0)
|
||||
gsm-Network (1) modules (3) map-BS-Code (20) version11 (11)}
|
||||
|
||||
DEFINITIONS
|
||||
|
||||
::=
|
||||
|
||||
BEGIN
|
||||
|
||||
BearerServiceCode ::= OCTET STRING (SIZE (1))
|
||||
-- This type is used to represent the code identifying a single
|
||||
-- bearer service, a group of bearer services, or all bearer
|
||||
-- services. The services are defined in TS 3GPP TS 22.002 [3].
|
||||
-- The internal structure is defined as follows:
|
||||
--
|
||||
-- plmn-specific bearer services:
|
||||
-- bits 87654321: defined by the HPLMN operator
|
||||
|
||||
-- rest of bearer services:
|
||||
-- bit 8: 0 (unused)
|
||||
-- bits 7654321: group (bits 7654), and rate, if applicable
|
||||
-- (bits 321)
|
||||
|
||||
Ext-BearerServiceCode ::= OCTET STRING (SIZE (1..5))
|
||||
-- This type is used to represent the code identifying a single
|
||||
-- bearer service, a group of bearer services, or all bearer
|
||||
-- services. The services are defined in TS 3GPP TS 22.002 [3].
|
||||
-- The internal structure is defined as follows:
|
||||
--
|
||||
-- OCTET 1:
|
||||
-- plmn-specific bearer services:
|
||||
-- bits 87654321: defined by the HPLMN operator
|
||||
--
|
||||
-- rest of bearer services:
|
||||
-- bit 8: 0 (unused)
|
||||
-- bits 7654321: group (bits 7654), and rate, if applicable
|
||||
-- (bits 321)
|
||||
|
||||
-- OCTETS 2-5: reserved for future use. If received the
|
||||
-- Ext-TeleserviceCode shall be
|
||||
-- treated according to the exception handling defined for the
|
||||
-- operation that uses this type.
|
||||
|
||||
|
||||
-- Ext-BearerServiceCode includes all values defined for BearerServiceCode.
|
||||
|
||||
allBearerServices BearerServiceCode ::= '00000000'B
|
||||
|
||||
allDataCDA-Services BearerServiceCode ::= '00010000'B
|
||||
dataCDA-300bps BearerServiceCode ::= '00010001'B
|
||||
dataCDA-1200bps BearerServiceCode ::= '00010010'B
|
||||
dataCDA-1200-75bps BearerServiceCode ::= '00010011'B
|
||||
dataCDA-2400bps BearerServiceCode ::= '00010100'B
|
||||
dataCDA-4800bps BearerServiceCode ::= '00010101'B
|
||||
dataCDA-9600bps BearerServiceCode ::= '00010110'B
|
||||
general-dataCDA BearerServiceCode ::= '00010111'B
|
||||
|
||||
allDataCDS-Services BearerServiceCode ::= '00011000'B
|
||||
dataCDS-1200bps BearerServiceCode ::= '00011010'B
|
||||
dataCDS-2400bps BearerServiceCode ::= '00011100'B
|
||||
dataCDS-4800bps BearerServiceCode ::= '00011101'B
|
||||
dataCDS-9600bps BearerServiceCode ::= '00011110'B
|
||||
general-dataCDS BearerServiceCode ::= '00011111'B
|
||||
|
||||
allPadAccessCA-Services BearerServiceCode ::= '00100000'B
|
||||
padAccessCA-300bps BearerServiceCode ::= '00100001'B
|
||||
padAccessCA-1200bps BearerServiceCode ::= '00100010'B
|
||||
padAccessCA-1200-75bps BearerServiceCode ::= '00100011'B
|
||||
padAccessCA-2400bps BearerServiceCode ::= '00100100'B
|
||||
padAccessCA-4800bps BearerServiceCode ::= '00100101'B
|
||||
padAccessCA-9600bps BearerServiceCode ::= '00100110'B
|
||||
general-padAccessCA BearerServiceCode ::= '00100111'B
|
||||
|
||||
allDataPDS-Services BearerServiceCode ::= '00101000'B
|
||||
dataPDS-2400bps BearerServiceCode ::= '00101100'B
|
||||
dataPDS-4800bps BearerServiceCode ::= '00101101'B
|
||||
dataPDS-9600bps BearerServiceCode ::= '00101110'B
|
||||
general-dataPDS BearerServiceCode ::= '00101111'B
|
||||
|
||||
allAlternateSpeech-DataCDA BearerServiceCode ::= '00110000'B
|
||||
|
||||
allAlternateSpeech-DataCDS BearerServiceCode ::= '00111000'B
|
||||
|
||||
allSpeechFollowedByDataCDA BearerServiceCode ::= '01000000'B
|
||||
|
||||
allSpeechFollowedByDataCDS BearerServiceCode ::= '01001000'B
|
||||
|
||||
-- The following non-hierarchical Compound Bearer Service
|
||||
-- Groups are defined in TS 3GPP TS 22.030:
|
||||
allDataCircuitAsynchronous BearerServiceCode ::= '01010000'B
|
||||
-- covers "allDataCDA-Services", "allAlternateSpeech-DataCDA" and
|
||||
-- "allSpeechFollowedByDataCDA"
|
||||
allAsynchronousServices BearerServiceCode ::= '01100000'B
|
||||
-- covers "allDataCDA-Services", "allAlternateSpeech-DataCDA",
|
||||
-- "allSpeechFollowedByDataCDA" and "allPadAccessCDA-Services"
|
||||
allDataCircuitSynchronous BearerServiceCode ::= '01011000'B
|
||||
-- covers "allDataCDS-Services", "allAlternateSpeech-DataCDS" and
|
||||
-- "allSpeechFollowedByDataCDS"
|
||||
allSynchronousServices BearerServiceCode ::= '01101000'B
|
||||
-- covers "allDataCDS-Services", "allAlternateSpeech-DataCDS",
|
||||
-- "allSpeechFollowedByDataCDS" and "allDataPDS-Services"
|
||||
--
|
||||
-- Compound Bearer Service Group Codes are only used in call
|
||||
-- independent supplementary service operations, i.e. they
|
||||
-- are not used in InsertSubscriberData or in
|
||||
-- DeleteSubscriberData messages.
|
||||
|
||||
allPLMN-specificBS BearerServiceCode ::= '11010000'B
|
||||
plmn-specificBS-1 BearerServiceCode ::= '11010001'B
|
||||
plmn-specificBS-2 BearerServiceCode ::= '11010010'B
|
||||
plmn-specificBS-3 BearerServiceCode ::= '11010011'B
|
||||
plmn-specificBS-4 BearerServiceCode ::= '11010100'B
|
||||
plmn-specificBS-5 BearerServiceCode ::= '11010101'B
|
||||
plmn-specificBS-6 BearerServiceCode ::= '11010110'B
|
||||
plmn-specificBS-7 BearerServiceCode ::= '11010111'B
|
||||
plmn-specificBS-8 BearerServiceCode ::= '11011000'B
|
||||
plmn-specificBS-9 BearerServiceCode ::= '11011001'B
|
||||
plmn-specificBS-A BearerServiceCode ::= '11011010'B
|
||||
plmn-specificBS-B BearerServiceCode ::= '11011011'B
|
||||
plmn-specificBS-C BearerServiceCode ::= '11011100'B
|
||||
plmn-specificBS-D BearerServiceCode ::= '11011101'B
|
||||
plmn-specificBS-E BearerServiceCode ::= '11011110'B
|
||||
plmn-specificBS-F BearerServiceCode ::= '11011111'B
|
||||
|
||||
END
|
||||
|
|
@ -0,0 +1,633 @@
|
|||
-- $Id: MAP-CommonDataTypes.asn 30470 2009-10-10 12:37:56Z krj $
|
||||
-- 3GPP TS 29.002 V8.9.0 (2009-04)
|
||||
-- 17.7.8 Common data types
|
||||
|
||||
MAP-CommonDataTypes {
|
||||
itu-t identified-organization (4) etsi (0) mobileDomain (0)
|
||||
gsm-Network (1) modules (3) map-CommonDataTypes (18) version11 (11)}
|
||||
|
||||
DEFINITIONS
|
||||
|
||||
IMPLICIT TAGS
|
||||
|
||||
::=
|
||||
|
||||
BEGIN
|
||||
|
||||
EXPORTS
|
||||
|
||||
-- general data types and values
|
||||
AddressString,
|
||||
ISDN-AddressString,
|
||||
maxISDN-AddressLength,
|
||||
FTN-AddressString,
|
||||
ISDN-SubaddressString,
|
||||
ExternalSignalInfo,
|
||||
Ext-ExternalSignalInfo,
|
||||
AccessNetworkSignalInfo,
|
||||
SignalInfo,
|
||||
maxSignalInfoLength,
|
||||
AlertingPattern,
|
||||
TBCD-STRING,
|
||||
|
||||
-- data types for numbering and identification
|
||||
IMSI,
|
||||
TMSI,
|
||||
Identity,
|
||||
SubscriberId,
|
||||
IMEI,
|
||||
HLR-List,
|
||||
LMSI,
|
||||
GlobalCellId,
|
||||
NetworkResource,
|
||||
AdditionalNetworkResource,
|
||||
NAEA-PreferredCI,
|
||||
NAEA-CIC,
|
||||
ASCI-CallReference,
|
||||
SubscriberIdentity,
|
||||
PLMN-Id,
|
||||
|
||||
-- data types for CAMEL
|
||||
CellGlobalIdOrServiceAreaIdOrLAI,
|
||||
CellGlobalIdOrServiceAreaIdFixedLength,
|
||||
LAIFixedLength,
|
||||
|
||||
-- data types for subscriber management
|
||||
BasicServiceCode,
|
||||
Ext-BasicServiceCode,
|
||||
EMLPP-Info,
|
||||
EMLPP-Priority,
|
||||
MC-SS-Info,
|
||||
MaxMC-Bearers,
|
||||
MC-Bearers,
|
||||
Ext-SS-Status,
|
||||
|
||||
-- data types for geographic location
|
||||
AgeOfLocationInformation,
|
||||
LCSClientExternalID,
|
||||
LCSClientInternalID,
|
||||
LCSServiceTypeID,
|
||||
--- WS added exports needed by gsm_map.asn (extra asn1 file to handle older prot. ver.)
|
||||
ProtocolId,
|
||||
LCSServiceTypeID
|
||||
;
|
||||
|
||||
IMPORTS
|
||||
TeleserviceCode,
|
||||
Ext-TeleserviceCode
|
||||
FROM MAP-TS-Code {
|
||||
itu-t identified-organization (4) etsi (0) mobileDomain (0)
|
||||
gsm-Network (1) modules (3) map-TS-Code (19) version11 (11)}
|
||||
|
||||
BearerServiceCode,
|
||||
Ext-BearerServiceCode
|
||||
FROM MAP-BS-Code {
|
||||
itu-t identified-organization (4) etsi (0) mobileDomain (0)
|
||||
gsm-Network (1) modules (3) map-BS-Code (20) version11 (11)}
|
||||
|
||||
SS-Code
|
||||
FROM MAP-SS-Code {
|
||||
itu-t identified-organization (4) etsi (0) mobileDomain (0)
|
||||
gsm-Network (1) modules (3) map-SS-Code (15) version11 (11)}
|
||||
|
||||
ExtensionContainer
|
||||
FROM MAP-ExtensionDataTypes {
|
||||
itu-t identified-organization (4) etsi (0) mobileDomain (0)
|
||||
gsm-Network (1) modules (3) map-ExtensionDataTypes (21) version11 (11)}
|
||||
;
|
||||
|
||||
|
||||
-- general data types
|
||||
|
||||
TBCD-STRING ::= OCTET STRING
|
||||
-- This type (Telephony Binary Coded Decimal String) is used to
|
||||
-- represent several digits from 0 through 9, *, #, a, b, c, two
|
||||
-- digits per octet, each digit encoded 0000 to 1001 (0 to 9),
|
||||
-- 1010 (*), 1011 (#), 1100 (a), 1101 (b) or 1110 (c); 1111 used
|
||||
-- as filler when there is an odd number of digits.
|
||||
|
||||
-- bits 8765 of octet n encoding digit 2n
|
||||
-- bits 4321 of octet n encoding digit 2(n-1) +1
|
||||
|
||||
AddressString ::= OCTET STRING (SIZE (1..maxAddressLength))
|
||||
-- This type is used to represent a number for addressing
|
||||
-- purposes. It is composed of
|
||||
-- a) one octet for nature of address, and numbering plan
|
||||
-- indicator.
|
||||
-- b) digits of an address encoded as TBCD-String.
|
||||
|
||||
-- a) The first octet includes a one bit extension indicator, a
|
||||
-- 3 bits nature of address indicator and a 4 bits numbering
|
||||
-- plan indicator, encoded as follows:
|
||||
|
||||
-- bit 8: 1 (no extension)
|
||||
|
||||
-- bits 765: nature of address indicator
|
||||
-- 000 unknown
|
||||
-- 001 international number
|
||||
-- 010 national significant number
|
||||
-- 011 network specific number
|
||||
-- 100 subscriber number
|
||||
-- 101 reserved
|
||||
-- 110 abbreviated number
|
||||
-- 111 reserved for extension
|
||||
|
||||
-- bits 4321: numbering plan indicator
|
||||
-- 0000 unknown
|
||||
-- 0001 ISDN/Telephony Numbering Plan (Rec ITU-T E.164)
|
||||
-- 0010 spare
|
||||
-- 0011 data numbering plan (ITU-T Rec X.121)
|
||||
-- 0100 telex numbering plan (ITU-T Rec F.69)
|
||||
-- 0101 spare
|
||||
-- 0110 land mobile numbering plan (ITU-T Rec E.212)
|
||||
-- 0111 spare
|
||||
-- 1000 national numbering plan
|
||||
-- 1001 private numbering plan
|
||||
-- 1111 reserved for extension
|
||||
|
||||
-- all other values are reserved.
|
||||
|
||||
-- b) The following octets representing digits of an address
|
||||
-- encoded as a TBCD-STRING.
|
||||
|
||||
maxAddressLength INTEGER ::= 20
|
||||
|
||||
ISDN-AddressString ::=
|
||||
AddressString (SIZE (1..maxISDN-AddressLength))
|
||||
-- This type is used to represent ISDN numbers.
|
||||
|
||||
maxISDN-AddressLength INTEGER ::= 9
|
||||
|
||||
FTN-AddressString ::=
|
||||
AddressString (SIZE (1..maxFTN-AddressLength))
|
||||
-- This type is used to represent forwarded-to numbers.
|
||||
-- If NAI = international the first digits represent the country code (CC)
|
||||
-- and the network destination code (NDC) as for E.164.
|
||||
|
||||
maxFTN-AddressLength INTEGER ::= 15
|
||||
|
||||
ISDN-SubaddressString ::=
|
||||
OCTET STRING (SIZE (1..maxISDN-SubaddressLength))
|
||||
-- This type is used to represent ISDN subaddresses.
|
||||
-- It is composed of
|
||||
-- a) one octet for type of subaddress and odd/even indicator.
|
||||
-- b) 20 octets for subaddress information.
|
||||
|
||||
-- a) The first octet includes a one bit extension indicator, a
|
||||
-- 3 bits type of subaddress and a one bit odd/even indicator,
|
||||
-- encoded as follows:
|
||||
|
||||
-- bit 8: 1 (no extension)
|
||||
|
||||
-- bits 765: type of subaddress
|
||||
-- 000 NSAP (X.213/ISO 8348 AD2)
|
||||
-- 010 User Specified
|
||||
-- All other values are reserved
|
||||
|
||||
-- bit 4: odd/even indicator
|
||||
-- 0 even number of address signals
|
||||
-- 1 odd number of address signals
|
||||
-- The odd/even indicator is used when the type of subaddress
|
||||
-- is "user specified" and the coding is BCD.
|
||||
|
||||
-- bits 321: 000 (unused)
|
||||
|
||||
-- b) Subaddress information.
|
||||
-- The NSAP X.213/ISO8348AD2 address shall be formatted as specified
|
||||
-- by octet 4 which contains the Authority and Format Identifier
|
||||
-- (AFI). The encoding is made according to the "preferred binary
|
||||
-- encoding" as defined in X.213/ISO834AD2. For the definition
|
||||
-- of this type of subaddress, see ITU-T Rec I.334.
|
||||
|
||||
-- For User-specific subaddress, this field is encoded according
|
||||
-- to the user specification, subject to a maximum length of 20
|
||||
-- octets. When interworking with X.25 networks BCD coding should
|
||||
-- be applied.
|
||||
|
||||
maxISDN-SubaddressLength INTEGER ::= 21
|
||||
|
||||
ExternalSignalInfo ::= SEQUENCE {
|
||||
protocolId ProtocolId,
|
||||
signalInfo SignalInfo,
|
||||
-- Information about the internal structure is given in
|
||||
-- clause 7.6.9.
|
||||
extensionContainer ExtensionContainer OPTIONAL,
|
||||
-- extensionContainer must not be used in version 2
|
||||
...}
|
||||
|
||||
SignalInfo ::= OCTET STRING (SIZE (1..maxSignalInfoLength))
|
||||
|
||||
maxSignalInfoLength INTEGER ::= 200
|
||||
-- This NamedValue represents the theoretical maximum number of octets which is
|
||||
-- available to carry a single instance of the SignalInfo data type,
|
||||
-- without requiring segmentation to cope with the network layer service.
|
||||
-- However, the actual maximum size available for an instance of the data
|
||||
-- type may be lower, especially when other information elements
|
||||
-- have to be included in the same component.
|
||||
|
||||
ProtocolId ::= ENUMERATED {
|
||||
gsm-0408 (1),
|
||||
gsm-0806 (2),
|
||||
gsm-BSSMAP (3),
|
||||
-- Value 3 is reserved and must not be used
|
||||
ets-300102-1 (4)}
|
||||
|
||||
Ext-ExternalSignalInfo ::= SEQUENCE {
|
||||
ext-ProtocolId Ext-ProtocolId,
|
||||
signalInfo SignalInfo,
|
||||
-- Information about the internal structure is given in
|
||||
-- clause 7.6.9.10
|
||||
extensionContainer ExtensionContainer OPTIONAL,
|
||||
...}
|
||||
|
||||
Ext-ProtocolId ::= ENUMERATED {
|
||||
ets-300356 (1),
|
||||
...
|
||||
}
|
||||
-- exception handling:
|
||||
-- For Ext-ExternalSignalInfo sequences containing this parameter with any
|
||||
-- other value than the ones listed the receiver shall ignore the whole
|
||||
-- Ext-ExternalSignalInfo sequence.
|
||||
|
||||
AccessNetworkSignalInfo ::= SEQUENCE {
|
||||
accessNetworkProtocolId AccessNetworkProtocolId,
|
||||
signalInfo LongSignalInfo,
|
||||
-- Information about the internal structure is given in clause 7.6.9.1
|
||||
|
||||
extensionContainer ExtensionContainer OPTIONAL,
|
||||
...}
|
||||
|
||||
LongSignalInfo ::= OCTET STRING (SIZE (1..maxLongSignalInfoLength))
|
||||
|
||||
maxLongSignalInfoLength INTEGER ::= 2560
|
||||
-- This Named Value represents the maximum number of octets which is available
|
||||
-- to carry a single instance of the LongSignalInfo data type using
|
||||
-- White Book SCCP with the maximum number of segments.
|
||||
-- It takes account of the octets used by the lower layers of the protocol, and
|
||||
-- other information elements which may be included in the same component.
|
||||
|
||||
AccessNetworkProtocolId ::= ENUMERATED {
|
||||
ts3G-48006 (1),
|
||||
ts3G-25413 (2),
|
||||
...}
|
||||
-- exception handling:
|
||||
-- For AccessNetworkSignalInfo sequences containing this parameter with any
|
||||
-- other value than the ones listed the receiver shall ignore the whole
|
||||
-- AccessNetworkSignalInfo sequence.
|
||||
|
||||
AlertingPattern ::= OCTET STRING (SIZE (1) )
|
||||
-- This type is used to represent Alerting Pattern
|
||||
|
||||
-- bits 8765 : 0000 (unused)
|
||||
|
||||
-- bits 43 : type of Pattern
|
||||
-- 00 level
|
||||
-- 01 category
|
||||
-- 10 category
|
||||
-- all other values are reserved.
|
||||
|
||||
-- bits 21 : type of alerting
|
||||
|
||||
alertingLevel-0 AlertingPattern ::= '00000000'B
|
||||
alertingLevel-1 AlertingPattern ::= '00000001'B
|
||||
alertingLevel-2 AlertingPattern ::= '00000010'B
|
||||
-- all other values of Alerting level are reserved
|
||||
-- Alerting Levels are defined in GSM 02.07
|
||||
|
||||
alertingCategory-1 AlertingPattern ::= '00000100'B
|
||||
alertingCategory-2 AlertingPattern ::= '00000101'B
|
||||
alertingCategory-3 AlertingPattern ::= '00000110'B
|
||||
alertingCategory-4 AlertingPattern ::= '00000111'B
|
||||
alertingCategory-5 AlertingPattern ::= '00001000'B
|
||||
-- all other values of Alerting Category are reserved
|
||||
-- Alerting categories are defined in GSM 02.07
|
||||
|
||||
-- data types for numbering and identification
|
||||
|
||||
IMSI ::= TBCD-STRING (SIZE (3..8))
|
||||
-- digits of MCC, MNC, MSIN are concatenated in this order.
|
||||
|
||||
Identity ::= CHOICE {
|
||||
imsi IMSI,
|
||||
imsi-WithLMSI IMSI-WithLMSI}
|
||||
|
||||
IMSI-WithLMSI ::= SEQUENCE {
|
||||
imsi IMSI,
|
||||
lmsi LMSI,
|
||||
-- a special value 00000000 indicates that the LMSI is not in use
|
||||
...}
|
||||
|
||||
ASCI-CallReference ::= TBCD-STRING (SIZE (1..8))
|
||||
-- digits of VGCS/VBS-area,Group-ID are concatenated in this order if there is a
|
||||
-- VGCS/VBS-area.
|
||||
|
||||
TMSI ::= OCTET STRING (SIZE (1..4))
|
||||
|
||||
SubscriberId ::= CHOICE {
|
||||
imsi [0] IMSI,
|
||||
tmsi [1] TMSI}
|
||||
|
||||
IMEI ::= TBCD-STRING (SIZE (8))
|
||||
-- Refers to International Mobile Station Equipment Identity
|
||||
-- and Software Version Number (SVN) defined in TS 3GPP TS 23.003 [17].
|
||||
-- If the SVN is not present the last octet shall contain the
|
||||
-- digit 0 and a filler.
|
||||
-- If present the SVN shall be included in the last octet.
|
||||
|
||||
HLR-Id ::= IMSI
|
||||
-- leading digits of IMSI, i.e. (MCC, MNC, leading digits of
|
||||
-- MSIN) forming HLR Id defined in TS 3GPP TS 23.003 [17].
|
||||
|
||||
HLR-List ::= SEQUENCE SIZE (1..maxNumOfHLR-Id) OF
|
||||
HLR-Id
|
||||
|
||||
maxNumOfHLR-Id INTEGER ::= 50
|
||||
|
||||
LMSI ::= OCTET STRING (SIZE (4))
|
||||
|
||||
GlobalCellId ::= OCTET STRING (SIZE (5..7))
|
||||
-- Refers to Cell Global Identification defined in TS 3GPP TS 23.003 [17].
|
||||
-- The internal structure is defined as follows:
|
||||
-- octet 1 bits 4321 Mobile Country Code 1st digit
|
||||
-- bits 8765 Mobile Country Code 2nd digit
|
||||
-- octet 2 bits 4321 Mobile Country Code 3rd digit
|
||||
-- bits 8765 Mobile Network Code 3rd digit
|
||||
-- or filler (1111) for 2 digit MNCs
|
||||
-- octet 3 bits 4321 Mobile Network Code 1st digit
|
||||
-- bits 8765 Mobile Network Code 2nd digit
|
||||
-- octets 4 and 5 Location Area Code according to TS 3GPP TS 24.008 [35]
|
||||
-- octets 6 and 7 Cell Identity (CI) according to TS 3GPP TS 24.008 [35]
|
||||
|
||||
NetworkResource ::= ENUMERATED {
|
||||
plmn (0),
|
||||
hlr (1),
|
||||
vlr (2),
|
||||
pvlr (3),
|
||||
controllingMSC (4),
|
||||
vmsc (5),
|
||||
eir (6),
|
||||
rss (7)}
|
||||
|
||||
AdditionalNetworkResource ::= ENUMERATED {
|
||||
sgsn (0),
|
||||
ggsn (1),
|
||||
gmlc (2),
|
||||
gsmSCF (3),
|
||||
nplr (4),
|
||||
auc (5),
|
||||
... ,
|
||||
ue (6),
|
||||
mme (7)}
|
||||
-- if unknown value is received in AdditionalNetworkResource
|
||||
-- it shall be ignored.
|
||||
|
||||
|
||||
NAEA-PreferredCI ::= SEQUENCE {
|
||||
naea-PreferredCIC [0] NAEA-CIC,
|
||||
extensionContainer [1] ExtensionContainer OPTIONAL,
|
||||
...}
|
||||
|
||||
NAEA-CIC ::= OCTET STRING (SIZE (3))
|
||||
-- The internal structure is defined by the Carrier Identification
|
||||
-- parameter in ANSI T1.113.3. Carrier codes between "000" and "999" may
|
||||
-- be encoded as 3 digits using "000" to "999" or as 4 digits using
|
||||
-- "0000" to "0999". Carrier codes between "1000" and "9999" are encoded
|
||||
-- using 4 digits.
|
||||
|
||||
SubscriberIdentity ::= CHOICE {
|
||||
imsi [0] IMSI,
|
||||
msisdn [1] ISDN-AddressString
|
||||
}
|
||||
|
||||
LCSClientExternalID ::= SEQUENCE {
|
||||
externalAddress [0] ISDN-AddressString OPTIONAL,
|
||||
extensionContainer [1] ExtensionContainer OPTIONAL,
|
||||
... }
|
||||
|
||||
LCSClientInternalID ::= ENUMERATED {
|
||||
broadcastService (0),
|
||||
o-andM-HPLMN (1),
|
||||
o-andM-VPLMN (2),
|
||||
anonymousLocation (3),
|
||||
targetMSsubscribedService (4),
|
||||
... }
|
||||
-- for a CAMEL phase 3 PLMN operator client, the value targetMSsubscribedService shall be used
|
||||
|
||||
LCSServiceTypeID ::= INTEGER (0..127)
|
||||
-- the integer values 0-63 are reserved for Standard LCS service types
|
||||
-- the integer values 64-127 are reserved for Non Standard LCS service types
|
||||
|
||||
-- Standard LCS Service Types
|
||||
emergencyServices LCSServiceTypeID ::= 0
|
||||
emergencyAlertServices LCSServiceTypeID ::= 1
|
||||
personTracking LCSServiceTypeID ::= 2
|
||||
fleetManagement LCSServiceTypeID ::= 3
|
||||
assetManagement LCSServiceTypeID ::= 4
|
||||
trafficCongestionReporting LCSServiceTypeID ::= 5
|
||||
roadsideAssistance LCSServiceTypeID ::= 6
|
||||
routingToNearestCommercialEnterprise LCSServiceTypeID ::= 7
|
||||
navigation LCSServiceTypeID ::= 8
|
||||
--this service type is reserved for use in previous releases
|
||||
citySightseeing LCSServiceTypeID ::= 9
|
||||
localizedAdvertising LCSServiceTypeID ::= 10
|
||||
mobileYellowPages LCSServiceTypeID ::= 11
|
||||
trafficAndPublicTransportationInfo LCSServiceTypeID ::= 12
|
||||
weather LCSServiceTypeID ::= 13
|
||||
assetAndServiceFinding LCSServiceTypeID ::= 14
|
||||
gaming LCSServiceTypeID ::= 15
|
||||
findYourFriend LCSServiceTypeID ::= 16
|
||||
dating LCSServiceTypeID ::= 17
|
||||
chatting LCSServiceTypeID ::= 18
|
||||
routeFinding LCSServiceTypeID ::= 19
|
||||
whereAmI LCSServiceTypeID ::= 20
|
||||
|
||||
-- The values of LCSServiceTypeID are defined according to 3GPP TS 22.071.
|
||||
|
||||
-- Non Standard LCS Service Types
|
||||
serv64 LCSServiceTypeID ::= 64
|
||||
serv65 LCSServiceTypeID ::= 65
|
||||
serv66 LCSServiceTypeID ::= 66
|
||||
serv67 LCSServiceTypeID ::= 67
|
||||
serv68 LCSServiceTypeID ::= 68
|
||||
serv69 LCSServiceTypeID ::= 69
|
||||
serv70 LCSServiceTypeID ::= 70
|
||||
serv71 LCSServiceTypeID ::= 71
|
||||
serv72 LCSServiceTypeID ::= 72
|
||||
serv73 LCSServiceTypeID ::= 73
|
||||
serv74 LCSServiceTypeID ::= 74
|
||||
serv75 LCSServiceTypeID ::= 75
|
||||
serv76 LCSServiceTypeID ::= 76
|
||||
serv77 LCSServiceTypeID ::= 77
|
||||
serv78 LCSServiceTypeID ::= 78
|
||||
serv79 LCSServiceTypeID ::= 79
|
||||
serv80 LCSServiceTypeID ::= 80
|
||||
serv81 LCSServiceTypeID ::= 81
|
||||
serv82 LCSServiceTypeID ::= 82
|
||||
serv83 LCSServiceTypeID ::= 83
|
||||
serv84 LCSServiceTypeID ::= 84
|
||||
serv85 LCSServiceTypeID ::= 85
|
||||
serv86 LCSServiceTypeID ::= 86
|
||||
serv87 LCSServiceTypeID ::= 87
|
||||
serv88 LCSServiceTypeID ::= 88
|
||||
serv89 LCSServiceTypeID ::= 89
|
||||
serv90 LCSServiceTypeID ::= 90
|
||||
serv91 LCSServiceTypeID ::= 91
|
||||
serv92 LCSServiceTypeID ::= 92
|
||||
serv93 LCSServiceTypeID ::= 93
|
||||
serv94 LCSServiceTypeID ::= 94
|
||||
serv95 LCSServiceTypeID ::= 95
|
||||
serv96 LCSServiceTypeID ::= 96
|
||||
serv97 LCSServiceTypeID ::= 97
|
||||
serv98 LCSServiceTypeID ::= 98
|
||||
serv99 LCSServiceTypeID ::= 99
|
||||
serv100 LCSServiceTypeID ::= 100
|
||||
serv101 LCSServiceTypeID ::= 101
|
||||
serv102 LCSServiceTypeID ::= 102
|
||||
serv103 LCSServiceTypeID ::= 103
|
||||
serv104 LCSServiceTypeID ::= 104
|
||||
serv105 LCSServiceTypeID ::= 105
|
||||
serv106 LCSServiceTypeID ::= 106
|
||||
serv107 LCSServiceTypeID ::= 107
|
||||
serv108 LCSServiceTypeID ::= 108
|
||||
serv109 LCSServiceTypeID ::= 109
|
||||
serv110 LCSServiceTypeID ::= 110
|
||||
serv111 LCSServiceTypeID ::= 111
|
||||
serv112 LCSServiceTypeID ::= 112
|
||||
serv113 LCSServiceTypeID ::= 113
|
||||
serv114 LCSServiceTypeID ::= 114
|
||||
serv115 LCSServiceTypeID ::= 115
|
||||
serv116 LCSServiceTypeID ::= 116
|
||||
serv117 LCSServiceTypeID ::= 117
|
||||
serv118 LCSServiceTypeID ::= 118
|
||||
serv119 LCSServiceTypeID ::= 119
|
||||
serv120 LCSServiceTypeID ::= 120
|
||||
serv121 LCSServiceTypeID ::= 121
|
||||
serv122 LCSServiceTypeID ::= 122
|
||||
serv123 LCSServiceTypeID ::= 123
|
||||
serv124 LCSServiceTypeID ::= 124
|
||||
serv125 LCSServiceTypeID ::= 125
|
||||
serv126 LCSServiceTypeID ::= 126
|
||||
serv127 LCSServiceTypeID ::= 127
|
||||
|
||||
PLMN-Id ::= OCTET STRING (SIZE (3))
|
||||
-- The internal structure is defined as follows:
|
||||
-- octet 1 bits 4321 Mobile Country Code 1st digit
|
||||
-- bits 8765 Mobile Country Code 2nd digit
|
||||
-- octet 2 bits 4321 Mobile Country Code 3rd digit
|
||||
-- bits 8765 Mobile Network Code 3rd digit
|
||||
-- or filler (1111) for 2 digit MNCs
|
||||
-- octet 3 bits 4321 Mobile Network Code 1st digit
|
||||
-- bits 8765 Mobile Network Code 2nd digit
|
||||
|
||||
-- data types for CAMEL
|
||||
|
||||
CellGlobalIdOrServiceAreaIdOrLAI ::= CHOICE {
|
||||
cellGlobalIdOrServiceAreaIdFixedLength [0] CellGlobalIdOrServiceAreaIdFixedLength,
|
||||
laiFixedLength [1] LAIFixedLength}
|
||||
|
||||
CellGlobalIdOrServiceAreaIdFixedLength ::= OCTET STRING (SIZE (7))
|
||||
-- Refers to Cell Global Identification or Service Are Identification
|
||||
-- defined in 3GPP TS 23.003.
|
||||
-- The internal structure is defined as follows:
|
||||
-- octet 1 bits 4321 Mobile Country Code 1st digit
|
||||
-- bits 8765 Mobile Country Code 2nd digit
|
||||
-- octet 2 bits 4321 Mobile Country Code 3rd digit
|
||||
-- bits 8765 Mobile Network Code 3rd digit
|
||||
-- or filler (1111) for 2 digit MNCs
|
||||
-- octet 3 bits 4321 Mobile Network Code 1st digit
|
||||
-- bits 8765 Mobile Network Code 2nd digit
|
||||
-- octets 4 and 5 Location Area Code according to 3GPP TS 24.008
|
||||
-- octets 6 and 7 Cell Identity (CI) value or
|
||||
-- Service Area Code (SAC) value
|
||||
-- according to 3GPP TS 23.003
|
||||
|
||||
LAIFixedLength ::= OCTET STRING (SIZE (5))
|
||||
-- Refers to Location Area Identification defined in 3GPP TS 23.003 [17].
|
||||
-- The internal structure is defined as follows:
|
||||
-- octet 1 bits 4321 Mobile Country Code 1st digit
|
||||
-- bits 8765 Mobile Country Code 2nd digit
|
||||
-- octet 2 bits 4321 Mobile Country Code 3rd digit
|
||||
-- bits 8765 Mobile Network Code 3rd digit
|
||||
-- or filler (1111) for 2 digit MNCs
|
||||
-- octet 3 bits 4321 Mobile Network Code 1st digit
|
||||
-- bits 8765 Mobile Network Code 2nd digit
|
||||
-- octets 4 and 5 Location Area Code according to 3GPP TS 24.008 [35]
|
||||
|
||||
-- data types for subscriber management
|
||||
|
||||
BasicServiceCode ::= CHOICE {
|
||||
bearerService [2] BearerServiceCode,
|
||||
teleservice [3] TeleserviceCode}
|
||||
|
||||
Ext-BasicServiceCode ::= CHOICE {
|
||||
ext-BearerService [2] Ext-BearerServiceCode,
|
||||
ext-Teleservice [3] Ext-TeleserviceCode}
|
||||
|
||||
EMLPP-Info ::= SEQUENCE {
|
||||
maximumentitledPriority EMLPP-Priority,
|
||||
defaultPriority EMLPP-Priority,
|
||||
extensionContainer ExtensionContainer OPTIONAL,
|
||||
...}
|
||||
|
||||
EMLPP-Priority ::= INTEGER (0..15)
|
||||
-- The mapping from the values A,B,0,1,2,3,4 to the integer-value is
|
||||
-- specified as follows where A is the highest and 4 is the lowest
|
||||
-- priority level
|
||||
-- the integer values 7-15 are spare and shall be mapped to value 4
|
||||
|
||||
priorityLevelA EMLPP-Priority ::= 6
|
||||
priorityLevelB EMLPP-Priority ::= 5
|
||||
priorityLevel0 EMLPP-Priority ::= 0
|
||||
priorityLevel1 EMLPP-Priority ::= 1
|
||||
priorityLevel2 EMLPP-Priority ::= 2
|
||||
priorityLevel3 EMLPP-Priority ::= 3
|
||||
priorityLevel4 EMLPP-Priority ::= 4
|
||||
|
||||
MC-SS-Info ::= SEQUENCE {
|
||||
ss-Code [0] SS-Code,
|
||||
ss-Status [1] Ext-SS-Status,
|
||||
nbrSB [2] MaxMC-Bearers,
|
||||
nbrUser [3] MC-Bearers,
|
||||
extensionContainer [4] ExtensionContainer OPTIONAL,
|
||||
...}
|
||||
|
||||
MaxMC-Bearers ::= INTEGER (2..maxNumOfMC-Bearers)
|
||||
|
||||
MC-Bearers ::= INTEGER (1..maxNumOfMC-Bearers)
|
||||
|
||||
maxNumOfMC-Bearers INTEGER ::= 7
|
||||
|
||||
Ext-SS-Status ::= OCTET STRING (SIZE (1..5))
|
||||
|
||||
-- OCTET 1:
|
||||
--
|
||||
-- bits 8765: 0000 (unused)
|
||||
-- bits 4321: Used to convey the "P bit","R bit","A bit" and "Q bit",
|
||||
-- representing supplementary service state information
|
||||
-- as defined in TS 3GPP TS 23.011 [22]
|
||||
|
||||
-- bit 4: "Q bit"
|
||||
|
||||
-- bit 3: "P bit"
|
||||
|
||||
-- bit 2: "R bit"
|
||||
|
||||
-- bit 1: "A bit"
|
||||
|
||||
-- OCTETS 2-5: reserved for future use. They shall be discarded if
|
||||
-- received and not understood.
|
||||
|
||||
|
||||
-- data types for geographic location
|
||||
|
||||
AgeOfLocationInformation ::= INTEGER (0..32767)
|
||||
-- the value represents the elapsed time in minutes since the last
|
||||
-- network contact of the mobile station (i.e. the actuality of the
|
||||
-- location information).
|
||||
-- value "0" indicates that the MS is currently in contact with the
|
||||
-- network
|
||||
-- value "32767" indicates that the location information is at least
|
||||
-- 32767 minutes old
|
||||
|
||||
END
|
||||
|
|
@ -0,0 +1,415 @@
|
|||
-- $Id: MAP-ER-DataTypes.asn 28149 2009-04-25 17:45:34Z etxrab $
|
||||
-- 3GPP TS 29.002 V8.9.0 (2009-04)
|
||||
-- 17.7.7 Error data types
|
||||
|
||||
MAP-ER-DataTypes {
|
||||
itu-t identified-organization (4) etsi (0) mobileDomain (0)
|
||||
gsm-Network (1) modules (3) map-ER-DataTypes (17) version11 (11)}
|
||||
|
||||
DEFINITIONS
|
||||
|
||||
IMPLICIT TAGS
|
||||
|
||||
::=
|
||||
|
||||
BEGIN
|
||||
|
||||
EXPORTS
|
||||
RoamingNotAllowedParam,
|
||||
CallBarredParam,
|
||||
CUG-RejectParam,
|
||||
SS-IncompatibilityCause,
|
||||
PW-RegistrationFailureCause,
|
||||
SM-DeliveryFailureCause,
|
||||
SystemFailureParam,
|
||||
DataMissingParam,
|
||||
UnexpectedDataParam,
|
||||
FacilityNotSupParam,
|
||||
OR-NotAllowedParam,
|
||||
UnknownSubscriberParam,
|
||||
NumberChangedParam,
|
||||
UnidentifiedSubParam,
|
||||
IllegalSubscriberParam,
|
||||
IllegalEquipmentParam,
|
||||
BearerServNotProvParam,
|
||||
TeleservNotProvParam,
|
||||
TracingBufferFullParam,
|
||||
NoRoamingNbParam,
|
||||
AbsentSubscriberParam,
|
||||
BusySubscriberParam,
|
||||
NoSubscriberReplyParam,
|
||||
ForwardingViolationParam,
|
||||
ForwardingFailedParam,
|
||||
ATI-NotAllowedParam,
|
||||
SubBusyForMT-SMS-Param,
|
||||
MessageWaitListFullParam,
|
||||
AbsentSubscriberSM-Param,
|
||||
AbsentSubscriberDiagnosticSM,
|
||||
ResourceLimitationParam,
|
||||
NoGroupCallNbParam,
|
||||
IncompatibleTerminalParam,
|
||||
ShortTermDenialParam,
|
||||
LongTermDenialParam,
|
||||
UnauthorizedRequestingNetwork-Param,
|
||||
UnauthorizedLCSClient-Param,
|
||||
PositionMethodFailure-Param,
|
||||
UnknownOrUnreachableLCSClient-Param,
|
||||
MM-EventNotSupported-Param,
|
||||
ATSI-NotAllowedParam,
|
||||
ATM-NotAllowedParam,
|
||||
IllegalSS-OperationParam,
|
||||
SS-NotAvailableParam,
|
||||
SS-SubscriptionViolationParam,
|
||||
InformationNotAvailableParam,
|
||||
TargetCellOutsideGCA-Param,
|
||||
OngoingGroupCallParam
|
||||
|
||||
;
|
||||
|
||||
IMPORTS
|
||||
SS-Status
|
||||
FROM MAP-SS-DataTypes {
|
||||
itu-t identified-organization (4) etsi (0) mobileDomain (0)
|
||||
gsm-Network (1) modules (3) map-SS-DataTypes (14) version11 (11)}
|
||||
|
||||
SignalInfo,
|
||||
BasicServiceCode,
|
||||
NetworkResource,
|
||||
AdditionalNetworkResource
|
||||
FROM MAP-CommonDataTypes {
|
||||
itu-t identified-organization (4) etsi (0) mobileDomain (0)
|
||||
gsm-Network (1) modules (3) map-CommonDataTypes (18) version11 (11)}
|
||||
|
||||
|
||||
SS-Code
|
||||
FROM MAP-SS-Code {
|
||||
itu-t identified-organization (4) etsi (0) mobileDomain (0)
|
||||
gsm-Network (1) modules (3) map-SS-Code (15) version11 (11)}
|
||||
|
||||
ExtensionContainer
|
||||
FROM MAP-ExtensionDataTypes {
|
||||
itu-t identified-organization (4) etsi (0) mobileDomain (0)
|
||||
gsm-Network (1) modules (3) map-ExtensionDataTypes (21) version11 (11)}
|
||||
;
|
||||
|
||||
RoamingNotAllowedParam ::= SEQUENCE {
|
||||
roamingNotAllowedCause RoamingNotAllowedCause,
|
||||
extensionContainer ExtensionContainer OPTIONAL,
|
||||
...,
|
||||
additionalRoamingNotAllowedCause [0] AdditionalRoamingNotAllowedCause OPTIONAL }
|
||||
|
||||
-- if the additionalRoamingNotallowedCause is received by the MSC/VLR or SGSN then the
|
||||
-- roamingNotAllowedCause shall be discarded.
|
||||
|
||||
AdditionalRoamingNotAllowedCause ::= ENUMERATED {
|
||||
supportedRAT-TypesNotAllowed (0),
|
||||
...}
|
||||
|
||||
RoamingNotAllowedCause ::= ENUMERATED {
|
||||
plmnRoamingNotAllowed (0),
|
||||
operatorDeterminedBarring (3)}
|
||||
|
||||
CallBarredParam ::= CHOICE {
|
||||
callBarringCause CallBarringCause,
|
||||
-- call BarringCause must not be used in version 3 and higher
|
||||
extensibleCallBarredParam ExtensibleCallBarredParam
|
||||
-- extensibleCallBarredParam must not be used in version <3
|
||||
}
|
||||
|
||||
CallBarringCause ::= ENUMERATED {
|
||||
barringServiceActive (0),
|
||||
operatorBarring (1)}
|
||||
|
||||
ExtensibleCallBarredParam ::= SEQUENCE {
|
||||
callBarringCause CallBarringCause OPTIONAL,
|
||||
extensionContainer ExtensionContainer OPTIONAL,
|
||||
... ,
|
||||
unauthorisedMessageOriginator [1] NULL OPTIONAL }
|
||||
|
||||
CUG-RejectParam ::= SEQUENCE {
|
||||
cug-RejectCause CUG-RejectCause OPTIONAL,
|
||||
extensionContainer ExtensionContainer OPTIONAL,
|
||||
...}
|
||||
|
||||
CUG-RejectCause ::= ENUMERATED {
|
||||
incomingCallsBarredWithinCUG (0),
|
||||
subscriberNotMemberOfCUG (1),
|
||||
requestedBasicServiceViolatesCUG-Constraints (5),
|
||||
calledPartySS-InteractionViolation (7)}
|
||||
|
||||
SS-IncompatibilityCause ::= SEQUENCE {
|
||||
ss-Code [1] SS-Code OPTIONAL,
|
||||
basicService BasicServiceCode OPTIONAL,
|
||||
ss-Status [4] SS-Status OPTIONAL,
|
||||
...}
|
||||
|
||||
PW-RegistrationFailureCause ::= ENUMERATED {
|
||||
undetermined (0),
|
||||
invalidFormat (1),
|
||||
newPasswordsMismatch (2)}
|
||||
|
||||
SM-EnumeratedDeliveryFailureCause ::= ENUMERATED {
|
||||
memoryCapacityExceeded (0),
|
||||
equipmentProtocolError (1),
|
||||
equipmentNotSM-Equipped (2),
|
||||
unknownServiceCentre (3),
|
||||
sc-Congestion (4),
|
||||
invalidSME-Address (5),
|
||||
subscriberNotSC-Subscriber (6)}
|
||||
|
||||
SM-DeliveryFailureCause ::= SEQUENCE {
|
||||
sm-EnumeratedDeliveryFailureCause SM-EnumeratedDeliveryFailureCause,
|
||||
diagnosticInfo SignalInfo OPTIONAL,
|
||||
extensionContainer ExtensionContainer OPTIONAL,
|
||||
...}
|
||||
|
||||
AbsentSubscriberSM-Param ::= SEQUENCE {
|
||||
absentSubscriberDiagnosticSM AbsentSubscriberDiagnosticSM OPTIONAL,
|
||||
-- AbsentSubscriberDiagnosticSM can be either for non-GPRS
|
||||
-- or for GPRS
|
||||
extensionContainer ExtensionContainer OPTIONAL,
|
||||
...,
|
||||
additionalAbsentSubscriberDiagnosticSM [0] AbsentSubscriberDiagnosticSM OPTIONAL }
|
||||
-- if received, additionalAbsentSubscriberDiagnosticSM
|
||||
-- is for GPRS and absentSubscriberDiagnosticSM is
|
||||
-- for non-GPRS
|
||||
|
||||
AbsentSubscriberDiagnosticSM ::= INTEGER (0..255)
|
||||
-- AbsentSubscriberDiagnosticSM values are defined in 3GPP TS 23.040
|
||||
|
||||
SystemFailureParam ::= CHOICE {
|
||||
networkResource NetworkResource,
|
||||
-- networkResource must not be used in version 3
|
||||
extensibleSystemFailureParam ExtensibleSystemFailureParam
|
||||
-- extensibleSystemFailureParam must not be used in version <3
|
||||
}
|
||||
|
||||
ExtensibleSystemFailureParam ::= SEQUENCE {
|
||||
networkResource NetworkResource OPTIONAL,
|
||||
extensionContainer ExtensionContainer OPTIONAL,
|
||||
...,
|
||||
additionalNetworkResource [0] AdditionalNetworkResource OPTIONAL,
|
||||
failureCauseParam [1] FailureCauseParam OPTIONAL }
|
||||
|
||||
FailureCauseParam ::= ENUMERATED {
|
||||
limitReachedOnNumberOfConcurrentLocationRequests (0),
|
||||
... }
|
||||
-- if unknown value is received in FailureCauseParam it shall be ignored
|
||||
|
||||
|
||||
DataMissingParam ::= SEQUENCE {
|
||||
extensionContainer ExtensionContainer OPTIONAL,
|
||||
...}
|
||||
|
||||
UnexpectedDataParam ::= SEQUENCE {
|
||||
extensionContainer ExtensionContainer OPTIONAL,
|
||||
...}
|
||||
|
||||
FacilityNotSupParam ::= SEQUENCE {
|
||||
extensionContainer ExtensionContainer OPTIONAL,
|
||||
...,
|
||||
shapeOfLocationEstimateNotSupported [0] NULL OPTIONAL,
|
||||
neededLcsCapabilityNotSupportedInServingNode [1] NULL OPTIONAL }
|
||||
|
||||
OR-NotAllowedParam ::= SEQUENCE {
|
||||
extensionContainer ExtensionContainer OPTIONAL,
|
||||
...}
|
||||
|
||||
UnknownSubscriberParam ::= SEQUENCE {
|
||||
extensionContainer ExtensionContainer OPTIONAL,
|
||||
...,
|
||||
unknownSubscriberDiagnostic UnknownSubscriberDiagnostic OPTIONAL}
|
||||
|
||||
UnknownSubscriberDiagnostic ::= ENUMERATED {
|
||||
imsiUnknown (0),
|
||||
gprs-eps-SubscriptionUnknown (1),
|
||||
...,
|
||||
npdbMismatch (2)}
|
||||
-- if unknown values are received in
|
||||
-- UnknownSubscriberDiagnostic they shall be discarded
|
||||
|
||||
NumberChangedParam ::= SEQUENCE {
|
||||
extensionContainer ExtensionContainer OPTIONAL,
|
||||
...}
|
||||
|
||||
UnidentifiedSubParam ::= SEQUENCE {
|
||||
extensionContainer ExtensionContainer OPTIONAL,
|
||||
...}
|
||||
|
||||
IllegalSubscriberParam ::= SEQUENCE {
|
||||
extensionContainer ExtensionContainer OPTIONAL,
|
||||
...}
|
||||
|
||||
IllegalEquipmentParam ::= SEQUENCE {
|
||||
extensionContainer ExtensionContainer OPTIONAL,
|
||||
...}
|
||||
|
||||
BearerServNotProvParam ::= SEQUENCE {
|
||||
extensionContainer ExtensionContainer OPTIONAL,
|
||||
...}
|
||||
|
||||
TeleservNotProvParam ::= SEQUENCE {
|
||||
extensionContainer ExtensionContainer OPTIONAL,
|
||||
...}
|
||||
|
||||
TracingBufferFullParam ::= SEQUENCE {
|
||||
extensionContainer ExtensionContainer OPTIONAL,
|
||||
...}
|
||||
|
||||
NoRoamingNbParam ::= SEQUENCE {
|
||||
extensionContainer ExtensionContainer OPTIONAL,
|
||||
...}
|
||||
|
||||
AbsentSubscriberParam ::= SEQUENCE {
|
||||
extensionContainer ExtensionContainer OPTIONAL,
|
||||
...,
|
||||
absentSubscriberReason [0] AbsentSubscriberReason OPTIONAL}
|
||||
|
||||
AbsentSubscriberReason ::= ENUMERATED {
|
||||
imsiDetach (0),
|
||||
restrictedArea (1),
|
||||
noPageResponse (2),
|
||||
... ,
|
||||
purgedMS (3)}
|
||||
-- exception handling: at reception of other values than the ones listed the
|
||||
-- AbsentSubscriberReason shall be ignored.
|
||||
-- The AbsentSubscriberReason: purgedMS is defined for the Super-Charger feature
|
||||
-- (see TS 23.116). If this value is received in a Provide Roaming Number response
|
||||
-- it shall be mapped to the AbsentSubscriberReason: imsiDetach in the Send Routeing
|
||||
-- Information response
|
||||
|
||||
BusySubscriberParam ::= SEQUENCE {
|
||||
extensionContainer ExtensionContainer OPTIONAL,
|
||||
...,
|
||||
ccbs-Possible [0] NULL OPTIONAL,
|
||||
ccbs-Busy [1] NULL OPTIONAL}
|
||||
|
||||
NoSubscriberReplyParam ::= SEQUENCE {
|
||||
extensionContainer ExtensionContainer OPTIONAL,
|
||||
...}
|
||||
|
||||
ForwardingViolationParam ::= SEQUENCE {
|
||||
extensionContainer ExtensionContainer OPTIONAL,
|
||||
...}
|
||||
|
||||
ForwardingFailedParam ::= SEQUENCE {
|
||||
extensionContainer ExtensionContainer OPTIONAL,
|
||||
...}
|
||||
|
||||
ATI-NotAllowedParam ::= SEQUENCE {
|
||||
extensionContainer ExtensionContainer OPTIONAL,
|
||||
...}
|
||||
|
||||
ATSI-NotAllowedParam ::= SEQUENCE {
|
||||
extensionContainer ExtensionContainer OPTIONAL,
|
||||
...}
|
||||
|
||||
ATM-NotAllowedParam ::= SEQUENCE {
|
||||
extensionContainer ExtensionContainer OPTIONAL,
|
||||
...}
|
||||
|
||||
IllegalSS-OperationParam ::= SEQUENCE {
|
||||
extensionContainer ExtensionContainer OPTIONAL,
|
||||
...}
|
||||
|
||||
SS-NotAvailableParam ::= SEQUENCE {
|
||||
extensionContainer ExtensionContainer OPTIONAL,
|
||||
...}
|
||||
|
||||
SS-SubscriptionViolationParam ::= SEQUENCE {
|
||||
extensionContainer ExtensionContainer OPTIONAL,
|
||||
...}
|
||||
|
||||
InformationNotAvailableParam ::= SEQUENCE {
|
||||
extensionContainer ExtensionContainer OPTIONAL,
|
||||
...}
|
||||
|
||||
SubBusyForMT-SMS-Param ::= SEQUENCE {
|
||||
extensionContainer ExtensionContainer OPTIONAL,
|
||||
... ,
|
||||
gprsConnectionSuspended NULL OPTIONAL }
|
||||
-- If GprsConnectionSuspended is not understood it shall
|
||||
-- be discarded
|
||||
|
||||
MessageWaitListFullParam ::= SEQUENCE {
|
||||
extensionContainer ExtensionContainer OPTIONAL,
|
||||
...}
|
||||
|
||||
ResourceLimitationParam ::= SEQUENCE {
|
||||
extensionContainer ExtensionContainer OPTIONAL,
|
||||
...}
|
||||
|
||||
NoGroupCallNbParam ::= SEQUENCE {
|
||||
extensionContainer ExtensionContainer OPTIONAL,
|
||||
...}
|
||||
|
||||
IncompatibleTerminalParam ::= SEQUENCE {
|
||||
extensionContainer ExtensionContainer OPTIONAL,
|
||||
...}
|
||||
|
||||
ShortTermDenialParam ::= SEQUENCE {
|
||||
...}
|
||||
|
||||
LongTermDenialParam ::= SEQUENCE {
|
||||
...}
|
||||
|
||||
UnauthorizedRequestingNetwork-Param ::= SEQUENCE {
|
||||
extensionContainer ExtensionContainer OPTIONAL,
|
||||
...}
|
||||
|
||||
UnauthorizedLCSClient-Param ::= SEQUENCE {
|
||||
unauthorizedLCSClient-Diagnostic [0] UnauthorizedLCSClient-Diagnostic OPTIONAL,
|
||||
extensionContainer [1] ExtensionContainer OPTIONAL,
|
||||
... }
|
||||
|
||||
UnauthorizedLCSClient-Diagnostic ::= ENUMERATED {
|
||||
noAdditionalInformation (0),
|
||||
clientNotInMSPrivacyExceptionList (1),
|
||||
callToClientNotSetup (2),
|
||||
privacyOverrideNotApplicable (3),
|
||||
disallowedByLocalRegulatoryRequirements (4),
|
||||
...,
|
||||
unauthorizedPrivacyClass (5),
|
||||
unauthorizedCallSessionUnrelatedExternalClient (6),
|
||||
unauthorizedCallSessionRelatedExternalClient (7) }
|
||||
-- exception handling:
|
||||
-- any unrecognized value shall be ignored
|
||||
|
||||
PositionMethodFailure-Param ::= SEQUENCE {
|
||||
positionMethodFailure-Diagnostic [0] PositionMethodFailure-Diagnostic OPTIONAL,
|
||||
extensionContainer [1] ExtensionContainer OPTIONAL,
|
||||
... }
|
||||
|
||||
PositionMethodFailure-Diagnostic ::= ENUMERATED {
|
||||
congestion (0),
|
||||
insufficientResources (1),
|
||||
insufficientMeasurementData (2),
|
||||
inconsistentMeasurementData (3),
|
||||
locationProcedureNotCompleted (4),
|
||||
locationProcedureNotSupportedByTargetMS (5),
|
||||
qoSNotAttainable (6),
|
||||
positionMethodNotAvailableInNetwork (7),
|
||||
positionMethodNotAvailableInLocationArea (8),
|
||||
... }
|
||||
-- exception handling:
|
||||
-- any unrecognized value shall be ignored
|
||||
|
||||
UnknownOrUnreachableLCSClient-Param ::= SEQUENCE {
|
||||
extensionContainer ExtensionContainer OPTIONAL,
|
||||
...}
|
||||
|
||||
MM-EventNotSupported-Param ::= SEQUENCE {
|
||||
extensionContainer ExtensionContainer OPTIONAL,
|
||||
...}
|
||||
|
||||
TargetCellOutsideGCA-Param ::= SEQUENCE {
|
||||
extensionContainer ExtensionContainer OPTIONAL,
|
||||
...}
|
||||
|
||||
OngoingGroupCallParam ::= SEQUENCE {
|
||||
extensionContainer ExtensionContainer OPTIONAL,
|
||||
...}
|
||||
|
||||
|
||||
END
|
||||
|
|
@ -0,0 +1,74 @@
|
|||
-- $Id: MAP-ExtensionDataTypes.asn 28149 2009-04-25 17:45:34Z etxrab $
|
||||
-- MAP-ExtensionDataTypes.asn
|
||||
--
|
||||
-- Taken from 3GPP TS 29.002 V8.9.0 (2009-04)
|
||||
--
|
||||
-- 17.7.11 Extension data types
|
||||
--
|
||||
|
||||
MAP-ExtensionDataTypes {
|
||||
itu-t identified-organization (4) etsi (0) mobileDomain (0)
|
||||
gsm-Network (1) modules (3) map-ExtensionDataTypes (21) version11 (11)}
|
||||
|
||||
DEFINITIONS
|
||||
|
||||
IMPLICIT TAGS
|
||||
|
||||
::=
|
||||
|
||||
BEGIN
|
||||
|
||||
EXPORTS
|
||||
|
||||
PrivateExtension,
|
||||
ExtensionContainer,
|
||||
SLR-ArgExtensionContainer;
|
||||
|
||||
|
||||
-- IOC for private MAP extensions
|
||||
|
||||
|
||||
MAP-EXTENSION ::= CLASS {
|
||||
&ExtensionType OPTIONAL,
|
||||
&extensionId OBJECT IDENTIFIER }
|
||||
-- The length of the Object Identifier shall not exceed 16 octets and the
|
||||
-- number of components of the Object Identifier shall not exceed 16
|
||||
|
||||
-- data types
|
||||
|
||||
ExtensionContainer ::= SEQUENCE {
|
||||
privateExtensionList [0]PrivateExtensionList OPTIONAL,
|
||||
pcs-Extensions [1]PCS-Extensions OPTIONAL,
|
||||
...}
|
||||
|
||||
SLR-ArgExtensionContainer ::= SEQUENCE {
|
||||
privateExtensionList [0]PrivateExtensionList OPTIONAL,
|
||||
slr-Arg-PCS-Extensions [1]SLR-Arg-PCS-Extensions OPTIONAL,
|
||||
...}
|
||||
|
||||
PrivateExtensionList ::= SEQUENCE SIZE (1..maxNumOfPrivateExtensions) OF
|
||||
PrivateExtension
|
||||
|
||||
PrivateExtension ::= SEQUENCE {
|
||||
extId MAP-EXTENSION.&extensionId
|
||||
({ExtensionSet}),
|
||||
extType MAP-EXTENSION.&ExtensionType
|
||||
({ExtensionSet}{@extId}) OPTIONAL}
|
||||
|
||||
maxNumOfPrivateExtensions INTEGER ::= 10
|
||||
|
||||
ExtensionSet MAP-EXTENSION ::=
|
||||
{...
|
||||
-- ExtensionSet is the set of all defined private extensions
|
||||
}
|
||||
-- Unsupported private extensions shall be discarded if received.
|
||||
|
||||
PCS-Extensions ::= SEQUENCE {
|
||||
...}
|
||||
|
||||
SLR-Arg-PCS-Extensions ::= SEQUENCE {
|
||||
...,
|
||||
na-ESRK-Request [0] NULL OPTIONAL }
|
||||
|
||||
END
|
||||
|
|
@ -0,0 +1,657 @@
|
|||
-- $Id: MAP-LCS-DataTypes.asn 28149 2009-04-25 17:45:34Z etxrab $
|
||||
-- MAP-LCS-DataTypes.asn
|
||||
--
|
||||
-- Taken from 3GPP TS 29.002 V8.9.0 (2009-04)
|
||||
--
|
||||
-- 17.7.13 Location service data types
|
||||
--
|
||||
|
||||
MAP-LCS-DataTypes {
|
||||
itu-t identified-organization (4) etsi (0) mobileDomain (0)
|
||||
gsm-Network (1) modules (3) map-LCS-DataTypes (25) version11 (11)}
|
||||
|
||||
DEFINITIONS
|
||||
IMPLICIT TAGS
|
||||
::=
|
||||
BEGIN
|
||||
|
||||
EXPORTS
|
||||
RoutingInfoForLCS-Arg,
|
||||
RoutingInfoForLCS-Res,
|
||||
ProvideSubscriberLocation-Arg,
|
||||
ProvideSubscriberLocation-Res,
|
||||
SubscriberLocationReport-Arg,
|
||||
SubscriberLocationReport-Res,
|
||||
LocationType,
|
||||
DeferredLocationEventType,
|
||||
LCSClientName,
|
||||
LCS-QoS,
|
||||
Horizontal-Accuracy,
|
||||
ResponseTime,
|
||||
Ext-GeographicalInformation,
|
||||
VelocityEstimate,
|
||||
SupportedGADShapes,
|
||||
Add-GeographicalInformation,
|
||||
LCSRequestorID,
|
||||
LCS-ReferenceNumber,
|
||||
LCSCodeword,
|
||||
AreaEventInfo,
|
||||
ReportingPLMNList,
|
||||
PeriodicLDRInfo,
|
||||
SequenceNumber
|
||||
;
|
||||
|
||||
IMPORTS
|
||||
AddressString,
|
||||
ISDN-AddressString,
|
||||
IMEI,
|
||||
IMSI,
|
||||
LMSI,
|
||||
SubscriberIdentity,
|
||||
AgeOfLocationInformation,
|
||||
LCSClientExternalID,
|
||||
LCSClientInternalID,
|
||||
LCSServiceTypeID,
|
||||
CellGlobalIdOrServiceAreaIdOrLAI,
|
||||
PLMN-Id
|
||||
FROM MAP-CommonDataTypes {
|
||||
itu-t identified-organization (4) etsi (0) mobileDomain (0)
|
||||
gsm-Network (1) modules (3) map-CommonDataTypes (18) version11 (11)}
|
||||
|
||||
ExtensionContainer,
|
||||
SLR-ArgExtensionContainer
|
||||
FROM MAP-ExtensionDataTypes {
|
||||
itu-t identified-organization (4) etsi (0) mobileDomain (0)
|
||||
gsm-Network (1) modules (3) map-ExtensionDataTypes (21) version11 (11)}
|
||||
|
||||
USSD-DataCodingScheme,
|
||||
USSD-String
|
||||
FROM MAP-SS-DataTypes {
|
||||
itu-t identified-organization (4) etsi (0) mobileDomain (0) gsm-Network (1) modules (3)
|
||||
map-SS-DataTypes (14) version11 (11)}
|
||||
|
||||
APN,
|
||||
GSN-Address,
|
||||
SupportedLCS-CapabilitySets
|
||||
FROM MAP-MS-DataTypes {
|
||||
itu-t identified-organization (4) etsi (0) mobileDomain (0)
|
||||
gsm-Network (1) modules (3) map-MS-DataTypes (11) version11 (11)}
|
||||
|
||||
Additional-Number
|
||||
FROM MAP-SM-DataTypes {
|
||||
itu-t identified-organization (4) etsi (0) mobileDomain (0)
|
||||
gsm-Network (1) modules (3) map-SM-DataTypes (16) version11 (11)}
|
||||
;
|
||||
|
||||
|
||||
RoutingInfoForLCS-Arg ::= SEQUENCE {
|
||||
mlcNumber [0] ISDN-AddressString,
|
||||
targetMS [1] SubscriberIdentity,
|
||||
extensionContainer [2] ExtensionContainer OPTIONAL,
|
||||
...}
|
||||
|
||||
RoutingInfoForLCS-Res ::= SEQUENCE {
|
||||
targetMS [0] SubscriberIdentity,
|
||||
lcsLocationInfo [1] LCSLocationInfo,
|
||||
extensionContainer [2] ExtensionContainer OPTIONAL,
|
||||
...,
|
||||
v-gmlc-Address [3] GSN-Address OPTIONAL,
|
||||
h-gmlc-Address [4] GSN-Address OPTIONAL,
|
||||
ppr-Address [5] GSN-Address OPTIONAL,
|
||||
additional-v-gmlc-Address [6] GSN-Address OPTIONAL }
|
||||
|
||||
LCSLocationInfo ::= SEQUENCE {
|
||||
networkNode-Number ISDN-AddressString,
|
||||
-- NetworkNode-number can be either msc-number or sgsn-number
|
||||
lmsi [0] LMSI OPTIONAL,
|
||||
extensionContainer [1] ExtensionContainer OPTIONAL,
|
||||
... ,
|
||||
gprsNodeIndicator [2] NULL OPTIONAL,
|
||||
-- gprsNodeIndicator is set only if the SGSN number is sent as the Network Node Number
|
||||
additional-Number [3] Additional-Number OPTIONAL,
|
||||
supportedLCS-CapabilitySets [4] SupportedLCS-CapabilitySets OPTIONAL,
|
||||
additional-LCS-CapabilitySets [5] SupportedLCS-CapabilitySets OPTIONAL
|
||||
}
|
||||
|
||||
ProvideSubscriberLocation-Arg ::= SEQUENCE {
|
||||
locationType LocationType,
|
||||
mlc-Number ISDN-AddressString,
|
||||
lcs-ClientID [0] LCS-ClientID OPTIONAL,
|
||||
privacyOverride [1] NULL OPTIONAL,
|
||||
imsi [2] IMSI OPTIONAL,
|
||||
msisdn [3] ISDN-AddressString OPTIONAL,
|
||||
lmsi [4] LMSI OPTIONAL,
|
||||
imei [5] IMEI OPTIONAL,
|
||||
lcs-Priority [6] LCS-Priority OPTIONAL,
|
||||
lcs-QoS [7] LCS-QoS OPTIONAL,
|
||||
extensionContainer [8] ExtensionContainer OPTIONAL,
|
||||
... ,
|
||||
supportedGADShapes [9] SupportedGADShapes OPTIONAL,
|
||||
lcs-ReferenceNumber [10] LCS-ReferenceNumber OPTIONAL,
|
||||
lcsServiceTypeID [11] LCSServiceTypeID OPTIONAL,
|
||||
lcsCodeword [12] LCSCodeword OPTIONAL,
|
||||
lcs-PrivacyCheck [13] LCS-PrivacyCheck OPTIONAL,
|
||||
areaEventInfo [14] AreaEventInfo OPTIONAL,
|
||||
h-gmlc-Address [15] GSN-Address OPTIONAL,
|
||||
mo-lrShortCircuitIndicator [16] NULL OPTIONAL,
|
||||
periodicLDRInfo [17] PeriodicLDRInfo OPTIONAL,
|
||||
reportingPLMNList [18] ReportingPLMNList OPTIONAL }
|
||||
|
||||
-- one of imsi or msisdn is mandatory
|
||||
-- If a location estimate type indicates activate deferred location or cancel deferred
|
||||
-- location, a lcs-Reference number shall be included.
|
||||
|
||||
LocationType ::= SEQUENCE {
|
||||
locationEstimateType [0] LocationEstimateType,
|
||||
...,
|
||||
deferredLocationEventType [1] DeferredLocationEventType OPTIONAL }
|
||||
|
||||
LocationEstimateType ::= ENUMERATED {
|
||||
currentLocation (0),
|
||||
currentOrLastKnownLocation (1),
|
||||
initialLocation (2),
|
||||
...,
|
||||
activateDeferredLocation (3),
|
||||
cancelDeferredLocation (4) ,
|
||||
notificationVerificationOnly (5) }
|
||||
-- exception handling:
|
||||
-- a ProvideSubscriberLocation-Arg containing an unrecognized LocationEstimateType
|
||||
-- shall be rejected by the receiver with a return error cause of unexpected data value
|
||||
|
||||
DeferredLocationEventType ::= BIT STRING {
|
||||
msAvailable (0) ,
|
||||
enteringIntoArea (1),
|
||||
leavingFromArea (2),
|
||||
beingInsideArea (3) ,
|
||||
periodicLDR (4) } (SIZE (1..16))
|
||||
-- beingInsideArea is always treated as oneTimeEvent regardless of the possible value
|
||||
-- of occurrenceInfo inside areaEventInfo.
|
||||
-- exception handling:
|
||||
-- a ProvideSubscriberLocation-Arg containing other values than listed above in
|
||||
-- DeferredLocationEventType shall be rejected by the receiver with a return error cause of
|
||||
-- unexpected data value.
|
||||
|
||||
LCS-ClientID ::= SEQUENCE {
|
||||
lcsClientType [0] LCSClientType,
|
||||
lcsClientExternalID [1] LCSClientExternalID OPTIONAL,
|
||||
lcsClientDialedByMS [2] AddressString OPTIONAL,
|
||||
lcsClientInternalID [3] LCSClientInternalID OPTIONAL,
|
||||
lcsClientName [4] LCSClientName OPTIONAL,
|
||||
...,
|
||||
lcsAPN [5] APN OPTIONAL,
|
||||
lcsRequestorID [6] LCSRequestorID OPTIONAL }
|
||||
|
||||
LCSClientType ::= ENUMERATED {
|
||||
emergencyServices (0),
|
||||
valueAddedServices (1),
|
||||
plmnOperatorServices (2),
|
||||
lawfulInterceptServices (3),
|
||||
... }
|
||||
-- exception handling:
|
||||
-- unrecognized values may be ignored if the LCS client uses the privacy override
|
||||
-- otherwise, an unrecognized value shall be treated as unexpected data by a receiver
|
||||
-- a return error shall then be returned if received in a MAP invoke
|
||||
|
||||
LCSClientName ::= SEQUENCE {
|
||||
dataCodingScheme [0] USSD-DataCodingScheme,
|
||||
nameString [2] NameString,
|
||||
...,
|
||||
lcs-FormatIndicator [3] LCS-FormatIndicator OPTIONAL }
|
||||
|
||||
-- The USSD-DataCodingScheme shall indicate use of the default alphabet through the
|
||||
-- following encoding
|
||||
-- bit 7 6 5 4 3 2 1 0
|
||||
-- 0 0 0 0 1 1 1 1
|
||||
|
||||
NameString ::= USSD-String (SIZE (1..maxNameStringLength))
|
||||
|
||||
maxNameStringLength INTEGER ::= 63
|
||||
|
||||
LCSRequestorID ::= SEQUENCE {
|
||||
dataCodingScheme [0] USSD-DataCodingScheme,
|
||||
requestorIDString [1] RequestorIDString,
|
||||
...,
|
||||
lcs-FormatIndicator [2] LCS-FormatIndicator OPTIONAL }
|
||||
|
||||
RequestorIDString ::= USSD-String (SIZE (1..maxRequestorIDStringLength))
|
||||
|
||||
maxRequestorIDStringLength INTEGER ::= 63
|
||||
|
||||
LCS-FormatIndicator ::= ENUMERATED {
|
||||
logicalName (0),
|
||||
e-mailAddress (1),
|
||||
msisdn (2),
|
||||
url (3),
|
||||
sipUrl (4),
|
||||
... }
|
||||
|
||||
LCS-Priority ::= OCTET STRING (SIZE (1))
|
||||
-- 0 = highest priority
|
||||
-- 1 = normal priority
|
||||
-- all other values treated as 1
|
||||
|
||||
LCS-QoS ::= SEQUENCE {
|
||||
horizontal-accuracy [0] Horizontal-Accuracy OPTIONAL,
|
||||
verticalCoordinateRequest [1] NULL OPTIONAL,
|
||||
vertical-accuracy [2] Vertical-Accuracy OPTIONAL, responseTime [3] ResponseTime OPTIONAL,
|
||||
extensionContainer [4] ExtensionContainer OPTIONAL,
|
||||
...,
|
||||
velocityRequest [5] NULL OPTIONAL
|
||||
}
|
||||
|
||||
Horizontal-Accuracy ::= OCTET STRING (SIZE (1))
|
||||
-- bit 8 = 0
|
||||
-- bits 7-1 = 7 bit Uncertainty Code defined in 3GPP TS 23.032. The horizontal location
|
||||
-- error should be less than the error indicated by the uncertainty code with 67%
|
||||
-- confidence.
|
||||
|
||||
Vertical-Accuracy ::= OCTET STRING (SIZE (1))
|
||||
-- bit 8 = 0
|
||||
-- bits 7-1 = 7 bit Vertical Uncertainty Code defined in 3GPP TS 23.032.
|
||||
-- The vertical location error should be less than the error indicated
|
||||
-- by the uncertainty code with 67% confidence.
|
||||
|
||||
ResponseTime ::= SEQUENCE {
|
||||
responseTimeCategory ResponseTimeCategory,
|
||||
...}
|
||||
-- note: an expandable SEQUENCE simplifies later addition of a numeric response time.
|
||||
|
||||
ResponseTimeCategory ::= ENUMERATED {
|
||||
lowdelay (0),
|
||||
delaytolerant (1),
|
||||
... }
|
||||
-- exception handling:
|
||||
-- an unrecognized value shall be treated the same as value 1 (delaytolerant)
|
||||
|
||||
SupportedGADShapes ::= BIT STRING {
|
||||
ellipsoidPoint (0),
|
||||
ellipsoidPointWithUncertaintyCircle (1),
|
||||
ellipsoidPointWithUncertaintyEllipse (2),
|
||||
polygon (3),
|
||||
ellipsoidPointWithAltitude (4),
|
||||
ellipsoidPointWithAltitudeAndUncertaintyElipsoid (5),
|
||||
ellipsoidArc (6) } (SIZE (7..16))
|
||||
-- A node shall mark in the BIT STRING all Shapes defined in 3GPP TS 23.032 it supports.
|
||||
-- exception handling: bits 7 to 15 shall be ignored if received.
|
||||
|
||||
LCS-ReferenceNumber::= OCTET STRING (SIZE(1))
|
||||
|
||||
LCSCodeword ::= SEQUENCE {
|
||||
dataCodingScheme [0] USSD-DataCodingScheme,
|
||||
lcsCodewordString [1] LCSCodewordString,
|
||||
...}
|
||||
|
||||
LCSCodewordString ::= USSD-String (SIZE (1..maxLCSCodewordStringLength))
|
||||
|
||||
maxLCSCodewordStringLength INTEGER ::= 20
|
||||
|
||||
LCS-PrivacyCheck ::= SEQUENCE {
|
||||
callSessionUnrelated [0] PrivacyCheckRelatedAction,
|
||||
callSessionRelated [1] PrivacyCheckRelatedAction OPTIONAL,
|
||||
...}
|
||||
|
||||
PrivacyCheckRelatedAction ::= ENUMERATED {
|
||||
allowedWithoutNotification (0),
|
||||
allowedWithNotification (1),
|
||||
allowedIfNoResponse (2),
|
||||
restrictedIfNoResponse (3),
|
||||
notAllowed (4),
|
||||
...}
|
||||
-- exception handling:
|
||||
-- a ProvideSubscriberLocation-Arg containing an unrecognized PrivacyCheckRelatedAction
|
||||
-- shall be rejected by the receiver with a return error cause of unexpected data value
|
||||
|
||||
AreaEventInfo ::= SEQUENCE {
|
||||
areaDefinition [0] AreaDefinition,
|
||||
occurrenceInfo [1] OccurrenceInfo OPTIONAL,
|
||||
intervalTime [2] IntervalTime OPTIONAL,
|
||||
...}
|
||||
|
||||
AreaDefinition ::= SEQUENCE {
|
||||
areaList [0] AreaList,
|
||||
...}
|
||||
|
||||
AreaList ::= SEQUENCE SIZE (1..maxNumOfAreas) OF Area
|
||||
|
||||
maxNumOfAreas INTEGER ::= 10
|
||||
|
||||
Area ::= SEQUENCE {
|
||||
areaType [0] AreaType,
|
||||
areaIdentification [1] AreaIdentification,
|
||||
...}
|
||||
|
||||
AreaType ::= ENUMERATED {
|
||||
countryCode (0),
|
||||
plmnId (1),
|
||||
locationAreaId (2),
|
||||
routingAreaId (3),
|
||||
cellGlobalId (4),
|
||||
...,
|
||||
utranCellId (5) }
|
||||
|
||||
AreaIdentification ::= OCTET STRING (SIZE (2..7))
|
||||
-- The internal structure is defined as follows:
|
||||
-- octet 1 bits 4321 Mobile Country Code 1st digit
|
||||
-- bits 8765 Mobile Country Code 2nd digit
|
||||
-- octet 2 bits 4321 Mobile Country Code 3rd digit
|
||||
-- bits 8765 Mobile Network Code 3rd digit if 3 digit MNC included
|
||||
-- or filler (1111)
|
||||
-- octet 3 bits 4321 Mobile Network Code 1st digit
|
||||
-- bits 8765 Mobile Network Code 2nd digit
|
||||
-- octets 4 and 5 Location Area Code (LAC) for Local Area Id,
|
||||
-- Routing Area Id and Cell Global Id
|
||||
-- octet 6 Routing Area Code (RAC) for Routing Area Id
|
||||
-- octets 6 and 7 Cell Identity (CI) for Cell Global Id
|
||||
-- octets 4 until 7 Utran Cell Identity (UC-Id) for Utran Cell Id
|
||||
|
||||
OccurrenceInfo ::= ENUMERATED {
|
||||
oneTimeEvent (0),
|
||||
multipleTimeEvent (1),
|
||||
...}
|
||||
|
||||
IntervalTime ::= INTEGER (1..32767)
|
||||
-- minimum interval time between area reports in seconds
|
||||
|
||||
PeriodicLDRInfo ::= SEQUENCE {
|
||||
reportingAmount ReportingAmount,
|
||||
reportingInterval ReportingInterval,
|
||||
...}
|
||||
-- reportingInterval x reportingAmount shall not exceed 8639999 (99 days, 23 hours,
|
||||
-- 59 minutes and 59 seconds) for compatibility with OMA MLP and RLP
|
||||
|
||||
ReportingAmount ::= INTEGER (1..maxReportingAmount)
|
||||
|
||||
maxReportingAmount INTEGER ::= 8639999
|
||||
|
||||
ReportingInterval ::= INTEGER (1..maxReportingInterval)
|
||||
-- ReportingInterval is in seconds
|
||||
|
||||
maxReportingInterval INTEGER ::= 8639999
|
||||
|
||||
ReportingPLMNList::= SEQUENCE {
|
||||
plmn-ListPrioritized [0] NULL OPTIONAL,
|
||||
plmn-List [1] PLMNList,
|
||||
...}
|
||||
|
||||
PLMNList::= SEQUENCE SIZE (1..maxNumOfReportingPLMN) OF
|
||||
ReportingPLMN
|
||||
|
||||
maxNumOfReportingPLMN INTEGER ::= 20
|
||||
|
||||
ReportingPLMN::= SEQUENCE {
|
||||
plmn-Id [0] PLMN-Id,
|
||||
ran-Technology [1] RAN-Technology OPTIONAL,
|
||||
ran-PeriodicLocationSupport [2] NULL OPTIONAL,
|
||||
...}
|
||||
|
||||
RAN-Technology ::= ENUMERATED {
|
||||
gsm (0),
|
||||
umts (1),
|
||||
...}
|
||||
|
||||
ProvideSubscriberLocation-Res ::= SEQUENCE {
|
||||
locationEstimate Ext-GeographicalInformation,
|
||||
ageOfLocationEstimate [0] AgeOfLocationInformation OPTIONAL,
|
||||
extensionContainer [1] ExtensionContainer OPTIONAL,
|
||||
... ,
|
||||
add-LocationEstimate [2] Add-GeographicalInformation OPTIONAL,
|
||||
deferredmt-lrResponseIndicator [3] NULL OPTIONAL,
|
||||
geranPositioningData [4] PositioningDataInformation OPTIONAL,
|
||||
utranPositioningData [5] UtranPositioningDataInfo OPTIONAL,
|
||||
cellIdOrSai [6] CellGlobalIdOrServiceAreaIdOrLAI OPTIONAL,
|
||||
sai-Present [7] NULL OPTIONAL,
|
||||
accuracyFulfilmentIndicator [8] AccuracyFulfilmentIndicator OPTIONAL,
|
||||
velocityEstimate [9] VelocityEstimate OPTIONAL,
|
||||
mo-lrShortCircuitIndicator [10] NULL OPTIONAL }
|
||||
|
||||
-- if deferredmt-lrResponseIndicator is set, locationEstimate is ignored.
|
||||
|
||||
-- the add-LocationEstimate parameter shall not be sent to a node that did not indicate the
|
||||
-- geographic shapes supported in the ProvideSubscriberLocation-Arg
|
||||
-- The locationEstimate and the add-locationEstimate parameters shall not be sent if
|
||||
-- the supportedGADShapes parameter has been received in ProvideSubscriberLocation-Arg
|
||||
-- and the shape encoded in locationEstimate or add-LocationEstimate is not marked
|
||||
-- as supported in supportedGADShapes. In such a case ProvideSubscriberLocation
|
||||
-- shall be rejected with error FacilityNotSupported with additional indication
|
||||
-- shapeOfLocationEstimateNotSupported.
|
||||
-- sai-Present indicates that the cellIdOrSai parameter contains a Service Area Identity.
|
||||
|
||||
AccuracyFulfilmentIndicator ::= ENUMERATED {
|
||||
requestedAccuracyFulfilled (0),
|
||||
requestedAccuracyNotFulfilled (1),
|
||||
... }
|
||||
|
||||
Ext-GeographicalInformation ::= OCTET STRING (SIZE (1..maxExt-GeographicalInformation))
|
||||
-- Refers to geographical Information defined in 3GPP TS 23.032.
|
||||
-- This is composed of 1 or more octets with an internal structure according to
|
||||
-- 3GPP TS 23.032
|
||||
-- Octet 1: Type of shape, only the following shapes in 3GPP TS 23.032 are allowed:
|
||||
-- (a) Ellipsoid point with uncertainty circle
|
||||
-- (b) Ellipsoid point with uncertainty ellipse
|
||||
-- (c) Ellipsoid point with altitude and uncertainty ellipsoid
|
||||
-- (d) Ellipsoid Arc
|
||||
-- (e) Ellipsoid Point
|
||||
-- Any other value in octet 1 shall be treated as invalid
|
||||
-- Octets 2 to 8 for case (a) – Ellipsoid point with uncertainty circle
|
||||
-- Degrees of Latitude 3 octets
|
||||
-- Degrees of Longitude 3 octets
|
||||
-- Uncertainty code 1 octet
|
||||
-- Octets 2 to 11 for case (b) – Ellipsoid point with uncertainty ellipse:
|
||||
-- Degrees of Latitude 3 octets
|
||||
-- Degrees of Longitude 3 octets
|
||||
-- Uncertainty semi-major axis 1 octet
|
||||
-- Uncertainty semi-minor axis 1 octet
|
||||
-- Angle of major axis 1 octet
|
||||
-- Confidence 1 octet
|
||||
-- Octets 2 to 14 for case (c) – Ellipsoid point with altitude and uncertainty ellipsoid
|
||||
-- Degrees of Latitude 3 octets
|
||||
-- Degrees of Longitude 3 octets
|
||||
-- Altitude 2 octets
|
||||
-- Uncertainty semi-major axis 1 octet
|
||||
-- Uncertainty semi-minor axis 1 octet
|
||||
-- Angle of major axis 1 octet
|
||||
-- Uncertainty altitude 1 octet
|
||||
-- Confidence 1 octet
|
||||
-- Octets 2 to 13 for case (d) – Ellipsoid Arc
|
||||
-- Degrees of Latitude 3 octets
|
||||
-- Degrees of Longitude 3 octets
|
||||
-- Inner radius 2 octets
|
||||
-- Uncertainty radius 1 octet
|
||||
-- Offset angle 1 octet
|
||||
-- Included angle 1 octet
|
||||
-- Confidence 1 octet
|
||||
-- Octets 2 to 7 for case (e) – Ellipsoid Point
|
||||
-- Degrees of Latitude 3 octets
|
||||
-- Degrees of Longitude 3 octets
|
||||
|
||||
--
|
||||
-- An Ext-GeographicalInformation parameter comprising more than one octet and
|
||||
-- containing any other shape or an incorrect number of octets or coding according
|
||||
-- to 3GPP TS 23.032 shall be treated as invalid data by a receiver.
|
||||
--
|
||||
-- An Ext-GeographicalInformation parameter comprising one octet shall be discarded
|
||||
-- by the receiver if an Add-GeographicalInformation parameter is received
|
||||
-- in the same message.
|
||||
--
|
||||
-- An Ext-GeographicalInformation parameter comprising one octet shall be treated as
|
||||
-- invalid data by the receiver if an Add-GeographicalInformation parameter is not
|
||||
-- received in the same message.
|
||||
|
||||
maxExt-GeographicalInformation INTEGER ::= 20
|
||||
-- the maximum length allows for further shapes in 3GPP TS 23.032 to be included in later
|
||||
-- versions of 3GPP TS 29.002
|
||||
|
||||
VelocityEstimate ::= OCTET STRING (SIZE (4..7))
|
||||
-- Refers to Velocity description defined in 3GPP TS 23.032.
|
||||
-- This is composed of 4 or more octets with an internal structure according to
|
||||
-- 3GPP TS 23.032
|
||||
-- Octet 1: Type of velocity, only the following types in 3GPP TS 23.032 are allowed:
|
||||
-- (a) Horizontal Velocity
|
||||
-- (b) Horizontal with Vertical Velocity
|
||||
-- (c) Horizontal Velocity with Uncertainty
|
||||
-- (d) Horizontal with Vertical Velocity and Uncertainty
|
||||
-- For types Horizontal with Vertical Velocity and Horizontal with Vertical Velocity
|
||||
-- and Uncertainty, the direction of the Vertical Speed is also included in Octet 1
|
||||
-- Any other value in octet 1 shall be treated as invalid
|
||||
-- Octets 2 to 4 for case (a) Horizontal velocity:
|
||||
-- Bearing 1 octet
|
||||
-- Horizontal Speed 2 octets
|
||||
-- Octets 2 to 5 for case (b) – Horizontal with Vertical Velocity:
|
||||
-- Bearing 1 octet
|
||||
-- Horizontal Speed 2 octets
|
||||
-- Vertical Speed 1 octet
|
||||
-- Octets 2 to 5 for case (c) – Horizontal velocity with Uncertainty:
|
||||
-- Bearing 1 octet
|
||||
-- Horizontal Speed 2 octets
|
||||
-- Uncertainty Speed 1 octet
|
||||
-- Octets 2 to 7 for case (d) – Horizontal with Vertical Velocity and Uncertainty:
|
||||
-- Bearing 1 octet
|
||||
-- Horizontal Speed 2 octets
|
||||
-- Vertical Speed 1 octet
|
||||
-- Horizontal Uncertainty Speed 1 octet
|
||||
-- Vertical Uncertainty Speed 1 octet
|
||||
|
||||
PositioningDataInformation ::= OCTET STRING (SIZE (2..maxPositioningDataInformation))
|
||||
-- Refers to the Positioning Data defined in 3GPP TS 49.031.
|
||||
-- This is composed of 2 or more octets with an internal structure according to
|
||||
-- 3GPP TS 49.031.
|
||||
|
||||
maxPositioningDataInformation INTEGER ::= 10
|
||||
--
|
||||
|
||||
UtranPositioningDataInfo ::= OCTET STRING (SIZE (3..maxUtranPositioningDataInfo))
|
||||
-- Refers to the Position Data defined in 3GPP TS 25.413.
|
||||
-- This is composed of the positioningDataDiscriminator and the positioningDataSet
|
||||
-- included in positionData as defined in 3GPP TS 25.413.
|
||||
|
||||
maxUtranPositioningDataInfo INTEGER ::= 11
|
||||
--
|
||||
|
||||
Add-GeographicalInformation ::= OCTET STRING (SIZE (1..maxAdd-GeographicalInformation))
|
||||
-- Refers to geographical Information defined in 3GPP TS 23.032.
|
||||
-- This is composed of 1 or more octets with an internal structure according to
|
||||
-- 3GPP TS 23.032
|
||||
-- Octet 1: Type of shape, all the shapes defined in 3GPP TS 23.032 are allowed:
|
||||
-- Octets 2 to n (where n is the total number of octets necessary to encode the shape
|
||||
-- according to 3GPP TS 23.032) are used to encode the shape itself in accordance with the
|
||||
-- encoding defined in 3GPP TS 23.032
|
||||
--
|
||||
-- An Add-GeographicalInformation parameter, whether valid or invalid, received
|
||||
-- together with a valid Ext-GeographicalInformation parameter in the same message
|
||||
-- shall be discarded.
|
||||
--
|
||||
-- An Add-GeographicalInformation parameter containing any shape not defined in
|
||||
-- 3GPP TS 23.032 or an incorrect number of octets or coding according to
|
||||
-- 3GPP TS 23.032 shall be treated as invalid data by a receiver if not received
|
||||
-- together with a valid Ext-GeographicalInformation parameter in the same message.
|
||||
|
||||
maxAdd-GeographicalInformation INTEGER ::= 91
|
||||
-- the maximum length allows support for all the shapes currently defined in 3GPP TS 23.032
|
||||
|
||||
SubscriberLocationReport-Arg ::= SEQUENCE {
|
||||
lcs-Event LCS-Event,
|
||||
lcs-ClientID LCS-ClientID,
|
||||
lcsLocationInfo LCSLocationInfo,
|
||||
msisdn [0] ISDN-AddressString OPTIONAL,
|
||||
imsi [1] IMSI OPTIONAL,
|
||||
imei [2] IMEI OPTIONAL,
|
||||
na-ESRD [3] ISDN-AddressString OPTIONAL,
|
||||
na-ESRK [4] ISDN-AddressString OPTIONAL,
|
||||
locationEstimate [5] Ext-GeographicalInformation OPTIONAL,
|
||||
ageOfLocationEstimate [6] AgeOfLocationInformation OPTIONAL,
|
||||
slr-ArgExtensionContainer [7] SLR-ArgExtensionContainer OPTIONAL,
|
||||
... ,
|
||||
add-LocationEstimate [8] Add-GeographicalInformation OPTIONAL,
|
||||
deferredmt-lrData [9] Deferredmt-lrData OPTIONAL,
|
||||
lcs-ReferenceNumber [10] LCS-ReferenceNumber OPTIONAL,
|
||||
geranPositioningData [11] PositioningDataInformation OPTIONAL,
|
||||
utranPositioningData [12] UtranPositioningDataInfo OPTIONAL,
|
||||
cellIdOrSai [13] CellGlobalIdOrServiceAreaIdOrLAI OPTIONAL,
|
||||
h-gmlc-Address [14] GSN-Address OPTIONAL,
|
||||
lcsServiceTypeID [15] LCSServiceTypeID OPTIONAL,
|
||||
sai-Present [17] NULL OPTIONAL,
|
||||
pseudonymIndicator [18] NULL OPTIONAL,
|
||||
accuracyFulfilmentIndicator [19] AccuracyFulfilmentIndicator OPTIONAL,
|
||||
velocityEstimate [20] VelocityEstimate OPTIONAL,
|
||||
sequenceNumber [21] SequenceNumber OPTIONAL,
|
||||
periodicLDRInfo [22] PeriodicLDRInfo OPTIONAL,
|
||||
mo-lrShortCircuitIndicator [23] NULL OPTIONAL }
|
||||
|
||||
-- one of msisdn or imsi is mandatory
|
||||
-- a location estimate that is valid for the locationEstimate parameter should
|
||||
-- be transferred in this parameter in preference to the add-LocationEstimate.
|
||||
-- the deferredmt-lrData parameter shall be included if and only if the lcs-Event
|
||||
-- indicates a deferredmt-lrResponse.
|
||||
-- if the lcs-Event indicates a deferredmt-lrResponse then the locationEstimate
|
||||
-- and the add-locationEstimate parameters shall not be sent if the
|
||||
-- supportedGADShapes parameter had been received in ProvideSubscriberLocation-Arg
|
||||
-- and the shape encoded in locationEstimate or add-LocationEstimate was not marked
|
||||
-- as supported in supportedGADShapes. In such a case terminationCause
|
||||
-- in deferredmt-lrData shall be present with value
|
||||
-- shapeOfLocationEstimateNotSupported.
|
||||
-- If a lcs event indicates deferred mt-lr response, the lcs-Reference number shall be
|
||||
-- included.
|
||||
-- sai-Present indicates that the cellIdOrSai parameter contains a Service Area Identity.
|
||||
|
||||
Deferredmt-lrData ::= SEQUENCE {
|
||||
deferredLocationEventType DeferredLocationEventType,
|
||||
terminationCause [0] TerminationCause OPTIONAL,
|
||||
lcsLocationInfo [1] LCSLocationInfo OPTIONAL,
|
||||
...}
|
||||
-- lcsLocationInfo may be included only if a terminationCause is present
|
||||
-- indicating mt-lrRestart.
|
||||
|
||||
LCS-Event ::= ENUMERATED {
|
||||
emergencyCallOrigination (0),
|
||||
emergencyCallRelease (1),
|
||||
mo-lr (2),
|
||||
...,
|
||||
deferredmt-lrResponse (3) ,
|
||||
deferredmo-lrTTTPInitiation (4) }
|
||||
-- deferredmt-lrResponse is applicable to the delivery of a location estimate
|
||||
-- for an LDR initiated earlier by either the network (via an MT-LR activate deferred
|
||||
-- location) or the UE (via a deferred MO-LR TTTP initiation)
|
||||
-- exception handling:
|
||||
-- a SubscriberLocationReport-Arg containing an unrecognized LCS-Event
|
||||
-- shall be rejected by a receiver with a return error cause of unexpected data value
|
||||
|
||||
TerminationCause ::= ENUMERATED {
|
||||
normal (0),
|
||||
errorundefined (1),
|
||||
internalTimeout (2),
|
||||
congestion (3),
|
||||
mt-lrRestart (4),
|
||||
privacyViolation (5),
|
||||
...,
|
||||
shapeOfLocationEstimateNotSupported (6) ,
|
||||
subscriberTermination (7),
|
||||
uETermination (8),
|
||||
networkTermination (9) }
|
||||
-- mt-lrRestart shall be used to trigger the GMLC to restart the location procedure,
|
||||
-- either because the sending node knows that the terminal has moved under coverage
|
||||
-- of another MSC or SGSN (e.g. Send Identification received), or because the subscriber
|
||||
-- has been deregistered due to a Cancel Location received from HLR.
|
||||
--
|
||||
-- exception handling
|
||||
-- an unrecognized value shall be treated the same as value 1 (errorundefined)
|
||||
|
||||
SequenceNumber ::= INTEGER (1..maxReportingAmount)
|
||||
|
||||
SubscriberLocationReport-Res ::= SEQUENCE {
|
||||
extensionContainer ExtensionContainer OPTIONAL,
|
||||
...,
|
||||
na-ESRK [0] ISDN-AddressString OPTIONAL,
|
||||
na-ESRD [1] ISDN-AddressString OPTIONAL,
|
||||
h-gmlc-Address [2] GSN-Address OPTIONAL,
|
||||
mo-lrShortCircuitIndicator [3] NULL OPTIONAL,
|
||||
reportingPLMNList [4] ReportingPLMNList OPTIONAL,
|
||||
lcs-ReferenceNumber [5] LCS-ReferenceNumber OPTIONAL }
|
||||
|
||||
-- na-ESRK and na-ESRD are mutually exclusive
|
||||
--
|
||||
-- exception handling
|
||||
-- receipt of both na-ESRK and na-ESRD shall be treated the same as a return error
|
||||
|
||||
|
||||
END
|
||||
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,216 @@
|
|||
-- $Id: MAP-OM-DataTypes.asn 28149 2009-04-25 17:45:34Z etxrab $
|
||||
-- 17.7.2 Operation and maintenance data types
|
||||
-- 3GPP TS 29.002 V8.9.0 (2009-04)
|
||||
|
||||
MAP-OM-DataTypes {
|
||||
itu-t identified-organization (4) etsi (0) mobileDomain (0)
|
||||
gsm-Network (1) modules (3) map-OM-DataTypes (12) version11 (11)}
|
||||
|
||||
DEFINITIONS
|
||||
|
||||
IMPLICIT TAGS
|
||||
|
||||
::=
|
||||
|
||||
BEGIN
|
||||
|
||||
EXPORTS
|
||||
ActivateTraceModeArg,
|
||||
ActivateTraceModeRes,
|
||||
DeactivateTraceModeArg,
|
||||
DeactivateTraceModeRes,
|
||||
TracePropagationList
|
||||
;
|
||||
|
||||
IMPORTS
|
||||
AddressString,
|
||||
IMSI
|
||||
FROM MAP-CommonDataTypes {
|
||||
itu-t identified-organization (4) etsi (0) mobileDomain (0)
|
||||
gsm-Network (1) modules (3) map-CommonDataTypes (18) version11 (11)}
|
||||
|
||||
ExtensionContainer
|
||||
FROM MAP-ExtensionDataTypes {
|
||||
itu-t identified-organization (4) etsi (0) mobileDomain (0)
|
||||
gsm-Network (1) modules (3) map-ExtensionDataTypes (21) version11 (11)}
|
||||
|
||||
;
|
||||
|
||||
ActivateTraceModeArg ::= SEQUENCE {
|
||||
imsi [0] IMSI OPTIONAL,
|
||||
traceReference [1] TraceReference,
|
||||
traceType [2] TraceType,
|
||||
omc-Id [3] AddressString OPTIONAL,
|
||||
extensionContainer [4] ExtensionContainer OPTIONAL,
|
||||
...,
|
||||
traceReference2 [5] TraceReference2 OPTIONAL,
|
||||
traceDepthList [6] TraceDepthList OPTIONAL,
|
||||
traceNE-TypeList [7] TraceNE-TypeList OPTIONAL,
|
||||
traceInterfaceList [8] TraceInterfaceList OPTIONAL,
|
||||
traceEventList [9] TraceEventList OPTIONAL
|
||||
}
|
||||
|
||||
TraceReference ::= OCTET STRING (SIZE (1..2))
|
||||
|
||||
TraceReference2 ::= OCTET STRING (SIZE (3))
|
||||
|
||||
TraceRecordingSessionReference ::= OCTET STRING (SIZE (2))
|
||||
|
||||
TraceType ::= INTEGER
|
||||
(0..255)
|
||||
-- Trace types are fully defined in 3GPP TS 52.008. [61]
|
||||
|
||||
TraceDepthList ::= SEQUENCE {
|
||||
msc-s-TraceDepth [0] TraceDepth OPTIONAL,
|
||||
mgw-TraceDepth [1] TraceDepth OPTIONAL,
|
||||
sgsn-TraceDepth [2] TraceDepth OPTIONAL,
|
||||
ggsn-TraceDepth [3] TraceDepth OPTIONAL,
|
||||
rnc-TraceDepth [4] TraceDepth OPTIONAL,
|
||||
bmsc-TraceDepth [5] TraceDepth OPTIONAL,
|
||||
...}
|
||||
|
||||
TraceDepth ::= ENUMERATED {
|
||||
minimum (0),
|
||||
medium (1),
|
||||
maximum (2),
|
||||
...}
|
||||
-- The value medium is applicable only for RNC. For other network elements, if value medium
|
||||
-- is received, value minimum shall be applied.
|
||||
|
||||
TraceNE-TypeList ::= BIT STRING {
|
||||
msc-s (0),
|
||||
mgw (1),
|
||||
sgsn (2),
|
||||
ggsn (3),
|
||||
rnc (4),
|
||||
bm-sc (5)} (SIZE (6..16))
|
||||
-- Other bits than listed above shall be discarded.
|
||||
|
||||
TraceInterfaceList ::= SEQUENCE {
|
||||
msc-s-List [0] MSC-S-InterfaceList OPTIONAL,
|
||||
mgw-List [1] MGW-InterfaceList OPTIONAL,
|
||||
sgsn-List [2] SGSN-InterfaceList OPTIONAL,
|
||||
ggsn-List [3] GGSN-InterfaceList OPTIONAL,
|
||||
rnc-List [4] RNC-InterfaceList OPTIONAL,
|
||||
bmsc-List [5] BMSC-InterfaceList OPTIONAL,
|
||||
...}
|
||||
|
||||
MSC-S-InterfaceList ::= BIT STRING {
|
||||
a (0),
|
||||
iu (1),
|
||||
mc (2),
|
||||
map-g (3),
|
||||
map-b (4),
|
||||
map-e (5),
|
||||
map-f (6),
|
||||
cap (7),
|
||||
map-d (8),
|
||||
map-c (9)} (SIZE (10..16))
|
||||
-- Other bits than listed above shall be discarded.
|
||||
|
||||
MGW-InterfaceList ::= BIT STRING {
|
||||
mc (0),
|
||||
nb-up (1),
|
||||
iu-up (2)} (SIZE (3..8))
|
||||
-- Other bits than listed above shall be discarded.
|
||||
|
||||
SGSN-InterfaceList ::= BIT STRING {
|
||||
gb (0),
|
||||
iu (1),
|
||||
gn (2),
|
||||
map-gr (3),
|
||||
map-gd (4),
|
||||
map-gf (5),
|
||||
gs (6),
|
||||
ge (7)} (SIZE (8..16))
|
||||
-- Other bits than listed above shall be discarded.
|
||||
|
||||
GGSN-InterfaceList ::= BIT STRING {
|
||||
gn (0),
|
||||
gi (1),
|
||||
gmb (2)} (SIZE (3..8))
|
||||
-- Other bits than listed above shall be discarded.
|
||||
|
||||
RNC-InterfaceList ::= BIT STRING {
|
||||
iu (0),
|
||||
iur (1),
|
||||
iub (2),
|
||||
uu (3)} (SIZE (4..8))
|
||||
-- Other bits than listed above shall be discarded.
|
||||
|
||||
BMSC-InterfaceList ::= BIT STRING {
|
||||
gmb (0)} (SIZE (1..8))
|
||||
-- Other bits than listed above shall be discarded.
|
||||
|
||||
TraceEventList ::= SEQUENCE {
|
||||
msc-s-List [0] MSC-S-EventList OPTIONAL,
|
||||
mgw-List [1] MGW-EventList OPTIONAL,
|
||||
sgsn-List [2] SGSN-EventList OPTIONAL,
|
||||
ggsn-List [3] GGSN-EventList OPTIONAL,
|
||||
bmsc-List [4] BMSC-EventList OPTIONAL,
|
||||
...}
|
||||
|
||||
MSC-S-EventList ::= BIT STRING {
|
||||
mo-mtCall (0),
|
||||
mo-mt-sms (1),
|
||||
lu-imsiAttach-imsiDetach (2),
|
||||
handovers (3),
|
||||
ss (4)} (SIZE (5..16))
|
||||
-- Other bits than listed above shall be discarded.
|
||||
|
||||
MGW-EventList ::= BIT STRING {
|
||||
context (0)} (SIZE (1..8))
|
||||
-- Other bits than listed above shall be discarded.
|
||||
|
||||
SGSN-EventList ::= BIT STRING {
|
||||
pdpContext (0),
|
||||
mo-mt-sms (1),
|
||||
rau-gprsAttach-gprsDetach (2),
|
||||
mbmsContext (3)} (SIZE (4..16))
|
||||
-- Other bits than listed above shall be discarded.
|
||||
|
||||
GGSN-EventList ::= BIT STRING {
|
||||
pdpContext (0),
|
||||
mbmsContext (1)} (SIZE (2..8))
|
||||
-- Other bits than listed above shall be discarded.
|
||||
|
||||
BMSC-EventList ::= BIT STRING {
|
||||
mbmsMulticastServiceActivation (0)} (SIZE (1..8))
|
||||
-- Other bits than listed above shall be discarded.
|
||||
|
||||
|
||||
TracePropagationList ::= SEQUENCE {
|
||||
traceReference [0] TraceReference OPTIONAL,
|
||||
traceType [1] TraceType OPTIONAL,
|
||||
traceReference2 [2] TraceReference2 OPTIONAL,
|
||||
traceRecordingSessionReference [3] TraceRecordingSessionReference OPTIONAL,
|
||||
rnc-TraceDepth [4] TraceDepth OPTIONAL,
|
||||
rnc-InterfaceList [5] RNC-InterfaceList OPTIONAL,
|
||||
msc-s-TraceDepth [6] TraceDepth OPTIONAL,
|
||||
msc-s-InterfaceList [7] MSC-S-InterfaceList OPTIONAL,
|
||||
msc-s-EventList [8] MSC-S-EventList OPTIONAL,
|
||||
mgw-TraceDepth [9] TraceDepth OPTIONAL,
|
||||
mgw-InterfaceList [10] MGW-InterfaceList OPTIONAL,
|
||||
mgw-EventList [11] MGW-EventList OPTIONAL,
|
||||
...}
|
||||
|
||||
ActivateTraceModeRes ::= SEQUENCE {
|
||||
extensionContainer [0] ExtensionContainer OPTIONAL,
|
||||
...,
|
||||
traceSupportIndicator [1] NULL OPTIONAL
|
||||
}
|
||||
|
||||
DeactivateTraceModeArg ::= SEQUENCE {
|
||||
imsi [0] IMSI OPTIONAL,
|
||||
traceReference [1] TraceReference,
|
||||
extensionContainer [2] ExtensionContainer OPTIONAL,
|
||||
...,
|
||||
traceReference2 [3] TraceReference2 OPTIONAL
|
||||
}
|
||||
|
||||
DeactivateTraceModeRes ::= SEQUENCE {
|
||||
extensionContainer [0] ExtensionContainer OPTIONAL,
|
||||
...}
|
||||
|
||||
END
|
||||
|
|
@ -0,0 +1,270 @@
|
|||
-- $Id: MAP-SM-DataTypes.asn 28149 2009-04-25 17:45:34Z etxrab $
|
||||
-- 3GPP TS 29.002 V8.9.0 (2009-04)
|
||||
-- 17.7.6 Short message data types
|
||||
|
||||
MAP-SM-DataTypes {
|
||||
itu-t identified-organization (4) etsi (0) mobileDomain (0)
|
||||
gsm-Network (1) modules (3) map-SM-DataTypes (16) version11 (11)}
|
||||
|
||||
DEFINITIONS
|
||||
|
||||
IMPLICIT TAGS
|
||||
|
||||
::=
|
||||
|
||||
BEGIN
|
||||
|
||||
EXPORTS
|
||||
RoutingInfoForSM-Arg,
|
||||
RoutingInfoForSM-Res,
|
||||
MO-ForwardSM-Arg,
|
||||
MO-ForwardSM-Res,
|
||||
MT-ForwardSM-Arg,
|
||||
MT-ForwardSM-Res,
|
||||
ReportSM-DeliveryStatusArg,
|
||||
ReportSM-DeliveryStatusRes,
|
||||
AlertServiceCentreArg,
|
||||
InformServiceCentreArg,
|
||||
ReadyForSM-Arg,
|
||||
ReadyForSM-Res,
|
||||
SM-DeliveryOutcome,
|
||||
AlertReason,
|
||||
Additional-Number,
|
||||
MT-ForwardSM-VGCS-Arg,
|
||||
MT-ForwardSM-VGCS-Res
|
||||
;
|
||||
|
||||
IMPORTS
|
||||
AddressString,
|
||||
ISDN-AddressString,
|
||||
SignalInfo,
|
||||
IMSI,
|
||||
LMSI,
|
||||
ASCI-CallReference
|
||||
|
||||
FROM MAP-CommonDataTypes {
|
||||
itu-t identified-organization (4) etsi (0) mobileDomain (0)
|
||||
gsm-Network (1) modules (3) map-CommonDataTypes (18) version11 (11)}
|
||||
|
||||
AbsentSubscriberDiagnosticSM
|
||||
FROM MAP-ER-DataTypes {
|
||||
itu-t identified-organization (4) etsi (0) mobileDomain (0)
|
||||
gsm-Network (1) modules (3) map-ER-DataTypes (17) version11 (11)}
|
||||
|
||||
ExtensionContainer
|
||||
FROM MAP-ExtensionDataTypes {
|
||||
itu-t identified-organization (4) etsi (0) mobileDomain (0)
|
||||
gsm-Network (1) modules (3) map-ExtensionDataTypes (21) version11 (11)}
|
||||
;
|
||||
|
||||
|
||||
RoutingInfoForSM-Arg ::= SEQUENCE {
|
||||
msisdn [0] ISDN-AddressString,
|
||||
sm-RP-PRI [1] BOOLEAN,
|
||||
serviceCentreAddress [2] AddressString,
|
||||
extensionContainer [6] ExtensionContainer OPTIONAL,
|
||||
... ,
|
||||
gprsSupportIndicator [7] NULL OPTIONAL,
|
||||
-- gprsSupportIndicator is set only if the SMS-GMSC supports
|
||||
-- receiving of two numbers from the HLR
|
||||
sm-RP-MTI [8] SM-RP-MTI OPTIONAL,
|
||||
sm-RP-SMEA [9] SM-RP-SMEA OPTIONAL,
|
||||
sm-deliveryNotIntended [10] SM-DeliveryNotIntended OPTIONAL }
|
||||
|
||||
SM-DeliveryNotIntended ::= ENUMERATED {
|
||||
onlyIMSI-requested (0),
|
||||
onlyMCC-MNC-requested (1),
|
||||
...}
|
||||
|
||||
SM-RP-MTI ::= INTEGER (0..10)
|
||||
-- 0 SMS Deliver
|
||||
-- 1 SMS Status Report
|
||||
-- other values are reserved for future use and shall be discarded if
|
||||
-- received
|
||||
|
||||
SM-RP-SMEA ::= OCTET STRING (SIZE (1..12))
|
||||
-- this parameter contains an address field which is encoded
|
||||
-- as defined in 3GPP TS 23.040. An address field contains 3 elements :
|
||||
-- address-length
|
||||
-- type-of-address
|
||||
-- address-value
|
||||
|
||||
RoutingInfoForSM-Res ::= SEQUENCE {
|
||||
imsi IMSI,
|
||||
locationInfoWithLMSI [0] LocationInfoWithLMSI,
|
||||
extensionContainer [4] ExtensionContainer OPTIONAL,
|
||||
...}
|
||||
|
||||
LocationInfoWithLMSI ::= SEQUENCE {
|
||||
networkNode-Number [1] ISDN-AddressString,
|
||||
lmsi LMSI OPTIONAL,
|
||||
extensionContainer ExtensionContainer OPTIONAL,
|
||||
...,
|
||||
gprsNodeIndicator [5] NULL OPTIONAL,
|
||||
-- gprsNodeIndicator is set only if the SGSN number is sent as the
|
||||
-- Network Node Number
|
||||
additional-Number [6] Additional-Number OPTIONAL
|
||||
-- NetworkNode-number can be either msc-number or sgsn-number or IP-SM-GW
|
||||
-- number or SMS Router number
|
||||
}
|
||||
|
||||
Additional-Number ::= CHOICE {
|
||||
msc-Number [0] ISDN-AddressString,
|
||||
sgsn-Number [1] ISDN-AddressString}
|
||||
-- additional-number can be either msc-number or sgsn-number
|
||||
-- if received networkNode-number is msc-number then the
|
||||
-- additional number is sgsn-number
|
||||
-- if received networkNode-number is sgsn-number then the
|
||||
-- additional number is msc-number
|
||||
|
||||
MO-ForwardSM-Arg ::= SEQUENCE {
|
||||
sm-RP-DA SM-RP-DA,
|
||||
sm-RP-OA SM-RP-OA,
|
||||
sm-RP-UI SignalInfo,
|
||||
extensionContainer ExtensionContainer OPTIONAL,
|
||||
... ,
|
||||
imsi IMSI OPTIONAL }
|
||||
|
||||
MO-ForwardSM-Res ::= SEQUENCE {
|
||||
sm-RP-UI SignalInfo OPTIONAL,
|
||||
extensionContainer ExtensionContainer OPTIONAL,
|
||||
...}
|
||||
|
||||
MT-ForwardSM-Arg ::= SEQUENCE {
|
||||
sm-RP-DA SM-RP-DA,
|
||||
sm-RP-OA SM-RP-OA,
|
||||
sm-RP-UI SignalInfo,
|
||||
moreMessagesToSend NULL OPTIONAL,
|
||||
extensionContainer ExtensionContainer OPTIONAL,
|
||||
...}
|
||||
|
||||
MT-ForwardSM-Res ::= SEQUENCE {
|
||||
sm-RP-UI SignalInfo OPTIONAL,
|
||||
extensionContainer ExtensionContainer OPTIONAL,
|
||||
...}
|
||||
|
||||
SM-RP-DA ::= CHOICE {
|
||||
imsi [0] IMSI,
|
||||
lmsi [1] LMSI,
|
||||
serviceCentreAddressDA [4] AddressString,
|
||||
noSM-RP-DA [5] NULL}
|
||||
|
||||
SM-RP-OA ::= CHOICE {
|
||||
msisdn [2] ISDN-AddressString,
|
||||
serviceCentreAddressOA [4] AddressString,
|
||||
noSM-RP-OA [5] NULL}
|
||||
|
||||
ReportSM-DeliveryStatusArg ::= SEQUENCE {
|
||||
msisdn ISDN-AddressString,
|
||||
serviceCentreAddress AddressString,
|
||||
sm-DeliveryOutcome SM-DeliveryOutcome,
|
||||
absentSubscriberDiagnosticSM [0] AbsentSubscriberDiagnosticSM
|
||||
OPTIONAL,
|
||||
extensionContainer [1] ExtensionContainer OPTIONAL,
|
||||
...,
|
||||
gprsSupportIndicator [2] NULL OPTIONAL,
|
||||
-- gprsSupportIndicator is set only if the SMS-GMSC supports
|
||||
-- handling of two delivery outcomes
|
||||
deliveryOutcomeIndicator [3] NULL OPTIONAL,
|
||||
-- DeliveryOutcomeIndicator is set when the SM-DeliveryOutcome
|
||||
-- is for GPRS
|
||||
additionalSM-DeliveryOutcome [4] SM-DeliveryOutcome OPTIONAL,
|
||||
-- If received, additionalSM-DeliveryOutcome is for GPRS
|
||||
-- If DeliveryOutcomeIndicator is set, then AdditionalSM-DeliveryOutcome shall be absent
|
||||
additionalAbsentSubscriberDiagnosticSM [5] AbsentSubscriberDiagnosticSM OPTIONAL,
|
||||
-- If received additionalAbsentSubscriberDiagnosticSM is for GPRS
|
||||
-- If DeliveryOutcomeIndicator is set, then AdditionalAbsentSubscriberDiagnosticSM
|
||||
-- shall be absent
|
||||
ip-sm-gw-Indicator [6] NULL OPTIONAL,
|
||||
-- the ip-sm-gw indicator indicates by its presence that sm-deliveryOutcome
|
||||
-- is for delivery via IMS
|
||||
-- If present, deliveryOutcomeIndicator shall be absent.
|
||||
ip-sm-gw-sm-deliveryOutcome [7] SM-DeliveryOutcome OPTIONAL,
|
||||
-- If received ip-sm-gw-sm-deliveryOutcome is for delivery via IMS
|
||||
-- If ip-sm-gw-Indicator is set, then ip-sm-gw-sm-deliveryOutcome shall be absent
|
||||
ip-sm-gw-absentSubscriberDiagnosticSM [8] AbsentSubscriberDiagnosticSM OPTIONAL
|
||||
-- If received ip-sm-gw-sm-absentSubscriberDiagnosticSM is for delivery via IMS
|
||||
-- If ip-sm-gw-Indicator is set, then ip-sm-gw-sm-absentSubscriberDiagnosticSM
|
||||
-- shall be absent
|
||||
}
|
||||
|
||||
SM-DeliveryOutcome ::= ENUMERATED {
|
||||
memoryCapacityExceeded (0),
|
||||
absentSubscriber (1),
|
||||
successfulTransfer (2)}
|
||||
|
||||
ReportSM-DeliveryStatusRes ::= SEQUENCE {
|
||||
storedMSISDN ISDN-AddressString OPTIONAL,
|
||||
extensionContainer ExtensionContainer OPTIONAL,
|
||||
...}
|
||||
|
||||
AlertServiceCentreArg ::= SEQUENCE {
|
||||
msisdn ISDN-AddressString,
|
||||
serviceCentreAddress AddressString,
|
||||
...}
|
||||
|
||||
InformServiceCentreArg ::= SEQUENCE {
|
||||
storedMSISDN ISDN-AddressString OPTIONAL,
|
||||
mw-Status MW-Status OPTIONAL,
|
||||
extensionContainer ExtensionContainer OPTIONAL,
|
||||
... ,
|
||||
absentSubscriberDiagnosticSM AbsentSubscriberDiagnosticSM OPTIONAL,
|
||||
additionalAbsentSubscriberDiagnosticSM [0] AbsentSubscriberDiagnosticSM OPTIONAL }
|
||||
-- additionalAbsentSubscriberDiagnosticSM may be present only if
|
||||
-- absentSubscriberDiagnosticSM is present.
|
||||
-- if included, additionalAbsentSubscriberDiagnosticSM is for GPRS and
|
||||
-- absentSubscriberDiagnosticSM is for non-GPRS
|
||||
|
||||
MW-Status ::= BIT STRING {
|
||||
sc-AddressNotIncluded (0),
|
||||
mnrf-Set (1),
|
||||
mcef-Set (2) ,
|
||||
mnrg-Set (3)} (SIZE (6..16))
|
||||
-- exception handling:
|
||||
-- bits 4 to 15 shall be ignored if received and not understood
|
||||
|
||||
ReadyForSM-Arg ::= SEQUENCE {
|
||||
imsi [0] IMSI,
|
||||
alertReason AlertReason,
|
||||
alertReasonIndicator NULL OPTIONAL,
|
||||
-- alertReasonIndicator is set only when the alertReason
|
||||
-- sent to HLR is for GPRS
|
||||
extensionContainer ExtensionContainer OPTIONAL,
|
||||
...,
|
||||
additionalAlertReasonIndicator [1] NULL OPTIONAL
|
||||
-- additionalAlertReasonIndicator is set only when the alertReason
|
||||
-- sent to HLR is for IP-SM-GW
|
||||
}
|
||||
|
||||
ReadyForSM-Res ::= SEQUENCE {
|
||||
extensionContainer ExtensionContainer OPTIONAL,
|
||||
...}
|
||||
|
||||
AlertReason ::= ENUMERATED {
|
||||
ms-Present (0),
|
||||
memoryAvailable (1)}
|
||||
|
||||
MT-ForwardSM-VGCS-Arg ::= SEQUENCE {
|
||||
asciCallReference ASCI-CallReference,
|
||||
sm-RP-OA SM-RP-OA,
|
||||
sm-RP-UI SignalInfo,
|
||||
extensionContainer ExtensionContainer OPTIONAL,
|
||||
...}
|
||||
|
||||
MT-ForwardSM-VGCS-Res ::= SEQUENCE {
|
||||
sm-RP-UI [0] SignalInfo OPTIONAL,
|
||||
dispatcherList [1] DispatcherList OPTIONAL,
|
||||
ongoingCall NULL OPTIONAL,
|
||||
extensionContainer [2] ExtensionContainer OPTIONAL,
|
||||
...}
|
||||
|
||||
DispatcherList ::=
|
||||
SEQUENCE SIZE (1..maxNumOfDispatchers) OF
|
||||
ISDN-AddressString
|
||||
|
||||
maxNumOfDispatchers INTEGER ::= 5
|
||||
|
||||
|
||||
|
||||
END
|
||||
|
|
@ -0,0 +1,190 @@
|
|||
-- $Id: MAP-SS-Code.asn 28149 2009-04-25 17:45:34Z etxrab $
|
||||
-- 3GPP TS 29.002 V8.9.0 (2009-04)
|
||||
-- 17.7.5 Supplementary service codes
|
||||
|
||||
MAP-SS-Code {
|
||||
itu-t identified-organization (4) etsi (0) mobileDomain (0)
|
||||
gsm-Network (1) modules (3) map-SS-Code (15) version11 (11)}
|
||||
|
||||
DEFINITIONS
|
||||
|
||||
::=
|
||||
|
||||
BEGIN
|
||||
|
||||
SS-Code ::= OCTET STRING (SIZE (1))
|
||||
-- This type is used to represent the code identifying a single
|
||||
-- supplementary service, a group of supplementary services, or
|
||||
-- all supplementary services. The services and abbreviations
|
||||
-- used are defined in TS 3GPP TS 22.004 [5]. The internal structure is
|
||||
-- defined as follows:
|
||||
--
|
||||
-- bits 87654321: group (bits 8765), and specific service
|
||||
-- (bits 4321)
|
||||
|
||||
allSS SS-Code ::= '00000000'B
|
||||
-- reserved for possible future use
|
||||
-- all SS
|
||||
|
||||
allLineIdentificationSS SS-Code ::= '00010000'B
|
||||
-- reserved for possible future use
|
||||
-- all line identification SS
|
||||
clip SS-Code ::= '00010001'B
|
||||
-- calling line identification presentation
|
||||
clir SS-Code ::= '00010010'B
|
||||
-- calling line identification restriction
|
||||
colp SS-Code ::= '00010011'B
|
||||
-- connected line identification presentation
|
||||
colr SS-Code ::= '00010100'B
|
||||
-- connected line identification restriction
|
||||
mci SS-Code ::= '00010101'B
|
||||
-- reserved for possible future use
|
||||
-- malicious call identification
|
||||
|
||||
allNameIdentificationSS SS-Code ::= '00011000'B
|
||||
-- all name identification SS
|
||||
cnap SS-Code ::= '00011001'B
|
||||
-- calling name presentation
|
||||
|
||||
-- SS-Codes '00011010'B to '00011111'B are reserved for future
|
||||
-- NameIdentification Supplementary Service use.
|
||||
|
||||
allForwardingSS SS-Code ::= '00100000'B
|
||||
-- all forwarding SS
|
||||
cfu SS-Code ::= '00100001'B
|
||||
-- call forwarding unconditional
|
||||
allCondForwardingSS SS-Code ::= '00101000'B
|
||||
-- all conditional forwarding SS
|
||||
cfb SS-Code ::= '00101001'B
|
||||
-- call forwarding on mobile subscriber busy
|
||||
cfnry SS-Code ::= '00101010'B
|
||||
-- call forwarding on no reply
|
||||
cfnrc SS-Code ::= '00101011'B
|
||||
-- call forwarding on mobile subscriber not reachable
|
||||
cd SS-Code ::= '00100100'B
|
||||
-- call deflection
|
||||
|
||||
allCallOfferingSS SS-Code ::= '00110000'B
|
||||
-- reserved for possible future use
|
||||
-- all call offering SS includes also all forwarding SS
|
||||
ect SS-Code ::= '00110001'B
|
||||
-- explicit call transfer
|
||||
mah SS-Code ::= '00110010'B
|
||||
-- reserved for possible future use
|
||||
-- mobile access hunting
|
||||
|
||||
allCallCompletionSS SS-Code ::= '01000000'B
|
||||
-- reserved for possible future use
|
||||
-- all Call completion SS
|
||||
cw SS-Code ::= '01000001'B
|
||||
-- call waiting
|
||||
hold SS-Code ::= '01000010'B
|
||||
-- call hold
|
||||
ccbs-A SS-Code ::= '01000011'B
|
||||
-- completion of call to busy subscribers, originating side
|
||||
-- this SS-Code is used only in InsertSubscriberData, DeleteSubscriberData
|
||||
-- and InterrogateSS
|
||||
ccbs-B SS-Code ::= '01000100'B
|
||||
-- completion of call to busy subscribers, destination side
|
||||
-- this SS-Code is used only in InsertSubscriberData and DeleteSubscriberData
|
||||
mc SS-Code ::= '01000101'B
|
||||
-- multicall
|
||||
|
||||
allMultiPartySS SS-Code ::= '01010000'B
|
||||
-- reserved for possible future use
|
||||
-- all multiparty SS
|
||||
multiPTY SS-Code ::= '01010001'B
|
||||
-- multiparty
|
||||
|
||||
allCommunityOfInterest-SS SS-Code ::= '01100000'B
|
||||
-- reserved for possible future use
|
||||
-- all community of interest SS
|
||||
cug SS-Code ::= '01100001'B
|
||||
-- closed user group
|
||||
|
||||
allChargingSS SS-Code ::= '01110000'B
|
||||
-- reserved for possible future use
|
||||
-- all charging SS
|
||||
aoci SS-Code ::= '01110001'B
|
||||
-- advice of charge information
|
||||
aocc SS-Code ::= '01110010'B
|
||||
-- advice of charge charging
|
||||
|
||||
allAdditionalInfoTransferSS SS-Code ::= '10000000'B
|
||||
-- reserved for possible future use
|
||||
-- all additional information transfer SS
|
||||
uus1 SS-Code ::= '10000001'B
|
||||
-- UUS1 user-to-user signalling
|
||||
uus2 SS-Code ::= '10000010'B
|
||||
-- UUS2 user-to-user signalling
|
||||
uus3 SS-Code ::= '10000011'B
|
||||
-- UUS3 user-to-user signalling
|
||||
|
||||
allBarringSS SS-Code ::= '10010000'B
|
||||
-- all barring SS
|
||||
barringOfOutgoingCalls SS-Code ::= '10010001'B
|
||||
-- barring of outgoing calls
|
||||
baoc SS-Code ::= '10010010'B
|
||||
-- barring of all outgoing calls
|
||||
boic SS-Code ::= '10010011'B
|
||||
-- barring of outgoing international calls
|
||||
boicExHC SS-Code ::= '10010100'B
|
||||
-- barring of outgoing international calls except those directed
|
||||
-- to the home PLMN Country
|
||||
barringOfIncomingCalls SS-Code ::= '10011001'B
|
||||
-- barring of incoming calls
|
||||
baic SS-Code ::= '10011010'B
|
||||
-- barring of all incoming calls
|
||||
bicRoam SS-Code ::= '10011011'B
|
||||
-- barring of incoming calls when roaming outside home PLMN
|
||||
-- Country
|
||||
|
||||
allPLMN-specificSS SS-Code ::= '11110000'B
|
||||
plmn-specificSS-1 SS-Code ::= '11110001'B
|
||||
plmn-specificSS-2 SS-Code ::= '11110010'B
|
||||
plmn-specificSS-3 SS-Code ::= '11110011'B
|
||||
plmn-specificSS-4 SS-Code ::= '11110100'B
|
||||
plmn-specificSS-5 SS-Code ::= '11110101'B
|
||||
plmn-specificSS-6 SS-Code ::= '11110110'B
|
||||
plmn-specificSS-7 SS-Code ::= '11110111'B
|
||||
plmn-specificSS-8 SS-Code ::= '11111000'B
|
||||
plmn-specificSS-9 SS-Code ::= '11111001'B
|
||||
plmn-specificSS-A SS-Code ::= '11111010'B
|
||||
plmn-specificSS-B SS-Code ::= '11111011'B
|
||||
plmn-specificSS-C SS-Code ::= '11111100'B
|
||||
plmn-specificSS-D SS-Code ::= '11111101'B
|
||||
plmn-specificSS-E SS-Code ::= '11111110'B
|
||||
plmn-specificSS-F SS-Code ::= '11111111'B
|
||||
|
||||
allCallPrioritySS SS-Code ::= '10100000'B
|
||||
-- reserved for possible future use
|
||||
-- all call priority SS
|
||||
emlpp SS-Code ::= '10100001'B
|
||||
-- enhanced Multilevel Precedence Pre-emption (EMLPP) service
|
||||
|
||||
allLCSPrivacyException SS-Code ::= '10110000'B
|
||||
-- all LCS Privacy Exception Classes
|
||||
universal SS-Code ::= '10110001'B
|
||||
-- allow location by any LCS client
|
||||
callSessionRelated SS-Code ::= '10110010'B
|
||||
-- allow location by any value added LCS client to which a call/session
|
||||
-- is established from the target MS
|
||||
callSessionUnrelated SS-Code ::= '10110011'B
|
||||
-- allow location by designated external value added LCS clients
|
||||
plmnoperator SS-Code ::= '10110100'B
|
||||
-- allow location by designated PLMN operator LCS clients
|
||||
serviceType SS-Code ::= '10110101'B
|
||||
-- allow location by LCS clients of a designated LCS service type
|
||||
|
||||
allMOLR-SS SS-Code ::= '11000000'B
|
||||
-- all Mobile Originating Location Request Classes
|
||||
basicSelfLocation SS-Code ::= '11000001'B
|
||||
-- allow an MS to request its own location
|
||||
autonomousSelfLocation SS-Code ::= '11000010'B
|
||||
-- allow an MS to perform self location without interaction
|
||||
-- with the PLMN for a predetermined period of time
|
||||
transferToThirdParty SS-Code ::= '11000011'B
|
||||
-- allow an MS to request transfer of its location to another LCS client
|
||||
|
||||
END
|
||||
|
|
@ -0,0 +1,342 @@
|
|||
-- $Id: MAP-SS-DataTypes.asn 28149 2009-04-25 17:45:34Z etxrab $
|
||||
-- 3GPP TS 29.002 V8.9.0 (2009-04)
|
||||
-- 17.7.4 Supplementary service data types
|
||||
|
||||
MAP-SS-DataTypes {
|
||||
itu-t identified-organization (4) etsi (0) mobileDomain (0)
|
||||
gsm-Network (1) modules (3) map-SS-DataTypes (14) version11 (11)}
|
||||
|
||||
DEFINITIONS
|
||||
|
||||
IMPLICIT TAGS
|
||||
|
||||
::=
|
||||
|
||||
BEGIN
|
||||
|
||||
EXPORTS
|
||||
RegisterSS-Arg,
|
||||
SS-Info,
|
||||
SS-Status,
|
||||
SS-SubscriptionOption,
|
||||
SS-ForBS-Code,
|
||||
InterrogateSS-Res,
|
||||
USSD-Arg,
|
||||
USSD-Res,
|
||||
USSD-DataCodingScheme,
|
||||
USSD-String,
|
||||
Password,
|
||||
GuidanceInfo,
|
||||
SS-List,
|
||||
SS-InfoList,
|
||||
OverrideCategory,
|
||||
CliRestrictionOption,
|
||||
NoReplyConditionTime,
|
||||
ForwardingOptions,
|
||||
maxNumOfSS,
|
||||
SS-Data,
|
||||
SS-InvocationNotificationArg,
|
||||
SS-InvocationNotificationRes,
|
||||
CCBS-Feature,
|
||||
RegisterCC-EntryArg,
|
||||
RegisterCC-EntryRes,
|
||||
EraseCC-EntryArg,
|
||||
EraseCC-EntryRes
|
||||
;
|
||||
|
||||
IMPORTS
|
||||
AddressString,
|
||||
ISDN-AddressString,
|
||||
ISDN-SubaddressString,
|
||||
FTN-AddressString,
|
||||
IMSI,
|
||||
BasicServiceCode,
|
||||
AlertingPattern,
|
||||
EMLPP-Priority,
|
||||
MaxMC-Bearers,
|
||||
MC-Bearers,
|
||||
ExternalSignalInfo
|
||||
FROM MAP-CommonDataTypes {
|
||||
itu-t identified-organization (4) etsi (0) mobileDomain (0)
|
||||
gsm-Network (1) modules (3) map-CommonDataTypes (18) version11 (11)}
|
||||
|
||||
ExtensionContainer
|
||||
FROM MAP-ExtensionDataTypes {
|
||||
itu-t identified-organization (4) etsi (0) mobileDomain (0)
|
||||
gsm-Network (1) modules (3) map-ExtensionDataTypes (21) version11 (11)}
|
||||
|
||||
SS-Code
|
||||
FROM MAP-SS-Code {
|
||||
itu-t identified-organization (4) etsi (0) mobileDomain (0)
|
||||
gsm-Network (1) modules (3) map-SS-Code (15) version11 (11)}
|
||||
;
|
||||
|
||||
|
||||
RegisterSS-Arg ::= SEQUENCE {
|
||||
ss-Code SS-Code,
|
||||
basicService BasicServiceCode OPTIONAL,
|
||||
forwardedToNumber [4] AddressString OPTIONAL,
|
||||
forwardedToSubaddress [6] ISDN-SubaddressString OPTIONAL,
|
||||
noReplyConditionTime [5] NoReplyConditionTime OPTIONAL,
|
||||
...,
|
||||
defaultPriority [7] EMLPP-Priority OPTIONAL,
|
||||
nbrUser [8] MC-Bearers OPTIONAL,
|
||||
longFTN-Supported [9] NULL OPTIONAL }
|
||||
|
||||
NoReplyConditionTime ::= INTEGER (5..30)
|
||||
|
||||
SS-Info ::= CHOICE {
|
||||
forwardingInfo [0] ForwardingInfo,
|
||||
callBarringInfo [1] CallBarringInfo,
|
||||
ss-Data [3] SS-Data}
|
||||
|
||||
ForwardingInfo ::= SEQUENCE {
|
||||
ss-Code SS-Code OPTIONAL,
|
||||
forwardingFeatureList ForwardingFeatureList,
|
||||
...}
|
||||
|
||||
ForwardingFeatureList ::=
|
||||
SEQUENCE SIZE (1..maxNumOfBasicServiceGroups) OF
|
||||
ForwardingFeature
|
||||
|
||||
ForwardingFeature ::= SEQUENCE {
|
||||
basicService BasicServiceCode OPTIONAL,
|
||||
ss-Status [4] SS-Status OPTIONAL,
|
||||
forwardedToNumber [5] ISDN-AddressString OPTIONAL,
|
||||
forwardedToSubaddress [8] ISDN-SubaddressString OPTIONAL,
|
||||
forwardingOptions [6] ForwardingOptions OPTIONAL,
|
||||
noReplyConditionTime [7] NoReplyConditionTime OPTIONAL,
|
||||
...,
|
||||
longForwardedToNumber [9] FTN-AddressString OPTIONAL }
|
||||
|
||||
SS-Status ::= OCTET STRING (SIZE (1))
|
||||
|
||||
-- bits 8765: 0000 (unused)
|
||||
-- bits 4321: Used to convey the "P bit","R bit","A bit" and "Q bit",
|
||||
-- representing supplementary service state information
|
||||
-- as defined in TS 3GPP TS 23.011 [22]
|
||||
|
||||
-- bit 4: "Q bit"
|
||||
|
||||
-- bit 3: "P bit"
|
||||
|
||||
-- bit 2: "R bit"
|
||||
|
||||
-- bit 1: "A bit"
|
||||
|
||||
ForwardingOptions ::= OCTET STRING (SIZE (1))
|
||||
|
||||
-- bit 8: notification to forwarding party
|
||||
-- 0 no notification
|
||||
-- 1 notification
|
||||
|
||||
-- bit 7: redirecting presentation
|
||||
-- 0 no presentation
|
||||
-- 1 presentation
|
||||
|
||||
-- bit 6: notification to calling party
|
||||
-- 0 no notification
|
||||
-- 1 notification
|
||||
|
||||
-- bit 5: 0 (unused)
|
||||
|
||||
-- bits 43: forwarding reason
|
||||
-- 00 ms not reachable
|
||||
-- 01 ms busy
|
||||
-- 10 no reply
|
||||
-- 11 unconditional when used in a SRI Result,
|
||||
-- or call deflection when used in a RCH Argument
|
||||
-- bits 21: 00 (unused)
|
||||
|
||||
CallBarringInfo ::= SEQUENCE {
|
||||
ss-Code SS-Code OPTIONAL,
|
||||
callBarringFeatureList CallBarringFeatureList,
|
||||
...}
|
||||
|
||||
CallBarringFeatureList ::= SEQUENCE SIZE (1..maxNumOfBasicServiceGroups) OF
|
||||
CallBarringFeature
|
||||
|
||||
CallBarringFeature ::= SEQUENCE {
|
||||
basicService BasicServiceCode OPTIONAL,
|
||||
ss-Status [4] SS-Status OPTIONAL,
|
||||
...}
|
||||
|
||||
SS-Data ::= SEQUENCE {
|
||||
ss-Code SS-Code OPTIONAL,
|
||||
ss-Status [4] SS-Status OPTIONAL,
|
||||
ss-SubscriptionOption SS-SubscriptionOption OPTIONAL,
|
||||
basicServiceGroupList BasicServiceGroupList OPTIONAL,
|
||||
...,
|
||||
defaultPriority EMLPP-Priority OPTIONAL,
|
||||
nbrUser [5] MC-Bearers OPTIONAL
|
||||
}
|
||||
|
||||
SS-SubscriptionOption ::= CHOICE {
|
||||
cliRestrictionOption [2] CliRestrictionOption,
|
||||
overrideCategory [1] OverrideCategory}
|
||||
|
||||
CliRestrictionOption ::= ENUMERATED {
|
||||
permanent (0),
|
||||
temporaryDefaultRestricted (1),
|
||||
temporaryDefaultAllowed (2)}
|
||||
|
||||
OverrideCategory ::= ENUMERATED {
|
||||
overrideEnabled (0),
|
||||
overrideDisabled (1)}
|
||||
|
||||
SS-ForBS-Code ::= SEQUENCE {
|
||||
ss-Code SS-Code,
|
||||
basicService BasicServiceCode OPTIONAL,
|
||||
...,
|
||||
longFTN-Supported [4] NULL OPTIONAL }
|
||||
|
||||
GenericServiceInfo ::= SEQUENCE {
|
||||
ss-Status SS-Status,
|
||||
cliRestrictionOption CliRestrictionOption OPTIONAL,
|
||||
...,
|
||||
maximumEntitledPriority [0] EMLPP-Priority OPTIONAL,
|
||||
defaultPriority [1] EMLPP-Priority OPTIONAL,
|
||||
ccbs-FeatureList [2] CCBS-FeatureList OPTIONAL,
|
||||
nbrSB [3] MaxMC-Bearers OPTIONAL,
|
||||
nbrUser [4] MC-Bearers OPTIONAL,
|
||||
nbrSN [5] MC-Bearers OPTIONAL }
|
||||
|
||||
CCBS-FeatureList ::= SEQUENCE SIZE (1..maxNumOfCCBS-Requests) OF
|
||||
CCBS-Feature
|
||||
|
||||
maxNumOfCCBS-Requests INTEGER ::= 5
|
||||
|
||||
CCBS-Feature ::= SEQUENCE {
|
||||
ccbs-Index [0] CCBS-Index OPTIONAL,
|
||||
b-subscriberNumber [1] ISDN-AddressString OPTIONAL,
|
||||
b-subscriberSubaddress [2] ISDN-SubaddressString OPTIONAL,
|
||||
basicServiceGroup [3] BasicServiceCode OPTIONAL,
|
||||
...}
|
||||
|
||||
CCBS-Index ::= INTEGER (1..maxNumOfCCBS-Requests)
|
||||
|
||||
InterrogateSS-Res ::= CHOICE {
|
||||
ss-Status [0] SS-Status,
|
||||
basicServiceGroupList [2] BasicServiceGroupList,
|
||||
forwardingFeatureList [3] ForwardingFeatureList,
|
||||
genericServiceInfo [4] GenericServiceInfo }
|
||||
|
||||
USSD-Arg ::= SEQUENCE {
|
||||
ussd-DataCodingScheme USSD-DataCodingScheme,
|
||||
ussd-String USSD-String,
|
||||
... ,
|
||||
alertingPattern AlertingPattern OPTIONAL,
|
||||
msisdn [0] ISDN-AddressString OPTIONAL }
|
||||
|
||||
USSD-Res ::= SEQUENCE {
|
||||
ussd-DataCodingScheme USSD-DataCodingScheme,
|
||||
ussd-String USSD-String,
|
||||
...}
|
||||
|
||||
USSD-DataCodingScheme ::= OCTET STRING (SIZE (1))
|
||||
-- The structure of the USSD-DataCodingScheme is defined by
|
||||
-- the Cell Broadcast Data Coding Scheme as described in
|
||||
-- TS 3GPP TS 23.038 [25]
|
||||
|
||||
USSD-String ::= OCTET STRING (SIZE (1..maxUSSD-StringLength))
|
||||
-- The structure of the contents of the USSD-String is dependent
|
||||
-- on the USSD-DataCodingScheme as described in TS 3GPP TS 23.038 [25].
|
||||
|
||||
maxUSSD-StringLength INTEGER ::= 160
|
||||
|
||||
Password ::= NumericString
|
||||
(FROM ("0"|"1"|"2"|"3"|"4"|"5"|"6"|"7"|"8"|"9"))
|
||||
(SIZE (4))
|
||||
|
||||
GuidanceInfo ::= ENUMERATED {
|
||||
enterPW (0),
|
||||
enterNewPW (1),
|
||||
enterNewPW-Again (2)}
|
||||
-- How this information is really delivered to the subscriber
|
||||
-- (display, announcement, ...) is not part of this
|
||||
-- specification.
|
||||
|
||||
SS-List ::= SEQUENCE SIZE (1..maxNumOfSS) OF
|
||||
SS-Code
|
||||
|
||||
maxNumOfSS INTEGER ::= 30
|
||||
|
||||
SS-InfoList ::= SEQUENCE SIZE (1..maxNumOfSS) OF
|
||||
SS-Info
|
||||
|
||||
BasicServiceGroupList ::= SEQUENCE SIZE (1..maxNumOfBasicServiceGroups) OF
|
||||
BasicServiceCode
|
||||
|
||||
maxNumOfBasicServiceGroups INTEGER ::= 13
|
||||
|
||||
SS-InvocationNotificationArg ::= SEQUENCE {
|
||||
imsi [0] IMSI,
|
||||
msisdn [1] ISDN-AddressString,
|
||||
ss-Event [2] SS-Code,
|
||||
-- The following SS-Code values are allowed :
|
||||
-- ect SS-Code ::= '00110001'B
|
||||
-- multiPTY SS-Code ::= '01010001'B
|
||||
-- cd SS-Code ::= '00100100'B
|
||||
-- ccbs SS-Code ::= '01000100'B
|
||||
ss-EventSpecification [3] SS-EventSpecification OPTIONAL,
|
||||
extensionContainer [4] ExtensionContainer OPTIONAL,
|
||||
...,
|
||||
b-subscriberNumber [5] ISDN-AddressString OPTIONAL,
|
||||
ccbs-RequestState [6] CCBS-RequestState OPTIONAL
|
||||
}
|
||||
|
||||
CCBS-RequestState ::= ENUMERATED {
|
||||
request (0),
|
||||
recall (1),
|
||||
active (2),
|
||||
completed (3),
|
||||
suspended (4),
|
||||
frozen (5),
|
||||
deleted (6)
|
||||
}
|
||||
|
||||
SS-InvocationNotificationRes ::= SEQUENCE {
|
||||
extensionContainer ExtensionContainer OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
SS-EventSpecification ::= SEQUENCE SIZE (1..maxEventSpecification) OF
|
||||
AddressString
|
||||
|
||||
maxEventSpecification INTEGER ::= 2
|
||||
|
||||
RegisterCC-EntryArg ::= SEQUENCE {
|
||||
ss-Code [0] SS-Code,
|
||||
ccbs-Data [1] CCBS-Data OPTIONAL,
|
||||
...}
|
||||
|
||||
CCBS-Data ::= SEQUENCE {
|
||||
ccbs-Feature [0] CCBS-Feature,
|
||||
translatedB-Number [1] ISDN-AddressString,
|
||||
serviceIndicator [2] ServiceIndicator OPTIONAL,
|
||||
callInfo [3] ExternalSignalInfo,
|
||||
networkSignalInfo [4] ExternalSignalInfo,
|
||||
...}
|
||||
|
||||
ServiceIndicator ::= BIT STRING {
|
||||
clir-invoked (0),
|
||||
camel-invoked (1)} (SIZE(2..32))
|
||||
-- exception handling:
|
||||
-- bits 2 to 31 shall be ignored if received and not understood
|
||||
|
||||
RegisterCC-EntryRes ::= SEQUENCE {
|
||||
ccbs-Feature [0] CCBS-Feature OPTIONAL,
|
||||
...}
|
||||
|
||||
EraseCC-EntryArg ::= SEQUENCE {
|
||||
ss-Code [0] SS-Code,
|
||||
ccbs-Index [1] CCBS-Index OPTIONAL,
|
||||
...}
|
||||
|
||||
EraseCC-EntryRes ::= SEQUENCE {
|
||||
ss-Code [0] SS-Code,
|
||||
ss-Status [1] SS-Status OPTIONAL,
|
||||
...}
|
||||
|
||||
END
|
||||
|
|
@ -0,0 +1,92 @@
|
|||
-- $Id: MAP-TS-Code.asn 28149 2009-04-25 17:45:34Z etxrab $
|
||||
-- 3GPP TS 29.002 V8.9.0 (2009-04)
|
||||
-- 17.7.9 Teleservice Codes
|
||||
|
||||
MAP-TS-Code {
|
||||
itu-t identified-organization (4) etsi (0) mobileDomain (0)
|
||||
gsm-Network (1) modules (3) map-TS-Code (19) version11 (11)}
|
||||
|
||||
DEFINITIONS
|
||||
|
||||
::=
|
||||
|
||||
BEGIN
|
||||
|
||||
TeleserviceCode ::= OCTET STRING (SIZE (1))
|
||||
-- This type is used to represent the code identifying a single
|
||||
-- teleservice, a group of teleservices, or all teleservices. The
|
||||
-- services are defined in TS GSM 22.003 [4].
|
||||
-- The internal structure is defined as follows:
|
||||
|
||||
-- bits 87654321: group (bits 8765) and specific service
|
||||
-- (bits 4321)
|
||||
|
||||
Ext-TeleserviceCode ::= OCTET STRING (SIZE (1..5))
|
||||
-- This type is used to represent the code identifying a single
|
||||
-- teleservice, a group of teleservices, or all teleservices. The
|
||||
-- services are defined in TS GSM 22.003 [4].
|
||||
-- The internal structure is defined as follows:
|
||||
|
||||
-- OCTET 1:
|
||||
-- bits 87654321: group (bits 8765) and specific service
|
||||
-- (bits 4321)
|
||||
|
||||
-- OCTETS 2-5: reserved for future use. If received the
|
||||
-- Ext-TeleserviceCode shall be
|
||||
-- treated according to the exception handling defined for the
|
||||
-- operation that uses this type.
|
||||
|
||||
-- Ext-TeleserviceCode includes all values defined for TeleserviceCode.
|
||||
|
||||
allTeleservices TeleserviceCode ::= '00000000'B
|
||||
|
||||
allSpeechTransmissionServices TeleserviceCode ::= '00010000'B
|
||||
telephony TeleserviceCode ::= '00010001'B
|
||||
emergencyCalls TeleserviceCode ::= '00010010'B
|
||||
|
||||
allShortMessageServices TeleserviceCode ::= '00100000'B
|
||||
shortMessageMT-PP TeleserviceCode ::= '00100001'B
|
||||
shortMessageMO-PP TeleserviceCode ::= '00100010'B
|
||||
|
||||
allFacsimileTransmissionServices TeleserviceCode ::= '01100000'B
|
||||
facsimileGroup3AndAlterSpeech TeleserviceCode ::= '01100001'B
|
||||
automaticFacsimileGroup3 TeleserviceCode ::= '01100010'B
|
||||
facsimileGroup4 TeleserviceCode ::= '01100011'B
|
||||
|
||||
-- The following non-hierarchical Compound Teleservice Groups
|
||||
-- are defined in TS 3GPP TS 22.030:
|
||||
allDataTeleservices TeleserviceCode ::= '01110000'B
|
||||
-- covers Teleservice Groups 'allFacsimileTransmissionServices'
|
||||
-- and 'allShortMessageServices'
|
||||
allTeleservices-ExeptSMS TeleserviceCode ::= '10000000'B
|
||||
-- covers Teleservice Groups 'allSpeechTransmissionServices' and
|
||||
-- 'allFacsimileTransmissionServices'
|
||||
--
|
||||
-- Compound Teleservice Group Codes are only used in call
|
||||
-- independent supplementary service operations, i.e. they
|
||||
-- are not used in InsertSubscriberData or in
|
||||
-- DeleteSubscriberData messages.
|
||||
|
||||
allVoiceGroupCallServices TeleserviceCode ::= '10010000'B
|
||||
voiceGroupCall TeleserviceCode ::= '10010001'B
|
||||
voiceBroadcastCall TeleserviceCode ::= '10010010'B
|
||||
|
||||
allPLMN-specificTS TeleserviceCode ::= '11010000'B
|
||||
plmn-specificTS-1 TeleserviceCode ::= '11010001'B
|
||||
plmn-specificTS-2 TeleserviceCode ::= '11010010'B
|
||||
plmn-specificTS-3 TeleserviceCode ::= '11010011'B
|
||||
plmn-specificTS-4 TeleserviceCode ::= '11010100'B
|
||||
plmn-specificTS-5 TeleserviceCode ::= '11010101'B
|
||||
plmn-specificTS-6 TeleserviceCode ::= '11010110'B
|
||||
plmn-specificTS-7 TeleserviceCode ::= '11010111'B
|
||||
plmn-specificTS-8 TeleserviceCode ::= '11011000'B
|
||||
plmn-specificTS-9 TeleserviceCode ::= '11011001'B
|
||||
plmn-specificTS-A TeleserviceCode ::= '11011010'B
|
||||
plmn-specificTS-B TeleserviceCode ::= '11011011'B
|
||||
plmn-specificTS-C TeleserviceCode ::= '11011100'B
|
||||
plmn-specificTS-D TeleserviceCode ::= '11011101'B
|
||||
plmn-specificTS-E TeleserviceCode ::= '11011110'B
|
||||
plmn-specificTS-F TeleserviceCode ::= '11011111'B
|
||||
|
||||
END
|
||||
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,38 @@
|
|||
-- RRLP-Messages.asn
|
||||
-- $Id$
|
||||
-- Taken from 3GPP TS 44.031 V7.4.0 (2007-03)
|
||||
-- http://www.3gpp.org/ftp/Specs/archive/44_series/44.031/44031-740.zip/44031-740.doc
|
||||
--
|
||||
-- 3.1 General Format of RRLP Message
|
||||
--
|
||||
|
||||
RRLP-Messages
|
||||
-- { RRLP-messages }
|
||||
|
||||
DEFINITIONS AUTOMATIC TAGS ::=
|
||||
|
||||
BEGIN
|
||||
|
||||
IMPORTS
|
||||
MsrPosition-Req, MsrPosition-Rsp, AssistanceData,
|
||||
ProtocolError
|
||||
FROM
|
||||
RRLP-Components -- { RRLP-Components }
|
||||
;
|
||||
|
||||
PDU ::= SEQUENCE {
|
||||
referenceNumber INTEGER (0..7),
|
||||
component RRLP-Component
|
||||
}
|
||||
|
||||
RRLP-Component ::= CHOICE {
|
||||
msrPositionReq MsrPosition-Req,
|
||||
msrPositionRsp MsrPosition-Rsp,
|
||||
assistanceData AssistanceData,
|
||||
assistanceDataAck NULL,
|
||||
protocolError ProtocolError,
|
||||
...
|
||||
|
||||
}
|
||||
|
||||
END
|
|
@ -0,0 +1,36 @@
|
|||
--- RRLP-Components.asn 2009-10-26 22:10:44.000000000 +0100
|
||||
+++ RRLP-Components.asn 2009-10-26 22:10:44.000000000 +0100
|
||||
@@ -18,16 +18,16 @@
|
||||
Ext-GeographicalInformation, VelocityEstimate
|
||||
FROM
|
||||
MAP-LCS-DataTypes {
|
||||
- ccitt identified-organization (4) etsi (0) mobileDomain (0)
|
||||
- gsm-Network (1) modules (3) map-LCS-DataTypes (25) version5 (5)}
|
||||
+ itu-t identified-organization (4) etsi (0) mobileDomain (0)
|
||||
+ gsm-Network (1) modules (3) map-LCS-DataTypes (25) version11 (11)}
|
||||
|
||||
ExtensionContainer
|
||||
FROM MAP-ExtensionDataTypes {
|
||||
- ccitt identified-organization (4) etsi (0) mobileDomain (0)
|
||||
- gsm-Network (1) modules (3) map-ExtensionDataTypes (21) version4 (4)}
|
||||
+ itu-t identified-organization (4) etsi (0) mobileDomain (0)
|
||||
+ gsm-Network (1) modules (3) map-ExtensionDataTypes (21) version11 (11)}
|
||||
;
|
||||
|
||||
-- Add here other ASN.1 definitions presented below
|
||||
-- in chapters 4 and 5.
|
||||
|
||||
@@ -305,11 +305,11 @@
|
||||
SystemInfoIndex ::= INTEGER (1..32)
|
||||
|
||||
CellIDAndLAC ::= SEQUENCE {
|
||||
- referenceLAC LAC, -- Location area code
|
||||
+ referenceLAC LACID, -- Location area code
|
||||
referenceCI CellID -- Cell identity
|
||||
}
|
||||
CellID ::= INTEGER (0..65535)
|
||||
-LAC ::= INTEGER (0..65535)
|
||||
+LACID ::= INTEGER (0..65535)
|
||||
|
||||
-- OTD-MeasureInfo
|
||||
OTD-MeasureInfo ::= SEQUENCE {
|
|
@ -0,0 +1,339 @@
|
|||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Lesser General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License.
|
|
@ -0,0 +1,674 @@
|
|||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
|
@ -0,0 +1,126 @@
|
|||
/*
|
||||
* gps.c
|
||||
*
|
||||
* A few utility functions to deal with low level GPS data
|
||||
*
|
||||
*
|
||||
* Copyright (C) 2009 Sylvain Munaut <tnt@246tNt.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "gps.h"
|
||||
|
||||
|
||||
#define GET_FIELD_U(w, nb, pos) (((w) >> (pos)) & ((1<<(nb))-1))
|
||||
#define GET_FIELD_S(w, nb, pos) (((int)((w) << (32-(nb)-(pos)))) >> (32-(nb)))
|
||||
|
||||
/*
|
||||
* Unpacks GPS Subframe 1,2,3 payloads (3 * 8 words)
|
||||
*
|
||||
* Note: eph->sv_id is not filled here since not present in those subframes
|
||||
*
|
||||
* (no parity bit checking is done, only the lower 24 bits of each word
|
||||
* are used)
|
||||
*/
|
||||
int
|
||||
gps_unpack_sf123(uint32_t *sf, struct gps_ephemeris_sv *eph)
|
||||
{
|
||||
uint32_t *sf1 = &sf[0];
|
||||
uint32_t *sf2 = &sf[8];
|
||||
uint32_t *sf3 = &sf[16];
|
||||
|
||||
int iode1, iode2;
|
||||
|
||||
eph->week_no = GET_FIELD_U(sf1[0], 10, 14);
|
||||
eph->code_on_l2 = GET_FIELD_U(sf1[0], 2, 12);
|
||||
eph->sv_ura = GET_FIELD_U(sf1[0], 4, 8);
|
||||
eph->sv_health = GET_FIELD_U(sf1[0], 6, 2);
|
||||
eph->l2_p_flag = GET_FIELD_U(sf1[1], 1, 23);
|
||||
eph->t_gd = GET_FIELD_S(sf1[4], 8, 0);
|
||||
eph->iodc = (GET_FIELD_U(sf1[0], 2, 0) << 8) | \
|
||||
GET_FIELD_U(sf1[5], 8, 16);
|
||||
eph->t_oc = GET_FIELD_U(sf1[5], 16, 0);
|
||||
eph->a_f2 = GET_FIELD_S(sf1[6], 8, 16);
|
||||
eph->a_f1 = GET_FIELD_S(sf1[6], 16, 0);
|
||||
eph->a_f0 = GET_FIELD_S(sf1[7], 22, 2);
|
||||
|
||||
iode1 = GET_FIELD_U(sf2[0], 8, 16);
|
||||
eph->c_rs = GET_FIELD_S(sf2[0], 16, 0);
|
||||
eph->delta_n = GET_FIELD_S(sf2[1], 16, 8);
|
||||
eph->m_0 = (GET_FIELD_S(sf2[1], 8, 0) << 24) | \
|
||||
GET_FIELD_U(sf2[2], 24, 0);
|
||||
eph->c_uc = GET_FIELD_S(sf2[3], 16, 8);
|
||||
eph->e = (GET_FIELD_U(sf2[3], 8, 0) << 24) | \
|
||||
GET_FIELD_U(sf2[4], 24, 0);
|
||||
eph->c_us = GET_FIELD_S(sf2[5], 16, 8);
|
||||
eph->a_powhalf = (GET_FIELD_U(sf2[5], 8, 0) << 24) | \
|
||||
GET_FIELD_U(sf2[6], 24, 0);
|
||||
eph->t_oe = GET_FIELD_U(sf2[7], 16, 8);
|
||||
eph->fit_flag = GET_FIELD_U(sf2[7], 1, 7);
|
||||
|
||||
eph->c_ic = GET_FIELD_S(sf3[0], 16, 8);
|
||||
eph->omega_0 = (GET_FIELD_S(sf3[0], 8, 0) << 24) | \
|
||||
GET_FIELD_U(sf3[1], 24, 0);
|
||||
eph->c_is = GET_FIELD_S(sf3[2], 16, 8);
|
||||
eph->i_0 = (GET_FIELD_S(sf3[2], 8, 0) << 24) | \
|
||||
GET_FIELD_U(sf3[3], 24, 0);
|
||||
eph->c_rc = GET_FIELD_S(sf3[4], 16, 8);
|
||||
eph->w = (GET_FIELD_S(sf3[4], 8, 0) << 24) | \
|
||||
GET_FIELD_U(sf3[5], 24, 0);
|
||||
eph->omega_dot = GET_FIELD_S(sf3[6], 24, 0);
|
||||
iode2 = GET_FIELD_U(sf3[7], 8, 16);
|
||||
eph->idot = GET_FIELD_S(sf3[7], 14, 2);
|
||||
|
||||
eph->_rsvd1 = GET_FIELD_U(sf1[1], 23, 0);
|
||||
eph->_rsvd2 = GET_FIELD_U(sf1[2], 24, 0);
|
||||
eph->_rsvd3 = GET_FIELD_U(sf1[3], 24, 0);
|
||||
eph->_rsvd4 = GET_FIELD_U(sf1[4], 16, 8);
|
||||
eph->aodo = GET_FIELD_U(sf2[7], 5, 2);
|
||||
|
||||
/* Check & cross-validate iodc[7:0], iode1, iode2 */
|
||||
if ((iode1 != iode2) || (iode1 != (eph->iodc & 0xff)))
|
||||
return -1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Unpacks GPS Subframe 4 or 5 Almanac pages payload (8 words)
|
||||
*
|
||||
* (no parity bit checking is done, only the lower 24 bits of each word
|
||||
* are used)
|
||||
*/
|
||||
int
|
||||
gps_unpack_sf45_almanac(uint32_t *sf, struct gps_almanac_sv *alm)
|
||||
{
|
||||
alm->sv_id = GET_FIELD_U(sf[0], 6, 16);
|
||||
|
||||
alm->e = GET_FIELD_U(sf[0], 16, 0);
|
||||
alm->t_oa = GET_FIELD_U(sf[1], 8, 16);
|
||||
alm->ksii = GET_FIELD_S(sf[1], 16, 0);
|
||||
alm->omega_dot = GET_FIELD_S(sf[2], 16, 8);
|
||||
alm->sv_health = GET_FIELD_U(sf[2], 8, 0);
|
||||
alm->a_powhalf = GET_FIELD_U(sf[3], 24, 0);
|
||||
alm->omega_0 = GET_FIELD_S(sf[4], 24, 0);
|
||||
alm->w = GET_FIELD_S(sf[5], 24, 0);
|
||||
alm->m_0 = GET_FIELD_S(sf[6], 24, 0);
|
||||
alm->a_f0 = (GET_FIELD_S(sf[7], 8, 16) << 3) | \
|
||||
GET_FIELD_U(sf[7], 3, 2);
|
||||
alm->a_f1 = GET_FIELD_S(sf[7], 11, 5);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -0,0 +1,171 @@
|
|||
/*
|
||||
* gps.h
|
||||
*
|
||||
* Header to deal with low level GPS data
|
||||
*
|
||||
*
|
||||
* Copyright (C) 2009 Sylvain Munaut <tnt@246tNt.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __GPS_H__
|
||||
#define __GPS_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
|
||||
#define MAX_SV 64
|
||||
|
||||
|
||||
/* Ionosperic model data */
|
||||
struct gps_ionosphere_model {
|
||||
/* #bits Scale factor Effective Units */
|
||||
/* (LSB) range */
|
||||
|
||||
int alpha_0; /* s 8 2^-30 seconds */
|
||||
int alpha_1; /* s 8 2^-27 s / semi-circles */
|
||||
int alpha_2; /* s 8 2^-24 s / (semi-circles)^2 */
|
||||
int alpha_3; /* s 8 2^-24 s / (semi-circles)^3 */
|
||||
int beta_0; /* s 8 2^11 seconds */
|
||||
int beta_1; /* s 8 2^14 s / semi-circles */
|
||||
int beta_2; /* s 8 2^16 s / (semi-circles)^2 */
|
||||
int beta_3; /* s 8 2^16 s / (semi-circles)^3 */
|
||||
};
|
||||
|
||||
|
||||
/* UTC model data */
|
||||
struct gps_utc_model {
|
||||
/* #bits Scale factor Effective Units */
|
||||
/* (LSB) range */
|
||||
|
||||
int a0; /* s 32 2^-30 seconds */
|
||||
int a1; /* s 24 2^-50 seconds / seconds */
|
||||
int delta_t_ls; /* s 8 1 seconds */
|
||||
int t_ot; /* u 8 2^12 602,112 seconds */
|
||||
int wn_t; /* u 8 1 weeks */
|
||||
int wn_lsf; /* u 8 1 weeks */
|
||||
int dn; /* u 8 1 7 days */
|
||||
int delta_t_lsf;/* s 8 1 seconds */
|
||||
};
|
||||
|
||||
|
||||
/* Almanach data */
|
||||
struct gps_almanac_sv {
|
||||
int sv_id;
|
||||
int sv_health;
|
||||
|
||||
/* #bits Scale factor Effective Units */
|
||||
/* (LSB) range */
|
||||
|
||||
int e; /* u 16 2^-21 */
|
||||
int t_oa; /* u 8 2^12 602,112 seconds */
|
||||
int ksii; /* s 16 2^-19 semi-circles */
|
||||
int omega_dot; /* s 16 2^-38 semi-circles / s */
|
||||
int a_powhalf; /* u 24 2^-11 meters */
|
||||
int omega_0; /* s 24 2^-23 semi-circles */
|
||||
int w; /* s 24 2^-23 semi-circles */
|
||||
int m_0; /* s 24 2^-23 semi-circles */
|
||||
int a_f0; /* s 11 2^-20 seconds */
|
||||
int a_f1; /* s 11 2^-38 seconds / seconds */
|
||||
};
|
||||
|
||||
struct gps_almanac {
|
||||
int wna;
|
||||
int n_sv;
|
||||
struct gps_almanac_sv svs[MAX_SV];
|
||||
};
|
||||
|
||||
|
||||
/* Ephemeris data */
|
||||
struct gps_ephemeris_sv {
|
||||
int sv_id;
|
||||
|
||||
/* #bits Scale factor Effective Units */
|
||||
/* (LSB) range */
|
||||
|
||||
int code_on_l2; /* u 2 1 / */
|
||||
int week_no; /* u 10 1 week */
|
||||
int l2_p_flag; /* u 1 1 / */
|
||||
int sv_ura; /* u 4 / / */
|
||||
int sv_health; /* u 6 / / */
|
||||
int t_gd; /* s 8 2^-31 seconds */
|
||||
int iodc; /* u 10 / / */
|
||||
int t_oc; /* u 16 2^4 604,784 seconds */
|
||||
int a_f2; /* s 8 2^-55 sec / sec^2 */
|
||||
int a_f1; /* s 16 2^-43 sec / sec */
|
||||
int a_f0; /* s 22 2^-31 seconds */
|
||||
|
||||
int c_rs; /* s 16 2^-5 meters */
|
||||
int delta_n; /* s 16 2^-43 semi-circles / s */
|
||||
int m_0; /* s 32 2^-31 semi-circles */
|
||||
int c_uc; /* s 16 2^-29 radians */
|
||||
unsigned int e; /* u 32 2^-33 0.03 / */
|
||||
int c_us; /* s 16 2^-29 radians */
|
||||
unsigned int a_powhalf; /* u 32 2^-19 meters^(1/2) */
|
||||
int t_oe; /* u 16 2^4 604,784 seconds */
|
||||
int fit_flag; /* u 1 / / */
|
||||
|
||||
int c_ic; /* s 16 2^-29 radians */
|
||||
int omega_0; /* s 32 2^-31 semi-circles */
|
||||
int c_is; /* s 16 2^-29 radians */
|
||||
int i_0; /* s 32 2^-31 semi-circles */
|
||||
int c_rc; /* s 16 2^-5 meters */
|
||||
int w; /* s 32 2^-31 semi-circles */
|
||||
int omega_dot; /* s 24 2^-43 semi-circles / s */
|
||||
int idot; /* s 14 2^-43 semi-circles / s */
|
||||
|
||||
int _rsvd1; /* 23 bits */
|
||||
int _rsvd2; /* 24 bits */
|
||||
int _rsvd3; /* 24 bits */
|
||||
int _rsvd4; /* 16 bits */
|
||||
int aodo; /* 8 bits Not sure it needs to be here ... */
|
||||
};
|
||||
|
||||
struct gps_ephemeris {
|
||||
int n_sv;
|
||||
struct gps_ephemeris_sv svs[MAX_SV];
|
||||
};
|
||||
|
||||
|
||||
/* All assist data */
|
||||
#define GPS_FIELD_IONOSPHERE (1<<0)
|
||||
#define GPS_FIELD_UTC (1<<1)
|
||||
#define GPS_FIELD_ALMANAC (1<<2)
|
||||
#define GPS_FIELD_EPHEMERIS (1<<3)
|
||||
|
||||
struct gps_assist_data {
|
||||
int fields;
|
||||
struct gps_ionosphere_model ionosphere;
|
||||
struct gps_utc_model utc;
|
||||
struct gps_almanac almanac;
|
||||
struct gps_ephemeris ephemeris;
|
||||
};
|
||||
|
||||
|
||||
/* GPS Subframe utility methods (see gps.c for details) */
|
||||
int gps_unpack_sf123(uint32_t *sf, struct gps_ephemeris_sv *eph);
|
||||
int gps_unpack_sf45_almanac(uint32_t *sf, struct gps_almanac_sv *alm);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __GPS_H__ */
|
||||
|
|
@ -0,0 +1,99 @@
|
|||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
#include "gps.h"
|
||||
#include "ubx.h"
|
||||
#include "ubx-parse.h"
|
||||
#include "rrlp.h"
|
||||
|
||||
static int
|
||||
do_ubx_read(struct gps_assist_data *gps, const char *filename)
|
||||
{
|
||||
int rv, fd, i;
|
||||
struct stat st;
|
||||
void *buf;
|
||||
|
||||
/* Load file */
|
||||
fd = open(filename, O_RDONLY);
|
||||
if (fd < 0)
|
||||
return -1;
|
||||
|
||||
rv = fstat(fd, &st);
|
||||
if (rv < 0) {
|
||||
close(fd);
|
||||
return -1;
|
||||
}
|
||||
|
||||
buf = malloc(st.st_size);
|
||||
if (!buf) {
|
||||
close(fd);
|
||||
return -1;
|
||||
}
|
||||
|
||||
rv = read(fd, buf, st.st_size);
|
||||
if (rv != st.st_size) {
|
||||
free(buf);
|
||||
close(fd);
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Parse each message */
|
||||
for (i=0; i<st.st_size;) {
|
||||
int rv;
|
||||
rv = ubx_msg_dispatch(ubx_parse_dt, buf + i, st.st_size - i, gps);
|
||||
if (rv < 0)
|
||||
i++; /* Invalid message: try one byte later */
|
||||
else
|
||||
i += rv;
|
||||
}
|
||||
|
||||
/* Done */
|
||||
free(buf);
|
||||
close(fd);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
do_rrlp(struct gps_assist_data *gps)
|
||||
{
|
||||
struct rrlp_assist_req ar;
|
||||
void *pdus[64];
|
||||
int len[64];
|
||||
int i, rv;
|
||||
|
||||
char *test = "\x28\x00\x80\x10\x01\x32\x00\x19\x4F\x07\x15\x04";
|
||||
|
||||
rrlp_decode_assistance_request(&ar, test, 12);
|
||||
printf("%08x %016llx\n", ar.req_elems, (long long unsigned) ar.eph_svs);
|
||||
|
||||
ar.req_elems = -1;
|
||||
ar.eph_svs = -1LL;
|
||||
rv = rrlp_gps_assist_pdus(gps, &ar, pdus, len, 64);
|
||||
printf("%d\n", rv);
|
||||
for (i=0; i<rv; i++) {
|
||||
printf("%p %d\n", pdus[i], len[i]);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
struct gps_assist_data gps;
|
||||
int rv;
|
||||
|
||||
memset(&gps, 0x00, sizeof(gps));
|
||||
|
||||
rv = do_ubx_read(&gps, "data.ubx");
|
||||
|
||||
rv = do_rrlp(&gps);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -0,0 +1,599 @@
|
|||
/*
|
||||
* rrlp.c
|
||||
*
|
||||
* RRLP implementation
|
||||
*
|
||||
*
|
||||
* Copyright (C) 2009 Sylvain Munaut <tnt@246tNt.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
#include <errno.h>
|
||||
|
||||
#include "gps.h"
|
||||
#include "rrlp.h"
|
||||
|
||||
#include <PDU.h>
|
||||
#include <GPS-AssistData.h>
|
||||
#include <NavigationModel.h>
|
||||
#include <IonosphericModel.h>
|
||||
#include <UTCModel.h>
|
||||
#include <Almanac.h>
|
||||
#include <RefLocation.h>
|
||||
#include <ReferenceTime.h>
|
||||
|
||||
|
||||
/* ------------------------------------------------------------------------ */
|
||||
/* RRLP Assistance request decoding */
|
||||
/* ---------------------------------------------------------------------{{{ */
|
||||
/* Decode and validate the assistance data request messages.
|
||||
* See section 10.10 of
|
||||
* . ETSI TS 149 031 V8.1.0 (2009-01)
|
||||
* . 3GPP TS 49.031 version 8.1.0 Release 8
|
||||
*/
|
||||
|
||||
/* Packed structure from 49.031 spec (RGA = Request GPS Assistance) */
|
||||
|
||||
#define RRLP_RGA0_ALMANAC (1<<0)
|
||||
#define RRLP_RGA0_UTC_MODEL (1<<1)
|
||||
#define RRLP_RGA0_IONO_MODEL (1<<2)
|
||||
#define RRLP_RGA0_NAV_MODEL (1<<3)
|
||||
#define RRLP_RGA0_DGPS (1<<4)
|
||||
#define RRLP_RGA0_REF_LOC (1<<5)
|
||||
#define RRLP_RGA0_REF_TIME (1<<6)
|
||||
#define RRLP_RGA0_ACQ_ASSIST (1<<7)
|
||||
|
||||
#define RRLP_RGA1_REALTIME_INT (1<<0)
|
||||
#define RRLP_RGA1_EPH_EXT (1<<1)
|
||||
#define RRLP_RGA1_EPH_EXT_CHECK (1<<2)
|
||||
|
||||
struct rrlp_rga_hdr {
|
||||
uint8_t items0;
|
||||
uint8_t items1;
|
||||
} __attribute__((packed));
|
||||
|
||||
struct rrlp_rga_eph_sv {
|
||||
uint8_t sv_id; /* [7:6] reserved, [5:0] sv_id */
|
||||
uint8_t iode; /* latest eph in the MS memory in hours */
|
||||
} __attribute__((packed));
|
||||
|
||||
struct rrlp_rga_eph {
|
||||
uint8_t wn_hi; /* [7:6] = wn[9:8] */
|
||||
uint8_t wn_lo; /* wn[7:0] */
|
||||
uint8_t toe; /* latest eph in the MS memory in hours */
|
||||
uint8_t nsat_tmtoe; /* [7:4] nstat, [3:0] T-Toe limit */
|
||||
struct rrlp_rga_eph_sv svs[0];
|
||||
} __attribute__((packed));
|
||||
|
||||
struct rrlp_rga_eph_ext {
|
||||
uint8_t validity; /* in 4 hours units */
|
||||
} __attribute__((packed));
|
||||
|
||||
struct rrlp_rga_eph_ext_check {
|
||||
/* weeks are in gps week modulo 4 */
|
||||
uint8_t wn_begin_end; /* [7:4] begin, [3:0] end */
|
||||
uint8_t tow_begin;
|
||||
uint8_t tow_end;
|
||||
} __attribute__((packed));
|
||||
|
||||
|
||||
/* Parsing function */
|
||||
|
||||
int
|
||||
rrlp_decode_assistance_request(
|
||||
struct rrlp_assist_req *ar,
|
||||
void *req, int req_len)
|
||||
{
|
||||
struct rrlp_rga_hdr *hdr = NULL;
|
||||
struct rrlp_rga_eph *eph = NULL;
|
||||
struct rrlp_rga_eph_ext *eph_ext = NULL;
|
||||
struct rrlp_rga_eph_ext_check *eph_ext_check = NULL;
|
||||
int p = 0;
|
||||
|
||||
/* Reset */
|
||||
ar->req_elems = 0;
|
||||
ar->eph_svs = 0;
|
||||
|
||||
/* Parse message */
|
||||
hdr = req;
|
||||
p += sizeof(struct rrlp_rga_hdr);
|
||||
if (p > req_len)
|
||||
return -1;
|
||||
|
||||
if (hdr->items0 & RRLP_RGA0_NAV_MODEL) {
|
||||
eph = req + p;
|
||||
p += sizeof(struct rrlp_rga_eph);
|
||||
if (p > req_len)
|
||||
return -1;
|
||||
p += (eph->nsat_tmtoe >> 4) * sizeof(struct rrlp_rga_eph_sv);
|
||||
if (p > req_len)
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (hdr->items1 & RRLP_RGA1_EPH_EXT) {
|
||||
eph_ext = req + p;
|
||||
p += sizeof(struct rrlp_rga_eph_ext);
|
||||
if (p > req_len)
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (hdr->items1 & RRLP_RGA1_EPH_EXT_CHECK) {
|
||||
eph_ext_check = req + p;
|
||||
p += sizeof(struct rrlp_rga_eph_ext_check);
|
||||
if (p > req_len)
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (p != req_len)
|
||||
return -2; /* not all bytes consumed ??? */
|
||||
|
||||
/* Print a warning for unsupported requests */
|
||||
if ((eph_ext != NULL) ||
|
||||
(eph_ext_check != NULL) ||
|
||||
(hdr->items0 & (RRLP_RGA0_DGPS | RRLP_RGA0_ACQ_ASSIST)) ||
|
||||
(hdr->items1 & RRLP_RGA1_REALTIME_INT)) {
|
||||
fprintf(stderr, "[w] Unsupported assistance data requested, ignored ...\n");
|
||||
}
|
||||
|
||||
/* Copy the request */
|
||||
if (hdr->items0 & RRLP_RGA0_ALMANAC)
|
||||
ar->req_elems |= RRLP_AR_ALMANAC;
|
||||
|
||||
if (hdr->items0 & RRLP_RGA0_UTC_MODEL)
|
||||
ar->req_elems |= RRLP_AR_UTC_MODEL;
|
||||
|
||||
if (hdr->items0 & RRLP_RGA0_IONO_MODEL)
|
||||
ar->req_elems |= RRLP_AR_IONO_MODEL;
|
||||
|
||||
if (hdr->items0 & RRLP_RGA0_REF_LOC)
|
||||
ar->req_elems |= RRLP_AR_REF_LOC;
|
||||
|
||||
if (hdr->items0 & RRLP_RGA0_REF_TIME)
|
||||
ar->req_elems |= RRLP_AR_REF_TIME;
|
||||
|
||||
if (hdr->items0 & RRLP_RGA0_NAV_MODEL) {
|
||||
int i, n_svs = eph->nsat_tmtoe >> 4;
|
||||
ar->req_elems |= RRLP_AR_EPHEMERIS;
|
||||
for (i=0; i<n_svs; i++)
|
||||
ar->eph_svs |= (1ULL << (eph->svs[i].sv_id - 1));
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* }}} */
|
||||
|
||||
|
||||
/* ------------------------------------------------------------------------ */
|
||||
/* RRLP elements fill */
|
||||
/* ---------------------------------------------------------------------{{{ */
|
||||
|
||||
static void
|
||||
_rrlp_fill_navigation_model_element(
|
||||
struct NavModelElement *rrlp_nme,
|
||||
struct gps_ephemeris_sv *gps_eph_sv)
|
||||
{
|
||||
struct UncompressedEphemeris *rrlp_eph;
|
||||
|
||||
rrlp_nme->satStatus.present = SatStatus_PR_newSatelliteAndModelUC;
|
||||
rrlp_nme->satelliteID = gps_eph_sv->sv_id;
|
||||
|
||||
rrlp_eph = &rrlp_nme->satStatus.choice.newSatelliteAndModelUC;
|
||||
|
||||
rrlp_eph->ephemCodeOnL2 = gps_eph_sv->code_on_l2;
|
||||
rrlp_eph->ephemURA = gps_eph_sv->sv_ura;
|
||||
rrlp_eph->ephemSVhealth = gps_eph_sv->sv_health;
|
||||
rrlp_eph->ephemIODC = gps_eph_sv->iodc;
|
||||
rrlp_eph->ephemL2Pflag = gps_eph_sv->l2_p_flag;
|
||||
rrlp_eph->ephemTgd = gps_eph_sv->t_gd;
|
||||
rrlp_eph->ephemToc = gps_eph_sv->t_oc;
|
||||
rrlp_eph->ephemAF2 = gps_eph_sv->a_f2;
|
||||
rrlp_eph->ephemAF1 = gps_eph_sv->a_f1;
|
||||
rrlp_eph->ephemAF0 = gps_eph_sv->a_f0;
|
||||
rrlp_eph->ephemCrs = gps_eph_sv->c_rs;
|
||||
rrlp_eph->ephemDeltaN = gps_eph_sv->delta_n;
|
||||
rrlp_eph->ephemM0 = gps_eph_sv->m_0;
|
||||
rrlp_eph->ephemCuc = gps_eph_sv->c_uc;
|
||||
rrlp_eph->ephemE = gps_eph_sv->e;
|
||||
rrlp_eph->ephemCus = gps_eph_sv->c_us;
|
||||
rrlp_eph->ephemAPowerHalf = gps_eph_sv->a_powhalf;
|
||||
rrlp_eph->ephemToe = gps_eph_sv->t_oe;
|
||||
rrlp_eph->ephemFitFlag = gps_eph_sv->fit_flag;
|
||||
rrlp_eph->ephemAODA = gps_eph_sv->aodo;
|
||||
rrlp_eph->ephemCic = gps_eph_sv->c_ic;
|
||||
rrlp_eph->ephemOmegaA0 = gps_eph_sv->omega_0;
|
||||
rrlp_eph->ephemCis = gps_eph_sv->c_is;
|
||||
rrlp_eph->ephemI0 = gps_eph_sv->i_0;
|
||||
rrlp_eph->ephemCrc = gps_eph_sv->c_rc;
|
||||
rrlp_eph->ephemW = gps_eph_sv->w;
|
||||
rrlp_eph->ephemOmegaADot = gps_eph_sv->omega_dot;
|
||||
rrlp_eph->ephemIDot = gps_eph_sv->idot;
|
||||
|
||||
rrlp_eph->ephemSF1Rsvd.reserved1 = gps_eph_sv->_rsvd1;
|
||||
rrlp_eph->ephemSF1Rsvd.reserved2 = gps_eph_sv->_rsvd2;
|
||||
rrlp_eph->ephemSF1Rsvd.reserved3 = gps_eph_sv->_rsvd3;
|
||||
rrlp_eph->ephemSF1Rsvd.reserved4 = gps_eph_sv->_rsvd4;
|
||||
}
|
||||
|
||||
static void
|
||||
_rrlp_fill_almanac_element(
|
||||
struct AlmanacElement *rrlp_ae,
|
||||
struct gps_almanac_sv *gps_alm_sv)
|
||||
{
|
||||
rrlp_ae->satelliteID = gps_alm_sv->sv_id;
|
||||
|
||||
rrlp_ae->almanacE = gps_alm_sv->e;
|
||||
rrlp_ae->alamanacToa = gps_alm_sv->t_oa;
|
||||
rrlp_ae->almanacKsii = gps_alm_sv->ksii;
|
||||
rrlp_ae->almanacOmegaDot = gps_alm_sv->omega_dot;
|
||||
rrlp_ae->almanacSVhealth = gps_alm_sv->sv_health;
|
||||
rrlp_ae->almanacAPowerHalf = gps_alm_sv->a_powhalf;
|
||||
rrlp_ae->almanacOmega0 = gps_alm_sv->omega_0;
|
||||
rrlp_ae->almanacW = gps_alm_sv->w;
|
||||
rrlp_ae->almanacM0 = gps_alm_sv->m_0;
|
||||
rrlp_ae->almanacAF0 = gps_alm_sv->a_f0;
|
||||
rrlp_ae->almanacAF1 = gps_alm_sv->a_f1;
|
||||
|
||||
}
|
||||
|
||||
static void
|
||||
_rrlp_fill_ionospheric_model(
|
||||
struct IonosphericModel *rrlp_iono,
|
||||
struct gps_ionosphere_model *gps_iono)
|
||||
{
|
||||
rrlp_iono->alfa0 = gps_iono->alpha_0;
|
||||
rrlp_iono->alfa1 = gps_iono->alpha_1;
|
||||
rrlp_iono->alfa2 = gps_iono->alpha_2;
|
||||
rrlp_iono->alfa3 = gps_iono->alpha_3;
|
||||
rrlp_iono->beta0 = gps_iono->beta_0;
|
||||
rrlp_iono->beta1 = gps_iono->beta_1;
|
||||
rrlp_iono->beta2 = gps_iono->beta_2;
|
||||
rrlp_iono->beta3 = gps_iono->beta_3;
|
||||
}
|
||||
|
||||
static void
|
||||
_rrlp_fill_utc_model(
|
||||
struct UTCModel *rrlp_utc,
|
||||
struct gps_utc_model *gps_utc)
|
||||
{
|
||||
rrlp_utc->utcA1 = gps_utc->a1;
|
||||
rrlp_utc->utcA0 = gps_utc->a0;
|
||||
rrlp_utc->utcTot = gps_utc->t_ot;
|
||||
rrlp_utc->utcWNt = gps_utc->wn_t & 0xff;
|
||||
rrlp_utc->utcDeltaTls = gps_utc->delta_t_ls;
|
||||
rrlp_utc->utcWNlsf = gps_utc->wn_lsf & 0xff;
|
||||
rrlp_utc->utcDN = gps_utc->dn;
|
||||
rrlp_utc->utcDeltaTlsf = gps_utc->delta_t_lsf;
|
||||
}
|
||||
|
||||
/* }}} */
|
||||
|
||||
|
||||
/* ------------------------------------------------------------------------ */
|
||||
/* RRLP Assistance PDU Generation */
|
||||
/* ---------------------------------------------------------------------{{{ */
|
||||
|
||||
struct PDU *
|
||||
_rrlp_create_gps_assist_pdu(int refnum, struct GPS_AssistData **o_gps_ad)
|
||||
{
|
||||
struct PDU *pdu;
|
||||
struct GPS_AssistData *gps_ad;
|
||||
|
||||
pdu = calloc(1, sizeof(*pdu));
|
||||
if (!pdu)
|
||||
return NULL;
|
||||
|
||||
gps_ad = calloc(1, sizeof(*gps_ad));
|
||||
if (!gps_ad) {
|
||||
free(pdu);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (o_gps_ad)
|
||||
*o_gps_ad = gps_ad;
|
||||
|
||||
pdu->referenceNumber = refnum;
|
||||
pdu->component.present = RRLP_Component_PR_assistanceData;
|
||||
pdu->component.choice.assistanceData.gps_AssistData = gps_ad;
|
||||
|
||||
return pdu;
|
||||
}
|
||||
|
||||
static int
|
||||
_rrlp_add_ionospheric_model(
|
||||
struct GPS_AssistData *rrlp_gps_ad,
|
||||
struct gps_assist_data *gps_ad)
|
||||
{
|
||||
struct IonosphericModel *rrlp_iono;
|
||||
|
||||
if (!(gps_ad->fields & GPS_FIELD_IONOSPHERE))
|
||||
return -EINVAL;
|
||||
|
||||
rrlp_iono = calloc(1, sizeof(*rrlp_iono));
|
||||
if (!rrlp_iono)
|
||||
return -ENOMEM;
|
||||
rrlp_gps_ad->controlHeader.ionosphericModel = rrlp_iono;
|
||||
|
||||
_rrlp_fill_ionospheric_model(rrlp_iono, &gps_ad->ionosphere);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
_rrlp_add_utc_model(
|
||||
struct GPS_AssistData *rrlp_gps_ad,
|
||||
struct gps_assist_data *gps_ad)
|
||||
{
|
||||
struct UTCModel *rrlp_utc;
|
||||
|
||||
if (!(gps_ad->fields & GPS_FIELD_UTC))
|
||||
return -EINVAL;
|
||||
|
||||
rrlp_utc = calloc(1, sizeof(*rrlp_utc));
|
||||
if (!rrlp_utc)
|
||||
return -ENOMEM;
|
||||
rrlp_gps_ad->controlHeader.utcModel = rrlp_utc;
|
||||
|
||||
_rrlp_fill_utc_model(rrlp_utc, &gps_ad->utc);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
_rrlp_add_reference_location(
|
||||
struct GPS_AssistData *rrlp_gps_ad,
|
||||
struct gps_assist_data *gps_ad)
|
||||
{
|
||||
struct RefLocation *rrlp_refloc;
|
||||
|
||||
/* FIXME: Check if info is in gps_ad */
|
||||
|
||||
rrlp_refloc = calloc(1, sizeof(*rrlp_refloc));
|
||||
if (!rrlp_refloc)
|
||||
return -ENOMEM;
|
||||
rrlp_gps_ad->controlHeader.refLocation = rrlp_refloc;
|
||||
|
||||
/* FIXME */
|
||||
{
|
||||
uint8_t gps_loc[] = {
|
||||
0x80, /* Ellipsoid Point with altitude */
|
||||
0x48, 0x0f, 0x93, /* 50.667778 N */
|
||||
0x03, 0x47, 0x87, /* 4.611667 E */
|
||||
0x00, 0x72, /* 114m */
|
||||
};
|
||||
uint8_t *b = malloc(sizeof(gps_loc));
|
||||
memcpy(b, gps_loc, sizeof(gps_loc));
|
||||
rrlp_refloc->threeDLocation.buf = b;
|
||||
rrlp_refloc->threeDLocation.size = sizeof(gps_loc);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
_rrlp_add_reference_time(
|
||||
struct GPS_AssistData *rrlp_gps_ad,
|
||||
struct gps_assist_data *gps_ad)
|
||||
{
|
||||
struct ReferenceTime *rrlp_reftime;
|
||||
|
||||
/* FIXME: Check if info is in gps_ad */
|
||||
|
||||
rrlp_reftime = calloc(1, sizeof(*rrlp_reftime));
|
||||
if (!rrlp_reftime)
|
||||
return -ENOMEM;
|
||||
rrlp_gps_ad->controlHeader.referenceTime = rrlp_reftime;
|
||||
|
||||
/* FIXME */
|
||||
// rrlp_reftime.gpsTime.gpsTOW23b = g_gps_tow / 80; /* 23 bits */
|
||||
// rrlp_reftime.gpsTime.gpsWeek = g_gps_week & 0x3ff; /* 10 bits */
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
_rrlp_add_almanac(
|
||||
struct GPS_AssistData *rrlp_gps_ad,
|
||||
struct gps_assist_data *gps_ad, int *start, int count)
|
||||
{
|
||||
int i;
|
||||
struct Almanac *rrlp_alm;
|
||||
struct gps_almanac *gps_alm = &gps_ad->almanac;
|
||||
|
||||
if (!(gps_ad->fields & GPS_FIELD_ALMANAC))
|
||||
return -EINVAL;
|
||||
|
||||
rrlp_alm = calloc(1, sizeof(*rrlp_alm));
|
||||
if (!rrlp_alm)
|
||||
return -ENOMEM;
|
||||
rrlp_gps_ad->controlHeader.almanac = rrlp_alm;
|
||||
|
||||
rrlp_alm->alamanacWNa = gps_alm->wna;
|
||||
if (count == -1)
|
||||
count = gps_alm->n_sv - *start;
|
||||
for (i=*start; (i<*start+count) && (i<gps_alm->n_sv); i++) {
|
||||
struct AlmanacElement *ae;
|
||||
ae = calloc(1, sizeof(*ae));
|
||||
if (!ae)
|
||||
return -ENOMEM;
|
||||
_rrlp_fill_almanac_element(ae, &gps_alm->svs[i]);
|
||||
ASN_SEQUENCE_ADD(&rrlp_alm->almanacList.list, ae);
|
||||
}
|
||||
|
||||
*start = i;
|
||||
|
||||
return i < gps_alm->n_sv;
|
||||
}
|
||||
|
||||
static int
|
||||
_rrlp_add_ephemeris(
|
||||
struct GPS_AssistData *rrlp_gps_ad,
|
||||
struct gps_assist_data *gps_ad, int *start, int count, uint64_t mask)
|
||||
{
|
||||
int i, j;
|
||||
struct NavigationModel *rrlp_nav;
|
||||
struct gps_ephemeris *gps_eph = &gps_ad->ephemeris;
|
||||
|
||||
if (!(gps_ad->fields & GPS_FIELD_EPHEMERIS))
|
||||
return -EINVAL;
|
||||
|
||||
rrlp_nav = calloc(1, sizeof(*rrlp_nav));
|
||||
if (!rrlp_nav)
|
||||
return -ENOMEM;
|
||||
rrlp_gps_ad->controlHeader.navigationModel = rrlp_nav;
|
||||
|
||||
if (count == -1)
|
||||
count = gps_eph->n_sv - *start;
|
||||
for (i=*start,j=0; (j<count) && (i<gps_eph->n_sv); i++) {
|
||||
if (!(mask & (1ULL<<(gps_eph->svs[i].sv_id-1))))
|
||||
continue;
|
||||
struct NavModelElement *nme;
|
||||
nme = calloc(1, sizeof(*nme));
|
||||
if (!nme)
|
||||
return -ENOMEM;
|
||||
_rrlp_fill_navigation_model_element(nme, &gps_eph->svs[i]);
|
||||
ASN_SEQUENCE_ADD(&rrlp_nav->navModelList.list, nme);
|
||||
j++;
|
||||
}
|
||||
|
||||
*start = i;
|
||||
|
||||
return i < gps_eph->n_sv;
|
||||
}
|
||||
|
||||
|
||||
#define MAX_PDUS 64
|
||||
|
||||
int
|
||||
rrlp_gps_assist_pdus(
|
||||
struct gps_assist_data *gps_ad, struct rrlp_assist_req *req,
|
||||
void **o_pdu, int *o_len, int o_max_pdus)
|
||||
{
|
||||
struct PDU *lst_pdu[MAX_PDUS];
|
||||
int lst_cnt = 0;
|
||||
|
||||
struct PDU *rrlp_pdu = NULL;
|
||||
struct GPS_AssistData *rrlp_gps_ad = NULL;
|
||||
uint32_t re = req->req_elems;
|
||||
int i, rv = 0;
|
||||
|
||||
/* IonosphericModel, UTCModel, RefLocation, ReferenceTime */
|
||||
if (re & (RRLP_AR_IONO_MODEL |
|
||||
RRLP_AR_UTC_MODEL |
|
||||
RRLP_AR_REF_TIME |
|
||||
RRLP_AR_REF_LOC))
|
||||
{
|
||||
int pdu_has_data = 0;
|
||||
|
||||
rrlp_pdu = _rrlp_create_gps_assist_pdu(1, &rrlp_gps_ad);
|
||||
if (!rrlp_pdu) {
|
||||
rv = -ENOMEM;
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (re & RRLP_AR_IONO_MODEL)
|
||||
if (!_rrlp_add_ionospheric_model(rrlp_gps_ad, gps_ad))
|
||||
pdu_has_data = 1;
|
||||
|
||||
if (re & RRLP_AR_UTC_MODEL)
|
||||
if (!_rrlp_add_utc_model(rrlp_gps_ad, gps_ad))
|
||||
pdu_has_data = 1;
|
||||
|
||||
if (re & RRLP_AR_REF_TIME)
|
||||
if (!_rrlp_add_reference_time(rrlp_gps_ad, gps_ad))
|
||||
pdu_has_data = 1;
|
||||
|
||||
if (re & RRLP_AR_REF_LOC)
|
||||
if (!_rrlp_add_reference_location(rrlp_gps_ad, gps_ad))
|
||||
pdu_has_data = 1;
|
||||
|
||||
if (pdu_has_data) {
|
||||
lst_pdu[lst_cnt++] = rrlp_pdu;
|
||||
rrlp_pdu = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
/* Almanac */
|
||||
if (re & RRLP_AR_ALMANAC) {
|
||||
i = 0;
|
||||
do {
|
||||
if (!(gps_ad->fields & GPS_FIELD_ALMANAC))
|
||||
break;
|
||||
|
||||
if (!rrlp_pdu) {
|
||||
rrlp_pdu = _rrlp_create_gps_assist_pdu(1, &rrlp_gps_ad);
|
||||
if (!rrlp_pdu) {
|
||||
rv = -ENOMEM;
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
|
||||
rv = _rrlp_add_almanac(rrlp_gps_ad, gps_ad, &i, 10);
|
||||
if (rv < 0)
|
||||
goto error;
|
||||
|
||||
lst_pdu[lst_cnt++] = rrlp_pdu;
|
||||
rrlp_pdu = NULL;
|
||||
} while (rv);
|
||||
}
|
||||
|
||||
/* Ephemeris */
|
||||
if (re & RRLP_AR_EPHEMERIS) {
|
||||
i = 0;
|
||||
do {
|
||||
if (!(gps_ad->fields & GPS_FIELD_EPHEMERIS))
|
||||
break;
|
||||
|
||||
if (!rrlp_pdu) {
|
||||
rrlp_pdu = _rrlp_create_gps_assist_pdu(1, &rrlp_gps_ad);
|
||||
if (!rrlp_pdu) {
|
||||
rv = -ENOMEM;
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
|
||||
rv = _rrlp_add_ephemeris(rrlp_gps_ad, gps_ad, &i, 2, req->eph_svs);
|
||||
|
||||
lst_pdu[lst_cnt++] = rrlp_pdu;
|
||||
rrlp_pdu = NULL;
|
||||
|
||||
} while (rv);
|
||||
}
|
||||
|
||||
/* Serialize & Release all PDUs */
|
||||
for (i=0; i<lst_cnt && i<o_max_pdus; i++) {
|
||||
// asn_fprint(stdout, &asn_DEF_PDU, lst_pdu[i]);
|
||||
rv = uper_encode_to_new_buffer(&asn_DEF_PDU, NULL, lst_pdu[i], &o_pdu[i]);
|
||||
if (rv < 0)
|
||||
goto error;
|
||||
o_len[i] = rv;
|
||||
}
|
||||
|
||||
return lst_cnt;
|
||||
|
||||
/* Release ASN.1 objects */
|
||||
error:
|
||||
if (rrlp_pdu)
|
||||
asn_DEF_PDU.free_struct(&asn_DEF_PDU, (void*)rrlp_pdu, 0);
|
||||
|
||||
for (i=0; i<lst_cnt; i++)
|
||||
asn_DEF_PDU.free_struct(&asn_DEF_PDU, lst_pdu[i], 0);
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
/* }}} */
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
/*
|
||||
* rrlp.h
|
||||
*
|
||||
* RRLP Header
|
||||
*
|
||||
*
|
||||
* Copyright (C) 2009 Sylvain Munaut <tnt@246tNt.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __RRLP_H__
|
||||
#define __RRLP_H__
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "gps.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/* Our internal simplified structure for requests */
|
||||
|
||||
#define RRLP_AR_REF_LOC (1<<0)
|
||||
#define RRLP_AR_REF_TIME (1<<1)
|
||||
#define RRLP_AR_UTC_MODEL (1<<2)
|
||||
#define RRLP_AR_IONO_MODEL (1<<3)
|
||||
#define RRLP_AR_ALMANAC (1<<4)
|
||||
#define RRLP_AR_EPHEMERIS (1<<5)
|
||||
|
||||
struct rrlp_assist_req {
|
||||
uint32_t req_elems;
|
||||
uint64_t eph_svs;
|
||||
};
|
||||
|
||||
|
||||
/* Methods */
|
||||
int rrlp_decode_assistance_request(struct rrlp_assist_req *ar,
|
||||
void *req, int req_len);
|
||||
|
||||
int rrlp_gps_assist_pdus(
|
||||
struct gps_assist_data *gps_ad, struct rrlp_assist_req *req,
|
||||
void **o_pdu, int *o_len, int o_max_pdus);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __RRLP_H__ */
|
||||
|
|
@ -0,0 +1,165 @@
|
|||
/*
|
||||
* ubx-parse.c
|
||||
*
|
||||
* Implementation of parsing code converting UBX messages to GPS assist
|
||||
* data
|
||||
*
|
||||
*
|
||||
* Copyright (C) 2009 Sylvain Munaut <tnt@246tNt.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "gps.h"
|
||||
#include "ubx.h"
|
||||
#include "ubx-parse.h"
|
||||
|
||||
|
||||
/* Helpers */
|
||||
|
||||
static int
|
||||
float_to_fixedpoint(float f, int sf)
|
||||
{
|
||||
if (sf < 0) {
|
||||
while (sf++ < 0)
|
||||
f *= 2.0f;
|
||||
} else {
|
||||
while (sf-- > 0)
|
||||
f *= 0.5f;
|
||||
}
|
||||
|
||||
return (int)f;
|
||||
}
|
||||
|
||||
static inline int
|
||||
double_to_fixedpoint(double d, int sf)
|
||||
{
|
||||
if (sf < 0) {
|
||||
while (sf++ < 0)
|
||||
d *= 2.0;
|
||||
} else {
|
||||
while (sf-- > 0)
|
||||
d *= 0.5;
|
||||
}
|
||||
|
||||
return (int)d;
|
||||
}
|
||||
|
||||
|
||||
/* UBX message parsing to fill gps assist data */
|
||||
|
||||
static void
|
||||
_ubx_msg_parse_nav_posllh(struct ubx_hdr *hdr, void *pl, int pl_len, void *ud)
|
||||
{
|
||||
struct ubx_nav_posllh *nav_posllh = pl;
|
||||
struct gps_assist_data *gps = ud;
|
||||
|
||||
//printf("[.] NAV_POSLLH\n");
|
||||
|
||||
// FIXME: Extract info for "Reference Position"
|
||||
}
|
||||
|
||||
static void
|
||||
_ubx_msg_parse_aid_ini(struct ubx_hdr *hdr, void *pl, int pl_len, void *ud)
|
||||
{
|
||||
struct ubx_aid_ini *aid_ini = pl;
|
||||
struct gps_assist_data *gps = ud;
|
||||
|
||||
//printf("[.] AID_INI\n");
|
||||
|
||||
// FIXME: Extract info for "Reference Time"
|
||||
}
|
||||
|
||||
static void
|
||||
_ubx_msg_parse_aid_hui(struct ubx_hdr *hdr, void *pl, int pl_len, void *ud)
|
||||
{
|
||||
struct ubx_aid_hui *aid_hui = pl;
|
||||
struct gps_assist_data *gps = ud;
|
||||
|
||||
//printf("[.] AID_HUI\n");
|
||||
|
||||
if (aid_hui->flags & 0x2) { /* UTC parameters valid */
|
||||
struct gps_utc_model *utc = &gps->utc;
|
||||
|
||||
gps->fields |= GPS_FIELD_UTC;
|
||||
|
||||
utc->a0 = double_to_fixedpoint(aid_hui->utc_a0, -30);
|
||||
utc->a1 = double_to_fixedpoint(aid_hui->utc_a1, -50);
|
||||
utc->delta_t_ls = aid_hui->utc_ls;
|
||||
utc->t_ot = aid_hui->utc_tot >> 12;
|
||||
utc->wn_t = aid_hui->utc_wnt;
|
||||
utc->wn_lsf = aid_hui->utc_wnf;
|
||||
utc->dn = aid_hui->utc_dn;
|
||||
utc->delta_t_lsf = aid_hui->utc_lsf;
|
||||
}
|
||||
|
||||
if (aid_hui->flags & 0x04) { /* Klobuchar parameters valid */
|
||||
struct gps_ionosphere_model *iono = &gps->ionosphere;
|
||||
|
||||
gps->fields |= GPS_FIELD_IONOSPHERE;
|
||||
|
||||
iono->alpha_0 = float_to_fixedpoint(aid_hui->klob_a0, -30);
|
||||
iono->alpha_1 = float_to_fixedpoint(aid_hui->klob_a1, -27);
|
||||
iono->alpha_2 = float_to_fixedpoint(aid_hui->klob_a2, -24);
|
||||
iono->alpha_3 = float_to_fixedpoint(aid_hui->klob_a3, -24);
|
||||
iono->beta_0 = float_to_fixedpoint(aid_hui->klob_b0, 11);
|
||||
iono->beta_1 = float_to_fixedpoint(aid_hui->klob_b1, 14);
|
||||
iono->beta_2 = float_to_fixedpoint(aid_hui->klob_b2, 16);
|
||||
iono->beta_3 = float_to_fixedpoint(aid_hui->klob_b3, 16);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
_ubx_msg_parse_aid_alm(struct ubx_hdr *hdr, void *pl, int pl_len, void *ud)
|
||||
{
|
||||
struct ubx_aid_alm *aid_alm = pl;
|
||||
struct gps_assist_data *gps = ud;
|
||||
|
||||
//printf("[.] AID_ALM %d - %d\n", aid_alm->sv_id, aid_alm->gps_week);
|
||||
|
||||
if (aid_alm->gps_week) {
|
||||
gps->fields |= GPS_FIELD_ALMANAC;
|
||||
gps->almanac.wna = aid_alm->gps_week & 0xff;
|
||||
gps_unpack_sf45_almanac(aid_alm->alm_words, &gps->almanac.svs[gps->almanac.n_sv++]);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
_ubx_msg_parse_aid_eph(struct ubx_hdr *hdr, void *pl, int pl_len, void *ud)
|
||||
{
|
||||
struct ubx_aid_eph *aid_eph = pl;
|
||||
struct gps_assist_data *gps = ud;
|
||||
|
||||
//printf("[.] AID_EPH %d - %s\n", aid_eph->sv_id, aid_eph->present ? "present" : "not present");
|
||||
|
||||
if (aid_eph->present) {
|
||||
int i = gps->ephemeris.n_sv++;
|
||||
gps->fields |= GPS_FIELD_EPHEMERIS;
|
||||
gps->ephemeris.svs[i].sv_id = aid_eph->sv_id;
|
||||
gps_unpack_sf123(aid_eph->eph_words, &gps->ephemeris.svs[i]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Dispatch table */
|
||||
struct ubx_dispatch_entry ubx_parse_dt[] = {
|
||||
UBX_DISPATCH(NAV, POSLLH, _ubx_msg_parse_nav_posllh),
|
||||
UBX_DISPATCH(AID, INI, _ubx_msg_parse_aid_ini),
|
||||
UBX_DISPATCH(AID, HUI, _ubx_msg_parse_aid_hui),
|
||||
UBX_DISPATCH(AID, ALM, _ubx_msg_parse_aid_alm),
|
||||
UBX_DISPATCH(AID, EPH, _ubx_msg_parse_aid_eph),
|
||||
};
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
/*
|
||||
* ubx-parse.h
|
||||
*
|
||||
* Header for parsing code converting UBX messages to GPS assist data
|
||||
*
|
||||
*
|
||||
* Copyright (C) 2009 Sylvain Munaut <tnt@246tNt.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __UBX_PARSE_H__
|
||||
#define __UBX_PARSE_H__
|
||||
|
||||
|
||||
#include "gps.h"
|
||||
#include "ubx.h"
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/* Dispatch table */
|
||||
extern struct ubx_dispatch_entry ubx_parse_dt[];
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __UBX_PARSE_H__ */
|
||||
|
|
@ -0,0 +1,81 @@
|
|||
/*
|
||||
* ubx.c
|
||||
*
|
||||
* Implementation of generic UBX helpers
|
||||
*
|
||||
*
|
||||
* Copyright (C) 2009 Sylvain Munaut <tnt@246tNt.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "ubx.h"
|
||||
|
||||
|
||||
static void
|
||||
ubx_checksum(uint8_t *data, int len, uint8_t *cksum)
|
||||
{
|
||||
int i;
|
||||
uint8_t ck0 = 0, ck1 = 0;
|
||||
for (i=0; i<len; i++) {
|
||||
ck0 += data[i];
|
||||
ck1 += ck0;
|
||||
}
|
||||
cksum[0] = ck0;
|
||||
cksum[1] = ck1;
|
||||
}
|
||||
|
||||
|
||||
static ubx_msg_handler_t
|
||||
ubx_find_handler(struct ubx_dispatch_entry *dt, uint8_t msg_class, uint8_t msg_id)
|
||||
{
|
||||
while (dt->handler) {
|
||||
if ((dt->msg_class == msg_class) && (dt->msg_id == msg_id))
|
||||
return dt->handler;
|
||||
dt++;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
ubx_msg_dispatch(struct ubx_dispatch_entry *dt,
|
||||
void *msg, int len, void *userdata)
|
||||
{
|
||||
struct ubx_hdr *hdr = msg;
|
||||
uint8_t cksum[2], *cksum_ptr;
|
||||
ubx_msg_handler_t h;
|
||||
|
||||
if ((hdr->sync[0] != UBX_SYNC0) || (hdr->sync[1] != UBX_SYNC1)) {
|
||||
fprintf(stderr, "[!] Invalid sync bytes\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
ubx_checksum(msg + 2, sizeof(struct ubx_hdr) + hdr->payload_len - 2, cksum);
|
||||
cksum_ptr = msg + (sizeof(struct ubx_hdr) + hdr->payload_len);
|
||||
if ((cksum_ptr[0] != cksum[0]) || (cksum_ptr[1] != cksum[1])) {
|
||||
fprintf(stderr, "[!] Invalid checksum\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
h = ubx_find_handler(dt, hdr->msg_class, hdr->msg_id);
|
||||
if (h)
|
||||
h(hdr, msg + sizeof(struct ubx_hdr), hdr->payload_len, userdata);
|
||||
|
||||
return sizeof(struct ubx_hdr) + hdr->payload_len + 2;
|
||||
}
|
||||
|
|
@ -0,0 +1,232 @@
|
|||
/*
|
||||
* ubx.h
|
||||
*
|
||||
* Header for UBX related stuff
|
||||
*
|
||||
*
|
||||
* Copyright (C) 2009 Sylvain Munaut <tnt@246tNt.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __UBX_H__
|
||||
#define __UBX_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
/* Constants used in UBX */
|
||||
|
||||
/* Sync bytes (two first bytes of each message) */
|
||||
#define UBX_SYNC0 0xb5
|
||||
#define UBX_SYNC1 0x62
|
||||
|
||||
/* UBX messages classes */
|
||||
#define UBX_CLASS_NAV 0x01
|
||||
#define UBX_CLASS_RXM 0x02
|
||||
#define UBX_CLASS_INF 0x04
|
||||
#define UBX_CLASS_ACK 0x05
|
||||
#define UBX_CLASS_CFG 0x06
|
||||
#define UBX_CLASS_UPD 0x09
|
||||
#define UBX_CLASS_MON 0x0a
|
||||
#define UBX_CLASS_AID 0x0b
|
||||
#define UBX_CLASS_TIM 0x0d
|
||||
|
||||
/* UBX messages type ID (by class) */
|
||||
#define UBX_NAV_POSECEF 0x01
|
||||
#define UBX_NAV_POSLLH 0x02
|
||||
#define UBX_NAV_STATUS 0x03
|
||||
#define UBX_NAV_DOP 0x04
|
||||
#define UBX_NAV_SOL 0x06
|
||||
#define UBX_NAV_POSUTM 0x08
|
||||
#define UBX_NAV_VELECEF 0x11
|
||||
#define UBX_NAV_VELNED 0x12
|
||||
#define UBX_NAV_TIMEGPS 0x20
|
||||
#define UBX_NAV_TIMEUTC 0x21
|
||||
#define UBX_NAV_CLOCK 0x22
|
||||
#define UBX_NAV_SVINFO 0x30
|
||||
#define UBX_NAV_DGPS 0x31
|
||||
#define UBX_NAV_SBAS 0x32
|
||||
#define UBX_NAV_EKFSTATUS 0x40
|
||||
|
||||
#define UBX_RXM_RAW 0x10
|
||||
#define UBX_RXM_SFRB 0x11
|
||||
#define UBX_RXM_SVSI 0x20
|
||||
#define UBX_RXM_SVSI_GPS 0x20
|
||||
#define UBX_RXM_ALM 0x30
|
||||
#define UBX_RXM_EPH 0x31
|
||||
#define UBX_RXM_POSREQ 0x40
|
||||
|
||||
#define UBX_INF_ERROR 0x00
|
||||
#define UBX_INF_WARNING 0x01
|
||||
#define UBX_INF_NOTICE 0x02
|
||||
#define UBX_INF_TEST 0x03
|
||||
#define UBX_INF_DEBUG 0x04
|
||||
#define UBX_INF_USER 0x07
|
||||
|
||||
#define UBX_ACK_NAK 0x00
|
||||
#define UBX_ACK_ACK 0x01
|
||||
|
||||
#define UBX_CFG_PRT 0x00
|
||||
#define UBX_CFG_USB 0x1b
|
||||
#define UBX_CFG_MSG 0x01
|
||||
#define UBX_CFG_NMEA 0x17
|
||||
#define UBX_CFG_RATE 0x08
|
||||
#define UBX_CFG_CFG 0x09
|
||||
#define UBX_CFG_TP 0x07
|
||||
#define UBX_CFG_NAV2 0x1a
|
||||
#define UBX_CFG_DAT 0x06
|
||||
#define UBX_CFG_INF 0x02
|
||||
#define UBX_CFG_RST 0x04
|
||||
#define UBX_CFG_RXM 0x11
|
||||
#define UBX_CFG_ANT 0x13
|
||||
#define UBX_CFG_FXN 0x0e
|
||||
#define UBX_CFG_SBAS 0x16
|
||||
#define UBX_CFG_LIC 0x80
|
||||
#define UBX_CFG_TM 0x10
|
||||
#define UBX_CFG_TM2 0x19
|
||||
#define UBX_CFG_TMODE 0x1d
|
||||
#define UBX_CFG_EKF 0x12
|
||||
|
||||
#define UBX_UPD_DOWNL 0x01
|
||||
#define UBX_UPD_UPLOAD 0x02
|
||||
#define UBX_UPD_EXEC 0x03
|
||||
#define UBX_UPD_MEMCPY 0x04
|
||||
|
||||
#define UBX_MON_SCHD 0x01
|
||||
#define UBX_MON_IO 0x02
|
||||
#define UBX_MON_IPC 0x03
|
||||
#define UBX_MON_VER 0x04
|
||||
#define UBX_MON_EXCEPT 0x05
|
||||
#define UBX_MON_MSGPP 0x06
|
||||
#define UBX_MON_RXBUF 0x07
|
||||
#define UBX_MON_TXBUF 0x08
|
||||
#define UBX_MON_HW 0x09
|
||||
#define UBX_MON_USB 0x0a
|
||||
|
||||
#define UBX_AID_REQ 0x00
|
||||
#define UBX_AID_INI 0x01
|
||||
#define UBX_AID_HUI 0x02
|
||||
#define UBX_AID_DATA 0x10
|
||||
#define UBX_AID_ALM 0x30
|
||||
#define UBX_AID_EPH 0x31
|
||||
|
||||
#define UBX_TIM_TP 0x01
|
||||
#define UBX_TIM_TM 0x02
|
||||
#define UBX_TIM_TM2 0x03
|
||||
#define UBX_TIM_SVIN 0x04
|
||||
|
||||
|
||||
/* Header */
|
||||
struct ubx_hdr {
|
||||
uint8_t sync[2];
|
||||
uint8_t msg_class;
|
||||
uint8_t msg_id;
|
||||
uint16_t payload_len;
|
||||
} __attribute__((packed));
|
||||
|
||||
|
||||
/* Payload formats (some of them) */
|
||||
struct ubx_nav_posllh {
|
||||
uint32_t itow;
|
||||
int32_t lon; /* scaling 1e-7 */
|
||||
int32_t lat; /* scaling 1e-7 */
|
||||
int32_t height;/* mm */
|
||||
int32_t hsl; /* mm */
|
||||
uint32_t hacc; /* mm */
|
||||
uint32_t vacc; /* mm */
|
||||
} __attribute__((packed));
|
||||
|
||||
struct ubx_aid_ini {
|
||||
int32_t x;
|
||||
int32_t y;
|
||||
int32_t z;
|
||||
uint32_t posacc;
|
||||
uint16_t tm_cfg;
|
||||
uint16_t wn;
|
||||
uint32_t tow;
|
||||
int32_t tow_ns;
|
||||
uint32_t tacc_ms;
|
||||
uint32_t tacc_ns;
|
||||
int32_t clkd;
|
||||
uint32_t clkdacc;
|
||||
uint32_t flags;
|
||||
} __attribute__((packed));
|
||||
|
||||
struct ubx_aid_hui {
|
||||
uint32_t health;
|
||||
double utc_a1;
|
||||
double utc_a0;
|
||||
int32_t utc_tot;
|
||||
int16_t utc_wnt;
|
||||
int16_t utc_ls;
|
||||
int16_t utc_wnf;
|
||||
int16_t utc_dn;
|
||||
int16_t utc_lsf;
|
||||
int16_t utc_spare;
|
||||
float klob_a0;
|
||||
float klob_a1;
|
||||
float klob_a2;
|
||||
float klob_a3;
|
||||
float klob_b0;
|
||||
float klob_b1;
|
||||
float klob_b2;
|
||||
float klob_b3;
|
||||
uint32_t flags;
|
||||
} __attribute__((packed));
|
||||
|
||||
struct ubx_aid_alm {
|
||||
uint32_t sv_id;
|
||||
uint32_t gps_week;
|
||||
uint32_t alm_words[8]; /* Present only if 'gps_week' != 0 */
|
||||
} __attribute__((packed));
|
||||
|
||||
struct ubx_aid_eph {
|
||||
uint32_t sv_id;
|
||||
uint32_t present;
|
||||
uint32_t eph_words[24]; /* Present only if 'present' != 0 */
|
||||
} __attribute__((packed));
|
||||
|
||||
|
||||
/* Message handler */
|
||||
typedef void (*ubx_msg_handler_t)(
|
||||
struct ubx_hdr *hdr, void *payload, int payload_len, void *userdata);
|
||||
|
||||
struct ubx_dispatch_entry {
|
||||
uint8_t msg_class;
|
||||
uint8_t msg_id;
|
||||
ubx_msg_handler_t handler;
|
||||
};
|
||||
|
||||
#define UBX_DISPATCH(kls,id,hdl) { \
|
||||
.msg_class = UBX_CLASS_ ## kls , \
|
||||
.msg_id = UBX_ ## kls ## _ ## id, \
|
||||
.handler = (hdl), \
|
||||
}
|
||||
|
||||
|
||||
/* Methods */
|
||||
int ubx_msg_dispatch(struct ubx_dispatch_entry *dt,
|
||||
void *msg, int len, void *userdata);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __UBX_H__ */
|
||||
|
Loading…
Reference in New Issue