Creation of global variables for addressing method and primitive scope

Small enhancement of TC_CSE_DMR_RET_BO_002 due to new global variables
Signed-off-by: Miguel Angel Reina Ortega's avatarMiguel Angel Reina Ortega <miguelangel.reinaortega@etsi.org>
parent a488c5ce
/**
* @author ETSI
* @version $URL: https://forge.etsi.org/svn/LibCommon/tags/v1.4.0/ttcn/LibCommon_AbstractData.ttcn $
* @version $URL: https://oldforge.etsi.org/svn/LibCommon/tags/v1.4.0/ttcn/LibCommon_AbstractData.ttcn $
* $Id: LibCommon_AbstractData.ttcn 64 2016-12-14 15:09:43Z berge $
* @desc A collection of functions for abstract data types which may be
* useful in the implementation of any TTCN-3 test suite.
......
/**
* @author ETSI
* @version $URL: https://forge.etsi.org/svn/LibCommon/tags/v1.4.0/ttcn/LibCommon_BasicTypesAndValues.ttcn $
* @version $URL: https://oldforge.etsi.org/svn/LibCommon/tags/v1.4.0/ttcn/LibCommon_BasicTypesAndValues.ttcn $
* $Id: LibCommon_BasicTypesAndValues.ttcn 64 2016-12-14 15:09:43Z berge $
* @desc A collection of basic type and value definitions which may be
* useful in the implementation of any TTCN-3 test suite. <br><br>
......
/**
*
* @author ETSI
* @version $URL: https://forge.etsi.org/svn/LibCommon/tags/v1.4.0/ttcn/LibCommon_DataStrings.ttcn $
* @version $URL: https://oldforge.etsi.org/svn/LibCommon/tags/v1.4.0/ttcn/LibCommon_DataStrings.ttcn $
* $Id: LibCommon_DataStrings.ttcn 64 2016-12-14 15:09:43Z berge $
* @desc A collection of data string type and value definitions which
* may be useful in the implementation of any TTCN-3 test
......
/**
* @author ETSI
* @version $URL: https://forge.etsi.org/svn/LibCommon/tags/v1.4.0/ttcn/LibCommon_Sync.ttcn $
* @version $URL: https://oldforge.etsi.org/svn/LibCommon/tags/v1.4.0/ttcn/LibCommon_Sync.ttcn $
* $Id: LibCommon_Sync.ttcn 66 2017-03-06 09:59:41Z filatov $
* @desc This module implements _one_ generic synchronization mechanism
* for TTCN-3 test cases with one or more test components.
......
/**
* @author ETSI
* @version $URL: https://forge.etsi.org/svn/LibCommon/tags/v1.4.0/ttcn/LibCommon_TextStrings.ttcn $
* @version $URL: https://oldforge.etsi.org/svn/LibCommon/tags/v1.4.0/ttcn/LibCommon_TextStrings.ttcn $
* $Id: LibCommon_TextStrings.ttcn 64 2016-12-14 15:09:43Z berge $
* @desc A collection of text string type and value definitions which
* may be useful in the implementation of any TTCN-3 test
......
/**
* @author ETSI
* @version $URL: https://forge.etsi.org/svn/LibCommon/tags/v1.4.0/ttcn/LibCommon_Time.ttcn $
* @version $URL: https://oldforge.etsi.org/svn/LibCommon/tags/v1.4.0/ttcn/LibCommon_Time.ttcn $
* $Id: LibCommon_Time.ttcn 64 2016-12-14 15:09:43Z berge $
* @desc A collection of time handling functions which may be useful in
* the implementation of any TTCN-3 test suite.
......
/**
* @author ETSI
* @version $URL: https://forge.etsi.org/svn/LibCommon/tags/v1.4.0/ttcn/LibCommon_VerdictControl.ttcn $
* @version $URL: https://oldforge.etsi.org/svn/LibCommon/tags/v1.4.0/ttcn/LibCommon_VerdictControl.ttcn $
* $Id: LibCommon_VerdictControl.ttcn 64 2016-12-14 15:09:43Z berge $
* @desc Contains generic functions which set test component verdicts
* based on generic function return codes according to established
......
......@@ -6,8 +6,8 @@
* All rights reserved.
*
* @author oneM2M
* @version $URL: https://forge.etsi.org/svn/oneM2M/trunk/ttcn/LibOneM2M/OneM2M_Functions.ttcn $
* $Id: OneM2M_Functions.ttcn 296 2017-06-02 13:16:50Z reinaortega $
* @version $URL: https://oldforge.etsi.org/svn/oneM2M/trunk/ttcn/LibOneM2M/OneM2M_Functions.ttcn $
* $Id: OneM2M_Functions.ttcn 298 2017-06-14 07:11:13Z reinaortega $
* @desc Module containing functions for oneM2M
*
*/
......@@ -1400,9 +1400,9 @@ module OneM2M_Functions {
function f_getResourceAddress(integer p_targetResourceIndex := -1) runs on Tester return XSD.ID {
var XSD.ID v_resourceAddress;
if(PX_ADDRESSING_FORMAT == e_cseRelative) {
if(vc_primitiveScope == e_cseRelative) {
if(PX_UNSTRUCTURED) {
if(vc_addressingMethod == e_nonHierarchical) {
if(p_targetResourceIndex == -1) {
return PX_CSE_RESOURCE_ID;
} else {
......@@ -1417,8 +1417,8 @@ module OneM2M_Functions {
}
}
} else if (PX_ADDRESSING_FORMAT == e_spRelative) {
if(PX_UNSTRUCTURED) {
} else if (vc_primitiveScope == e_spRelative) {
if(vc_addressingMethod == e_nonHierarchical) {
if(p_targetResourceIndex == -1) {
return "/" & PX_CSE_ID;
} else {
......@@ -1433,8 +1433,8 @@ module OneM2M_Functions {
return v_resourceAddress;
}
}
} else if (PX_ADDRESSING_FORMAT == e_absolute) {
if(PX_UNSTRUCTURED) {
} else if (vc_primitiveScope == e_absolute) {
if(vc_addressingMethod == e_nonHierarchical) {
if(p_targetResourceIndex == -1) {
return "//" &"SpId" & "/" & PX_CSE_ID;
} else {
......
......@@ -6,8 +6,8 @@
* All rights reserved.
*
* @author oneM2M
* @version $URL: https://forge.etsi.org/svn/oneM2M/trunk/ttcn/LibOneM2M/OneM2M_Pixits.ttcn $
* $Id: OneM2M_Pixits.ttcn 288 2017-05-19 07:18:08Z reinaortega $
* @version $URL: https://oldforge.etsi.org/svn/oneM2M/trunk/ttcn/LibOneM2M/OneM2M_Pixits.ttcn $
* $Id: OneM2M_Pixits.ttcn 298 2017-06-14 07:11:13Z reinaortega $
* @desc Module containing Pixits for oneM2M
*
*/
......@@ -40,8 +40,6 @@ module OneM2M_Pixits {
modulepar XSD.ID PX_CSE_RESOURCE_ID := "cseResourceId";
modulepar boolean PX_UNSTRUCTURED := false;
modulepar XSD.ID PX_AE1_ID_STEM := "";
modulepar XSD.ID PX_AE2_ID_STEM := "";
......@@ -54,7 +52,9 @@ module OneM2M_Pixits {
modulepar ListOfURIs PX_ACOR := {"*"};
modulepar AddressingFormat PX_ADDRESSING_FORMAT := e_cseRelative;
modulepar AddressingMethod PX_ADDRESSING_METHOD := e_hierarchical;
modulepar PrimitiveScope PX_PRIMITIVE_SCOPE := e_cseRelative;
modulepar charstring PX_SERIALIZATION := "XML";
......
......@@ -6,8 +6,8 @@
* All rights reserved.
*
* @author oneM2M
* @version $URL: https://forge.etsi.org/svn/oneM2M/trunk/ttcn/LibOneM2M/OneM2M_Templates.ttcn $
* $Id: OneM2M_Templates.ttcn 297 2017-06-02 14:21:45Z reinaortega $
* @version $URL: https://oldforge.etsi.org/svn/oneM2M/trunk/ttcn/LibOneM2M/OneM2M_Templates.ttcn $
* $Id: OneM2M_Templates.ttcn 298 2017-06-14 07:11:13Z reinaortega $
* @desc Module containing templates for oneM2M
*
*/
......
......@@ -6,8 +6,8 @@
* All rights reserved.
*
* @author oneM2M
* @version $URL: https://forge.etsi.org/svn/oneM2M/trunk/ttcn/LibOneM2M/OneM2M_TestSystem.ttcn $
* $Id: OneM2M_TestSystem.ttcn 234 2017-03-20 16:37:29Z reinaortega $
* @version $URL: https://oldforge.etsi.org/svn/oneM2M/trunk/ttcn/LibOneM2M/OneM2M_TestSystem.ttcn $
* $Id: OneM2M_TestSystem.ttcn 298 2017-06-14 07:11:13Z reinaortega $
* @desc Test System module for oneM2M
*
*/
......@@ -17,6 +17,7 @@ module OneM2M_TestSystem {
import from OneM2M_TypesAndValues all;
import from LibCommon_Time {modulepar all};
import from OneM2M_Ports all;
import from OneM2M_Pixits all;
/* ***************************************
* Test System Components
......@@ -31,6 +32,8 @@ module OneM2M_TestSystem {
var Configurations vc_config;
var MyResourcesList vc_resourcesList;
var IntegerList vc_resourcesIndexToBeDeleted := {};
var PrimitiveScope vc_primitiveScope := PX_PRIMITIVE_SCOPE;
var AddressingMethod vc_addressingMethod := PX_ADDRESSING_METHOD;
}
type component CseTester extends Tester {
......
......@@ -6,8 +6,8 @@
* All rights reserved.
*
* @author oneM2M
* @version $URL: https://forge.etsi.org/svn/oneM2M/trunk/ttcn/LibOneM2M/OneM2M_Types.ttcn $
* $Id: OneM2M_Types.ttcn 297 2017-06-02 14:21:45Z reinaortega $
* @version $URL: https://oldforge.etsi.org/svn/oneM2M/trunk/ttcn/LibOneM2M/OneM2M_Types.ttcn $
* $Id: OneM2M_Types.ttcn 298 2017-06-14 07:11:13Z reinaortega $
* @desc OneM2M data types module
*
*/
......@@ -7632,11 +7632,16 @@ group InvalidTypes {
type record of integer IntegerList;
type enumerated AddressingFormat {
type enumerated PrimitiveScope {
e_cseRelative,
e_spRelative,
e_absolute
}
type enumerated AddressingMethod {
e_nonHierarchical,
e_hierarchical
}
}
}
......
......@@ -6,8 +6,8 @@
* All rights reserved.
*
* @author oneM2M
* @version $URL: https://forge.etsi.org/svn/oneM2M/trunk/ttcn/OneM2M_Testcases.ttcn $
* $Id: OneM2M_Testcases.ttcn 297 2017-06-02 14:21:45Z reinaortega $
* @version $URL: https://oldforge.etsi.org/svn/oneM2M/trunk/ttcn/OneM2M_Testcases.ttcn $
* $Id: OneM2M_Testcases.ttcn 298 2017-06-14 07:11:13Z reinaortega $
* @desc Module containing test cases for oneM2M
*
*/
......@@ -3475,7 +3475,9 @@ module OneM2M_Testcases {
var RequestPrimitive v_request;
var integer v_aeIndex := -1;
var XSD.ID v_resourceId := "nonexisting";
var XSD.ID v_resourceId := "nonExistingId";
var XSD.ID v_resourceName := "nonExistingName";
var XSD.ID v_targetResourceAddress;
// Test control
......@@ -3488,11 +3490,15 @@ module OneM2M_Testcases {
v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
// Test Body
if(PX_UNSTRUCTURED and (PX_ADDRESSING_FORMAT == e_cseRelative)) {
mcaPort.send(m_request(m_retrieveResource(v_resourceId, f_getOriginator(v_aeIndex))));
if((vc_addressingMethod == e_nonHierarchical) and (vc_primitiveScope == e_cseRelative)) {
v_targetResourceAddress := v_resourceId;
} else if (vc_addressingMethod == e_nonHierarchical) {
v_targetResourceAddress := f_getResourceAddress() & "/" & v_resourceId;
} else {
mcaPort.send(m_request(m_retrieveResource(f_getResourceAddress(v_aeIndex) & "/" & v_resourceId, f_getOriginator(v_aeIndex))));
v_targetResourceAddress := f_getResourceAddress(v_aeIndex) & "/" & v_resourceName;
}
mcaPort.send(m_request(m_retrieveResource(v_targetResourceAddress, f_getOriginator(v_aeIndex))));
tc_ac.start;
alt {
......
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