Commits (2)
AtsPki_Microsec.cfg_ AtsPki_Simu.cfg_
\ No newline at end of file \ No newline at end of file
...@@ -148,8 +148,8 @@ module LibCommon_Sync { ...@@ -148,8 +148,8 @@ module LibCommon_Sync {
* @see LibCommon_Sync.ServerSyncComp * @see LibCommon_Sync.ServerSyncComp
* @see LibCommon_Sync.ClientSyncComp * @see LibCommon_Sync.ClientSyncComp
*/ */
type port SyncPort message { type port SyncPort message {
inout SyncCmd inout SyncCmd
} with { } with {
extension "internal" extension "internal"
} }
...@@ -163,7 +163,7 @@ module LibCommon_Sync { ...@@ -163,7 +163,7 @@ module LibCommon_Sync {
e_testBody, e_testBody,
e_postamble e_postamble
} }
} // end compTypeRelated } // end compTypeRelated
group standardSyncPointNames { group standardSyncPointNames {
...@@ -322,7 +322,7 @@ module LibCommon_Sync { ...@@ -322,7 +322,7 @@ module LibCommon_Sync {
* @param p_numClients number of synchronization clients * @param p_numClients number of synchronization clients
* @param p_syncPointIds list of synchronization point name/ids * @param p_syncPointIds list of synchronization point name/ids
*/ */
function f_serverSyncNClientsAndStop ( function f_serverSyncNClientsAndStop (
in UInt p_numClients, in UInt p_numClients,
in SyncPointList p_syncPointIds ) in SyncPointList p_syncPointIds )
runs on ServerSyncComp { runs on ServerSyncComp {
...@@ -421,7 +421,7 @@ module LibCommon_Sync { ...@@ -421,7 +421,7 @@ module LibCommon_Sync {
f_clientSyncAndVerdictPreamble(p_syncPoint, p_ret); f_clientSyncAndVerdictPreamble(p_syncPoint, p_ret);
} }
} }
/** /**
* @desc Calls either self synchronization function if * @desc Calls either self synchronization function if
* invoking component is the MTC, otherwise * invoking component is the MTC, otherwise
...@@ -450,11 +450,11 @@ module LibCommon_Sync { ...@@ -450,11 +450,11 @@ module LibCommon_Sync {
f_clientSyncAndVerdictTestBody(p_syncPoint, p_ret); f_clientSyncAndVerdictTestBody(p_syncPoint, p_ret);
} }
} }
/** /**
* @desc Function kept for backward compatibility * @desc Function kept for backward compatibility
* @see f_selfOrClientSyncAndVerdictPreamble * @see f_selfOrClientSyncAndVerdictPreamble
* *
*/ */
function f_selfOrClientSyncAndVerdictPR( in charstring p_syncPoint, function f_selfOrClientSyncAndVerdictPR( in charstring p_syncPoint,
in FncRetCode p_ret) in FncRetCode p_ret)
...@@ -618,18 +618,18 @@ module LibCommon_Sync { ...@@ -618,18 +618,18 @@ module LibCommon_Sync {
stop ; stop ;
} }
} // end altstep a_dummyShutDown } // end altstep a_dummyShutDown
/** /**
* @desc Shutdown alstep in case the sync server is requesting shutdown. * @desc Shutdown alstep in case the sync server is requesting shutdown.
* *
* @remark User shall stop the component * @remark User shall stop the component
*/ */
altstep a_shutdown() altstep a_shutdown()
runs on ClientSyncComp { runs on BaseSyncComp {
[] syncPort.receive(m_syncServerStop){ [] syncPort.receive(m_syncServerStop){
tc_sync.stop ; tc_sync.stop ;
log("**** a_shutdown: Test component received STOP signal from MTC **** "); log("**** a_shutdown: Test component received STOP signal from MTC **** ");
} }
} }
} // end group shutDownAltsteps } // end group shutDownAltsteps
...@@ -663,7 +663,7 @@ module LibCommon_Sync { ...@@ -663,7 +663,7 @@ module LibCommon_Sync {
/** /**
* @desc Implements synchronization of "n" clients from server * @desc Implements synchronization of "n" clients from server
* side including intermediate synchronization. * side including intermediate synchronization.
* If a problem occurs, then server sends STOP to * If a problem occurs, then server sends STOP to
* all clients. Waits for PX_TSYNC_TIME_LIMIT to let * all clients. Waits for PX_TSYNC_TIME_LIMIT to let
* clients finish executing their behavior until this * clients finish executing their behavior until this
...@@ -682,7 +682,7 @@ module LibCommon_Sync { ...@@ -682,7 +682,7 @@ module LibCommon_Sync {
runs on ServerSyncComp { runs on ServerSyncComp {
f_serverSyncClientsTimedIntermediateSync(p_noOfClients,p_syncId, p_NoOfClientIntermediate, p_syncIdIntermediate, PX_TSYNC_TIME_LIMIT); f_serverSyncClientsTimedIntermediateSync(p_noOfClients,p_syncId, p_NoOfClientIntermediate, p_syncIdIntermediate, 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. * If problem occurs, then server sends STOP to all clients.
...@@ -732,7 +732,7 @@ module LibCommon_Sync { ...@@ -732,7 +732,7 @@ module LibCommon_Sync {
} else if ( p_syncId == c_initDone ) { } else if ( p_syncId == c_initDone ) {
log("**** f_serverSyncClientsTimed: Sync server now starting UPPER TESTER synchronization ... ****") ; log("**** f_serverSyncClientsTimed: Sync server now starting UPPER TESTER synchronization ... ****") ;
} else { } else {
log("**** f_serverSyncClientsTimed: Sync server now starting handling of next synchronization point ... ****") ; log("**** f_serverSyncClientsTimed: Sync server now starting handling of " & p_syncId & " synchronization point ... ****") ;
} }
tc_sync.start(p_execTimeLimit) ; tc_sync.start(p_execTimeLimit) ;
alt{ alt{
...@@ -747,6 +747,7 @@ module LibCommon_Sync { ...@@ -747,6 +747,7 @@ module LibCommon_Sync {
repeat; repeat;
} }
[] syncPort.receive(m_syncClientReady(p_syncId)) -> sender v_clientRef { [] syncPort.receive(m_syncClientReady(p_syncId)) -> sender v_clientRef {
log("**** f_serverSyncClientsTimed: Sync server received READY signal from a client - server will wait for all clients to reach this synchronization point ****");
if(not f_isPresentInArray(v_clientRef, v_clientRefs)) { if(not f_isPresentInArray(v_clientRef, v_clientRefs)) {
v_clientRefs[v_noOfRecvdSyncMsgs] := v_clientRef; v_clientRefs[v_noOfRecvdSyncMsgs] := v_clientRef;
v_noOfRecvdSyncMsgs := v_noOfRecvdSyncMsgs + 1; v_noOfRecvdSyncMsgs := v_noOfRecvdSyncMsgs + 1;
...@@ -767,7 +768,7 @@ module LibCommon_Sync { ...@@ -767,7 +768,7 @@ module LibCommon_Sync {
log("**** f_serverSyncClientsTimed: Sync server received client sync message with incorrect synchronization point id which is currently not handled - server will stop all clients! ****") ; log("**** f_serverSyncClientsTimed: Sync server received client sync message with incorrect synchronization point id which is currently not handled - server will stop all clients! ****") ;
v_stopClients := true; v_stopClients := true;
if(not f_isPresentInArray(v_clientRef, v_clientRefs)) { if(not f_isPresentInArray(v_clientRef, v_clientRefs)) {
v_clientRefs[v_noOfRecvdSyncMsgs] := v_clientRef; v_clientRefs[v_noOfRecvdSyncMsgs] := v_clientRef;
} }
} }
[] syncPort.receive(SyncCmd :? ) { [] syncPort.receive(SyncCmd :? ) {
...@@ -1139,7 +1140,7 @@ module LibCommon_Sync { ...@@ -1139,7 +1140,7 @@ module LibCommon_Sync {
f_selfSync(p_syncId,p_ret); f_selfSync(p_syncId,p_ret);
vc_testcaseStep := e_testBody; vc_testcaseStep := e_testBody;
} }
/** /**
* @desc This function combines MTC verdict setting with self * @desc This function combines MTC verdict setting with self
* synchronization for use after the test body. * synchronization for use after the test body.
...@@ -1317,29 +1318,29 @@ module LibCommon_Sync { ...@@ -1317,29 +1318,29 @@ module LibCommon_Sync {
alt { alt {
[] syncPort.receive { [] syncPort.receive {
// clients may still try to send some sync message // clients may still try to send some sync message
} }
[] all component.done { [] all component.done {
tc_shutDown.stop; tc_shutDown.stop;
log("**** f_serverWaitForAllClientsToShutDown: All components have properly shut down. Sync server will now terminate the test case. ****") ; log("**** f_serverWaitForAllClientsToShutDown: All components have properly shut down. Sync server will now terminate the test case. ****") ;
} }
[] tc_shutDown.timeout { [] tc_shutDown.timeout {
log("**** f_serverWaitForAllClientsToShutDown: Not all clients have properly shutdown within the shut down time limit. Sync server will now terminate test case! ****") ; log("**** f_serverWaitForAllClientsToShutDown: Not all clients have properly shutdown within the shut down time limit. Sync server will now terminate test case! ****") ;
} }
} // end alt } // end alt
// cover case that shut down default is NOT activated // cover case that shut down default is NOT activated
setverdict(inconc); setverdict(inconc);
//mtc.stop; //mtc.stop;
syncPort.send(m_syncServerStop) to self; // this MUST be _server_ for the default to catch! syncPort.send(m_syncServerStop) to self; // this MUST be _server_ for the default to catch!
tc_sync.start(PX_TSYNC_TIME_LIMIT); tc_sync.start(PX_TSYNC_TIME_LIMIT);
alt{ alt{
[] tc_sync.timeout{ [] tc_sync.timeout{
log("**** f_selfSyncStop: Stopping MTC without shutdown - either no shutdown default active or missing syncPort connection ****") ; log("**** f_selfSyncStop: Stopping MTC without shutdown - either no shutdown default active or missing syncPort connection ****") ;
setverdict(inconc); setverdict(inconc);
stop ; stop ;
} }
}//end alt }//end alt
tc_sync.stop; tc_sync.stop;
stop; // if shutdown default is not activated or if it does not stop stop; // if shutdown default is not activated or if it does not stop
} // end function f_serverWaitForAllClientsToShutDown } // end function f_serverWaitForAllClientsToShutDown
function f_isPresentInArray(in ClientSyncComp p_clientRef, in ClientSyncCompList p_clientRefs) function f_isPresentInArray(in ClientSyncComp p_clientRef, in ClientSyncCompList p_clientRefs)
......