networkprotocolmodules/common/asn1rrlp/inc/RRLP-Messages.h
changeset 0 9cfd9a3ee49c
equal deleted inserted replaced
-1:000000000000 0:9cfd9a3ee49c
       
     1 // Copyright (c) 2001-2009 Objective Systems, Inc. (http://www.obj-sys.com) 
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available 
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 
       
     9 /**
       
    10  * This file was generated by the Objective Systems ASN1C Compiler
       
    11  * (http://www.obj-sys.com).
       
    12  */
       
    13 #ifndef RRLP_MESSAGES_H
       
    14 #define RRLP_MESSAGES_H
       
    15 
       
    16 #include <stdio.h>
       
    17 #include <stdlib.h>
       
    18 #include "rtkey.h"
       
    19 #include "rtpersrc/asn1PerCppTypes.h"
       
    20 #include "RRLP-Components.h"
       
    21 
       
    22 /**
       
    23  * Header file for ASN.1 module RRLP-Messages
       
    24  */
       
    25 /**************************************************************/
       
    26 /*                                                            */
       
    27 /*  RRLP_Component                                            */
       
    28 /*                                                            */
       
    29 /**************************************************************/
       
    30 
       
    31 /* Choice tag constants */
       
    32 
       
    33 #define T_RRLP_Component_msrPositionReq 1
       
    34 #define T_RRLP_Component_msrPositionRsp 2
       
    35 #define T_RRLP_Component_assistanceData 3
       
    36 #define T_RRLP_Component_assistanceDataAck 4
       
    37 #define T_RRLP_Component_protocolError  5
       
    38 #define T_RRLP_Component_extElem1       6
       
    39 
       
    40 struct ASN1T_RRLP_Component {
       
    41    int t;
       
    42    union {
       
    43       /* t = 1 */
       
    44       ASN1T_MsrPosition_Req *msrPositionReq;
       
    45       /* t = 2 */
       
    46       ASN1T_MsrPosition_Rsp *msrPositionRsp;
       
    47       /* t = 3 */
       
    48       ASN1T_AssistanceData *assistanceData;
       
    49       /* t = 4 */
       
    50       /* t = 5 */
       
    51       ASN1T_ProtocolError *protocolError;
       
    52       /* t = 6 */
       
    53    } u;
       
    54 } ;
       
    55 
       
    56 IMPORT_C int asn1PE_RRLP_Component (OSCTXT* pctxt, ASN1T_RRLP_Component* pvalue);
       
    57 
       
    58 IMPORT_C int asn1PD_RRLP_Component (OSCTXT* pctxt, ASN1T_RRLP_Component* pvalue);
       
    59 
       
    60 IMPORT_C void asn1Print_RRLP_Component
       
    61    (const char* name, ASN1T_RRLP_Component* pvalue);
       
    62 
       
    63 IMPORT_C void asn1Free_RRLP_Component (OSCTXT *pctxt, ASN1T_RRLP_Component* pvalue);
       
    64 
       
    65 /**************************************************************/
       
    66 /*                                                            */
       
    67 /*  PDU                                                       */
       
    68 /*                                                            */
       
    69 /**************************************************************/
       
    70 
       
    71 #define TV_PDU	(TM_UNIV|TM_CONS|16)
       
    72 
       
    73 struct ASN1T_PDU : public ASN1TPDU {
       
    74    OSUINT8 referenceNumber;
       
    75    ASN1T_RRLP_Component component;
       
    76    IMPORT_C ASN1T_PDU ();
       
    77    IMPORT_C ~ASN1T_PDU ();
       
    78 } ;
       
    79 
       
    80 class ASN1C_PDU :
       
    81 public ASN1CType
       
    82 {
       
    83 protected:
       
    84    ASN1T_PDU& msgData;
       
    85 public:
       
    86    IMPORT_C ASN1C_PDU (ASN1T_PDU& data);
       
    87    IMPORT_C ASN1C_PDU (OSRTMessageBufferIF& msgBuf, ASN1T_PDU& data);
       
    88    IMPORT_C ASN1C_PDU (OSRTContext &context, ASN1T_PDU& data);
       
    89 
       
    90    inline ASN1T_PDU& getData () { return msgData; }
       
    91    inline const ASN1T_PDU& getData () const { return msgData; }
       
    92 
       
    93    // standard encode/decode methods (defined in ASN1CType base class):
       
    94    // int Encode ();
       
    95    // int Decode ();
       
    96 
       
    97    // stream encode/decode methods:
       
    98    IMPORT_C int EncodeTo (OSRTMessageBufferIF& msgBuf);
       
    99    IMPORT_C int DecodeFrom (OSRTMessageBufferIF& msgBuf);
       
   100 
       
   101    IMPORT_C void Print ();
       
   102 } ;
       
   103 
       
   104 IMPORT_C int asn1PE_PDU (OSCTXT* pctxt, ASN1T_PDU* pvalue);
       
   105 
       
   106 IMPORT_C int asn1PD_PDU (OSCTXT* pctxt, ASN1T_PDU* pvalue);
       
   107 
       
   108 IMPORT_C void asn1Print_PDU
       
   109    (const char* name, ASN1T_PDU* pvalue);
       
   110 
       
   111 IMPORT_C void asn1Free_PDU (OSCTXT *pctxt, ASN1T_PDU* pvalue);
       
   112 
       
   113 #endif