From bc85e7754d0678f5f701f17c883642cb4efd5be6 Mon Sep 17 00:00:00 2001 From: berge Date: Mon, 12 Jul 2010 09:59:03 +0000 Subject: [PATCH] Implemented TC_DEN_EXTI_BV_01 --- ttcn/DENM/LibItsDenm_Functions.ttcn | 31 +++++++++++++++++++++++- ttcn/DENM/LibItsDenm_Templates.ttcn | 8 ++++++ ttcn/DENM/LibItsDenm_TypesAndValues.ttcn | 7 ++++++ 3 files changed, 45 insertions(+), 1 deletion(-) diff --git a/ttcn/DENM/LibItsDenm_Functions.ttcn b/ttcn/DENM/LibItsDenm_Functions.ttcn index d2ded69c..60527fcb 100644 --- a/ttcn/DENM/LibItsDenm_Functions.ttcn +++ b/ttcn/DENM/LibItsDenm_Functions.ttcn @@ -221,6 +221,23 @@ module LibItsDenm_Functions { return v_ret; } + + /** + * @desc Triggers event with expiration time information field included from the application layer + * @param p_event The event cause and subcause. + * @param p_expirationTime The expiration time. + * @return + */ + function f_triggerEventExpirationTime( + template (value) Situation p_event, + template (value) TimeStamp p_expirationTime + ) runs on ItsFa return FncRetCode { + var FncRetCode v_ret := e_success; + + //TODO raise action or send message via port + + return v_ret; + } /** * @desc Triggers event with additional Event Characteristics information field included from the application layer @@ -333,7 +350,7 @@ module LibItsDenm_Functions { group getFunctions { /** - * @desc Gets the station identifier to be used. + * @desc Gets the station identifier of IUT. * @return */ function f_getStationId() return StationID { @@ -356,6 +373,18 @@ module LibItsDenm_Functions { return v_eventPos; } + /** + * @desc Gets the current time + * @return + */ + function f_getCurrentTime() return TimeStamp { + var TimeStamp v_timeStamp; + + //TODO get the value from PIXIT or ... + + return v_timeStamp; + } + } // end group getFunctions } // end LibItsDenm_Functions \ No newline at end of file diff --git a/ttcn/DENM/LibItsDenm_Templates.ttcn b/ttcn/DENM/LibItsDenm_Templates.ttcn index 54f5f717..99722477 100644 --- a/ttcn/DENM/LibItsDenm_Templates.ttcn +++ b/ttcn/DENM/LibItsDenm_Templates.ttcn @@ -129,6 +129,14 @@ module LibItsDenm_Templates { isNegation := p_isNeg } + template DecentralizedSituationManagement mw_denmMgmtConWithExpiryTime( + template (present) DataVersion p_dataVersion, + template (value) StationID p_stationId, + template (present) DecentralizedSituationManagement.expiryTime p_expiryTime + ) modifies mw_denmMgmtCon := { + expiryTime := p_expiryTime + } + } // end group DecentralizedSituationManagementTemplates group DecentralizedSituationTemplates { diff --git a/ttcn/DENM/LibItsDenm_TypesAndValues.ttcn b/ttcn/DENM/LibItsDenm_TypesAndValues.ttcn index d98558a1..b3d73656 100644 --- a/ttcn/DENM/LibItsDenm_TypesAndValues.ttcn +++ b/ttcn/DENM/LibItsDenm_TypesAndValues.ttcn @@ -103,4 +103,11 @@ module LibItsDenm_TypesAndValues { } // end group denmConstants + group denmTimeConstants { + + // in milliseconds + const TimeStamp c_duration20s := 20000; + + } // end denmTimeConstants + } \ No newline at end of file -- GitLab