Commit a7dd1ad7 authored by Yann Garcia's avatar Yann Garcia
Browse files

Enhance TestSystem PIXITs. This ver sion dpes not compile

parent 5dca816f
......@@ -27,17 +27,41 @@ module OneM2M_Functions {
/**
@desc Ports mapping and default behaviour activation for Config 1
*/
function f_cf01Up(in boolean p_auxiliaryAe2Required := false) runs on AeSimu {
function f_cf01Up(in boolean p_auxiliaryAe2Required := false) runs on AeSimu system AeSystem {
// Variables
var charstring v_binding;
var charstring v_binding_in;
vc_config := e_cf01;
vc_testSystemRole := e_ae;
// Map
map(self:mcaPort, system:mcaPort);
map(self:mcaPortIn, system:mcaPortIn);
map(self:mcaPort, system:mcaPort) param (PX_TS_SETTINGS.AE1.mcaPort, PX_TS_SETTINGS.SUT.sutAddress);
map(self:mcaPortIn, system:mcaPortIn) param (PX_TS_SETTINGS.AE1.mcaPortIn, PX_TS_SETTINGS.SUT.sutAddress);
map(self:acPort, system:acPort);
if (ischosen(PX_TS_SETTINGS.AE1.mcaPort.binding.httpBindingDesc)) {
v_binding := "HTTP";
} else if (ischosen(PX_TS_SETTINGS.AE1.mcaPort.binding.coapBindingDesc)) {
v_binding := "COAP";
} else if (ischosen(PX_TS_SETTINGS.AE1.mcaPort.binding.mqttBindingDesc)) {
v_binding := "MQTT";
} else {
v_binding := "WSCK";
}
if (ischosen(PX_TS_SETTINGS.AE1.mcaPortIn.binding.httpBindingDesc)) {
v_binding_in := "HTTP";
} else if (ischosen(PX_TS_SETTINGS.AE1.mcaPortIn.binding.coapBindingDesc)) {
v_binding_in := "COAP";
} else if (ischosen(PX_TS_SETTINGS.AE1.mcaPortIn.binding.mqttBindingDesc)) {
v_binding_in := "MQTT";
} else {
v_binding_in := "WSCK";
}
vc_myInterfaces[enum2int(e_mca_port)] := { mcaPort, v_binding, c_serializationLabel[enum2int(PX_TS_SETTINGS.AE1.mcaPort.serialization)] };
vc_myInterfaces[enum2int(e_mca_in_port)] := { mcaPortIn, v_binding_in, c_serializationLabel[enum2int(PX_TS_SETTINGS.AE1.mcaPortIn.serialization)] };
activate(a_default());
vc_aeSimu := activate(a_cse_cf01());
......@@ -45,8 +69,6 @@ module OneM2M_Functions {
if(p_auxiliaryAe2Required) {
vc_auxiliaryAe2Up := p_auxiliaryAe2Required;
vc_ae2 := AeSimu.create("AE2") alive;
vc_ae2.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE2));
vc_ae2.done;
vc_ae2.start(f_cf01UpAe2());
vc_ae2.done;
}
......@@ -58,17 +80,41 @@ module OneM2M_Functions {
/**
@desc Ports mapping and default behaviour activation for Config 1 on the auxiliary AE2
*/
function f_cf01UpAe2() runs on AeSimu {
function f_cf01UpAe2() runs on AeSimu system AeSystem {
// Variables
var charstring v_binding;
var charstring v_binding_in;
vc_config := e_cf01;
vc_testSystemRole := e_ae;
// Map
map(self:mcaPort, system:mcaPort);
map(self:mcaPortIn, system:mcaPortIn);
map(self:mcaPort, system:mcaPort) param (PX_TS_SETTINGS.AE2.mcaPort, PX_TS_SETTINGS.SUT.sutAddress);
map(self:mcaPortIn, system:mcaPortIn) param (PX_TS_SETTINGS.AE2.mcaPortIn, PX_TS_SETTINGS.SUT.sutAddress);
map(self:acPort, system:acPort);
if (ischosen(PX_TS_SETTINGS.AE2.mcaPort.binding.httpBindingDesc)) {
v_binding := "HTTP";
} else if (ischosen(PX_TS_SETTINGS.AE2.mcaPort.binding.coapBindingDesc)) {
v_binding := "COAP";
} else if (ischosen(PX_TS_SETTINGS.AE2.mcaPort.binding.mqttBindingDesc)) {
v_binding := "MQTT";
} else {
v_binding := "WSCK";
}
if (ischosen(PX_TS_SETTINGS.AE2.mcaPortIn.binding.httpBindingDesc)) {
v_binding_in := "HTTP";
} else if (ischosen(PX_TS_SETTINGS.AE2.mcaPortIn.binding.coapBindingDesc)) {
v_binding_in := "HTTP";
} else if (ischosen(PX_TS_SETTINGS.AE2.mcaPortIn.binding.mqttBindingDesc)) {
v_binding_in := "MQTT";
} else {
v_binding_in := "WSCK";
}
vc_myInterfaces[enum2int(e_mca_port)] := { mcaPort, v_binding, c_serializationLabel[enum2int(PX_TS_SETTINGS.AE2.mcaPort.serialization)] };
vc_myInterfaces[enum2int(e_mca_in_port)] := { mcaPortIn, v_binding_in, c_serializationLabel[enum2int(PX_TS_SETTINGS.AE2.mcaPortIn.serialization)] };
//Initialze the IUT
} // end f_cf01UpAe2
......@@ -76,20 +122,32 @@ module OneM2M_Functions {
/**
* @desc Ports mapping and default behaviour activation for Config 02
*/
function f_cf02Up(in CseTypeID p_cseType := int2) runs on AeSimu {
function f_cf02Up(in CseTypeID p_cseType := int2) runs on AeSimu system AeSystem {
// Variables
var charstring v_binding;
vc_config := e_cf02;
vc_testSystemRole := e_ae;
vc_cse1 := CseSimu.create("CSE1") alive;
vc_cse1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_CSE1));
vc_cse1.done;
// Map
map(self:mcaPort, system:mcaPort);
map(self:mcaPort, system:mcaPort) param (PX_TS_SETTINGS.AE1.mcaPort, PX_TS_SETTINGS.SUT.sutAddress);
map(self:acPort, system:acPort);
if (ischosen(PX_TS_SETTINGS.AE1.mcaPort.binding.httpBindingDesc)) {
v_binding := "HTTP";
} else if (ischosen(PX_TS_SETTINGS.AE1.mcaPort.binding.coapBindingDesc)) {
v_binding := "HTTP";
} else if (ischosen(PX_TS_SETTINGS.AE1.mcaPort.binding.mqttBindingDesc)) {
v_binding := "MQTT";
} else {
v_binding := "WSCK";
}
vc_myInterfaces[enum2int(e_mca_port)] := { mcaPort, v_binding, c_serializationLabel[enum2int(PX_TS_SETTINGS.AE1.mcaPort.serialization)] };
if(PX_UT_IMPLEMENTED) {
map(self:utPort, system:utPort);
map(self:utPort, system:utPort) param (PX_TS_SETTINGS.UT);
}
activate(a_default());
vc_aeSimu := activate(a_cse_cf02_ae1());
......@@ -105,19 +163,43 @@ module OneM2M_Functions {
/**
@desc Ports mapping and default behaviour activation for Config 2 on the CSE1
*/
function f_cf02UpCse1(in CseTypeID p_cseType := int2) runs on CseSimu {
function f_cf02UpCse1(in CseTypeID p_cseType := int2) runs on CseSimu system CseSystem {
// Variables
var charstring v_binding;
var charstring v_binding_in;
var PrimitiveContent v_cSEBaseResource;
vc_config := e_cf02;
vc_testSystemRole := e_cse;
vc_cseType := p_cseType;
// Map
map(self:mccPort, system:mccPort);
map(self:mccPortIn, system:mccPortIn);
map(self:mccPort, system:mccPort) param (PX_TS_SETTINGS.CSE1.mccPort, PX_TS_SETTINGS.SUT.sutAddress);
map(self:mccPortIn, system:mccPortIn) param (PX_TS_SETTINGS.CSE1.mccPortIn, PX_TS_SETTINGS.SUT.sutAddress);
map(self:acPort, system:acPort);
if (ischosen(PX_TS_SETTINGS.CSE1.mccPort.binding.httpBindingDesc)) {
v_binding := "HTTP";
} else if (ischosen(PX_TS_SETTINGS.CSE1.mccPort.binding.coapBindingDesc)) {
v_binding := "COAP";
} else if (ischosen(PX_TS_SETTINGS.CSE1.mccPort.binding.mqttBindingDesc)) {
v_binding := "MQTT";
} else {
v_binding := "WSCK";
}
if (ischosen(PX_TS_SETTINGS.CSE1.mccPortIn.binding.httpBindingDesc)) {
v_binding_in := "HTTP";
} else if (ischosen(PX_TS_SETTINGS.CSE1.mccPortIn.binding.coapBindingDesc)) {
v_binding_in := "HTTP";
} else if (ischosen(PX_TS_SETTINGS.CSE1.mccPortIn.binding.mqttBindingDesc)) {
v_binding_in := "MQTT";
} else {
v_binding_in := "WSCK";
}
vc_myInterfaces[enum2int(e_mcc_port)] := { mccPort, v_binding, c_serializationLabel[enum2int(PX_TS_SETTINGS.CSE1.mccPort.serialization)] };
vc_myInterfaces[enum2int(e_mcc_in_port)] := { mccPortIn, v_binding_in, c_serializationLabel[enum2int(PX_TS_SETTINGS.CSE1.mccPortIn.serialization)] };
v_cSEBaseResource := f_generateLocalResource(-, -1, int5);
vc_cSEBaseIndex := f_setLocalResource(v_cSEBaseResource, int5, -1);
......@@ -128,25 +210,48 @@ module OneM2M_Functions {
/**
* @desc Ports mapping and default behaviour activation for Config 02
*/
function f_cf02UpCseSimuMaster(in CseTypeID p_cseType := int2) runs on CseSimu {
function f_cf02UpCseSimuMaster(in CseTypeID p_cseType := int2) runs on CseSimu system CseSystem {
// Variables
var charstring v_binding;
var charstring v_binding_in;
var PrimitiveContent v_cSEBaseResource;
vc_config := e_cf02CseSimuMaster;
vc_testSystemRole := e_cse;
vc_cseType := p_cseType;
vc_ae1 := AeSimu.create("AE1") alive;
vc_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
vc_ae1.done;
//Initialization of local CSEBase
v_cSEBaseResource := f_generateLocalResource(-, -1, int5);
vc_cSEBaseIndex := f_setLocalResource(v_cSEBaseResource, int5, -1);
// Map
map(self:mccPort, system:mccPort);
map(self:mccPortIn, system:mccPortIn);
map(self:mccPort, system:mccPort) param (PX_TS_SETTINGS.CSE1.mccPort, PX_TS_SETTINGS.SUT.sutAddress);
map(self:mccPortIn, system:mccPortIn) param (PX_TS_SETTINGS.CSE1.mccPortIn, PX_TS_SETTINGS.SUT.sutAddress);
map(self:acPort, system:acPort);
if (ischosen(PX_TS_SETTINGS.CSE1.mccPort.binding.httpBindingDesc)) {
v_binding := "HTTP";
} else if (ischosen(PX_TS_SETTINGS.CSE1.mccPort.binding.coapBindingDesc)) {
v_binding := "COAP";
} else if (ischosen(PX_TS_SETTINGS.CSE1.mccPort.binding.mqttBindingDesc)) {
v_binding := "MQTT";
} else {
v_binding := "WSCK";
}
if (ischosen(PX_TS_SETTINGS.CSE1.mccPortIn.binding.httpBindingDesc)) {
v_binding_in := "HTTP";
} else if (ischosen(PX_TS_SETTINGS.CSE1.mccPortIn.binding.coapBindingDesc)) {
v_binding_in := "HTTP";
} else if (ischosen(PX_TS_SETTINGS.CSE1.mccPortIn.binding.mqttBindingDesc)) {
v_binding_in := "MQTT";
} else {
v_binding_in := "WSCK";
}
vc_myInterfaces[enum2int(e_mcc_port)] := { mccPort, v_binding, c_serializationLabel[enum2int(PX_TS_SETTINGS.CSE1.mccPort.serialization)] };
vc_myInterfaces[enum2int(e_mcc_in_port)] := { mccPortIn, v_binding_in, c_serializationLabel[enum2int(PX_TS_SETTINGS.CSE1.mccPortIn.serialization)] };
activate(a_default());
vc_cseSimu := activate(a_cse_cf02_cse1());
vc_ae1.start(f_cf02UpAe1());
......@@ -161,17 +266,41 @@ module OneM2M_Functions {
/**
@desc Ports mapping and default behaviour activation for Config 2 on the AE1
*/
function f_cf02UpAe1(in CseTypeID p_cseType := int2) runs on AeSimu {
function f_cf02UpAe1(in CseTypeID p_cseType := int2) runs on AeSimu system AeSystem {
// Variables
var charstring v_binding;
var charstring v_binding_in;
vc_config := e_cf02CseSimuMaster;
vc_testSystemRole := e_ae;
// Map
map(self:mcaPort, system:mcaPort);
map(self:mcaPortIn, system:mcaPortIn);
map(self:mcaPort, system:mcaPort) param (PX_TS_SETTINGS.AE1.mcaPort, PX_TS_SETTINGS.SUT.sutAddress);
map(self:mcaPortIn, system:mcaPortIn) param (PX_TS_SETTINGS.AE1.mcaPortIn, PX_TS_SETTINGS.SUT.sutAddress);
map(self:acPort, system:acPort);
if (ischosen(PX_TS_SETTINGS.AE1.mcaPort.binding.httpBindingDesc)) {
v_binding := "HTTP";
} else if (ischosen(PX_TS_SETTINGS.AE1.mcaPort.binding.coapBindingDesc)) {
v_binding := "COAP";
} else if (ischosen(PX_TS_SETTINGS.AE1.mcaPort.binding.mqttBindingDesc)) {
v_binding := "MQTT";
} else {
v_binding := "WSCK";
}
if (ischosen(PX_TS_SETTINGS.AE1.mcaPortIn.binding.httpBindingDesc)) {
v_binding_in := "HTTP";
} else if (ischosen(PX_TS_SETTINGS.AE1.mcaPortIn.binding.coapBindingDesc)) {
v_binding_in := "COAP";
} else if (ischosen(PX_TS_SETTINGS.AE1.mcaPortIn.binding.mqttBindingDesc)) {
v_binding_in := "MQTT";
} else {
v_binding_in := "WSCK";
}
vc_myInterfaces[enum2int(e_mca_port)] := { mcaPort, v_binding, c_serializationLabel[enum2int(PX_TS_SETTINGS.AE1.mcaPort.serialization)] };
vc_myInterfaces[enum2int(e_mca_in_port)] := { mcaPortIn, v_binding_in, c_serializationLabel[enum2int(PX_TS_SETTINGS.AE1.mcaPortIn.serialization)] };
//Initialze the IUT
} // end f_cf02UpAe1
......@@ -179,9 +308,10 @@ module OneM2M_Functions {
/**
* @desc Ports mapping and default behaviour activation for Config 03
*/
function f_cf03Up(in CseTypeID p_cseType := int2) runs on CseSimu {
function f_cf03Up(in CseTypeID p_cseType := int2) runs on CseSimu system CseSystem {
// Variables
var charstring v_binding;
var PrimitiveContent v_cSEBaseResource;
vc_config := e_cf03;
vc_testSystemRole := e_cse;
......@@ -192,10 +322,23 @@ module OneM2M_Functions {
vc_cSEBaseIndex := f_setLocalResource(v_cSEBaseResource, int5, -1);
// Map
map(self:mcaPortIn, system:mcaPortIn);//TODO To be consistent, we should use mcaPortIn for AE testing
map(self:mcaPortIn, system:mcaPortIn) param (PX_TS_SETTINGS.AE1.mcaPort, PX_TS_SETTINGS.SUT.sutAddress);//TODO To be consistent, we should use mcaPortIn for AE testing
map(self:acPort, system:acPort);
if (ischosen(PX_TS_SETTINGS.AE2.mcaPort.binding.httpBindingDesc)) {
v_binding := "HTTP";
} else if (ischosen(PX_TS_SETTINGS.AE2.mcaPort.binding.coapBindingDesc)) {
v_binding := "COAP";
} else if (ischosen(PX_TS_SETTINGS.AE2.mcaPort.binding.mqttBindingDesc)) {
v_binding := "MQTT";
} else {
v_binding := "WSCK";
}
vc_myInterfaces[enum2int(e_mca_in_port)] := { mcaPortIn, v_binding, c_serializationLabel[enum2int(PX_TS_SETTINGS.AE2.mcaPortIn.serialization)] };
if(PX_UT_IMPLEMENTED) {
map(self:utPort, system:utPort);
map(self:utPort, system:utPort) param (PX_TS_SETTINGS.UT);
}
activate(a_default());
vc_cseSimu := activate(a_cse_cf03());
......@@ -209,9 +352,11 @@ module OneM2M_Functions {
/**
* @desc Ports mapping and default behaviour activation for Config 04
*/
function f_cf04Up(in CseTypeID p_cseType := int2) runs on CseSimu {
function f_cf04Up(in CseTypeID p_cseType := int2) runs on CseSimu system CseSystem {
// Variables
var charstring v_binding;
var charstring v_binding_in;
var PrimitiveContent v_cSEBaseResource;
vc_config := e_cf04;
vc_testSystemRole := e_cse;
......@@ -221,9 +366,32 @@ module OneM2M_Functions {
vc_cSEBaseIndex := f_setLocalResource(v_cSEBaseResource, int5, -1);
// Map
map(self:mccPort, system:mccPort);
map(self:mccPortIn, system:mccPortIn);
map(self:mccPort, system:mccPort) param (PX_TS_SETTINGS.CSE1.mccPort, PX_TS_SETTINGS.SUT.sutAddress);
map(self:mccPortIn, system:mccPortIn) param (PX_TS_SETTINGS.CSE1.mccPortIn, PX_TS_SETTINGS.SUT.sutAddress);
map(self:acPort, system:acPort);
if (ischosen(PX_TS_SETTINGS.CSE1.mccPort.binding.httpBindingDesc)) {
v_binding := "HTTP";
} else if (ischosen(PX_TS_SETTINGS.CSE1.mccPort.binding.coapBindingDesc)) {
v_binding := "COAP";
} else if (ischosen(PX_TS_SETTINGS.CSE1.mccPort.binding.mqttBindingDesc)) {
v_binding := "MQTT";
} else {
v_binding := "WSCK";
}
if (ischosen(PX_TS_SETTINGS.CSE1.mccPortIn.binding.httpBindingDesc)) {
v_binding_in := "HTTP";
} else if (ischosen(PX_TS_SETTINGS.CSE1.mccPortIn.binding.coapBindingDesc)) {
v_binding_in := "HTTP";
} else if (ischosen(PX_TS_SETTINGS.CSE1.mccPortIn.binding.mqttBindingDesc)) {
v_binding_in := "MQTT";
} else {
v_binding_in := "WSCK";
}
vc_myInterfaces[enum2int(e_mcc_port)] := { mccPort, v_binding, c_serializationLabel[enum2int(PX_TS_SETTINGS.CSE1.mccPort.serialization)] };
vc_myInterfaces[enum2int(e_mcc_in_port)] := { mccPortIn, v_binding_in, c_serializationLabel[enum2int(PX_TS_SETTINGS.CSE1.mccPortIn.serialization)] };
activate(a_default());
vc_cseSimu := activate(a_cse_cf04());
......@@ -749,7 +917,7 @@ module OneM2M_Functions {
v_request := f_getCreateRequestPrimitive(int2, v_request, -1);
mcaPort.send(f_getMsgOutPrimitive(m_request(v_request)));
f_send(e_mca_port, f_getMsgOutPrimitive(m_request(v_request)));
tc_ac.start;
alt {
......@@ -814,10 +982,10 @@ module OneM2M_Functions {
//TODO Test, to be removed
v_request.to_ := f_getResourceAddress();
mcaPort.send(f_getMsgOutPrimitive(m_request(v_request)));
//mcaPort.send(f_getMsgOutPrimitive(m_request(m_createAeAux(p_name, {PX_URI_CSE & PX_CSE_NAME & "/" & PX_ACPAUX_NAME}))));
f_send(e_mca_port, f_getMsgOutPrimitive(m_request(v_request)));
//f_send(e_mca_port, f_getMsgOutPrimitive(m_request(m_createAeAux(p_name, {PX_URI_CSE & PX_CSE_NAME & "/" & PX_ACPAUX_NAME}))));
} else {
mcaPort.send(f_getMsgOutPrimitive(m_request(m_createAe(p_appId))));
f_send(e_mca_port, f_getMsgOutPrimitive(m_request(m_createAe(p_appId))));
}
tc_ac.start;
alt {
......@@ -908,7 +1076,7 @@ module OneM2M_Functions {
vc_ae2.start(f_cse_createAccessControlPolicyAux("SubscriptionVerificationAcp",{"all"}, int63));
f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2);
vc_ae2.start(f_cse_createResource_withAcpAux(int2, m_createAe(PX_APP_ID, -, PX_AE2_ID_STEM, c_defaultAE2Name, {f_getCompletePoA("HTTP", PX_AE2_ADDRESS, "")}), -1)); // AE2 is registred
vc_ae2.start(f_cse_createResource_withAcpAux(int2, m_createAe(PX_APP_ID, -, PX_AE2_ID_STEM, c_defaultAE2Name, {f_getCompletePoA(PX_TS_SETTINGS.AE2.mcaPortIn, "")}), -1)); // AE2 is registred
f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2);
p_ae2Index := f_getResourceFromAeSimu(vc_ae2);
......@@ -954,7 +1122,7 @@ module OneM2M_Functions {
v_request.from_ := f_getOriginator(vc_resourcesIndexToBeDeleted[i]);
mcaPort.send(f_getMsgOutPrimitive(m_request(v_request)));
f_send(e_mca_port, f_getMsgOutPrimitive(m_request(v_request)));
tc_ac.start;
alt {
......@@ -1046,7 +1214,8 @@ module OneM2M_Functions {
v_request := valueof(m_delete(v_resourceAddress, f_getOriginator(v_resourceIndex, vc_testSystemRole)));
mccPort.send(f_getMsgOutPrimitive(m_request(v_request)));
//mccPort.send(f_getMsgOutPrimitive(m_request(v_request)));
f_send(e_mcc_port, f_getMsgOutPrimitive(m_request(v_request)));
tc_ac.start;
alt {
......@@ -1076,7 +1245,8 @@ module OneM2M_Functions {
//v_request := valueof(m_delete(v_childResourceRefs[0], f_getOriginator(vc_remoteCseIndex)));
v_request := valueof(m_delete(v_childResourceRefs[0]));//TODO Originator super user to be replaced by CSE1_ID (line above)
mccPort.send(f_getMsgOutPrimitive(m_request(v_request)));
//mccPort.send(f_getMsgOutPrimitive(m_request(v_request)));
f_send(e_mcc_port, f_getMsgOutPrimitive(m_request(v_request)));
tc_ac.start;
alt {
......@@ -1107,7 +1277,8 @@ module OneM2M_Functions {
[] mccPortIn.receive(mw_request(mw_delete(f_getLocalResourceAddress(vc_localRemoteCseIndex)))) -> value vc_request {
tc_ac.stop;
f_processDeleteRequestPrimitive(vc_request.primitive.requestPrimitive);
mccPortIn.send(f_getMsgOutPrimitive(m_response(vc_response.primitive.responsePrimitive)));
//mccPortIn.send(f_getMsgOutPrimitive(m_response(vc_response.primitive.responsePrimitive)));
f_send(e_mcc_in_port, f_getMsgOutPrimitive(m_response(vc_response.primitive.responsePrimitive)));
log(__SCOPE__&": INFO: Deregistration performed successfully");
}
[] tc_ac.timeout {
......@@ -1143,7 +1314,7 @@ module OneM2M_Functions {
v_request := f_getCreateRequestPrimitive(p_resourceType, p_requestPrimitive, p_parentIndex);
mcaPort.send(f_getMsgOutPrimitive(m_request(v_request)));
f_send(e_mca_port, f_getMsgOutPrimitive(m_request(v_request)));
tc_ac.start;
alt {
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value vc_response {
......@@ -1215,7 +1386,7 @@ module OneM2M_Functions {
v_request := f_getCreateRequestPrimitive(int1, v_request, -1);
mcaPort.send(f_getMsgOutPrimitive(m_request(v_request)));
f_send(e_mca_port, f_getMsgOutPrimitive(m_request(v_request)));
tc_ac.start;
alt {
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value vc_response {
......@@ -1260,7 +1431,7 @@ module OneM2M_Functions {
v_request := f_getUpdateRequestPrimitive(p_resourceType, p_resourceIndex, p_request);
mcaPort.send(f_getMsgOutPrimitive(m_request(valueof(v_request), p_nullFields)));
f_send(e_mca_port, f_getMsgOutPrimitive(m_request(valueof(v_request), p_nullFields)));
tc_ac.start;
alt {
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value vc_response {
......@@ -1292,7 +1463,7 @@ module OneM2M_Functions {
*/
function f_cse_retrieveResource(integer p_resourceIndex) runs on AeSimu return PrimitiveContent{
mcaPort.send(f_getMsgOutPrimitive(m_request(m_retrieve(f_getResourceAddress(p_resourceIndex), f_getOriginator(p_resourceIndex)))));
f_send(e_mca_port, f_getMsgOutPrimitive(m_request(m_retrieve(f_getResourceAddress(p_resourceIndex), f_getOriginator(p_resourceIndex)))));
tc_ac.start;
alt {
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value vc_response {
......@@ -1329,8 +1500,8 @@ module OneM2M_Functions {
v_request := valueof(p_requestPrimitive);
}
mcaPort.send(f_getMsgOutPrimitive(m_request(v_request)));
f_send(e_mca_port, f_getMsgOutPrimitive(m_request(v_request)));
tc_ac.start;
alt {
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) {
......@@ -1360,7 +1531,8 @@ module OneM2M_Functions {
*/
function f_cse_operationResource(template RequestPrimitive p_requestPrimitive) runs on AeSimu return PrimitiveContent{
mcaPort.send(f_getMsgOutPrimitive(m_request(valueof(p_requestPrimitive))));
f_send(e_mca_port, f_getMsgOutPrimitive(m_request(valueof(p_requestPrimitive))));
tc_ac.start;
alt {
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value vc_response {
......@@ -1390,7 +1562,7 @@ module OneM2M_Functions {
function f_cse_isResourcePresent (integer p_resourceIndex) runs on AeSimu return boolean {
//Check to see if the resource is present or not
mcaPort.send(f_getMsgOutPrimitive(m_request(m_retrieve(f_getResourceAddress(p_resourceIndex), f_getOriginator(p_resourceIndex)))));
f_send(e_mca_port, f_getMsgOutPrimitive(m_request(m_retrieve(f_getResourceAddress(p_resourceIndex), f_getOriginator(p_resourceIndex)))));
tc_ac.start;
alt {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int2000))) {
......@@ -1427,7 +1599,7 @@ module OneM2M_Functions {
log(testcasename() & ":INFO: Hierarchical addressing method is required to check the non presence of the resource");
//Check to see if the resource has NOT been created
mcaPort.send(f_getMsgOutPrimitive(m_request(m_retrieve(f_getResourceAddress(p_parentIndex, e_hierarchical) & "/" & p_resourceName, f_getOriginator(p_parentIndex)))));
f_send(e_mca_port, f_getMsgOutPrimitive(m_request(m_retrieve(f_getResourceAddress(p_parentIndex, e_hierarchical) & "/" & p_resourceName, f_getOriginator(p_parentIndex)))));
tc_ac.start;
alt {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int4004))) {
......@@ -1464,7 +1636,7 @@ module OneM2M_Functions {
v_request.from_ := f_getOriginator(vc_acpAuxIndex);
v_request.primitiveContent.accessControlPolicy.privileges.accessControlRule_list := {valueof(m_createAcr(PX_ACOR, p_allowedOperations))};
mcaPort.send(f_getMsgOutPrimitive(m_request(v_request)));
f_send(e_mca_port, f_getMsgOutPrimitive(m_request(v_request)));
tc_ac.start;
alt {
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) {
......@@ -1498,7 +1670,7 @@ module OneM2M_Functions {
v_request := f_getCreateRequestPrimitive(p_resourceType, p_requestPrimitive, p_parentIndex);
mcaPort.send(f_getMsgOutPrimitive(m_request(v_request)));
f_send(e_mca_port, f_getMsgOutPrimitive(m_request(v_request)));
}
......@@ -1516,7 +1688,7 @@ module OneM2M_Functions {
v_request := f_getUpdateRequestPrimitive(p_resourceType, p_targetIndex, p_requestUpdatePrimitive);
mcaPort.send(f_getMsgOutPrimitive(m_request(v_request)));
f_send(e_mca_port, f_getMsgOutPrimitive(m_request(v_request)));
}
......@@ -1628,10 +1800,10 @@ module OneM2M_Functions {
v_responsePrimitive.requestIdentifier := vc_request.primitive.requestPrimitive.requestIdentifier;
if(getverdict == pass) {
mcaPortIn.send(f_getMsgOutPrimitive(m_httpResponse(v_responsePrimitive)));
f_send(e_mca_in_port, f_getMsgOutPrimitive(m_httpResponse(v_responsePrimitive)));
} else {
v_responsePrimitive.responseStatusCode := int4000;
mcaPortIn.send(f_getMsgOutPrimitive(m_httpResponse(v_responsePrimitive)));
f_send(e_mca_in_port, f_getMsgOutPrimitive(m_httpResponse(v_responsePrimitive)));
}
//mcaPort.send(f_getMsgOutPrimitive(m_response(v_responsePrimitive))); // TODO have to be deleted
......@@ -1659,7 +1831,7 @@ module OneM2M_Functions {
//Send response in any case
v_responsePrimitive := valueof(m_responseNotification(int2000, omit));
v_responsePrimitive.requestIdentifier := vc_request.primitive.requestPrimitive.requestIdentifier;
mcaPortIn.send(f_getMsgOutPrimitive(m_response(v_responsePrimitive)));
f_send(e_mca_in_port, f_getMsgOutPrimitive(m_response(v_responsePrimitive)));
tc_ac.start;
repeat;
}
......@@ -1698,7 +1870,7 @@ module OneM2M_Functions {
//Send response in any case
v_responsePrimitive := valueof(m_responseNotification(int2000, omit));
v_responsePrimitive.requestIdentifier := vc_request.primitive.requestPrimitive.requestIdentifier;
mcaPortIn.send(f_getMsgOutPrimitive(m_response(v_responsePrimitive)));
f_send(e_mca_in_port, f_getMsgOutPrimitive(m_response(v_responsePrimitive)));
}
[] mcaPortIn.receive{
tc_ac.stop;
......@@ -1743,7 +1915,7 @@ module OneM2M_Functions {
}
if(isvalue(v_responsePrimitive)) {
mcaPortIn.send(f_getMsgOutPrimitive(m_response(v_responsePrimitive)));
f_send(e_mca_in_port, f_getMsgOutPrimitive(m_response(v_responsePrimitive)));
}
......@@ -1780,7 +1952,7 @@ module OneM2M_Functions {
//Send response in any case
v_responsePrimitive := valueof(m_responseNotification(int2000, omit));
v_responsePrimitive.requestIdentifier := vc_request.primitive.requestPrimitive.requestIdentifier;
mcaPortIn.send(f_getMsgOutPrimitive(m_response(v_responsePrimitive)));
f_send(e_mca_in_port, f_getMsgOutPrimitive(m_response(v_responsePrimitive)));
}
[] mcaPortIn.receive(mw_request(mw_notifyNotification(mw_contentNotification(?)))) -> value vc_request {
tc_ac.stop;
......@@ -1793,7 +1965,7 @@ module OneM2M_Functions {
//Send response in any case
v_responsePrimitive := valueof(m_responseNotification(int2000, omit));
v_responsePrimitive.requestIdentifier := vc_request.primitive.requestPrimitive.requestIdentifier;
mcaPortIn.send(f_getMsgOutPrimitive(m_response(v_responsePrimitive)));
f_send(e_mca_in_port, f_getMsgOutPrimitive(m_response(v_responsePrimitive)));
v_notificationsReceived := v_notificationsReceived + 1;
if(v_notificationsReceived < p_numberOfAggregatedNotification) {
tc_ac.start;
......@@ -1828,7 +2000,7 @@ module OneM2M_Functions {
tc_ac.stop;
v_responsePrimitive := valueof(m_responseNotification(int2000, omit));
v_responsePrimitive.requestIdentifier := vc_request.primitive.requestPrimitive.requestIdentifier;
mcaPortIn.send(f_getMsgOutPrimitive(m_response(v_responsePrimitive)));
f_send(e_mca_in_port, f_getMsgOutPrimitive(m_response(v_responsePrimitive)));