diff --git a/LibOneM2M/OneM2M_Functions.ttcn b/LibOneM2M/OneM2M_Functions.ttcn index 6e285610ae2ed8c85b33391f62b8ddf0557dccb2..7737ebb16873e646d17d59a97e88fb9f78a9a82b 100644 --- a/LibOneM2M/OneM2M_Functions.ttcn +++ b/LibOneM2M/OneM2M_Functions.ttcn @@ -3172,6 +3172,16 @@ module OneM2M_Functions { if(v_myResource.group_.memberType != int0) { v_myResource.group_.memberTypeValidated := true;//Set initially to TRUE } + if(v_myResource.group_.memberIDs == {"NotInitialized"}) { + v_myResource.group_.memberIDs := {}; + } + v_myResource.group_.currentNrOfMembers := lengthof(v_myResource.group_.memberIDs); + if(lengthof(v_myResource.group_.memberIDs) == 0) { + v_myResource.group_.memberTypeValidated := false; + } + if(not(ispresent(p_resource.group_.semanticSupportIndicator))) { + v_myResource.group_.semanticSupportIndicator := false;//Set initially to TRUE + } } } else if(p_resourceType == int15 and ispresent(p_resource)) { //PollingChannel if(ischosen(p_resource.pollingChannel)){ @@ -4285,6 +4295,7 @@ module OneM2M_Functions { p_request.primitiveContent.container.accessControlPolicyIDs := {f_getResourceAddress(vc_acpIndex)}; } } + } else if (p_resourceType == int4) {//contentInstance } else if (p_resourceType == int15) {//pollingChannel if(ischosen(vc_resourcesList[p_parentIndex].resource.aE)) { p_request.from_ := vc_resourcesList[p_parentIndex].resource.aE.aE_ID; diff --git a/LibOneM2M/OneM2M_Templates.ttcn b/LibOneM2M/OneM2M_Templates.ttcn index 0b12e1d39e8cc36685c4a92a60fa83f453d43070..795dc8c828e3032dfae64a85cf3d0802d4dcc096 100644 --- a/LibOneM2M/OneM2M_Templates.ttcn +++ b/LibOneM2M/OneM2M_Templates.ttcn @@ -1043,7 +1043,7 @@ module OneM2M_Templates { template (value) RequestPrimitive m_createGroupAnncBase modifies m_create := { requestIdentifier := testcasename() & "-m_createGroupAnnc", resourceType := int10009, - primitiveContent := {groupAnnc := m_contentCreateGroupAnnc (1, {"NotInitialized"}, omit, omit)} //TODO: p_resourceId + primitiveContent := {groupAnnc := m_contentCreateGroupAnnc (omit, omit, omit, omit)} //TODO: p_resourceId }; template (value) RequestPrimitive m_createGroup(in template (value) XSD.NonNegativeInteger p_maxNrOfMembers, @@ -2049,8 +2049,8 @@ module OneM2M_Templates { * @param p_accessControlPolicyIds ACP IDs for the GroupAnnc * @param p_name Resource name */ - template (value) GroupAnnc_optional m_contentCreateGroupAnnc ( in template (value) XSD.PositiveInteger p_maxNrOfMembers, - in template (value) ListOfURIs p_memberIds, + template (value) GroupAnnc_optional m_contentCreateGroupAnnc ( in template (omit) XSD.PositiveInteger p_maxNrOfMembers, + in template (omit) ListOfURIs p_memberIds, in template (omit) AcpType p_accessControlPolicyIds, in template (omit) MemberType p_memberType := omit, in template (omit) ConsistencyStrategy p_consistencyStrategy := omit, @@ -2489,7 +2489,7 @@ module OneM2M_Templates { announcedAttribute := omit,//O stateTag := omit,//NP creator := omit,//O - contentInfo := "text/strings:0",//O + contentInfo := "application/text:1",//O contentSize := omit,//NP contentRef := omit, //O ontologyRef := omit,//O @@ -4022,21 +4022,7 @@ module OneM2M_Templates { choice := {childResource_list := ?} //O } - template AccessControlPolicy_optional mw_contentAcp_rc6 modifies mw_contentAcpBase := { - resourceName := omit,//M - resourceType := omit,//M - resourceID := omit,//M - parentID := omit,//M - creationTime := omit,//M - lastModifiedTime := omit,//M - labels := omit,//O - expirationTime := omit,//M - announceTo := omit,//O - announcedAttribute := omit,//M - privileges := omit,//M - selfPrivileges := omit,//M - choice := {childResource_list := ?}//O - } + template ResourceRefList mw_contentAcp_rc6 := {resourceRef_list := ? };//O template AccessControlPolicy_optional mw_contentAcp_rc7 modifies mw_contentAcpBase := { @@ -4146,32 +4132,7 @@ module OneM2M_Templates { choice := {childResource_list := ?} //O } - template Group_optional mw_contentGroup_rc6 modifies mw_contentGroupBase := { - resourceName := omit,//M - resourceType := omit,//M - resourceID := omit,//M - parentID := omit,//M - creationTime := omit,//M - lastModifiedTime := omit,//M - labels := omit,//O - accessControlPolicyIDs := omit,//O - expirationTime := omit,//M - dynamicAuthorizationConsultationIDs := omit,//O - announceTo := omit,//O - announcedAttribute := omit,//M - creator := omit,//O - memberType := omit,//M - currentNrOfMembers := omit,//M - maxNrOfMembers := omit,//M - memberIDs := omit,//M - membersAccessControlPolicyIDs := omit,//O - memberTypeValidated := omit,//M - consistencyStrategy := omit,//O - groupName := omit,//O - semanticSupportIndicator := omit,//O - notifyAggregation := omit,//O - choice := {childResource_list := ?}//O - } + template ResourceRefList mw_contentGroup_rc6 := {resourceRef_list := ? };//O template Group_optional mw_contentGroup_rc7 modifies mw_contentGroupBase := { @@ -4226,7 +4187,7 @@ module OneM2M_Templates { expirationTime := *//M }; - template (value) PollingChannel_optional m_contentPollingChannel_allOmit := { + template PollingChannel_optional mw_contentPollingChannel_allOmit := { resourceName := omit,//M resourceType := omit,//M resourceID := omit,//M @@ -4253,17 +4214,15 @@ module OneM2M_Templates { template PollingChannel_optional mw_contentPollingChannel_rc5 modifies mw_contentPollingChannelBase := { } - template PollingChannel_optional mw_contentPollingChannel_rc6 modifies mw_contentPollingChannelBase := { - resourceName := *,//M - resourceType := *,//M - resourceID := *,//M - parentID := *,//M - creationTime := *,//M - lastModifiedTime := *,//M - labels := *,//O - expirationTime := *//M - } + template ResourceRefList mw_contentPollingChannel_rc6 := {resourceRef_list := ? };//O + //Temporarily pollingChannel resource with child resources will contain nothing as no child resource can be used + //template PollingChannel_optional mw_contentPollingChannel_rc8 modifies mw_contentPollingChannel_allOmit := { + // choice := {choice_list := ?} //O + //} + + template PollingChannel_optional mw_contentPollingChannel_rc8 := mw_contentPollingChannel_allOmit; + template (value) RemoteCSE_optional m_contentRemoteCSE_allOmit := { resourceName := omit,//M resourceType := omit,//M @@ -4424,20 +4383,7 @@ module OneM2M_Templates { choice := {childResource_list := ?} //O } - template Schedule_optional mw_contentSchedule_rc6 modifies mw_contentScheduleBase := { - resourceName := omit,//M - resourceType := omit,//M - resourceID := omit,//M - parentID := omit,//M - creationTime := omit,//M - lastModifiedTime := omit,//M - labels := omit,//O - expirationTime := omit,//M - announceTo := omit,//O - announcedAttribute := omit,//M - scheduleElement := omit,//M - choice := {childResource_list := ?}//O - } + template ResourceRefList mw_contentSchedule_rc6 := {resourceRef_list := ? };//O template Schedule_optional mw_contentSchedule_rc7 modifies mw_contentScheduleBase := { @@ -4593,34 +4539,7 @@ module OneM2M_Templates { choice := {childResource_list := ?} //O } - template Subscription_optional mw_contentSubscription_rc6 modifies mw_contentSubscriptionBase := { - resourceName := omit,//M - resourceType := omit,//M - resourceID := omit,//M - parentID := omit,//M - creationTime := omit,//M - lastModifiedTime := omit,//M - labels := omit,//O - accessControlPolicyIDs := omit,//O - expirationTime := omit,//M - dynamicAuthorizationConsultationIDs := omit, //O - creator := omit,//O - eventNotificationCriteria := omit,//O - expirationCounter := omit,//O - notificationURI := omit,//M - groupID := omit,//O - notificationForwardingURI := omit,//O - batchNotify := omit,//O - rateLimit := omit,//O - preSubscriptionNotify := omit,//O - pendingNotification := omit,//O - notificationStoragePriority := omit,//O - latestNotify := omit,//O - notificationContentType := omit,//M - notificationEventCat := omit,//O - subscriberURI := omit,//O - choice := {childResource_list := ?}//O - } + template ResourceRefList mw_contentSubscription_rc6 := {resourceRef_list := ? };//O template Subscription_optional mw_contentSubscription_rc7 modifies mw_contentSubscriptionBase := { @@ -4796,31 +4715,7 @@ module OneM2M_Templates { choice := {childResource_list := ?} //O } - template Container_optional mw_contentContainer_rc6 modifies mw_contentContainerBase := { - resourceName := omit,//M - resourceType := omit,//M - resourceID := omit,//M - parentID := omit,//M - creationTime := omit,//M - lastModifiedTime := omit,//M - labels := omit,//O - accessControlPolicyIDs := omit,//O - expirationTime := omit,//M - dynamicAuthorizationConsultationIDs := omit, //O - announceTo := omit,//O - announcedAttribute := omit,//M - stateTag := omit,//M - creator := omit,//M - maxNrOfInstances := omit,//O - maxByteSize := omit,//O - maxInstanceAge := omit,//O - currentNrOfInstances := omit,//M - currentByteSize := omit,//M - locationID := omit,//O - ontologyRef := omit,//O - disableRetrieval := omit, //O - choice := {childResource_list := ?}//O - } + template ResourceRefList mw_contentContainer_rc6 := {resourceRef_list := ? };//O template Container_optional mw_contentContainer_rc7 modifies mw_contentContainerBase := { @@ -5017,34 +4912,7 @@ module OneM2M_Templates { choice := {childResource_list := ?} //O } - template TimeSeries_optional mw_contentTimeSeries_rc6 modifies mw_contentTimeSeriesBase := { - resourceName := omit,//M - resourceType := omit,//M - resourceID := omit,//M - parentID := omit,//M - creationTime := omit,//M - lastModifiedTime := omit,//M - labels := omit,//O - accessControlPolicyIDs := omit,//O - expirationTime := omit,//M - dynamicAuthorizationConsultationIDs := omit,//O - announceTo := omit,//O - announcedAttribute := omit,//O - creator := omit,//M - maxNrOfInstances := omit,//O - maxByteSize := omit,//O - maxInstanceAge := omit,//O - currentNrOfInstances := omit,//M - currentByteSize := omit,//M - periodicInterval := omit,//O - missingDataDetect := omit,//O - missingDataMaxNr := omit,//O - missingDataList := omit,//O - missingDataCurrentNr := omit,//O - missingDataDetectTimer := omit,//O - ontologyRef := omit,//O - choice := {childResource_list := ?}//O - } + template ResourceRefList mw_contentTimeSeries_rc6 := {resourceRef_list := ? };//O template TimeSeries_optional mw_contentTimeSeries_rc8 modifies mw_contentTimeSeries_allOmit := { choice := {choice_list := ?} //O @@ -5538,7 +5406,7 @@ module OneM2M_Templates { requestPrimitive := { requestIdentifier := testcasename() & "-m_utCreatePollingChannel", resourceType := int15, - primitiveContent := {pollingChannel := m_contentPollingChannel_allOmit} + primitiveContent := {pollingChannel := mw_contentPollingChannel_allOmit} } }