Commit d0b1bf8b authored by Miguel Angel Reina Ortega's avatar Miguel Angel Reina Ortega
Browse files
parent a3a7b4ad
......@@ -231,10 +231,12 @@ module OneM2M_Functions {
function f_cf02UpCseSimuMaster(in CseTypeID p_cseType := int2) runs on CseSimu system CseSystem {
// Variables
var charstring v_binding;
var charstring v_binding_in;
var charstring v_host;
var charstring v_binding;
var charstring v_binding_in;
var charstring v_host;
var PrimitiveContent v_cSEBaseResource;
//Initialization of component variables
vc_config := e_cf02CseSimuMaster;
vc_testSystemRole := e_cse;
vc_cseType := p_cseType;
......@@ -248,29 +250,32 @@ module OneM2M_Functions {
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(PX_UT_IMPLEMENTED) {
map(self:utPort, system:utPort) param (PX_TS_UT);
}
if (ischosen(PX_TS_CSE1.mccPort.binding.httpBindingDesc)) {
v_binding := "HTTP";
v_host := PX_TS_CSE1.mcaPort.binding.httpBindingDesc.bindingDesc.sutAddress & ":" & int2str(PX_TS_CSE1.mccPort.binding.httpBindingDesc.bindingDesc.remotePort);
v_binding := "HTTP";
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_CSE1.mcaPort.binding.coapBindingDesc.bindingDesc.sutAddress & ":" & int2str(PX_TS_CSE1.mccPort.binding.coapBindingDesc.bindingDesc.remotePort);
v_binding := "COAP";
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_CSE1.mcaPort.binding.mqttBindingDesc.bindingDesc.sutAddress & ":" & int2str(PX_TS_CSE1.mccPort.binding.mqttBindingDesc.bindingDesc.remotePort);
v_binding := "MQTT";
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_CSE1.mcaPort.binding.wsBindingDesc.bindingDesc.sutAddress & ":" & int2str(PX_TS_CSE1.mccPort.binding.wsBindingDesc.bindingDesc.remotePort);
v_binding := "WSCK";
v_host := PX_TS_CSE1.mcaPort.binding.wsBindingDesc.bindingDesc.sutAddress & ":" & int2str(PX_TS_CSE1.mccPort.binding.wsBindingDesc.bindingDesc.remotePort);
}
if (ischosen(PX_TS_CSE1.mccPortIn.binding.httpBindingDesc)) {
v_binding_in := "HTTP";
} else if (ischosen(PX_TS_CSE1.mccPortIn.binding.coapBindingDesc)) {
v_binding_in := "COAP";
} else if (ischosen(PX_TS_CSE1.mccPortIn.binding.mqttBindingDesc)) {
v_binding_in := "MQTT";
} else {
v_binding_in := "WSCK";
}
if (ischosen(PX_TS_CSE1.mccPortIn.binding.httpBindingDesc)) {
v_binding_in := "HTTP";
} else if (ischosen(PX_TS_CSE1.mccPortIn.binding.coapBindingDesc)) {
v_binding_in := "COAP";
} else if (ischosen(PX_TS_CSE1.mccPortIn.binding.mqttBindingDesc)) {
v_binding_in := "MQTT";
} else {
v_binding_in := "WSCK";
}
vc_myInterfaces[enum2int(valueof(InterfaceIds:e_mcc_port))] := { mccPort, v_host, v_binding, c_serializationLabel[enum2int(PX_TS_CSE1.mccPort.serialization)] };
vc_myInterfaces[enum2int(valueof(InterfaceIds:e_mcc_in_port))] := { mccPortIn, v_host, v_binding_in, c_serializationLabel[enum2int(PX_TS_CSE1.mccPortIn.serialization)] };
......@@ -292,9 +297,9 @@ module OneM2M_Functions {
function f_cf02UpAe1(in CseTypeID p_cseType := int2) runs on AeSimu system CseSystem {
// Variables
var charstring v_binding;
var charstring v_binding_in;
var charstring v_host;
var charstring v_binding;
var charstring v_binding_in;
var charstring v_host;
vc_config := e_cf02CseSimuMaster;
vc_testSystemRole := e_ae;
......@@ -456,6 +461,7 @@ module OneM2M_Functions {
vc_ae2.start(f_cf01DownAe2());
vc_ae2.done;
}
}// end f_cf01Down
/**
......@@ -466,6 +472,7 @@ module OneM2M_Functions {
unmap(self:mcaPort, system:mcaPort);
unmap(self:acPort, system:acPort);
unmap(self:mcaPortIn, system:mcaPortIn);
}// end f_cf01DownAe2
/**
......@@ -481,6 +488,7 @@ module OneM2M_Functions {
unmap(vc_cse1:mccPort, system:mccPort);
unmap(vc_cse1:mccPortIn, system:mccPortIn);
unmap(vc_cse1:acPort, system:acPort);
}// end f_cf02Down
/**
......@@ -491,8 +499,12 @@ module OneM2M_Functions {
unmap(self:mccPort, system:mccPort);
unmap(self:mccPortIn, system:mccPortIn);
unmap(self:acPort, system:acPort);
if(PX_UT_IMPLEMENTED){
unmap(self:utPort, system:utPort);
}
unmap(vc_ae1:mcaPort, system:mcaPort);
unmap(vc_ae1:acPort, system:acPort);
}// end f_cf02DownCseSimuMaster
/**
......@@ -501,10 +513,11 @@ module OneM2M_Functions {
function f_cf03Down() runs on CseSimu {
unmap(self:mcaPortIn, system:mcaPortIn);
unmap(self:acPort, system:acPort);
if(PX_UT_IMPLEMENTED){
unmap(self:utPort, system:utPort);
}
unmap(self:acPort, system:acPort);
}// end f_cf03Down
/**
......@@ -518,6 +531,7 @@ module OneM2M_Functions {
if(PX_UT_IMPLEMENTED){
unmap(self:utPort, system:utPort);
}
}// end f_cf04Down
}//end group configFunctions
......
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