/*****************************************************************************

 @(#) $Id: ISUP_Codec.H,v 1.3 2000/10/13 15:45:51 brian Exp $

 -----------------------------------------------------------------------------

 Copyright (C) 1997-2000  Brian Bidulock <bidulock@dallas.net>

 All Rights Reserved.

 This library is free software; you can redistribute it and/or modify it under
 the terms of the GNU Lesser General Public License as published by the Free
 Software Foundation; either version 2.1 of the License, or (at your option)
 any later version.
 
 This library 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 Lesser Public License for more
 details.
 
 You should have received a copy of the GNU Lesser General Public License
 along with this library; if not, write to the Free Software Foundation, Inc.,
 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

 Last Modified $Date: 2000/10/13 15:45:51 $ by $Author: brian $

 -----------------------------------------------------------------------------

 $Log: ISUP_Codec.H,v $
 Revision 1.3  2000/10/13 15:45:51  brian
 First public release.

 *****************************************************************************/

#ifndef __SS7_ISUP_CODEC_H__
#define __SS7_ISUP_CODEC_H__

#include "SS7_Codec.H"

class Codec_INN     : public Set { public: Codec_INN    (); };
class Codec_SCR     : public Set { public: Codec_SCR    (); };
class Codec_PRES    : public Set { public: Codec_PRES   (); };
class Codec_CPNI    : public Set { public: Codec_CPNI   (); };
class Codec_EEM     : public Set { public: Codec_EEM    (); };
class Codec_IW      : public Set { public: Codec_IW     (); };
class Codec_EEI     : public Set { public: Codec_EEI    (); };
class Codec_ISUPI   : public Set { public: Codec_ISUPI  (); };
class Codec_NETPLAN : public Set { public: Codec_NETPLAN(); };
class Codec_NETTYPE : public Set { public: Codec_NETTYPE(); };

class Codec_CLRF   : public Parameter {
    public:
        Field*          CLID;
        Codec_PC*       PCODE;
        Codec_CLRF   ();
    };

class Codec_ATP    : public Parameter {
    public:
        OctetString*    DATA;
        Codec_ATP    ();
    };

class Codec_CDPN   : public Parameter {
    public:
        Set*            NAI;
        Set*            OE;
        Field*          SCR;
        Field*          PRES;
        Set*            NPLAN;
        Set*            INN;
        DigitString*    ADDI;
        Codec_CDPN   ();
    };

class Codec_NCI    : public Parameter {
    public:
        Set*            SATI;
        Set*            CCI;
        Set*            OECHO;
        Field*          SPARE;
        Codec_NCI    ();
    };

class Codec_FCI    : public Parameter {
    public:
        Set*            NIC;
        Set*            EEM;
        Set*            IW;
        Set*            EEI;
        Set*            ISUPI;
        Set*            ISUPPREF;
        Set*            ISDNOA;
        Field*          SPARE;
        Codec_FCI    ();
    };

class Codec_OFCI   : public Parameter {
    public:
        Set*            CUGCI;
        Field*          SPARE1;
        Set*            CCBS;
        Field*          SPARE2;
        Set*            CNI;
        Set*            CNAR;
        Codec_OFCI   ();
    };

class Codec_CPC    : public Parameter {
    public:
        Set*            CPC;
        Codec_CPC    ();
    };

class Codec_CGPN   : public Parameter {
    public:
        Set*            NAI;
        Set*            OE;
        Set*            SCR;
        Set*            PRES;
        Set*            NPLAN;
        Set*            CPNI;
        DigitString*    ADDI;
        Codec_CGPN   ();
    };

class Codec_RDGN   : public Parameter {
    public:
        Set*            NAI;
        Set*            OE;
        Set*            SCR;
        Set*            PRES;
        Set*            NPLAN;
        Field*          INN;
        DigitString*    ADDI;
        Codec_RDGN   ();
    };

class Codec_RDNN   : public Parameter {
    public:
        Set*            NAI;
        Set*            OE;
        Field*          SCR;
        Set*            PRES;
        Set*            NPLAN;
        Set*            INN;
        DigitString*    ADDI;
        Codec_RDNN   ();
    };

class Codec_CONR   : public Parameter {
    public:
        Field*          LREF;
        Codec_PC*       PCODE;
        Field*          PCLASS;
        Field*          CREDIT;
        Codec_CONR   ();
    };

class Codec_INRI   : public Parameter {
    public:
        Set*            CPA;
        Set*            CPAH;
        Set*            CNA;
        Set*            CPC;
        Set*            CRG;
        Set*            RDA;
        Set*            INX;
        Set*            MCI;
        Set*            MCIH;
        Field*          SPARE;
        Set*            MLBG;
        Codec_INRI   ();
    };

class Codec_INFI   : public Parameter {
    public:
        Set*            CPA;
        Set*            CPAH;
        Set*            CNA;
        Set*            CPC;
        Set*            CRG;
        Set*            RDA;
        Set*            INX;
        Set*            SOLINF;
        Field*          SPARE;
        Set*            MLBG;
        Codec_INFI   ();
    };

class Codec_COTI   : public Parameter {
    public:
        Set*            COTI;
        Codec_COTI   ();
    };

class Codec_BCI    : public Parameter {
    public:
        Set*            CRGI;
        Set*            CPS;
        Set*            CPCI;
        Set*            EEM;
        Set*            IW;
        Set*            EEI;
        Set*            ISUPI;
        Set*            HOLDR;
        Set*            ISDNTA;
        Set*            IECHO;
        Set*            SCCPMD;
        Codec_BCI    ();
    };

class Codec_CAUS   : public Parameter {
    public:
        Set*            LOC;
        Set*            CODING;
        Field*          CODING_X;
        Bra*            CODING_X_B;
        Set*            CAUSV;
        Set*            REC;
        Codec_NULL*     NOREC;
        Codec_CAUS   ();
    };

class Codec_RDI    : public Parameter {
    public:
        Set*            RDGI;
        Set*            CFNR;
        Set*            ORGRR;
        Field*          COUNT;
        Set*            RDGR;
        Codec_RDI    ();
    };

class Codec_CGI    : public Parameter {
    public:
        Set*            TYPE;
        Codec_CGI    ();
    };

class Codec_RnS    : public Parameter {
    public:
        Field*          RANGE;
        OctetString*    STATUS;
        Codec_RnS    ();
    };

class Codec_FACI   : public Parameter {
    public:
        Set*            FACI;
        Codec_FACI   ();
    };

class Codec_FAII   : public Parameter {
    public:
        Set*            CPF;
        Set*            CPAN;
        Set*            FRE;
        Set*            FRA;
        Field*          SPARE;
        Codec_FAII   ();
    };

class Codec_CUGI   : public Parameter {
    public:
        Field*          BCODE;
        OctetString*    NETID;
        Codec_CUGI   ();
    };

class Codec_INDEX  : public Parameter {
    public:
        Field*          INDEX;
        Codec_INDEX  ();
    };

class Codec_USI    : public Parameter {
    public:
        Set*            ITC;
        Set*            CODING;
        Field*          EXT1;
        Set*            ITR;
        Set*            ITM;
        Field*          EXT2;
        Codec_USI    ();
    };

class Codec_ISPC   : public Parameter {
    public:
        Codec_PC*       PCODE;
        Codec_ISPC   ();
    };

class Codec_UUI    : public Parameter {
    public:
        OctetString*    DATA;
        Codec_UUI    ();
    };

class Codec_CONN   : public Parameter {
    public:
        Set*            NAI;
        Set*            OE;
        Set*            SCR;
        Set*            PRES;
        Set*            NPLAN;
        Field*          INN;
        DigitString*    ADDI;
        Codec_CONN   ();
    };

class Codec_SRIS   : public Parameter {
    public:
        Set*            SRI;
        Codec_SRIS   ();
    };

class Codec_TNS    : public Parameter {
    public:
        Set*            NETPLAN;
        Set*            NETTYPE;
        Set*            OE;
        DigitString*    ADDI;
        Codec_TNS    ();
    };

class Codec_EVNT   : public Parameter {
    public:
        Set*            EVNTI;
        Set*            EVNTP;
        Codec_EVNT   ();
    };

class Codec_CSI    : public ParameterR {
    public:
        Set*            CSTATE;
        Codec_CSI    ();
        Codec_CSI    (const Codec_CSI&);
        Codec_CSI*   copy();
    };

class Codec_ACL    : public Parameter {
    public:
        Set*            ACL;
        Codec_ACL    ();
    };

class Codec_OCDN   : public Parameter {
    public:
        Set*            NAI;
        Set*            OE;
        Field*          SCR;
        Set*            PRES;
        Set*            NPLAN;
        Field*          INN;
        DigitString*    ADDI;
        Codec_OCDN   ();
    };

class Codec_OBCI   : public Parameter {
    public:
        Set*            IBI;
        Set*            CFMO;
        Field*          SPARE;
        Set*            USRNET;
        Codec_OBCI   ();
    };

class Codec_GENADR : public Parameter {
    public:
        Set*            TYPADR;
        Set*            NAI;
        Set*            OE;
        Field*          SCR;
        Set*            PRES;
        Set*            NPLAN;
        Field*          INN;
        DigitString*    ADDI;
        Codec_GENADR ();
    };

class Codec_GENDIG : public Parameter {
    public:
        Set*            TYPDIG;
        Set*            GENES;
        DigitString*    ADDI;
        Codec_GENDIG ();
    };

class Codec_EGRESS : public Parameter {
    public:
        OctetString*    DATA;
        Codec_EGRESS ();
    };

class Codec_JUR    : public Parameter {
    public:
        DigitString*    ADDI;
        Codec_JUR    ();
    };

class Codec_CIDC   : public Parameter {
    public:
        Set*            NETPLAN;
        Set*            NETTYPE;
        DigitString*    ADDI;
        Codec_CIDC   ();
    };

class Codec_BGROUP : public Parameter {
    public:
        Set*            PSEL;
        Field*          LPII;
        Set*            BGIDT;
        Set*            AS;
        Field*          SPARE;
        Field*          BGID;
        Field*          SUBID;
        Set*            TBGLP;
        Set*            OBGLP;
        Codec_BGROUP ();
    };

class Codec_NOTI   : public Parameter {
    public:
        Set*            NOT;
        Codec_NOTI   ();
    };

class Codec_SVACT  : public Parameter {
    public:
        Set*            SVACT;
        Codec_SVACT  ();
    };

class Codec_TRNSRQ : public Parameter {
    public:
        Field*          TRANSID;
        Codec_CPA*      CPA;
        Codec_TRNSRQ ();
    };

class Codec_SPR    : public Parameter {
    public:
        Set*            SPR;
        Codec_SPR    ();
    };

class Codec_CGCI   : public Parameter {
    public:
        Set*            CGTYP;
        Set*            DSC;
        Set*            ACI;
        Set*            CCRI;
        Codec_CGCI   ();
    };

class Codec_CVRI   : public Parameter {
    public:
        Set*            CVRI;
        Codec_CVRI   ();
    };

class Codec_OTGN   : public Parameter {
    public:
        DigitString*    ADDI;
        Codec_OTGN   ();
    };

class Codec_CIN    : public Parameter {
    public:
        AsciiString*    CIN;
        Codec_CIN    ();
    };

class Codec_CLLI   : public Parameter {
    public:
        AsciiString*    CLLI;
        Codec_CLLI   ();
    };

class Codec_OLI    : public Parameter {
    public:
        Set*            OLI;
        Codec_OLI    ();
    };

class Codec_CHGN   : public Parameter {
    public:
        Set*            NAI;
        Set*            OE;
        Field*          SCR;
        Field*          PRES;
        Set*            NPLAN;
        Field*          INN;
        DigitString*    ADDI;
        Codec_CHGN   ();
    };

class Codec_SVCD   : public Parameter {
    public:
        Field*          SVCD;
        Codec_SVCD   ();
    };

class Codec_CSEL   : public Parameter {
    public:
        Set*            CSEL;
        Codec_CSEL   ();
    };

class Codec_CDPN_M : public ParameterPL {
    public:
        Field*          PTR;
        Field*          LEN;
        Codec_CDPN*     CDPN;
        Codec_CDPN_M ();
    };

class Codec_CAUS_M : public ParameterPL {
    public:
        Field*          PTR;
        Field*          LEN;
        Codec_CAUS*     CAUS;
        Codec_CAUS_M ();
    };

class Codec_RnS_M  : public ParameterPL {
    public:
        Field*          PTR;
        Field*          LEN;
        Codec_RnS*      RnS;
        Codec_RnS_M  ();
    };

class Codec_USI_M  : public ParameterPL {
    public:
        Field*          PTR;
        Field*          LEN;
        Codec_USI*      USI;
        Codec_USI_M  ();
    };

class Codec_CSI_M  : public ParameterPL {
    public:
        Field*          PTR;
        Field*          LEN;
        Codec_CSI*      CSI;
        Codec_CSI_M  ();
    };

class Codec_IOPARM : public ParameterNL {
    public:
        Field*          PNAM;
        Field*          PL;
        Bra*            PNAM_B;
        Codec_IOPARM(char*,char*,Codec**);
        Codec_IOPARM(const Codec_IOPARM&);
        Codec_IOPARM* copy();
    };

class Codec_IOPARMS : public ParameterP {
    public:
        Field*          PTR;
        Codec_IOPARM*   OPARM;
        Codec_CLRF*     CLRF;
        Codec_ATP*      ATP;
        Codec_CDPN*     CDPN;
        Codec_NCI*      NCI;
        Codec_FCI*      FCI;
        Codec_OFCI*     OFCI;
        Codec_CPC*      CPC;
        Codec_CGPN*     CGPN;
        Codec_RDGN*     RDGN;
        Codec_RDNN*     RDNN;
        Codec_CONR*     CONR;
        Codec_INRI*     INRI;
        Codec_INFI*     INFI;
        Codec_COTI*     COTI;
        Codec_BCI*      BCI;
        Codec_CAUS*     CAUS;
        Codec_RDI*      RDI;
        Codec_CGI*      CGI;
        Codec_RnS*      RnS;
        Codec_FACI*     FACI;
        Codec_FAII*     FAII;
        Codec_CUGI*     CUGI;
        Codec_INDEX*    INDEX;
        Codec_USI*      USI;
        Codec_ISPC*     ISPC;
        Codec_UUI*      UUI;
        Codec_CONN*     CONN;
        Codec_SRIS*     SRIS;
        Codec_TNS*      TNS;
        Codec_EVNT*     EVNT;
        Codec_CSI*      CSI;
        Codec_ACL*      ACL;
        Codec_OCDN*     OCDN;
        Codec_OBCI*     OBCI;
        Codec_GENADR*   GENADR;
        Codec_GENDIG*   GENDIG;
        Codec_EGRESS*   EGRESS;
        Codec_JUR*      JUR;
        Codec_CIDC*     CIDC;
        Codec_BGROUP*   BGROUP;
        Codec_NOTI*     NOTI;
        Codec_SVACT*    SVACT;
        Codec_TRNSRQ*   TRNSRQ;
        Codec_SPR*      SPR;
        Codec_CGCI*     CGCI;
        Codec_CVRI*     CVRI;
        Codec_OTGN*     OTGN;
        Codec_CIN*      CIN;
        Codec_CLLI*     CLLI;
        Codec_OLI*      OLI;
        Codec_CHGN*     CHGN;
        Codec_SVCD*     SVCD;
        Codec_CSEL*     CSEL;
        Codec_UREC*     UREC;
        Field*          PNAM;
        Field*          PL;
        Bra*            PNAM_B;
        Codec_IOPARMS(char*,char*);
    };


class Codec_ISUP : public Header {
    public:
        Field*          MT;
        Bra*            MT_B;
        
        Codec_CDPN_M*   CDPN;
        Codec_NCI*      NCI;
        Codec_FCI*      FCI;
        Codec_CPC*      CPC;
        Codec_INRI*     INRI;
        Codec_INFI*     INFI;
        Codec_COTI*     COTI;
        Codec_BCI*      BCI;
        Codec_CAUS_M*   CAUS;
        Codec_CGI*      CGI;
        Codec_RnS_M*    RnS;
        Codec_FACI*     FACI;
        Codec_FAII*     FAII;
        Codec_USI_M*    USI;
        Codec_SRIS*     SRIS;
        Codec_EVNT*     EVNT;
        Codec_CSI_M*    CSI;
        Codec_CGCI*     CGCI;
        Codec_CVRI*     CVRI;
        Codec_IOPARMS*  OPARMS;
        
        ParameterG*     IAM;
        ParameterG*     INR;
        ParameterG*     INF;
        ParameterG*     COT;
        ParameterG*     ACM;
        ParameterG*     FOT;
        ParameterG*     ANM;
        ParameterG*     REL;
        ParameterG*     SUS;
        ParameterG*     RES;
        ParameterG*     RLC;
        ParameterG*     CCR;
        ParameterG*     RSC;
        ParameterG*     BLO;
        ParameterG*     UBL;
        ParameterG*     BLA;
        ParameterG*     UBA;
        ParameterG*     GRS;
        ParameterG*     CGB;
        ParameterG*     CGU;
        ParameterG*     CGBA;
        ParameterG*     CGUA;
        ParameterG*     FAR;
        ParameterG*     FAA;
        ParameterG*     FRJ;
        ParameterG*     FAD;
        ParameterG*     FAI;
        ParameterG*     LPA;
        ParameterG*     PAM;
        ParameterG*     GRA;
        ParameterG*     CQM;
        ParameterG*     CQR;
        ParameterG*     CPG;
        ParameterG*     UCIC;
        ParameterG*     CFN;
        ParameterG*     CRA;
        ParameterG*     CRM;
        ParameterG*     CVR;
        ParameterG*     CVT;
        ParameterG*     EXM;

        Codec_ISUP();
    };

#endif __SS7_ISUP_CODEC_H__

