LibItsCommon_TypesAndValues.ttcn 5.44 KB
Newer Older
garciay's avatar
garciay committed
 *  @author      ETSI / STF405 / STF449 / STF484 / STF517
 *  @version     $URL$
 *               $Id$
 *  @desc        Module containing common types and values for ITS Protocols
garciay's avatar
garciay committed
 *  @copyright   ETSI Copyright Notification
 *               No part may be reproduced except as authorized by written permission.
 *               The copyright and the foregoing restriction extend to reproduction in all media.
 *               All rights reserved.
 *
 */
module LibItsCommon_TypesAndValues {
    
garciay's avatar
garciay committed
    // LibCommon
    import from LibCommon_DataStrings all;
    
    // LibIts
    import from ITS_Container language "ASN.1:1997" all;

    group acPrimitives {
        /**
         * @desc TA primitives for security support
         * @member acSetCertificate     Primitive used to activate security support
         * @member acDisableSecurity    Primitive used to deactiate security support
         */
        type union AcSecPrimitive {
            AcEnableSecurity acEnableSecurity,
            AcDisableSecurity acDisableSecurity
        } // End of type AcSecPrimitive
        
        /**
         * @desc    Primitive used to activate security support
         * @member  certificateId The certificate identifier to be used
        type record AcEnableSecurity {
            charstring certificateId,
            boolean    enforceSecurity
        } // End of type AcEnableSecurity
        /**
         * @desc    Primitive used to deactiate security support
         */
        type record AcDisableSecurity {
            boolean disable
        } // End of type AcDisableSecurity
        
        /**
         * @desc    Primitive for receiving response from TA
         */
//FIXME RGY As discussed, type is changed to a type derived from AdapterControlResults   
//        type boolean AcSecResponse;
        type AdapterControlResults.acSecResponse AcSecResponse;
         * @desc    TA primitives for GNSS
         * @member  loadScenario                -
         * @member  startScenario               -
         * @member  stopScenario                -
         * @member  distanceCovered             -
         */
        type union AcGnssPrimitive {
            AcLoadScenario loadScenario,
            AcStartScenario startScenario,
            AcStopScenario stopScenario,
            AcDistanceToCover distanceToCover,
            AcChangeSpeed changeSpeed,
            AcChangeHeading changeHeading
        }
        
        /**
         * @desc    Primitive for receiving response from TA
         */
//FIXME RGY As discussed, Commom adapter control results are collected to a top-level union type
        type union AdapterControlResults {
          boolean acGnssResponse,
          boolean acGnssDistanceCovered,
          boolean acSecResponse
        }
        
//FIXME RGY As discussed, boolean results are replaced by related fields of the top-level reult union
//        type boolean AcGnssResponse;
        type AdapterControlResults.acGnssResponse AcGnssResponse;
        
        /**
         * @desc    Primitive for receiving an indication if requested distance was covered from TA
         */
//FIXME RGY As discussed, boolean results are replaced by related fields of the top-level reult union
//        type boolean AcGnssDistanceCovered;
        type AdapterControlResults.acGnssDistanceCovered AcGnssDistanceCovered;
        
        /**
         * @desc    Primitive for loading a scenario
         * @member  scenario   Scenario to load
         */
        type record AcLoadScenario {
            Scenario scenario
        }
        
        type enumerated Scenario {
            e_staticPosition(0),
            e_dynamicPosition200m(200),
            e_dynamicPosition1000m(1000),
            e_dynamicPosition1500m(1500)
        }
        
        /**
         * @desc    Primitive for starting the loaded scenario
         */
        type record AcStartScenario {
        }
        
        /**
         * @desc    Primitive for stopping the loaded scenario
         */
        type record AcStopScenario {
        }
        
        /**
         * @desc Primitive to inform when given distance was covered
         */
        type record AcDistanceToCover {
            float distance
        }
        
        /**
         * @desc Primitive to change speed in current scenario
         */
        type record AcChangeSpeed {
            SpeedValue deltaSpeed
        }
        
        /**
         * @desc Primitive to change heading in current scenario
         */
        type record AcChangeHeading {
            HeadingValue deltaHeading
        }
        
    } // end acPrimitives
    with {
        encode "AdapterControl"
    }
garciay's avatar
garciay committed

    /**
     * @see ETSI TS 102 965 Intelligent Transport Systems (ITS); Application Object Identifier (ITS-AID); Registration list ETSI ITS registration list
     */
    group securityConstants {
		const integer c_its_aid_CAM   := 36; 
		const integer c_its_aid_DENM  := 37; 
		const integer c_its_aid_SPAT  := 137; 
		const integer c_its_aid_MAP   := 138; 
		const integer c_its_aid_IVI   := 139; 
garciay's avatar
garciay committed
    const integer c_its_aid_TLC   := 140;
    const integer c_its_aid_GN    := 141;
		const integer c_its_aid_SCR   := 623; // Secured Certificate Request, https://standards.ieee.org/products-services/regauth/psid/public.html
}
with {
    encode "LibItsCommon"
}