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

Clean up of permutationFunctions file


Signed-off-by: Miguel Angel Reina Ortega's avatarreinaortega <miguelangel.reinaortega@etsi.org>
parent a8bc93a8
......@@ -6953,17 +6953,11 @@ module OneM2M_PermutationFunctions {
}//end group Delete
}//end group Data_Management_and_Repository
group Location {
}//end group Location
group Group_Managment {
group Create {
} // end group Create
group Retrieve {
......@@ -8372,1747 +8366,6 @@ module OneM2M_PermutationFunctions {
}//end group Security
group Annoucement {
group Basic {
function f_CSE_ANNC_001(ResourceType p_resourceType, template RequestPrimitive p_createRequestAnnc, in template RequestPrimitive p_requestCreatePrimitive := omit, in template RequestPrimitive p_requestUpdatePrimitive := omit) runs on AeSimu system CseSystem {
// Local variables
var MsgIn v_response;
var RequestPrimitive v_request;
var integer v_parentIndex := -1;
var integer v_aeIndex := -1;
var integer v_resourceIndex;
var ResponsePrimitive v_responsePrimitive;
var integer v_AEAnncResourceIndex;
var template RequestPrimitive v_create := m_createAe(PX_TS_AE1.appId, omit, omit);
v_create.primitiveContent.aE.announceTo := {PX_TS_CSE1.cseId};
// Test control
// Test component configuration
f_cf02Up();
// Test adapter configuration
//Register the CSE
vc_cse1.start(f_cse_registerRemoteCse(m_createRemoteCSE_poa(-, -, -, -, {f_getCompletePoA()})));
vc_cse1.done;
f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1);
//Preamble
vc_cse1.start(f_cse_announcementProcedure_createHandler(mw_createAEAnnc(-, -, -)));
v_aeIndex := f_cse_createResource(int2,v_create);
vc_cse1.done;
f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1);
// Test Body
if (ispresent (p_requestUpdatePrimitive)) {
v_resourceIndex := f_cse_createResource(p_resourceType,p_requestCreatePrimitive);
v_request := f_getUpdateRequestPrimitive(p_resourceType, v_resourceIndex, p_requestUpdatePrimitive);
v_responsePrimitive.responseStatusCode := int2004;
} else {
v_request := f_getCreateRequestPrimitive(p_resourceType, p_requestCreatePrimitive, v_aeIndex);
v_responsePrimitive.responseStatusCode := int2001;
}
//Retrieve the parent resource index
v_AEAnncResourceIndex := f_getLatestLocalResourceIndex(vc_cse1);
vc_cse1.start(f_cse_announcementProcedure_createHandler(p_createRequestAnnc, -, v_AEAnncResourceIndex));
f_send(e_mca_port, m_request(v_request));
tc_ac.start;
alt {
[] mcaPort.receive(mw_response(mw_responsePrimitive(v_responsePrimitive.responseStatusCode))) -> value v_response {
tc_ac.stop;
setverdict(pass, __SCOPE__ & ": Operation for resource " & int2str(enum2int(p_resourceType)) & " performed successfully");
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value vc_response {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Wrong response status code");
}
[] tc_ac.timeout {
setverdict(fail, __SCOPE__ & ": No answer while updating resource type " & int2str(enum2int(p_resourceType)));
}
}
f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1);
// Postamble
f_cse_postamble_deleteResources();
// Tear down
f_cf02Down();
}//end f_CSE_ANNC_001
}//end group Basic
group Create {
function f_CSE_ANNC_CRE_001(ResourceType p_resourceType,template RequestPrimitive p_createRequestAnnc, in template RequestPrimitive p_requestCreatePrimitive := omit) runs on AeSimu system CseSystem {
//Local variables
var MsgIn v_response;
var integer v_aeIndex := -1;
var integer v_resourceIndex;
var ResponsePrimitive v_responsePrimitive;
var template RequestPrimitive v_create := m_createAe(PX_TS_AE1.appId, omit, omit);
v_create.primitiveContent.aE.announceTo := {PX_TS_CSE1.cseId};
//Test control
//Test component configuration
f_cf02Up();
//Register the CSE
vc_cse1.start(f_cse_registerRemoteCse(m_createRemoteCSE_poa(-, -, -, -, {f_getCompletePoA()})));
f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1);
//Preamble
vc_cse1.start(f_cse_announcementProcedure_createHandler(mw_createAEAnnc(-, -, -)));
v_aeIndex := f_cse_createResource(int2,v_create);
f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1);
vc_cse1.start(f_cse_announcementProcedure_createHandler(p_createRequestAnnc));
f_cse_createResource(p_resourceType, p_requestCreatePrimitive, v_aeIndex);
vc_cse1.done;
//Postamble
f_cse_postamble_deleteResources();
// Tear down
f_cf02Down();
} //end f_CSE_ANNC_CRE_001
function f_CSE_ANNC_CRE_002(ResourceType p_resourceType, template RequestPrimitive p_createRequest, in template RequestPrimitive p_updateRequest := omit, in template RequestPrimitive p_createRequestAnnc) runs on CseSimu system CseSystem {
// Local variables
var MsgIn v_response;
var MsgIn v_request;
var PrimitiveContent v_announcedResource;
var integer v_aeIndex := -1;
var integer v_resourceIndex;
var integer v_localResourceIndex := -1;
var integer v_remoteCSEAnncIndex := -1;
var ResponsePrimitive v_responsePrimitive;
// Test control
// Test component configuration
f_cf02UpCseSimuMaster();
// Test adapter configuration
//Register the CSE
f_cse_registrationRemoteCse(mw_createRemoteCSE);
//Preamble
vc_ae1.start(f_cse_preamble_registerAe());
f_cseSimu_checkComponentDoneAndGetVerdict(vc_ae1);
v_aeIndex := f_getLatestResourceIndex(vc_ae1);
vc_ae1.start(f_cse_createResource(p_resourceType, p_createRequest, v_aeIndex));
f_cseSimu_checkComponentDoneAndGetVerdict(vc_ae1);
v_resourceIndex := f_getLatestResourceIndex(vc_ae1);
// Test Body
vc_ae1.start(f_cse_sendUpdateRequestPrimitive(p_resourceType, p_updateRequest, v_resourceIndex));
vc_ae1.done;
tc_ac.start;
alt {
[] mccPortIn.receive(mw_request(mw_updateRemoteCSE(PX_CSE_ID))) -> value v_request {
tc_ac.stop;
setverdict(pass, __SCOPE__ & ":INFO: RemoteCSE UPDATE received");
v_localResourceIndex := f_getLocalResourceIndex(v_request.primitive.requestPrimitive.to_);
if(v_localResourceIndex == -1)
{
log(__SCOPE__&": ERROR: Resource Index not valid, target not found");
v_responsePrimitive := valueof(m_responsePrimitive(int4004,v_request.primitive.requestPrimitive.requestIdentifier));
} else {
v_responsePrimitive := valueof(m_responsePrimitive(int2004,v_request.primitive.requestPrimitive.requestIdentifier));
f_updateLocalResource(v_localResourceIndex, v_request.primitive.requestPrimitive.primitiveContent);
v_responsePrimitive.primitiveContent := vc_localResourcesList[v_localResourceIndex].resource;
}
v_responsePrimitive.from_ := PX_TS_CSE1.cseId;
v_responsePrimitive.to_ := v_request.primitive.requestPrimitive.from_;
f_send(e_mcc_in_port, m_response(valueof(v_responsePrimitive)));
}
[] tc_ac.timeout {
setverdict(fail, __SCOPE__ & ":ERROR: No announcement received");
}
}
f_checkCseSimuStatus();
tc_ac.start;
alt {
[] mccPortIn.receive(mw_request(p_createRequestAnnc)) -> value v_request {
tc_ac.stop;
setverdict(pass, __SCOPE__ & ":INFO: Resource Announced CREATE received");
//Simulate that resourceAnnc is created on CSE2
v_announcedResource:= f_generateLocalResource(v_request.primitive.requestPrimitive.primitiveContent, -1,v_request.primitive.requestPrimitive.resourceType);
//Set parentID correctly to remoteCSEAnnc-ID
v_announcedResource := f_setParentID(v_announcedResource, f_resourceIdCleaner(vc_localResourcesList[v_localResourceIndex].resource.remoteCSE.announceTo[0]));
v_responsePrimitive := valueof(m_responsePrimitive(int2001,v_request.primitive.requestPrimitive.requestIdentifier));
v_responsePrimitive.primitiveContent := v_announcedResource;
f_send(e_mcc_in_port, m_response(v_responsePrimitive));
}
[] tc_ac.timeout {
setverdict(fail, __SCOPE__ & ":ERROR: No announcement received");
}
}
// Postamble
f_cse_postamble_deleteResourcesCSE();
// Tear down
f_cf02DownCseSimuMaster();
}//end f_CSE_ANNC_CRE_002
function f_CSE_ANNC_CRE_003(ResourceType p_resourceType, template RequestPrimitive p_createRequestAnnc, in template RequestPrimitive p_requestCreatePrimitive := omit, in template RequestPrimitive p_requestUpdatePrimitive := omit) runs on AeSimu system CseSystem {
// Local variables
var MsgIn v_response;
var RequestPrimitive v_request;
var integer v_parentIndex := -1;
var integer v_aeIndex := -1;
var integer v_resourceIndex;
var integer v_containerAnncResourceIndex;
var template RequestPrimitive v_createContainer := m_createContainerBase;
v_createContainer.primitiveContent.container.announceTo := {PX_TS_CSE1.cseId};
// Test control
// Test component configuration
f_cf02Up();
// Test adapter configuration
//Register the CSE
vc_cse1.start(f_cse_registerRemoteCse(m_createRemoteCSE_poa(-, -, -, -, {f_getCompletePoA()})));
f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1);
//Preamble
v_aeIndex := f_cse_preamble_registerAe();
vc_cse1.start(f_cse_announcementProcedure_createHandler(mw_createContainerAnnc(-, -)));
v_resourceIndex := f_cse_createResource(int3,v_createContainer, v_aeIndex);
f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1);
// Test Body
//Retrieve the parent resource index where contentInstanceAnnc must be created
v_containerAnncResourceIndex := f_getLatestLocalResourceIndex(vc_cse1);
v_request := f_getCreateRequestPrimitive(p_resourceType, p_requestCreatePrimitive, v_resourceIndex);
vc_cse1.start(f_cse_announcementProcedure_createHandler(p_createRequestAnnc,int4000, v_containerAnncResourceIndex));
f_send(e_mca_port, m_request(v_request));
tc_ac.start;
alt {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) -> value v_response {
tc_ac.stop;
setverdict(pass, __SCOPE__, ": Resource " & int2str(enum2int(p_resourceType)) & " created successfully");
if(ispresent(v_response.primitive.responsePrimitive.primitiveContent.contentInstance.announceTo)) {
if(lengthof(v_response.primitive.responsePrimitive.primitiveContent.contentInstance.announceTo) != 0) {
setverdict(fail, __SCOPE__, ": Resource " & int2str(enum2int(p_resourceType)) & " contains the attribute announceTo");
}
}
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value vc_response {
tc_ac.stop;
setverdict(fail, __SCOPE__, ": Wrong response status code");
}
[] tc_ac.timeout {
setverdict(fail, __SCOPE__, ": No answer while creating resource type " & int2str(enum2int(p_resourceType)));
}
}
vc_cse1.done;
// Postamble
f_cse_postamble_deleteResources();
// Tear down
f_cf02Down();
}//end f_CSE_ANNC_CRE_003
function f_CSE_ANNC_CRE_004_CseSimu(ResourceType p_resourceType, template RequestPrimitive p_createRequestAnnc, in template RequestPrimitive p_requestCreatePrimitive := omit) runs on CseSimu system CseSystem {
// Local variables
var MsgIn v_request;
var integer v_aeIndex := -1;
var integer v_resourceIndex;
var integer v_aEAnncIndex := -1;
var ResponsePrimitive v_responsePrimitive;
var template RequestPrimitive v_create := m_createAe(PX_TS_AE1.appId, omit, omit);
v_create.primitiveContent.aE.announceTo := {PX_TS_CSE1.cseId};
// Test control
// Test component configuration
f_cf02UpCseSimuMaster();
// Test adapter configuration
// Register the CSE
f_cse_registerRemoteCse(m_createRemoteCSE_poa(-, -, -, -, {f_getCompletePoA()}));
//Preamble
vc_ae1.start(f_cse_createResource(int2,v_create));
v_aEAnncIndex := f_cse_announcementProcedure_createHandler(mw_createAEAnnc(-, -, -));
f_cseSimu_checkComponentDoneAndGetVerdict(vc_ae1);
v_aeIndex := f_getLatestResourceIndex(vc_ae1);
// Test Body
vc_ae1.start(f_cse_createResource(p_resourceType,p_requestCreatePrimitive, v_aeIndex));
f_cse_announcementProcedure_createHandler(p_createRequestAnnc, -, v_aEAnncIndex);
vc_ae1.done;
// Postamble
f_cse_postamble_deleteResourcesCSE();
// Tear down
f_cf02DownCseSimuMaster();
}//end f_CSE_ANNC_CRE_004
function f_CSE_ANNC_CRE_005_CseSimu(ResourceType p_resourceType, template RequestPrimitive p_createRequestAnnc, in template RequestPrimitive p_requestCreatePrimitive := omit) runs on CseSimu system CseSystem {
// Local variables
var MsgIn v_request;
var integer v_parentIndex := -1;
var integer v_aeIndex := -1;
var integer v_resourceAnncIndex := -1;
var integer v_aEAnncIndex := -1;
var ResponsePrimitive v_responsePrimitive;
var PrimitiveContent v_announcedResource;
var template RequestPrimitive v_create := m_createAe(PX_TS_AE1.appId, omit, omit);
var template RequestPrimitive v_createContainer := m_createContainerBase;
// Test control
// Test component configuration
f_cf02UpCseSimuMaster();
// Test adapter configuration
// Register the CSE
vc_remoteCseIndex := f_cse_registrationRemoteCse(mw_createRemoteCSE);
f_checkCseSimuStatus();
//Preamble
vc_ae1.start(f_cse_createResource(int2,v_create));
f_cseSimu_checkComponentDoneAndGetVerdict(vc_ae1);
v_aeIndex := f_getLatestResourceIndex(vc_ae1);
v_createContainer.primitiveContent.container.announceTo := {"/CSE2_ID"};
v_createContainer.primitiveContent.container.resourceName := "TriggerAnnounceIUT";
vc_ae1.start(f_cse_createResource(int3,v_createContainer, v_aeIndex));
//IUT shall announce itself by updating announceTo attribute of its remoteCSE on its registrar (CSE1)
f_cse_updateResourceHandler(vc_localRemoteCseIndex, mw_updateRemoteCSE);
tc_ac.start;
alt {
[] mccPortIn.receive(mw_request(mw_createContainerAnnc(PX_CSE_ID, vc_localResourcesList[vc_localRemoteCseIndex].resource.remoteCSE.announceTo[0] ))) -> value v_request {
tc_ac.stop;
setverdict(pass, __SCOPE__ & ":INFO: Resource Announced CREATE received");
//Simulate that resourceAnnc is created on CSE2
v_announcedResource:= f_generateLocalResource(v_request.primitive.requestPrimitive.primitiveContent, -1,v_request.primitive.requestPrimitive.resourceType);
//Set parentID correctly to remoteCSEAnnc-ID
v_announcedResource := f_setParentID(v_announcedResource, f_resourceIdCleaner(vc_localResourcesList[vc_localRemoteCseIndex].resource.remoteCSE.announceTo[0]));
v_responsePrimitive := valueof(m_responsePrimitive(int2001,v_request.primitive.requestPrimitive.requestIdentifier));
v_responsePrimitive.primitiveContent := v_announcedResource;
f_send(e_mcc_in_port, m_response(v_responsePrimitive));
}
[] tc_ac.timeout {
setverdict(fail, __SCOPE__ & ":ERROR: No announcement received");
}
}
f_cseSimu_checkComponentDoneAndGetVerdict(vc_ae1);
// Test Body
vc_ae1.start(f_cse_createResource(p_resourceType,p_requestCreatePrimitive, v_aeIndex));
//IUT shall then create the announced resource on its remoteCSEAnnc as indicated in the announceTo attribute returned by its registrar (CSE1)
p_createRequestAnnc.to_ := vc_localResourcesList[vc_localRemoteCseIndex].resource.remoteCSE.announceTo[0];
tc_ac.start;
alt {
[] mccPortIn.receive(mw_request(p_createRequestAnnc)) -> value v_request {
tc_ac.stop;
setverdict(pass, __SCOPE__ & ":INFO: Resource Announced CREATE received");
//Simulate that resourceAnnc is created on CSE2
v_announcedResource:= f_generateLocalResource(v_request.primitive.requestPrimitive.primitiveContent, -1,v_request.primitive.requestPrimitive.resourceType);
//Set parentID correctly to remoteCSEAnnc-ID
v_announcedResource := f_setParentID(v_announcedResource, f_resourceIdCleaner(vc_localResourcesList[vc_localRemoteCseIndex].resource.remoteCSE.announceTo[0]));
v_responsePrimitive := valueof(m_responsePrimitive(int2001,v_request.primitive.requestPrimitive.requestIdentifier));
v_responsePrimitive.primitiveContent := v_announcedResource;
f_send(e_mcc_in_port, m_response(v_responsePrimitive));
}
[] tc_ac.timeout {
setverdict(fail, __SCOPE__ & ":ERROR: No announcement received");
}
}
vc_ae1.done;
// Postamble
f_cse_postamble_deleteResourcesCSE();
// Tear down
f_cf02DownCseSimuMaster();
}//end f_CSE_ANNC_CRE_005
function f_CSE_ANNC_CRE_006_CseSimu(ResourceType p_resourceType, template RequestPrimitive p_createRequestAnnc, in template RequestPrimitive p_requestCreatePrimitive := omit) runs on CseSimu system CseSystem {
// Local variables
var MsgIn v_request;
var integer v_parentIndex := -1;
var integer v_aeIndex := -1;
var integer v_resourceIndex;
var integer v_aEAnncIndex := -1;
var ResponsePrimitive v_responsePrimitive;
var template RequestPrimitive v_create := m_createAe(PX_TS_AE1.appId, omit, omit);
// Test control
// Test component configuration
f_cf02UpCseSimuMaster();
// Test adapter configuration
// Register the CSE
vc_remoteCseIndex := f_cse_registerRemoteCse(m_createRemoteCSE_poa(-, -, -, -, {f_getCompletePoA()}));
//Preamble
vc_ae1.start(f_cse_createResource(int2,v_create));
f_cseSimu_checkComponentDoneAndGetVerdict(vc_ae1);
v_aeIndex := f_getLatestResourceIndex(vc_ae1);
// Test Body
vc_ae1.start(f_cse_createResource(p_resourceType,p_requestCreatePrimitive, v_aeIndex));
f_cse_announcementProcedure_createHandler(p_createRequestAnnc, -, vc_localRemoteCseIndex);
vc_ae1.done;
// Postamble
f_cse_postamble_deleteResourcesCSE();
// Tear down
f_cf02DownCseSimuMaster();
}//end f_CSE_ANNC_CRE_006
function f_CSE_ANNC_CRE_007_CseSimu(ResourceType p_resourceType, template RequestPrimitive p_createRequestAnnc, in template RequestPrimitive p_requestCreatePrimitive := omit) runs on CseSimu system CseSystem {
// Local variables
var MsgIn v_request;
var integer v_parentIndex := -1;
var integer v_aeIndex := -1;
var integer v_resourceIndex;
var integer v_aEAnncIndex := -1;
var ResponsePrimitive v_responsePrimitive;
var PrimitiveContent v_announcedResource;
var template RequestPrimitive v_create := m_createAe(PX_TS_AE1.appId, omit, omit);
var template RequestPrimitive v_createContainer := m_createContainerBase;
// Test control
// Test component configuration
f_cf02UpCseSimuMaster();
// Test adapter configuration
// Register the CSE
vc_remoteCseIndex := f_cse_registrationRemoteCse(mw_createRemoteCSE);
f_checkCseSimuStatus();
//Preamble
vc_ae1.start(f_cse_createResource(int2,v_create));
f_cseSimu_checkComponentDoneAndGetVerdict(vc_ae1);
v_aeIndex := f_getLatestResourceIndex(vc_ae1);
v_createContainer.primitiveContent.container.announceTo := {"/CSE2_ID"};
v_createContainer.primitiveContent.container.resourceName := "TriggerAnnounceIUT";
vc_ae1.start(f_cse_createResource(int3,v_createContainer, v_aeIndex));
//IUT shall announce itself by updating announceTo attribute of its remoteCSE on its registrar (CSE1)
f_cse_updateResourceHandler(vc_localRemoteCseIndex, mw_updateRemoteCSE);
tc_ac.start;
alt {
[] mccPortIn.receive(mw_request(mw_createContainerAnnc(PX_CSE_ID, vc_localResourcesList[vc_localRemoteCseIndex].resource.remoteCSE.announceTo[0] ))) -> value v_request {
tc_ac.stop;
setverdict(pass, __SCOPE__ & ":INFO: Resource Announced CREATE received");
//Simulate that resourceAnnc is created on CSE2
v_announcedResource:= f_generateLocalResource(v_request.primitive.requestPrimitive.primitiveContent, -1,v_request.primitive.requestPrimitive.resourceType);
//Set parentID correctly to remoteCSEAnnc-ID
v_announcedResource := f_setParentID(v_announcedResource, f_resourceIdCleaner(vc_localResourcesList[vc_localRemoteCseIndex].resource.remoteCSE.announceTo[0]));
v_responsePrimitive := valueof(m_responsePrimitive(int2001,v_request.primitive.requestPrimitive.requestIdentifier));
v_responsePrimitive.primitiveContent := v_announcedResource;
f_send(e_mcc_in_port, m_response(v_responsePrimitive));
}
[] tc_ac.timeout {
setverdict(fail, __SCOPE__ & ":ERROR: No announcement received");
}
}
f_cseSimu_checkComponentDoneAndGetVerdict(vc_ae1);
// Test Body
vc_ae1.start(f_cse_createResource(p_resourceType,p_requestCreatePrimitive, v_aeIndex));
//IUT shall then create the announced resource on its remoteCSEAnnc as indicated in the announceTo attribute returned by its registrar (CSE1)
p_createRequestAnnc.to_ := vc_localResourcesList[vc_localRemoteCseIndex].resource.remoteCSE.announceTo[0];
tc_ac.start;
alt {
[] mccPortIn.receive(mw_request(p_createRequestAnnc)) -> value v_request {
tc_ac.stop;
setverdict(pass, __SCOPE__ & ":INFO: Resource Announced CREATE received");
//Simulate that resourceAnnc is created on CSE2
v_announcedResource:= f_generateLocalResource(v_request.primitive.requestPrimitive.primitiveContent, -1,v_request.primitive.requestPrimitive.resourceType);
//Set parentID correctly to remoteCSEAnnc-ID
v_announcedResource := f_setParentID(v_announcedResource, f_resourceIdCleaner(vc_localResourcesList[vc_localRemoteCseIndex].resource.remoteCSE.announceTo[0]));
v_responsePrimitive := valueof(m_responsePrimitive(int2001,v_request.primitive.requestPrimitive.requestIdentifier));
v_responsePrimitive.primitiveContent := v_announcedResource;
f_send(e_mcc_in_port, m_response(v_responsePrimitive));
}
[] tc_ac.timeout {
setverdict(fail, __SCOPE__ & ":ERROR: No announcement received");
}
}
vc_ae1.done;
// Postamble
f_cse_postamble_deleteResourcesCSE();
// Tear down
f_cf02DownCseSimuMaster();
}//end f_CSE_ANNC_CRE_007
function f_CSE_ANNC_CRE_008_CseSimu(ResourceType p_resourceType, template RequestPrimitive p_createRequestAnnc, in template RequestPrimitive p_requestCreatePrimitive := omit) runs on CseSimu system CseSystem {
// Local variables
var MsgIn v_request;
var integer v_aeIndex := -1;
var integer v_aEAnncIndex := -1;
var ResponsePrimitive v_responsePrimitive;
var template RequestPrimitive v_create := m_createAe(PX_TS_AE1.appId, omit, omit);
v_create.primitiveContent.aE.announceTo := {PX_TS_CSE1.cseId};
// Test control
// Test component configuration
f_cf02UpCseSimuMaster();
//Test adapter configuration
// Register the CSE
vc_remoteCseIndex := f_cse_registerRemoteCse(m_createRemoteCSE_poa(-, -, -, -, {f_getCompletePoA()}));
f_checkCseSimuStatus();
vc_ae1.start(f_cse_createResource(int2,v_create));
v_aEAnncIndex := f_cse_announcementProcedure_createHandler(mw_createAEAnnc(-, -, -));
f_cseSimu_checkComponentDoneAndGetVerdict(vc_ae1);
v_aeIndex := f_getLatestResourceIndex(vc_ae1);
// Test Body
vc_ae1.start(f_cse_createResource(p_resourceType,p_requestCreatePrimitive, v_aeIndex));
f_cse_announcementProcedure_createHandler(p_createRequestAnnc, -, v_aEAnncIndex);
vc_ae1.done;
// Postamble
f_cse_postamble_deleteResourcesCSE();
// Tear down
f_cf02DownCseSimuMaster();