Skip to content
Snippets Groups Projects
Commit 2c861ae8 authored by Miguel Angel Reina Ortega's avatar Miguel Angel Reina Ortega
Browse files
parent 30f10302
No related branches found
No related tags found
No related merge requests found
......@@ -2211,12 +2211,20 @@ module OneM2M_Functions {
}
[] mcaPortIn.receive(mw_request(mw_notifyNotification(mw_contentNotification(?)))) -> value v_request {
//Send response
v_responsePrimitive := valueof(m_responseNotification(int2001, omit));
v_responsePrimitive := valueof(m_responseNotification(int2000, omit));
v_responsePrimitive.requestIdentifier := v_request.primitive.requestPrimitive.requestIdentifier;
mcaPortIn.send(m_response(v_responsePrimitive));
log(__SCOPE__&": WARNING: Unexpected Notification message received");
repeat;
}
[] mcaPortIn.receive(mw_request(mw_notifyNotification(mw_contentNotificationVerification))) -> value v_request {
//Send response
v_responsePrimitive := valueof(m_responseNotification(int2000, omit));
v_responsePrimitive.requestIdentifier := v_request.primitive.requestPrimitive.requestIdentifier;
mcaPortIn.send(m_response(v_responsePrimitive));
log(__SCOPE__&": WARNING: Unexpected Notification for Subscription Verification message received");
repeat;
}
}
/**
......@@ -2374,7 +2382,7 @@ module OneM2M_Functions {
* @return Internal resource index of AE or -1 in case of failure
* @verdict inconc if no AE registration request is received
*/
function f_ae_preamble_registerAe(template UtTriggerPrimitive p_utRequest := m_utCreateAe) runs on CseSimu return integer {
function f_ae_preamble_registerAe(template UtTriggerPrimitive p_utRequest := m_utCreateAe) runs on CseSimu return integer {
var MsgIn v_request;
var integer v_localResourceIndex, v_parentIndex;
......
......@@ -4718,10 +4718,11 @@ module OneM2M_PermutationFunctions {
//Local variables
var MsgIn v_response;
var RequestPrimitive v_request;
var ResponsePrimitive v_responsePrimitive;
var integer v_aeIndex := -1;
var integer v_resourceIndex := -1;
var integer v_ae2Index := -1;
var integer v_acpAuxIndex := -1;
var integer v_acpAuxIndex := -1;
// Test control
......@@ -4751,6 +4752,9 @@ module OneM2M_PermutationFunctions {
f_cse_preamble_subscriptionVerification(v_ae2Index, p_createRequestPrimitive, p_resourceType);
v_resourceIndex := f_cse_createResource(p_resourceType, p_createRequestPrimitive);//under the CSEBase resource
if(vc_ae2.running) {
vc_ae2.stop;
}
} else { //ResourceType = RemoteCSE
vc_cse1.start(f_cse_registerRemoteCse(p_createRequestPrimitive));
vc_cse1.done;
......@@ -4761,16 +4765,12 @@ module OneM2M_PermutationFunctions {
//Test Body
v_request := f_getUpdateRequestPrimitive(p_resourceType, v_resourceIndex, p_updateRequestPrimitive);
if(p_resourceType == int23) { //Subscription
if((p_resourceType == int23) and (ispresent(v_request.primitiveContent.subscription.notificationURI))) { //Subscription
v_request.primitiveContent.subscription.notificationURI := {f_getResourceAddress(v_aeIndex)};
}
mcaPort.send(m_request(v_request));
if(p_resourceType == int23) { //Subscription
f_cse_notifyProcedure_subscriptionVerificationHandler();
}
tc_ac.start;
alt {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int2004))) -> value vc_response {
......@@ -4785,6 +4785,15 @@ module OneM2M_PermutationFunctions {
tc_ac.stop;
setverdict(fail, __SCOPE__, ": Error while updating mandatory attribute");
}
[] mcaPortIn.receive(mw_request(mw_notifyNotification(mw_contentNotificationVerification))) -> value vc_request {
tc_ac.stop;
setverdict(pass, __SCOPE__ & ":INFO: Notification for Subscription verification received");
v_responsePrimitive := valueof(m_responseNotification(int2000, omit));
v_responsePrimitive.requestIdentifier := vc_request.primitive.requestPrimitive.requestIdentifier;
mcaPortIn.send(m_response(v_responsePrimitive));
tc_ac.start;
repeat;
}
[] tc_ac.timeout {
setverdict(fail, __SCOPE__, ": No answer while updating resource type " & int2str(enum2int(p_resourceType)));
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment