Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
ATS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TST
ATS
Merge requests
!15
Stf531 discovery test cases
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Stf531 discovery test cases
STF531-DISCOVERY_TEST_CASES
into
master
Overview
0
Commits
8
Pipelines
0
Changes
Merged
Miguel Angel Reina Ortega
requested to merge
STF531-DISCOVERY_TEST_CASES
into
master
7 years ago
Overview
0
Commits
8
Pipelines
0
Changes
-
Expand
0
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
2a610591
8 commits,
7 years ago
+
553
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
Search (e.g. *.vue) (Ctrl+P)
LibOneM2M/OneM2M_Functions.ttcn
+
90
−
0
Options
@@ -867,7 +867,97 @@ module OneM2M_Functions {
unmap(self:acPort, system:acPort);
} //end f_cse_notifyProcedure
/**
* @desc It determines whether the addressing method of the given address is non-hierarchical. Not valid for CSE-Base as target
* @param p_resourceAddress
* @return boolean
*/
function f_isNonHierarchical(XSD.ID p_resourceAddress) runs on Tester return boolean {
var integer i;
var integer v_nbOfSlashes:= 0;
for (i := 0; i < lengthof(p_resourceAddress); i:= i+1){
if(match (p_resourceAddress[i], "/")){
v_nbOfSlashes:= v_nbOfSlashes+1;
}
}
if(f_isScopeCseRelative(p_resourceAddress)) {
if(v_nbOfSlashes == 0 ) {
return true;
} else {
return false;
}
} else if (f_isScopeSpRelative(p_resourceAddress)){
if(v_nbOfSlashes == 2 ) {
return true;
} else {
return false;
}
} else if (f_isScopeAbsolute(p_resourceAddress)){
if(v_nbOfSlashes == 4 ) {
return true;
} else {
return false;
}
} else {
return false;
}
}
/**
* @desc It determines whether the addressing method of the given address is hierarchical. Not valid for CSE-Base as target
* @param p_resourceAddress
* @return boolean
*/
function f_isHierarchical(XSD.ID p_resourceAddress) runs on Tester return boolean {
if(f_isNonHierarchical(p_resourceAddress)) {
return false;
} else {
return true;
}
}
/**
* @desc It determines whether the primitive scope of the given address is CSE-Relative
* @param p_resourceAddress
* @return boolean
*/
function f_isScopeCseRelative(XSD.ID p_resourceAddress) runs on Tester return boolean {
if (p_resourceAddress[0] != "/") {
return true;
} else {
return false;
}
}
/**
* @desc It determines whether the primitive scope of the given address is SP-Relative
* @param p_resourceAddress
* @return boolean
*/
function f_isScopeSpRelative(XSD.ID p_resourceAddress) runs on Tester return boolean {
if ((p_resourceAddress[0] == "/") and (p_resourceAddress[1] != "/")){
return true;
} else {
return false;
}
}
/**
* @desc It determines whether the primitive scope of the given address is Absolute
* @param p_resourceAddress
* @return boolean
*/
function f_isScopeAbsolute(XSD.ID p_resourceAddress) runs on Tester return boolean {
if ((p_resourceAddress[0] == "/") and (p_resourceAddress[1] == "/")) {
return true;
} else {
return false;
}
}
}//end group helpingFunctions
Loading