Commit 48f42447 authored by Yann Garcia's avatar Yann Garcia
Browse files

Reorganize Test System PIXIT PX_TS_SETTINGS.

parent 36c1b68e
......@@ -37,35 +37,35 @@ module OneM2M_Functions {
vc_testSystemRole := e_ae;
// Map
map(self:mcaPort, system:mcaPort) param (PX_TS_SETTINGS.AE1.mcaPort);
map(self:mcaPortIn, system:mcaPortIn) param (PX_TS_SETTINGS.AE1.mcaPortIn);
map(self:mcaPort, system:mcaPort) param (PX_TS_AE1.mcaPort);
map(self:mcaPortIn, system:mcaPortIn) param (PX_TS_AE1.mcaPortIn);
map(self:acPort, system:acPort);
if (ischosen(PX_TS_SETTINGS.AE1.mcaPort.binding.httpBindingDesc)) { // FIXME Create a function to initialize vc_myInterfaces
if (ischosen(PX_TS_AE1.mcaPort.binding.httpBindingDesc)) { // FIXME Create a function to initialize vc_myInterfaces
v_binding := "HTTP";
v_host := PX_TS_SETTINGS.AE1.mcaPort.binding.httpBindingDesc.bindingDesc.sutAddress & ":" & int2str(PX_TS_SETTINGS.AE1.mcaPort.binding.httpBindingDesc.bindingDesc.remotePort);
} else if (ischosen(PX_TS_SETTINGS.AE1.mcaPort.binding.coapBindingDesc)) {
v_host := PX_TS_AE1.mcaPort.binding.httpBindingDesc.bindingDesc.sutAddress & ":" & int2str(PX_TS_AE1.mcaPort.binding.httpBindingDesc.bindingDesc.remotePort);
} else if (ischosen(PX_TS_AE1.mcaPort.binding.coapBindingDesc)) {
v_binding := "COAP";
v_host := PX_TS_SETTINGS.AE1.mcaPort.binding.coapBindingDesc.bindingDesc.sutAddress & ":" & int2str(PX_TS_SETTINGS.AE1.mcaPort.binding.coapBindingDesc.bindingDesc.remotePort);
} else if (ischosen(PX_TS_SETTINGS.AE1.mcaPort.binding.mqttBindingDesc)) {
v_host := PX_TS_AE1.mcaPort.binding.coapBindingDesc.bindingDesc.sutAddress & ":" & int2str(PX_TS_AE1.mcaPort.binding.coapBindingDesc.bindingDesc.remotePort);
} else if (ischosen(PX_TS_AE1.mcaPort.binding.mqttBindingDesc)) {
v_binding := "MQTT";
v_host := PX_TS_SETTINGS.AE1.mcaPort.binding.mqttBindingDesc.bindingDesc.sutAddress & ":" & int2str(PX_TS_SETTINGS.AE1.mcaPort.binding.mqttBindingDesc.bindingDesc.remotePort);
v_host := PX_TS_AE1.mcaPort.binding.mqttBindingDesc.bindingDesc.sutAddress & ":" & int2str(PX_TS_AE1.mcaPort.binding.mqttBindingDesc.bindingDesc.remotePort);
} else {
v_binding := "WSCK";
v_host := PX_TS_SETTINGS.AE1.mcaPort.binding.wsBindingDesc.bindingDesc.sutAddress & ":" & int2str(PX_TS_SETTINGS.AE1.mcaPort.binding.wsBindingDesc.bindingDesc.remotePort);
v_host := PX_TS_AE1.mcaPort.binding.wsBindingDesc.bindingDesc.sutAddress & ":" & int2str(PX_TS_AE1.mcaPort.binding.wsBindingDesc.bindingDesc.remotePort);
}
if (ischosen(PX_TS_SETTINGS.AE1.mcaPortIn.binding.httpBindingDesc)) {
if (ischosen(PX_TS_AE1.mcaPortIn.binding.httpBindingDesc)) {
v_binding_in := "HTTP";
} else if (ischosen(PX_TS_SETTINGS.AE1.mcaPortIn.binding.coapBindingDesc)) {
} else if (ischosen(PX_TS_AE1.mcaPortIn.binding.coapBindingDesc)) {
v_binding_in := "COAP";
} else if (ischosen(PX_TS_SETTINGS.AE1.mcaPortIn.binding.mqttBindingDesc)) {
} else if (ischosen(PX_TS_AE1.mcaPortIn.binding.mqttBindingDesc)) {
v_binding_in := "MQTT";
} else {
v_binding_in := "WSCK";
}
vc_myInterfaces[enum2int(InterfaceIds:e_mca_port)] := { mcaPort, v_host, v_binding, c_serializationLabel[enum2int(PX_TS_SETTINGS.AE1.mcaPort.serialization)] };
vc_myInterfaces[enum2int(InterfaceIds:e_mca_in_port)] := { mcaPortIn, v_host, v_binding_in, c_serializationLabel[enum2int(PX_TS_SETTINGS.AE1.mcaPortIn.serialization)] };
vc_myInterfaces[enum2int(InterfaceIds:e_mca_port)] := { mcaPort, v_host, v_binding, c_serializationLabel[enum2int(PX_TS_AE1.mcaPort.serialization)] };
vc_myInterfaces[enum2int(InterfaceIds:e_mca_in_port)] := { mcaPortIn, v_host, v_binding_in, c_serializationLabel[enum2int(PX_TS_AE1.mcaPortIn.serialization)] };
activate(a_default());
vc_aeSimu := activate(a_cse_cf01());
......@@ -95,35 +95,35 @@ module OneM2M_Functions {
vc_testSystemRole := e_ae;
// Map
map(self:mcaPort, system:mcaPort) param (PX_TS_SETTINGS.AE2.mcaPort);
map(self:mcaPortIn, system:mcaPortIn) param (PX_TS_SETTINGS.AE2.mcaPortIn);
map(self:mcaPort, system:mcaPort) param (PX_TS_AE2.mcaPort);
map(self:mcaPortIn, system:mcaPortIn) param (PX_TS_AE2.mcaPortIn);
map(self:acPort, system:acPort);
if (ischosen(PX_TS_SETTINGS.AE2.mcaPort.binding.httpBindingDesc)) {
if (ischosen(PX_TS_AE2.mcaPort.binding.httpBindingDesc)) {
v_binding := "HTTP";
v_host := PX_TS_SETTINGS.AE2.mcaPort.binding.httpBindingDesc.bindingDesc.sutAddress & ":" & int2str(PX_TS_SETTINGS.AE2.mcaPort.binding.httpBindingDesc.bindingDesc.remotePort);
} else if (ischosen(PX_TS_SETTINGS.AE2.mcaPort.binding.coapBindingDesc)) {
v_host := PX_TS_AE2.mcaPort.binding.httpBindingDesc.bindingDesc.sutAddress & ":" & int2str(PX_TS_AE2.mcaPort.binding.httpBindingDesc.bindingDesc.remotePort);
} else if (ischosen(PX_TS_AE2.mcaPort.binding.coapBindingDesc)) {
v_binding := "COAP";
v_host := PX_TS_SETTINGS.AE2.mcaPort.binding.coapBindingDesc.bindingDesc.sutAddress & ":" & int2str(PX_TS_SETTINGS.AE2.mcaPort.binding.coapBindingDesc.bindingDesc.remotePort);
} else if (ischosen(PX_TS_SETTINGS.AE2.mcaPort.binding.mqttBindingDesc)) {
v_host := PX_TS_AE2.mcaPort.binding.coapBindingDesc.bindingDesc.sutAddress & ":" & int2str(PX_TS_AE2.mcaPort.binding.coapBindingDesc.bindingDesc.remotePort);
} else if (ischosen(PX_TS_AE2.mcaPort.binding.mqttBindingDesc)) {
v_binding := "MQTT";
v_host := PX_TS_SETTINGS.AE2.mcaPort.binding.mqttBindingDesc.bindingDesc.sutAddress & ":" & int2str(PX_TS_SETTINGS.AE2.mcaPort.binding.mqttBindingDesc.bindingDesc.remotePort);
v_host := PX_TS_AE2.mcaPort.binding.mqttBindingDesc.bindingDesc.sutAddress & ":" & int2str(PX_TS_AE2.mcaPort.binding.mqttBindingDesc.bindingDesc.remotePort);
} else {
v_binding := "WSCK";
v_host := PX_TS_SETTINGS.AE2.mcaPort.binding.wsBindingDesc.bindingDesc.sutAddress & ":" & int2str(PX_TS_SETTINGS.AE2.mcaPort.binding.wsBindingDesc.bindingDesc.remotePort);
v_host := PX_TS_AE2.mcaPort.binding.wsBindingDesc.bindingDesc.sutAddress & ":" & int2str(PX_TS_AE2.mcaPort.binding.wsBindingDesc.bindingDesc.remotePort);
}
if (ischosen(PX_TS_SETTINGS.AE2.mcaPortIn.binding.httpBindingDesc)) {
if (ischosen(PX_TS_AE2.mcaPortIn.binding.httpBindingDesc)) {
v_binding_in := "HTTP";
} else if (ischosen(PX_TS_SETTINGS.AE2.mcaPortIn.binding.coapBindingDesc)) {
} else if (ischosen(PX_TS_AE2.mcaPortIn.binding.coapBindingDesc)) {
v_binding_in := "COAP";
} else if (ischosen(PX_TS_SETTINGS.AE2.mcaPortIn.binding.mqttBindingDesc)) {
} else if (ischosen(PX_TS_AE2.mcaPortIn.binding.mqttBindingDesc)) {
v_binding_in := "MQTT";
} else {
v_binding_in := "WSCK";
}
vc_myInterfaces[enum2int(InterfaceIds:e_mca_port)] := { mcaPort, v_host, v_binding, c_serializationLabel[enum2int(PX_TS_SETTINGS.AE2.mcaPort.serialization)] };
vc_myInterfaces[enum2int(InterfaceIds:e_mca_in_port)] := { mcaPortIn, v_host, v_binding_in, c_serializationLabel[enum2int(PX_TS_SETTINGS.AE2.mcaPortIn.serialization)] };
vc_myInterfaces[enum2int(InterfaceIds:e_mca_port)] := { mcaPort, v_host, v_binding, c_serializationLabel[enum2int(PX_TS_AE2.mcaPort.serialization)] };
vc_myInterfaces[enum2int(InterfaceIds:e_mca_in_port)] := { mcaPortIn, v_host, v_binding_in, c_serializationLabel[enum2int(PX_TS_AE2.mcaPortIn.serialization)] };
//Initialze the IUT
......@@ -142,27 +142,27 @@ module OneM2M_Functions {
vc_cse1 := CseSimu.create("CSE1") alive;
// Map
map(self:mcaPort, system:mcaPort) param (PX_TS_SETTINGS.AE1.mcaPort);
map(self:mcaPort, system:mcaPort) param (PX_TS_AE1.mcaPort);
map(self:acPort, system:acPort);
if (ischosen(PX_TS_SETTINGS.AE1.mcaPort.binding.httpBindingDesc)) {
if (ischosen(PX_TS_AE1.mcaPort.binding.httpBindingDesc)) {
v_binding := "HTTP";
v_host := PX_TS_SETTINGS.AE1.mcaPort.binding.httpBindingDesc.bindingDesc.sutAddress & ":" & int2str(PX_TS_SETTINGS.AE1.mcaPort.binding.httpBindingDesc.bindingDesc.remotePort);
} else if (ischosen(PX_TS_SETTINGS.AE1.mcaPort.binding.coapBindingDesc)) {
v_host := PX_TS_AE1.mcaPort.binding.httpBindingDesc.bindingDesc.sutAddress & ":" & int2str(PX_TS_AE1.mcaPort.binding.httpBindingDesc.bindingDesc.remotePort);
} else if (ischosen(PX_TS_AE1.mcaPort.binding.coapBindingDesc)) {
v_binding := "COAP";
v_host := PX_TS_SETTINGS.AE1.mcaPort.binding.coapBindingDesc.bindingDesc.sutAddress & ":" & int2str(PX_TS_SETTINGS.AE1.mcaPort.binding.coapBindingDesc.bindingDesc.remotePort);
} else if (ischosen(PX_TS_SETTINGS.AE1.mcaPort.binding.mqttBindingDesc)) {
v_host := PX_TS_AE1.mcaPort.binding.coapBindingDesc.bindingDesc.sutAddress & ":" & int2str(PX_TS_AE1.mcaPort.binding.coapBindingDesc.bindingDesc.remotePort);
} else if (ischosen(PX_TS_AE1.mcaPort.binding.mqttBindingDesc)) {
v_binding := "MQTT";
v_host := PX_TS_SETTINGS.AE1.mcaPort.binding.mqttBindingDesc.bindingDesc.sutAddress & ":" & int2str(PX_TS_SETTINGS.AE1.mcaPort.binding.mqttBindingDesc.bindingDesc.remotePort);
v_host := PX_TS_AE1.mcaPort.binding.mqttBindingDesc.bindingDesc.sutAddress & ":" & int2str(PX_TS_AE1.mcaPort.binding.mqttBindingDesc.bindingDesc.remotePort);
} else {
v_binding := "WSCK";
v_host := PX_TS_SETTINGS.AE1.mcaPort.binding.wsBindingDesc.bindingDesc.sutAddress & ":" & int2str(PX_TS_SETTINGS.AE1.mcaPort.binding.wsBindingDesc.bindingDesc.remotePort);
v_host := PX_TS_AE1.mcaPort.binding.wsBindingDesc.bindingDesc.sutAddress & ":" & int2str(PX_TS_AE1.mcaPort.binding.wsBindingDesc.bindingDesc.remotePort);
}
vc_myInterfaces[enum2int(InterfaceIds:e_mca_port)] := { mcaPort, v_host, v_binding, c_serializationLabel[enum2int(PX_TS_SETTINGS.AE1.mcaPort.serialization)] };
vc_myInterfaces[enum2int(InterfaceIds:e_mca_port)] := { mcaPort, v_host, v_binding, c_serializationLabel[enum2int(PX_TS_AE1.mcaPort.serialization)] };
if(PX_UT_IMPLEMENTED) {
map(self:utPort, system:utPort) param (PX_TS_SETTINGS.UT);
map(self:utPort, system:utPort) param (PX_TS_UT);
}
activate(a_default());
vc_aeSimu := activate(a_cse_cf02_ae1());
......@@ -190,35 +190,35 @@ module OneM2M_Functions {
vc_cseType := p_cseType;
// Map
map(self:mccPort, system:mccPort) param (PX_TS_SETTINGS.CSE1.mccPort);
map(self:mccPortIn, system:mccPortIn) param (PX_TS_SETTINGS.CSE1.mccPortIn);
map(self:mccPort, system:mccPort) param (PX_TS_CSE1.mccPort);
map(self:mccPortIn, system:mccPortIn) param (PX_TS_CSE1.mccPortIn);
map(self:acPort, system:acPort);
if (ischosen(PX_TS_SETTINGS.CSE1.mccPort.binding.httpBindingDesc)) {
if (ischosen(PX_TS_CSE1.mccPort.binding.httpBindingDesc)) {
v_binding := "HTTP";
v_host := PX_TS_SETTINGS.CSE1.mcaPort.binding.httpBindingDesc.bindingDesc.sutAddress & ":" & int2str(PX_TS_SETTINGS.CSE1.mccPort.binding.httpBindingDesc.bindingDesc.remotePort);
} else if (ischosen(PX_TS_SETTINGS.CSE1.mccPort.binding.coapBindingDesc)) {
v_host := PX_TS_CSE1.mcaPort.binding.httpBindingDesc.bindingDesc.sutAddress & ":" & int2str(PX_TS_CSE1.mccPort.binding.httpBindingDesc.bindingDesc.remotePort);
} else if (ischosen(PX_TS_CSE1.mccPort.binding.coapBindingDesc)) {
v_binding := "COAP";
v_host := PX_TS_SETTINGS.CSE1.mcaPort.binding.coapBindingDesc.bindingDesc.sutAddress & ":" & int2str(PX_TS_SETTINGS.CSE1.mccPort.binding.coapBindingDesc.bindingDesc.remotePort);
} else if (ischosen(PX_TS_SETTINGS.CSE1.mccPort.binding.mqttBindingDesc)) {
v_host := PX_TS_CSE1.mcaPort.binding.coapBindingDesc.bindingDesc.sutAddress & ":" & int2str(PX_TS_CSE1.mccPort.binding.coapBindingDesc.bindingDesc.remotePort);
} else if (ischosen(PX_TS_CSE1.mccPort.binding.mqttBindingDesc)) {
v_binding := "MQTT";
v_host := PX_TS_SETTINGS.CSE1.mcaPort.binding.mqttBindingDesc.bindingDesc.sutAddress & ":" & int2str(PX_TS_SETTINGS.CSE1.mccPort.binding.mqttBindingDesc.bindingDesc.remotePort);
v_host := PX_TS_CSE1.mcaPort.binding.mqttBindingDesc.bindingDesc.sutAddress & ":" & int2str(PX_TS_CSE1.mccPort.binding.mqttBindingDesc.bindingDesc.remotePort);
} else {
v_binding := "WSCK";
v_host := PX_TS_SETTINGS.CSE1.mcaPort.binding.wsBindingDesc.bindingDesc.sutAddress & ":" & int2str(PX_TS_SETTINGS.CSE1.mccPort.binding.wsBindingDesc.bindingDesc.remotePort);
v_host := PX_TS_CSE1.mcaPort.binding.wsBindingDesc.bindingDesc.sutAddress & ":" & int2str(PX_TS_CSE1.mccPort.binding.wsBindingDesc.bindingDesc.remotePort);
}
if (ischosen(PX_TS_SETTINGS.CSE1.mccPortIn.binding.httpBindingDesc)) {
if (ischosen(PX_TS_CSE1.mccPortIn.binding.httpBindingDesc)) {
v_binding_in := "HTTP";
} else if (ischosen(PX_TS_SETTINGS.CSE1.mccPortIn.binding.coapBindingDesc)) {
} else if (ischosen(PX_TS_CSE1.mccPortIn.binding.coapBindingDesc)) {
v_binding_in := "COAP";
} else if (ischosen(PX_TS_SETTINGS.CSE1.mccPortIn.binding.mqttBindingDesc)) {
} else if (ischosen(PX_TS_CSE1.mccPortIn.binding.mqttBindingDesc)) {
v_binding_in := "MQTT";
} else {
v_binding_in := "WSCK";
}
vc_myInterfaces[enum2int(InterfaceIds:e_mcc_port)] := { mccPort, v_host, v_binding, c_serializationLabel[enum2int(PX_TS_SETTINGS.CSE1.mccPort.serialization)] };
vc_myInterfaces[enum2int(InterfaceIds:e_mcc_in_port)] := { mccPortIn, v_host, v_binding, c_serializationLabel[enum2int(PX_TS_SETTINGS.CSE1.mccPortIn.serialization)] };
vc_myInterfaces[enum2int(InterfaceIds:e_mcc_port)] := { mccPort, v_host, v_binding, c_serializationLabel[enum2int(PX_TS_CSE1.mccPort.serialization)] };
vc_myInterfaces[enum2int(InterfaceIds:e_mcc_in_port)] := { mccPortIn, v_host, v_binding, c_serializationLabel[enum2int(PX_TS_CSE1.mccPortIn.serialization)] };
v_cSEBaseResource := f_generateLocalResource(-, -1, int5);
vc_cSEBaseIndex := f_setLocalResource(v_cSEBaseResource, int5, -1);
......@@ -247,35 +247,35 @@ module OneM2M_Functions {
vc_cSEBaseIndex := f_setLocalResource(v_cSEBaseResource, int5, -1);
// Map
map(self:mccPort, system:mccPort) param (PX_TS_SETTINGS.CSE1.mccPort);
map(self:mccPortIn, system:mccPortIn) param (PX_TS_SETTINGS.CSE1.mccPortIn);
map(self:mccPort, system:mccPort) param (PX_TS_CSE1.mccPort);
map(self:mccPortIn, system:mccPortIn) param (PX_TS_CSE1.mccPortIn);
map(self:acPort, system:acPort);
if (ischosen(PX_TS_SETTINGS.CSE1.mccPort.binding.httpBindingDesc)) {
if (ischosen(PX_TS_CSE1.mccPort.binding.httpBindingDesc)) {
v_binding := "HTTP";
v_host := PX_TS_SETTINGS.CSE1.mcaPort.binding.httpBindingDesc.bindingDesc.sutAddress & ":" & int2str(PX_TS_SETTINGS.CSE1.mccPort.binding.httpBindingDesc.bindingDesc.remotePort);
} else if (ischosen(PX_TS_SETTINGS.CSE1.mccPort.binding.coapBindingDesc)) {
v_host := PX_TS_CSE1.mcaPort.binding.httpBindingDesc.bindingDesc.sutAddress & ":" & int2str(PX_TS_CSE1.mccPort.binding.httpBindingDesc.bindingDesc.remotePort);
} else if (ischosen(PX_TS_CSE1.mccPort.binding.coapBindingDesc)) {
v_binding := "COAP";
v_host := PX_TS_SETTINGS.CSE1.mcaPort.binding.coapBindingDesc.bindingDesc.sutAddress & ":" & int2str(PX_TS_SETTINGS.CSE1.mccPort.binding.coapBindingDesc.bindingDesc.remotePort);
} else if (ischosen(PX_TS_SETTINGS.CSE1.mccPort.binding.mqttBindingDesc)) {
v_host := PX_TS_CSE1.mcaPort.binding.coapBindingDesc.bindingDesc.sutAddress & ":" & int2str(PX_TS_CSE1.mccPort.binding.coapBindingDesc.bindingDesc.remotePort);
} else if (ischosen(PX_TS_CSE1.mccPort.binding.mqttBindingDesc)) {
v_binding := "MQTT";
v_host := PX_TS_SETTINGS.CSE1.mcaPort.binding.mqttBindingDesc.bindingDesc.sutAddress & ":" & int2str(PX_TS_SETTINGS.CSE1.mccPort.binding.mqttBindingDesc.bindingDesc.remotePort);
v_host := PX_TS_CSE1.mcaPort.binding.mqttBindingDesc.bindingDesc.sutAddress & ":" & int2str(PX_TS_CSE1.mccPort.binding.mqttBindingDesc.bindingDesc.remotePort);
} else {
v_binding := "WSCK";
v_host := PX_TS_SETTINGS.CSE1.mcaPort.binding.wsBindingDesc.bindingDesc.sutAddress & ":" & int2str(PX_TS_SETTINGS.CSE1.mccPort.binding.wsBindingDesc.bindingDesc.remotePort);
v_host := PX_TS_CSE1.mcaPort.binding.wsBindingDesc.bindingDesc.sutAddress & ":" & int2str(PX_TS_CSE1.mccPort.binding.wsBindingDesc.bindingDesc.remotePort);
}
if (ischosen(PX_TS_SETTINGS.CSE1.mccPortIn.binding.httpBindingDesc)) {
if (ischosen(PX_TS_CSE1.mccPortIn.binding.httpBindingDesc)) {
v_binding_in := "HTTP";
} else if (ischosen(PX_TS_SETTINGS.CSE1.mccPortIn.binding.coapBindingDesc)) {
} else if (ischosen(PX_TS_CSE1.mccPortIn.binding.coapBindingDesc)) {
v_binding_in := "COAP";
} else if (ischosen(PX_TS_SETTINGS.CSE1.mccPortIn.binding.mqttBindingDesc)) {
} else if (ischosen(PX_TS_CSE1.mccPortIn.binding.mqttBindingDesc)) {
v_binding_in := "MQTT";
} else {
v_binding_in := "WSCK";
}
vc_myInterfaces[enum2int(InterfaceIds:e_mcc_port)] := { mccPort, v_host, v_binding, c_serializationLabel[enum2int(PX_TS_SETTINGS.CSE1.mccPort.serialization)] };
vc_myInterfaces[enum2int(InterfaceIds:e_mcc_in_port)] := { mccPortIn, v_host, v_binding_in, c_serializationLabel[enum2int(PX_TS_SETTINGS.CSE1.mccPortIn.serialization)] };
vc_myInterfaces[enum2int(InterfaceIds:e_mcc_port)] := { mccPort, v_host, v_binding, c_serializationLabel[enum2int(PX_TS_CSE1.mccPort.serialization)] };
vc_myInterfaces[enum2int(InterfaceIds:e_mcc_in_port)] := { mccPortIn, v_host, v_binding_in, c_serializationLabel[enum2int(PX_TS_CSE1.mccPortIn.serialization)] };
activate(a_default());
vc_cseSimu := activate(a_cse_cf02_cse1());
......@@ -301,35 +301,35 @@ module OneM2M_Functions {
vc_testSystemRole := e_ae;
// Map
map(self:mcaPort, system:mcaPort) param (PX_TS_SETTINGS.AE1.mcaPort);
map(self:mcaPortIn, system:mcaPortIn) param (PX_TS_SETTINGS.AE1.mcaPortIn);
map(self:mcaPort, system:mcaPort) param (PX_TS_AE1.mcaPort);
map(self:mcaPortIn, system:mcaPortIn) param (PX_TS_AE1.mcaPortIn);
map(self:acPort, system:acPort);
if (ischosen(PX_TS_SETTINGS.AE1.mcaPort.binding.httpBindingDesc)) {
if (ischosen(PX_TS_AE1.mcaPort.binding.httpBindingDesc)) {
v_binding := "HTTP";
v_host := PX_TS_SETTINGS.AE1.mcaPort.binding.httpBindingDesc.bindingDesc.sutAddress & ":" & int2str(PX_TS_SETTINGS.AE1.mcaPort.binding.httpBindingDesc.bindingDesc.remotePort);
} else if (ischosen(PX_TS_SETTINGS.AE1.mcaPort.binding.coapBindingDesc)) {
v_host := PX_TS_AE1.mcaPort.binding.httpBindingDesc.bindingDesc.sutAddress & ":" & int2str(PX_TS_AE1.mcaPort.binding.httpBindingDesc.bindingDesc.remotePort);
} else if (ischosen(PX_TS_AE1.mcaPort.binding.coapBindingDesc)) {
v_binding := "COAP";
v_host := PX_TS_SETTINGS.AE1.mcaPort.binding.httpBindingDesc.bindingDesc.sutAddress & ":" & int2str(PX_TS_SETTINGS.AE1.mcaPort.binding.coapBindingDesc.bindingDesc.remotePort);
} else if (ischosen(PX_TS_SETTINGS.AE1.mcaPort.binding.mqttBindingDesc)) {
v_host := PX_TS_AE1.mcaPort.binding.httpBindingDesc.bindingDesc.sutAddress & ":" & int2str(PX_TS_AE1.mcaPort.binding.coapBindingDesc.bindingDesc.remotePort);
} else if (ischosen(PX_TS_AE1.mcaPort.binding.mqttBindingDesc)) {
v_binding := "MQTT";
v_host := PX_TS_SETTINGS.AE1.mcaPort.binding.httpBindingDesc.bindingDesc.sutAddress & ":" & int2str(PX_TS_SETTINGS.AE1.mcaPort.binding.mqttBindingDesc.bindingDesc.remotePort);
v_host := PX_TS_AE1.mcaPort.binding.httpBindingDesc.bindingDesc.sutAddress & ":" & int2str(PX_TS_AE1.mcaPort.binding.mqttBindingDesc.bindingDesc.remotePort);
} else {
v_binding := "WSCK";
v_host := PX_TS_SETTINGS.AE1.mcaPort.binding.httpBindingDesc.bindingDesc.sutAddress & ":" & int2str(PX_TS_SETTINGS.AE1.mcaPort.binding.wsBindingDesc.bindingDesc.remotePort);
v_host := PX_TS_AE1.mcaPort.binding.httpBindingDesc.bindingDesc.sutAddress & ":" & int2str(PX_TS_AE1.mcaPort.binding.wsBindingDesc.bindingDesc.remotePort);
}
if (ischosen(PX_TS_SETTINGS.AE1.mcaPortIn.binding.httpBindingDesc)) {
if (ischosen(PX_TS_AE1.mcaPortIn.binding.httpBindingDesc)) {
v_binding_in := "HTTP";
} else if (ischosen(PX_TS_SETTINGS.AE1.mcaPortIn.binding.coapBindingDesc)) {
} else if (ischosen(PX_TS_AE1.mcaPortIn.binding.coapBindingDesc)) {
v_binding_in := "COAP";
} else if (ischosen(PX_TS_SETTINGS.AE1.mcaPortIn.binding.mqttBindingDesc)) {
} else if (ischosen(PX_TS_AE1.mcaPortIn.binding.mqttBindingDesc)) {
v_binding_in := "MQTT";
} else {
v_binding_in := "WSCK";
}
vc_myInterfaces[enum2int(InterfaceIds:e_mca_port)] := { mcaPort, v_host, v_binding, c_serializationLabel[enum2int(PX_TS_SETTINGS.AE1.mcaPort.serialization)] };
vc_myInterfaces[enum2int(InterfaceIds:e_mca_in_port)] := { mcaPortIn, v_host, v_binding_in, c_serializationLabel[enum2int(PX_TS_SETTINGS.AE1.mcaPortIn.serialization)] };
vc_myInterfaces[enum2int(InterfaceIds:e_mca_port)] := { mcaPort, v_host, v_binding, c_serializationLabel[enum2int(PX_TS_AE1.mcaPort.serialization)] };
vc_myInterfaces[enum2int(InterfaceIds:e_mca_in_port)] := { mcaPortIn, v_host, v_binding_in, c_serializationLabel[enum2int(PX_TS_AE1.mcaPortIn.serialization)] };
//Initialze the IUT
......@@ -353,27 +353,27 @@ module OneM2M_Functions {
vc_cSEBaseIndex := f_setLocalResource(v_cSEBaseResource, int5, -1);
// Map
map(self:mcaPortIn, system:mcaPortIn) param (PX_TS_SETTINGS.AE1.mcaPort);//TODO To be consistent, we should use mcaPortIn for AE testing
map(self:mcaPortIn, system:mcaPortIn) param (PX_TS_AE1.mcaPort);//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)) {
if (ischosen(PX_TS_AE2.mcaPort.binding.httpBindingDesc)) {
v_binding := "HTTP";
v_host := PX_TS_SETTINGS.AE2.mcaPort.binding.httpBindingDesc.bindingDesc.sutAddress & ":" & int2str(PX_TS_SETTINGS.AE2.mcaPort.binding.httpBindingDesc.bindingDesc.remotePort);
} else if (ischosen(PX_TS_SETTINGS.AE2.mcaPort.binding.coapBindingDesc)) {
v_host := PX_TS_AE2.mcaPort.binding.httpBindingDesc.bindingDesc.sutAddress & ":" & int2str(PX_TS_AE2.mcaPort.binding.httpBindingDesc.bindingDesc.remotePort);
} else if (ischosen(PX_TS_AE2.mcaPort.binding.coapBindingDesc)) {
v_binding := "COAP";
v_host := PX_TS_SETTINGS.AE2.mcaPort.binding.coapBindingDesc.bindingDesc.sutAddress & ":" & int2str(PX_TS_SETTINGS.AE2.mcaPort.binding.coapBindingDesc.bindingDesc.remotePort);
} else if (ischosen(PX_TS_SETTINGS.AE2.mcaPort.binding.mqttBindingDesc)) {
v_host := PX_TS_AE2.mcaPort.binding.coapBindingDesc.bindingDesc.sutAddress & ":" & int2str(PX_TS_AE2.mcaPort.binding.coapBindingDesc.bindingDesc.remotePort);
} else if (ischosen(PX_TS_AE2.mcaPort.binding.mqttBindingDesc)) {
v_binding := "MQTT";
v_host := PX_TS_SETTINGS.AE2.mcaPort.binding.mqttBindingDesc.bindingDesc.sutAddress & ":" & int2str(PX_TS_SETTINGS.AE2.mcaPort.binding.mqttBindingDesc.bindingDesc.remotePort);
v_host := PX_TS_AE2.mcaPort.binding.mqttBindingDesc.bindingDesc.sutAddress & ":" & int2str(PX_TS_AE2.mcaPort.binding.mqttBindingDesc.bindingDesc.remotePort);
} else {
v_binding := "WSCK";
v_host := PX_TS_SETTINGS.AE2.mcaPort.binding.wsBindingDesc.bindingDesc.sutAddress & ":" & int2str(PX_TS_SETTINGS.AE2.mcaPort.binding.wsBindingDesc.bindingDesc.remotePort);
v_host := PX_TS_AE2.mcaPort.binding.wsBindingDesc.bindingDesc.sutAddress & ":" & int2str(PX_TS_AE2.mcaPort.binding.wsBindingDesc.bindingDesc.remotePort);
}
vc_myInterfaces[enum2int(InterfaceIds:e_mca_in_port)] := { mcaPortIn, v_host, v_binding, c_serializationLabel[enum2int(PX_TS_SETTINGS.AE2.mcaPortIn.serialization)] };
vc_myInterfaces[enum2int(InterfaceIds:e_mca_in_port)] := { mcaPortIn, v_host, v_binding, c_serializationLabel[enum2int(PX_TS_AE2.mcaPortIn.serialization)] };
if(PX_UT_IMPLEMENTED) {
map(self:utPort, system:utPort) param (PX_TS_SETTINGS.UT);
map(self:utPort, system:utPort) param (PX_TS_UT);
}
activate(a_default());
vc_cseSimu := activate(a_cse_cf03());
......@@ -402,35 +402,35 @@ module OneM2M_Functions {
vc_cSEBaseIndex := f_setLocalResource(v_cSEBaseResource, int5, -1);
// Map
map(self:mccPort, system:mccPort) param (PX_TS_SETTINGS.CSE1.mccPort);
map(self:mccPortIn, system:mccPortIn) param (PX_TS_SETTINGS.CSE1.mccPortIn);
map(self:mccPort, system:mccPort) param (PX_TS_CSE1.mccPort);
map(self:mccPortIn, system:mccPortIn) param (PX_TS_CSE1.mccPortIn);
map(self:acPort, system:acPort);
if (ischosen(PX_TS_SETTINGS.CSE1.mccPort.binding.httpBindingDesc)) {
if (ischosen(PX_TS_CSE1.mccPort.binding.httpBindingDesc)) {
v_binding := "HTTP";
v_host := PX_TS_SETTINGS.CSE1.mcaPort.binding.httpBindingDesc.bindingDesc.sutAddress & ":" & int2str(PX_TS_SETTINGS.CSE1.mccPort.binding.httpBindingDesc.bindingDesc.remotePort);
} else if (ischosen(PX_TS_SETTINGS.CSE1.mccPort.binding.coapBindingDesc)) {
v_host := PX_TS_CSE1.mcaPort.binding.httpBindingDesc.bindingDesc.sutAddress & ":" & int2str(PX_TS_CSE1.mccPort.binding.httpBindingDesc.bindingDesc.remotePort);
} else if (ischosen(PX_TS_CSE1.mccPort.binding.coapBindingDesc)) {
v_binding := "COAP";
v_host := PX_TS_SETTINGS.CSE1.mcaPort.binding.coapBindingDesc.bindingDesc.sutAddress & ":" & int2str(PX_TS_SETTINGS.CSE1.mccPort.binding.coapBindingDesc.bindingDesc.remotePort);
} else if (ischosen(PX_TS_SETTINGS.CSE1.mccPort.binding.mqttBindingDesc)) {
v_host := PX_TS_CSE1.mcaPort.binding.coapBindingDesc.bindingDesc.sutAddress & ":" & int2str(PX_TS_CSE1.mccPort.binding.coapBindingDesc.bindingDesc.remotePort);
} else if (ischosen(PX_TS_CSE1.mccPort.binding.mqttBindingDesc)) {
v_binding := "MQTT";
v_host := PX_TS_SETTINGS.CSE1.mcaPort.binding.mqttBindingDesc.bindingDesc.sutAddress & ":" & int2str(PX_TS_SETTINGS.CSE1.mccPort.binding.mqttBindingDesc.bindingDesc.remotePort);
v_host := PX_TS_CSE1.mcaPort.binding.mqttBindingDesc.bindingDesc.sutAddress & ":" & int2str(PX_TS_CSE1.mccPort.binding.mqttBindingDesc.bindingDesc.remotePort);
} else {
v_binding := "WSCK";
v_host := PX_TS_SETTINGS.CSE1.mcaPort.binding.wsBindingDesc.bindingDesc.sutAddress & ":" & int2str(PX_TS_SETTINGS.CSE1.mccPort.binding.wsBindingDesc.bindingDesc.remotePort);
v_host := PX_TS_CSE1.mcaPort.binding.wsBindingDesc.bindingDesc.sutAddress & ":" & int2str(PX_TS_CSE1.mccPort.binding.wsBindingDesc.bindingDesc.remotePort);
}
if (ischosen(PX_TS_SETTINGS.CSE1.mccPortIn.binding.httpBindingDesc)) {
if (ischosen(PX_TS_CSE1.mccPortIn.binding.httpBindingDesc)) {
v_binding_in := "HTTP";
} else if (ischosen(PX_TS_SETTINGS.CSE1.mccPortIn.binding.coapBindingDesc)) {
} else if (ischosen(PX_TS_CSE1.mccPortIn.binding.coapBindingDesc)) {
v_binding_in := "COAP";
} else if (ischosen(PX_TS_SETTINGS.CSE1.mccPortIn.binding.mqttBindingDesc)) {
} else if (ischosen(PX_TS_CSE1.mccPortIn.binding.mqttBindingDesc)) {
v_binding_in := "MQTT";
} else {
v_binding_in := "WSCK";
}
vc_myInterfaces[enum2int(InterfaceIds:e_mcc_port)] := { mccPort, v_host, v_binding, c_serializationLabel[enum2int(PX_TS_SETTINGS.CSE1.mccPort.serialization)] };
vc_myInterfaces[enum2int(InterfaceIds:e_mcc_in_port)] := { mccPortIn, v_host, v_binding_in, c_serializationLabel[enum2int(PX_TS_SETTINGS.CSE1.mccPortIn.serialization)] };
vc_myInterfaces[enum2int(InterfaceIds:e_mcc_port)] := { mccPort, v_host, v_binding, c_serializationLabel[enum2int(PX_TS_CSE1.mccPort.serialization)] };
vc_myInterfaces[enum2int(InterfaceIds:e_mcc_in_port)] := { mccPortIn, v_host, v_binding_in, c_serializationLabel[enum2int(PX_TS_CSE1.mccPortIn.serialization)] };
activate(a_default());
vc_cseSimu := activate(a_cse_cf04());
......@@ -1116,7 +1116,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(PX_TS_SETTINGS.AE2.mcaPortIn, "")}), -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_AE2.mcaPortIn, "")}), -1)); // AE2 is registred
f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2);
p_ae2Index := f_getResourceFromAeSimu(vc_ae2);
......@@ -2671,7 +2671,7 @@ module OneM2M_Functions {
setverdict(pass, __SCOPE__&":INFO: Resource type remoteCSE created successfuly");
f_checkAttributesToBeSaved(int16, v_request, v_response.primitive.responsePrimitive);
vc_remoteCseIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, int16, -1);
v_localRemoteCSEResource := f_generateLocalResource(valueof(m_primitiveContentRemoteCSE(m_contentLocalRemoteCSEResource(f_getCompletePoA(PX_TS_SETTINGS.CSE1.mccPortIn, "")))), vc_cSEBaseIndex, int16); // FIXME To be review not sure we have to use CSE1
v_localRemoteCSEResource := f_generateLocalResource(valueof(m_primitiveContentRemoteCSE(m_contentLocalRemoteCSEResource(f_getCompletePoA(PX_TS_CSE1.mccPortIn, "")))), vc_cSEBaseIndex, int16); // FIXME To be review not sure we have to use CSE1
vc_localRemoteCseIndex := f_setLocalResource(v_localRemoteCSEResource, int16, vc_cSEBaseIndex);
}
[] mccPort.receive(mw_response(mw_responsePrimitiveKO)) {
......@@ -2729,7 +2729,7 @@ module OneM2M_Functions {
v_response.primitiveContent.remoteCSE := vc_localResourcesList[vc_localRemoteCseIndex].resource.remoteCSE;
f_send(e_mcc_in_port, m_response(v_response));
vc_remoteCseIndex := f_setResource(valueof(m_primitiveContentRemoteCSE(m_contentMyRemoteCSEResource(f_getCompletePoA(PX_TS_SETTINGS.CSE1.mcaPortIn, "")))), int16, -1, false);
vc_remoteCseIndex := f_setResource(valueof(m_primitiveContentRemoteCSE(m_contentMyRemoteCSEResource(f_getCompletePoA(PX_TS_CSE1.mcaPortIn, "")))), int16, -1, false);
v_resourceIndex := vc_remoteCseIndex;
v_remoteCSERegistered:=true;
tc_ac.start(10.0);
......@@ -2827,7 +2827,7 @@ module OneM2M_Functions {
v_myResource.cSEBase.lastModifiedTime := v_myResource.cSEBase.creationTime;
v_myResource.cSEBase.cSE_ID := PX_CSE1_ID;
v_myResource.cSEBase.supportedResourceType := PX_CSE1_SRT;
v_myResource.cSEBase.pointOfAccess := {f_getCompletePoA(PX_TS_SETTINGS.CSE1.mccPortIn, "")};
v_myResource.cSEBase.pointOfAccess := {f_getCompletePoA(PX_TS_CSE1.mccPortIn, "")};
v_myResource.cSEBase.cseType := vc_cseType;
v_myResource.cSEBase.supportedReleaseVersions := {"2a"};
......@@ -4357,7 +4357,7 @@ module OneM2M_Functions {
* @param p_announcementTargetResource Announcement Target Resource
* @return p_annoucementTargetPoA Announcemenet Target PoA
*/
function f_getCompletePoA(in PortDesc p_portDesc := PX_TS_SETTINGS.CSE1.mccPortIn, charstring p_announcementTargetResource := "") return charstring {
function f_getCompletePoA(in PortDesc p_portDesc := PX_TS_CSE1.mccPortIn, charstring p_announcementTargetResource := "") return charstring {
var charstring v_poa;
log(">>> f_getCompletePoA: ", p_portDesc);
......@@ -4388,7 +4388,7 @@ module OneM2M_Functions {
return v_poa;
}
function f_getPortAddress(in PortDesc p_portDesc := PX_TS_SETTINGS.CSE1.mcaPortIn) return charstring {
function f_getPortAddress(in PortDesc p_portDesc := PX_TS_CSE1.mcaPortIn) return charstring {
if (ischosen(p_portDesc.binding.httpBindingDesc)) {
return p_portDesc.binding.httpBindingDesc.bindingDesc.tsAddress;
} else if (ischosen(p_portDesc.binding.coapBindingDesc)) {
......
......@@ -109,127 +109,125 @@ module OneM2M_Pixits {
/**
* @desc Test System settings
*/
modulepar TestSystemSettingsDesc PX_TS_SETTINGS := {
AE1 := { // AE1 component settings
mcaPort := {
binding := {
coapBindingDesc := {
bindingProtocol := e_coap,
bindingDesc := {
tsAddress := "192.168.56.102",
remotePort := 9010, // SUT CoAP/HTTP port
localPort := 3031, // Test Adapter client port (for debug purpose only)
sutAddress := "192.168.56.103"
}
}
},
serialization := e_xml
},
mcaPortIn := {
binding := {
coapBindingDesc := {
modulepar AeSimuComponentDesc PX_TS_AE1 := { // AE1 component settings
mcaPort := {
binding := {
coapBindingDesc := {
bindingProtocol := e_coap,
bindingDesc := {
tsAddress := "192.168.56.102",
remotePort := 9010,
localPort := 3041, // Test Adapter listener port (AeSimu acts as server)
remotePort := 9010, // SUT CoAP/HTTP port
localPort := 3031, // Test Adapter client port (for debug purpose only)
sutAddress := "192.168.56.103"
}
}
},
serialization := e_xml
}
}
},
serialization := e_xml
},
AE2 := { // AE2 component settings
mcaPort := {
binding := {
coapBindingDesc := {
bindingProtocol := e_coap,
bindingDesc := {
tsAddress := "192.168.56.102",
remotePort := 9010, // SUT CoAP/HTTP port
localPort := 3032, // Test Adapter client port (for debug purpose only)
sutAddress := "192.168.56.103"
}
mcaPortIn := {
binding := {
coapBindingDesc := {
bindingProtocol := e_coap,
bindingDesc := {
tsAddress := "192.168.56.102",
remotePort := 9010,
localPort := 3041, // Test Adapter listener port (AeSimu acts as server)
sutAddress := "192.168.56.103"
}
},
serialization := e_xml
}
},
mcaPortIn := {
binding := {
coapBindingDesc := {
serialization := e_xml
}
};
modulepar AeSimuComponentDesc PX_TS_AE2 := { // AE2 component settings
mcaPort := {
binding := {
coapBindingDesc := {
bindingProtocol := e_coap,
bindingDesc := {
tsAddress := "192.168.56.102",
remotePort := omit,
localPort := 3042, // Test Adapter listener port (AeSimu acts as server)
remotePort := 9010, // SUT CoAP/HTTP port
localPort := 3032, // Test Adapter client port (for debug purpose only)
sutAddress := "192.168.56.103"
}
}
},
serialization := e_xml
}
}
},
serialization := e_xml
},
CSE1 := { // CSE1 component settings
mcaPort := {
binding := {
coapBindingDesc := {
bindingProtocol := e_coap,
bindingDesc := {
tsAddress := "192.168.56.102",
remotePort:= 9010,
localPort := 3131,
sutAddress := "192.168.56.103"
}
mcaPortIn := {
binding := {
coapBindingDesc := {
bindingProtocol := e_coap,
bindingDesc := {
tsAddress := "192.168.56.102",
remotePort := omit,
localPort := 3042, // Test Adapter listener port (AeSimu acts as server)
sutAddress := "192.168.56.103"
}
},
serialization := e_xml
}
},
mcaPortIn := {
binding := {