Commit f79013a0 authored by garciay's avatar garciay
Browse files

Change SSP & ITS-AID types for transferring from lower layer to upper layer

parent 7e49401d
......@@ -77,8 +77,8 @@ module LibItsCam_Templates {
*/
template CamInd mw_camIndWithSecurityParameters(
template (present) CAM p_camMsg,
template Oct16 p_ssp := *,
template Oct16 p_its_aid := *
template Bit128 p_ssp := *,
template UInt32 p_its_aid := *
) modifies mw_camInd := {
ssp := p_ssp,
its_aid := p_its_aid
......
......@@ -126,8 +126,8 @@ module LibItsCam_TestSystem {
UInt8 gnTrafficClass optional,
UInt16 btpDestinationPort optional,
UInt16 btpInfo optional,
Oct16 ssp optional,
Oct16 its_aid optional
Bit128 ssp optional,
UInt32 its_aid optional
}
with {
encode (msgIn) "LibItsCam_asn1"
......
......@@ -102,8 +102,8 @@ module LibItsDenm_Templates {
*/
template DenmInd mw_denmIndWithSecurityParameters(
template (present) DENM p_denMsg,
template Oct16 p_ssp := *,
template Oct16 p_its_aid := *
template Bit128 p_ssp := *,
template UInt32 p_its_aid := *
) modifies mw_denmInd := {
ssp := p_ssp,
its_aid := p_its_aid
......@@ -809,29 +809,29 @@ module LibItsDenm_Templates {
} // end alacarteTemplates
group sspTemplates {
template (present) DenmInd mw_denmInd_SSP (
template (present) DENM p_denMsg,
template (present) bitstring p_SSP := ?
) := {
msgIn := p_denMsg,
gnNextHeader := *,
gnHeaderType := *,
gnHeaderSubtype := *,
gnLifetime := *,
gnTrafficClass := *,
btpDestinationPort := *,
btpInfo := *,
// TODO: add support for SSP
// ssp := p_SSP,
ssp := *,
// TODO: add support for ItsAid
// its_aid := c_denmItsAid
its_aid := *
}
template (present) bitstring mw_sspTrafficCondition := '*1'B;
template (present) bitstring mw_sspAccident := '*1?'B;
// template (present) DenmInd mw_denmInd_SSP (
// template (present) DENM p_denMsg,
// template (present) bitstring p_SSP := ?
// ) := {
// msgIn := p_denMsg,
// gnNextHeader := *,
// gnHeaderType := *,
// gnHeaderSubtype := *,
// gnLifetime := *,
// gnTrafficClass := *,
// btpDestinationPort := *,
// btpInfo := *,
//// TODO: add support for SSP
//// ssp := p_SSP,
// ssp := *,
//// TODO: add support for ItsAid
//// its_aid := c_denmItsAid
// its_aid := *
// }
//
template (present) bitstring mw_sspTrafficCondition := '*1'B;
template (present) bitstring mw_sspAccident := '*1?'B;
template (present) bitstring mw_sspRoadworks := '*1??'B;
} // end sspTemplates
......
......@@ -131,8 +131,8 @@ module LibItsDenm_TestSystem {
UInt8 gnTrafficClass optional,
UInt16 btpDestinationPort optional,
UInt16 btpInfo optional,
Oct16 ssp optional,
Oct16 its_aid optional
Bit128 ssp optional,
UInt32 its_aid optional
}
with {
encode (msgIn) "LibItsDenm_asn1"
......
......@@ -10,10 +10,8 @@ module LibItsGeoNetworking_TestSystem {
// LibCommon
import from LibCommon_Time {modulepar all};
import from LibCommon_Sync all;
import from LibCommon_BasicTypesAndValues {
type UInt16;
const c_uInt16Max
};
import from LibCommon_BasicTypesAndValues all;
import from LibCommon_DataStrings all;
// LibItsCommon
import from LibItsCommon_TestSystem all;
......@@ -142,8 +140,8 @@ module LibItsGeoNetworking_TestSystem {
type record GeoNetworkingInd {
GeoNetworkingPdu msgIn,
MacAddress macDestinationAddress,
octetstring ssp optional,
octetstring its_aid optional
Bit128 ssp optional,
UInt32 its_aid optional
}
/**
......
......@@ -43,7 +43,7 @@ module LibItsIvim_Functions {
return PX_PROVIDER;
} // end f_getProvider
} // End of function f_getProvider
} // End of group itsFunction
......@@ -213,7 +213,7 @@ module LibItsIvim_Functions {
if (PICS_GNSS_SCENARIO_SUPPORT==true) {
f_acTriggerGnssEvent(m_loadScenario(p_scenario));
}
} // end f_acLoadScenario
} // End of function f_acLoadScenario
/**
* @desc Starts a loaded scenario
......@@ -224,7 +224,7 @@ module LibItsIvim_Functions {
f_acTriggerGnssEvent(m_startScenario);
vc_scenarioStarted := true;
}
} // end f_acStartScenario
} // End of function f_acStartScenario
/**
* @desc Stops a loaded scenario
......@@ -235,7 +235,7 @@ module LibItsIvim_Functions {
f_acTriggerGnssEvent(m_stopScenario);
vc_scenarioStarted := false;
}
} // end f_acStopScenario
} // End of function f_acStopScenario
function f_acAwaitDistanceCovered(float p_distanceToCover) runs on ItsIvim return FncRetCode {
var FncRetCode v_ret := e_success;
......@@ -261,7 +261,7 @@ module LibItsIvim_Functions {
}
return v_ret;
} // end f_acAwaitDistanceCovered
} // End of function f_acAwaitDistanceCovered
} // End of group adapterControl
......@@ -277,7 +277,7 @@ module LibItsIvim_Functions {
map(self:ivimPort, system:ivimPort);
f_connect4SelfOrClientSync();
} // end f_cfUp
} // End of function f_cfUp
/**
* @desc Deletes default configuration
......@@ -289,9 +289,9 @@ module LibItsIvim_Functions {
unmap(self:ivimPort, system:ivimPort);
f_disconnect4SelfOrClientSync();
} // end f_cfDown
} // End of function f_cfDown
} //end ivimConfigurationFunctions
} // End of group ivimConfigurationFunctions
group altsteps {
......@@ -421,7 +421,7 @@ module LibItsIvim_Functions {
in template (value) IviStructure p_ivim
) runs on ItsIvim {
ivimPort.send(
m_ivimStructureReq(
m_ivimReq(
m_ivimStructurePdu(
p_ivim
)
......@@ -429,7 +429,7 @@ module LibItsIvim_Functions {
);
}
} // end sendFunctions
} // End of group sendFunctions
group receiveFunctions {
......@@ -452,7 +452,7 @@ module LibItsIvim_Functions {
}
}
} // end receiveFunctions
} // End of group receiveFunctions
group miscellaneousFunctions {
......
......@@ -37,11 +37,11 @@ module LibItsIvim_Templates {
* @desc Send template for IVI Message (IvimPort Primitive)
* @param p_iviMsg The IVI Message to be sent
*/
template (value) IvimReq m_ivimStructureReq(
template (value) IvimReq m_ivimReq(
in template (value) IVIM p_iviMsg
) := {
msgOut := p_iviMsg
} // End of template m_ivimStructureReq
} // End of template m_ivimReq
/**
* @desc Receive template for IVI Message (IvimPort Primitive)
......@@ -109,8 +109,8 @@ module LibItsIvim_Templates {
*/
template IvimInd mw_ivimIndWithSecurityParameters (
template (present) IVIM p_iviMsg,
template Oct16 p_ssp := *,
template Oct16 p_its_aid := *
template Bit128 p_ssp := *,
template UInt32 p_its_aid := *
) modifies mw_ivimInd := {
ssp := p_ssp,
its_aid := p_its_aid
......@@ -231,7 +231,7 @@ module LibItsIvim_Templates {
* @param p_ivim The IVI Message
*/
template (value) IVIM m_ivimStructurePdu(
template (value) IviStructure p_ivim
template (value) IviStructure p_ivim
) := {
header := m_itsPduHeader,
ivi := p_ivim
......
......@@ -109,8 +109,6 @@ module LibItsIvim_TestSystem {
var UtIvimEventIndList vc_utEvents := {};
var UtIvimActionIDList vc_utActionIDs := {};
} // End of component ItsIvim
group facilityPrimitives {
......@@ -131,8 +129,8 @@ module LibItsIvim_TestSystem {
UInt8 gnTrafficClass optional,
UInt16 btpDestinationPort optional,
UInt16 btpInfo optional,
Oct16 ssp optional,
Oct16 its_aid optional
Bit128 ssp optional,
UInt32 its_aid optional
}
with {
encode (msgIn) "LibItsIvim_asn1"
......
......@@ -7,7 +7,7 @@
*/
module LibItsIvim_TypesAndValues {
//LibIts
// LibIts
import from IVIM_PDU_Descriptions language "ASN.1:1997" all;
import from IVI language "ASN.1:1997" all;
import from ITS_Container language "ASN.1:1997" all;
......
......@@ -132,16 +132,16 @@ module LibItsMapemSpatem_Functions {
* @desc The default for handling upper tester messages.
*/
altstep a_utDefault() runs on ItsMapemSpatem {
var UtMapemEventInd v_mapevent;
var UtSpatemEventInd v_spatevent;
[] utPort.receive(UtMapemEventInd:?) -> value v_mapevent {
var UtMapemEventInd v_mapemevent;
var UtSpatemEventInd v_spatemevent;
[] utPort.receive(UtMapemEventInd:?) -> value v_mapemevent {
//store every upper tester indication received
vc_utMapemEvents[lengthof(vc_utMapemEvents)] := v_mapevent;
vc_utMapemEvents[lengthof(vc_utMapemEvents)] := v_mapemevent;
repeat;
}
[] utPort.receive(UtSpatemEventInd:?) -> value v_spatevent {
[] utPort.receive(UtSpatemEventInd:?) -> value v_spatemevent {
//store every upper tester indication received
vc_utSpatemEvents[lengthof(vc_utSpatemEvents)] := v_spatevent;
vc_utSpatemEvents[lengthof(vc_utSpatemEvents)] := v_spatemevent;
repeat;
}
[] utPort.receive {
......
......@@ -104,8 +104,8 @@ module LibItsMapemSpatem_Templates {
*/
template (present) MapemInd mw_mapemIndWithSecurityParameters(
template (present) MAPEM p_mapemMsg,
template Oct16 p_ssp := *,
template Oct16 p_its_aid := *
template Bit128 p_ssp := *,
template UInt32 p_its_aid := *
) modifies mw_mapemInd := {
ssp := p_ssp,
its_aid := p_its_aid
......@@ -187,8 +187,8 @@ module LibItsMapemSpatem_Templates {
*/
template (present) SpatemInd mw_spatemIndWithSecurityParameters(
template (present) SPATEM p_spatemMsg,
template Oct16 p_ssp := *,
template Oct16 p_its_aid := *
template Bit128 p_ssp := *,
template UInt32 p_its_aid := *
) modifies mw_spatemInd := {
ssp := p_ssp,
its_aid := p_its_aid
......
......@@ -93,8 +93,8 @@ module LibItsMapemSpatem_TestSystem {
UInt8 gnTrafficClass optional,
UInt16 btpDestinationPort optional,
UInt16 btpInfo optional,
Oct16 ssp optional,
Oct16 its_aid optional
Bit128 ssp optional,
UInt32 its_aid optional
}
with {
encode (msgIn) "LibItsMapemSpatem_asn1"
......@@ -109,8 +109,8 @@ module LibItsMapemSpatem_TestSystem {
UInt8 gnTrafficClass optional,
UInt16 btpDestinationPort optional,
UInt16 btpInfo optional,
Oct16 ssp optional,
Oct16 its_aid optional
Bit128 ssp optional,
UInt32 its_aid optional
}
with {
encode (msgIn) "LibItsMapemSpatem_asn1"
......
......@@ -132,16 +132,16 @@ module LibItsSremSsem_Functions {
* @desc The default for handling upper tester messages.
*/
altstep a_utDefault() runs on ItsSremSsem {
var UtSremEventInd v_mapevent;
var UtSsemEventInd v_spatevent;
[] utPort.receive(UtSremEventInd:?) -> value v_mapevent {
var UtSremEventInd v_sremevent;
var UtSsemEventInd v_ssemevent;
[] utPort.receive(UtSremEventInd:?) -> value v_sremevent {
//store every upper tester indication received
vc_utSremEvents[lengthof(vc_utSremEvents)] := v_mapevent;
vc_utSremEvents[lengthof(vc_utSremEvents)] := v_sremevent;
repeat;
}
[] utPort.receive(UtSsemEventInd:?) -> value v_spatevent {
[] utPort.receive(UtSsemEventInd:?) -> value v_ssemevent {
//store every upper tester indication received
vc_utSsemEvents[lengthof(vc_utSsemEvents)] := v_spatevent;
vc_utSsemEvents[lengthof(vc_utSsemEvents)] := v_ssemevent;
repeat;
}
[] utPort.receive {
......@@ -218,47 +218,25 @@ module LibItsSremSsem_Functions {
}
} // End of group postambles
group receiveFunctions {
/**
* @desc Awaits a SPATE message and returns it
* @param p_rcvMsg The expected message to be received.
* @param p_rcvdMsg The received message - OUT.
*/
function f_awaitSpateMessage(in template (present) SsemInd p_rcvMsg, out SsemInd p_rcvdMsg) runs on ItsSremSsem {
tc_ac.start;
alt {
[] sremSsemPort.receive(p_rcvMsg) -> value p_rcvdMsg {
tc_ac.stop;
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INFO: Timeout while awaiting the reception of a message ***");
f_selfOrClientSyncAndVerdict("error", e_timeout);
}
}
}
group sendFunctions {
/**
* @desc Awaits a SREM message and returns it
* @param p_rcvMsg The expected message to be received.
* @param p_rcvdMsg The received message - OUT.
* @desc Sends a IVI message
* @param p_sendMsg The IVI message to send.
* @param p_overrideSeqNo Overrides the sequence number with the stored one.
*/
function f_awaitMapeMessage(in template (present) SremInd p_rcvMsg, out SremInd p_rcvdMsg) runs on ItsSremSsem {
tc_ac.start;
alt {
[] sremSsemPort.receive(p_rcvMsg) -> value p_rcvdMsg {
tc_ac.stop;
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INFO: Timeout while awaiting the reception of a message ***");
f_selfOrClientSyncAndVerdict("error", e_timeout);
}
}
function f_sendSseMessage(
in template (value) SignalRequestMessage p_signalRequestMessage
) runs on ItsSremSsem {
sremSsemPort.send(
m_ssemReq(
m_ssemPdu(
m_ssem(
p_signalRequestMessage
))));
}
} // End of receiveFunctions
} // End of group sendFunctions
} // End of module LibItsSremSsem_Functions
\ No newline at end of file
......@@ -104,8 +104,8 @@ module LibItsSremSsem_Templates {
*/
template (present) SremInd mw_sremIndWithSecurityParameters(
template (present) SREM p_sremMsg,
template Oct16 p_ssp := *,
template Oct16 p_its_aid := *
template Bit128 p_ssp := *,
template UInt32 p_its_aid := *
) modifies mw_sremInd := {
ssp := p_ssp,
its_aid := p_its_aid
......@@ -380,7 +380,42 @@ module LibItsSremSsem_Templates {
second := PX_SECOND,
sequenceNumber := omit,
status := { PX_STATUS },
regional := omit
regional := omit
}
/**
* @desc Send template for SignalStatusMessage Message
*/
template (value) SignalStatusMessage m_ssem(
in SignalRequestMessage p_signalRequestMessage
) modifies m_defaultSsem := {
second := p_signalRequestMessage.second,
status := { m_signalStatus(p_signalRequestMessage.requests[0].request) },
regional := omit
}
template (value) SignalStatus m_signalStatus(
in SignalRequest p_signalRequest
) := {
sequenceNumber := 1, // FIXME To be reviewed
id := p_signalRequest.id,
sigStatus := { m_signalStatusPackage },
regional := omit
}
template (value) SignalStatusPackage m_signalStatusPackage
:= {
requester := omit,
inboundOn := {
approach := 0
},
outboundOn := omit,
minute := omit,
second := omit,
duration := omit,
status := processing,
regional := omit
}
/**
......
......@@ -93,8 +93,8 @@ module LibItsSremSsem_TestSystem {
UInt8 gnTrafficClass optional,
UInt16 btpDestinationPort optional,
UInt16 btpInfo optional,
Oct16 ssp optional,
Oct16 its_aid optional
Bit128 ssp optional,
UInt32 its_aid optional
}
with {
encode (msgIn) "LibItsSremSsem_asn1"
......@@ -109,8 +109,8 @@ module LibItsSremSsem_TestSystem {
UInt8 gnTrafficClass optional,
UInt16 btpDestinationPort optional,
UInt16 btpInfo optional,
Oct16 ssp optional,
Oct16 its_aid optional
Bit128 ssp optional,
UInt32 its_aid optional
}
with {
encode (msgIn) "LibItsSremSsem_asn1"
......
......@@ -33,12 +33,10 @@ module LibItsSremSsem_TypesAndValues {
Event event
}
type enumerated Event {
startTLCService (0),
stopTLCService (1),
ssemNewContent (2),
sremNewContent (3),
sremRepL10s (4),
sremRepG10s (5)
ssemNewContent (0),
sremNewContent (1),
sremRepL10s (2),
sremRepG10s (3)
}
/**
* @desc Upper Tester result message of request of triggering of an event at IUT
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment