Commit 87f61485 authored by Miguel Angel Reina Ortega's avatar Miguel Angel Reina Ortega
Browse files

Small improvement of f_cse_notifyProcedure_subscriptionVerificationHandler +...


Small improvement of f_cse_notifyProcedure_subscriptionVerificationHandler + using default timer values for tc_done
Signed-off-by: Miguel Angel Reina Ortega's avatarreinaortega <miguelangel.reinaortega@etsi.org>
parent 555314ef
...@@ -1873,45 +1873,36 @@ module OneM2M_Functions { ...@@ -1873,45 +1873,36 @@ module OneM2M_Functions {
//Preparation of expected Notification verification //Preparation of expected Notification verification
//TODO To add checks for creator and subscription reference //TODO To add checks for creator and subscription reference
//v_notificationRequest.creator := p_creator; TODO To check what address format is to be expected //v_notificationRequest.creator := p_creator;(which format?)
//Some participants use SP relative UNSTRUCTURED //v_notificationRequest.subscriptionReference := "I Don't know which URI is expected";
//v_notificationRequest.subscriptionReference := "I Don't know which URI is expected"; // TODO mandatory parameter
//Preparation of Notification response to be sent
v_responsePrimitive := valueof(m_responseNotification(p_responseStatusCode, omit));
tc_ac.start; tc_ac.start;
alt { alt {
[] mcaPortIn.receive(mw_request(mw_notifyNotification(v_notificationRequest))) -> value vc_request { [] mcaPortIn.receive(mw_request(mw_notifyNotification(v_notificationRequest))) -> value vc_request {
tc_ac.stop; 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 { [] mcaPortIn.receive(mw_request(mw_notifyNotification(mw_contentNotification(?)))) -> value vc_request {
tc_ac.stop; tc_ac.stop;
setverdict(fail, __SCOPE__ & ":ERROR: Notification received but verificationRequest isn't set to TRUE"); setverdict(inconc, __SCOPE__ & ":ERROR: Notification received but verificationRequest isn't set to TRUE");
}
[] mcaPortIn.receive{
tc_ac.stop;
setverdict(fail, __SCOPE__ & ":ERROR: unexpected message received");
stop;
} }
[] tc_ac.timeout { [] tc_ac.timeout {
setverdict(fail, __SCOPE__ & ":ERROR: No notification received"); setverdict(inconc, __SCOPE__ & ":ERROR: No subscriptionVerification notification received");
stop; stop;
} }
} }
v_responsePrimitive.requestIdentifier := vc_request.primitive.requestPrimitive.requestIdentifier; //Sending response to the notification received
if(getverdict == pass) { //Preparation of Notification response to be sent
f_send(e_mca_in_port, m_httpResponse(v_responsePrimitive)); v_responsePrimitive := valueof(m_responseNotification(p_responseStatusCode, omit));
} else { v_responsePrimitive.requestIdentifier := vc_request.primitive.requestPrimitive.requestIdentifier;
if(getverdict != pass) {
v_responsePrimitive.responseStatusCode := int4000; v_responsePrimitive.responseStatusCode := int4000;
f_send(e_mca_in_port, m_httpResponse(v_responsePrimitive));
} }
f_send(e_mca_in_port, m_response(v_responsePrimitive));
//mcaPort.send(m_response(v_responsePrimitive)); // TODO have to be deleted
} //end f_cse_notifyProcedure_subscriptionVerificationHandler
} //end f_subscriptionVerificationHandler
/** /**
* @desc Default handling message exchange for the notification procedure * @desc Default handling message exchange for the notification procedure
...@@ -1975,10 +1966,6 @@ module OneM2M_Functions { ...@@ -1975,10 +1966,6 @@ module OneM2M_Functions {
v_responsePrimitive.requestIdentifier := vc_request.primitive.requestPrimitive.requestIdentifier; v_responsePrimitive.requestIdentifier := vc_request.primitive.requestPrimitive.requestIdentifier;
f_send(e_mca_in_port, m_response(v_responsePrimitive)); 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 { [] tc_ac.timeout {
setverdict(fail, __SCOPE__ & ":ERROR: No notification received"); setverdict(fail, __SCOPE__ & ":ERROR: No notification received");
} }
...@@ -5129,7 +5116,7 @@ module OneM2M_Functions { ...@@ -5129,7 +5116,7 @@ module OneM2M_Functions {
var verdicttype v_verdict := none; var verdicttype v_verdict := none;
tc_done.start(15.0); tc_done.start;
alt { alt {
[] p_component.done -> value v_verdict { [] p_component.done -> value v_verdict {
tc_done.stop; tc_done.stop;
...@@ -5158,7 +5145,7 @@ module OneM2M_Functions { ...@@ -5158,7 +5145,7 @@ module OneM2M_Functions {
var verdicttype v_verdict := none; var verdicttype v_verdict := none;
tc_done.start(15.0); tc_done.start;
alt { alt {
[] p_component.done -> value v_verdict { [] p_component.done -> value v_verdict {
tc_done.stop; tc_done.stop;
......
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