LibItsFsap_Pixits.ttcn3 10.8 KB
Newer Older
garciay's avatar
garciay committed
/**
filatov's avatar
filatov committed
 *  @version    $URL$
 *              $Id$
garciay's avatar
garciay committed
 *  @desc       Fast service advertisement protocol (ISO 24102-5) Pixits
 */
module LibItsFsap_Pixits {
    
    // LibCommon
    
    // LibIts
    import from CALMllsap language "ASN.1:1997" all;
    import from CITSapplMgmtApplReg language "ASN.1:1997" {
garciay's avatar
garciay committed
    import from CALMmanagement language "ASN.1:1997" {
        type 
garciay's avatar
garciay committed
    };
    import from CALMfsap language "ASN.1:1997" {
        type 
garciay's avatar
garciay committed
            ApplicationID, 
            GCsched, NonipService, ServiceDataReg 
garciay's avatar
garciay committed
    };
    import from CALMfntp language "ASN.1:1997" {
        type 
            PortNumber 
    };
garciay's avatar
garciay committed
    
    /**
     * @desc Local settings
     */
    group local {
        
        /**
         * @desc Identifies the CI on ITS-S host 
         * @see ISO 21218 - Clause 6.2 Link Identifier 
garciay's avatar
garciay committed
         */
        modulepar EUI64 PX_WL_LOCAL_CIID := '03000AFFFFFF0000'O; 
garciay's avatar
garciay committed
        
        /**
garciay's avatar
garciay committed
         */
        modulepar EUI64 PX_SRC_REMOTE_CIID := 'FF000AFFFFFFFFFF'O;
garciay's avatar
garciay committed
        
        /**
         * @desc Priority of the ITS-S application
garciay's avatar
garciay committed
         */
        modulepar UserPriority PX_USER_PRIORITY := 0; 
garciay's avatar
garciay committed
        
    } // End of group local
    
    group cRegServer {
garciay's avatar
garciay committed
        
garciay's avatar
garciay committed
         * @desc The service provider ITS station
        modulepar StationID PX_SERVER_ID := '11111111'O;
garciay's avatar
garciay committed
         * @desc The service client ITS station
        modulepar StationID PX_CLIENT_ID := '22222222'O;
        
        /**
         * @desc The globally unique ITS-AID of the ITS-S application
         */
        modulepar ITSaid PX_ITS_AID := { content := 8 }
        /**
         * @desc An unknown ITS-AID of the ITS-S application
         */
        modulepar ITSaid PX_UNKNOWN_ITS_AID := { content := 126 }
        
        /**
         * @desc    A session port value
        modulepar PortNumber PX_SESSION_PORT := { portLong := 1234 }
        
         * @desc    An unspecified session port value
        modulepar PortNumber PX_NO_SESSION_PORT := { portLong := c_portNon }
         * @desc    An unnknown session port value
         */
        modulepar PortNumber PX_UNKNOWN_SESSION_PORT := { portLong := 1234 }
        
        /**
         * @desc    ITS application object ID (ITS-AID) for GCregServer MF-REQUEST 
         * @see     ISO 24102-5 Clause 8.3.1 Groupcast registration
        modulepar ApplicationID PX_APPLICATION_ID := {
garciay's avatar
garciay committed
            hostITS_scuId := 1,
            seqNumber := 1
        }
        
        /**
         * @desc    ITS application object ID (ITS-AID) for GCregClient MF-REQUEST 
         * @see     ISO EN 17419
         * @see     ISO 24102-5 Clause 8.3.1 Groupcast registration
         */
        modulepar ApplicationID PX_CLIENT_APPLICATION_ID := {
            hostITS_scuId := 2,
            seqNumber := 2
        }
        
garciay's avatar
garciay committed
         * @desc    Scheduling information for registration / deregistration request in order to select the proper VCI in the ITS-station for communication
         * 'medium' field indicates a request of specific access technology
         * @see ISO/CD 24102-5 Clause 8.2.4 Groupcast communication management
        modulepar GCsched PX_GSCHED_ACCESS_TECH_NONIP := {
            medium := 128, // FIXME Check why TTwb raises an error using MedType_iso15628_ 
            directivity := {
                mode := 0, // FIXME Check why TTwb raises an error using DirMode_fixed_ 
                dirPredef := 0,
                fill := '0000000'B, 
                dirVar := { }
            }, // End of field 'directivity'
            gcInterval := 1
        } // End of modulepar PX_GSCHED_ACCESS_TECH_NONIP
garciay's avatar
garciay committed
         * @desc    Scheduling information for registration / deregistration request in order to select the proper VCI in the ITS-station for communication
         * 'medium' field indicates a request of an unknown access technology
         * @see ISO/CD 24102-5 Clause 8.2.4 Groupcast communication management
         */
        modulepar GCsched PX_GSCHED_ACCESS_UNKNOWN_TECH_NONIP := {
            medium := 254, // FIXME Check why TTwb raises an error using MedType_can_
                mode := 0, // FIXME Check why TTwb raises an error using DirMode.fixed_
                dirPredef := 0,
                fill := '0000000'B, 
                dirVar := { }
            }, // End of field 'directivity'
            gcInterval := 1
        } // End of modulepar PX_GSCHED_ACCESS_TECH_NONIP
        
        /**
garciay's avatar
garciay committed
         * @desc    Scheduling information for registration / deregistration request in order to select the proper VCI in the ITS-station for communication
         * 'medium' field indicates no request of specific access technology
         * @see ISO/CD 24102-5 Clause 8.2.4 Groupcast communication management
            medium := 1, // FIXME Check why TTwb raises an error using MedType_any_
                mode := 0, // FIXME Check why TTwb raises an error using DirMode_fixed_
                dirPredef := 0,
                fill := '0000000'B, 
                dirVar := { }
            }, // End of field 'directivity'
            gcInterval := 1
        } // End of modulepar PX_GSCHED_NONIP
        
         * @desc    Receive template for advertisement details with no session phase
        modulepar ServiceDataReg PX_SERVICE_DATA_REG_WITH_NO_SESSION_PHASE := {
            fill := '0000000'B, 
            datareg := {
                nonipData := {
                    serviceID := PX_ITS_AID, 
                    timeout_ := 100,
                    serviceData := ''O,
                    providerPort := PX_NO_SESSION_PORT
                } // End of field 'nonipData'
            } // End of field 'datareg'
        } // End of modulepar PX_SERVICE_DATA_REG_WITH_NO_SESSION_PHASE
        
         * @desc    Receive template for advertisement details with session phase
        modulepar ServiceDataReg PX_SERVICE_DATA_REG_WITH_SESSION_PHASE := {
            fill := '0000000'B, 
            datareg := {
                nonipData := {
                    serviceID := PX_ITS_AID, 
                    timeout_ := 100,
                    serviceData := ''O,
                } // End of field 'nonipData'
            } // End of field 'datareg'
        } // End of modulepar PX_SERVICE_DATA_REG_WITH_SESSION_PHASE
garciay's avatar
garciay committed
        
         * @desc    Receive template for advertisement details with session phase and channel change requested
        modulepar ServiceDataReg PX_SERVICE_DATA_REG_WITH_SESSION_PHASE_AND_CHANNEL_CHANGE := {
            fill := '0000000'B, 
            datareg := {
                nonipData := {
                    serviceID := PX_ITS_AID, 
                    timeout_ := 100,
                    serviceData := ''O,
                    providerPort := PX_SESSION_PORT
                } // End of field 'nonipData'
            } // End of field 'datareg'
        } // End of modulepar PX_SERVICE_DATA_REG_WITH_SESSION_PHASE_AND_CHANNEL_CHANGE
    } // End of group cRegServer
    
reinaortega's avatar
reinaortega committed
    group sam {
garciay's avatar
garciay committed
         * @desc    Non-IP information on services offered, with no session phase and no channel change requested
         * @see ISO 24102-5 Figure 9 — serviceList
         */
        modulepar NonipService PX_NO_IP_SERVICE_WITH_NO_SESSION_AND_NO_CHANGE_CHANNEL := {
            serviceID := PX_ITS_AID,
            serviceData := ''O,
            serverPort := PX_NO_SESSION_PORT,
            sessionChannel := 0
        } // End of modulepar PX_NO_IP_SERVICE_WITH_NO_SESSION_AND_NO_CHANGE_CHANNEL
        
        /**
garciay's avatar
garciay committed
         * @desc    Non-IP information on services offered, with session phase and no channel change requested
         * @see ISO 24102-5 Figure 9 — serviceList
         */
        modulepar NonipService PX_NO_IP_SERVICE_WITH_SESSION_AND_NO_CHANGE_CHANNEL := {
            serviceID := PX_ITS_AID,
            serviceData := ''O,
            serverPort := PX_SESSION_PORT,
            sessionChannel := 0
        } // End of modulepar PX_NO_IP_SERVICE_WITH_SESSION_AND_NO_CHANGE_CHANNEL
        
        /**
garciay's avatar
garciay committed
         * @desc    Non-IP information on services offered, with no session phase and channel change requested
         * @see ISO 24102-5 Figure 9 — serviceList
        modulepar NonipService PX_NO_IP_SERVICE_WITH_SESSION_AND_CHANNEL_CHANGE := {
            serviceID := PX_ITS_AID,
            serviceData := ''O,
            serverPort := PX_SESSION_PORT,
            sessionChannel := 1
        } // End of modulepar PX_NO_IP_SERVICE_WITH_SESSION_AND_CHANNEL_CHANGE
garciay's avatar
garciay committed
         * @desc    Non-IP information on an unknown services offered, with session phase and no channel change requested
         * @see ISO 24102-5 Figure 9 — serviceList
         */
        modulepar NonipService PX_NO_IP_SERVICE_WITH_UNKNOWN_SERVICE_ID := {
            serviceID := PX_UNKNOWN_ITS_AID,
            serviceData := ''O,
            serverPort := PX_SESSION_PORT,
            sessionChannel := 1
        } // End of modulepar PX_NO_IP_SERVICE_WITH_UNKNOWN_SERVICE_ID
        
        /**
garciay's avatar
garciay committed
         * @desc    Non-IP information on services offered, with session phase and channel change requested on an unknown channel
         * @see ISO 24102-5 Figure 9 — serviceList
         */
        modulepar NonipService PX_NO_IP_SERVICE_WITH_UNKNOWN_CHANNEL := {
            serviceID := PX_ITS_AID,
            serviceData := ''O,
            serverPort := PX_UNKNOWN_SESSION_PORT,
            sessionChannel := 1
        } // End of modulepar PX_NO_IP_SERVICE_WITH_UNKNOWN_CHANNEL
        
reinaortega's avatar
reinaortega committed
    } // End of group sam
garciay's avatar
garciay committed
    
    /**
     * Wait until the IUT is in a stable situation (beaconing...)
     */
    modulepar float PX_WAIT_FOR_IUT_READY := 1.0;
    
garciay's avatar
garciay committed
     * @desc    SAM tag identifier
     * @see ISO 24102-5 Clause 7.2.1 Overview
garciay's avatar
garciay committed
    modulepar FmtID PX_FMTID_SAM := 0; // FIXME Check why TTWB raises an error using CLAMfsap.FmtID_sam_
garciay's avatar
garciay committed
     * @desc    CTX tag identifier
     * @see ISO 24102-5 Clause 7.2.1 Overview
garciay's avatar
garciay committed
    modulepar FmtID PX_FMTID_CTX := 1; // FIXME Check why TTWB raises an error using CLAMfsap.FmtID_ctx_
garciay's avatar
garciay committed
     * @desc    FSAP version number
     * @see ISO 24102-5 Clause 7.2.2 Service advertisement message
garciay's avatar
garciay committed
} // End of module LibItsFsap_Pixits