Loading ttcn/DENM/LibItsDenm_Functions.ttcn +27 −168 Original line number Diff line number Diff line Loading @@ -30,6 +30,7 @@ module LibItsDenm_Functions { // map ports map(p_ptcDenm:denmPort, system:denmPort); map(p_ptcDenm:utPort, system:utPort); } // end f_ptcDenmUp Loading @@ -51,6 +52,7 @@ module LibItsDenm_Functions { } } unmap(p_ptcDenm:denmPort); unmap(p_ptcDenm:utPort); } // end f_ptcDenmDown Loading Loading @@ -137,7 +139,7 @@ module LibItsDenm_Functions { ); } else { v_ret := f_triggerEventCancellation(p_event); v_ret := f_utTriggerEvent(m_utEventCancellation(p_event, c_dataVersionCancellation)); } f_setVerdictPreOrPostamble(v_ret); Loading @@ -148,190 +150,47 @@ module LibItsDenm_Functions { group eventFunctions { //TODO check if type Situation is suitable /** * @desc Triggers event from the application layer * @param p_event The event cause and subcause. * @param p_event The event to trigger. * @return */ function f_triggerEvent(template (value) Situation p_event) runs on ItsFa return FncRetCode { function f_utTriggerEvent(template (value) UtEvent p_event) runs on ItsFa return FncRetCode { var FncRetCode v_ret := e_success; var UtTrigger v_utMsg := { p_event }; //TODO raise action or send message via port return v_ret; } /** * @desc Triggers cancellation event from the application layer * @param p_event The event cause and subcause. * @return */ function f_triggerEventCancellation(template (value) Situation p_event) runs on ItsFa return FncRetCode { var FncRetCode v_ret := e_success; var DataVersion v_dataVersion := c_dataVersionCancellation; //TODO raise action or send message via port return v_ret; } /** * @desc Triggers event negation from the application layer * @param p_event The event cause and subcause. * @return */ function f_triggerEventNegation(template (value) Situation p_event) runs on ItsFa return FncRetCode { var FncRetCode v_ret := e_success; var DecentralizedEnvironmentalNotificationMessage.management.isNegation v_isNegation := true; //TODO raise action or send message via port return v_ret; } /** * @desc Triggers event with additional TrafficFlowEffect information field included from the application layer * @param p_event The event cause and subcause. * @param p_tfe The Traffic Flow Effect. * @return */ function f_triggerEventTrafficFlowEffect( template (value) Situation p_event, template (value) TrafficFlowEffect p_tfe ) 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 LinkedCause information field included from the application layer * @param p_event The event cause and subcause. * @param p_linkedCause The linked event. * @return */ function f_triggerEventLinkedCause( template (value) Situation p_event, template (value) Situation p_linkedCause ) 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 expiration time information field and frequency information field * included from the application layer * @param p_event The event cause and subcause. * @param p_expirationTime The expiration time. * @param p_frequency The frequency. * @return */ function f_triggerEventExpirationTimeFrequency( template (value) Situation p_event, template (value) TimeStamp p_expirationTime, template (value) DecentralizedSituationManagement.frequency p_frequency ) runs on ItsFa return FncRetCode { var FncRetCode v_ret := e_success; //TODO raise action or send message via port utPort.send(v_utMsg); 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. * @desc Checks that the event was indicated at the application layer * @param p_event The event to check. * @return */ function f_triggerEventExpirationTime( template (value) Situation p_event, template (value) TimeStamp p_expirationTime ) runs on ItsFa return FncRetCode { function f_utCheckEvent(template (value) UtEvent p_event) runs on ItsFa return FncRetCode { var FncRetCode v_ret := e_success; //TODO raise action or send message via port return v_ret; } var UtCheck v_utMsg := { p_event }; /** * @desc Triggers update of event's expiration time * @param p_event The event cause and subcause. * @param p_expirationTime The new expiration time. * @return */ function f_triggerEventExpirationTimeUpdate( 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; utPort.send(v_utMsg); tc_ac.start; alt { [] utPort.receive(UtResult:true) { setverdict (pass, "Event correctly indicated at application layer"); v_ret := e_success; } /** * @desc Triggers event with additional Event Characteristics information field included from the application layer * @param p_event The event cause and subcause. * @param p_eventCharact The event characteristics. * @return */ function f_triggerEventEventCharact( template (value) Situation p_event, template (value) DecentralizedSituation.eventCharact p_eventCharact ) runs on ItsFa return FncRetCode { var FncRetCode v_ret := e_success; //TODO raise action or send message via port return v_ret; [] utPort.receive { setverdict (fail, "Event not correctly indicated at application layer"); v_ret := e_error; } //TODO check if type Situation is suitable /** * @desc Checks that the event was indicated the application layer * @param p_event The event cause and subcause. * @return */ function f_checkEvent(template (value) Situation p_event) runs on ItsFa return FncRetCode { var FncRetCode v_ret := e_success; //TODO raise action or send message via port return v_ret; [] tc_ac.timeout { setverdict (inconc, "Timeout while waiting for event check result"); v_ret := e_timeout; } /** * @desc Checks that the event cancellation was indicated to the application layer * @param p_event The event cause and subcause. * @return */ function f_checkEventCancellation(template (value) Situation p_event) runs on ItsFa return FncRetCode { var FncRetCode v_ret := e_success; //TODO raise action or send message via port return v_ret; } /** * @desc Checks that the event negation was indicated to the application layer * @param p_event The event cause and subcause. * @return */ function f_checkEventNegation(template (present) Situation p_event) runs on ItsFa return FncRetCode { var FncRetCode v_ret := e_success; //TODO raise action or send message via port return v_ret; } Loading ttcn/DENM/LibItsDenm_Templates.ttcn +76 −0 Original line number Diff line number Diff line Loading @@ -28,6 +28,82 @@ module LibItsDenm_Templates { receptionTime := ? } group utPrimitives { template UtEvent m_utEvent(Situation p_situation) := { situation := p_situation, eventOption := omit } template UtEvent m_utEventCancellation( Situation p_situation, DataVersion p_dataVersion ) modifies m_utEvent := { eventOption := { eventCancellation := p_dataVersion } } template UtEvent m_utEventNegation( Situation p_situation, DecentralizedEnvironmentalNotificationMessage.management.isNegation p_isNegation ) modifies m_utEvent := { eventOption := { eventNegation := p_isNegation } } template UtEvent m_utEeventTrafficFlowEffect( Situation p_situation, TrafficFlowEffect p_trafficFlowEffect ) modifies m_utEvent := { eventOption := { eventTrafficFlowEffect := p_trafficFlowEffect } } template UtEvent m_utEventLinkedCause( Situation p_situation, Situation p_linkedCause ) modifies m_utEvent := { eventOption := { eventLinkedCause := p_linkedCause } } template UtEvent m_utEventExpirationTime( Situation p_situation, TimeStamp p_expirationTime ) modifies m_utEvent := { eventOption := { eventExpirationTime := p_expirationTime } } template UtEvent m_utEventExpirationTimeFrequency( Situation p_situation, TimeStamp p_expirationTime, DecentralizedSituationManagement.frequency p_frequency ) modifies m_utEvent := { eventOption := { eventExpirationTimeFrequency := { p_expirationTime, p_frequency } } } template UtEvent m_utEventCharact( Situation p_situation, DecentralizedSituation.eventCharact p_eventCharact ) modifies m_utEvent := { eventOption := { eventCharact := p_eventCharact } } } // end utPrimitives } // end primitives group denmPduTemplates { Loading ttcn/DENM/LibItsDenm_TypesAndValues.ttcn +33 −0 Original line number Diff line number Diff line Loading @@ -113,4 +113,37 @@ module LibItsDenm_TypesAndValues { } // end denmTimeConstants group utPrimitives { type record UtTrigger { UtEvent utEvent } type record UtCheck { UtEvent utEvent } type boolean UtResult; type record UtEvent { Situation situation, EventOption eventOption optional } type union EventOption { DataVersion eventCancellation, DecentralizedEnvironmentalNotificationMessage.management.isNegation eventNegation, TrafficFlowEffect eventTrafficFlowEffect, Situation eventLinkedCause, TimeStamp eventExpirationTime, EventTimeFrequency eventExpirationTimeFrequency, DecentralizedSituation.eventCharact eventCharact } type record EventTimeFrequency { TimeStamp expirationTime, DecentralizedSituationManagement.frequency frequency } } // end utPrimitives } No newline at end of file ttcn/LibIts_Interface.ttcn +5 −3 Original line number Diff line number Diff line Loading @@ -13,6 +13,7 @@ module LibIts_Interface { import from CAM_PDU_Descriptions language "ASN.1:1997" all; import from DENM_PDU_Descriptions language "ASN.1:1997" all; import from LibItsBtp_TypesAndValues all; import from LibItsDenm_TypesAndValues all; import from LibCommon_BasicTypesAndValues all; Loading @@ -35,7 +36,8 @@ module LibIts_Interface { * @desc Upper Tester port */ type port UpperTesterPort message { in integer; //TODO: remove me out UtTrigger, UtCheck; in UtResult } // end UpperTesterPort } // end portDefinitions Loading Loading
ttcn/DENM/LibItsDenm_Functions.ttcn +27 −168 Original line number Diff line number Diff line Loading @@ -30,6 +30,7 @@ module LibItsDenm_Functions { // map ports map(p_ptcDenm:denmPort, system:denmPort); map(p_ptcDenm:utPort, system:utPort); } // end f_ptcDenmUp Loading @@ -51,6 +52,7 @@ module LibItsDenm_Functions { } } unmap(p_ptcDenm:denmPort); unmap(p_ptcDenm:utPort); } // end f_ptcDenmDown Loading Loading @@ -137,7 +139,7 @@ module LibItsDenm_Functions { ); } else { v_ret := f_triggerEventCancellation(p_event); v_ret := f_utTriggerEvent(m_utEventCancellation(p_event, c_dataVersionCancellation)); } f_setVerdictPreOrPostamble(v_ret); Loading @@ -148,190 +150,47 @@ module LibItsDenm_Functions { group eventFunctions { //TODO check if type Situation is suitable /** * @desc Triggers event from the application layer * @param p_event The event cause and subcause. * @param p_event The event to trigger. * @return */ function f_triggerEvent(template (value) Situation p_event) runs on ItsFa return FncRetCode { function f_utTriggerEvent(template (value) UtEvent p_event) runs on ItsFa return FncRetCode { var FncRetCode v_ret := e_success; var UtTrigger v_utMsg := { p_event }; //TODO raise action or send message via port return v_ret; } /** * @desc Triggers cancellation event from the application layer * @param p_event The event cause and subcause. * @return */ function f_triggerEventCancellation(template (value) Situation p_event) runs on ItsFa return FncRetCode { var FncRetCode v_ret := e_success; var DataVersion v_dataVersion := c_dataVersionCancellation; //TODO raise action or send message via port return v_ret; } /** * @desc Triggers event negation from the application layer * @param p_event The event cause and subcause. * @return */ function f_triggerEventNegation(template (value) Situation p_event) runs on ItsFa return FncRetCode { var FncRetCode v_ret := e_success; var DecentralizedEnvironmentalNotificationMessage.management.isNegation v_isNegation := true; //TODO raise action or send message via port return v_ret; } /** * @desc Triggers event with additional TrafficFlowEffect information field included from the application layer * @param p_event The event cause and subcause. * @param p_tfe The Traffic Flow Effect. * @return */ function f_triggerEventTrafficFlowEffect( template (value) Situation p_event, template (value) TrafficFlowEffect p_tfe ) 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 LinkedCause information field included from the application layer * @param p_event The event cause and subcause. * @param p_linkedCause The linked event. * @return */ function f_triggerEventLinkedCause( template (value) Situation p_event, template (value) Situation p_linkedCause ) 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 expiration time information field and frequency information field * included from the application layer * @param p_event The event cause and subcause. * @param p_expirationTime The expiration time. * @param p_frequency The frequency. * @return */ function f_triggerEventExpirationTimeFrequency( template (value) Situation p_event, template (value) TimeStamp p_expirationTime, template (value) DecentralizedSituationManagement.frequency p_frequency ) runs on ItsFa return FncRetCode { var FncRetCode v_ret := e_success; //TODO raise action or send message via port utPort.send(v_utMsg); 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. * @desc Checks that the event was indicated at the application layer * @param p_event The event to check. * @return */ function f_triggerEventExpirationTime( template (value) Situation p_event, template (value) TimeStamp p_expirationTime ) runs on ItsFa return FncRetCode { function f_utCheckEvent(template (value) UtEvent p_event) runs on ItsFa return FncRetCode { var FncRetCode v_ret := e_success; //TODO raise action or send message via port return v_ret; } var UtCheck v_utMsg := { p_event }; /** * @desc Triggers update of event's expiration time * @param p_event The event cause and subcause. * @param p_expirationTime The new expiration time. * @return */ function f_triggerEventExpirationTimeUpdate( 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; utPort.send(v_utMsg); tc_ac.start; alt { [] utPort.receive(UtResult:true) { setverdict (pass, "Event correctly indicated at application layer"); v_ret := e_success; } /** * @desc Triggers event with additional Event Characteristics information field included from the application layer * @param p_event The event cause and subcause. * @param p_eventCharact The event characteristics. * @return */ function f_triggerEventEventCharact( template (value) Situation p_event, template (value) DecentralizedSituation.eventCharact p_eventCharact ) runs on ItsFa return FncRetCode { var FncRetCode v_ret := e_success; //TODO raise action or send message via port return v_ret; [] utPort.receive { setverdict (fail, "Event not correctly indicated at application layer"); v_ret := e_error; } //TODO check if type Situation is suitable /** * @desc Checks that the event was indicated the application layer * @param p_event The event cause and subcause. * @return */ function f_checkEvent(template (value) Situation p_event) runs on ItsFa return FncRetCode { var FncRetCode v_ret := e_success; //TODO raise action or send message via port return v_ret; [] tc_ac.timeout { setverdict (inconc, "Timeout while waiting for event check result"); v_ret := e_timeout; } /** * @desc Checks that the event cancellation was indicated to the application layer * @param p_event The event cause and subcause. * @return */ function f_checkEventCancellation(template (value) Situation p_event) runs on ItsFa return FncRetCode { var FncRetCode v_ret := e_success; //TODO raise action or send message via port return v_ret; } /** * @desc Checks that the event negation was indicated to the application layer * @param p_event The event cause and subcause. * @return */ function f_checkEventNegation(template (present) Situation p_event) runs on ItsFa return FncRetCode { var FncRetCode v_ret := e_success; //TODO raise action or send message via port return v_ret; } Loading
ttcn/DENM/LibItsDenm_Templates.ttcn +76 −0 Original line number Diff line number Diff line Loading @@ -28,6 +28,82 @@ module LibItsDenm_Templates { receptionTime := ? } group utPrimitives { template UtEvent m_utEvent(Situation p_situation) := { situation := p_situation, eventOption := omit } template UtEvent m_utEventCancellation( Situation p_situation, DataVersion p_dataVersion ) modifies m_utEvent := { eventOption := { eventCancellation := p_dataVersion } } template UtEvent m_utEventNegation( Situation p_situation, DecentralizedEnvironmentalNotificationMessage.management.isNegation p_isNegation ) modifies m_utEvent := { eventOption := { eventNegation := p_isNegation } } template UtEvent m_utEeventTrafficFlowEffect( Situation p_situation, TrafficFlowEffect p_trafficFlowEffect ) modifies m_utEvent := { eventOption := { eventTrafficFlowEffect := p_trafficFlowEffect } } template UtEvent m_utEventLinkedCause( Situation p_situation, Situation p_linkedCause ) modifies m_utEvent := { eventOption := { eventLinkedCause := p_linkedCause } } template UtEvent m_utEventExpirationTime( Situation p_situation, TimeStamp p_expirationTime ) modifies m_utEvent := { eventOption := { eventExpirationTime := p_expirationTime } } template UtEvent m_utEventExpirationTimeFrequency( Situation p_situation, TimeStamp p_expirationTime, DecentralizedSituationManagement.frequency p_frequency ) modifies m_utEvent := { eventOption := { eventExpirationTimeFrequency := { p_expirationTime, p_frequency } } } template UtEvent m_utEventCharact( Situation p_situation, DecentralizedSituation.eventCharact p_eventCharact ) modifies m_utEvent := { eventOption := { eventCharact := p_eventCharact } } } // end utPrimitives } // end primitives group denmPduTemplates { Loading
ttcn/DENM/LibItsDenm_TypesAndValues.ttcn +33 −0 Original line number Diff line number Diff line Loading @@ -113,4 +113,37 @@ module LibItsDenm_TypesAndValues { } // end denmTimeConstants group utPrimitives { type record UtTrigger { UtEvent utEvent } type record UtCheck { UtEvent utEvent } type boolean UtResult; type record UtEvent { Situation situation, EventOption eventOption optional } type union EventOption { DataVersion eventCancellation, DecentralizedEnvironmentalNotificationMessage.management.isNegation eventNegation, TrafficFlowEffect eventTrafficFlowEffect, Situation eventLinkedCause, TimeStamp eventExpirationTime, EventTimeFrequency eventExpirationTimeFrequency, DecentralizedSituation.eventCharact eventCharact } type record EventTimeFrequency { TimeStamp expirationTime, DecentralizedSituationManagement.frequency frequency } } // end utPrimitives } No newline at end of file
ttcn/LibIts_Interface.ttcn +5 −3 Original line number Diff line number Diff line Loading @@ -13,6 +13,7 @@ module LibIts_Interface { import from CAM_PDU_Descriptions language "ASN.1:1997" all; import from DENM_PDU_Descriptions language "ASN.1:1997" all; import from LibItsBtp_TypesAndValues all; import from LibItsDenm_TypesAndValues all; import from LibCommon_BasicTypesAndValues all; Loading @@ -35,7 +36,8 @@ module LibIts_Interface { * @desc Upper Tester port */ type port UpperTesterPort message { in integer; //TODO: remove me out UtTrigger, UtCheck; in UtResult } // end UpperTesterPort } // end portDefinitions Loading