Loading ttcn/LibSmartAppliances/SmartAppliances_Functions.ttcn +36 −4 Original line number Diff line number Diff line Loading @@ -8,6 +8,10 @@ */ module SmartAppliances_Functions { import from SmartAppliances_TestSystem {type SmartAppliancesTester;} import from XSD all; // LibOneM2M import from OneM2M_TestSystem all; import from OneM2M_Functions all; Loading @@ -16,11 +20,12 @@ module SmartAppliances_Functions { // LibSmartAppliances import from SmartAppliances_Templates all; import from SmartAppliances_Types all; group configFunctions { /** * @desc Ports mapping and default behaviour activation for Config XX * @desc Ports mapping and default behaviour activation for Config 03 */ function f_cf03Up() runs on AeTester system AeSystem { Loading @@ -30,7 +35,7 @@ module SmartAppliances_Functions { } /** * @desc Ports unmapping for Config XX * @desc Ports unmapping for Config 03 */ function f_cf03Down() runs on AeTester system AeSystem { Loading Loading @@ -94,8 +99,7 @@ module SmartAppliances_Functions { v_ae.resourceName := "ae" & int2char(v_resourceId); v_request.primitive.requestPrimitive.primitiveContent.any_1[0].AE_optional := v_ae; // FIXME ask oneM2M to have f_setResource running on Tester //f_setResource(v_request.primitive.requestPrimitive.primitiveContent, -1); f_setResource(v_request.primitive.requestPrimitive.primitiveContent, -1); mcaPort.send(m_response(m_responsePrimitive_content(int2001, v_request.primitive.requestPrimitive.requestIdentifier, v_request.primitive.requestPrimitive.primitiveContent))); log("Preamble: Application registered successfuly"); Loading Loading @@ -125,6 +129,32 @@ module SmartAppliances_Functions { } // end aeFunctions group rdfFunctions { function f_checkRdfDescriptor(in XSD.Base64Binary p_receivedDescriptor, in template RdfDocument p_expectedRdfDescriptor, out charstring p_verdictMsg) runs on SmartAppliancesTester return verdicttype { var bitstring v_encodedDescriptor; var RdfDocument v_decodedDescriptor; v_encodedDescriptor := fx_base64ToBitstring(p_receivedDescriptor); if(decvalue(v_encodedDescriptor, v_decodedDescriptor) > 0 ) { p_verdictMsg := "ERROR: unable to decode RDF data"; return inconc; } else { if(match(v_decodedDescriptor, p_expectedRdfDescriptor)) { p_verdictMsg := "INFO: Correct descriptor content"; return pass; } else { p_verdictMsg := "ERROR: Incorrect descriptor content"; return fail; } } } } // end refFunctions group externalFunctions { /** Loading @@ -133,5 +163,7 @@ module SmartAppliances_Functions { */ external function fx_generateTimestamp() return charstring; external function fx_base64ToBitstring(in XSD.Base64Binary p_base64) return bitstring; } } No newline at end of file ttcn/LibSmartAppliances/SmartAppliances_Pics.ttcn 0 → 100644 +15 −0 Original line number Diff line number Diff line /** * * @author ETSI / STF510 * @version $URL$ * $Id$ * @desc Module containing test PICS mnemonics for SmartAppliances * */ module SmartAppliances_Pics { modulepar boolean PICS_SAP_AE := true; modulepar boolean PICS_SAP_SERVICE := true; modulepar boolean PICS_SAP_DEVICE := true; } No newline at end of file ttcn/LibSmartAppliances/SmartAppliances_Pixits.ttcn 0 → 100644 +15 −0 Original line number Diff line number Diff line /** * * @author ETSI / STF510 * @version $URL$ * $Id$ * @desc Module containing test PIXITS mnemonics for SmartAppliances * */ module SmartAppliances_Pixits { import from XSD all; modulepar XSD.AnyURI PX_DEVICE_URI := "WASH_XYZ_123"; // TODO: should be a PICS => update PICS document } No newline at end of file ttcn/LibSmartAppliances/SmartAppliances_Types.ttcn +28 −0 Original line number Diff line number Diff line Loading @@ -52,4 +52,32 @@ module SmartAppliances_Types { }; } // end optionalResourceTypes group rdf { type set of RdfTriple RdfDocument; type record RdfTriple { RdfSubject subject, RdfPredicate predicate, RdfObject object } type XSD.AnyURI RdfSubject; type XSD.AnyURI RdfPredicate; type union RdfObject { XSD.AnyURI iri_, XSD.String string_, XSD.Boolean boolean_, XSD.Integer integer_, XSD.Decimal decimal_, XSD.Double double_, XSD.Date date_, XSD.DateTime dateTime_, XSD.Time time_ } } // end rdf } No newline at end of file ttcn/SmartAppliances_TestControl.ttcn +17 −2 Original line number Diff line number Diff line Loading @@ -9,11 +9,26 @@ module SmartAppliances_TestControl { import from SmartAppliances_Testcases all; import from SmartAppliances_Pics all; control { if(PICS_SAP_AE == true) { execute(TC_SAP_SAREF_BV_001()); execute(TC_SAP_SAREF_BV_002()); execute(TC_SAP_SAREF_BV_003()); execute(TC_SAP_SAREF_BV_004()); //execute(TC_SAP_SAREF_BV_005()); // Not implemented if(PICS_SAP_DEVICE == true) { execute(TC_SAP_SAREF_BV_006_01()); } if(PICS_SAP_SERVICE == true) { execute(TC_SAP_SAREF_BV_007_01()); execute(TC_SAP_SAREF_BV_007_02()); } } } } No newline at end of file Loading
ttcn/LibSmartAppliances/SmartAppliances_Functions.ttcn +36 −4 Original line number Diff line number Diff line Loading @@ -8,6 +8,10 @@ */ module SmartAppliances_Functions { import from SmartAppliances_TestSystem {type SmartAppliancesTester;} import from XSD all; // LibOneM2M import from OneM2M_TestSystem all; import from OneM2M_Functions all; Loading @@ -16,11 +20,12 @@ module SmartAppliances_Functions { // LibSmartAppliances import from SmartAppliances_Templates all; import from SmartAppliances_Types all; group configFunctions { /** * @desc Ports mapping and default behaviour activation for Config XX * @desc Ports mapping and default behaviour activation for Config 03 */ function f_cf03Up() runs on AeTester system AeSystem { Loading @@ -30,7 +35,7 @@ module SmartAppliances_Functions { } /** * @desc Ports unmapping for Config XX * @desc Ports unmapping for Config 03 */ function f_cf03Down() runs on AeTester system AeSystem { Loading Loading @@ -94,8 +99,7 @@ module SmartAppliances_Functions { v_ae.resourceName := "ae" & int2char(v_resourceId); v_request.primitive.requestPrimitive.primitiveContent.any_1[0].AE_optional := v_ae; // FIXME ask oneM2M to have f_setResource running on Tester //f_setResource(v_request.primitive.requestPrimitive.primitiveContent, -1); f_setResource(v_request.primitive.requestPrimitive.primitiveContent, -1); mcaPort.send(m_response(m_responsePrimitive_content(int2001, v_request.primitive.requestPrimitive.requestIdentifier, v_request.primitive.requestPrimitive.primitiveContent))); log("Preamble: Application registered successfuly"); Loading Loading @@ -125,6 +129,32 @@ module SmartAppliances_Functions { } // end aeFunctions group rdfFunctions { function f_checkRdfDescriptor(in XSD.Base64Binary p_receivedDescriptor, in template RdfDocument p_expectedRdfDescriptor, out charstring p_verdictMsg) runs on SmartAppliancesTester return verdicttype { var bitstring v_encodedDescriptor; var RdfDocument v_decodedDescriptor; v_encodedDescriptor := fx_base64ToBitstring(p_receivedDescriptor); if(decvalue(v_encodedDescriptor, v_decodedDescriptor) > 0 ) { p_verdictMsg := "ERROR: unable to decode RDF data"; return inconc; } else { if(match(v_decodedDescriptor, p_expectedRdfDescriptor)) { p_verdictMsg := "INFO: Correct descriptor content"; return pass; } else { p_verdictMsg := "ERROR: Incorrect descriptor content"; return fail; } } } } // end refFunctions group externalFunctions { /** Loading @@ -133,5 +163,7 @@ module SmartAppliances_Functions { */ external function fx_generateTimestamp() return charstring; external function fx_base64ToBitstring(in XSD.Base64Binary p_base64) return bitstring; } } No newline at end of file
ttcn/LibSmartAppliances/SmartAppliances_Pics.ttcn 0 → 100644 +15 −0 Original line number Diff line number Diff line /** * * @author ETSI / STF510 * @version $URL$ * $Id$ * @desc Module containing test PICS mnemonics for SmartAppliances * */ module SmartAppliances_Pics { modulepar boolean PICS_SAP_AE := true; modulepar boolean PICS_SAP_SERVICE := true; modulepar boolean PICS_SAP_DEVICE := true; } No newline at end of file
ttcn/LibSmartAppliances/SmartAppliances_Pixits.ttcn 0 → 100644 +15 −0 Original line number Diff line number Diff line /** * * @author ETSI / STF510 * @version $URL$ * $Id$ * @desc Module containing test PIXITS mnemonics for SmartAppliances * */ module SmartAppliances_Pixits { import from XSD all; modulepar XSD.AnyURI PX_DEVICE_URI := "WASH_XYZ_123"; // TODO: should be a PICS => update PICS document } No newline at end of file
ttcn/LibSmartAppliances/SmartAppliances_Types.ttcn +28 −0 Original line number Diff line number Diff line Loading @@ -52,4 +52,32 @@ module SmartAppliances_Types { }; } // end optionalResourceTypes group rdf { type set of RdfTriple RdfDocument; type record RdfTriple { RdfSubject subject, RdfPredicate predicate, RdfObject object } type XSD.AnyURI RdfSubject; type XSD.AnyURI RdfPredicate; type union RdfObject { XSD.AnyURI iri_, XSD.String string_, XSD.Boolean boolean_, XSD.Integer integer_, XSD.Decimal decimal_, XSD.Double double_, XSD.Date date_, XSD.DateTime dateTime_, XSD.Time time_ } } // end rdf } No newline at end of file
ttcn/SmartAppliances_TestControl.ttcn +17 −2 Original line number Diff line number Diff line Loading @@ -9,11 +9,26 @@ module SmartAppliances_TestControl { import from SmartAppliances_Testcases all; import from SmartAppliances_Pics all; control { if(PICS_SAP_AE == true) { execute(TC_SAP_SAREF_BV_001()); execute(TC_SAP_SAREF_BV_002()); execute(TC_SAP_SAREF_BV_003()); execute(TC_SAP_SAREF_BV_004()); //execute(TC_SAP_SAREF_BV_005()); // Not implemented if(PICS_SAP_DEVICE == true) { execute(TC_SAP_SAREF_BV_006_01()); } if(PICS_SAP_SERVICE == true) { execute(TC_SAP_SAREF_BV_007_01()); execute(TC_SAP_SAREF_BV_007_02()); } } } } No newline at end of file