From 59f4302d26d97b09f85568d6e4ea2e5862a01000 Mon Sep 17 00:00:00 2001 From: Miguel Angel Reina Ortega <miguelangel.reinaortega@etsi.org> Date: Mon, 21 Aug 2017 14:49:18 +0200 Subject: [PATCH] Clarification of the format used for pixits related to CSE-ID, AE-ID, SP-IP, APP-ID and resource ID identifiers and correct usage in the code Signed-off-by: Miguel Angel Reina Ortega <miguelangel.reinaortega@etsi.org> --- LibOneM2M/OneM2M_Functions.ttcn | 8 +++--- LibOneM2M/OneM2M_Pixits.ttcn | 46 +++++++++++++++++++++++++-------- LibOneM2M/OneM2M_Templates.ttcn | 4 +-- 3 files changed, 41 insertions(+), 17 deletions(-) diff --git a/LibOneM2M/OneM2M_Functions.ttcn b/LibOneM2M/OneM2M_Functions.ttcn index 2086bd7..e34c6eb 100644 --- a/LibOneM2M/OneM2M_Functions.ttcn +++ b/LibOneM2M/OneM2M_Functions.ttcn @@ -1804,14 +1804,14 @@ module OneM2M_Functions { } else if (vc_primitiveScope == e_spRelative) { if(vc_addressingMethod == e_nonHierarchical) { if(p_targetResourceIndex == -1) { - return "/" & PX_CSE_ID; + return PX_CSE_ID; } else { v_resourceAddress := f_getResourceAddress() & "/" & f_getResourceId(vc_resourcesList[p_targetResourceIndex].resource); return v_resourceAddress; } } else { if(p_targetResourceIndex == -1) { - return "/" & PX_CSE_ID & "/" & PX_CSE_NAME; + return PX_CSE_ID & "/" & PX_CSE_NAME; } else { v_resourceAddress := f_getResourceAddress(vc_resourcesList[p_targetResourceIndex].parentIndex) & "/" & f_getResourceName(vc_resourcesList[p_targetResourceIndex].resource); return v_resourceAddress; @@ -1820,14 +1820,14 @@ module OneM2M_Functions { } else if (vc_primitiveScope == e_absolute) { if(vc_addressingMethod == e_nonHierarchical) { if(p_targetResourceIndex == -1) { - return "//" & PX_SP_ID & "/" & PX_CSE_ID; + return PX_SP_ID & PX_CSE_ID; } else { v_resourceAddress := f_getResourceAddress() & "/" & f_getResourceId(vc_resourcesList[p_targetResourceIndex].resource); return v_resourceAddress; } } else { if(p_targetResourceIndex == -1) { - return "//" & PX_SP_ID & "/" & PX_CSE_ID & "/" & PX_CSE_NAME; + return PX_SP_ID & PX_CSE_ID & "/" & PX_CSE_NAME; } else { v_resourceAddress := f_getResourceAddress(vc_resourcesList[p_targetResourceIndex].parentIndex) & "/" & f_getResourceName(vc_resourcesList[p_targetResourceIndex].resource); return v_resourceAddress; diff --git a/LibOneM2M/OneM2M_Pixits.ttcn b/LibOneM2M/OneM2M_Pixits.ttcn index 68cd900..f4a2181 100644 --- a/LibOneM2M/OneM2M_Pixits.ttcn +++ b/LibOneM2M/OneM2M_Pixits.ttcn @@ -34,23 +34,47 @@ module OneM2M_Pixits { modulepar charstring PX_XML_NAMESPACE := "m2m=""http://www.onem2m.org/xml/protocols"""; + /** + * @desc IUT CSE Name + */ modulepar XSD.ID PX_CSE_NAME := "cseName"; - - modulepar XSD.ID PX_CSE_ID := "cseId"; - - modulepar XSD.ID PX_SP_ID := "om2m.org"; - - modulepar XSD.ID PX_CSE1_ID := "MyCSEId"; - + + /** + * @desc IUT CSE-ID with SP-relative-CSE-ID format (relative) according to TS-0001-7.2-1 + */ + modulepar XSD.ID PX_CSE_ID := "/cseId"; + + /** + * @desc IUT M2M-SP-ID with M2M-SP-ID format (absolute) according to TS-0001-7.2-1 Unstructured-CSE-relative -Resource-ID + */ + modulepar XSD.ID PX_SP_ID := "//om2m.org"; + + /** + * @desc Test System CSE1-ID with SP-relative-CSE-ID format (relative) according to TS-0001-7.2-1 + */ + modulepar XSD.ID PX_CSE1_ID := "/MyCSEId"; + + /** + * @desc IUT CSE resource ID with Unstructured-CSE-relative-Resource-ID (relative) format according to TS-0001-7.2-1 + */ modulepar XSD.ID PX_CSE_RESOURCE_ID := "cseResourceId"; - + + /** + * @desc Test System AE1-ID with AE-ID-Stem format (relative) according to TS-0001-7.2-1 + */ modulepar XSD.ID PX_AE1_ID_STEM := ""; - + + /** + * @desc Test System AE2-ID with AE-ID-Stem format (relative) according to TS-0001-7.2-1 + */ modulepar XSD.ID PX_AE2_ID_STEM := ""; modulepar XSD.ID PX_SUPER_USER := "admin:admin"; - - modulepar XSD.ID PX_APP_ID := "myAppId"; + + /** + * @desc Test System APP-ID with App-ID format according to TS-0001-7.2-1 + */ + modulepar XSD.ID PX_APP_ID := "NMyAppId"; modulepar boolean PX_RUN_POSTAMBLE := true; diff --git a/LibOneM2M/OneM2M_Templates.ttcn b/LibOneM2M/OneM2M_Templates.ttcn index 59eda53..46fa89c 100644 --- a/LibOneM2M/OneM2M_Templates.ttcn +++ b/LibOneM2M/OneM2M_Templates.ttcn @@ -1622,8 +1622,8 @@ module OneM2M_Templates { announcedAttribute := omit,//O cseType := omit,//O pointOfAccess := omit,//O - cSEBase := "/" & valueof(p_cSEBase),//M - cSE_ID := "/" & valueof(p_cSE_ID),//M + cSEBase := valueof(p_cSEBase),//M + cSE_ID := valueof(p_cSE_ID),//M m2M_Ext_ID := omit,//O trigger_Recipient_ID := omit,//O requestReachability := true,//M -- GitLab