Commit 51480bf1018359952c10ae0931963f14f4f52919

Authored by Miguel Angel Reina Ortega
2 parents 3ec56cab 78e134e6

Merge branch 'STF531-January' of https://git.onem2m.org/TST/ATS into STF531-January

Showing 1 changed file with 17 additions and 1 deletions
... ... @@ -1919,7 +1919,23 @@ module OneM2M_Functions {
1919 1919 * @desc Cse altstep for config 02 on CSE1 (AE1 as master)
1920 1920 */
1921 1921 altstep a_cse_cf02_cse1() runs on CseSimu {
1922   -
  1922 +
  1923 + var MsgIn v_request;
  1924 + var ResponsePrimitive v_response;
  1925 + var PrimitiveContent v_remoteResource; //localresource
  1926 + var integer v_localResourceIndex;
  1927 + var integer v_resourceIndex;
  1928 +
  1929 + [] mccPortIn.receive(mw_request(mw_create)) -> value v_request {
  1930 + v_remoteResource := f_cse_generateLocalResource(v_request.primitive.requestPrimitive.primitiveContent, f_getResourceIndex(v_request.primitive.requestPrimitive.to_), v_request.primitive.requestPrimitive.resourceType);
  1931 + v_localResourceIndex := f_setLocalResource(v_remoteResource, v_request.primitive.requestPrimitive.resourceType, f_getResourceIndex(v_request.primitive.requestPrimitive.to_));
  1932 +
  1933 + v_response := valueof(m_responsePrimitive(int2001,v_request.primitive.requestPrimitive.requestIdentifier));
  1934 + v_response.from_ := PX_CSE1_ID;
  1935 + v_response.to_ := v_request.primitive.requestPrimitive.from_;
  1936 + v_response.primitiveContent := vc_localResourcesList[v_localResourceIndex].resource;
  1937 + mccPortIn.send(m_response(v_response));
  1938 + }
1923 1939 [] mccPortIn.receive {
1924 1940 log(__SCOPE__&": WARNING: Unexpected message received");
1925 1941 repeat;
... ...