Loading ttcn/CALM/FNTP/LibItsFntp_Templates.ttcn3 +3 −1 Original line number Diff line number Diff line Loading @@ -15,6 +15,8 @@ module LibItsFntp_Templates { type Oct1 }; // LibIts // LibItsCalm import from CALMllsap language "ASN.1:1997" { type Loading ttcn/CALM/FSAP/LibItsFsap_Functions.ttcn3 +38 −3 Original line number Diff line number Diff line Loading @@ -30,6 +30,7 @@ module LibItsFsap_Functions { }; import from CALMfsap language "ASN.1:1997" { type GCsam, GCschedule, ServiceDataReg, ServiceList }; import from CALMmsap language "ASN.1:1997" { Loading Loading @@ -65,6 +66,7 @@ module LibItsFsap_Functions { // Map map(self:acPort, system:acPort); map(self:utPort, system:utPort); map(self:cfPort, system:cfPort); // TODO To be removed map(self:mgtMfSapPort, system:mgtMfSapPort); // Connect Loading Loading @@ -100,8 +102,9 @@ module LibItsFsap_Functions { // Map map(self:acPort, system:acPort); map(self:utPort, system:utPort); map(self:cfPort, system:cfPort); // TODO To be removed map(self:mgtMfSapPort, system:mgtMfSapPort); map(self:iicpPort, system:iicpPort); // map(self:iicpPort, system:iicpPort); // Connect f_connect4SelfOrClientSync(); Loading @@ -127,6 +130,7 @@ module LibItsFsap_Functions { // Unmap unmap(self:acPort, system:acPort); unmap(self:utPort, system:utPort); unmap(self:cfPort, system:cfPort); // TODO To be removed unmap(self:mgtMfSapPort, system:mgtMfSapPort); // Disconnect Loading @@ -144,8 +148,9 @@ module LibItsFsap_Functions { // Unmap unmap(self:acPort, system:acPort); unmap(self:utPort, system:utPort); unmap(self:cfPort, system:cfPort); // TODO To be removed unmap(self:mgtMfSapPort, system:mgtMfSapPort); unmap(self:iicpPort, system:iicpPort); // unmap(self:iicpPort, system:iicpPort); // Disconnect f_disconnect4SelfOrClientSync(); Loading Loading @@ -223,6 +228,36 @@ module LibItsFsap_Functions { } // End of group testerFunctions group internalFunctions { // TODO Use parametrized function (ETSI ES 202 784) insetad of the three oct2xxx functions /** * @desc This function convert the specified octetstring into a template (GCsam) * This SHALL be done due to the ASN.1 description of IN-SAP service primitives DL_Unitdata_request/DL_Unitdata_indication * @param p_data An octetstring to decode * @param p_syncPoint Current synchronisation point, required to set verdict according to the LibCommon rules * @param p_decoded The decoded message * @verdict Unchanged on success, set to fail otherwise * @see ISO/CD 21218 - Clause 8.2.2 */ function f_oct2gcSam(in octetstring p_data, in charstring p_syncPoint, out GCsam p_decoded) runs on ItsMgt { var bitstring v_data; var integer v_result; // log("*** f_oct2gcSam: INFO: pdu: " & oct2str(p_data) & " ***"); v_data := oct2bit(p_data); v_result := decvalue(v_data, p_decoded); if (v_result == 1) { log("*** f_oct2gcSam: FAIL: 'decvalue' operation failed ***"); f_selfOrClientSyncAndVerdictTestBody(p_syncPoint, e_error); } else if (v_result == 2) { log("*** f_oct2gcSam: FAIL: 'decvalue' operation failed, not enougth bits ***"); f_selfOrClientSyncAndVerdictTestBody(p_syncPoint, e_error); } log("*** f_oct2gcSam: INFO: Decoded message done ***"); } // End of function f_oct2gcSam } // End of group internalFunctions group iutFunctions { /** Loading ttcn/CALM/FSAP/LibItsFsap_Pixits.ttcn3 +23 −0 Original line number Diff line number Diff line Loading @@ -32,6 +32,29 @@ module LibItsFsap_Pixits { c_portNon }; /** * @desc Source and destination Ports * @see ISO/WD 29281-2 Clause 6.2.2.2 */ group portNumbers { /** * @desc Indicate the application port number, used instead of c_portDyn */ modulepar PortNumber PX_APP_PORT_NUMBER := { portLong := 12345 } ; /** * @desc Indicate the source port number, i.e. the local endpoint */ modulepar PortNumber PX_LOCAL_PORT_NUMBER := { portLong := 5555 } ; /** * @desc Indicate the destination port number, i.e. the peer ITS-SP */ modulepar PortNumber PX_REMOTE_PORT_NUMBER := { portLong := 5556 } ; } // End of group portNumbers /** * @desc Local settings */ Loading ttcn/CALM/FSAP/LibItsFsap_Templates.ttcn3 +58 −8 Original line number Diff line number Diff line Loading @@ -5,8 +5,11 @@ * @desc Templates definitions for Fast service advertisement protocol (ISO 24102-5) */ module LibItsFsap_Templates { // LibCommon // LibIts // LibItsCalm import from CALMmanagement language "ASN.1:1997" { type ApplicationID, Loading @@ -28,11 +31,13 @@ module LibItsFsap_Templates { type LLserviceAddr, Link_ID, UserPriority, INsapPrimitivesUp, INsapPrimitivesDown INsapPrimitivesUp, INsapPrimitivesDown, IN_UNITDATA_request, IN_UNITDATA_indication }; import from CALMfntp language "ASN.1:1997" { type PortNumber, ITSfpdu, NFsapPrimitivesUp, NFsapPrimitivesDown }; import from CALMfsap language "ASN.1:1997" { Loading @@ -51,7 +56,7 @@ module LibItsFsap_Templates { import from LibItsFsap_Pixits { modulepar PX_FMTID_CTX, PX_VERSION_FSAP, PX_FMTID_SAM, PX_USER_PRIORITY PX_USER_PRIORITY, PX_REMOTE_PORT_NUMBER }; import from LibItsCalm_Pixits { modulepar Loading Loading @@ -129,6 +134,44 @@ module LibItsFsap_Templates { } // End of group inSapPrimitives /** * @desc Primitive on IN-SAP interface * @see ISO/CD 21218 - Clause 8.3 * @see ISO/CD 29281-2 - Clause 7.1.2 */ group nfSapPrimitives { group recvOperation { /** * @desc Receive template for a SAP primitive message on IN-SAP interface * @param p_inUnitdataRq The IN-DATA.request SAP primitive message * @see ISO/CD 21218 - Clause 8.3.1 * @see ISO/CD 29281-2 - Clause 7.1.2 */ template (present) NFsapPrimitivesDown mw_fsapNfSapPrimitiveReq( in template (present) PortNumber p_servicePort, in template (present) Link_ID p_linkId, in template (present) ITSfpdu p_data ) := { spRef := 1, servPrimitive := { NFfntpCommRequest := { commRef := ?, servicePort := p_servicePort, remotePort := PX_REMOTE_PORT_NUMBER, linkID := p_linkId, data := p_data, priority := PX_USER_PRIORITY, controlField := ? } // End of field 'NFfntpCommRequest' } // End of field 'servPrimitive' } // End of template mw_fsapNfSapPrimitiveReq } // End of group recvOperation } // End of group nfSapPrimitives /** * @desc Templates used to * <li>trigger message on Upper Tester</li> Loading Loading @@ -196,6 +239,13 @@ module LibItsFsap_Templates { servPrimitive := { GCregServer := p_gcRegServer } } // End of template m_generateGcRegServerReq template FAsapPrimitivesDown mw_faSapPrimitivesDown_gcRegServer( in template (present) GCregServer p_gcRegServer ) := { spRef := 3, servPrimitive := { GCregServer := p_gcRegServer } } // End of template mw_faSapPrimitivesDown_gcRegServer /** * @desc Send a GCregServer registration request for an ITS-S application * @param p_applicationId The Application ID Loading ttcn/CALM/LibItsCalm_Interface.ttcn +1 −1 Original line number Diff line number Diff line Loading @@ -179,7 +179,7 @@ module LibItsCalm_Interface { */ type port FsapPort message { in FntpInd; FsapInd; out FsapReq; } // End of port FsapPort Loading Loading
ttcn/CALM/FNTP/LibItsFntp_Templates.ttcn3 +3 −1 Original line number Diff line number Diff line Loading @@ -15,6 +15,8 @@ module LibItsFntp_Templates { type Oct1 }; // LibIts // LibItsCalm import from CALMllsap language "ASN.1:1997" { type Loading
ttcn/CALM/FSAP/LibItsFsap_Functions.ttcn3 +38 −3 Original line number Diff line number Diff line Loading @@ -30,6 +30,7 @@ module LibItsFsap_Functions { }; import from CALMfsap language "ASN.1:1997" { type GCsam, GCschedule, ServiceDataReg, ServiceList }; import from CALMmsap language "ASN.1:1997" { Loading Loading @@ -65,6 +66,7 @@ module LibItsFsap_Functions { // Map map(self:acPort, system:acPort); map(self:utPort, system:utPort); map(self:cfPort, system:cfPort); // TODO To be removed map(self:mgtMfSapPort, system:mgtMfSapPort); // Connect Loading Loading @@ -100,8 +102,9 @@ module LibItsFsap_Functions { // Map map(self:acPort, system:acPort); map(self:utPort, system:utPort); map(self:cfPort, system:cfPort); // TODO To be removed map(self:mgtMfSapPort, system:mgtMfSapPort); map(self:iicpPort, system:iicpPort); // map(self:iicpPort, system:iicpPort); // Connect f_connect4SelfOrClientSync(); Loading @@ -127,6 +130,7 @@ module LibItsFsap_Functions { // Unmap unmap(self:acPort, system:acPort); unmap(self:utPort, system:utPort); unmap(self:cfPort, system:cfPort); // TODO To be removed unmap(self:mgtMfSapPort, system:mgtMfSapPort); // Disconnect Loading @@ -144,8 +148,9 @@ module LibItsFsap_Functions { // Unmap unmap(self:acPort, system:acPort); unmap(self:utPort, system:utPort); unmap(self:cfPort, system:cfPort); // TODO To be removed unmap(self:mgtMfSapPort, system:mgtMfSapPort); unmap(self:iicpPort, system:iicpPort); // unmap(self:iicpPort, system:iicpPort); // Disconnect f_disconnect4SelfOrClientSync(); Loading Loading @@ -223,6 +228,36 @@ module LibItsFsap_Functions { } // End of group testerFunctions group internalFunctions { // TODO Use parametrized function (ETSI ES 202 784) insetad of the three oct2xxx functions /** * @desc This function convert the specified octetstring into a template (GCsam) * This SHALL be done due to the ASN.1 description of IN-SAP service primitives DL_Unitdata_request/DL_Unitdata_indication * @param p_data An octetstring to decode * @param p_syncPoint Current synchronisation point, required to set verdict according to the LibCommon rules * @param p_decoded The decoded message * @verdict Unchanged on success, set to fail otherwise * @see ISO/CD 21218 - Clause 8.2.2 */ function f_oct2gcSam(in octetstring p_data, in charstring p_syncPoint, out GCsam p_decoded) runs on ItsMgt { var bitstring v_data; var integer v_result; // log("*** f_oct2gcSam: INFO: pdu: " & oct2str(p_data) & " ***"); v_data := oct2bit(p_data); v_result := decvalue(v_data, p_decoded); if (v_result == 1) { log("*** f_oct2gcSam: FAIL: 'decvalue' operation failed ***"); f_selfOrClientSyncAndVerdictTestBody(p_syncPoint, e_error); } else if (v_result == 2) { log("*** f_oct2gcSam: FAIL: 'decvalue' operation failed, not enougth bits ***"); f_selfOrClientSyncAndVerdictTestBody(p_syncPoint, e_error); } log("*** f_oct2gcSam: INFO: Decoded message done ***"); } // End of function f_oct2gcSam } // End of group internalFunctions group iutFunctions { /** Loading
ttcn/CALM/FSAP/LibItsFsap_Pixits.ttcn3 +23 −0 Original line number Diff line number Diff line Loading @@ -32,6 +32,29 @@ module LibItsFsap_Pixits { c_portNon }; /** * @desc Source and destination Ports * @see ISO/WD 29281-2 Clause 6.2.2.2 */ group portNumbers { /** * @desc Indicate the application port number, used instead of c_portDyn */ modulepar PortNumber PX_APP_PORT_NUMBER := { portLong := 12345 } ; /** * @desc Indicate the source port number, i.e. the local endpoint */ modulepar PortNumber PX_LOCAL_PORT_NUMBER := { portLong := 5555 } ; /** * @desc Indicate the destination port number, i.e. the peer ITS-SP */ modulepar PortNumber PX_REMOTE_PORT_NUMBER := { portLong := 5556 } ; } // End of group portNumbers /** * @desc Local settings */ Loading
ttcn/CALM/FSAP/LibItsFsap_Templates.ttcn3 +58 −8 Original line number Diff line number Diff line Loading @@ -5,8 +5,11 @@ * @desc Templates definitions for Fast service advertisement protocol (ISO 24102-5) */ module LibItsFsap_Templates { // LibCommon // LibIts // LibItsCalm import from CALMmanagement language "ASN.1:1997" { type ApplicationID, Loading @@ -28,11 +31,13 @@ module LibItsFsap_Templates { type LLserviceAddr, Link_ID, UserPriority, INsapPrimitivesUp, INsapPrimitivesDown INsapPrimitivesUp, INsapPrimitivesDown, IN_UNITDATA_request, IN_UNITDATA_indication }; import from CALMfntp language "ASN.1:1997" { type PortNumber, ITSfpdu, NFsapPrimitivesUp, NFsapPrimitivesDown }; import from CALMfsap language "ASN.1:1997" { Loading @@ -51,7 +56,7 @@ module LibItsFsap_Templates { import from LibItsFsap_Pixits { modulepar PX_FMTID_CTX, PX_VERSION_FSAP, PX_FMTID_SAM, PX_USER_PRIORITY PX_USER_PRIORITY, PX_REMOTE_PORT_NUMBER }; import from LibItsCalm_Pixits { modulepar Loading Loading @@ -129,6 +134,44 @@ module LibItsFsap_Templates { } // End of group inSapPrimitives /** * @desc Primitive on IN-SAP interface * @see ISO/CD 21218 - Clause 8.3 * @see ISO/CD 29281-2 - Clause 7.1.2 */ group nfSapPrimitives { group recvOperation { /** * @desc Receive template for a SAP primitive message on IN-SAP interface * @param p_inUnitdataRq The IN-DATA.request SAP primitive message * @see ISO/CD 21218 - Clause 8.3.1 * @see ISO/CD 29281-2 - Clause 7.1.2 */ template (present) NFsapPrimitivesDown mw_fsapNfSapPrimitiveReq( in template (present) PortNumber p_servicePort, in template (present) Link_ID p_linkId, in template (present) ITSfpdu p_data ) := { spRef := 1, servPrimitive := { NFfntpCommRequest := { commRef := ?, servicePort := p_servicePort, remotePort := PX_REMOTE_PORT_NUMBER, linkID := p_linkId, data := p_data, priority := PX_USER_PRIORITY, controlField := ? } // End of field 'NFfntpCommRequest' } // End of field 'servPrimitive' } // End of template mw_fsapNfSapPrimitiveReq } // End of group recvOperation } // End of group nfSapPrimitives /** * @desc Templates used to * <li>trigger message on Upper Tester</li> Loading Loading @@ -196,6 +239,13 @@ module LibItsFsap_Templates { servPrimitive := { GCregServer := p_gcRegServer } } // End of template m_generateGcRegServerReq template FAsapPrimitivesDown mw_faSapPrimitivesDown_gcRegServer( in template (present) GCregServer p_gcRegServer ) := { spRef := 3, servPrimitive := { GCregServer := p_gcRegServer } } // End of template mw_faSapPrimitivesDown_gcRegServer /** * @desc Send a GCregServer registration request for an ITS-S application * @param p_applicationId The Application ID Loading
ttcn/CALM/LibItsCalm_Interface.ttcn +1 −1 Original line number Diff line number Diff line Loading @@ -179,7 +179,7 @@ module LibItsCalm_Interface { */ type port FsapPort message { in FntpInd; FsapInd; out FsapReq; } // End of port FsapPort Loading