New parameter added in MsgIn (nullFields) to fix #20

Signed-off-by: Miguel Angel Reina Ortega's avatarreinaortega <miguelangel.reinaortega@etsi.org>
parent fef9f9e5
......@@ -2199,7 +2199,12 @@ module OneM2M_Functions {
v_response.from_ := PX_CSE1_ID;
v_response.to_ := v_request.primitive.requestPrimitive.from_;
v_response.primitiveContent := vc_localResourcesList[v_localResourceIndex].resource;
mccPortIn.send(m_response(v_response));
if(ischosen(vc_localResourcesList[v_localResourceIndex].resource.cSEBase)) {
mccPortIn.send(m_response(v_response, {{"parentID", omit}}));
} else {
mccPortIn.send(m_response(v_response));
}
}
tc_ac.start(10.0);
repeat;
......
......@@ -76,16 +76,18 @@ module OneM2M_Templates {
forcedFields := p_forcedFields
};
template MsgIn mw_request(in template (present) RequestPrimitive p_requestPrimitive) := {
primitive := { requestPrimitive := p_requestPrimitive}
template MsgIn mw_request(in template (present) RequestPrimitive p_requestPrimitive, template AttributeList_1 p_nullFields := *) := {
primitive := { requestPrimitive := p_requestPrimitive},
nullFields := p_nullFields
};
/**
* @desc Base template for response receiving operations
* @param p_responsePrimitive
*/
template MsgIn mw_response(in template (present) ResponsePrimitive p_responsePrimitive := ?) := {
primitive := { responsePrimitive := p_responsePrimitive}
template MsgIn mw_response(in template (present) ResponsePrimitive p_responsePrimitive := ?, template AttributeList_1 p_nullFields := *) := {
primitive := { responsePrimitive := p_responsePrimitive},
nullFields := p_nullFields
};
}//end of group primitives
......@@ -3409,7 +3411,7 @@ module OneM2M_Templates {
resourceName := ?,//M
resourceType := ?,//M
resourceID := ?,//M
parentID := ?,//M
parentID := omit,//M
creationTime := ?,//M
lastModifiedTime := ?,//M
labels := *,//O
......
......@@ -4109,7 +4109,8 @@ module OneM2M_Types {
union {
RequestPrimitive requestPrimitive,
ResponsePrimitive responsePrimitive
} primitive
} primitive,
AttributeList_1 nullFields optional
}
with {
encode ""
......
......@@ -1811,7 +1811,7 @@ module OneM2M_Testcases_CSE_Release_1 {
tc_ac.start;
alt {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int2000, v_contentResponse))) -> value v_response {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int2000, v_contentResponse), {"parentID"})) -> value v_response {
tc_ac.stop;
setverdict(pass, __SCOPE__ & ": Response OK for retrieving");
}
......
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