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

Merge branch 'Release2-onwards' into Release2

parents d2288116 f3b3e697
......@@ -787,6 +787,29 @@ module OneM2M_Functions {
return v_resourceIndex;
}
/**
* @desc Getting the address of the last resource saved in the vc_resourcesList
* @param p_tester Given component
*/
function f_getLatestResourceAddress(in Tester p_component, AddressingMethod p_addressingMethod := PX_ADDRESSING_METHOD, PrimitiveScope p_primitiveScope := PX_PRIMITIVE_SCOPE) runs on Tester return XSD.ID {
var XSD.ID v_resourceAddress;
f_connectInfoPort(p_component);
p_component.start(f_sendLatestResourceAddress(p_addressingMethod, p_primitiveScope));
alt {
[]infoPort.receive(mw_resourceAddress) -> value v_resourceAddress{
}
}
p_component.done;
f_disconnectInfoPort(p_component);
return v_resourceAddress;
}
/**
* @desc Getting the latest local resource from an CseSimu component
......@@ -933,6 +956,16 @@ module OneM2M_Functions {
}
/**
* @desc Sending the address of the last resource saved in the vc_resourcesList
*/
function f_sendLatestResourceAddress(AddressingMethod p_addressingMethod := PX_ADDRESSING_METHOD, PrimitiveScope p_primitiveScope := PX_PRIMITIVE_SCOPE) runs on Tester {
infoPort.send(f_getResourceAddress(lengthof(vc_resourcesList)-1, p_addressingMethod, p_primitiveScope));
}
/**
* @desc Sending of the latest resource through InfoPort
*/
......@@ -1018,6 +1051,7 @@ module OneM2M_Functions {
f_checkAttributesToBeSaved(int2, v_request, v_response.primitive.responsePrimitive);
vc_aeIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, int2);
vc_componentRegistered := true;
if(ispresent(v_response.primitive.responsePrimitive.primitiveContent.aE.aE_ID)){
f_sendAcPrimitive("AE-ID_changed", vc_aeIndex);
......@@ -1027,11 +1061,9 @@ module OneM2M_Functions {
[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
tc_ac.stop;
setverdict(inconc, __SCOPE__&":INFO: Error while registering application");
stop;
}
[] tc_ac.timeout {
setverdict(inconc, __SCOPE__&":INFO: No answer while registering resource");
stop;
}
}
......@@ -1076,6 +1108,7 @@ module OneM2M_Functions {
if(ischosen(vc_response.primitive.responsePrimitive.primitiveContent.aE)) {
vc_aeIndex := f_setResource(vc_response.primitive.responsePrimitive.primitiveContent, int2);
vc_componentRegistered := true;
if(ispresent(vc_response.primitive.responsePrimitive.primitiveContent.aE.aE_ID)){
f_sendAcPrimitive("AE-ID_changed", vc_aeIndex);
......@@ -1086,16 +1119,13 @@ module OneM2M_Functions {
{
tc_ac.stop;
setverdict(inconc, __SCOPE__&":INFO: Error while registering application");
stop;
}
[] mcaPort.receive {
tc_ac.stop;
setverdict(inconc, __SCOPE__&":INFO: Unexpected message received");
stop;
}
[] tc_ac.timeout {
setverdict(inconc, __SCOPE__&":INFO: No answer while registering resource");
stop;
}
}
......@@ -1410,6 +1440,7 @@ module OneM2M_Functions {
v_resourceIndex := f_setResource(vc_response.primitive.responsePrimitive.primitiveContent, p_resourceType, p_parentIndex);
if(p_resourceType == int2) {
vc_aeIndex := v_resourceIndex;
vc_componentRegistered := true;
if(ispresent(vc_response.primitive.responsePrimitive.primitiveContent.aE.aE_ID)){
f_sendAcPrimitive("AE-ID_changed", vc_aeIndex);
}
......@@ -2386,6 +2417,12 @@ module OneM2M_Functions {
v_localResourceIndex := f_processCreateRequestPrimitive(vc_request.primitive.requestPrimitive, p_responseStatusCode);
f_send(e_mcc_in_port, m_response(vc_response.primitive.responsePrimitive));
}
[] mccPortIn.receive(mw_request(mw_create)) -> value vc_request {
tc_ac.stop;
v_localResourceIndex := f_processCreateRequestPrimitive(vc_request.primitive.requestPrimitive, int4000);
f_send(e_mcc_in_port, m_response(vc_response.primitive.responsePrimitive));
setverdict(inconc, __SCOPE__&":INFO: Wrong expected create request");
}
[] tc_ac.timeout {
setverdict(inconc, __SCOPE__&":INFO: No creation for resource received");
}
......@@ -2527,6 +2564,12 @@ module OneM2M_Functions {
f_send(e_mcc_in_port, m_response(vc_response.primitive.responsePrimitive));
}
[] mccPortIn.receive(mw_request(mw_update)) -> value vc_request {
tc_ac.stop;
v_targetResourceIndex := f_processUpdateRequestPrimitive(vc_request.primitive.requestPrimitive, int4000);
f_send(e_mcc_in_port, m_response(vc_response.primitive.responsePrimitive));
setverdict(inconc, __SCOPE__&":INFO: Wrong expected update request");
}
[] tc_ac.timeout {
setverdict(inconc, __SCOPE__&":INFO: No answer while updating resource");
}
......@@ -2562,6 +2605,12 @@ module OneM2M_Functions {
f_send(e_mcc_in_port, m_response(vc_response.primitive.responsePrimitive));
}
[] mccPortIn.receive(mw_request(mw_retrieve(?))) -> value vc_request {
tc_ac.stop;
v_targetResourceIndex := f_processRetrieveRequestPrimitive(vc_request.primitive.requestPrimitive, int4000);
f_send(e_mcc_in_port, m_response(vc_response.primitive.responsePrimitive));
setverdict(inconc, __SCOPE__&":INFO: Wrong expected retrieve request");
}
[] tc_ac.timeout {
setverdict(inconc, __SCOPE__&":INFO: No answer while retrieving resource");
}
......@@ -2676,6 +2725,12 @@ module OneM2M_Functions {
f_send(e_mcc_in_port, m_response(vc_response.primitive.responsePrimitive));
}
[] mccPortIn.receive(mw_request(mw_delete)) -> value vc_request {
tc_ac.stop;
v_targetResourceIndex := f_processDeleteRequestPrimitive(vc_request.primitive.requestPrimitive, int4000);
f_send(e_mcc_in_port, m_response(vc_response.primitive.responsePrimitive));
setverdict(inconc, __SCOPE__&":INFO: Wrong expected delete request");
}
[] tc_ac.timeout {
setverdict(inconc, __SCOPE__&":INFO: No answer while retrieving resource");
}
......@@ -2783,6 +2838,10 @@ module OneM2M_Functions {
setverdict(pass, __SCOPE__&":INFO: Resource type remoteCSE created successfuly");
f_checkAttributesToBeSaved(int16, v_request, v_response.primitive.responsePrimitive);
vc_remoteCseIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, int16, -1);
vc_componentRegistered := true;
if(ispresent(v_response.primitive.responsePrimitive.primitiveContent.remoteCSE.cSE_ID)){
f_sendAcPrimitive("CSE-ID_changed", vc_remoteCseIndex);
}
v_localRemoteCSEResource := f_generateLocalResource(valueof(m_primitiveContentRemoteCSE(m_contentLocalRemoteCSEResource(f_getLocalPoA(PX_TS_CSE1.mccPortIn, "")))), vc_cSEBaseIndex, int16); // FIXME To be review not sure we have to use CSE1
vc_localRemoteCseIndex := f_setLocalResource(v_localRemoteCSEResource, int16, vc_cSEBaseIndex);
}
......@@ -2829,6 +2888,7 @@ module OneM2M_Functions {
tc_ac.stop;
setverdict(pass, __SCOPE__&":INFO: Resource type remoteCSE created successfuly");
v_localRemoteCSEResource := f_generateLocalResource(v_request.primitive.requestPrimitive.primitiveContent, vc_cSEBaseIndex, int16);//TODO Get index from v_request.primitive.requestPrimitive.to_
v_localRemoteCSEResource.remoteCSE.cSE_ID := v_request.primitive.requestPrimitive.from_;
vc_localRemoteCseIndex := f_setLocalResource(v_localRemoteCSEResource, int16, vc_cSEBaseIndex);
v_response := valueof(m_responsePrimitive(int2001,v_request.primitive.requestPrimitive.requestIdentifier));
......@@ -2838,6 +2898,7 @@ module OneM2M_Functions {
f_send(e_mcc_in_port, m_response(v_response));
vc_remoteCseIndex := f_setResource(valueof(m_primitiveContentRemoteCSE(m_contentMyRemoteCSEResource(f_getLocalPoA(PX_TS_CSE1.mcaPortIn, "")))), int16, -1, true);
vc_componentRegistered := true;
v_resourceIndex := vc_remoteCseIndex;
v_remoteCSERegistered:=true;
tc_ac.start(10.0);
......@@ -3414,6 +3475,7 @@ module OneM2M_Functions {
v_resourceIndex := f_setResource(vc_response.primitive.responsePrimitive.primitiveContent, p_resourceType, p_parentIndex);
if(p_resourceType == int16) { //remoteCSE
vc_remoteCseIndex := v_resourceIndex;
vc_componentRegistered := true;
}
}
[] mccPort.receive(mw_response(mw_responsePrimitiveKO)) {
......@@ -4297,6 +4359,13 @@ module OneM2M_Functions {
}
}
} else if (p_resourceType == int4) {//contentInstance
} else if (p_resourceType == int30) {//timeSeriesInstance
//dataGenerationTime
if(ispresent(p_request.primitiveContent.timeSeriesInstance.dataGenerationTime)) {
if(match(valueof(p_request.primitiveContent.timeSeriesInstance.dataGenerationTime), {alt_ := "29991231T000000"} )){
p_request.primitiveContent.timeSeriesInstance.dataGenerationTime := {alt_ := fx_generateTimestamp()};
}
}
}
return valueof(p_request);
......@@ -5589,7 +5658,7 @@ module OneM2M_Functions {
* @param data Corresponding information for the correct execution of the given action
* @verdict
*/
function f_sendAcPrimitive(in charstring p_event, in integer p_aeIndex) runs on Tester {
function f_sendAcPrimitive(in charstring p_event, in integer p_resourceIndex, template (omit) XSD.ID p_originator := omit) runs on Tester {
var XSD.ID v_aeResourceAddress;
var charstring v_spRelativeAeIdForMqtt;
......@@ -5597,8 +5666,8 @@ module OneM2M_Functions {
case ("AE-ID_changed") {
//Calculate the SP-Relative-AE-ID following format defined in TS-0010 MQTT
v_aeResourceAddress := f_getResourceAddress(p_aeIndex, e_nonHierarchical, e_spRelative);
if(vc_resourcesList[p_aeIndex].resource.aE.aE_ID[0] == "S") {
v_aeResourceAddress := f_getResourceAddress(p_resourceIndex, e_nonHierarchical, e_spRelative);
if(vc_resourcesList[p_resourceIndex].resource.aE.aE_ID[0] == "S") {
v_spRelativeAeIdForMqtt := oct2char(unichar2oct(f_resourceIdCleaner(v_aeResourceAddress)));
} else {
v_spRelativeAeIdForMqtt := f_getSpRelativeAeIdForMqtt(v_aeResourceAddress);
......@@ -5621,6 +5690,25 @@ module OneM2M_Functions {
}
}
}
case ("CSE-ID_changed") {
//TODO Check for other resource address formats
v_spRelativeAeIdForMqtt := oct2char(unichar2oct(f_resourceIdCleaner(vc_resourcesList[p_resourceIndex].resource.remoteCSE.cSE_ID)));
if((((vc_config == e_cf02) or (vc_config == e_cf02CseSimuMaster)) and (vc_testSystemRole == e_cse)) or (vc_config == e_cf04)) {
if(vc_myInterfaces[enum2int(valueof(InterfaceIds:e_mcc_in_port))].myProtocolBinding == "MQTT") {
acPort.send(AcRequestPrimitive:{p_event & "_mccPort", {charstring := v_spRelativeAeIdForMqtt}});
}
if(vc_myInterfaces[enum2int(valueof(InterfaceIds:e_mcc_in_port))].myProtocolBinding == "MQTT") {
acPort.send(AcRequestPrimitive:{p_event & "_mccPortIn", {charstring := v_spRelativeAeIdForMqtt}});
}
}
}
case ("MqttSetDefaultTopicToNotRegistration") {
acPort.send(AcRequestPrimitive:{p_event, {charstring := oct2char(unichar2oct(p_originator))}});
}
case ("MqttSetDefaultTopicToRegistration") {
acPort.send(AcRequestPrimitive:{p_event, {charstring := int2str(p_resourceIndex)}});
}
}
}
}//end of group AcFunctions
......@@ -5676,6 +5764,9 @@ module OneM2M_Functions {
if(p_responseStatusCode == int2001) {
setverdict(pass, __SCOPE__&":INFO: Resource created successfuly");
v_localResource := f_generateLocalResource(p_request.primitiveContent, v_parentIndex, p_request.resourceType);
if(p_request.resourceType == int16){
v_localResource.remoteCSE.cSE_ID := p_request.from_;
}
v_localResourceIndex := f_setLocalResource(v_localResource, p_request.resourceType, v_parentIndex);
vc_response.primitive.responsePrimitive.primitiveContent := vc_localResourcesList[v_localResourceIndex].resource;
} else {
......@@ -5938,9 +6029,47 @@ module OneM2M_Functions {
p_msgOut.protocolBinding := vc_myInterfaces[enum2int(p_interfaceIds)].myProtocolBinding;
p_msgOut.serialization := vc_myInterfaces[enum2int(p_interfaceIds)].mySerialization;
log("f_send: protocolBinding=", p_msgOut.protocolBinding);
if(ischosen(p_msgOut.primitive.requestPrimitive)){
p_msgOut.primitive.requestPrimitive.requestIdentifier := p_msgOut.primitive.requestPrimitive.requestIdentifier & f_rnd(1, 1000000);
vc_request.primitive.requestPrimitive := valueof(p_msgOut.primitive.requestPrimitive);
}
if(not(vc_componentRegistered)) {
if(valueof(p_msgOut.protocolBinding) == "MQTT") {
if(ischosen(p_msgOut.primitive.requestPrimitive)) {
if(ispresent(p_msgOut.primitive.requestPrimitive.resourceType)) {
if((valueof(p_msgOut.primitive.requestPrimitive.resourceType) != int2) and (valueof(p_msgOut.primitive.requestPrimitive.resourceType) != int16)){
//Modify default topic to publish a non-registration message
f_sendAcPrimitive("MqttSetDefaultTopicToNotRegistration", -1, valueof(p_msgOut.primitive.requestPrimitive.from_));
vc_myInterfaces[enum2int(p_interfaceIds)].myPort.send(p_msgOut);
f_sendAcPrimitive("MqttSetDefaultTopicToRegistration", -1);
return;
}
} else {//RETRIEVE - UPDATE - DELETE - NOTIFY
//Modify default topic to publish a non-registration message
f_sendAcPrimitive("MqttSetDefaultTopicToNotRegistration", -1, valueof(p_msgOut.primitive.requestPrimitive.from_));
vc_myInterfaces[enum2int(p_interfaceIds)].myPort.send(p_msgOut);
f_sendAcPrimitive("MqttSetDefaultTopicToRegistration", -1);
return;
}
}
}
}
//TODO: Handle response to normal messages before CSE registration occurs
vc_myInterfaces[enum2int(p_interfaceIds)].myPort.send(p_msgOut);
}
/**
* @desc Get a converted to string random number
* @param p_lower Lower limit
* @param p_upper Upper limit
* @return Random number converted to string
* @verdict
*/
function f_rnd(in integer p_lower, in integer p_upper) return charstring {
return int2str(float2int(rnd() * int2float(p_upper - p_lower + 1)) + p_lower);
}
}//end of commonFunctions
group externalFunctions {
......
......@@ -15,21 +15,7 @@ module OneM2M_Templates {
import from OneM2M_Types all;
import from OneM2M_TypesAndValues all;
import from OneM2M_Pixits all;
import from OneM2M_Functions all;
/**
* @desc Get a converted to string random number
* @param p_lower Lower limit
* @param p_upper Upper limit
* @return Random number converted to string
* @verdict
*/
function f_rnd(in integer p_lower, in integer p_upper) return charstring {
return int2str(float2int(rnd() * int2float(p_upper - p_lower + 1)) + p_lower);
}
/* Templates */
group Primitives {
......@@ -101,7 +87,7 @@ module OneM2M_Templates {
operation := int2,
to_ := p_targetResourceAddress,
from_ := p_originator,
requestIdentifier := "m_retrieve" & f_rnd(1, 1000000),
requestIdentifier := "m_retrieve",
resourceType := omit,
primitiveContent := omit,
roleIDs := omit,
......@@ -161,10 +147,10 @@ module OneM2M_Templates {
* @desc Base Receive RETRIEVE request primitive
* @param p_targetResourceAddress Target resource address
*/
template RequestPrimitive mw_retrieve(template XSD.ID p_targetResourceAddress) := {
template RequestPrimitive mw_retrieve(template XSD.ID p_targetResourceAddress, template XSD.ID p_from := ?) := {
operation := int2,
to_ := p_targetResourceAddress,
from_ := ?,
from_ := p_from,
requestIdentifier := ?,
resourceType := omit,
primitiveContent := *,
......@@ -198,7 +184,7 @@ module OneM2M_Templates {
operation := int2,
to_ := p_targetResourceAddress,
from_ := p_originator,
requestIdentifier := "m_retrieveResourceAttributeOptionTo" & f_rnd(1, 1000000),
requestIdentifier := "m_retrieveResourceAttributeOptionTo",
resourceType := omit,
primitiveContent := omit,
roleIDs := omit,
......@@ -232,7 +218,7 @@ module OneM2M_Templates {
operation := int2,
to_ := p_targetResourceAddress,
from_ := p_originator,
requestIdentifier := "m_retrieveResourceAttributeContentOption" & f_rnd(1, 1000000),
requestIdentifier := "m_retrieveResourceAttributeContentOption",
resourceType := omit,
primitiveContent := {attributeList := p_attributeList},
roleIDs := omit,
......@@ -263,7 +249,7 @@ module OneM2M_Templates {
* @param p_originator Originator (from)
*/
template (value) RequestPrimitive m_retrieveFilterUsageOption(XSD.ID p_targetResourceAddress, in XSD.ID p_originator, in template (value) FilterUsage p_filterUsage) modifies m_retrieve := {
requestIdentifier := "m_retrieveResourceFilterUsageOption" & f_rnd(1, 1000000),
requestIdentifier := "m_retrieveResourceFilterUsageOption",
filterCriteria := {
createdBefore := omit,
createdAfter := omit,
......@@ -297,7 +283,7 @@ module OneM2M_Templates {
* @param p_originator Originator (from)
*/
template (value) RequestPrimitive m_retrieveFilterCriteria(XSD.ID p_targetResourceAddress, in XSD.ID p_originator, in template (value) FilterCriteria p_filterCriteria) modifies m_retrieve := {
requestIdentifier := "m_retrieveResourceFilterUsageOption" & f_rnd(1, 1000000),
requestIdentifier := "m_retrieveResourceFilterUsageOption",
filterCriteria := p_filterCriteria
};
......@@ -309,7 +295,7 @@ module OneM2M_Templates {
* @param p_labels Labels
*/
template (value) RequestPrimitive m_retrieveFilterUsageOptionLabel(XSD.ID p_targetResourceAddress, in XSD.ID p_originator, in template (value) FilterUsage p_filterUsage, in Labels p_labels) modifies m_retrieve := {
requestIdentifier := "m_retrieveResourceFilterUsageOptionLabel" & f_rnd(1, 1000000),
requestIdentifier := "m_retrieveResourceFilterUsageOptionLabel",
filterCriteria := {
createdBefore := omit,
createdAfter := omit,
......@@ -342,7 +328,7 @@ module OneM2M_Templates {
* @param p_originator Originator (from)
*/
template (value) RequestPrimitive m_retrieveDiscResTypeFilterUsageOption(XSD.ID p_targetResourceAddress, in XSD.ID p_originator, in template (value) DesIdResType p_desIdResType, in template (value) FilterUsage p_filterUsage) modifies m_retrieve := {
requestIdentifier := "m_retrieveResourceFilterUsageOption" & f_rnd(1, 1000000),
requestIdentifier := "m_retrieveResourceFilterUsageOption",
filterCriteria := {
createdBefore := omit,
createdAfter := omit,
......@@ -377,7 +363,7 @@ module OneM2M_Templates {
* @param p_originator Originator (from)
*/
template (value) RequestPrimitive m_retrieveInvalidFormatOption(XSD.ID p_targetResourceAddress, in XSD.ID p_originator) modifies m_retrieve := {
requestIdentifier := "m_retrieveResourceFilterUsageOption" & f_rnd(1, 1000000),
requestIdentifier := "m_retrieveResourceFilterUsageOption",
filterCriteria := {
createdBefore := omit,
createdAfter := omit,
......@@ -477,7 +463,7 @@ module OneM2M_Templates {
};
template RequestPrimitive mw_update(template XSD.ID p_from := *, template XSD.ID p_to := ?) := {
template RequestPrimitive mw_update(template XSD.ID p_from := ?, template XSD.ID p_to := ?) := {
operation := int3,
to_ := p_to,
from_ := p_from,
......@@ -916,17 +902,17 @@ module OneM2M_Templates {
/**
* @desc Base CREATE request primitive for remoteCSE resource
*/
template (value) RequestPrimitive m_createRemoteCSEBase(template (omit) AcpType p_accessControlPolicyIds := omit, template (omit) ResourceName p_resourceName := c_defaultRemoteCSEResourceName, in template (omit) XSD.AnyURI p_cSEBase := PX_TS_CSE1.cseId, in template (omit) XSD.ID p_cSE_ID := PX_TS_CSE1.cseId) modifies m_create := {
template (value) RequestPrimitive m_createRemoteCSEBase(template (omit) AcpType p_accessControlPolicyIds := omit, template (omit) ResourceName p_resourceName := c_defaultRemoteCSEResourceName, in template (omit) XSD.AnyURI p_cSEBase := PX_TS_CSE1.cseId) modifies m_create := {
requestIdentifier := testcasename() & "-m_createRemoteCSE",
resourceType := int16,
primitiveContent := {remoteCSE := m_contentCreateRemoteCSE(p_resourceName, p_accessControlPolicyIds,p_cSEBase, p_cSE_ID)}
primitiveContent := {remoteCSE := m_contentCreateRemoteCSE(p_resourceName, p_accessControlPolicyIds,p_cSEBase)}
};
/**
* @desc CREATE request primitive for remoteCSE resource with poa
*/
template (value) RequestPrimitive m_createRemoteCSE_poa(template (omit) AcpType p_accessControlPolicyIds := omit, template (omit) ResourceName p_resourceName := c_defaultRemoteCSEResourceName, in template (omit) XSD.AnyURI p_cSEBase := PX_TS_CSE1.cseId & "/" & PX_TS_CSE1.cseName, in template (omit) XSD.ID p_cSE_ID := PX_TS_CSE1.cseId, in PoaList p_poaList) modifies m_createRemoteCSEBase := {
primitiveContent := {remoteCSE := m_contentCreateRemoteCSE_poa(p_resourceName, p_accessControlPolicyIds,p_cSEBase, p_cSE_ID, p_poaList)}
primitiveContent := {remoteCSE := m_contentCreateRemoteCSE_poa(p_resourceName, p_accessControlPolicyIds,p_cSEBase, p_poaList)}
};
/**
......@@ -1397,7 +1383,7 @@ module OneM2M_Templates {
operation := int4,
to_ := p_resourceAddress,
from_ := p_originator,
requestIdentifier := testcasename() & "-m_delete" & f_rnd(1, 1000000),
requestIdentifier := testcasename() & "-m_delete",
resourceType := omit,
primitiveContent := omit,
roleIDs := omit,
......@@ -1421,10 +1407,10 @@ module OneM2M_Templates {
vendorInformation := omit
};
template RequestPrimitive mw_delete(template XSD.ID p_resourceAddress := ?, template XSD.ID p_from := *) := {
template RequestPrimitive mw_delete(template XSD.ID p_resourceAddress := ?, template XSD.ID p_from := ?) := {
operation := int4,
to_ := p_resourceAddress,
from_ := ?,
from_ := p_from,
requestIdentifier := ?,
resourceType := omit,
primitiveContent := omit,
......@@ -1468,7 +1454,7 @@ module OneM2M_Templates {
operation := int5,
to_ := p_resourceAddress,
from_ := "NotInitialized",
requestIdentifier := testcasename() & "-m_notify" & f_rnd(1, 1000000),
requestIdentifier := testcasename() & "-m_notify",
resourceType := omit,
primitiveContent := {notification := m_contentNotification_allOmit},
roleIDs := omit,
......@@ -1515,7 +1501,7 @@ module OneM2M_Templates {
operation := int5,
to_ := "NotInitialized",
from_ := omit,
requestIdentifier := testcasename() & "-m_notifyAggregatedNotification" & f_rnd(1, 1000000),
requestIdentifier := testcasename() & "-m_notifyAggregatedNotification",
resourceType := omit,
primitiveContent := {aggregatedNotification := {notification_list := {m_contentNotification_allOmit,m_contentNotification_allOmit}}},
roleIDs := omit,
......@@ -2503,7 +2489,7 @@ module OneM2M_Templates {
announcedAttribute := omit,//O
stateTag := omit,//NP
creator := omit,//O
contentInfo := "a",//O
contentInfo := "text/strings:0",//O
contentSize := omit,//NP
contentRef := omit, //O
ontologyRef := omit,//O
......@@ -2681,7 +2667,7 @@ module OneM2M_Templates {
* @desc Base primitiveContent for CREATE operation for RemoteCSE resource
* @param p_name Resource name
*/
template (value) RemoteCSE_optional m_contentCreateRemoteCSE (in template (omit) XSD.String p_name := c_defaultRemoteCSEResourceName, in template (omit) AcpType p_accessControlPolicyIds, in template (omit) XSD.AnyURI p_cSEBase := PX_TS_CSE1.cseId, in template (omit) XSD.ID p_cSE_ID := PX_TS_CSE1.cseId):= {
template (value) RemoteCSE_optional m_contentCreateRemoteCSE (in template (omit) XSD.String p_name := c_defaultRemoteCSEResourceName, in template (omit) AcpType p_accessControlPolicyIds, in template (omit) XSD.AnyURI p_cSEBase := PX_TS_CSE1.cseId):= {
resourceName := p_name,//O
resourceType := omit,//NP
resourceID := omit,//NP
......@@ -2697,7 +2683,7 @@ module OneM2M_Templates {
cseType := omit,//O
pointOfAccess := omit,//O
cSEBase := valueof(p_cSEBase),//M
cSE_ID := valueof(p_cSE_ID),//M
cSE_ID := omit,//O
m2M_Ext_ID := omit,//O
trigger_Recipient_ID := omit,//O
requestReachability := false,//M
......@@ -2712,7 +2698,7 @@ module OneM2M_Templates {
* @desc PrimitiveContent for CREATE operation for RemoteCSE resource with poa
* @param p_name Resource name
*/
template (value) RemoteCSE_optional m_contentCreateRemoteCSE_poa (in template (omit) XSD.String p_name := c_defaultRemoteCSEResourceName, in template (omit) AcpType p_accessControlPolicyIds, in template (omit) XSD.AnyURI p_cSEBase := PX_TS_CSE1.cseId & "/" & PX_TS_CSE1.cseName, in template (omit) XSD.ID p_cSE_ID := PX_TS_CSE1.cseId, in PoaList p_poaList):= {
template (value) RemoteCSE_optional m_contentCreateRemoteCSE_poa (in template (omit) XSD.String p_name := c_defaultRemoteCSEResourceName, in template (omit) AcpType p_accessControlPolicyIds, in template (omit) XSD.AnyURI p_cSEBase := PX_TS_CSE1.cseId & "/" & PX_TS_CSE1.cseName, in PoaList p_poaList):= {
resourceName := p_name,//O
resourceType := omit,//NP
resourceID := omit,//NP
......@@ -2728,7 +2714,7 @@ module OneM2M_Templates {
cseType := omit,//O
pointOfAccess := p_poaList,//O
cSEBase := valueof(p_cSEBase),//M
cSE_ID := valueof(p_cSE_ID),//M
cSE_ID := omit,//O
m2M_Ext_ID := omit,//O
trigger_Recipient_ID := omit,//O
requestReachability := true,//M
......@@ -2758,7 +2744,7 @@ module OneM2M_Templates {
cseType := *,//O
pointOfAccess := *,//O
cSEBase := ?,//M
cSE_ID := ?,//M
cSE_ID := *,//O
m2M_Ext_ID := *,//O
trigger_Recipient_ID := *,//O
requestReachability := ?,//M
......@@ -3247,7 +3233,7 @@ module OneM2M_Templates {
expirationTime := omit,//O
announceTo := omit,//O
announcedAttribute := omit,//O
dataGenerationTime := {alt_ := fx_generateTimestamp()},//M
dataGenerationTime := {alt_ := "29991231T000000"},//M
content := "AnyValue",//M
sequenceNr := omit,//O
contentSize := omit//NP
......@@ -4370,7 +4356,7 @@ module OneM2M_Templates {
metaInformation := ?,//M
primitiveContent := *,//O
requestStatus := ?,//M
operationResult := ?,//M
operationResult := *,//O TODO Check when new XSD available
choice := *//O
};
......@@ -5433,7 +5419,7 @@ module OneM2M_Templates {
template (value) ResponsePrimitive m_responseNotification(ResponseStatusCode p_statusCode, in template(omit) PrimitiveContent p_notification := omit) := {
responseStatusCode := p_statusCode,
requestIdentifier := testcasename() & "-m_responseNotification" & f_rnd(1, 1000000),
requestIdentifier := testcasename() & "-m_responseNotification",
primitiveContent := p_notification,
to_ := omit,
from_ := omit,
......@@ -5481,7 +5467,7 @@ module OneM2M_Templates {
operation := int1,
to_ := "NotInitialized",
from_ := "UNINITIALIZED",
requestIdentifier := testcasename() & "-m_utCreate" & f_rnd(1, 1000000),
requestIdentifier := testcasename() & "-m_utCreate",
resourceType := omit,
primitiveContent := omit,
roleIDs := omit,
......@@ -5509,7 +5495,7 @@ module OneM2M_Templates {
template (value) UtTriggerPrimitive m_utCreateAe modifies m_utCreate := {
requestPrimitive := {
requestIdentifier := testcasename() & "-m_utCreateAe" & f_rnd(1, 1000000),
requestIdentifier := testcasename() & "-m_utCreateAe",
resourceType := int2,
primitiveContent := {aE := m_contentAe_allOmit}
}
......@@ -5517,7 +5503,7 @@ module OneM2M_Templates {
template (value) UtTriggerPrimitive m_utCreateContainer modifies m_utCreate := {
requestPrimitive := {
requestIdentifier := testcasename() & "-m_utCreateContainer" & f_rnd(1, 1000000),
requestIdentifier := testcasename() & "-m_utCreateContainer",
resourceType := int3,
primitiveContent := {container := valueof(mw_contentContainer_allOmit)}
}
......@@ -5525,7 +5511,7 @@ module OneM2M_Templates {
template (value) UtTriggerPrimitive m_utCreateContentInstance modifies m_utCreate := {
requestPrimitive := {
requestIdentifier := testcasename() & "-m_utCreateContentInstance" & f_rnd(1, 1000000),
requestIdentifier := testcasename() & "-m_utCreateContentInstance",
resourceType := int4,
primitiveContent := {contentInstance := m_contentContentInstance_allOmit}
}
......@@ -5533,7 +5519,7 @@ module OneM2M_Templates {
template (value) UtTriggerPrimitive m_utCreateSubscription modifies m_utCreate := {
requestPrimitive := {
requestIdentifier := testcasename() & "-m_utCreateSubscription" & f_rnd(1, 1000000),
requestIdentifier := testcasename() & "-m_utCreateSubscription",
resourceType := int23,
primitiveContent := {subscription := m_contentSubscription}
}
......@@ -5541,7 +5527,7 @@ module OneM2M_Templates {
template (value) UtTriggerPrimitive m_utCreateRemoteCSE modifies m_utCreate := {
requestPrimitive := {
requestIdentifier := testcasename() & "-m_utCreateRemoteCSE" & f_rnd(1, 1000000),
requestIdentifier := testcasename() & "-m_utCreateRemoteCSE",
resourceType := int16,
primitiveContent := {remoteCSE := m_contentRemoteCSE_allOmit}
}
......@@ -5549,7 +5535,7 @@ module OneM2M_Templates {
template (value) UtTriggerPrimitive m_utCreatePollingChannel modifies m_utCreate := {
requestPrimitive := {
requestIdentifier := testcasename() & "-m_utCreatePollingChannel" & f_rnd(1, 1000000),
requestIdentifier := testcasename() & "-m_utCreatePollingChannel",