Skip to content
Snippets Groups Projects
Commit c07a25e7 authored by Miguel Angel Reina Ortega's avatar Miguel Angel Reina Ortega
Browse files

Set default value for parentIndex of local resource related functions

parent 63517d4f
No related branches found
No related tags found
No related merge requests found
...@@ -2829,7 +2829,7 @@ module OneM2M_Functions { ...@@ -2829,7 +2829,7 @@ module OneM2M_Functions {
* @param p_resourceType Type of the resource to be created * @param p_resourceType Type of the resource to be created
* @return Index of internal created resource * @return Index of internal created resource
*/ */
function f_generateAndSetLocalResource(in template(omit) PrimitiveContent p_resource := omit, in integer p_parentIndex, in ResourceType p_resourceType) runs on CseSimu return Integer { function f_generateAndSetLocalResource(in template(omit) PrimitiveContent p_resource := omit, in integer p_parentIndex := vc_cSEBaseIndex, in ResourceType p_resourceType) runs on CseSimu return Integer {
var PrimitiveContent v_localResource; var PrimitiveContent v_localResource;
var integer v_localResourceIndex; var integer v_localResourceIndex;
...@@ -2849,7 +2849,7 @@ module OneM2M_Functions { ...@@ -2849,7 +2849,7 @@ module OneM2M_Functions {
* @param p_resourceType Type of the resource to be created * @param p_resourceType Type of the resource to be created
* @return Internal created resource * @return Internal created resource
*/ */
function f_generateLocalResource(in template(omit) PrimitiveContent p_resource := omit, in integer p_parentIndex, in ResourceType p_resourceType) runs on CseSimu return PrimitiveContent { function f_generateLocalResource(in template(omit) PrimitiveContent p_resource := omit, in integer p_parentIndex := vc_cSEBaseIndex, in ResourceType p_resourceType) runs on CseSimu return PrimitiveContent {
var integer v_resourceIndex := lengthof(vc_localResourcesList); var integer v_resourceIndex := lengthof(vc_localResourcesList);
var PrimitiveContent v_myResource; var PrimitiveContent v_myResource;
...@@ -4851,7 +4851,7 @@ module OneM2M_Functions { ...@@ -4851,7 +4851,7 @@ module OneM2M_Functions {
* @return Internal resource index of the saved resource * @return Internal resource index of the saved resource
* @verdict * @verdict
*/ */
function f_setLocalResource(PrimitiveContent p_resource, ResourceType p_resourceType, integer p_parentIndex) runs on CseSimu return integer { function f_setLocalResource(PrimitiveContent p_resource, ResourceType p_resourceType, integer p_parentIndex := vc_cSEBaseIndex) runs on CseSimu return integer {
var integer v_newIndex := -1; var integer v_newIndex := -1;
if(isbound(vc_localResourcesList)) { if(isbound(vc_localResourcesList)) {
vc_localResourcesList[lengthof(vc_localResourcesList)] := {p_parentIndex, p_resourceType, p_resource}; vc_localResourcesList[lengthof(vc_localResourcesList)] := {p_parentIndex, p_resourceType, p_resource};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment