diff --git a/OneM2M_Functions.ttcn b/OneM2M_Functions.ttcn index c4c1524b1c98bb0bae405690e0a7aefa179d4a93..2048df8c49bfb21d71958aa111ed4d7850e76b2e 100644 --- a/OneM2M_Functions.ttcn +++ b/OneM2M_Functions.ttcn @@ -33,7 +33,6 @@ module OneM2M_Functions { // Map map(self:mcaPort, system:mcaPort); - map(self:mccPort, system:mccPort); map(self:acPort, system:acPort); activate(a_default()); @@ -42,6 +41,22 @@ module OneM2M_Functions { //Initialze the IUT } // end f_cf01Up + + function f_cf02Up() runs on M2M { + + // Variables + + // Map + map(self:mcaPort, system:mcaPort); + map(self:mccPort, system:mccPort); + map(self:acPort, system:acPort); + activate(a_default()); + + // Connect + + //Initialze the IUT + + } // end f_cf02Up }//end group configFunctions @@ -113,37 +128,9 @@ module OneM2M_Functions { var M2MResponsePrimitive v_response; var integer v_cseBaseAuxIndex := -1; - var integer v_acpAuxIndex := -1; - var ServiceSubscribedAppRule_optional v_serviceSubscribedAppRule; + var RequestPrimitive v_request; - v_serviceSubscribedAppRule.applicableCredIDs := {"None"}; - v_serviceSubscribedAppRule.allowedApp_IDs := {PX_APP_ID}; - v_serviceSubscribedAppRule.allowedAEs := valueof(p_allowedAEs); - - mcaPort.send(m_request(m_createServiceSubscribedAppRule(v_serviceSubscribedAppRule))); - - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(int2001)) -> value v_response{ - tc_ac.stop; - v_cseBaseAuxIndex := f_setResource(v_response.responsePrimitive_.primitiveContent); - vc_resourcesIndexToBeDeleted := vc_resourcesIndexToBeDeleted & {v_cseBaseAuxIndex}; - } - [] mcaPort.receive(mw_responseKO) { - tc_ac.stop; - setverdict(inconc, "Preamble: Error while registering application"); - stop; - } - [] mcaPort.receive { - tc_ac.stop; - setverdict(inconc, "Preamble: Unexpected message received"); - stop; - } - [] tc_ac.timeout { - setverdict(inconc, "Preamble: No answer while registering resource"); - stop; - } - } + v_cseBaseAuxIndex := f_createResource(int19, m_createServiceSubscribedAppRule({"None"}, {PX_APP_ID}, valueof(p_allowedAEs))); return v_cseBaseAuxIndex; @@ -198,6 +185,13 @@ module OneM2M_Functions { function f_postamble_default() runs on M2M { + unmap(self:mcaPort, system:mcaPort); + unmap(self:acPort, system:acPort); + //stop; + } + + function f_postamble_CF02() runs on M2M { + unmap(self:mcaPort, system:mcaPort); unmap(self:mccPort, system:mccPort); unmap(self:acPort, system:acPort); diff --git a/OneM2M_Templates.ttcn b/OneM2M_Templates.ttcn index 606c0698a7cb2624dea6876f14b542d5ef5c2042..fd79907c15390c08ea4b8174d56a3cfce623bd17 100644 --- a/OneM2M_Templates.ttcn +++ b/OneM2M_Templates.ttcn @@ -787,14 +787,14 @@ module OneM2M_Templates { }; //Added by @Naum - template (value) RequestPrimitive m_createServiceSubscribedAppRule (in ServiceSubscribedAppRule_optional p_serviceSubscribedAppRule) := { + template (value) RequestPrimitive m_createServiceSubscribedAppRule (in ListOfM2MID p_applicableCredIDs, in ListOfM2MID p_allowedApp_IDs, in ListOfM2MID p_allowedAEs) := { operation := int1, to_ := "NotInitialized", from_ := PX_AE_ID_STEM, requestIdentifier := "m_createCSE" & f_rnd(1, 1000000), resourceType := int1, primitiveContent := { - any_1 := {{ServiceSubscribedAppRule_optional := m_contentCreateServiceSubscribedAppRule (p_serviceSubscribedAppRule)}} + any_1 := {{ServiceSubscribedAppRule_optional := m_contentCreateServiceSubscribedAppRule (p_applicableCredIDs, p_allowedApp_IDs, p_allowedAEs)}} }, role := omit, originatingTimestamp := omit, @@ -1071,7 +1071,7 @@ module OneM2M_Templates { choice := omit//NP }; - template (value) ServiceSubscribedAppRule_optional m_contentCreateServiceSubscribedAppRule (in template (value) ServiceSubscribedAppRule_optional serviceSubscribedAppRule := omit) := { + template (value) ServiceSubscribedAppRule_optional m_contentCreateServiceSubscribedAppRule (in ListOfM2MID p_applicableCredIDs, in ListOfM2MID p_allowedApp_IDs, in ListOfM2MID p_allowedAEs) := { resourceName := omit, resourceType := omit, resourceID := omit, @@ -1081,9 +1081,9 @@ module OneM2M_Templates { labels := omit, accessControlPolicyIDs := omit, expirationTime := omit, - applicableCredIDs := serviceSubscribedAppRule.applicableCredIDs, - allowedApp_IDs := serviceSubscribedAppRule.allowedApp_IDs, - allowedAEs := serviceSubscribedAppRule.allowedAEs, + applicableCredIDs := p_applicableCredIDs, + allowedApp_IDs := p_allowedApp_IDs, + allowedAEs := p_allowedAEs, choice := omit } diff --git a/OneM2M_Testcases.ttcn b/OneM2M_Testcases.ttcn index de79f3aa6bceb9fce11cf1fc477347e9dc8c6f1d..bdd01f028d61bf87809bcc64094183ac65ac90b7 100644 --- a/OneM2M_Testcases.ttcn +++ b/OneM2M_Testcases.ttcn @@ -118,7 +118,7 @@ module OneM2M_Testcases { // Test component configuration f_cf01Up(); - + //Preambule v_cseBaseIndex := f_preamble_prepareCSE({"C-AE-ID-STEM"});//c_CRUDNDi); @@ -274,7 +274,7 @@ module OneM2M_Testcases { var ResourceType v_resourceType := int2; // Test component configuration - f_cf01Up(); + f_cf02Up(); //Preambule v_cseBaseIndex := f_preamble_prepareCSE({"S"});//c_CRUDNDi); diff --git a/OneM2M_Types.ttcn b/OneM2M_Types.ttcn index 5520e3c040974fd743a024a07a527f787185b789..32169646c4782f81697e4d206f9f1cf0f389a252 100644 --- a/OneM2M_Types.ttcn +++ b/OneM2M_Types.ttcn @@ -4558,5 +4558,5 @@ with { encode "XML"; variant "namespace as 'http://www.onem2m.org/xml/protocols' prefix 'm2m'"; variant "controlNamespace 'http://www.w3.org/2001/XMLSchema-instance' prefix 'xsi'"; - extension "anytype charstring, AnyURI, AttributeList, AE, AccessControlPolicy, AccessControlPolicy_optional, ACP_update_invalid, AE_optional, AE_update_invalid,AEAnnc_optional, Container_optional, CSEBase_optional, Container_update_invalid, ContentInstance_optional, ContentInstance_update_invalid, Group_optional, Group_update_invalid, Schedule_optional, Schedule_update_invalid, Subscription_optional, Subscription_update_invalid, PollingChannel_optional, PollingChannel_update_invalid" + extension "anytype ServiceSubscribedAppRule_optional, charstring, AnyURI, AttributeList, AE, AccessControlPolicy, AccessControlPolicy_optional, ACP_update_invalid, AE_optional, AE_update_invalid,AEAnnc_optional, Container_optional, CSEBase_optional, Container_update_invalid, ContentInstance_optional, ContentInstance_update_invalid, Group_optional, Group_update_invalid, Schedule_optional, Schedule_update_invalid, Subscription_optional, Subscription_update_invalid, PollingChannel_optional, PollingChannel_update_invalid" }