Addition of vc_testSystemRole global variable

Signed-off-by: Miguel Angel Reina Ortega's avatarMiguel Angel Reina Ortega <miguelangel.reinaortega@etsi.org>
parent b24e9022
...@@ -29,7 +29,8 @@ module OneM2M_Functions { ...@@ -29,7 +29,8 @@ module OneM2M_Functions {
function f_cf01Up(in boolean p_auxiliaryAe2Required := false) runs on AeSimu { function f_cf01Up(in boolean p_auxiliaryAe2Required := false) runs on AeSimu {
// Variables // Variables
vc_config := e_cf01; vc_config := e_cf01;
vc_testSystemRole := e_ae;
// Map // Map
map(self:mcaPort, system:mcaPort); map(self:mcaPort, system:mcaPort);
...@@ -56,7 +57,8 @@ module OneM2M_Functions { ...@@ -56,7 +57,8 @@ module OneM2M_Functions {
function f_cf01UpAe2() runs on AeSimu { function f_cf01UpAe2() runs on AeSimu {
// Variables // Variables
vc_config := e_cf01; vc_config := e_cf01;
vc_testSystemRole := e_ae;
// Map // Map
map(self:mcaPort, system:mcaPort); map(self:mcaPort, system:mcaPort);
...@@ -78,6 +80,7 @@ module OneM2M_Functions { ...@@ -78,6 +80,7 @@ module OneM2M_Functions {
// Variables // Variables
vc_config := e_cf02; vc_config := e_cf02;
vc_testSystemRole := e_ae;
vc_cse1 := CseSimu.create("CSE1") alive; vc_cse1 := CseSimu.create("CSE1") alive;
// Map // Map
...@@ -100,7 +103,8 @@ module OneM2M_Functions { ...@@ -100,7 +103,8 @@ module OneM2M_Functions {
function f_cf02UpCse1() runs on CseSimu { function f_cf02UpCse1() runs on CseSimu {
// Variables // Variables
vc_config := e_cf02; vc_config := e_cf02;
vc_testSystemRole := e_cse;
// Map // Map
map(self:mccPort, system:mccPort); map(self:mccPort, system:mccPort);
...@@ -121,6 +125,7 @@ module OneM2M_Functions { ...@@ -121,6 +125,7 @@ module OneM2M_Functions {
// Variables // Variables
vc_config := e_cf02; vc_config := e_cf02;
vc_testSystemRole := e_cse;
vc_ae1 := AeSimu.create("AE1") alive; vc_ae1 := AeSimu.create("AE1") alive;
// Map // Map
...@@ -145,6 +150,7 @@ module OneM2M_Functions { ...@@ -145,6 +150,7 @@ module OneM2M_Functions {
// Variables // Variables
vc_config := e_cf02; vc_config := e_cf02;
vc_testSystemRole := e_ae;
// Map // Map
map(self:mcaPort, system:mcaPort); map(self:mcaPort, system:mcaPort);
...@@ -164,6 +170,7 @@ module OneM2M_Functions { ...@@ -164,6 +170,7 @@ module OneM2M_Functions {
// Variables // Variables
vc_config := e_cf03; vc_config := e_cf03;
vc_testSystemRole := e_cse;
// Map // Map
map(self:mcaPort, system:mcaPort);//TODO To be consistent, we should use mcaPortIn for AE testing map(self:mcaPort, system:mcaPort);//TODO To be consistent, we should use mcaPortIn for AE testing
...@@ -185,6 +192,7 @@ module OneM2M_Functions { ...@@ -185,6 +192,7 @@ module OneM2M_Functions {
// Variables // Variables
vc_config := e_cf04; vc_config := e_cf04;
vc_testSystemRole := e_cse;
// Map // Map
map(self:mccPort, system:mccPort); map(self:mccPort, system:mccPort);
...@@ -2006,9 +2014,13 @@ module OneM2M_Functions { ...@@ -2006,9 +2014,13 @@ module OneM2M_Functions {
if(p_resourceType != int2) { if(p_resourceType != int2) {
if(p_resourceType == int16) { if(p_resourceType == int16) {
p_request.from_ := f_getOriginator(p_parentIndex, false); p_request.from_ := PX_CSE1_ID;
} else { } else {
p_request.from_ := f_getOriginator(p_parentIndex); if(vc_testSystemRole == e_ae) {
p_request.from_ := f_getOriginator(p_parentIndex);
} else {//vc_testSystemRole == e_cse
p_request.from_ := f_getOriginator(p_parentIndex, false);
}
} }
} }
p_request.to_ := f_getResourceAddress(p_parentIndex); p_request.to_ := f_getResourceAddress(p_parentIndex);
......
...@@ -31,6 +31,7 @@ module OneM2M_TestSystem { ...@@ -31,6 +31,7 @@ module OneM2M_TestSystem {
timer tc_wait := PX_TWAIT; timer tc_wait := PX_TWAIT;
//global variables //global variables
var Configurations vc_config; var Configurations vc_config;
var TestSystemRole vc_testSystemRole;
var MyResourcesList vc_resourcesList; var MyResourcesList vc_resourcesList;
var IntegerList vc_resourcesIndexToBeDeleted := {}; var IntegerList vc_resourcesIndexToBeDeleted := {};
var integer vc_aeAuxIndex;//TODO To be removed var integer vc_aeAuxIndex;//TODO To be removed
......
...@@ -5597,6 +5597,11 @@ group OtherTypes { ...@@ -5597,6 +5597,11 @@ group OtherTypes {
e_cf03, e_cf03,
e_cf04 e_cf04
}; };
type enumerated TestSystemRole {
e_cse,
e_ae
};
type NhURI ParentID; type NhURI ParentID;
......
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