Loading ttcn/LibCommon_AbstractData.ttcn +9 −9 Original line number Diff line number Diff line /* * @author ETSI STF 276 /** * @author ETSI * @version $Id$ * @desc A collection of functions for abstract data types which may be * useful in the implementation of any TTCN-3 test suite. Loading @@ -22,7 +22,7 @@ type record of charstring StringItems; /* /** * @desc Constant which can be used to initialize a * string stack. A string stack can be intialized by * assigning this value in the variable declariation. Loading @@ -35,7 +35,7 @@ */ const StringStack c_initStringStack := { 0, {} } /* /** * @desc The invocation of this function will initialize * a string stack to an empty string stack. * An alternative is to initlialize a stack using a Loading @@ -47,7 +47,7 @@ p_stack := c_initStringStack } /* /** * @desc This function checks if a string stack is empty. * @param p_stack String stack to be checked. * @return true if empty, false if not empty Loading @@ -58,7 +58,7 @@ else {return false} } /* /** * @desc This function checks if a given string is on the * string stack. * @param p_stack String stack where the string item Loading @@ -78,7 +78,7 @@ return false; } /* /** * @desc This function checks if a given string is on the * string stack. * @param p_stack String stack where the string item Loading @@ -98,7 +98,7 @@ } /* /** * @desc This function puts a string to the top of a * string stack. * @param p_stack String stack to which the string item Loading @@ -111,7 +111,7 @@ p_stack.stackSize := p_stack.stackSize + 1; } /* /** * @desc This function removes the string from the top of a * string stack. If the stack is empty nothing is done * @param p_stack String stack from which the top string item Loading ttcn/LibCommon_BasicTypesAndValues.ttcn +13 −13 Original line number Diff line number Diff line /* * @author ETSI STF 276 /** * @author ETSI * @version $Id$ * @desc A collection of basic type and value definitions which may be * useful in the implementation of any TTCN-3 test suite. <br><br> Loading @@ -11,7 +11,7 @@ */ module LibCommon_BasicTypesAndValues { /* /** * @remark Number in subtype name always indicates encoding length * in _bits_ */ Loading Loading @@ -92,7 +92,7 @@ } // end group unsignedIntegerDefintions /* /** * @remark Number in subtype name always indicates encoding length * in _bits_ */ Loading Loading @@ -216,7 +216,7 @@ }//end group zeroedInt /* /** * @remark Number in subtype name always indicates encoding length * in _bits_ */ Loading ttcn/LibCommon_DataStrings.ttcn +6 −5 Original line number Diff line number Diff line /* * @author ETSI STF 276 /** * * @author ETSI * @version $Id$ * @desc A collection of data string type and value definitions which * may be useful in the implementation of any TTCN-3 test Loading @@ -13,7 +14,7 @@ */ module LibCommon_DataStrings { /* /** * @remark Number in name indicates string length in number of * _bits_ */ Loading Loading @@ -73,7 +74,7 @@ }//end group zeroedBits /* /** * @remark Number in name indicates string length in number of * _octets_ */ Loading ttcn/LibCommon_Sync.ttcn +74 −50 Original line number Diff line number Diff line /* * @author ETSI STF 276 /** * @author ETSI * @version $Id$ * @desc This module implements _one_ generic synchronization mechanism * for TTCN-3 test cases with one or more test components. Loading Loading @@ -66,7 +66,7 @@ module LibCommon_Sync { group compTypeRelated { /* /** * @desc This type is used to be the base of any synchronization * behavior which is to be executed on a sync server * component. The test component which acts as a Loading @@ -82,7 +82,7 @@ module LibCommon_Sync { timer tc_sync := PX_TSYNC_TIME_LIMIT; } /* /** * @desc This type is used to define any synchronization * behavior which is to be executed on a sync server * component. The test component which acts as a Loading @@ -101,7 +101,7 @@ module LibCommon_Sync { timer tc_sync := PX_TSYNC_TIME_LIMIT; } with { extension "extends BaseSyncComp" } /* /** * @desc This type is used to define any synchronization * behavior which is to be executed on a sync client * component. The test component(s) which act as a Loading @@ -120,7 +120,7 @@ module LibCommon_Sync { timer tc_sync := PX_TSYNC_TIME_LIMIT; } with { extension "extends BaseSyncComp" } /* /** * @desc This type is used to define any synchronization * behavior which is relevant to non-concurrent test * cases. Loading @@ -142,7 +142,7 @@ module LibCommon_Sync { timer tc_sync := PX_TSYNC_TIME_LIMIT; } with { extension "extends ClientSyncComp" } /* /** * @desc This port type must be imported into test suites * when defining test component types which are * type compatible to a synchronization component Loading @@ -166,7 +166,8 @@ module LibCommon_Sync { group syncCompTestConfiguration { /* @desc Calls self connect function if invoking /** * @desc Calls self connect function if invoking * component is the MTC or otherwise connects the client * the server. This function allows to implement preambles * in a way that they can be used by test components Loading @@ -188,7 +189,8 @@ module LibCommon_Sync { } } /* @desc Calls self connect function if the invoking /** * @desc Calls self connect function if the invoking * component is the MTC or otherwise disconnects the client * from the server. This function allows to implement * postambles in a way that they can be used in both Loading @@ -213,7 +215,8 @@ module LibCommon_Sync { group syncFunctions { /* @desc Implements synchronization of 2 clients from server side /** * @desc Implements synchronization of 2 clients from server side * on one or more synchronization points. * If problem occurs, then server sends STOP to all clients. * Waits for PX_TSYNC_TIME_LIMIT to let clients Loading @@ -231,7 +234,6 @@ module LibCommon_Sync { * @see LibCommon_Sync.f_serverSyncClientsTimed * @see LibCommon_Sync.f_serverWaitForAllClientsToStop * @param p_syncPointIds list of synchronization point name/ids * @return execution status */ function f_serverSync2ClientsAndStop( in SyncPointList p_syncPointIds ) runs on ServerSyncComp { Loading @@ -242,7 +244,8 @@ module LibCommon_Sync { f_serverWaitForAllClientsToStop(); } /* @desc Implements synchronization of 3 clients from server side /** * @desc Implements synchronization of 3 clients from server side * on one or more synchronization points. * If problem occurs, then server sends STOP to all clients. * Waits for PX_TSYNC_TIME_LIMIT to let clients Loading @@ -260,7 +263,6 @@ module LibCommon_Sync { * @see LibCommon_Sync.f_serverSyncClientsTimed * @see LibCommon_Sync.f_serverWaitForAllClientsToStop * @param p_syncPointIds list of synchronization point name/ids * @return execution status */ function f_serverSync3ClientsAndStop( in SyncPointList p_syncPointIds ) runs on ServerSyncComp { Loading @@ -271,7 +273,8 @@ module LibCommon_Sync { f_serverWaitForAllClientsToStop(); } /* @desc Implements synchronization of N clients from server side /** * @desc Implements synchronization of N clients from server side * on one or more synchronization points. * If problem occurs, then server sends STOP to all clients. * Waits for PX_TSYNC_TIME_LIMIT to let clients Loading @@ -290,7 +293,6 @@ module LibCommon_Sync { * @see LibCommon_Sync.f_serverWaitForAllClientsToStop * @param p_numClients number of synchronization clients * @param p_syncPointIds list of synchronization point name/ids * @return execution status */ function f_serverSyncNClientsAndStop ( in integer p_numClients, Loading @@ -306,7 +308,8 @@ module LibCommon_Sync { f_serverWaitForAllClientsToStop(); } /* @desc Implements synchronization of 2 clients and 1 UT from server side /** * @desc Implements synchronization of 2 clients and 1 UT from server side * on one or more synchronization points. * If problem occurs, then server sends STOP to all clients. * Waits for PX_TSYNC_TIME_LIMIT to let clients Loading @@ -324,7 +327,6 @@ module LibCommon_Sync { * @see LibCommon_Sync.f_serverSyncClientsTimed * @see LibCommon_Sync.f_serverWaitForAllClientsToStop * @param p_syncPointIds list of synchronization point name/ids * @return execution status */ function f_serverSync2ClientsUtAndStop( in SyncPointList p_syncPointIds ) runs on ServerSyncComp { Loading @@ -335,7 +337,8 @@ module LibCommon_Sync { f_serverWaitForAllClientsToStop(); } /* @desc Calls either self synchronization function if /** * @desc Calls either self synchronization function if * invoking component is the MTC, otherwise * calls client synchronization. After that it * sets the verdict based on the specified return code. Loading @@ -362,7 +365,8 @@ module LibCommon_Sync { } } /* @desc Calls either self synchronization function if /** * @desc Calls either self synchronization function if * invoking component is the MTC, otherwise * calls client synchronization. After that it * sets a preamble specific verdict based on the Loading Loading @@ -394,7 +398,8 @@ module LibCommon_Sync { group syncCompStateHandling { /* /** * * @desc This function updates the state (stack) of a * sync client or self sync component. This stack is * key in the shutdown handling of test components. Loading Loading @@ -424,7 +429,8 @@ module LibCommon_Sync { } } // end function f_addSyncCompState /* /** * * @desc This function returns the top state on the sync * state stack of a sync client or self sync * component and removes it from the stack Loading Loading @@ -458,7 +464,8 @@ module LibCommon_Sync { f_popStringStack(v_stateStack); } // end function f_popSyncCompState /* /** * * @desc This function returns the top state on the sync state * stack of a sync client or self sync component. It * does not remove it from the stack Loading @@ -474,7 +481,7 @@ module LibCommon_Sync { return f_peekStringStackTop(v_stateStack,p_state); } // end function f_peekTopSyncCompState /* /** * @desc This function checks if the sync state stack * of a sync client or self sync component is empty. * This stack is key in the shutdown handling of test Loading @@ -491,7 +498,8 @@ module LibCommon_Sync { group exampleShutDownAltstep { /* @desc This is an example of a shutdown altstep which can be /** * @desc This is an example of a shutdown altstep which can be * used as a "template" for a interface specific shutdown * altstep or possily as a first temporary solution in * test case development.<br><br> Loading Loading @@ -551,7 +559,8 @@ module LibCommon_Sync { group serverRelated { /* @desc Implements synchronization of "n" clients from server /** * @desc Implements synchronization of "n" clients from server * side. If a problem occurs, then server sends STOP to * all clients. Waits for PX_TSYNC_TIME_LIMIT to let * clients finish executing their behavior until this Loading @@ -565,14 +574,14 @@ module LibCommon_Sync { * @see LibCommon_Sync.f_serverSyncClientsTimed * @param p_noOfClients number of clients to be synchronized * @param p_syncId synchronization point name/id * @return execution status */ function f_serverSyncClients( in UInt p_noOfClients, in charstring p_syncId ) runs on ServerSyncComp { f_serverSyncClientsTimed(p_noOfClients,p_syncId, PX_TSYNC_TIME_LIMIT); } /* @desc Handles synchronization of clients from server side. /** * @desc Handles synchronization of clients from server side. * If problem occurs, then server sends STOP to all clients. * This function sets the server verdict. * @remark The use of this function requires prior connection of Loading @@ -582,7 +591,6 @@ module LibCommon_Sync { * @param p_execTimeLimit time limit given to all clients to finish the execution * of their behavior up to this synchronization point * @see LibCommon_Sync.f_connect4SelfOrClientSync * @return execution status */ function f_serverSyncClientsTimed( in UInt p_NoOfClients, in charstring p_syncId, Loading Loading @@ -653,7 +661,7 @@ module LibCommon_Sync { } } // end function f_serverSyncClientsTimed /* /** * @desc This function is intended only for use on the sync * server component in concurrent TTCN-3 test cases. * It waits for all components to finish execution within Loading Loading @@ -681,7 +689,8 @@ module LibCommon_Sync { group clientRelated { /* @desc This function creates the connection needed to /** * @desc This function creates the connection needed to * execute client synchronization functions * @see LibCommon_Sync.f_clientSync * @see LibCommon_Sync.f_clientSendStop Loading @@ -691,7 +700,8 @@ module LibCommon_Sync { connect(self:syncPort, mtc:syncPort); }// end function f_connect4ClientSync /* @desc This function removes the connection needed /** * @desc This function removes the connection needed * to execute client synchronization functions * @see LibCommon_Sync.f_clientSync * @see LibCommon_Sync.f_clientSendStop Loading @@ -701,7 +711,8 @@ module LibCommon_Sync { disconnect(self:syncPort, mtc:syncPort); }// end function f_disconnect4ClientSync /* @desc This function combines client verdict setting with its /** * @desc This function combines client verdict setting with its * synchronization for use after or within a preamble * implementation. * Note that such preambles can _not_ be reused in non- Loading @@ -722,7 +733,8 @@ module LibCommon_Sync { f_clientSync(p_syncId,p_ret); } /* @desc This function combines client verdict setting with its /** * @desc This function combines client verdict setting with its * synchronization for use,e.g, after or within a * test body implementation. * Note that such premables can _not_ be reused in non- Loading @@ -745,7 +757,8 @@ module LibCommon_Sync { f_clientSync(p_syncId,p_ret); } /* @desc This function combines client verdict setting with its /** * @desc This function combines client verdict setting with its * synchronization for use after or within a * postamble implementation. * Note that such prostambles can _not_ be reused in non- Loading @@ -766,7 +779,8 @@ module LibCommon_Sync { f_clientSync(p_syncId,p_ret); } /* @desc This function handles synchronization of a sync client /** * @desc This function handles synchronization of a sync client * with the server. In case of successful execution it sends * a READY message to the server and waits the READY back. * The time used for waiting is defined by PX_TSYNC_TIME_LIMIT. Loading Loading @@ -822,7 +836,8 @@ module LibCommon_Sync { } // end function f_clientSync /* @desc This function can be used to request the shutdown a /** * @desc This function can be used to request the shutdown a * multi component test case _prior_ to reaching a * synchronization point. It sends a STOP message to * the sync server and awaits then the STOP from the server Loading Loading @@ -864,7 +879,8 @@ module LibCommon_Sync { group otherSyncModuleDefinitions { group syncModuleparams { /* /** * * @desc Default time limit for a sync client to reach a * synchronization point */ Loading @@ -887,7 +903,8 @@ module LibCommon_Sync { group otherSelfSyncRelatedDefinitions { /* @desc This function creates the connection needed to /** * @desc This function creates the connection needed to * execute self sync functions * @see LibCommon_Sync.f_selfSync * @see LibCommon_Sync.f_selfSyncStop Loading @@ -897,7 +914,8 @@ module LibCommon_Sync { connect(self:syncSendPort, self:syncPort); }// end function f_connect4SelfSync /* @desc This function removes the connection needed /** * @desc This function removes the connection needed * to execute self sync functions * @see LibCommon_Sync.f_selfSync * @see LibCommon_Sync.f_selfSyncStop Loading @@ -907,7 +925,8 @@ module LibCommon_Sync { disconnect(self:syncSendPort, self:syncPort); }// end function f_disconnect4SelfSync /* @desc This function combines MTC verdict setting with self /** * @desc This function combines MTC verdict setting with self * synchronization for use after and possibly in the test body * @param p_syncId Synchronization point name/id * @param p_ret Current behavior execution status Loading @@ -922,7 +941,8 @@ module LibCommon_Sync { f_selfSync(p_syncId,p_ret); } /* @desc This function combines MTC verdict setting with self /** * @desc This function combines MTC verdict setting with self * synchronization for use after the preamble. * @param p_syncId Synchronization point name/id * @param p_ret Current behavior execution status Loading @@ -936,7 +956,8 @@ module LibCommon_Sync { f_selfSync(p_syncId,p_ret); } /* @desc This function combines MTC verdict setting with self /** * @desc This function combines MTC verdict setting with self * synchronization for use after the postamble. * @param p_syncId Synchronization point name/id * @param p_ret Current behavior execution status Loading @@ -950,7 +971,8 @@ module LibCommon_Sync { f_selfSync(p_syncId,p_ret); } /* @desc This function synchronizes a MTC with itself. In case /** * @desc This function synchronizes a MTC with itself. In case * of a non successful execution status it sends a STOP * message to itself and invokes that way the * shutdown default (if activated). Loading Loading @@ -982,7 +1004,8 @@ module LibCommon_Sync { return e_success ; }// end function f_selfSync /* @desc This function can be used to shut down a test case _prior_ /** * @desc This function can be used to shut down a test case _prior_ * to reaching a synchronization point. it sends a STOP * message to itself and invokes that way the * shutdown default (if activated). Loading Loading @@ -1012,7 +1035,8 @@ module LibCommon_Sync { } // end group otherSelfSyncRelatedDefinitions /* /** * * @desc The sychronization protocol is conceptually based on * named synchronization. Each synchronization point * has it own specific synchronization message. This Loading Loading @@ -1064,7 +1088,7 @@ module LibCommon_Sync { group otherSyncFunctions { /* /** * @desc Makes server send a sync message to all known clients * @param p_clientRefs List of client references to which the message is to be send * @param p_syncCmd The actual synchronization message to be sent out Loading @@ -1078,7 +1102,7 @@ module LibCommon_Sync { } } // end function f_serverSendToAllClients /* /** * @desc This function is intended only for use on server in concurrent * TTCN-3 test cases. It waits for all components to shut down * within the PX_TSHUT_DOWN_TIME_LIMIT. If a timeout occurs Loading ttcn/LibCommon_TextStrings.ttcn +21 −7 Original line number Diff line number Diff line /* * @author ETSI STF 276 /** * @author ETSI * @version $Id$ * @desc A collection of text string type and value definitions which * may be useful in the implementation of any TTCN-3 test Loading @@ -13,7 +13,7 @@ */ module LibCommon_TextStrings language "TTCN-3:2005" { /* /** * @desc These constants can be used to add special characters into * TTCN-3 text strings by using the concatenation operator. * Example use: Loading Loading @@ -59,7 +59,7 @@ module LibCommon_TextStrings language "TTCN-3:2005" { } // end group usefulConstants /* /** * @remark Number in name indicates string length in number of * _characters_ */ Loading Loading @@ -98,10 +98,24 @@ module LibCommon_TextStrings language "TTCN-3:2005" { type universal charstring UnicodeText1to255 length(1..255) with {encode "length(1..255)"}; type charstring AlphaNum ("0".."9","a".."z","A".."Z"); type AlphaNum AlphaNum2 length(2) with { encode "length(2)"}; type AlphaNum AlphaNum1To32 length(1..32) with {encode "length(1..32)"}; /** * @desc Subtyping can not be used in this type definition to ensure * values of this type are really alphanumeric. * Instead either codecs or a template have * to be used for this purpose. The type is kept here to ensure * backward compatibility. * @see LibCommon_TextStrings.mw_isAlphaNum */ type charstring AlphaNum with { encode "alphanumeric"}; type AlphaNum AlphaNum2 length(2) with { encode "alphanumeric;length(2)"}; type AlphaNum AlphaNum1To32 length(1..32) with {encode "alphanumeric;length(1..32)"}; } // end group usefulTextStringTypes group usefulTextStringTemplates { template charstring mw_isAlphaNum := pattern "([0-9]|[a-z]|[A-Z])+"; } // end group usefulTextStringTemplates } // end module LibCommon_TextStrings Loading
ttcn/LibCommon_AbstractData.ttcn +9 −9 Original line number Diff line number Diff line /* * @author ETSI STF 276 /** * @author ETSI * @version $Id$ * @desc A collection of functions for abstract data types which may be * useful in the implementation of any TTCN-3 test suite. Loading @@ -22,7 +22,7 @@ type record of charstring StringItems; /* /** * @desc Constant which can be used to initialize a * string stack. A string stack can be intialized by * assigning this value in the variable declariation. Loading @@ -35,7 +35,7 @@ */ const StringStack c_initStringStack := { 0, {} } /* /** * @desc The invocation of this function will initialize * a string stack to an empty string stack. * An alternative is to initlialize a stack using a Loading @@ -47,7 +47,7 @@ p_stack := c_initStringStack } /* /** * @desc This function checks if a string stack is empty. * @param p_stack String stack to be checked. * @return true if empty, false if not empty Loading @@ -58,7 +58,7 @@ else {return false} } /* /** * @desc This function checks if a given string is on the * string stack. * @param p_stack String stack where the string item Loading @@ -78,7 +78,7 @@ return false; } /* /** * @desc This function checks if a given string is on the * string stack. * @param p_stack String stack where the string item Loading @@ -98,7 +98,7 @@ } /* /** * @desc This function puts a string to the top of a * string stack. * @param p_stack String stack to which the string item Loading @@ -111,7 +111,7 @@ p_stack.stackSize := p_stack.stackSize + 1; } /* /** * @desc This function removes the string from the top of a * string stack. If the stack is empty nothing is done * @param p_stack String stack from which the top string item Loading
ttcn/LibCommon_BasicTypesAndValues.ttcn +13 −13 Original line number Diff line number Diff line /* * @author ETSI STF 276 /** * @author ETSI * @version $Id$ * @desc A collection of basic type and value definitions which may be * useful in the implementation of any TTCN-3 test suite. <br><br> Loading @@ -11,7 +11,7 @@ */ module LibCommon_BasicTypesAndValues { /* /** * @remark Number in subtype name always indicates encoding length * in _bits_ */ Loading Loading @@ -92,7 +92,7 @@ } // end group unsignedIntegerDefintions /* /** * @remark Number in subtype name always indicates encoding length * in _bits_ */ Loading Loading @@ -216,7 +216,7 @@ }//end group zeroedInt /* /** * @remark Number in subtype name always indicates encoding length * in _bits_ */ Loading
ttcn/LibCommon_DataStrings.ttcn +6 −5 Original line number Diff line number Diff line /* * @author ETSI STF 276 /** * * @author ETSI * @version $Id$ * @desc A collection of data string type and value definitions which * may be useful in the implementation of any TTCN-3 test Loading @@ -13,7 +14,7 @@ */ module LibCommon_DataStrings { /* /** * @remark Number in name indicates string length in number of * _bits_ */ Loading Loading @@ -73,7 +74,7 @@ }//end group zeroedBits /* /** * @remark Number in name indicates string length in number of * _octets_ */ Loading
ttcn/LibCommon_Sync.ttcn +74 −50 Original line number Diff line number Diff line /* * @author ETSI STF 276 /** * @author ETSI * @version $Id$ * @desc This module implements _one_ generic synchronization mechanism * for TTCN-3 test cases with one or more test components. Loading Loading @@ -66,7 +66,7 @@ module LibCommon_Sync { group compTypeRelated { /* /** * @desc This type is used to be the base of any synchronization * behavior which is to be executed on a sync server * component. The test component which acts as a Loading @@ -82,7 +82,7 @@ module LibCommon_Sync { timer tc_sync := PX_TSYNC_TIME_LIMIT; } /* /** * @desc This type is used to define any synchronization * behavior which is to be executed on a sync server * component. The test component which acts as a Loading @@ -101,7 +101,7 @@ module LibCommon_Sync { timer tc_sync := PX_TSYNC_TIME_LIMIT; } with { extension "extends BaseSyncComp" } /* /** * @desc This type is used to define any synchronization * behavior which is to be executed on a sync client * component. The test component(s) which act as a Loading @@ -120,7 +120,7 @@ module LibCommon_Sync { timer tc_sync := PX_TSYNC_TIME_LIMIT; } with { extension "extends BaseSyncComp" } /* /** * @desc This type is used to define any synchronization * behavior which is relevant to non-concurrent test * cases. Loading @@ -142,7 +142,7 @@ module LibCommon_Sync { timer tc_sync := PX_TSYNC_TIME_LIMIT; } with { extension "extends ClientSyncComp" } /* /** * @desc This port type must be imported into test suites * when defining test component types which are * type compatible to a synchronization component Loading @@ -166,7 +166,8 @@ module LibCommon_Sync { group syncCompTestConfiguration { /* @desc Calls self connect function if invoking /** * @desc Calls self connect function if invoking * component is the MTC or otherwise connects the client * the server. This function allows to implement preambles * in a way that they can be used by test components Loading @@ -188,7 +189,8 @@ module LibCommon_Sync { } } /* @desc Calls self connect function if the invoking /** * @desc Calls self connect function if the invoking * component is the MTC or otherwise disconnects the client * from the server. This function allows to implement * postambles in a way that they can be used in both Loading @@ -213,7 +215,8 @@ module LibCommon_Sync { group syncFunctions { /* @desc Implements synchronization of 2 clients from server side /** * @desc Implements synchronization of 2 clients from server side * on one or more synchronization points. * If problem occurs, then server sends STOP to all clients. * Waits for PX_TSYNC_TIME_LIMIT to let clients Loading @@ -231,7 +234,6 @@ module LibCommon_Sync { * @see LibCommon_Sync.f_serverSyncClientsTimed * @see LibCommon_Sync.f_serverWaitForAllClientsToStop * @param p_syncPointIds list of synchronization point name/ids * @return execution status */ function f_serverSync2ClientsAndStop( in SyncPointList p_syncPointIds ) runs on ServerSyncComp { Loading @@ -242,7 +244,8 @@ module LibCommon_Sync { f_serverWaitForAllClientsToStop(); } /* @desc Implements synchronization of 3 clients from server side /** * @desc Implements synchronization of 3 clients from server side * on one or more synchronization points. * If problem occurs, then server sends STOP to all clients. * Waits for PX_TSYNC_TIME_LIMIT to let clients Loading @@ -260,7 +263,6 @@ module LibCommon_Sync { * @see LibCommon_Sync.f_serverSyncClientsTimed * @see LibCommon_Sync.f_serverWaitForAllClientsToStop * @param p_syncPointIds list of synchronization point name/ids * @return execution status */ function f_serverSync3ClientsAndStop( in SyncPointList p_syncPointIds ) runs on ServerSyncComp { Loading @@ -271,7 +273,8 @@ module LibCommon_Sync { f_serverWaitForAllClientsToStop(); } /* @desc Implements synchronization of N clients from server side /** * @desc Implements synchronization of N clients from server side * on one or more synchronization points. * If problem occurs, then server sends STOP to all clients. * Waits for PX_TSYNC_TIME_LIMIT to let clients Loading @@ -290,7 +293,6 @@ module LibCommon_Sync { * @see LibCommon_Sync.f_serverWaitForAllClientsToStop * @param p_numClients number of synchronization clients * @param p_syncPointIds list of synchronization point name/ids * @return execution status */ function f_serverSyncNClientsAndStop ( in integer p_numClients, Loading @@ -306,7 +308,8 @@ module LibCommon_Sync { f_serverWaitForAllClientsToStop(); } /* @desc Implements synchronization of 2 clients and 1 UT from server side /** * @desc Implements synchronization of 2 clients and 1 UT from server side * on one or more synchronization points. * If problem occurs, then server sends STOP to all clients. * Waits for PX_TSYNC_TIME_LIMIT to let clients Loading @@ -324,7 +327,6 @@ module LibCommon_Sync { * @see LibCommon_Sync.f_serverSyncClientsTimed * @see LibCommon_Sync.f_serverWaitForAllClientsToStop * @param p_syncPointIds list of synchronization point name/ids * @return execution status */ function f_serverSync2ClientsUtAndStop( in SyncPointList p_syncPointIds ) runs on ServerSyncComp { Loading @@ -335,7 +337,8 @@ module LibCommon_Sync { f_serverWaitForAllClientsToStop(); } /* @desc Calls either self synchronization function if /** * @desc Calls either self synchronization function if * invoking component is the MTC, otherwise * calls client synchronization. After that it * sets the verdict based on the specified return code. Loading @@ -362,7 +365,8 @@ module LibCommon_Sync { } } /* @desc Calls either self synchronization function if /** * @desc Calls either self synchronization function if * invoking component is the MTC, otherwise * calls client synchronization. After that it * sets a preamble specific verdict based on the Loading Loading @@ -394,7 +398,8 @@ module LibCommon_Sync { group syncCompStateHandling { /* /** * * @desc This function updates the state (stack) of a * sync client or self sync component. This stack is * key in the shutdown handling of test components. Loading Loading @@ -424,7 +429,8 @@ module LibCommon_Sync { } } // end function f_addSyncCompState /* /** * * @desc This function returns the top state on the sync * state stack of a sync client or self sync * component and removes it from the stack Loading Loading @@ -458,7 +464,8 @@ module LibCommon_Sync { f_popStringStack(v_stateStack); } // end function f_popSyncCompState /* /** * * @desc This function returns the top state on the sync state * stack of a sync client or self sync component. It * does not remove it from the stack Loading @@ -474,7 +481,7 @@ module LibCommon_Sync { return f_peekStringStackTop(v_stateStack,p_state); } // end function f_peekTopSyncCompState /* /** * @desc This function checks if the sync state stack * of a sync client or self sync component is empty. * This stack is key in the shutdown handling of test Loading @@ -491,7 +498,8 @@ module LibCommon_Sync { group exampleShutDownAltstep { /* @desc This is an example of a shutdown altstep which can be /** * @desc This is an example of a shutdown altstep which can be * used as a "template" for a interface specific shutdown * altstep or possily as a first temporary solution in * test case development.<br><br> Loading Loading @@ -551,7 +559,8 @@ module LibCommon_Sync { group serverRelated { /* @desc Implements synchronization of "n" clients from server /** * @desc Implements synchronization of "n" clients from server * side. If a problem occurs, then server sends STOP to * all clients. Waits for PX_TSYNC_TIME_LIMIT to let * clients finish executing their behavior until this Loading @@ -565,14 +574,14 @@ module LibCommon_Sync { * @see LibCommon_Sync.f_serverSyncClientsTimed * @param p_noOfClients number of clients to be synchronized * @param p_syncId synchronization point name/id * @return execution status */ function f_serverSyncClients( in UInt p_noOfClients, in charstring p_syncId ) runs on ServerSyncComp { f_serverSyncClientsTimed(p_noOfClients,p_syncId, PX_TSYNC_TIME_LIMIT); } /* @desc Handles synchronization of clients from server side. /** * @desc Handles synchronization of clients from server side. * If problem occurs, then server sends STOP to all clients. * This function sets the server verdict. * @remark The use of this function requires prior connection of Loading @@ -582,7 +591,6 @@ module LibCommon_Sync { * @param p_execTimeLimit time limit given to all clients to finish the execution * of their behavior up to this synchronization point * @see LibCommon_Sync.f_connect4SelfOrClientSync * @return execution status */ function f_serverSyncClientsTimed( in UInt p_NoOfClients, in charstring p_syncId, Loading Loading @@ -653,7 +661,7 @@ module LibCommon_Sync { } } // end function f_serverSyncClientsTimed /* /** * @desc This function is intended only for use on the sync * server component in concurrent TTCN-3 test cases. * It waits for all components to finish execution within Loading Loading @@ -681,7 +689,8 @@ module LibCommon_Sync { group clientRelated { /* @desc This function creates the connection needed to /** * @desc This function creates the connection needed to * execute client synchronization functions * @see LibCommon_Sync.f_clientSync * @see LibCommon_Sync.f_clientSendStop Loading @@ -691,7 +700,8 @@ module LibCommon_Sync { connect(self:syncPort, mtc:syncPort); }// end function f_connect4ClientSync /* @desc This function removes the connection needed /** * @desc This function removes the connection needed * to execute client synchronization functions * @see LibCommon_Sync.f_clientSync * @see LibCommon_Sync.f_clientSendStop Loading @@ -701,7 +711,8 @@ module LibCommon_Sync { disconnect(self:syncPort, mtc:syncPort); }// end function f_disconnect4ClientSync /* @desc This function combines client verdict setting with its /** * @desc This function combines client verdict setting with its * synchronization for use after or within a preamble * implementation. * Note that such preambles can _not_ be reused in non- Loading @@ -722,7 +733,8 @@ module LibCommon_Sync { f_clientSync(p_syncId,p_ret); } /* @desc This function combines client verdict setting with its /** * @desc This function combines client verdict setting with its * synchronization for use,e.g, after or within a * test body implementation. * Note that such premables can _not_ be reused in non- Loading @@ -745,7 +757,8 @@ module LibCommon_Sync { f_clientSync(p_syncId,p_ret); } /* @desc This function combines client verdict setting with its /** * @desc This function combines client verdict setting with its * synchronization for use after or within a * postamble implementation. * Note that such prostambles can _not_ be reused in non- Loading @@ -766,7 +779,8 @@ module LibCommon_Sync { f_clientSync(p_syncId,p_ret); } /* @desc This function handles synchronization of a sync client /** * @desc This function handles synchronization of a sync client * with the server. In case of successful execution it sends * a READY message to the server and waits the READY back. * The time used for waiting is defined by PX_TSYNC_TIME_LIMIT. Loading Loading @@ -822,7 +836,8 @@ module LibCommon_Sync { } // end function f_clientSync /* @desc This function can be used to request the shutdown a /** * @desc This function can be used to request the shutdown a * multi component test case _prior_ to reaching a * synchronization point. It sends a STOP message to * the sync server and awaits then the STOP from the server Loading Loading @@ -864,7 +879,8 @@ module LibCommon_Sync { group otherSyncModuleDefinitions { group syncModuleparams { /* /** * * @desc Default time limit for a sync client to reach a * synchronization point */ Loading @@ -887,7 +903,8 @@ module LibCommon_Sync { group otherSelfSyncRelatedDefinitions { /* @desc This function creates the connection needed to /** * @desc This function creates the connection needed to * execute self sync functions * @see LibCommon_Sync.f_selfSync * @see LibCommon_Sync.f_selfSyncStop Loading @@ -897,7 +914,8 @@ module LibCommon_Sync { connect(self:syncSendPort, self:syncPort); }// end function f_connect4SelfSync /* @desc This function removes the connection needed /** * @desc This function removes the connection needed * to execute self sync functions * @see LibCommon_Sync.f_selfSync * @see LibCommon_Sync.f_selfSyncStop Loading @@ -907,7 +925,8 @@ module LibCommon_Sync { disconnect(self:syncSendPort, self:syncPort); }// end function f_disconnect4SelfSync /* @desc This function combines MTC verdict setting with self /** * @desc This function combines MTC verdict setting with self * synchronization for use after and possibly in the test body * @param p_syncId Synchronization point name/id * @param p_ret Current behavior execution status Loading @@ -922,7 +941,8 @@ module LibCommon_Sync { f_selfSync(p_syncId,p_ret); } /* @desc This function combines MTC verdict setting with self /** * @desc This function combines MTC verdict setting with self * synchronization for use after the preamble. * @param p_syncId Synchronization point name/id * @param p_ret Current behavior execution status Loading @@ -936,7 +956,8 @@ module LibCommon_Sync { f_selfSync(p_syncId,p_ret); } /* @desc This function combines MTC verdict setting with self /** * @desc This function combines MTC verdict setting with self * synchronization for use after the postamble. * @param p_syncId Synchronization point name/id * @param p_ret Current behavior execution status Loading @@ -950,7 +971,8 @@ module LibCommon_Sync { f_selfSync(p_syncId,p_ret); } /* @desc This function synchronizes a MTC with itself. In case /** * @desc This function synchronizes a MTC with itself. In case * of a non successful execution status it sends a STOP * message to itself and invokes that way the * shutdown default (if activated). Loading Loading @@ -982,7 +1004,8 @@ module LibCommon_Sync { return e_success ; }// end function f_selfSync /* @desc This function can be used to shut down a test case _prior_ /** * @desc This function can be used to shut down a test case _prior_ * to reaching a synchronization point. it sends a STOP * message to itself and invokes that way the * shutdown default (if activated). Loading Loading @@ -1012,7 +1035,8 @@ module LibCommon_Sync { } // end group otherSelfSyncRelatedDefinitions /* /** * * @desc The sychronization protocol is conceptually based on * named synchronization. Each synchronization point * has it own specific synchronization message. This Loading Loading @@ -1064,7 +1088,7 @@ module LibCommon_Sync { group otherSyncFunctions { /* /** * @desc Makes server send a sync message to all known clients * @param p_clientRefs List of client references to which the message is to be send * @param p_syncCmd The actual synchronization message to be sent out Loading @@ -1078,7 +1102,7 @@ module LibCommon_Sync { } } // end function f_serverSendToAllClients /* /** * @desc This function is intended only for use on server in concurrent * TTCN-3 test cases. It waits for all components to shut down * within the PX_TSHUT_DOWN_TIME_LIMIT. If a timeout occurs Loading
ttcn/LibCommon_TextStrings.ttcn +21 −7 Original line number Diff line number Diff line /* * @author ETSI STF 276 /** * @author ETSI * @version $Id$ * @desc A collection of text string type and value definitions which * may be useful in the implementation of any TTCN-3 test Loading @@ -13,7 +13,7 @@ */ module LibCommon_TextStrings language "TTCN-3:2005" { /* /** * @desc These constants can be used to add special characters into * TTCN-3 text strings by using the concatenation operator. * Example use: Loading Loading @@ -59,7 +59,7 @@ module LibCommon_TextStrings language "TTCN-3:2005" { } // end group usefulConstants /* /** * @remark Number in name indicates string length in number of * _characters_ */ Loading Loading @@ -98,10 +98,24 @@ module LibCommon_TextStrings language "TTCN-3:2005" { type universal charstring UnicodeText1to255 length(1..255) with {encode "length(1..255)"}; type charstring AlphaNum ("0".."9","a".."z","A".."Z"); type AlphaNum AlphaNum2 length(2) with { encode "length(2)"}; type AlphaNum AlphaNum1To32 length(1..32) with {encode "length(1..32)"}; /** * @desc Subtyping can not be used in this type definition to ensure * values of this type are really alphanumeric. * Instead either codecs or a template have * to be used for this purpose. The type is kept here to ensure * backward compatibility. * @see LibCommon_TextStrings.mw_isAlphaNum */ type charstring AlphaNum with { encode "alphanumeric"}; type AlphaNum AlphaNum2 length(2) with { encode "alphanumeric;length(2)"}; type AlphaNum AlphaNum1To32 length(1..32) with {encode "alphanumeric;length(1..32)"}; } // end group usefulTextStringTypes group usefulTextStringTemplates { template charstring mw_isAlphaNum := pattern "([0-9]|[a-z]|[A-Z])+"; } // end group usefulTextStringTemplates } // end module LibCommon_TextStrings