Reordering default altsteps

Signed-off-by: Miguel Angel Reina Ortega's avatarreinaortega <miguelangel.reinaortega@etsi.org>
parent 2fad9594
......@@ -39,7 +39,7 @@ module OneM2M_Functions {
map(self:acPort, system:acPort);
activate(a_default());
vc_a_cse := activate(a_cse_cf01());
vc_aeSimu := activate(a_cse_cf01());
// Initialize AE2
if(p_auxiliaryAe2Required) {
......@@ -92,7 +92,7 @@ module OneM2M_Functions {
map(self:utPort, system:utPort);
}
activate(a_default());
vc_a_cse := activate(a_cse_cf02_ae1());
vc_aeSimu := activate(a_cse_cf02_ae1());
vc_cse1.start(f_cf02UpCse1());
vc_cse1.done;
......@@ -146,7 +146,7 @@ module OneM2M_Functions {
map(self:mccPortIn, system:mccPortIn);
map(self:acPort, system:acPort);
activate(a_default());
vc_a_cse := activate(a_cse_cf02_cse1());
vc_cseSimu := activate(a_cse_cf02_cse1());
vc_ae1.start(f_cf02UpAe1());
vc_ae1.done;
......@@ -195,7 +195,7 @@ module OneM2M_Functions {
map(self:utPort, system:utPort);
}
activate(a_default());
vc_a_ae := activate(a_ae_cf03());
vc_cseSimu := activate(a_cse_cf03());
// Connect
......@@ -222,7 +222,7 @@ module OneM2M_Functions {
map(self:mccPortIn, system:mccPortIn);
map(self:acPort, system:acPort);
activate(a_default());
vc_a_cse := activate(a_cse_cf04());
vc_cseSimu := activate(a_cse_cf04());
// Connect
......@@ -2375,12 +2375,40 @@ module OneM2M_Functions {
log(__SCOPE__&": WARNING: Unexpected Notification for Subscription Verification message received");
repeat;
}
}
}
/**
* @desc Cse altstep for config 02 on CSE1 (AE1 as master)
/**
* @desc Cse altstep for config 02
*/
altstep a_cse_cf02_ae1() runs on AeSimu {
[] a_cse_aeSimu();
}
/**
* @desc Cse altstep for config 02
*/
altstep a_cse_cf02_cse1() runs on CseSimu {
[] a_cse_cseSimu();
}
/**
* @desc Cse altstep for config 03
*/
altstep a_cse_cf03() runs on CseSimu {
[] a_ae_cseSimu();
}
/**
* @desc Cse altstep for config 04
*/
altstep a_cse_cf04() runs on CseSimu {
[] a_cse_cseSimu();
}
/**
* @desc Altstep for CseSimu
*/
altstep a_cse_cseSimu() runs on CseSimu {
var PrimitiveContent v_localResource;
var integer v_localResourceIndex := -1;
......@@ -2451,27 +2479,61 @@ module OneM2M_Functions {
}
/**
* @desc Cse altstep for config 02 on AE1 (CSE1 as master)
* @desc Altstep for AeSimu
*/
altstep a_cse_cf02_ae1() runs on AeSimu
{
altstep a_cse_aeSimu() runs on AeSimu {
var MsgIn v_request;
var ResponsePrimitive v_response;
[] mcaPortIn.receive(mw_request(mw_notify)) -> value v_request {
tc_ac.stop;
log(__SCOPE__&": WARNING: Unexpected NOTIFY message received");
//Send response in any case
v_response := valueof(m_responseNotification(int2000, omit));
v_response.requestIdentifier := vc_request.primitive.requestPrimitive.requestIdentifier;
mcaPortIn.send(f_getMsgOutPrimitive(m_response(v_response)));
tc_ac.start(10.0);
repeat;
}
[] mcaPortIn.receive {
log(__SCOPE__&": WARNING: Unexpected message received");
repeat;
}
[] mcaPort.receive {
log(__SCOPE__&": WARNING: Unexpected message received");
repeat;
}
}
}
/**
* @desc Cse altstep for config 04
* @desc Altstep for AeSimu
*/
altstep a_cse_cf04() runs on CseSimu {
altstep a_ae_cseSimu() runs on CseSimu {
var MsgIn v_request;
var ResponsePrimitive v_response;
[] mcaPortIn.receive(mw_request(mw_notify)) -> value v_request {
tc_ac.stop;
log(__SCOPE__&": WARNING: Unexpected NOTIFY message received");
[] mccPort.receive {
//Send response in any case
v_response := valueof(m_responseNotification(int2000, omit));
v_response.requestIdentifier := vc_request.primitive.requestPrimitive.requestIdentifier;
mcaPortIn.send(f_getMsgOutPrimitive(m_response(v_response)));
tc_ac.start(10.0);
repeat;
}
[] mcaPortIn.receive {
log(__SCOPE__&": WARNING: Unexpected message received");
repeat;
}
}
[] mcaPort.receive {
log(__SCOPE__&": WARNING: Unexpected message received");
repeat;
}
}
}//end group altstepFunctions
function f_cse_activateDefaults_cse1() runs on CseSimu {
......@@ -3742,17 +3804,17 @@ module OneM2M_Functions {
activate(a_default());
if(vc_config == e_cf01) {
vc_a_cse := activate(a_cse_cf01());
vc_aeSimu := activate(a_cse_cf01());
} else if ((vc_config == e_cf02) or (vc_config == e_cf02CseSimuMaster)) {
if(vc_testSystemRole == e_ae) {
vc_a_cse := activate(a_cse_cf02_ae1());
vc_aeSimu := activate(a_cse_cf02_ae1());
} else if (vc_testSystemRole == e_cse) {
vc_a_cse := activate(a_cse_cf02_cse1());
vc_cseSimu := activate(a_cse_cf02_cse1());
}
} else if (vc_config == e_cf03) {
vc_a_ae := activate(a_ae_cf03());
vc_cseSimu := activate(a_ae_cf03());
} else if (vc_config == e_cf04) {
vc_a_cse := activate(a_cse_cf04());
vc_cseSimu := activate(a_cse_cf04());
}
}else{
......
......@@ -40,8 +40,8 @@ module OneM2M_TestSystem {
var AccessControlPolicy_optional vc_acpAux;
var MsgIn vc_request;
var MsgIn vc_response;
var default vc_a_ae := null;
var default vc_a_cse := null;
var default vc_aeSimu := null;
var default vc_cseSimu := null;
};
type component AeSimu extends Tester {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment