Commit cd54084a authored by Enrique Sabatel's avatar Enrique Sabatel

added g_AE_HAIM_CRE_005 (partial)

parent 50376d18
......@@ -1644,6 +1644,37 @@ module OneM2M_Templates {
primitiveContent := {temperature := ?}
};
/**
* @desc Reception template for CREATE Temperature
*/
template RequestPrimitive mw_createTurbo(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_create := {
resourceType := int28,
primitiveContent := {turbo := ?}
};
/**
* @desc Reception template for CREATE Temperature
*/
template RequestPrimitive mw_createAirFlow(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_create := {
resourceType := int28,
primitiveContent := {airFlow := ?}
};
/**
* @desc Reception template for CREATE Temperature
*/
template RequestPrimitive mw_createSpinLevel(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_create := {
resourceType := int28,
primitiveContent := {spinLevel := ?}
};
/**
* @desc Reception template for CREATE Temperature
*/
template RequestPrimitive mw_createWaterFlow(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_create := {
resourceType := int28,
primitiveContent := {waterFlow := ?}
};
}//end group Create
......
......@@ -2128,6 +2128,12 @@ type union PrimitiveContent {
EnergyGeneration energyGeneration,
EnergyConsumption energyConsumption,
Temperature temperature,
Turbo turbo,
AirFlow airFlow,
SpinLevel spinLevel,
WaterFlow waterFlow,
Timer timerAction,
TelevisionChannel televisionChannel,
//SecurityInfo
SecurityInfo securityInfo,
//TS-0004 - 7.5.2-1 Elements used for request content
......
......@@ -761,7 +761,7 @@ module OneM2M_PermutationFunctions {
mcaPortIn.send(f_getMsgOutPrimitive(m_response(valueof(m_responsePrimitive(int4004, vc_request.primitive.requestPrimitive.requestIdentifier, omit)))));
}
[] tc_ac.timeout{
setverdict(fail, __SCOPE__ & " : Timeout due to no request received from SUT");
setverdict(fail, __SCOPE__ & " : Timeout due to no required request received from SUT");
}
}
......@@ -803,6 +803,102 @@ module OneM2M_PermutationFunctions {
tc_ac.start;
repeat;
}
[] tc_ac.timeout{
setverdict(fail, __SCOPE__ & " : Timeout due to no required request received from SUT");
}
}
// Postamble
f_cf03Down();
}
function f_AE_HAIM_CRE_005(in universal charstring p_action, in template UtTriggerPrimitive p_utRequest, in template RequestPrimitive p_requestPrimitive1, in template RequestPrimitive p_requestPrimitive2) runs on CseSimu {
var integer v_resourceIndex := -1;
var integer v_parentResourceIndex := -1;
//Test component configuration
f_cf03Up();
//send triggering primitive to SUT
p_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(-, -, -);
p_requestPrimitive1.to_ := p_utRequest.requestPrimitive.to_;
f_sendUtPrimitive(p_utRequest,p_action & f_getLocalResourceAddress(-, -, -));
//device model creation handler
v_parentResourceIndex := f_ae_createResourceHandler(p_requestPrimitive1);
p_requestPrimitive2.primitiveContent.flexContainer.parentID := f_getResourceAddress(v_parentResourceIndex);
//Test behavior
tc_ac.start;
alt{
[] mcaPortIn.receive(mw_request(p_requestPrimitive2)) -> value vc_request {
tc_ac.stop;
setverdict(pass, __SCOPE__ & " : Module class creation request contains required DataPoints");
v_resourceIndex := f_processCreateRequestPrimitive(vc_request.primitive.requestPrimitive);
mcaPortIn.send(f_getMsgOutPrimitive(m_response(vc_response.primitive.responsePrimitive)));
}
[] mcaPortIn.receive(mw_request(mw_create)) -> value vc_request {
tc_ac.stop;
//Send response
v_resourceIndex := f_processCreateRequestPrimitive(vc_request.primitive.requestPrimitive);
mcaPortIn.send(f_getMsgOutPrimitive(m_response(vc_response.primitive.responsePrimitive)));
tc_ac.start;
repeat;
}
[] tc_ac.timeout{
setverdict(fail, __SCOPE__ & " : Timeout due to no required request received from SUT");
}
}
// Postamble
f_cf03Down();
}
function f_AE_HAIM_CRE_006(in universal charstring p_action, in template UtTriggerPrimitive p_utRequest, in template RequestPrimitive p_requestPrimitive1, in template RequestPrimitive p_requestPrimitive2, in template RequestPrimitive p_requestPrimitive3) runs on CseSimu {
var integer v_resourceIndex := -1;
var integer v_parentResourceIndex := -1;
//Test component configuration
f_cf03Up();
//send triggering primitive to SUT
p_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(-, -, -);
p_requestPrimitive1.to_ := p_utRequest.requestPrimitive.to_;
f_sendUtPrimitive(p_utRequest,p_action & f_getLocalResourceAddress(-, -, -));
//device model creation handler
v_parentResourceIndex := f_ae_createResourceHandler(p_requestPrimitive1);
p_requestPrimitive2.primitiveContent.flexContainer.parentID := f_getResourceAddress(v_parentResourceIndex);
p_requestPrimitive3.primitiveContent.flexContainer.parentID := "undefined";
//Test behavior
tc_ac.start;
alt{
[] mcaPortIn.receive(mw_request(p_requestPrimitive3)) -> value vc_request {
tc_ac.stop;
setverdict(pass, __SCOPE__ & " : Action creation request is accepted");
v_resourceIndex := f_processCreateRequestPrimitive(vc_request.primitive.requestPrimitive);
mcaPortIn.send(f_getMsgOutPrimitive(m_response(vc_response.primitive.responsePrimitive)));
}
[] mcaPortIn.receive(mw_request(p_requestPrimitive2)) -> value vc_request {
tc_ac.stop;
//Send response
v_resourceIndex := f_processCreateRequestPrimitive(vc_request.primitive.requestPrimitive);
mcaPortIn.send(f_getMsgOutPrimitive(m_response(vc_response.primitive.responsePrimitive)));
p_requestPrimitive3.primitiveContent.flexContainer.parentID := f_getResourceAddress(v_resourceIndex);
tc_ac.start;
repeat;
}
[] mcaPortIn.receive(mw_request(mw_create)) -> value vc_request {
tc_ac.stop;
//Send response
v_resourceIndex := f_processCreateRequestPrimitive(vc_request.primitive.requestPrimitive);
mcaPortIn.send(f_getMsgOutPrimitive(m_response(vc_response.primitive.responsePrimitive)));
tc_ac.start;
repeat;
}
[] tc_ac.timeout{
setverdict(fail, __SCOPE__ & " : Timeout due to no request received from SUT");
}
......@@ -810,7 +906,7 @@ module OneM2M_PermutationFunctions {
// Postamble
f_cf03Down();
}
}
}//end group Create
......
......@@ -490,8 +490,8 @@ module OneM2M_Testcases_AE_Release_3 {
testcase TC_AE_HAIM_CRE_002_TTH() runs on Tester system AeSystem {
var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
var template UtTriggerPrimitive v_utRequest := m_utCreateDeviceThermostat ;
var template RequestPrimitive v_requestPrimitive1 := mw_createDeviceThermostat ;
var template UtTriggerPrimitive v_utRequest := m_utCreateDeviceThermostat;
var template RequestPrimitive v_requestPrimitive1 := mw_createDeviceThermostat;
var template RequestPrimitive v_requestPrimitive2 := mw_createTemperature;
var universal charstring v_action := __SCOPE__ & ": Please, send a valid CREATE Request for deviceThermostat device model to ";
......@@ -692,10 +692,139 @@ module OneM2M_Testcases_AE_Release_3 {
group g_AE_HAIM_CRE_005 {
testcase TC_AE_HAIM_CRE_005_ACT() runs on Tester system AeSystem {
var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
var template UtTriggerPrimitive v_utRequest := m_utCreateDeviceAirConditioner;
var template RequestPrimitive v_requestPrimitive1 := mw_createDeviceAirConditioner;
var template RequestPrimitive v_requestPrimitive2 := mw_createTemperature;
var universal charstring v_action := __SCOPE__ & ": Please, send a valid CREATE Request for deviceAirConditioner device model to ";
var XSD.AnyURI v_containerDefinition1 := "org.onem2m.home.device.deviceAirConditioner";
var XSD.AnyURI v_containerDefinition2 := "org.onem2m.home.moduleclass.temperature";
v_utRequest.requestPrimitive.primitiveContent.flexContainer.containerDefinition := v_containerDefinition1;
v_requestPrimitive1.primitiveContent.flexContainer.containerDefinition := v_containerDefinition2;
v_requestPrimitive2.primitiveContent.flexContainer.containerDefinition := v_containerDefinition2;
v_cse1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_CSE1));
v_cse1.done;
v_cse1.start(f_AE_HAIM_CRE_005(v_action, v_utRequest, v_requestPrimitive1, v_requestPrimitive2));
v_cse1.done;
}
testcase TC_AE_HAIM_CRE_005_ACU() runs on Tester system AeSystem {
var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
var template UtTriggerPrimitive v_utRequest := m_utCreateDeviceAirConditioner;
var template RequestPrimitive v_requestPrimitive1 := mw_createDeviceAirConditioner;
var template RequestPrimitive v_requestPrimitive2 := mw_createTurbo;
var universal charstring v_action := __SCOPE__ & ": Please, send a valid CREATE Request for deviceAirConditioner device model to ";
var XSD.AnyURI v_containerDefinition1 := "org.onem2m.home.device.deviceAirConditioner";
var XSD.AnyURI v_containerDefinition2 := "org.onem2m.home.moduleclass.turbo";
v_utRequest.requestPrimitive.primitiveContent.flexContainer.containerDefinition := v_containerDefinition1;
v_requestPrimitive1.primitiveContent.flexContainer.containerDefinition := v_containerDefinition2;
v_requestPrimitive2.primitiveContent.flexContainer.containerDefinition := v_containerDefinition2;
v_cse1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_CSE1));
v_cse1.done;
v_cse1.start(f_AE_HAIM_CRE_005(v_action, v_utRequest, v_requestPrimitive1, v_requestPrimitive2));
v_cse1.done;
}
testcase TC_AE_HAIM_CRE_005_ACW() runs on Tester system AeSystem {
var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
var template UtTriggerPrimitive v_utRequest := m_utCreateDeviceAirConditioner;
var template RequestPrimitive v_requestPrimitive1 := mw_createDeviceAirConditioner;
var template RequestPrimitive v_requestPrimitive2 := mw_createAirFlow;
var universal charstring v_action := __SCOPE__ & ": Please, send a valid CREATE Request for deviceAirConditioner device model to ";
var XSD.AnyURI v_containerDefinition1 := "org.onem2m.home.device.deviceAirConditioner";
var XSD.AnyURI v_containerDefinition2 := "org.onem2m.home.moduleclass.airFlow";
v_utRequest.requestPrimitive.primitiveContent.flexContainer.containerDefinition := v_containerDefinition1;
v_requestPrimitive1.primitiveContent.flexContainer.containerDefinition := v_containerDefinition2;
v_requestPrimitive2.primitiveContent.flexContainer.containerDefinition := v_containerDefinition2;
v_cse1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_CSE1));
v_cse1.done;
v_cse1.start(f_AE_HAIM_CRE_005(v_action, v_utRequest, v_requestPrimitive1, v_requestPrimitive2));
v_cse1.done;
}
testcase TC_AE_HAIM_CRE_005_CWS() runs on Tester system AeSystem {
var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
var template UtTriggerPrimitive v_utRequest := m_utCreateDeviceClothesWasherDryer;
var template RequestPrimitive v_requestPrimitive1 := mw_createDeviceClothesWasherDryer;
var template RequestPrimitive v_requestPrimitive2 := mw_createSpinLevel;
var universal charstring v_action := __SCOPE__ & ": Please, send a valid CREATE Request for deviceClothesWasher device model to ";
var XSD.AnyURI v_containerDefinition1 := "org.onem2m.home.device.deviceClothesWasherDryer";
var XSD.AnyURI v_containerDefinition2 := "org.onem2m.home.moduleclass.spinLevel";
v_utRequest.requestPrimitive.primitiveContent.flexContainer.containerDefinition := v_containerDefinition1;
v_requestPrimitive1.primitiveContent.flexContainer.containerDefinition := v_containerDefinition2;
v_requestPrimitive2.primitiveContent.flexContainer.containerDefinition := v_containerDefinition2;
v_cse1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_CSE1));
v_cse1.done;
v_cse1.start(f_AE_HAIM_CRE_005(v_action, v_utRequest, v_requestPrimitive1, v_requestPrimitive2));
v_cse1.done;
}
testcase TC_AE_HAIM_CRE_005_CWW() runs on Tester system AeSystem {
var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
var template UtTriggerPrimitive v_utRequest := m_utCreateDeviceClothesWasherDryer;
var template RequestPrimitive v_requestPrimitive1 := mw_createDeviceClothesWasherDryer;
var template RequestPrimitive v_requestPrimitive2 := mw_createWaterFlow;
var universal charstring v_action := __SCOPE__ & ": Please, send a valid CREATE Request for deviceClothesWasher device model to ";
var XSD.AnyURI v_containerDefinition1 := "org.onem2m.home.device.deviceClothesWasherDryer";
var XSD.AnyURI v_containerDefinition2 := "org.onem2m.home.moduleclass.waterFlow";
v_utRequest.requestPrimitive.primitiveContent.flexContainer.containerDefinition := v_containerDefinition1;
v_requestPrimitive1.primitiveContent.flexContainer.containerDefinition := v_containerDefinition2;
v_requestPrimitive2.primitiveContent.flexContainer.containerDefinition := v_containerDefinition2;
v_cse1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_CSE1));
v_cse1.done;
v_cse1.start(f_AE_HAIM_CRE_005(v_action, v_utRequest, v_requestPrimitive1, v_requestPrimitive2));
v_cse1.done;
}
}//end group g_AE_HAIM_CRE_005
group g_AE_HAIM_CRE_006 {
/*testcase TC_AE_HAIM_CRE_006_ACT() runs on Tester system AeSystem {
var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
var template UtTriggerPrimitive v_utRequest := m_utCreateDeviceAirConditioner;
var template RequestPrimitive v_requestPrimitive1 := mw_createDeviceAirConditioner ;
var template RequestPrimitive v_requestPrimitive2 := mw_createTemperature;
var template RequestPrimitive v_requestPrimitive3 := mw_createTemperature;
var universal charstring v_action := __SCOPE__ & ": Please, send a valid CREATE Request for deviceAirConditioner device model to ";
var XSD.AnyURI v_containerDefinition1 := "org.onem2m.home.device.deviceAirConditioner";
var XSD.AnyURI v_containerDefinition2 := "org.onem2m.home.moduleclass.temperature";
var XSD.AnyURI v_containerDefinition3 := "org.onem2m.home.moduleclass.temperature";
v_utRequest.requestPrimitive.primitiveContent.flexContainer.containerDefinition := v_containerDefinition1;
v_requestPrimitive1.primitiveContent.flexContainer.containerDefinition := v_containerDefinition2;
v_requestPrimitive2.primitiveContent.flexContainer.containerDefinition := v_containerDefinition2;
v_requestPrimitive3.primitiveContent.flexContainer.containerDefinition := v_containerDefinition3;
v_cse1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_CSE1));
v_cse1.done;
v_cse1.start(f_AE_HAIM_CRE_006(v_action, v_utRequest, v_requestPrimitive1, v_requestPrimitive2));
v_cse1.done;
}*/
}//end group g_AE_HAIM_CRE_006
} //end group HAIM
......
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