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


Signed-off-by: Miguel Angel Reina Ortega's avatarreinaortega <miguelangel.reinaortega@etsi.org>
parent 63517d4f
......@@ -2829,7 +2829,7 @@ module OneM2M_Functions {
* @param p_resourceType Type of the resource to be created
* @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 integer v_localResourceIndex;
......@@ -2849,7 +2849,7 @@ module OneM2M_Functions {
* @param p_resourceType Type of the resource to be created
* @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 PrimitiveContent v_myResource;
......@@ -4851,7 +4851,7 @@ module OneM2M_Functions {
* @return Internal resource index of the saved resource
* @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;
if(isbound(vc_localResourcesList)) {
vc_localResourcesList[lengthof(vc_localResourcesList)] := {p_parentIndex, p_resourceType, p_resource};
......
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