LibItsFntp_TypesAndValues.ttcn3 4.72 KB
Newer Older
/**
 *  @author     ETSI / STF422_EETS
 *  @version    $URL:$
 *              $Id:$
 *  @desc       Types and constants definitions for Fast Networking & Transport layer Protocol (ISO 29281-2)
 */
module LibItsFntp_TypesAndValues {
    
    // LibCommon
    import from LibCommon_BasicTypesAndValues { 
        type UInt16 
    };
    
    // LibIts
    import from CALMllsap language "ASN.1:1997" {
        type
            INsapPrimitivesUp 
    };
    import from CALMfntp language "ASN.1:1997" {
        type 
            FNTPNPDU, 
            NFsapPrimitivesDown, NFsapPrimitivesUp, FNTPintForwarding, 
            PortNumber 
    };
    
    /**
     * @desc FNTP port values
     * @see ISO/CD 29281-2 Table 1 — FNTP endpoints identified by port numbers
     */
    group fntpPortsValues {
        
        /**
         * @desc Groupcast manager, i.e. Service Advertisement Message (SAM) endpoint
         */
        const UInt16 c_portSam := 0;
        
        /**
         * @desc dynamic port
         */
        const UInt16 c_portDyn := 128; 
        
        /**
         * @desc Low limit of reserved range
         */
        const UInt16 c_portReservedLow := 32717;
        /**
         * @desc High limit of reserved range
         */
        const UInt16 c_portReservedHigh := 32763;
        /**
         * @desc Inter ITS-SCU communications specified in ISO 24102-4
         */
        const UInt16 c_portIic := 32764;
        
        /**
         * @desc Shall be used to identify an ITS-SCU with functionality of an ITS-S router. These values shall be used only in the FNTP forwarding header
         */
        const UInt16 c_portRtr := 32765;
        
        /**
         * @desc Shall be used to identify an ITS-SCU with functionality of an ITS-S host. These values shall be used only in the FNTP forwarding header
         */
        const UInt16 c_portHst := 32766;
        
        /**
         * @desc Unknown or 'don't care' port
         */
        const UInt16 c_portNon := 32767;
        
    } // End of group fntpPortsValues
    
    group utPrimitives {
        
        /**
         * @desc Trigger to initialize the IUT.
         */
        type record UtFntpInitialize {
        }
        
        /**
         * @desc Events at the application layer of the IUT.
         */
        type union UtFntpEvent { // FIXME To be removed
            anytype noField
        }
        
        /**
         * @desc Send a XXX.request primitive to the IUT through a SAP.
         */
        type union UtFntpCommandRequest { 
            NFsapPrimitivesDown nfSapPrimitives
        }
        
        /**
         * @desc Receive a XXX.confirm primitive from the IUT through a SAP.
         */
        type union UtFntpCommandConfirm { 
            NFsapPrimitivesUp nfSapPrimitives
        }
        
        /**
         * @desc Receive a XXX.indication command from the IUT through a SAP.
         */
        type union UtFntpCommandIndication { 
            NFsapPrimitivesUp nfSapPrimitives
        }
        
    } // End of group utPrimitives

    group acPrimitives {
        
        /**
         * @desc    TA primitives for FNTP
         * @member acGenerateFntpNPDU       To generate a station-internal FNTP NDPU
         * @member acGenerateSamMessagePdu  To generate a SAM message
         * @member acGenerateCtxMessagePDU  To generate a CTX message
         */
        type union AcFntpPrimitive { 
            AcGenerateFntpNpdu acGenerateFntpNpdu,
            acGenerateSamMessagePdu acGenerateSamMessagePdu,
            AcGenerateCtxMessagePdu acGenerateCtxMessagePdu
        }
        
        /**
         * @desc    Primitive for receiveing response from TA
         */
        type union AcFntpResponse { // FIXME To be removed
            anytype noField
        }
        
        /**
         * @desc    Primitive for TA to generate a station-internal FNTP NDPU
         * @member  fntpNPDU Number of hops. This parameter shall be set to zero for single hop
         */
        type record AcGenerateFntpNpdu {
            INsapPrimitivesUp fntpNPDU
        }
        
        /**
         * @desc    Generate a SAM message
         * @member  samPDU  The SAM pdu
         */
        type record acGenerateSamMessagePdu {
            INsapPrimitivesUp samPdu
        }
        
        /**
         * @desc    Generate a CTX message
         * @member  ctxPDU  The CTX pdu
         */
        type record AcGenerateCtxMessagePdu {
            INsapPrimitivesUp ctxPdu
        }
        
    } // End of group acPrimitives

}
with {
    encode "LibItsFntp_TypesAndValues"
} //End of module LibItsFntp_TypesAndValues