diff --git a/LibOneM2M/OneM2M_Functions.ttcn b/LibOneM2M/OneM2M_Functions.ttcn index a83b843ea53036c9c682a396aece8ac2f7d980de..625a60348657910cc5bbcd22f1b082751dad238e 100644 --- a/LibOneM2M/OneM2M_Functions.ttcn +++ b/LibOneM2M/OneM2M_Functions.ttcn @@ -1873,45 +1873,36 @@ module OneM2M_Functions { //Preparation of expected Notification verification //TODO To add checks for creator and subscription reference - //v_notificationRequest.creator := p_creator; TODO To check what address format is to be expected - //Some participants use SP relative UNSTRUCTURED - //v_notificationRequest.subscriptionReference := "I Don't know which URI is expected"; // TODO mandatory parameter + //v_notificationRequest.creator := p_creator;(which format?) + //v_notificationRequest.subscriptionReference := "I Don't know which URI is expected"; - //Preparation of Notification response to be sent - v_responsePrimitive := valueof(m_responseNotification(p_responseStatusCode, omit)); - tc_ac.start; alt { [] mcaPortIn.receive(mw_request(mw_notifyNotification(v_notificationRequest))) -> value vc_request { tc_ac.stop; - setverdict(pass, __SCOPE__ & ":INFO: Notification received"); + setverdict(pass, __SCOPE__ & ":INFO: Subscription Verification Notification received"); } [] mcaPortIn.receive(mw_request(mw_notifyNotification(mw_contentNotification(?)))) -> value vc_request { tc_ac.stop; - setverdict(fail, __SCOPE__ & ":ERROR: Notification received but verificationRequest isn't set to TRUE"); - } - [] mcaPortIn.receive{ - tc_ac.stop; - setverdict(fail, __SCOPE__ & ":ERROR: unexpected message received"); - stop; + setverdict(inconc, __SCOPE__ & ":ERROR: Notification received but verificationRequest isn't set to TRUE"); } [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ":ERROR: No notification received"); + setverdict(inconc, __SCOPE__ & ":ERROR: No subscriptionVerification notification received"); stop; } } - - v_responsePrimitive.requestIdentifier := vc_request.primitive.requestPrimitive.requestIdentifier; - if(getverdict == pass) { - f_send(e_mca_in_port, m_httpResponse(v_responsePrimitive)); - } else { + + //Sending response to the notification received + //Preparation of Notification response to be sent + v_responsePrimitive := valueof(m_responseNotification(p_responseStatusCode, omit)); + v_responsePrimitive.requestIdentifier := vc_request.primitive.requestPrimitive.requestIdentifier; + + if(getverdict != pass) { v_responsePrimitive.responseStatusCode := int4000; - f_send(e_mca_in_port, m_httpResponse(v_responsePrimitive)); } - - //mcaPort.send(m_response(v_responsePrimitive)); // TODO have to be deleted - - } //end f_subscriptionVerificationHandler + f_send(e_mca_in_port, m_response(v_responsePrimitive)); + + } //end f_cse_notifyProcedure_subscriptionVerificationHandler /** * @desc Default handling message exchange for the notification procedure @@ -1975,10 +1966,6 @@ module OneM2M_Functions { v_responsePrimitive.requestIdentifier := vc_request.primitive.requestPrimitive.requestIdentifier; f_send(e_mca_in_port, m_response(v_responsePrimitive)); } - [] mcaPortIn.receive{ - tc_ac.stop; - setverdict(fail, __SCOPE__ & ":ERROR: unexpected message received"); - } [] tc_ac.timeout { setverdict(fail, __SCOPE__ & ":ERROR: No notification received"); } @@ -5129,7 +5116,7 @@ module OneM2M_Functions { var verdicttype v_verdict := none; - tc_done.start(15.0); + tc_done.start; alt { [] p_component.done -> value v_verdict { tc_done.stop; @@ -5158,7 +5145,7 @@ module OneM2M_Functions { var verdicttype v_verdict := none; - tc_done.start(15.0); + tc_done.start; alt { [] p_component.done -> value v_verdict { tc_done.stop;