Commit 68b366eb authored by pintar's avatar pintar
Browse files

Minor changes to get error free code

parent 76ca05be
Loading
Loading
Loading
Loading
+27 −2
Original line number Diff line number Diff line
@@ -16,8 +16,33 @@ module LibDiameter_Interface
    import from LibDiameter_TypesAndValues all;
    
    type port DiameterPort message {
          inout RAR_Msg, //TODO specify  all types due to new Diameter Types module
          		RAA_Msg } with { extension "address" };
        		
          inout //RFC 3588
          		CER_MSG,CEA_MSG,
                RAR_MSG,RAA_MSG,
                ACR_MSG,ACA_MSG,
                ASR_MSG,ASA_MSG,
                STR_MSG,STA_MSG,
                DWR_MSG,DWA_MSG,
                DPR_MSG,DPA_MSG,
                //RFC4740
                UAR_MSG,UAA_MSG,
                SAR_MSG,SAA_MSG,
                LIR_MSG,LIA_MSG,
                MAR_MSG,MAA_MSG,
                RTR_MSG,RTA_MSG,
                PPR_MSG,PPA_MSG,
                //Sh interface
                UDR_MSG,UDA_MSG,
                PUR_MSG,PUA_MSG,
                SNR_MSG,SNA_MSG,
                PNR_MSG,PNA_MSG,
                //RFC4006
                CCR_MSG,CCA_MSG,
                //Rx interface
                /*AAR_MSG, AAA_MSG,
                */
                UNKNOWN_MSG} with { extension "address" };
	
    type component DiameterComponent
    {
+39 −15
Original line number Diff line number Diff line
@@ -13,17 +13,17 @@

module LibDiameter_Templates {	

    import from LibDiameter_TypesAndValues all;
    import from LibCommon_DataStrings {type Bit8;}//all;
	//LibCommon    
    import from LibCommon_DataStrings {type Bit1, Bit4, Bit5, Bit8;}//all;
    import from LibCommon_BasicTypesAndValues {type UInt8;};
    
    //LibDiameter
    import from LibDiameter_TypesAndValues all;
    
    group Constants{//move constants into Type module
    	const integer c_versionId := 1;
    	const UInt8 c_versionId := 1;
        const integer c_applidCommonMsg :=  0;			//For DWR, DWA
        const integer c_applidSip := 16777216;			//For other messages 16777216 (Vendor specific applications = 16777216 - 4294967294(0x01000000-0xfffffffe))
        const Bit8 c_cmdflags_Req := '10000000'B;		//CommandFlags = Request
        const Bit8 c_cmdflags_Ans := '00000000'B;		//CommandFlags = Answer
        const Bit8 c_cmdflags_AnsProx := '01000000'B;	//CommandFlags = AnswerProxiable
    }
    
    //internal PIXITS if some
@@ -34,27 +34,51 @@ module LibDiameter_Templates {
	} //end group SubFields
    
    group HeaderFieldTemplates{
        group DiameterHeader{
            template Diameter_Header m_diameterHeaderReq_dummy(Command_Code p_cmdcode) := {
        group DiameterHeaderGroup{        
            template Command_Flags m_cmdFlagsAns := {
              r_bit := '0'B,
              p_bit := '0'B,
              e_bit := '0'B,
              t_bit := '0'B,
              reserved_bits := '0000'B 
            }
        
            template Command_Flags m_cmdFlagsAnsProx modifies m_cmdFlagsAns:= {
              p_bit := '1'B
            }
            
            template Command_Flags m_cmdFlagsReq modifies m_cmdFlagsAns:= {
              r_bit := '1'B
            }
        
            template Command_Flags mw_cmdFlags := {
              r_bit := ?,
              p_bit := ?,
              e_bit := ?,
              t_bit := ?,
              reserved_bits := ?
            }
            
            template DiameterHeader m_diameterHeaderReq_dummy(Command_Code p_cmdcode, integer p_applidSip) := {
                version := c_versionId,
                msglen := 0,					//Message lenght with AVPs has to be calculated
                cmdflags := c_cmdflags_Req,		//RPETrrrr 
                cmdflags := m_cmdFlagsReq,		//RPETrrrr 
                cmdcode := p_cmdcode,			//Command code
                applid := c_applidSip,			//Diameter common messages =0, Vendor specific applications = 16777216 - 4294967294(0x01000000-0xfffffffe)
                applid := p_applidSip,			//Diameter common messages =0, Vendor specific applications = 16777216 - 4294967294(0x01000000-0xfffffffe)
                hopid := omit,
                endid := omit
            }
            
            template Diameter_Header mw_diameterHeaderAns_dummy := {
            template DiameterHeader mw_diameterHeaderAns_dummy(Command_Code p_cmdcode, integer p_applidSip) := {
                version := c_versionId,
                msglen := ?,					//Message lenght with AVPs has to be calculated
                cmdflags := ?,					//RPETrrrr 
                cmdcode := ?,					//Command code
                applid := c_applidSip,			//Diameter common messages =0, Vendor specific applications = 16777216 - 4294967294(0x01000000-0xfffffffe)
                cmdflags := mw_cmdFlags,		//RPETrrrr 
                cmdcode := p_cmdcode,			//Command code
                applid := p_applidSip,			//Diameter common messages =0, Vendor specific applications = 16777216 - 4294967294(0x01000000-0xfffffffe)
                hopid := *,
                endid := *
            }
        } //end group DiameterHeader
        } //end group DiameterHeaderGroup
        
        group SpecificAVPHeaders{
        } //end group SpecificAVPHeaders