Commit cd54084a60e6e86cfa8e0baa2eab5da64ff6c542

Authored by Enrique Sabatel
1 parent 50376d18

added g_AE_HAIM_CRE_005 (partial)

... ... @@ -1644,6 +1644,37 @@ module OneM2M_Templates {
1644 1644 primitiveContent := {temperature := ?}
1645 1645 };
1646 1646  
  1647 + /**
  1648 + * @desc Reception template for CREATE Temperature
  1649 + */
  1650 + template RequestPrimitive mw_createTurbo(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_create := {
  1651 + resourceType := int28,
  1652 + primitiveContent := {turbo := ?}
  1653 + };
  1654 +
  1655 + /**
  1656 + * @desc Reception template for CREATE Temperature
  1657 + */
  1658 + template RequestPrimitive mw_createAirFlow(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_create := {
  1659 + resourceType := int28,
  1660 + primitiveContent := {airFlow := ?}
  1661 + };
  1662 +
  1663 + /**
  1664 + * @desc Reception template for CREATE Temperature
  1665 + */
  1666 + template RequestPrimitive mw_createSpinLevel(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_create := {
  1667 + resourceType := int28,
  1668 + primitiveContent := {spinLevel := ?}
  1669 + };
  1670 +
  1671 + /**
  1672 + * @desc Reception template for CREATE Temperature
  1673 + */
  1674 + template RequestPrimitive mw_createWaterFlow(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_create := {
  1675 + resourceType := int28,
  1676 + primitiveContent := {waterFlow := ?}
  1677 + };
1647 1678  
1648 1679 }//end group Create
1649 1680  
... ...
... ... @@ -2128,6 +2128,12 @@ type union PrimitiveContent {
2128 2128 EnergyGeneration energyGeneration,
2129 2129 EnergyConsumption energyConsumption,
2130 2130 Temperature temperature,
  2131 + Turbo turbo,
  2132 + AirFlow airFlow,
  2133 + SpinLevel spinLevel,
  2134 + WaterFlow waterFlow,
  2135 + Timer timerAction,
  2136 + TelevisionChannel televisionChannel,
2131 2137 //SecurityInfo
2132 2138 SecurityInfo securityInfo,
2133 2139 //TS-0004 - 7.5.2-1 Elements used for request content
... ...
... ... @@ -761,7 +761,7 @@ module OneM2M_PermutationFunctions {
761 761 mcaPortIn.send(f_getMsgOutPrimitive(m_response(valueof(m_responsePrimitive(int4004, vc_request.primitive.requestPrimitive.requestIdentifier, omit)))));
762 762 }
763 763 [] tc_ac.timeout{
764   - setverdict(fail, __SCOPE__ & " : Timeout due to no request received from SUT");
  764 + setverdict(fail, __SCOPE__ & " : Timeout due to no required request received from SUT");
765 765 }
766 766 }
767 767  
... ... @@ -804,13 +804,109 @@ module OneM2M_PermutationFunctions {
804 804 repeat;
805 805 }
806 806 [] tc_ac.timeout{
  807 + setverdict(fail, __SCOPE__ & " : Timeout due to no required request received from SUT");
  808 + }
  809 + }
  810 +
  811 + // Postamble
  812 + f_cf03Down();
  813 + }
  814 +
  815 + 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 {
  816 +
  817 + var integer v_resourceIndex := -1;
  818 + var integer v_parentResourceIndex := -1;
  819 +
  820 + //Test component configuration
  821 + f_cf03Up();
  822 +
  823 + //send triggering primitive to SUT
  824 + p_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(-, -, -);
  825 + p_requestPrimitive1.to_ := p_utRequest.requestPrimitive.to_;
  826 + f_sendUtPrimitive(p_utRequest,p_action & f_getLocalResourceAddress(-, -, -));
  827 +
  828 + //device model creation handler
  829 + v_parentResourceIndex := f_ae_createResourceHandler(p_requestPrimitive1);
  830 + p_requestPrimitive2.primitiveContent.flexContainer.parentID := f_getResourceAddress(v_parentResourceIndex);
  831 +
  832 + //Test behavior
  833 + tc_ac.start;
  834 + alt{
  835 + [] mcaPortIn.receive(mw_request(p_requestPrimitive2)) -> value vc_request {
  836 + tc_ac.stop;
  837 + setverdict(pass, __SCOPE__ & " : Module class creation request contains required DataPoints");
  838 + v_resourceIndex := f_processCreateRequestPrimitive(vc_request.primitive.requestPrimitive);
  839 + mcaPortIn.send(f_getMsgOutPrimitive(m_response(vc_response.primitive.responsePrimitive)));
  840 + }
  841 + [] mcaPortIn.receive(mw_request(mw_create)) -> value vc_request {
  842 + tc_ac.stop;
  843 + //Send response
  844 + v_resourceIndex := f_processCreateRequestPrimitive(vc_request.primitive.requestPrimitive);
  845 + mcaPortIn.send(f_getMsgOutPrimitive(m_response(vc_response.primitive.responsePrimitive)));
  846 + tc_ac.start;
  847 + repeat;
  848 + }
  849 + [] tc_ac.timeout{
  850 + setverdict(fail, __SCOPE__ & " : Timeout due to no required request received from SUT");
  851 + }
  852 + }
  853 +
  854 + // Postamble
  855 + f_cf03Down();
  856 + }
  857 +
  858 + 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 {
  859 +
  860 + var integer v_resourceIndex := -1;
  861 + var integer v_parentResourceIndex := -1;
  862 +
  863 + //Test component configuration
  864 + f_cf03Up();
  865 +
  866 + //send triggering primitive to SUT
  867 + p_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(-, -, -);
  868 + p_requestPrimitive1.to_ := p_utRequest.requestPrimitive.to_;
  869 + f_sendUtPrimitive(p_utRequest,p_action & f_getLocalResourceAddress(-, -, -));
  870 +
  871 + //device model creation handler
  872 + v_parentResourceIndex := f_ae_createResourceHandler(p_requestPrimitive1);
  873 + p_requestPrimitive2.primitiveContent.flexContainer.parentID := f_getResourceAddress(v_parentResourceIndex);
  874 + p_requestPrimitive3.primitiveContent.flexContainer.parentID := "undefined";
  875 +
  876 + //Test behavior
  877 + tc_ac.start;
  878 + alt{
  879 + [] mcaPortIn.receive(mw_request(p_requestPrimitive3)) -> value vc_request {
  880 + tc_ac.stop;
  881 + setverdict(pass, __SCOPE__ & " : Action creation request is accepted");
  882 + v_resourceIndex := f_processCreateRequestPrimitive(vc_request.primitive.requestPrimitive);
  883 + mcaPortIn.send(f_getMsgOutPrimitive(m_response(vc_response.primitive.responsePrimitive)));
  884 + }
  885 + [] mcaPortIn.receive(mw_request(p_requestPrimitive2)) -> value vc_request {
  886 + tc_ac.stop;
  887 + //Send response
  888 + v_resourceIndex := f_processCreateRequestPrimitive(vc_request.primitive.requestPrimitive);
  889 + mcaPortIn.send(f_getMsgOutPrimitive(m_response(vc_response.primitive.responsePrimitive)));
  890 + p_requestPrimitive3.primitiveContent.flexContainer.parentID := f_getResourceAddress(v_resourceIndex);
  891 + tc_ac.start;
  892 + repeat;
  893 + }
  894 + [] mcaPortIn.receive(mw_request(mw_create)) -> value vc_request {
  895 + tc_ac.stop;
  896 + //Send response
  897 + v_resourceIndex := f_processCreateRequestPrimitive(vc_request.primitive.requestPrimitive);
  898 + mcaPortIn.send(f_getMsgOutPrimitive(m_response(vc_response.primitive.responsePrimitive)));
  899 + tc_ac.start;
  900 + repeat;
  901 + }
  902 + [] tc_ac.timeout{
807 903 setverdict(fail, __SCOPE__ & " : Timeout due to no request received from SUT");
808 904 }
809 905 }
810 906  
811 907 // Postamble
812 908 f_cf03Down();
813   - }
  909 + }
814 910  
815 911 }//end group Create
816 912  
... ...
... ... @@ -490,8 +490,8 @@ module OneM2M_Testcases_AE_Release_3 {
490 490 testcase TC_AE_HAIM_CRE_002_TTH() runs on Tester system AeSystem {
491 491  
492 492 var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
493   - var template UtTriggerPrimitive v_utRequest := m_utCreateDeviceThermostat ;
494   - var template RequestPrimitive v_requestPrimitive1 := mw_createDeviceThermostat ;
  493 + var template UtTriggerPrimitive v_utRequest := m_utCreateDeviceThermostat;
  494 + var template RequestPrimitive v_requestPrimitive1 := mw_createDeviceThermostat;
495 495 var template RequestPrimitive v_requestPrimitive2 := mw_createTemperature;
496 496  
497 497 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 {
692 692  
693 693 group g_AE_HAIM_CRE_005 {
694 694  
  695 + testcase TC_AE_HAIM_CRE_005_ACT() runs on Tester system AeSystem {
  696 +
  697 + var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
  698 + var template UtTriggerPrimitive v_utRequest := m_utCreateDeviceAirConditioner;
  699 + var template RequestPrimitive v_requestPrimitive1 := mw_createDeviceAirConditioner;
  700 + var template RequestPrimitive v_requestPrimitive2 := mw_createTemperature;
  701 +
  702 + var universal charstring v_action := __SCOPE__ & ": Please, send a valid CREATE Request for deviceAirConditioner device model to ";
  703 + var XSD.AnyURI v_containerDefinition1 := "org.onem2m.home.device.deviceAirConditioner";
  704 + var XSD.AnyURI v_containerDefinition2 := "org.onem2m.home.moduleclass.temperature";
  705 + v_utRequest.requestPrimitive.primitiveContent.flexContainer.containerDefinition := v_containerDefinition1;
  706 + v_requestPrimitive1.primitiveContent.flexContainer.containerDefinition := v_containerDefinition2;
  707 + v_requestPrimitive2.primitiveContent.flexContainer.containerDefinition := v_containerDefinition2;
  708 +
  709 + v_cse1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_CSE1));
  710 + v_cse1.done;
  711 +
  712 + v_cse1.start(f_AE_HAIM_CRE_005(v_action, v_utRequest, v_requestPrimitive1, v_requestPrimitive2));
  713 + v_cse1.done;
  714 + }
  715 +
  716 + testcase TC_AE_HAIM_CRE_005_ACU() runs on Tester system AeSystem {
  717 +
  718 + var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
  719 + var template UtTriggerPrimitive v_utRequest := m_utCreateDeviceAirConditioner;
  720 + var template RequestPrimitive v_requestPrimitive1 := mw_createDeviceAirConditioner;
  721 + var template RequestPrimitive v_requestPrimitive2 := mw_createTurbo;
  722 +
  723 + var universal charstring v_action := __SCOPE__ & ": Please, send a valid CREATE Request for deviceAirConditioner device model to ";
  724 + var XSD.AnyURI v_containerDefinition1 := "org.onem2m.home.device.deviceAirConditioner";
  725 + var XSD.AnyURI v_containerDefinition2 := "org.onem2m.home.moduleclass.turbo";
  726 + v_utRequest.requestPrimitive.primitiveContent.flexContainer.containerDefinition := v_containerDefinition1;
  727 + v_requestPrimitive1.primitiveContent.flexContainer.containerDefinition := v_containerDefinition2;
  728 + v_requestPrimitive2.primitiveContent.flexContainer.containerDefinition := v_containerDefinition2;
  729 +
  730 + v_cse1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_CSE1));
  731 + v_cse1.done;
  732 +
  733 + v_cse1.start(f_AE_HAIM_CRE_005(v_action, v_utRequest, v_requestPrimitive1, v_requestPrimitive2));
  734 + v_cse1.done;
  735 + }
  736 +
  737 + testcase TC_AE_HAIM_CRE_005_ACW() runs on Tester system AeSystem {
  738 +
  739 + var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
  740 + var template UtTriggerPrimitive v_utRequest := m_utCreateDeviceAirConditioner;
  741 + var template RequestPrimitive v_requestPrimitive1 := mw_createDeviceAirConditioner;
  742 + var template RequestPrimitive v_requestPrimitive2 := mw_createAirFlow;
  743 +
  744 + var universal charstring v_action := __SCOPE__ & ": Please, send a valid CREATE Request for deviceAirConditioner device model to ";
  745 + var XSD.AnyURI v_containerDefinition1 := "org.onem2m.home.device.deviceAirConditioner";
  746 + var XSD.AnyURI v_containerDefinition2 := "org.onem2m.home.moduleclass.airFlow";
  747 + v_utRequest.requestPrimitive.primitiveContent.flexContainer.containerDefinition := v_containerDefinition1;
  748 + v_requestPrimitive1.primitiveContent.flexContainer.containerDefinition := v_containerDefinition2;
  749 + v_requestPrimitive2.primitiveContent.flexContainer.containerDefinition := v_containerDefinition2;
  750 +
  751 + v_cse1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_CSE1));
  752 + v_cse1.done;
  753 +
  754 + v_cse1.start(f_AE_HAIM_CRE_005(v_action, v_utRequest, v_requestPrimitive1, v_requestPrimitive2));
  755 + v_cse1.done;
  756 + }
  757 +
  758 + testcase TC_AE_HAIM_CRE_005_CWS() runs on Tester system AeSystem {
  759 +
  760 + var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
  761 + var template UtTriggerPrimitive v_utRequest := m_utCreateDeviceClothesWasherDryer;
  762 + var template RequestPrimitive v_requestPrimitive1 := mw_createDeviceClothesWasherDryer;
  763 + var template RequestPrimitive v_requestPrimitive2 := mw_createSpinLevel;
  764 +
  765 + var universal charstring v_action := __SCOPE__ & ": Please, send a valid CREATE Request for deviceClothesWasher device model to ";
  766 + var XSD.AnyURI v_containerDefinition1 := "org.onem2m.home.device.deviceClothesWasherDryer";
  767 + var XSD.AnyURI v_containerDefinition2 := "org.onem2m.home.moduleclass.spinLevel";
  768 + v_utRequest.requestPrimitive.primitiveContent.flexContainer.containerDefinition := v_containerDefinition1;
  769 + v_requestPrimitive1.primitiveContent.flexContainer.containerDefinition := v_containerDefinition2;
  770 + v_requestPrimitive2.primitiveContent.flexContainer.containerDefinition := v_containerDefinition2;
  771 +
  772 + v_cse1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_CSE1));
  773 + v_cse1.done;
  774 +
  775 + v_cse1.start(f_AE_HAIM_CRE_005(v_action, v_utRequest, v_requestPrimitive1, v_requestPrimitive2));
  776 + v_cse1.done;
  777 + }
  778 +
  779 + testcase TC_AE_HAIM_CRE_005_CWW() runs on Tester system AeSystem {
  780 +
  781 + var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
  782 + var template UtTriggerPrimitive v_utRequest := m_utCreateDeviceClothesWasherDryer;
  783 + var template RequestPrimitive v_requestPrimitive1 := mw_createDeviceClothesWasherDryer;
  784 + var template RequestPrimitive v_requestPrimitive2 := mw_createWaterFlow;
  785 +
  786 + var universal charstring v_action := __SCOPE__ & ": Please, send a valid CREATE Request for deviceClothesWasher device model to ";
  787 + var XSD.AnyURI v_containerDefinition1 := "org.onem2m.home.device.deviceClothesWasherDryer";
  788 + var XSD.AnyURI v_containerDefinition2 := "org.onem2m.home.moduleclass.waterFlow";
  789 + v_utRequest.requestPrimitive.primitiveContent.flexContainer.containerDefinition := v_containerDefinition1;
  790 + v_requestPrimitive1.primitiveContent.flexContainer.containerDefinition := v_containerDefinition2;
  791 + v_requestPrimitive2.primitiveContent.flexContainer.containerDefinition := v_containerDefinition2;
  792 +
  793 + v_cse1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_CSE1));
  794 + v_cse1.done;
  795 +
  796 + v_cse1.start(f_AE_HAIM_CRE_005(v_action, v_utRequest, v_requestPrimitive1, v_requestPrimitive2));
  797 + v_cse1.done;
  798 + }
  799 +
695 800 }//end group g_AE_HAIM_CRE_005
696 801  
697 802 group g_AE_HAIM_CRE_006 {
698 803  
  804 + /*testcase TC_AE_HAIM_CRE_006_ACT() runs on Tester system AeSystem {
  805 +
  806 + var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
  807 + var template UtTriggerPrimitive v_utRequest := m_utCreateDeviceAirConditioner;
  808 + var template RequestPrimitive v_requestPrimitive1 := mw_createDeviceAirConditioner ;
  809 + var template RequestPrimitive v_requestPrimitive2 := mw_createTemperature;
  810 + var template RequestPrimitive v_requestPrimitive3 := mw_createTemperature;
  811 +
  812 + var universal charstring v_action := __SCOPE__ & ": Please, send a valid CREATE Request for deviceAirConditioner device model to ";
  813 + var XSD.AnyURI v_containerDefinition1 := "org.onem2m.home.device.deviceAirConditioner";
  814 + var XSD.AnyURI v_containerDefinition2 := "org.onem2m.home.moduleclass.temperature";
  815 + var XSD.AnyURI v_containerDefinition3 := "org.onem2m.home.moduleclass.temperature";
  816 + v_utRequest.requestPrimitive.primitiveContent.flexContainer.containerDefinition := v_containerDefinition1;
  817 + v_requestPrimitive1.primitiveContent.flexContainer.containerDefinition := v_containerDefinition2;
  818 + v_requestPrimitive2.primitiveContent.flexContainer.containerDefinition := v_containerDefinition2;
  819 + v_requestPrimitive3.primitiveContent.flexContainer.containerDefinition := v_containerDefinition3;
  820 +
  821 + v_cse1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_CSE1));
  822 + v_cse1.done;
  823 +
  824 + v_cse1.start(f_AE_HAIM_CRE_006(v_action, v_utRequest, v_requestPrimitive1, v_requestPrimitive2));
  825 + v_cse1.done;
  826 + }*/
  827 +
699 828 }//end group g_AE_HAIM_CRE_006
700 829  
701 830 } //end group HAIM
... ...