Commit 29d64ec9 authored by Miguel Angel Reina Ortega's avatar Miguel Angel Reina Ortega
Browse files

Merge branch 'TS_PIXITS_ENHANCEMENT_BUGGY' of https://git.onem2m.org/TST/ATS...

Merge branch 'TS_PIXITS_ENHANCEMENT_BUGGY' of https://git.onem2m.org/TST/ATS

 into TS_PIXITS_ENHANCEMENT_BUGGY
Signed-off-by: Miguel Angel Reina Ortega's avatarreinaortega <miguelangel.reinaortega@etsi.org>
parents f9becf10 00245d74
...@@ -27,11 +27,12 @@ module OneM2M_Functions { ...@@ -27,11 +27,12 @@ module OneM2M_Functions {
/** /**
@desc Ports mapping and default behaviour activation for Config 1 @desc Ports mapping and default behaviour activation for Config 1
*/ */
function f_cf01Up(in boolean p_auxiliaryAe2Required := false) runs on AeSimu system AeSystem { function f_cf01Up(in boolean p_auxiliaryAe2Required := false) runs on AeSimu system CseSystem {
// Variables // Variables
var charstring v_binding; var charstring v_binding;
var charstring v_binding_in; var charstring v_binding_in;
var integer v_port := 0;
vc_config := e_cf01; vc_config := e_cf01;
vc_testSystemRole := e_ae; vc_testSystemRole := e_ae;
...@@ -40,14 +41,18 @@ module OneM2M_Functions { ...@@ -40,14 +41,18 @@ module OneM2M_Functions {
map(self:mcaPortIn, system:mcaPortIn) param (PX_TS_SETTINGS.AE1.mcaPortIn, 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); map(self:acPort, system:acPort);
if (ischosen(PX_TS_SETTINGS.AE1.mcaPort.binding.httpBindingDesc)) { if (ischosen(PX_TS_SETTINGS.AE1.mcaPort.binding.httpBindingDesc)) { // FIXME Create a function to initialize vc_myInterfaces
v_binding := "HTTP"; v_binding := "HTTP";
v_port := PX_TS_SETTINGS.AE1.mcaPort.binding.httpBindingDesc.bindingDesc.remotePort; // FIXME Use mcxPortyy.sutAddress if present instead of PX_TS_SETTINGS.SUT.sutAddress
} else if (ischosen(PX_TS_SETTINGS.AE1.mcaPort.binding.coapBindingDesc)) { } else if (ischosen(PX_TS_SETTINGS.AE1.mcaPort.binding.coapBindingDesc)) {
v_binding := "COAP"; v_binding := "COAP";
v_port := PX_TS_SETTINGS.AE1.mcaPort.binding.coapBindingDesc.bindingDesc.remotePort;
} else if (ischosen(PX_TS_SETTINGS.AE1.mcaPort.binding.mqttBindingDesc)) { } else if (ischosen(PX_TS_SETTINGS.AE1.mcaPort.binding.mqttBindingDesc)) {
v_binding := "MQTT"; v_binding := "MQTT";
v_port := PX_TS_SETTINGS.AE1.mcaPort.binding.mqttBindingDesc.bindingDesc.remotePort;
} else { } else {
v_binding := "WSCK"; v_binding := "WSCK";
v_port := PX_TS_SETTINGS.AE1.mcaPort.binding.wsBindingDesc.bindingDesc.remotePort;
} }
if (ischosen(PX_TS_SETTINGS.AE1.mcaPortIn.binding.httpBindingDesc)) { if (ischosen(PX_TS_SETTINGS.AE1.mcaPortIn.binding.httpBindingDesc)) {
v_binding_in := "HTTP"; v_binding_in := "HTTP";
...@@ -59,8 +64,8 @@ module OneM2M_Functions { ...@@ -59,8 +64,8 @@ module OneM2M_Functions {
v_binding_in := "WSCK"; v_binding_in := "WSCK";
} }
vc_myInterfaces[enum2int(InterfaceIds:e_mca_port)] := { mcaPort, v_binding, c_serializationLabel[enum2int(PX_TS_SETTINGS.AE1.mcaPort.serialization)] }; vc_myInterfaces[enum2int(InterfaceIds:e_mca_port)] := { mcaPort, PX_TS_SETTINGS.SUT.sutAddress & ":" & int2str(v_port), v_binding, c_serializationLabel[enum2int(PX_TS_SETTINGS.AE1.mcaPort.serialization)] };
vc_myInterfaces[enum2int(InterfaceIds:e_mca_in_port)] := { mcaPortIn, v_binding_in, c_serializationLabel[enum2int(PX_TS_SETTINGS.AE1.mcaPortIn.serialization)] }; vc_myInterfaces[enum2int(InterfaceIds:e_mca_in_port)] := { mcaPortIn, PX_TS_SETTINGS.SUT.sutAddress & ":" & int2str(v_port), v_binding_in, c_serializationLabel[enum2int(PX_TS_SETTINGS.AE1.mcaPortIn.serialization)] };
activate(a_default()); activate(a_default());
vc_aeSimu := activate(a_cse_cf01()); vc_aeSimu := activate(a_cse_cf01());
...@@ -80,11 +85,12 @@ module OneM2M_Functions { ...@@ -80,11 +85,12 @@ module OneM2M_Functions {
/** /**
@desc Ports mapping and default behaviour activation for Config 1 on the auxiliary AE2 @desc Ports mapping and default behaviour activation for Config 1 on the auxiliary AE2
*/ */
function f_cf01UpAe2() runs on AeSimu system AeSystem { function f_cf01UpAe2() runs on AeSimu system CseSystem {
// Variables // Variables
var charstring v_binding; var charstring v_binding;
var charstring v_binding_in; var charstring v_binding_in;
var integer v_port := 0;
vc_config := e_cf01; vc_config := e_cf01;
vc_testSystemRole := e_ae; vc_testSystemRole := e_ae;
...@@ -95,12 +101,16 @@ module OneM2M_Functions { ...@@ -95,12 +101,16 @@ module OneM2M_Functions {
if (ischosen(PX_TS_SETTINGS.AE2.mcaPort.binding.httpBindingDesc)) { if (ischosen(PX_TS_SETTINGS.AE2.mcaPort.binding.httpBindingDesc)) {
v_binding := "HTTP"; v_binding := "HTTP";
v_port := PX_TS_SETTINGS.AE2.mcaPort.binding.httpBindingDesc.bindingDesc.remotePort;
} else if (ischosen(PX_TS_SETTINGS.AE2.mcaPort.binding.coapBindingDesc)) { } else if (ischosen(PX_TS_SETTINGS.AE2.mcaPort.binding.coapBindingDesc)) {
v_binding := "COAP"; v_binding := "COAP";
v_port := PX_TS_SETTINGS.AE2.mcaPort.binding.coapBindingDesc.bindingDesc.remotePort;
} else if (ischosen(PX_TS_SETTINGS.AE2.mcaPort.binding.mqttBindingDesc)) { } else if (ischosen(PX_TS_SETTINGS.AE2.mcaPort.binding.mqttBindingDesc)) {
v_binding := "MQTT"; v_binding := "MQTT";
v_port := PX_TS_SETTINGS.AE2.mcaPort.binding.mqttBindingDesc.bindingDesc.remotePort;
} else { } else {
v_binding := "WSCK"; v_binding := "WSCK";
v_port := PX_TS_SETTINGS.AE2.mcaPort.binding.wsBindingDesc.bindingDesc.remotePort;
} }
if (ischosen(PX_TS_SETTINGS.AE2.mcaPortIn.binding.httpBindingDesc)) { if (ischosen(PX_TS_SETTINGS.AE2.mcaPortIn.binding.httpBindingDesc)) {
v_binding_in := "HTTP"; v_binding_in := "HTTP";
...@@ -112,8 +122,8 @@ module OneM2M_Functions { ...@@ -112,8 +122,8 @@ module OneM2M_Functions {
v_binding_in := "WSCK"; v_binding_in := "WSCK";
} }
vc_myInterfaces[enum2int(InterfaceIds:e_mca_port)] := { mcaPort, v_binding, c_serializationLabel[enum2int(PX_TS_SETTINGS.AE2.mcaPort.serialization)] }; vc_myInterfaces[enum2int(InterfaceIds:e_mca_port)] := { mcaPort, PX_TS_SETTINGS.SUT.sutAddress & ":" & int2str(v_port), v_binding, c_serializationLabel[enum2int(PX_TS_SETTINGS.AE2.mcaPort.serialization)] };
vc_myInterfaces[enum2int(InterfaceIds:e_mca_in_port)] := { mcaPortIn, v_binding_in, c_serializationLabel[enum2int(PX_TS_SETTINGS.AE2.mcaPortIn.serialization)] }; vc_myInterfaces[enum2int(InterfaceIds:e_mca_in_port)] := { mcaPortIn, PX_TS_SETTINGS.SUT.sutAddress & ":" & int2str(v_port), v_binding_in, c_serializationLabel[enum2int(PX_TS_SETTINGS.AE2.mcaPortIn.serialization)] };
//Initialze the IUT //Initialze the IUT
...@@ -126,6 +136,7 @@ module OneM2M_Functions { ...@@ -126,6 +136,7 @@ module OneM2M_Functions {
// Variables // Variables
var charstring v_binding; var charstring v_binding;
var integer v_port := 0;
vc_config := e_cf02; vc_config := e_cf02;
vc_testSystemRole := e_ae; vc_testSystemRole := e_ae;
vc_cse1 := CseSimu.create("CSE1") alive; vc_cse1 := CseSimu.create("CSE1") alive;
...@@ -136,15 +147,19 @@ module OneM2M_Functions { ...@@ -136,15 +147,19 @@ module OneM2M_Functions {
if (ischosen(PX_TS_SETTINGS.AE1.mcaPort.binding.httpBindingDesc)) { if (ischosen(PX_TS_SETTINGS.AE1.mcaPort.binding.httpBindingDesc)) {
v_binding := "HTTP"; v_binding := "HTTP";
v_port := PX_TS_SETTINGS.AE1.mcaPort.binding.httpBindingDesc.bindingDesc.remotePort;
} else if (ischosen(PX_TS_SETTINGS.AE1.mcaPort.binding.coapBindingDesc)) { } else if (ischosen(PX_TS_SETTINGS.AE1.mcaPort.binding.coapBindingDesc)) {
v_binding := "HTTP"; v_binding := "HTTP";
v_port := PX_TS_SETTINGS.AE1.mcaPort.binding.coapBindingDesc.bindingDesc.remotePort;
} else if (ischosen(PX_TS_SETTINGS.AE1.mcaPort.binding.mqttBindingDesc)) { } else if (ischosen(PX_TS_SETTINGS.AE1.mcaPort.binding.mqttBindingDesc)) {
v_binding := "MQTT"; v_binding := "MQTT";
v_port := PX_TS_SETTINGS.AE1.mcaPort.binding.mqttBindingDesc.bindingDesc.remotePort;
} else { } else {
v_binding := "WSCK"; v_binding := "WSCK";
v_port := PX_TS_SETTINGS.AE1.mcaPort.binding.wsBindingDesc.bindingDesc.remotePort;
} }
vc_myInterfaces[enum2int(InterfaceIds:e_mca_port)] := { mcaPort, v_binding, c_serializationLabel[enum2int(PX_TS_SETTINGS.AE1.mcaPort.serialization)] }; vc_myInterfaces[enum2int(InterfaceIds:e_mca_port)] := { mcaPort, PX_TS_SETTINGS.SUT.sutAddress & ":" & int2str(v_port), v_binding, c_serializationLabel[enum2int(PX_TS_SETTINGS.AE1.mcaPort.serialization)] };
if(PX_UT_IMPLEMENTED) { if(PX_UT_IMPLEMENTED) {
map(self:utPort, system:utPort) param (PX_TS_SETTINGS.UT); map(self:utPort, system:utPort) param (PX_TS_SETTINGS.UT);
...@@ -168,6 +183,7 @@ module OneM2M_Functions { ...@@ -168,6 +183,7 @@ module OneM2M_Functions {
// Variables // Variables
var charstring v_binding; var charstring v_binding;
var charstring v_binding_in; var charstring v_binding_in;
var integer v_port := 0;
var PrimitiveContent v_cSEBaseResource; var PrimitiveContent v_cSEBaseResource;
vc_config := e_cf02; vc_config := e_cf02;
vc_testSystemRole := e_cse; vc_testSystemRole := e_cse;
...@@ -180,11 +196,15 @@ module OneM2M_Functions { ...@@ -180,11 +196,15 @@ module OneM2M_Functions {
if (ischosen(PX_TS_SETTINGS.CSE1.mccPort.binding.httpBindingDesc)) { if (ischosen(PX_TS_SETTINGS.CSE1.mccPort.binding.httpBindingDesc)) {
v_binding := "HTTP"; v_binding := "HTTP";
v_port := PX_TS_SETTINGS.CSE1.mccPort.binding.httpBindingDesc.bindingDesc.remotePort;
} else if (ischosen(PX_TS_SETTINGS.CSE1.mccPort.binding.coapBindingDesc)) { } else if (ischosen(PX_TS_SETTINGS.CSE1.mccPort.binding.coapBindingDesc)) {
v_binding := "COAP"; v_binding := "COAP";
v_port := PX_TS_SETTINGS.CSE1.mccPort.binding.coapBindingDesc.bindingDesc.remotePort;
} else if (ischosen(PX_TS_SETTINGS.CSE1.mccPort.binding.mqttBindingDesc)) { } else if (ischosen(PX_TS_SETTINGS.CSE1.mccPort.binding.mqttBindingDesc)) {
v_port := PX_TS_SETTINGS.CSE1.mccPort.binding.mqttBindingDesc.bindingDesc.remotePort;
v_binding := "MQTT"; v_binding := "MQTT";
} else { } else {
v_port := PX_TS_SETTINGS.CSE1.mccPort.binding.wsBindingDesc.bindingDesc.remotePort;
v_binding := "WSCK"; v_binding := "WSCK";
} }
if (ischosen(PX_TS_SETTINGS.CSE1.mccPortIn.binding.httpBindingDesc)) { if (ischosen(PX_TS_SETTINGS.CSE1.mccPortIn.binding.httpBindingDesc)) {
...@@ -197,8 +217,8 @@ module OneM2M_Functions { ...@@ -197,8 +217,8 @@ module OneM2M_Functions {
v_binding_in := "WSCK"; v_binding_in := "WSCK";
} }
vc_myInterfaces[enum2int(InterfaceIds:e_mcc_port)] := { mccPort, v_binding, c_serializationLabel[enum2int(PX_TS_SETTINGS.CSE1.mccPort.serialization)] }; vc_myInterfaces[enum2int(InterfaceIds:e_mcc_port)] := { mccPort, PX_TS_SETTINGS.SUT.sutAddress & ":" & int2str(v_port), v_binding, c_serializationLabel[enum2int(PX_TS_SETTINGS.CSE1.mccPort.serialization)] };
vc_myInterfaces[enum2int(InterfaceIds:e_mcc_in_port)] := { mccPortIn, v_binding_in, c_serializationLabel[enum2int(PX_TS_SETTINGS.CSE1.mccPortIn.serialization)] }; vc_myInterfaces[enum2int(InterfaceIds:e_mcc_in_port)] := { mccPortIn, v_binding_in, PX_TS_SETTINGS.SUT.sutAddress & ":" & int2str(v_port), c_serializationLabel[enum2int(PX_TS_SETTINGS.CSE1.mccPortIn.serialization)] };
v_cSEBaseResource := f_generateLocalResource(-, -1, int5); v_cSEBaseResource := f_generateLocalResource(-, -1, int5);
vc_cSEBaseIndex := f_setLocalResource(v_cSEBaseResource, int5, -1); vc_cSEBaseIndex := f_setLocalResource(v_cSEBaseResource, int5, -1);
...@@ -215,6 +235,7 @@ module OneM2M_Functions { ...@@ -215,6 +235,7 @@ module OneM2M_Functions {
// Variables // Variables
var charstring v_binding; var charstring v_binding;
var charstring v_binding_in; var charstring v_binding_in;
var integer v_port := 0;
var PrimitiveContent v_cSEBaseResource; var PrimitiveContent v_cSEBaseResource;
vc_config := e_cf02CseSimuMaster; vc_config := e_cf02CseSimuMaster;
vc_testSystemRole := e_cse; vc_testSystemRole := e_cse;
...@@ -230,15 +251,19 @@ module OneM2M_Functions { ...@@ -230,15 +251,19 @@ module OneM2M_Functions {
map(self:mccPortIn, system:mccPortIn) param (PX_TS_SETTINGS.CSE1.mccPortIn, 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); map(self:acPort, system:acPort);
if (ischosen(PX_TS_SETTINGS.CSE1.mccPort.binding.httpBindingDesc)) { if (ischosen(PX_TS_SETTINGS.CSE1.mccPort.binding.httpBindingDesc)) {
v_binding := "HTTP"; v_binding := "HTTP";
} else if (ischosen(PX_TS_SETTINGS.CSE1.mccPort.binding.coapBindingDesc)) { v_port := PX_TS_SETTINGS.CSE1.mccPort.binding.httpBindingDesc.bindingDesc.remotePort;
v_binding := "COAP"; } else if (ischosen(PX_TS_SETTINGS.CSE1.mccPort.binding.coapBindingDesc)) {
} else if (ischosen(PX_TS_SETTINGS.CSE1.mccPort.binding.mqttBindingDesc)) { v_binding := "COAP";
v_binding := "MQTT"; v_port := PX_TS_SETTINGS.CSE1.mccPort.binding.coapBindingDesc.bindingDesc.remotePort;
} else { } else if (ischosen(PX_TS_SETTINGS.CSE1.mccPort.binding.mqttBindingDesc)) {
v_binding := "WSCK"; v_port := PX_TS_SETTINGS.CSE1.mccPort.binding.mqttBindingDesc.bindingDesc.remotePort;
} v_binding := "MQTT";
} else {
v_port := PX_TS_SETTINGS.CSE1.mccPort.binding.wsBindingDesc.bindingDesc.remotePort;
v_binding := "WSCK";
}
if (ischosen(PX_TS_SETTINGS.CSE1.mccPortIn.binding.httpBindingDesc)) { if (ischosen(PX_TS_SETTINGS.CSE1.mccPortIn.binding.httpBindingDesc)) {
v_binding_in := "HTTP"; v_binding_in := "HTTP";
} else if (ischosen(PX_TS_SETTINGS.CSE1.mccPortIn.binding.coapBindingDesc)) { } else if (ischosen(PX_TS_SETTINGS.CSE1.mccPortIn.binding.coapBindingDesc)) {
...@@ -249,8 +274,8 @@ module OneM2M_Functions { ...@@ -249,8 +274,8 @@ module OneM2M_Functions {
v_binding_in := "WSCK"; v_binding_in := "WSCK";
} }
vc_myInterfaces[enum2int(InterfaceIds:e_mcc_port)] := { mccPort, v_binding, c_serializationLabel[enum2int(PX_TS_SETTINGS.CSE1.mccPort.serialization)] }; vc_myInterfaces[enum2int(InterfaceIds:e_mcc_port)] := { mccPort, PX_TS_SETTINGS.SUT.sutAddress & ":" & int2str(v_port), v_binding, c_serializationLabel[enum2int(PX_TS_SETTINGS.CSE1.mccPort.serialization)] };
vc_myInterfaces[enum2int(InterfaceIds:e_mcc_in_port)] := { mccPortIn, v_binding_in, c_serializationLabel[enum2int(PX_TS_SETTINGS.CSE1.mccPortIn.serialization)] }; vc_myInterfaces[enum2int(InterfaceIds:e_mcc_in_port)] := { mccPortIn, PX_TS_SETTINGS.SUT.sutAddress & ":" & int2str(v_port), v_binding_in, c_serializationLabel[enum2int(PX_TS_SETTINGS.CSE1.mccPortIn.serialization)] };
activate(a_default()); activate(a_default());
vc_cseSimu := activate(a_cse_cf02_cse1()); vc_cseSimu := activate(a_cse_cf02_cse1());
...@@ -266,11 +291,12 @@ module OneM2M_Functions { ...@@ -266,11 +291,12 @@ module OneM2M_Functions {
/** /**
@desc Ports mapping and default behaviour activation for Config 2 on the AE1 @desc Ports mapping and default behaviour activation for Config 2 on the AE1
*/ */
function f_cf02UpAe1(in CseTypeID p_cseType := int2) runs on AeSimu system AeSystem { function f_cf02UpAe1(in CseTypeID p_cseType := int2) runs on AeSimu system CseSystem {
// Variables // Variables
var charstring v_binding; var charstring v_binding;
var charstring v_binding_in; var charstring v_binding_in;
var integer v_port := 0;
vc_config := e_cf02CseSimuMaster; vc_config := e_cf02CseSimuMaster;
vc_testSystemRole := e_ae; vc_testSystemRole := e_ae;
...@@ -281,12 +307,16 @@ module OneM2M_Functions { ...@@ -281,12 +307,16 @@ module OneM2M_Functions {
if (ischosen(PX_TS_SETTINGS.AE1.mcaPort.binding.httpBindingDesc)) { if (ischosen(PX_TS_SETTINGS.AE1.mcaPort.binding.httpBindingDesc)) {
v_binding := "HTTP"; v_binding := "HTTP";
v_port := PX_TS_SETTINGS.AE1.mcaPort.binding.httpBindingDesc.bindingDesc.remotePort;
} else if (ischosen(PX_TS_SETTINGS.AE1.mcaPort.binding.coapBindingDesc)) { } else if (ischosen(PX_TS_SETTINGS.AE1.mcaPort.binding.coapBindingDesc)) {
v_binding := "COAP"; v_binding := "HTTP";
v_port := PX_TS_SETTINGS.AE1.mcaPort.binding.coapBindingDesc.bindingDesc.remotePort;
} else if (ischosen(PX_TS_SETTINGS.AE1.mcaPort.binding.mqttBindingDesc)) { } else if (ischosen(PX_TS_SETTINGS.AE1.mcaPort.binding.mqttBindingDesc)) {
v_binding := "MQTT"; v_binding := "MQTT";
v_port := PX_TS_SETTINGS.AE1.mcaPort.binding.mqttBindingDesc.bindingDesc.remotePort;
} else { } else {
v_binding := "WSCK"; v_binding := "WSCK";
v_port := PX_TS_SETTINGS.AE1.mcaPort.binding.wsBindingDesc.bindingDesc.remotePort;
} }
if (ischosen(PX_TS_SETTINGS.AE1.mcaPortIn.binding.httpBindingDesc)) { if (ischosen(PX_TS_SETTINGS.AE1.mcaPortIn.binding.httpBindingDesc)) {
v_binding_in := "HTTP"; v_binding_in := "HTTP";
...@@ -298,8 +328,8 @@ module OneM2M_Functions { ...@@ -298,8 +328,8 @@ module OneM2M_Functions {
v_binding_in := "WSCK"; v_binding_in := "WSCK";
} }
vc_myInterfaces[enum2int(InterfaceIds:e_mca_port)] := { mcaPort, v_binding, c_serializationLabel[enum2int(PX_TS_SETTINGS.AE1.mcaPort.serialization)] }; vc_myInterfaces[enum2int(InterfaceIds:e_mca_port)] := { mcaPort, PX_TS_SETTINGS.SUT.sutAddress & ":" & int2str(v_port), v_binding, c_serializationLabel[enum2int(PX_TS_SETTINGS.AE1.mcaPort.serialization)] };
vc_myInterfaces[enum2int(InterfaceIds:e_mca_in_port)] := { mcaPortIn, v_binding_in, c_serializationLabel[enum2int(PX_TS_SETTINGS.AE1.mcaPortIn.serialization)] }; vc_myInterfaces[enum2int(InterfaceIds:e_mca_in_port)] := { mcaPortIn, PX_TS_SETTINGS.SUT.sutAddress & ":" & int2str(v_port), v_binding_in, c_serializationLabel[enum2int(PX_TS_SETTINGS.AE1.mcaPortIn.serialization)] };
//Initialze the IUT //Initialze the IUT
...@@ -308,11 +338,12 @@ module OneM2M_Functions { ...@@ -308,11 +338,12 @@ module OneM2M_Functions {
/** /**
* @desc Ports mapping and default behaviour activation for Config 03 * @desc Ports mapping and default behaviour activation for Config 03
*/ */
function f_cf03Up(in CseTypeID p_cseType := int2) runs on CseSimu system CseSystem { function f_cf03Up(in CseTypeID p_cseType := int2) runs on CseSimu system AeSystem {
// Variables // Variables
var charstring v_binding; var charstring v_binding;
var PrimitiveContent v_cSEBaseResource; var PrimitiveContent v_cSEBaseResource;
var integer v_port := 0;
vc_config := e_cf03; vc_config := e_cf03;
vc_testSystemRole := e_cse; vc_testSystemRole := e_cse;
vc_cseType := p_cseType; vc_cseType := p_cseType;
...@@ -325,17 +356,22 @@ module OneM2M_Functions { ...@@ -325,17 +356,22 @@ module OneM2M_Functions {
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: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); map(self:acPort, system:acPort);
if (ischosen(PX_TS_SETTINGS.AE2.mcaPort.binding.httpBindingDesc)) { if (ischosen(PX_TS_SETTINGS.AE2.mcaPort.binding.httpBindingDesc)) {
v_binding := "HTTP"; v_binding := "HTTP";
} else if (ischosen(PX_TS_SETTINGS.AE2.mcaPort.binding.coapBindingDesc)) { v_port := PX_TS_SETTINGS.AE2.mcaPort.binding.httpBindingDesc.bindingDesc.remotePort;
v_binding := "COAP"; } else if (ischosen(PX_TS_SETTINGS.AE2.mcaPort.binding.coapBindingDesc)) {
} else if (ischosen(PX_TS_SETTINGS.AE2.mcaPort.binding.mqttBindingDesc)) { v_binding := "HTTP";
v_binding := "MQTT"; v_port := PX_TS_SETTINGS.AE2.mcaPort.binding.coapBindingDesc.bindingDesc.remotePort;
} else { } else if (ischosen(PX_TS_SETTINGS.AE2.mcaPort.binding.mqttBindingDesc)) {
v_binding := "WSCK"; v_binding := "MQTT";
} v_port := PX_TS_SETTINGS.AE2.mcaPort.binding.mqttBindingDesc.bindingDesc.remotePort;
} else {
v_binding := "WSCK";
v_port := PX_TS_SETTINGS.AE2.mcaPort.binding.wsBindingDesc.bindingDesc.remotePort;
}
vc_myInterfaces[enum2int(InterfaceIds:e_mca_in_port)] := { mcaPortIn, v_binding, c_serializationLabel[enum2int(PX_TS_SETTINGS.AE2.mcaPortIn.serialization)] }; vc_myInterfaces[enum2int(InterfaceIds:e_mca_in_port)] := { mcaPortIn, PX_TS_SETTINGS.SUT.sutAddress & ":" & int2str(v_port), v_binding, c_serializationLabel[enum2int(PX_TS_SETTINGS.AE2.mcaPortIn.serialization)] };
vc_myInterfaces[enum2int(InterfaceIds:e_mca_in_port)] := { mcaPortIn, PX_TS_SETTINGS.SUT.sutAddress & ":" & int2str(v_port), v_binding, c_serializationLabel[enum2int(PX_TS_SETTINGS.AE2.mcaPortIn.serialization)] };
if(PX_UT_IMPLEMENTED) { if(PX_UT_IMPLEMENTED) {
map(self:utPort, system:utPort) param (PX_TS_SETTINGS.UT); map(self:utPort, system:utPort) param (PX_TS_SETTINGS.UT);
...@@ -358,6 +394,7 @@ module OneM2M_Functions { ...@@ -358,6 +394,7 @@ module OneM2M_Functions {
var charstring v_binding; var charstring v_binding;
var charstring v_binding_in; var charstring v_binding_in;
var PrimitiveContent v_cSEBaseResource; var PrimitiveContent v_cSEBaseResource;
var integer v_port := 0;
vc_config := e_cf04; vc_config := e_cf04;
vc_testSystemRole := e_cse; vc_testSystemRole := e_cse;
vc_cseType := p_cseType; vc_cseType := p_cseType;
...@@ -370,15 +407,19 @@ module OneM2M_Functions { ...@@ -370,15 +407,19 @@ module OneM2M_Functions {
map(self:mccPortIn, system:mccPortIn) param (PX_TS_SETTINGS.CSE1.mccPortIn, 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); map(self:acPort, system:acPort);
if (ischosen(PX_TS_SETTINGS.CSE1.mccPort.binding.httpBindingDesc)) { if (ischosen(PX_TS_SETTINGS.CSE1.mccPort.binding.httpBindingDesc)) {
v_binding := "HTTP"; v_binding := "HTTP";
} else if (ischosen(PX_TS_SETTINGS.CSE1.mccPort.binding.coapBindingDesc)) { v_port := PX_TS_SETTINGS.CSE1.mccPort.binding.httpBindingDesc.bindingDesc.remotePort;
v_binding := "COAP"; } else if (ischosen(PX_TS_SETTINGS.CSE1.mccPort.binding.coapBindingDesc)) {
} else if (ischosen(PX_TS_SETTINGS.CSE1.mccPort.binding.mqttBindingDesc)) { v_binding := "COAP";
v_binding := "MQTT"; v_port := PX_TS_SETTINGS.CSE1.mccPort.binding.coapBindingDesc.bindingDesc.remotePort;
} else { } else if (ischosen(PX_TS_SETTINGS.CSE1.mccPort.binding.mqttBindingDesc)) {
v_binding := "WSCK"; v_port := PX_TS_SETTINGS.CSE1.mccPort.binding.mqttBindingDesc.bindingDesc.remotePort;
} v_binding := "MQTT";
} else {
v_port := PX_TS_SETTINGS.CSE1.mccPort.binding.wsBindingDesc.bindingDesc.remotePort;
v_binding := "WSCK";
}
if (ischosen(PX_TS_SETTINGS.CSE1.mccPortIn.binding.httpBindingDesc)) { if (ischosen(PX_TS_SETTINGS.CSE1.mccPortIn.binding.httpBindingDesc)) {
v_binding_in := "HTTP"; v_binding_in := "HTTP";
} else if (ischosen(PX_TS_SETTINGS.CSE1.mccPortIn.binding.coapBindingDesc)) { } else if (ischosen(PX_TS_SETTINGS.CSE1.mccPortIn.binding.coapBindingDesc)) {
...@@ -389,8 +430,8 @@ module OneM2M_Functions { ...@@ -389,8 +430,8 @@ module OneM2M_Functions {
v_binding_in := "WSCK"; v_binding_in := "WSCK";
} }
vc_myInterfaces[enum2int(InterfaceIds:e_mcc_port)] := { mccPort, v_binding, c_serializationLabel[enum2int(PX_TS_SETTINGS.CSE1.mccPort.serialization)] }; vc_myInterfaces[enum2int(InterfaceIds:e_mcc_port)] := { mccPort, PX_TS_SETTINGS.SUT.sutAddress & ":" & int2str(v_port), v_binding, c_serializationLabel[enum2int(PX_TS_SETTINGS.CSE1.mccPort.serialization)] };
vc_myInterfaces[enum2int(InterfaceIds:e_mcc_in_port)] := { mccPortIn, v_binding_in, c_serializationLabel[enum2int(PX_TS_SETTINGS.CSE1.mccPortIn.serialization)] }; vc_myInterfaces[enum2int(InterfaceIds:e_mcc_in_port)] := { mccPortIn, PX_TS_SETTINGS.SUT.sutAddress & ":" & int2str(v_port), v_binding_in, c_serializationLabel[enum2int(PX_TS_SETTINGS.CSE1.mccPortIn.serialization)] };
activate(a_default()); activate(a_default());
vc_cseSimu := activate(a_cse_cf04()); vc_cseSimu := activate(a_cse_cf04());
...@@ -5626,6 +5667,7 @@ module OneM2M_Functions { ...@@ -5626,6 +5667,7 @@ module OneM2M_Functions {
) runs on Tester { ) runs on Tester {
log(">>> f_send: ", p_interfaceIds); log(">>> f_send: ", p_interfaceIds);
p_msgOut.host := vc_myInterfaces[enum2int(p_interfaceIds)].myHost;
p_msgOut.protocolBinding := vc_myInterfaces[enum2int(p_interfaceIds)].myProtocolBinding; p_msgOut.protocolBinding := vc_myInterfaces[enum2int(p_interfaceIds)].myProtocolBinding;
p_msgOut.serialization := vc_myInterfaces[enum2int(p_interfaceIds)].mySerialization; p_msgOut.serialization := vc_myInterfaces[enum2int(p_interfaceIds)].mySerialization;
log("f_send: protocolBinding=", p_msgOut.protocolBinding); log("f_send: protocolBinding=", p_msgOut.protocolBinding);
......
...@@ -36,11 +36,6 @@ module OneM2M_Pixits { ...@@ -36,11 +36,6 @@ module OneM2M_Pixits {
*/ */
modulepar boolean PX_ASN_CSE:= false; modulepar boolean PX_ASN_CSE:= false;
/**
* @desc IUT IP address and port
*/
modulepar charstring PX_SUT_ADDRESS := "127.0.0.1:8080";
/** /**
* @desc IUT Upper Tester interface support * @desc IUT Upper Tester interface support
*/ */
...@@ -137,7 +132,7 @@ module OneM2M_Pixits { ...@@ -137,7 +132,7 @@ module OneM2M_Pixits {
bindingDesc := { bindingDesc := {
tsAddress := "192.168.56.102", tsAddress := "192.168.56.102",
remotePort := omit, remotePort := omit,
localPort := 3141, // Test Adapter listener port (AeSimu acts as server) localPort := 3141, // Test Adapter listener port (AeSimu acts as server)
sutAddress := omit sutAddress := omit
} }
} }
......
...@@ -42,7 +42,7 @@ module OneM2M_Templates { ...@@ -42,7 +42,7 @@ module OneM2M_Templates {
*/ */
template (value) MsgOut m_request(in template (value) RequestPrimitive p_requestPrimitive, in template (omit) AttributeAux_list p_forcedFields := omit) := { template (value) MsgOut m_request(in template (value) RequestPrimitive p_requestPrimitive, in template (omit) AttributeAux_list p_forcedFields := omit) := {
primitive := { requestPrimitive := p_requestPrimitive}, primitive := { requestPrimitive := p_requestPrimitive},
host := PX_SUT_ADDRESS, host := "",
xmlNamespace := PX_XML_NAMESPACE, xmlNamespace := PX_XML_NAMESPACE,
protocolBinding := "", protocolBinding := "",
serialization := "", serialization := "",
...@@ -55,7 +55,7 @@ module OneM2M_Templates { ...@@ -55,7 +55,7 @@ module OneM2M_Templates {
*/ */
template (value) MsgOut m_response(in template (value) ResponsePrimitive p_responsePrimitive, in template (omit) AttributeAux_list p_forcedFields := omit) := { template (value) MsgOut m_response(in template (value) ResponsePrimitive p_responsePrimitive, in template (omit) AttributeAux_list p_forcedFields := omit) := {
primitive := { responsePrimitive := p_responsePrimitive}, primitive := { responsePrimitive := p_responsePrimitive},
host := PX_SUT_ADDRESS, host := "",
xmlNamespace := PX_XML_NAMESPACE, xmlNamespace := PX_XML_NAMESPACE,
protocolBinding := "", protocolBinding := "",
serialization := "", serialization := "",
...@@ -68,9 +68,9 @@ module OneM2M_Templates { ...@@ -68,9 +68,9 @@ module OneM2M_Templates {
*/ */
template (value) MsgOut m_httpResponse(in template (value) ResponsePrimitive p_responsePrimitive, in template (omit) AttributeAux_list p_forcedFields := omit) := { template (value) MsgOut m_httpResponse(in template (value) ResponsePrimitive p_responsePrimitive, in template (omit) AttributeAux_list p_forcedFields := omit) := {
primitive := { responsePrimitive := p_responsePrimitive}, primitive := { responsePrimitive := p_responsePrimitive},
host := PX_SUT_ADDRESS, host := "",
xmlNamespace := PX_XML_NAMESPACE, xmlNamespace := PX_XML_NAMESPACE,
protocolBinding := "HTTP", protocolBinding := "",
serialization := "", serialization := "",
forcedFields := p_forcedFields forcedFields := p_forcedFields
}; };
......
...@@ -32,6 +32,7 @@ module OneM2M_TestSystem { ...@@ -32,6 +32,7 @@ module OneM2M_TestSystem {
type record Interface { type record Interface {
OneM2MPort myPort, OneM2MPort myPort,
charstring myHost,
charstring myProtocolBinding, charstring myProtocolBinding,
charstring mySerialization charstring mySerialization
} }
......
...@@ -5250,8 +5250,6 @@ module OneM2M_Testcases_CSE_Release_1 { ...@@ -5250,8 +5250,6 @@ module OneM2M_Testcases_CSE_Release_1 {
var template RequestPrimitive v_updateRequest := m_updateGroupBase; var template RequestPrimitive v_updateRequest := m_updateGroupBase;
var ResponsePrimitive v_responsePrimitive; var ResponsePrimitive v_responsePrimitive;
var PrimitiveContent v_primitiveContentRetrieveResource; var PrimitiveContent v_primitiveContentRetrieveResource;
v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
v_ae1.done;
v_createRequest.primitiveContent.group_.labels := v_labels_1;//Attribute 3 v_createRequest.primitiveContent.group_.labels := v_labels_1;//Attribute 3
v_updateRequest.primitiveContent.group_.expirationTime := "20301231T012345";//Attribute 1 v_updateRequest.primitiveContent.group_.expirationTime := "20301231T012345";//Attribute 1
v_updateRequest.primitiveContent.group_.groupName:= v_groupName_1;//Attribute 2 v_updateRequest.primitiveContent.group_.groupName:= v_groupName_1;//Attribute 2
...@@ -5915,8 +5913,6 @@ module OneM2M_Testcases_CSE_Release_1 { ...@@ -5915,8 +5913,6 @@ module OneM2M_Testcases_CSE_Release_1