Commit 0d6ac121 authored by filatov's avatar filatov
Browse files

Merged revision(s) 553-628 from branches/v3:

Inputs from TTCN-3 users added by STF471
........
Update to user input, after compilation with another ttcn-3 compiler
........
Deprecated module parameter group notation updated
........
LibIMS update modifications extending to LibSIP
........
More template restrictions for LibSIP_Templates
........
Changed vc_route from template to template(omit).
Minor fix.
........
Further fixes.
........
STF471: Unifies templates (step1)
........
STF471: Unifies templates (step2)
........
STF471: Unifies templates (step3)
........
STF471: Unifies templates (step4)
........
LibSIP update:
* sizeof() -> lengthof()
* template restrictions added for template parameters where possible
........
STF471: Unifies templates (step5)
........
Merge rev. 565/566
........
template restrictions added for LibSIP_SMS templates
........
STF471: Unifies templates (step6)
........
Changed vc_route_REG from template to template(omit).
........
STF471: Add PIXITs templates
STF471: source formatting (step1)
........
Further reduction of warnings.
........
Updates for LibSip modification after compilation with another tool
........
Replaced ispresent->isvalue in LibSIP
........
Using template m_cSeq from SIP instead of local IMS one.
........
move *.ttcn3view files to dedicated folder
........
Merge with changes done by STF467
........
Removed invalid group end.
........
Introduced mw_Response_xxx_Base templates.
........
Introduced mw_Response_StatusCode_Base.
........
More template restrictions added where possible
........
Initial formatting.
........
Default parameter values added, where possible
........
Initial ATS specific modulepar removal result
........
Updated issues identified by T3Q 
........
The rest of issues identified by T3Q
........
Another round of PIXIT removal
........
encoding attribute updated
........
Merge code with STF467 (session week#12)
........
Fixed compilation problems.
Calling f_selfOrClientSyncAndVerdict is now commented and needs to be checked!
........
SipComponent now extends from SelfSyncComp to allow usage of LibCommon_Sync functionality.
........
Container module importing all known LibSip modules in a public way, so the imports will be visible for all modules importing the LibSip_Library module.
........
Removed explicit usage of PX_SIP_TACK, PX_SIP_TRESP as the component timer is implicitely initialized with the module parameter values.
........
XSD files refreshed and common formatting applied
........
sizeof->lengthof
........
STF160 proposed modifications applied to LibSIP
........
opaque param related TODO-s removed
........
update of RFC3891 to separate mandatory callid from optional replacesParams
........
add of file descriptions for t3doc
........
add short descriptions for t3doc
........
update of the file headers for STF471
........
parent 0cfc0ee7
Loading
Loading
Loading
Loading

trunk/XSDAUX.ttcn

deleted100644 → 0
+0 −150
Original line number Diff line number Diff line
module XSDAUX {//MRO
	/* 0.anySimpleType */
	type anytype anySimpleType;

	/* 1.string */
	type charstring string;

	/* 2.boolean */
	type integer bitXSD (1, 0) ;
	
	type union booleanXSD {
		bitXSD bit, boolean bool
	}

	/* 3.decimal */
	type float decimal;

	/* 4.float */
	type float floatXSD;

	/* 5.double */
	type float double;

	/* 6.duration */
	type charstring duration;

	/* 7.dateTime */
	type charstring dateTime;

	/* 8.time */
	type charstring time;

	/* 9.date */
	type charstring date;

	/* 10.gYearMonth */
	type charstring gYearMonth;

	/* 11.gYear */
	type charstring gYear;

	/* 12.gMonthDay */
	type charstring gMonthDay;

	/* 13.gDay */
	type charstring gDay;

	/* 14.gMonth */
	type charstring gMonth;

	/* 15.hexBinary */
	type hexstring hexBinary;

	/* 16.base64Binary */
	type charstring base64Binary;

	/* 17.anyURI */
	type charstring anyURI;

	/* 18.QName */
	type charstring QName;

	/* 19.NOTATION */
	type charstring NOTATION;

	/* 20.normalizedString */
	type charstring normalizedString;

	/* 21.token */
	type charstring token;

	/* 22.language */
	type charstring languageXSD;

	/* 23.NMTOKEN */
	type charstring NMTOKEN;

	/* 24.NMTOKENS */
	type set of charstring NMTOKENS;

	/* 25.Name */
	type charstring Name;

	/* 27.NCName */
	type charstring NCName;

	/* 28.ID */
	type charstring ID;

	/* 29.IDREFS */
	type set of charstring IDREFS;

	/* 30.ENTITY */
	type charstring ENTITY;

	/* 31.ENTITIES */
	type set of charstring ENTITIES;

	/* 32.nonPositiveInteger */
	type integer nonPositiveInteger (- infinity .. 0) ;

	/* 33.negativeInteger */
	type integer negativeInteger (- infinity .. - 1) ;

	/* 34.long */
//	type integer long (- 9223372036854775808 .. 9223372036854775807) ;//MRO

	/* 35.int */
	type integer int (- 2147483648 .. 2147483647) ;

	/* 36.short */
	type integer short (- 32768 .. 32767) ;

	/* 37.byte */
	type integer byte (- 128 .. 127) ;

	/* 38.nonNegativeInteger */
	type integer nonNegativeInteger (0 .. infinity) ;

	/* 39.unsignedLong */
	type integer unsignedLong (0 .. 18446744073709551615) ;//MRO

	/* 40.unsignedInt */
	type integer unsignedInt (0 .. 4294967295) ;

	/* 41.unsignedShort */
	type integer unsignedShort (0 .. 65535) ;

	/* 42.unsignedByte */
	type integer unsignedByte (0 .. 255) ;

	/* 43.positiveInteger */
	type integer positiveInteger (1 .. infinity) ;

	/* 44.integer */
	type integer integerXSD;

	/* 45.anyAttributes */
	type record of record {
		charstring name, 
		charstring val
	} anyAttributes;

	/* 46. anyType */
	/**
	 * This is to represent elements without a given type
	 */
	type record anyType {
	}
}
+189 −169
Original line number Diff line number Diff line
/*
 *	@author 	STF 346, STF366, STF368, STF369, STF450
/**
 *  @author     STF 346, STF366, STF368, STF369, STF450, STF471
 *  @version    $Id$
 *  @desc       This module provides the types used by the test component
 *              for SIP-IMS tests. Module become from STF306 and STF334-336
 *              This module is part of LibSipV2.
 *              This module is part of LibSipV3.
 */

module LibSip_Interface
{	
module LibSip_Interface {
    // LibCommon
    import from LibCommon_Sync all;
    import from LibCommon_AbstractData all;
@@ -20,46 +18,66 @@ module LibSip_Interface

    import from LibSip_PIXITS all;

	group AdressTypes
	{
	  type record address4SIP
	  {
    group AdressTypes {
        type record Address4SIP {
            // HostPort
		charstring 	        host optional,        // hostname, IPv4 or IPv6
		integer             portField optional    // represented as an integer
	  } with { encode "SIPCodec" }
            charstring host optional,
            // hostname, IPv4 or IPv6
            integer portField
             optional // represented as an integer
        } with {
            encode "LibSip V3";
        }

        type Address4SIP address;

	  type address4SIP address;

    } // end group AdressTypes

    type port SipPort message {
		  inout Request, 
		  		REGISTER_Request, 
		  		INVITE_Request,
				OPTIONS_Request,
				BYE_Request,
		  		CANCEL_Request, 
		  		ACK_Request, 
		  		PRACK_Request, 
		  		NOTIFY_Request, 
		  		SUBSCRIBE_Request, 
		  		PUBLISH_Request, 
		  		UPDATE_Request,
		  		REFER_Request,
				MESSAGE_Request,
				INFO_Request,
		  		Response, 
		  		Raw } with { extension "address" };
		  		
	signature s_SIP_conversation (in charstring text, out boolean answer);
	signature s_SIP_ringing (in charstring text, out boolean answer);
    signature s_SIP_announcementA (in charstring text, out boolean answer);
	signature s_SIP_announcementB (in charstring text, out boolean answer);
	signature s_SIP_announcement (in charstring text, out boolean answer);
	signature s_SIP_voiceMessage (in charstring text, out boolean answer);
    signature s_SIP_mediastopped (in charstring text, out boolean answer);
 	type port operatorPort procedure {inout s_SIP_conversation; inout s_SIP_ringing; inout s_SIP_announcementA; inout s_SIP_announcementB; inout s_SIP_announcement; inout s_SIP_voiceMessage; inout s_SIP_mediastopped};
        inout Request, REGISTER_Request, INVITE_Request, OPTIONS_Request, BYE_Request, CANCEL_Request, ACK_Request, PRACK_Request, NOTIFY_Request, SUBSCRIBE_Request, PUBLISH_Request, UPDATE_Request, REFER_Request, MESSAGE_Request, INFO_Request, Response, Raw;
    }
    with {
        extension "address";
    }

    signature s_SIP_conversation(
        in charstring p_text,
        out boolean p_answer
    ) ;
    signature s_SIP_ringing(
        in charstring p_text,
        out boolean p_answer
    ) ;
    signature s_SIP_announcementA(
        in charstring p_text,
        out boolean p_answer
    ) ;
    signature s_SIP_announcementB(
        in charstring p_text,
        out boolean p_answer
    ) ;
    signature s_SIP_announcement(
        in charstring p_text,
        out boolean p_answer
    ) ;
    signature s_SIP_voiceMessage(
        in charstring p_text,
        out boolean p_answer
    ) ;
    signature s_SIP_mediastopped(
        in charstring p_text,
        out boolean p_answer
    ) ;
    type port OperatorPort procedure {
        inout s_SIP_conversation;
        inout s_SIP_ringing;
        inout s_SIP_announcementA;
        inout s_SIP_announcementB;
        inout s_SIP_announcement;
        inout s_SIP_voiceMessage;
        inout s_SIP_mediastopped;
    }

    // Solution for building error problem. (Important for validation)
    // type component ImsComponent extends SipComponent need to be located in LibIms_Interface and not in LibSip_Interface module
@@ -69,25 +87,21 @@ module LibSip_Interface
    // // general variables
    // var ImsInterfaceProfile vc_interfaceprofile
    // } // end ImsComponent

	type component SipComponent
	{
    type component SipComponent extends SelfSyncComp {
        // port
        port SipPort SIPP;
        // used for communication with the operator
	  port operatorPort opPort;
        port OperatorPort opPort;

        // current address to send TCP/UDP messages
        var SipUserProfile vc_userprofile; // PIXIT userinformation
        var address vc_sent_label; // removed because this value is predefined and used to open socket := {host := PX_SIP_SUT_IPADDR, portField := PX_SIP_SUT_PORT};

        // last incoming message
        var Response vc_response; // last incoming response message
        var boolean vc_boo_response := false; // to check if response received or not
        var Request vc_request; // last incoming request message
        var boolean vc_boo_request := false; // to check if request received or not
        var Request vc_requestFor407; // last INVITE request to be authorized if 407/401 received from Proxy

        var SipUrl vc_requestUri := c_empty_RequestUri;
        var SipUrl vc_requestUri2 := c_empty_RequestUri; // MRO
        var charstring vc_branch := "";
@@ -95,35 +109,50 @@ module LibSip_Interface
        var charstring vc_branch_SCSCF := "";

        // SIP message header fields (for building next message)
	  var CallId	vc_callId    	:= c_empty_CallId;
	  var CallId	vc_callIdReg 	:= c_empty_CallId;
        var template(omit) CallId vc_callId := c_empty_CallId;
        var template(omit) CallId vc_callIdReg := c_empty_CallId;
        var template(omit) CallId vc_callIdSub := c_empty_CallId;
        var From vc_from := c_empty_From;
        var To vc_to := c_empty_To;
        var To vc_cancel_To := c_empty_To; // used for next CANCEL
        var Via vc_via := c_empty_Via;
        var Via vc_via_REG := c_empty_Via; // via used in last REGISTER
        var ContentType vc_contentType := c_empty_ContentType; // MRO
	  
	  var template RecordRoute vc_recordRoute; 			 // value of RecordRoute header
        var template(omit) RecordRoute vc_recordRoute; // value of RecordRoute header
        var boolean vc_boo_recordRoute := false; // boolean indicates valid recordRoute
	  var template Route		vc_route; 					 // value of Route header
	  var template Route		vc_route_REG;				 // value of Route header from registration ServiceRoute header for initial Requests
        var template(omit) Route vc_route; // value of Route header
        var template(omit) Route vc_route_REG; // value of Route header from registration ServiceRoute header for initial Requests
        var
        UrnUriComponents
            vc_reqUrnUri := {
                namespaceId := "",
                namespaceSpecificString := ""
            };
        var boolean vc_boo_route := false; // boolean indicates valid Route

	  var Contact	vc_contact; 			// value of Contact header
        var template(omit) Contact vc_contact; // value of Contact header
        var CSeq vc_cSeq := c_empty_cSeq; // value of CSeq header
	  var RAck 		vc_rAck 		:= { fieldName := RACK_E, responseNum := 1, seqNumber := 1, method := "INVITE"}; // value of RAck header
	  var HostPort 	vc_reqHostPort 	:= {host:=PX_SIP_SUT_IPADDR, portField:=PX_SIP_SUT_PORT}; // address to send request
	  var UrnUriComponents vc_reqUrnUri := {namespaceId:="", namespaceSpecificString:=""};
	  var Privacy 	vc_privacy;
        var template(value)
        RAck
            vc_rAck := {
                fieldName := RACK_E,
                responseNum := 1,
                seqNumber := 1,
                method := "INVITE"
            }; // value of RAck header

        // address to send request
        var HostPort vc_reqHostPort := {//STF471 removed PIXIT assignment, should be performed in specific ATS 
            host := "127.0.0.1",    // former PX_SIP_SUT_IPADDR value
            portField := 5060       //former PX_SIP_SUT_PORT value
        };
        var template(omit) Privacy vc_privacy;
        var HistoryInfo_List vc_historyInfoList := {}; // value of history list according to RFC4244
        var SipUrl vc_confURI; // conference URI according to TS124147 ch. 5.3.1.3.2
        var SDP_Message vc_sdp_remote; // incoming SDP offers
        var SDP_Message vc_sdp_local; // SDP values to be sent
        var XmlBody vc_xml_remote; // incoming XML value
        var template XmlBody vc_xml_local; // SDP values to be sent
	  
	  var CSeq		vc_iut_CSeq 	:= c_empty_cSeq;	// value of last CSeq header used by the IUT in request
        var template(omit) CSeq vc_iut_CSeq := c_empty_cSeq; // value of last CSeq header used by the IUT in request
        // To/From header-fields to be used if the callee will release the session
        var To vc_callee_To := c_empty_To;
        var From vc_callee_From := c_empty_From;
@@ -137,19 +166,18 @@ module LibSip_Interface
        var default vc_def_catchSyncStop;

        // general timers
	  timer tc_T1  	 := PX_SIP_T1;
	  timer tc_Tf    := PX_SIP_TF;
        timer tc_T1 := 0.5;//STF471 default value, should be set in specific ATS, former PX_SIP_T1
        timer tc_Tf := 32.0;//STF471 default value, should be set in specific ATS, former PX_SIP_TF
        timer tc_wait := PX_SIP_TWAIT;
        timer tc_ack := PX_SIP_TACK;
        timer tc_resp := PX_SIP_TRESP;
        timer tc_noAct := PX_SIP_TNOACT; // time for SUT to get idle state
        // timer TRept;
//	  timer TSync	 := PX_SIP_TSYNC;
	  timer tc_guard   := PX_SIP_TGUARD;//MRO
        // timer TSync := 10.0; //STF471 default value, should be set in specific ATS, former PX_SIP_TSYNC
        timer tc_guard := 120.0; //STF471 default value, should be set in specific ATS, former PX_SIP_TGUARD
        timer tc_tDelay := 32.0;

        var float vc_tcRESP := PX_SIP_TRESP; // standard value for TRESP (may be modified in particular tests)
		
        // indicators set/used parameter status or state handling in default
        var boolean vc_sdp_remote_is_valid := false; // true if there is a value in v_SDP_remote
        var boolean vc_history_is_valid := false; // true if there is a HistoryList in response message
@@ -169,20 +197,12 @@ module LibSip_Interface
        var boolean vc_firstREGISTER_sent := false; // true after sent of first REGISTER message
        var boolean vc_DeregDone := false; // true after first DeREGISTRATION trail (avoid loop)
        var boolean vc_interface_isc := false; // true if isc interface is in use
	  var boolean v_white_space := false;//MRO

        var boolean vc_white_space := false; // MRO
        var boolean vc_subscribed := false;
        // ETS address
      var address v_ets_label := { host := PX_SIP_TS1_IPADDR, portField := PX_SIP_TS1_PORT};

	  // parts needed for Client/SelfSyncComp type compatibility
	  var 	StringStack v_stateStack := c_initStringStack;
	  port 	SyncPort 	syncSendPort;
	  port 	SyncPort 	syncPort;
	  timer tc_sync 	:= PX_TSYNC_TIME_LIMIT;
        var address vc_ets_label; //This value should be initialized in specific ATS

    // // used for communication with the operator
//	  port operatorPort_SIP opPort;

    // port OperatorPort_SIP opPort;
    } // end SipComponent
  
} // end module LibSip_Interface
+23 −0
Original line number Diff line number Diff line
/**
 * @author      STF471
 * @version     $Id: LibSip_Steps.ttcn 614 2014-07-07 10:01:14Z tepelmann $
 * @desc        This module provides all modules of the LibSip as public imports.
 *              Importing this module will automatically import all here listed modules,
 *              no other LibSip_xxx module import needed in this case.
 *              This module is part of LibSipV3.
 */
module LibSip_Library {
    
    public import from LibSip_Interface all;
    public import from LibSip_MessageBodyTypes all;
    public import from LibSip_PIXITS all;
    public import from LibSip_SDPTypes all;
    public import from LibSip_SimpleMsgSummaryTypes all;
    public import from LibSip_SMSFunctions all;
    public import from LibSip_SMSTemplates all;
    public import from LibSip_SMSTypesAndValues all;
    public import from LibSip_Steps all;
    public import from LibSip_Templates all;
    public import from LibSip_XMLTypes all;
    
}
 No newline at end of file
+60 −52
Original line number Diff line number Diff line
/******************************************************************************/
// $Date: 2013-04-08 08:18:17 +0000 (Mo, 08 Apr 2013) $
// $Author: seka $
// $Rev: 8470 $
/******************************************************************************/
/*
* This module is part of LibSipV2.
/******************************************************************************
 *  @author     STF 346, STF366, STF368, STF369, STF450, STF471
 *  @version    $Id: LibSip_MessageBodyTypes.ttcn 622 2014-07-10 14:50:54Z nikolajev $
 *  @desc       This module provides the types used for alternative SIP message
 *              body variants and combinations.
 *              This module is part of LibSipV3.           
 */

module LibSip_MessageBodyTypes
{
module LibSip_MessageBodyTypes {
    import from LibSip_SDPTypes all;
    import from LibSip_SimpleMsgSummaryTypes all;
    import from LibSip_XMLTypes all;

    /*
     * Simple body types that can be used instead of the more detailed XML and SDP
     * without codec support
     * */
    //type charstring XmlBody;
    //type charstring SDP_Message;

    group MIMETypes {
        type union MIME_Encapsulated_Parts {
            SDP_Message sdpMessageBody,
            XmlBody xmlBody // if there is XML body
    // XMLMessage  xmlMessage          // if there is XML message (with header and body)
  };
        }

        type record MIME_Encapsulated_Part {
            charstring content_type,
            charstring content_disposition optional,
            MIME_Encapsulated_Parts mime_encapsulated_part
  };
        }

        type record MIME_Message {
    charstring boundary, // len:
            charstring boundary,
            // len:
            MimeEncapsulatedList mimeEncapsulatedList
  };
        }

        type record of MIME_Encapsulated_Part MimeEncapsulatedList;


    } // group MIMETypes

    type union MessageBody {
    SDP_Message sdpMessageBody,     // if there is only SDP part
        SDP_Message sdpMessageBody,
        // if there is only SDP part
        // XMLMessage xmlMessage, // if there is XML message (with header and body)
    XmlBody xmlBody,                // if there is XML body
    MIME_Message mimeMessageBody,   // if there is SDP and encapsulated ISUP part
    charstring sipfrag,             // if content-Type is message/sipfrag (cp. NOTIFY, cp TS124147 A.4.3.1.2)
    charstring textplain,           // if content type is text/plain (for testing long messages)
    SimpleMsgSummary simpleMsgSummary, // RFC 3842
        XmlBody xmlBody,
        // if there is XML body
        MIME_Message mimeMessageBody,
        // if there is SDP and encapsulated ISUP part
        charstring sipfrag,
        // if content-Type is message/sipfrag (cp. NOTIFY, cp TS124147 A.4.3.1.2)
        charstring textplain,
        // if content type is text/plain (for testing long messages)
        SimpleMsgSummary simpleMsgSummary,
        // RFC 3842
        octetstring smsMessage // encoded SMS message 3GPP 23.040, 24.011
  };


    }
}
+135 −353

File changed.

Preview size limit exceeded, changes collapsed.

Loading