Commit 1633ac83 authored by Pramod Kulkarni's avatar Pramod Kulkarni Committed by Miguel Angel Reina Ortega
Browse files

Improvements for the CSE registration procedure:


- New function f_getResourceIndex, used in default a_cse_cf02_cse1
- Update of default to receive some optional messages (retrieve CSEBase, etc..) from MN

Improvements for handling Announcement procedure
- announcement handler updated
- values in template AEAnnc corrected
- new templates for announced resources
Signed-off-by: Miguel Angel Reina Ortega's avatarreinaortega <miguelangel.reinaortega@etsi.org>
parent 1c9895c1
...@@ -86,6 +86,9 @@ module OneM2M_Functions { ...@@ -86,6 +86,9 @@ module OneM2M_Functions {
// Map // Map
map(self:mcaPort, system:mcaPort); map(self:mcaPort, system:mcaPort);
map(self:acPort, system:acPort); map(self:acPort, system:acPort);
if(PX_UT_IMPLEMENTED) {
map(self:utPort, system:utPort);
}
activate(a_default()); activate(a_default());
activate(a_cse_cf02_ae1()); activate(a_cse_cf02_ae1());
vc_cse1.start(f_cf02UpCse1()); vc_cse1.start(f_cf02UpCse1());
...@@ -261,6 +264,9 @@ module OneM2M_Functions { ...@@ -261,6 +264,9 @@ module OneM2M_Functions {
unmap(self:mcaPort, system:mcaPort); unmap(self:mcaPort, system:mcaPort);
unmap(self:acPort, system:acPort); unmap(self:acPort, system:acPort);
if(PX_UT_IMPLEMENTED){
unmap(self:utPort, system:utPort);
}
unmap(vc_cse1:mccPort, system:mccPort); unmap(vc_cse1:mccPort, system:mccPort);
unmap(vc_cse1:mccPortIn, system:mccPortIn); unmap(vc_cse1:mccPortIn, system:mccPortIn);
unmap(vc_cse1:acPort, system:acPort); unmap(vc_cse1:acPort, system:acPort);
...@@ -1117,25 +1123,28 @@ module OneM2M_Functions { ...@@ -1117,25 +1123,28 @@ module OneM2M_Functions {
* @verdict * @verdict
*/ */
//TODO To finalize this function //TODO To finalize this function
function f_cse_resourceAnnouncementHandler(template XSD.ID p_from := *, template XSD.ID p_to := ?) runs on CseSimu { function f_cse_resourceAnnouncementHandler(template RequestPrimitive p_requestprimitive := ?) runs on CseSimu {
// Local variables // Local variables
var MsgIn v_request; var MsgIn v_request;
var integer v_parentIndex := vc_localRemoteCseIndex;
var integer v_announcedResourceIndex;
var ResponsePrimitive v_responsePrimitive; var ResponsePrimitive v_responsePrimitive;
var PrimitiveContent v_announcedResource;
tc_ac.start; tc_ac.start;
alt { alt {
[] mccPortIn.receive(mw_request(mw_create(p_from, p_to))) -> value v_request { [] mccPortIn.receive(mw_request(p_requestprimitive)) -> value v_request {
tc_ac.stop; tc_ac.stop;
setverdict(pass, __SCOPE__ & ":INFO: Announcement received"); setverdict(pass, __SCOPE__ & ":INFO: Announcement received");
//TODO Save resource and generate required attributes //TODO Save resource and generate required attributes
v_responsePrimitive := f_getCreateResponsePrimitive(v_request.primitive.requestPrimitive.resourceType, v_request.primitive.requestPrimitive); v_announcedResource:= f_cse_generateLocalResource(v_request.primitive.requestPrimitive.primitiveContent, v_parentIndex,v_request.primitive.requestPrimitive.resourceType);
mccPortIn.send(m_response(v_responsePrimitive)); v_announcedResourceIndex := f_setLocalResource(v_announcedResource, v_request.primitive.requestPrimitive.resourceType, v_parentIndex);
f_checkAttributesToBeSaved(v_request.primitive.requestPrimitive.resourceType, v_request.primitive.requestPrimitive, vc_response.primitive.responsePrimitive);
f_setResource(vc_response.primitive.responsePrimitive.primitiveContent, v_request.primitive.requestPrimitive.resourceType, vc_remoteCseIndex); v_responsePrimitive := valueof(m_responsePrimitive(int2001,v_request.primitive.requestPrimitive.requestIdentifier));
} v_responsePrimitive.from_ := PX_CSE1_ID;
[] mccPortIn.receive{ v_responsePrimitive.to_ := v_request.primitive.requestPrimitive.from_;
tc_ac.stop; v_responsePrimitive.primitiveContent := vc_localResourcesList[vc_localRemoteCseIndex].resource;
setverdict(fail, __SCOPE__ & ":ERROR: Unexpected message received"); mccPortIn.send(m_response(v_responsePrimitive));
} }
[] tc_ac.timeout { [] tc_ac.timeout {
setverdict(fail, __SCOPE__ & ":ERROR: No announcement received"); setverdict(fail, __SCOPE__ & ":ERROR: No announcement received");
...@@ -1695,6 +1704,13 @@ module OneM2M_Functions { ...@@ -1695,6 +1704,13 @@ module OneM2M_Functions {
var integer v_resourceIndex := -1; var integer v_resourceIndex := -1;
var template UtTriggerPrimitive v_utRequest := m_utCreateRemoteCSE; var template UtTriggerPrimitive v_utRequest := m_utCreateRemoteCSE;
var charstring v_action := "Please, send a CSE registration request"; var charstring v_action := "Please, send a CSE registration request";
var integer v_parentIndex := vc_localRemoteCseIndex;
var ResponsePrimitive v_responsePrimitive;
var PrimitiveContent v_announcedResource;
var boolean v_remoteCSERegistered:=false;
var integer v_ResourceIndex := -1;
//send triggering primitive to SUT //send triggering primitive to SUT
f_sendUtPrimitive(v_utRequest,v_action); f_sendUtPrimitive(v_utRequest,v_action);
...@@ -1714,15 +1730,16 @@ module OneM2M_Functions { ...@@ -1714,15 +1730,16 @@ module OneM2M_Functions {
mccPortIn.send(m_response(v_response)); mccPortIn.send(m_response(v_response));
v_resourceIndex := f_setResource(v_request.primitive.requestPrimitive.primitiveContent, int16, -1); v_resourceIndex := f_setResource(v_request.primitive.requestPrimitive.primitiveContent, int16, -1);
} v_remoteCSERegistered:=true;
[] mccPortIn.receive { tc_ac.start;
tc_ac.stop; repeat;
setverdict(inconc, __SCOPE__&":INFO: Unexpected message received");
} }
[] tc_ac.timeout { [] tc_ac.timeout {
setverdict(inconc, __SCOPE__&":INFO: No request received for creating resource type remoteCSE"); if(not (v_remoteCSERegistered)){
setverdict(inconc, __SCOPE__&":INFO: No request received for creating resource type remoteCSE");
}
} }
} }
f_checkCseSimuStatus(); f_checkCseSimuStatus();
...@@ -1801,7 +1818,7 @@ module OneM2M_Functions { ...@@ -1801,7 +1818,7 @@ module OneM2M_Functions {
v_myResource.remoteCSE.resourceName := "remoteCSE" & int2str(v_resourceIndex); v_myResource.remoteCSE.resourceName := "remoteCSE" & int2str(v_resourceIndex);
} }
v_myResource.remoteCSE.resourceType := p_resourceType; v_myResource.remoteCSE.resourceType := p_resourceType;
v_myResource.remoteCSE.resourceID := "remoteCSE" & int2str(v_resourceIndex); v_myResource.remoteCSE.resourceID := f_resourceIdCleaner(v_myResource.remoteCSE.cSE_ID);
v_myResource.remoteCSE.parentID := f_getResourceId(vc_localResourcesList[p_parentIndex].resource); v_myResource.remoteCSE.parentID := f_getResourceId(vc_localResourcesList[p_parentIndex].resource);
v_myResource.remoteCSE.creationTime := fx_generateTimestamp(); v_myResource.remoteCSE.creationTime := fx_generateTimestamp();
v_myResource.remoteCSE.creationTime := "20171231T012345"; v_myResource.remoteCSE.creationTime := "20171231T012345";
...@@ -1823,11 +1840,81 @@ module OneM2M_Functions { ...@@ -1823,11 +1840,81 @@ module OneM2M_Functions {
v_myResource.remoteCSE.nodeLink := omit; v_myResource.remoteCSE.nodeLink := omit;
} }
} else if (p_resourceType == int10002 and ispresent (p_resource)) { //AE Annc
if(ischosen(p_resource.aEAnnc)) {
v_myResource.aEAnnc.expirationTime := p_resource.aEAnnc.expirationTime;
v_myResource.aEAnnc.accessControlPolicyIDs := p_resource.aEAnnc.accessControlPolicyIDs;
v_myResource.aEAnnc.labels := p_resource.aEAnnc.labels;
}
} else if (p_resourceType == int10001 and ispresent (p_resource)) { //Acp Annc
if(ischosen(p_resource.accessControlPolicyAnnc)) {
v_myResource.accessControlPolicyAnnc.expirationTime := p_resource.accessControlPolicyAnnc.expirationTime;
v_myResource.accessControlPolicyAnnc.labels := p_resource.accessControlPolicyAnnc.labels;
v_myResource.accessControlPolicyAnnc.privileges := p_resource.accessControlPolicyAnnc.privileges;
v_myResource.accessControlPolicyAnnc.selfPrivileges := p_resource.accessControlPolicyAnnc.selfPrivileges;
}
} else if (p_resourceType == int10003 and ispresent (p_resource)) { //Container Annc
if(ischosen(p_resource.containerAnnc)) {
v_myResource.containerAnnc.expirationTime := p_resource.containerAnnc.expirationTime;
v_myResource.containerAnnc.accessControlPolicyIDs := p_resource.containerAnnc.accessControlPolicyIDs;
v_myResource.containerAnnc.labels := p_resource.containerAnnc.labels;
}
} else if (p_resourceType == int10009 and ispresent (p_resource)) { //Group Annc
if(ischosen(p_resource.groupAnnc)) {
v_myResource.groupAnnc.expirationTime := p_resource.groupAnnc.expirationTime;
v_myResource.groupAnnc.accessControlPolicyIDs := p_resource.groupAnnc.accessControlPolicyIDs;
v_myResource.groupAnnc.labels := p_resource.groupAnnc.labels;
}
} else if (p_resourceType == int10014 and ispresent (p_resource)) { //ContentInstance Annc
if(ischosen(p_resource.contentInstanceAnnc)) {
v_myResource.contentInstanceAnnc.expirationTime := p_resource.contentInstanceAnnc.expirationTime;
v_myResource.contentInstanceAnnc.labels := p_resource.contentInstanceAnnc.labels;
}
} else if (p_resourceType == int1 and ispresent (p_resource)) { //Acp Resource
if(ischosen (p_resource.accessControlPolicy)){
v_myResource.accessControlPolicy := valueof(p_resource.accessControlPolicy);
if(not(ispresent(p_resource.accessControlPolicy.resourceName))) {
v_myResource.accessControlPolicy.resourceName := "accessControlPolicy" & int2str(v_resourceIndex);
}
v_myResource.accessControlPolicy.resourceType := p_resourceType;
v_myResource.accessControlPolicy.resourceID := "accessControlPolicy" & int2str(v_resourceIndex);
v_myResource.accessControlPolicy.parentID := f_getResourceId(vc_localResourcesList[p_parentIndex].resource);
v_myResource.accessControlPolicy.labels := p_resource.accessControlPolicy.labels;
v_myResource.accessControlPolicy.creationTime := fx_generateTimestamp();
if(not(ispresent(p_resource.accessControlPolicy.expirationTime))) {
v_myResource.accessControlPolicy.expirationTime := "20301231T012345";
}
v_myResource.accessControlPolicy.lastModifiedTime := v_myResource.accessControlPolicy.creationTime;
v_myResource.accessControlPolicy.announceTo := omit;
v_myResource.accessControlPolicy.announcedAttribute := omit;
}
} }
return v_myResource; return v_myResource;
}//End of function }//End of function
/**
* @desc Sending of a request primitive over mca port
* @param p_resourceType Resource type of the resource to be created
* @param p_requestPrimitive CREATE request primitive for the resource to be created
* @param p_parentIndex Internal resource index which indicates the parent of the resource to be created
* @return Internal resource index of the created resource
* @verdict
*/
function f_cse_sendCreateRequestPrimitive(in ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive := m_create, integer p_parentIndex := -1) runs on AeSimu {
var RequestPrimitive v_request;
var integer v_resourceIndex := -1;
v_request := f_getCreateRequestPrimitive(p_resourceType, p_requestPrimitive, p_parentIndex);
mcaPort.send(m_request(v_request));
}
}//end group CseSimuFunctions }//end group CseSimuFunctions
...@@ -1867,7 +1954,71 @@ module OneM2M_Functions { ...@@ -1867,7 +1954,71 @@ module OneM2M_Functions {
*/ */
altstep a_cse_cf02_cse1() runs on CseSimu { altstep a_cse_cf02_cse1() runs on CseSimu {
[] mccPortIn.receive { var PrimitiveContent v_localResource;
var integer vc_localResourceIndex := -1;
var MsgIn v_request;
var ResponsePrimitive v_response;
var integer v_localResourceIndex := -1;
[] mccPortIn.receive(mw_request(mw_create())) -> value v_request {
log(__SCOPE__&": WARNING: Unexpected CREATE message received");
tc_ac.stop;
v_localResource := f_cse_generateLocalResource(v_request.primitive.requestPrimitive.primitiveContent, vc_cSEBaseIndex, v_request.primitive.requestPrimitive.resourceType);//TODO Get index from v_request.primitive.requestPrimitive.to_
vc_localResourceIndex := f_setLocalResource(v_localResource, v_request.primitive.requestPrimitive.resourceType, vc_cSEBaseIndex);
v_response := valueof(m_responsePrimitive(int2001,v_request.primitive.requestPrimitive.requestIdentifier));
v_response.from_ := PX_CSE1_ID;
v_response.to_ := v_request.primitive.requestPrimitive.from_;
v_response.primitiveContent := vc_localResourcesList[vc_localResourceIndex].resource;
mccPortIn.send(m_response(v_response));
tc_ac.start;
repeat;
}
[] mccPortIn.receive(mw_request(mw_retrieve(f_getLocalResourceAddress(-, e_hierarchical, e_spRelative)))) -> value v_request {
tc_ac.stop;
log(__SCOPE__&": WARNING: Unexpected RETRIEVE message received");
v_localResourceIndex := f_getResourceIndex(v_request.primitive.requestPrimitive.to_);
if(v_localResourceIndex == -1)
{
log(__SCOPE__&": ERROR: Resource Index not valid");
v_response := valueof(m_responsePrimitive(int4004,v_request.primitive.requestPrimitive.requestIdentifier));
v_response.from_ := PX_CSE1_ID;
v_response.to_ := v_request.primitive.requestPrimitive.from_;
mccPortIn.send(m_response(v_response));
} else {
v_response := valueof(m_responsePrimitive(int2000,v_request.primitive.requestPrimitive.requestIdentifier));
v_response.from_ := PX_CSE1_ID;
v_response.to_ := v_request.primitive.requestPrimitive.from_;
v_response.primitiveContent := vc_localResourcesList[vc_cSEBaseIndex].resource;
mccPortIn.send(m_response(v_response));
}
tc_ac.start;
repeat;
}
[] mccPortIn.receive(mw_request(mw_update())) -> value v_request {
tc_ac.stop;
log(__SCOPE__&": WARNING: Unexpected UPDATE message received");
v_localResourceIndex := f_getResourceIndex(v_request.primitive.requestPrimitive.to_);
if(v_localResourceIndex == -1)
{
log(__SCOPE__&": ERROR: Resource Index not valid");
v_response := valueof(m_responsePrimitive(int4004,v_request.primitive.requestPrimitive.requestIdentifier));
v_response.from_ := PX_CSE1_ID;
v_response.to_ := v_request.primitive.requestPrimitive.from_;
mccPortIn.send(m_response(v_response));
} else {
v_response := valueof(m_responsePrimitive(int2004,v_request.primitive.requestPrimitive.requestIdentifier));
v_response.from_ := PX_CSE1_ID;
v_response.to_ := v_request.primitive.requestPrimitive.from_;
v_response.primitiveContent := vc_localResourcesList[vc_localRemoteCseIndex].resource;
mccPortIn.send(m_response(v_response));
}
tc_ac.start;
repeat;
}
[] mccPortIn.receive (mw_request(?)){
log(__SCOPE__&": WARNING: Unexpected message received"); log(__SCOPE__&": WARNING: Unexpected message received");
repeat; repeat;
} }
...@@ -2525,8 +2676,34 @@ module OneM2M_Functions { ...@@ -2525,8 +2676,34 @@ module OneM2M_Functions {
* @param p_address Resource URI (can be structured/unstructured cseRelative/spRelative/absolute) * @param p_address Resource URI (can be structured/unstructured cseRelative/spRelative/absolute)
* @return Internal resource index of the given resource or -1 in case of error * @return Internal resource index of the given resource or -1 in case of error
*/ */
function f_getResourceIndex(in XSD.AnyURI p_address) runs on CseSimu return integer { function f_getResourceIndex(in XSD.ID p_receivedURI) runs on CseSimu return integer {
return vc_cSEBaseIndex; //TODO var integer v_resourceIndex := -1;
var integer i;
var XSD.ID v_resourceName;
var XSD.ID v_resourceID;
if (f_isHierarchical(p_receivedURI)) {
v_resourceName := f_resourceIdCleaner(p_receivedURI);
for(i:=0; i < lengthof(vc_resourcesList); i := i+1){
if(match(f_getResourceName(vc_localResourcesList[i].resource), v_resourceName)){
v_resourceIndex := i;
break;
}
}
} else {
v_resourceID := f_resourceIdCleaner(p_receivedURI);
for(i:=0; i < lengthof(vc_resourcesList); i := i+1){
if(match(f_getResourceId(vc_localResourcesList[i].resource), v_resourceID)){
v_resourceIndex := i;
break;
}
}
}
return v_resourceIndex;
} }
/** /**
...@@ -2624,7 +2801,7 @@ module OneM2M_Functions { ...@@ -2624,7 +2801,7 @@ module OneM2M_Functions {
if(p_targetResourceIndex == -1) { if(p_targetResourceIndex == -1) {
return PX_CSE1_ID & "/" & PX_CSE1_RESOURCE_ID; return PX_CSE1_ID & "/" & PX_CSE1_RESOURCE_ID;
} else { } else {
v_resourceAddress := PX_CSE_ID & "/" & f_getResourceId(vc_localResourcesList[p_targetResourceIndex].resource); v_resourceAddress := PX_CSE1_ID & "/" & f_getResourceId(vc_localResourcesList[p_targetResourceIndex].resource);
return v_resourceAddress; return v_resourceAddress;
} }
} else { } else {
...@@ -2657,6 +2834,7 @@ module OneM2M_Functions { ...@@ -2657,6 +2834,7 @@ module OneM2M_Functions {
} }
/** /**
* @desc Saving of a resource and its parent index in the internal resource list * @desc Saving of a resource and its parent index in the internal resource list
* @param p_resource Resource to be saved * @param p_resource Resource to be saved
......
...@@ -391,7 +391,7 @@ module OneM2M_Templates { ...@@ -391,7 +391,7 @@ module OneM2M_Templates {
to_ := p_to, to_ := p_to,
from_ := p_from, from_ := p_from,
requestIdentifier := ?, requestIdentifier := ?,
resourceType := ?, resourceType := omit,
primitiveContent:= ?, primitiveContent:= ?,
roleIDs := *, roleIDs := *,
originatingTimestamp := *, originatingTimestamp := *,
...@@ -592,6 +592,35 @@ module OneM2M_Templates { ...@@ -592,6 +592,35 @@ module OneM2M_Templates {
tokenRequestIndicator := * tokenRequestIndicator := *
} }
/**
* @desc Base Reception template for create operation for announced resources
*/
template RequestPrimitive mw_createAnnc(template XSD.ID p_from := ?, template XSD.ID p_to := ?) := {
operation := int1,
to_ := p_to,
from_ := p_from,
requestIdentifier := ?,
resourceType := ?,
primitiveContent := ?,
roleIDs := *,
originatingTimestamp := *,
requestExpirationTimestamp := *,
resultExpirationTimestamp := *,
operationExecutionTime := *,
responseType := *,
resultPersistence := *,
resultContent := *,
eventCategory := *,
deliveryAggregation := *,
groupRequestIdentifier := *,
filterCriteria := *,
discoveryResultType := *,
tokens := *,
tokenIDs := *,
localTokenIDs := *,
tokenRequestIndicator := *
}
/** /**
* @desc Base CREATE request primitive for AEAnnc resource * @desc Base CREATE request primitive for AEAnnc resource
...@@ -612,7 +641,7 @@ module OneM2M_Templates { ...@@ -612,7 +641,7 @@ module OneM2M_Templates {
/** /**
* @desc Reception template for CREATE AEAnnc * @desc Reception template for CREATE AEAnnc
*/ */
template RequestPrimitive mw_createAEAnnc(template (omit) XSD.ID p_from := omit, template (omit) XSD.ID p_to := omit, template (omit) AcpType p_accessControlPolicyIds := omit) modifies mw_create := { template RequestPrimitive mw_createAEAnnc(template XSD.ID p_from := ?, template XSD.ID p_to := ?, template AcpType p_accessControlPolicyIds := ?) modifies mw_createAnnc := {
resourceType := int10002, resourceType := int10002,
primitiveContent := {aEAnnc := mw_contentCreateAEAnnc({"Credential-ID:None"}, p_accessControlPolicyIds)} primitiveContent := {aEAnnc := mw_contentCreateAEAnnc({"Credential-ID:None"}, p_accessControlPolicyIds)}
}; };
...@@ -661,7 +690,7 @@ module OneM2M_Templates { ...@@ -661,7 +690,7 @@ module OneM2M_Templates {
template RequestPrimitive mw_createAccessControlPolicyAnnc(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_create := { template RequestPrimitive mw_createAccessControlPolicyAnnc(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_create := {
to_ := p_to, to_ := p_to,
from_ := p_from, from_ := p_from,
resourceType := int10002, resourceType := int10001,
primitiveContent := {accessControlPolicyAnnc := mw_contentCreateAcpAnnc(-)} primitiveContent := {accessControlPolicyAnnc := mw_contentCreateAcpAnnc(-)}
}; };
...@@ -1354,14 +1383,14 @@ module OneM2M_Templates { ...@@ -1354,14 +1383,14 @@ module OneM2M_Templates {
expirationTime := ?,//MA M expirationTime := ?,//MA M
link := ?,//M link := ?,//M
dynamicAuthorizationConsultationIDs := omit, //OA dynamicAuthorizationConsultationIDs := omit, //OA
appName := omit,//OA appName := *,//OA
app_ID := omit,//OA app_ID := *,//OA
aE_ID := omit,//OA aE_ID := *,//OA
pointOfAccess := omit, //OA {"http://127.0.0.1:1400/monitor"},//O //{"http://192.168.1.92:18080/notifications/AE"}, // TODO: Check this => AE PoA pointOfAccess := *, //OA {"http://127.0.0.1:1400/monitor"},//O //{"http://192.168.1.92:18080/notifications/AE"}, // TODO: Check this => AE PoA
ontologyRef := omit,//OA ontologyRef := *,//OA
nodeLink := omit,//OA nodeLink := *,//OA
requestReachability := omit,//OA requestReachability := *,//OA
contentSerialization := omit,//OA contentSerialization := *,//OA
e2eSecInfo := ?, //MA e2eSecInfo := ?, //MA
choice := omit//NA choice := omit//NA
}; };
...@@ -1427,7 +1456,7 @@ module OneM2M_Templates { ...@@ -1427,7 +1456,7 @@ module OneM2M_Templates {
* @desc Base reception template of primitiveContent for CREATE operation for AccessControlPolicyAnnc resource * @desc Base reception template of primitiveContent for CREATE operation for AccessControlPolicyAnnc resource
* @param p_labels Labels * @param p_labels Labels
*/ */
template AccessControlPolicyAnnc_optional mw_contentCreateAcpAnnc (in template (omit) Labels p_labels := omit) := { template AccessControlPolicyAnnc_optional mw_contentCreateAcpAnnc (in template Labels p_labels := ?) := {
resourceName := omit,//NA M resourceName := omit,//NA M
resourceType := omit,//NA M resourceType := omit,//NA M
resourceID := omit,//NA M resourceID := omit,//NA M
...@@ -1437,8 +1466,8 @@ module OneM2M_Templates { ...@@ -1437,8 +1466,8 @@ module OneM2M_Templates {
labels := p_labels,//MA labels := p_labels,//MA
expirationTime := ?,//MA M expirationTime := ?,//MA M
link := ?,//M link := ?,//M
privileges := *,//MA privileges := ?,//MA
selfPrivileges := *,//MA selfPrivileges := ?,//MA
choice := omit//NA choice := omit//NA
}; };
......
...@@ -62,9 +62,9 @@ module OneM2M_TestSystem { ...@@ -62,9 +62,9 @@ module OneM2M_TestSystem {
//global variables //global variables
var MyResourcesList vc_localResourcesList := {}; var MyResourcesList vc_localResourcesList := {};
var AeSimu vc_ae1;//For CF02 when CseSimu is master var AeSimu vc_ae1;//For CF02 when CseSimu is master
var integer vc_remoteCseIndex; var integer vc_remoteCseIndex := -1;
var integer vc_localRemoteCseIndex; var integer vc_localRemoteCseIndex := -1;
var integer vc_cSEBaseIndex; //Index of the CSEBase resource of the Tester inside vc_localResourcesList var integer vc_cSEBaseIndex := -1; //Index of the CSEBase resource of the Tester inside vc_localResourcesList
}; };
type component InCseSimu extends CseSimu {} type component InCseSimu extends CseSimu {}
...@@ -77,6 +77,7 @@ module OneM2M_TestSystem { ...@@ -77,6 +77,7 @@ module OneM2M_TestSystem {
port OneM2MPort mccPort; port OneM2MPort mccPort;
port OneM2MPort mccPortIn; port OneM2MPort mccPortIn;
port AdapterControlPort acPort; port AdapterControlPort acPort;
port UpperTesterPort utPort;
} }
type component AeSystem { type component AeSystem {
......
...@@ -6181,14 +6181,17 @@ module OneM2M_PermutationFunctions { ...@@ -6181,14 +6181,17 @@ module OneM2M_PermutationFunctions {
group Basic { group Basic {
function f_CSE_ANNC_001(ResourceType p_resourceType, template RequestPrimitive p_requestCreatePrimitive, template (present) RequestPrimitive p_requestAnnc, template(omit) RequestPrimitive p_requestUpdatePrimitive := omit) runs on AeSimu { 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 {
// Local variables // Local variables
var MsgIn vc_response; var MsgIn v_response;
var RequestPrimitive v_request; var RequestPrimitive v_request;
var integer v_parentIndex := -1; var integer v_parentIndex := -1;
var integer v_containerIndex := -1; var integer v_aeIndex := -1;
var integer v_resourceIndex;
var ResponsePrimitive v_responsePrimitive; var ResponsePrimitive v_responsePrimitive;
var template RequestPrimitive v_create := m_createAe(PX_APP_ID, omit, omit);
v_create.primitiveContent.aE.announceTo := {PX_CSE_ID};
// Test control // Test control
...@@ -6198,51 +6201,40 @@ module OneM2M_PermutationFunctions { ...@@ -6198,51 +6201,40 @@ module OneM2M_PermutationFunctions {
// Test adapter configuration // Test adapter configuration
//Register the CSE //Register the CSE
vc_cse1.start(f_cse_registerRemoteCse(m_createRemoteCSEBase)); vc_cse1.start(f_cse_registrationRemoteCse(mw_createRemoteCSE));
vc_cse1.done; vc_cse1.done;
//Preamble //Preamble
v_parentIndex := f_cse_preamble_registerAe();//c_CRUDNDi); vc_cse1.start(f_cse_resourceAnnouncementHandler(mw_createAEAnnc(-, -, -)));
v_aeIndex := f_cse_createResource(int2,v_create);
vc_cse1.start(f_cse_resourceAnnouncementHandler());
v_resourceIndex := f_cse_createResource(p_resourceType, m_createAEAnnc(PX_APP_ID, omit, omit));
vc_cse1.done; vc_cse1.done;
// Test Body // Test Body
if (ispresent (p_requestUpdatePrimitive)) { if (ispresent (p_requestUpdatePrimitive)) {
v_request := f_getUpdateRequestPrimitive(p_resourceType, v_resourceIndex, p_requestUpdatePrimitive); v_resourceIndex := f_cse_createResource(p_resourceType,p_requestCreatePrimitive);