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