Creation of Group resource missing in f_generateLocalResource

Signed-off-by: Miguel Angel Reina Ortega's avatarreinaortega <miguelangel.reinaortega@etsi.org>
parent 147a1768
......@@ -2774,21 +2774,30 @@ module OneM2M_Functions {
}
}
} else if(p_resourceType == int23 and ispresent(p_resource)) { //Subscription
if(ischosen(p_resource.subscription)){
v_myResource.subscription := valueof(p_resource.subscription);
v_myResource.subscription.resourceID := "sub" & int2str(v_resourceIndex);
if(not(ispresent(p_resource.subscription.resourceName))) {
v_myResource.subscription.resourceName := "subscription" & int2str(v_resourceIndex);
} else if(p_resourceType == int9 and ispresent(p_resource)) { //Group
if(ischosen(p_resource.group_)){
v_myResource.group_ := valueof(p_resource.group_);
v_myResource.group_.resourceID := "grp" & int2str(v_resourceIndex);
if(not(ispresent(p_resource.group_.resourceName))) {
v_myResource.group_.resourceName := "group" & int2str(v_resourceIndex);
}
v_myResource.subscription.resourceType := p_resourceType;
v_myResource.subscription.parentID := f_getResourceId(vc_localResourcesList[p_parentIndex].resource);
v_myResource.subscription.creationTime := fx_generateTimestamp();
v_myResource.subscription.lastModifiedTime := v_myResource.subscription.creationTime;
if(not(ispresent(p_resource.subscription.expirationTime))) {
v_myResource.subscription.expirationTime := "20301231T012345";
v_myResource.group_.resourceType := p_resourceType;
v_myResource.group_.parentID := f_getResourceId(vc_localResourcesList[p_parentIndex].resource);
v_myResource.group_.creationTime := fx_generateTimestamp();
v_myResource.group_.lastModifiedTime := v_myResource.group_.creationTime;
if(not(ispresent(p_resource.group_.expirationTime))) {
v_myResource.group_.expirationTime := "20301231T012345";
}
}
if(not(ispresent(p_resource.group_.memberType))) {
v_myResource.group_.memberType := int0;
}
if(not(ispresent(p_resource.group_.consistencyStrategy))) {
v_myResource.group_.consistencyStrategy := int1;
}
if(v_myResource.group_.memberType != int0) {
v_myResource.group_.memberTypeValidated := true;//Set initially to TRUE
}
}
} else if(p_resourceType == int15 and ispresent(p_resource)) { //PollingChannel
if(ischosen(p_resource.pollingChannel)){
v_myResource.pollingChannel := valueof(p_resource.pollingChannel);
......
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