LibItsFntp_Pixits.ttcn3 10.7 KB
Newer Older
/**
 *  @author     ETSI / STF422_EETS
 *  @version    $URL:$
 *              $Id:$
 *  @desc       FAST networking & transport layer protocol (ISO 29281-2) Pixits
 */
module LibItsFntp_Pixits {
    
    // LibCommon
    import from LibCommon_DataStrings {
        type Bit6, Bit7
    };
    
    // LibIts
    import from CITSapplMgmtApplReg language "ASN.1:1997" {
        type ITSaid
    };
    import from CALMmanagement language "ASN.1:1997" {
        type 
            ITS_scuId, StationID
    };
    import from CALMllsap language "ASN.1:1997" {
        type
            EUI64, 
            UserPriority, Link_ID
    };
    import from CALMfntp language "ASN.1:1997" {
        type
            PortNumber, ITSfpdu, FNTPhopCount,
            RXcip, TXcip
    };
    import from CALMlegacySupport language "ASN.1:1997" {
        type FNTPlpp
    };
    
    /**
     * @desc Service reference value used bu NF-FNTP-PORT.request SAP primitive
     */
    group defaultSettings {
        
        /**
         * @desc Defines a number uniquely identifying the endpoint at this host in an implementation specific way
         * @see ISO 29281-2 - Clause 8.2.1 Link Identifier
         */
        modulepar integer PX_SERVICE_REF := 0;
        
        /**
         * @desc Defines the value to set to fill field for NFsapPrimitivesUp primitive
         * @see ISO 29281-2 - Clause 8.2.1 Link Identifier
         */
        modulepar Bit6 PX_NF_SAP_UP_FILL_FIELD_VALUE := '000000'B;
        
        /**
         * @desc Defines the value to set to fill field for NFsapPrimitivesDown primitive
         * @see ISO 29281-2 - Clause 8.2.1 Link Identifier
         */
        modulepar Bit7 PX_NF_SAP_DOWN_FILL_FIELD_VALUE := '0000000'B;
        
        /**
garciay's avatar
garciay committed
         * @desc ITS-SP payload
         * For instance, a DENM messages associated to a Slow vehicle in ASN.1 PER encoding
         */
        modulepar ITSfpdu PX_ITS_FPDU := '00010134fb9f45cb400001246000dfe0269f7405c100003e002d80000000000000000013880000007ffd00a0000000400000000013880085a80000001000000000000000ff000800000134fb9f45cb'O;
         
        /**
         * @desc The user priority as specified in ISO 21218
         */
        modulepar UserPriority PX_USER_PRIORITY := 0;
        
        /**
garciay's avatar
garciay committed
         * @desc The ITS-SCU-ID of the host ITS-SCU
         */
        modulepar ITS_scuId PX_HOST_SCU_ID := 0;
        
        /**
garciay's avatar
garciay committed
         * @desc The ITS-SCU-ID of an unknown host ITS-SCU
         */
        modulepar ITS_scuId PX_UNKNOWN_HOST_SCU_ID := 255;
        
    } // End of group defaultSettings
    
    /**
     * @desc 64 bits MAC addresses for local CIs/VCIs for ITS_S host
     */
    group localMACCommunication {
        
        /**
         * @desc Identifies the CI on ITS-S host 
         * @see ISO 21218 - Clause 6.2 Link Identifier 
         */
        modulepar EUI64 PX_SRC_LOCAL_CIID := '0000000000000000'O; 
        
garciay's avatar
garciay committed
         * @desc Identifies an unknown CI on ITS-S host 
         */
        modulepar EUI64 PX_SRC_LOCAL_CIID_UNKNOWN := 'DEADBEEFDEADBABE'O;
        
        /**
         * @desc Identifies a different VCI on ITS-S host/router only 
         * @see ISO 21218 - Clause 6.2 Link Identifier 
         */
        modulepar EUI64 PX_SRC_DIFFERENT_LOCAL_CIID := '0000000000000001'O; 
        
        /**
         * @desc Identifies the VCI for broadcast on ITS-S host 
         */
        modulepar EUI64 PX_SRC_REMOTE_CIID_BC := '0000000000000000'O;
        
        /**
         * @desc Identifies the VCI for multicast on ITS-S host 
         */
        modulepar EUI64 PX_SRC_REMOTE_CIID_MC := '0000000000000000'O;
        
        /**
         * @desc Unicast (peer to peer)
         */
        modulepar EUI64 PX_SRC_REMOTE_CIID_UC := '0000000000000000'O;
        
        /**
         * @desc Identifies a second VCI for unicast (peer to peer) on ITS-S host 
         */
        modulepar EUI64 PX_SRC_SECOND_REMOTE_CIID_UC := '0000000000000000'O;
        
    } // End of group localMACCommunication
    
    /**
     * @desc 64 bits MAC addresses for remote/peer ITS-S station
     */
    group remoteMACCommunication {
        
        /**
         * @desc Identifies uniquely a specific CI in a specific "ITS-S Communication Unit"
         * @see ISO 21218 - Clause 6.2 Link Identifier
         */
        modulepar EUI64 PX_DEST_LOCAL_CIID := '0000000000000000'O;
        
        /**
garciay's avatar
garciay committed
         * @desc Identifies uniquely a specific CI in a specific "ITS-S Communication Unit" for broadcast
         */
        modulepar EUI64 PX_DEST_REMOTE_CIID_BC := '0000000000000000'O;
        
        /**
garciay's avatar
garciay committed
         * @desc Identifies uniquely a specific CI in a specific "ITS-S Communication Unit" for multicast
         */
        modulepar EUI64 PX_DEST_REMOTE_CIID_MC := '0000000000000000'O;
        
        /**
garciay's avatar
garciay committed
         * @desc Identifies uniquely a specific CI in a specific "ITS-S Communication Unit" for unicast (peer to peer)
         */
        modulepar EUI64 PX_DEST_REMOTE_CIID_UC := '0000000000000000'O;
        
    } // End of remoteMACCommunication
    
    /**
     * @desc 64 bits MAC addresses for router CIs
     */
    group routerMACCommunication {
        
    } // End of routerMACCommunication
    
    /**
     * @desc Contains the Link Identifier parameters for broadcast, Multicast and unicast modes
     * @see ISO 21218 Clause 6.2
     * Notes:
     * <li>vciID Identifies the MAC address of the Communication Interface identified by the CIID</li>
     * <li>CIID Identifies the Communication Interface of the ITS-SCU. 0 indicates unknown or not existent</li>
     * <li>scuID Identifies the ITS-SCU in the ITS station</li>
     */
    group linkIDs {
        
        /**
         * @desc Identify the VCI to be used to transmit the packet, i.e. the peer station, for Broadcast
         */
        modulepar Link_ID PX_LINK_ID_BC := {
            remoteCIID := PX_SRC_REMOTE_CIID_BC,
            localCIID := PX_SRC_LOCAL_CIID
        }
        
        /**
         * @desc Identify a second VCI to be used to transmit the packet, i.e. the peer station, for Broadcast
         */
        modulepar Link_ID PX_LINK_ID_BC_WITH_SECOND_SCU_ID := {
            remoteCIID := PX_SRC_REMOTE_CIID_BC,
            localCIID := PX_SRC_DIFFERENT_LOCAL_CIID
        }
        
        /**
         * @desc Identify the VCI to be used to transmit the packet, i.e. the peer station, for Multicast
         */
        modulepar Link_ID PX_LINK_ID_MC := {
            remoteCIID := PX_SRC_REMOTE_CIID_MC,
            localCIID := PX_SRC_LOCAL_CIID
        }
        
        /**
         * @desc Identify an unknown VCI to be used to transmit the packet, i.e. the peer station, for Broadcast
         */
        modulepar Link_ID PX_LINK_ID_UNKWNON_BC := {
            remoteCIID := PX_SRC_REMOTE_CIID_BC,
            localCIID := PX_SRC_LOCAL_CIID_UNKNOWN
        }
        
        /**
         * @desc Identify an unknown VCI to be used to transmit the packet, i.e. the peer station, for Unicast
        modulepar Link_ID PX_LINK_ID_UNKWNON_UC := {
            remoteCIID := PX_SRC_REMOTE_CIID_UC,
            localCIID := PX_SRC_LOCAL_CIID_UNKNOWN
        }
        
        /**
         * @desc Identify the VCI to be used to transmit the packet, i.e. the peer station, for Unicast
         */
        modulepar Link_ID PX_LINK_ID_UC := {
            remoteCIID := PX_SRC_REMOTE_CIID_UC,
            localCIID := PX_SRC_LOCAL_CIID
        }
        
    } // End of group linkIDs
    
    group stationIDs {
        
        /**
         * @desc Unknwon remote station ID
         */
        modulepar StationID PX_STATION_ID_UNKNOWN := '00AA00AA'O;
        
    } // End of group stationIDs
    
    /**
     * @desc    Source and destination Ports
     * @see     ISO/WD 29281-2 Clause 6.2.2.2
     */
        /**
         * @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 } ;
        
        /**
         * @desc Indicate a second destination port number
         */
        modulepar PortNumber PX_SECOND_REMOTE_PORT_NUMBER := { portLong := 5556 } ;
        
        /**
         * @desc Indicate an unknown destination port number
         */
        modulepar PortNumber PX_UNKNOWN_REMOTE_PORT_NUMBER := { portLong := 666 } ;
        
        /**
         * @desc Indicate the forwarding source port number, i.e. the originator endpoint
         * @see ISO/CD 29281-2 Clause 8.3.1
         */
        modulepar PortNumber PX_FORWARDING_SRC_PORT := { portLong := 5550 } ;
        
        /**
         * @desc Indicate the forwarding destination port number, i.e. the destinator endpoint
         * @see ISO/CD 29281-2 Clause 8.3.1
         */
        modulepar PortNumber PX_FORWARDING_DST_PORT := { portLong := 5551 } ;
        
        /**
         * @desc Indicate the forwarding destination port number, i.e. the destinator endpoint
         * @see ISO/CD 29281-2 Clause 8.3.1
         */
        modulepar PortNumber PX_SERVICE_PORT := { portLong := 32700 } ;
        
    } // End of group portNumbers
    
    group hopsConstants {
        
        /**
         * Single hop value
         * @see ISO/CD 29281-2 Clause 8.3.1 NF-FNTP-COMM.request
         */
        modulepar FNTPhopCount PX_SHOP := 0;
        
        /**
         * N hops value
         * @see ISO/CD 29281-2 Clause 8.3.1 NF-FNTP-COMM.request
         */
        modulepar FNTPhopCount PX_NHOPS := 5;
        
    } // End of group hopsConstants
    
    group cipConstants {
        
        /**
         *  Access parameters settigs for reception
         * @see ISO/CD 29281-2 Clause 7.10.1 Purpose of CIPs
         */
        modulepar RXcip PX_CIP_RX_SETTINGS := 'CAFEDECA'O;
        
        /**
         * Access parameters settigs for transmission
         * @see ISO/CD 29281-2 Clause 7.10.1 Purpose of CIPs
         */
        modulepar TXcip PX_CIP_TX_SETTINGS := 'C0CAC01A'O;
        
    } // End of group cipConstants
    
    /**
     * Wait until the IUT is in a stable situation (beaconing...)
     */
    modulepar float PX_WAIT_FOR_IUT_READY := 1.0;
} // End of module LibItsFntp_Pixits