Compare Revisions

The credentials to download the source code are:
 Username: svnusers
 Password: svnusers

Ignore whitespace Rev 3323 → Rev 3324

/branches/STF525/etc/AtsRSUsSimulator/AtsRSUSimulator.cfg
2,10 → 2,10
[MODULE_PARAMETERS]
# This section shall contain the values of all parameters that are defined in your TTCN-3 modules.
LibItsGeoNetworking_Pics.PICS_GN_LOCAL_GN_ADDR := {
typeOfAddress := e_initial,
stationType := e_unknown, #e_passengerCar,
typeOfAddress := e_manual,
stationType := e_passengerCar, #e_unknown
stationCountryCode := 0,
mid := '4C5E0C14D2EA'O
mid := '00000000000B'O #'4C5E0C14D2EA'O
}
 
# GeoNetwoking only, no facility layer
35,18 → 35,19
ItsRSUsSimulator_Pixits.PICS_GENERATE_SPATEM := false
ItsRSUsSimulator_Pixits.PICS_GENERATE_SSEM := false
 
ItsRSUsSimulator_Pics.PICS_BEACON_FREQUENCY := 0.5
ItsRSUsSimulator_Pics.PICS_CAM_FREQUENCY := 0.5
ItsRSUsSimulator_Pics.PICS_DENM_FREQUENCY := 0.5
ItsRSUsSimulator_Pics.PICS_BEACON_FREQUENCY := 1.0
ItsRSUsSimulator_Pics.PICS_CAM_FREQUENCY := 1.0
ItsRSUsSimulator_Pics.PICS_DENM_FREQUENCY := 1.0
 
ItsRSUsSimulator_Pics.PICS_SEND_CAM_INDICATION := false
[LOGGING]
# In this section you can specify the name of the log file and the classes of events
# you want to log into the file or display on console (standard error).
LogFile := "../logs/%e.%h-%r.%s"
FileMask := LOG_ALL | USER | DEBUG | MATCHING
ConsoleMask := LOG_ALL | USER | DEBUG | MATCHING
#FileMask := ERROR | WARNING | USER | MATCHING | EXECUTOR_RUNTIME | VERDICTOP
#ConsoleMask := ERROR | WARNING | USER | MATCHING | EXECUTOR_RUNTIME | VERDICTOP
#FileMask := LOG_ALL | USER | DEBUG | MATCHING
#ConsoleMask := LOG_ALL | USER | DEBUG | MATCHING
FileMask := ERROR | WARNING | USER | MATCHING | EXECUTOR_RUNTIME | VERDICTOP
ConsoleMask := ERROR | WARNING | USER | MATCHING | EXECUTOR_RUNTIME | VERDICTOP
LogSourceInfo := Stack
LogEntityName:= Yes
LogEventTypes:= Yes
121,10 → 122,10
# save_mode : Set to 1 to save sent packet, 0 otherwise
 
# Single GeoNetworking component port
system.geoNetworkingPort.params := "GN(ll_address=4C5E0C14D2EB,latitude=43551050,longitude=10298730,beaconing=0,device_mode=0,expiry=500,its_aid=37,secured_mode=0,encrypted_mode=0,certificate=CERT_IUT_F_AT,peer_certificate=CERT_TS_F_AT,sec_db_path=/home/ubuntu/tmp/test_01)/ETH(mac_src=0800275e8e00,mac_bc=FFFFFFFFFFFF,eth_type=8947)/PCAP(mac_src=0800275e8e00,nic=enp0s8,filter=and ether proto 0x8947)"
system.geoNetworkingPort.params := "GN(ll_address=4C5E0C14D2EB,latitude=43551050,longitude=10298730,beaconing=0,device_mode=0,expiry=500,its_aid=37,secured_mode=0,encrypted_mode=0,certificate=CERT_IUT_F_AT,peer_certificate=CERT_TS_F_AT,sec_db_path=/home/ubuntu/tmp/test_01)/ETH(mac_src=080027f44e7d,mac_bc=FFFFFFFFFFFF,eth_type=8947)/PCAP(mac_src=080027f44e7d,nic=eth2,filter=and ether proto 0x8947)"
 
# Config port based on UDP
system.cfPort.params := "CF(ut=gn)/UDP(dst_ip=192.168.1.253,dst_port=12345,src_ip=192.168.1.250,src_port=12345)/ETH(mac_src=0800275e8e00,mac_dst=dc536045af7e,eth_type=0800)/PCAP(mac_src=0800275e8e00,nic=enp0s8,filter=and udp port 12345)"
system.cfPort.params := "CF(ut=cam)/UDP(dst_ip=192.168.2.2,dst_port=12345)"
 
[EXECUTE]
ItsRSUsSimulator_TestCases.TC_RSUSIMU_BV_01
/branches/STF525/etc/TestCodec/TestCodec.cfg
87,11 → 87,10
# source_port : Test System port
# interface_id: Interface id, used to discard packets
# tx_power : TX power (dB)
# UDP layer (IP/UDP based on Pcap)
# UDP layer (UDP based on Socket)
# dst_ip : Destination IPv4 address (aa.bb.cc.dd)
# dst_port: Destination port
# src_ip : Source IPv4 address (aa.bb.cc.dd)
# src_port: Source port
# dst_port: Destination port. Default: 12345
# src_port: Source port. Default: 12345
# Pcap layer
# mac_src : Source MAC address, used to exclude from capture the acket sent by the Test System
# filter : Pcap filter (compliant with tcpdump syntax)
135,7 → 134,7
system.ivimPort.params := "IVIM/BTP(type=btpB,dst_port=2005,src_port=0,device_mode=1)/GN(ll_address=F8CAB8083918,latitude=43551050,longitude=10298730,expiry=1000,device_mode=1,its_aid=141)/ETH(mac_src=F8CAB8083918,mac_bc=FFFFFFFFFFFF,eth_type=8947)/PCAP(mac_src=F8CAB8083918,nic=,file=../../../testdata/test_1_ivim.pcap,save_mode=1,filter=and ether proto 0x8947,frame_offset=0)"
 
# GeoNetworking UpperTester port based on UDP
system.utPort.params := "UT_GN/UDP(dst_ip=192.168.56.1,dst_port=12346,src_ip=192.168.156.4,src_port=12345)/ETH(mac_src=026f8338c1e5,mac_dst=0A0027000011,eth_type=0800)/PCAP(mac_src=0800275c4959,nic=eth1,filter=and udp port 12346)"
system.utPort.params := "UT_GN/UDP(dst_ip=192.168.56.1)"
 
[EXECUTE]
# GeoNetworking Req
/branches/STF525/ttcn/AtsRSUsSimulator/ItsRSUsSimulator_Functions.ttcn
347,6 → 347,16
}
}
);
} else if (PX_ETSI_USE_CASE_ID == 6) { // FIXME To be removed only for test
v_cam :=
m_camMsg_vehicle(
PICS_RSU_PARAMS[p_rsu_id].stationID,
f_getCurrentTime() mod 65536, // Shall be updated in function f_prepare_vehicle_cam
m_rsuPosition(
vc_longPosVectorRsu.latitude,
vc_longPosVectorRsu.longitude
)
);
} else if (PX_ETSI_USE_CASE_ID == 9) {
v_cam :=
m_camParm(
827,6 → 837,26
}
f_sendGeoNetMessage(valueof(m_geoNwReq_linkLayerBroadcast(v_geoNetworkingPdu, p_its_aid)));
} // End of function f_send
 
function f_processCam(
in GeoNetworkingPdu p_geoNetworkingPdu
) runs on ItsRSUsSimulator {
var bitstring v_enc_msg;
log("CAM=", p_geoNetworkingPdu);
if (PICS_SEND_CAM_INDICATION) {
var UtCamEventInd v_utCamEventInd;
var integer v_result;
// Extract CAM message
var octetstring v_payload := p_geoNetworkingPdu.gnPacket.packet.payload;
// Remove BTP layer
v_payload := substr(v_payload, 4, lengthof(v_payload) - 4);
// Send UtEventCamIndication
v_enc_msg := oct2bit(v_payload);
if (decvalue(v_enc_msg, v_utCamEventInd.camMsg) == 0) {
cfPort.send(v_utCamEventInd);
}
}
}
function f_processSrem(
in GeoNetworkingPdu p_geoNetworkingPdu
889,6 → 919,7
in integer p_dest_port,
in integer p_src_port
) return template (present) octetstring {
log(">>> f_payload_template: ", p_dest_port, " - ", p_src_port);
var template (present) Oct2 v_t1 := int2oct(PICS_SREM_BTP_DESTINATION_PORT, 2);
var template (present) Oct2 v_t2 := int2oct(PICS_SREM_BTP_SOURCE_PORT, 2);
var template (present) octetstring v_t3 := ? length (5 .. 65535);
907,6 → 938,7
repeat;
}
[] cfPort.receive(UtGnTrigger:?) -> value v_utGnTrigger {
cfPort.send(UtGnResults: { utGnTriggerResult := true } );
log("v_utGnTrigger = ", v_utGnTrigger);
if (ischosen(v_utGnTrigger.geoUnicast)) {
var GnNonSecuredPacket v_geoNwUnicastPacket := valueof(
925,10 → 957,40
c_defaultHopLimit
)
);
// FIXME Check what to do with GN_Address v_geoNwPdu.gnPacket.packet.extendedHeader.geoUnicastHeader. := v_utGnTrigger.geoUnicast.gnAddress;
v_geoNwPdu.gnPacket.packet.commonHeader.nextHeader := e_any;
v_geoNwPdu.gnPacket.packet.extendedHeader.geoUnicastHeader.dstPosVector.gnAddr := v_utGnTrigger.geoUnicast.gnAddress;
geoNetworkingPort.send(m_geoNwReq_linkLayerBroadcast(v_geoNwPdu));
} else if (ischosen(v_utGnTrigger.geoBroadcast)) {
var GeoBroadcastArea v_broadcastArea;
var GnNonSecuredPacket v_geoNwBroadcastPacket;
var GeoNetworkingPdu v_geoNwPdu;
 
if (v_utGnTrigger.geoBroadcast.shape == e_geoCircle) {
v_broadcastArea.geoBroadcastSubType := e_geoBroadcastCircle;
} else if (v_utGnTrigger.geoBroadcast.shape == e_geoRect) {
v_broadcastArea.geoBroadcastSubType := e_geoBroadcastRect;
} else if (v_utGnTrigger.geoBroadcast.shape == e_geoElip) {
v_broadcastArea.geoBroadcastSubType := e_geoBroadcastElip;
} else {
v_broadcastArea.geoBroadcastSubType := e_reserved;
}
v_broadcastArea.geoBroadcastArea := v_utGnTrigger.geoBroadcast.area;
v_geoNwBroadcastPacket := valueof(
m_geoNwBroadcastPacket_payload(
vc_longPosVectorRsu,
f_incLocalSeqNumber(),
v_broadcastArea,
c_defaultHopLimit,
v_utGnTrigger.geoBroadcast.trafficClass,
v_utGnTrigger.geoBroadcast.payload
));
v_geoNwPdu := valueof(
m_geoNwPdu(
v_geoNwBroadcastPacket,
m_lifetimeBase1s(v_utGnTrigger.geoBroadcast.lifetime),
c_defaultHopLimit
));
}
cfPort.send(UtGnResults: { utGnTriggerResult := true } );
repeat;
}
[vc_cam == true] cfPort.receive(UtCamInitialize:?) {
937,19 → 999,30
}
[vc_cam == true] cfPort.receive(UtCamTrigger: { changeSpeed := ? }) {
cfPort.send(UtCamResults: { utCamTriggerResult := true } );
vc_cam_timer_value := vc_cam_timer_value / 4.0;
vc_cam_timer_value := vc_cam_timer_value / 2.0;
repeat;
}
/*[vc_cam == true] cfPort.receive(UtCamTrigger: { changeCurvature := ? }) -> value v_utCamTrigger {
[vc_cam == true] cfPort.receive(UtCamTrigger: { changeCurvature := ? }) -> value v_utCamTrigger {
log("v_utCamTrigger = ", v_utCamTrigger);
if (ispresent(vc_rsuMessagesValueList[vc_rsu_id].cam.cam.camParameters.highFrequencyContainer.basicVehicleContainerHighFrequency)) {
cfPort.send(UtCamResults: { utCamTriggerResult := true } );
// vc_rsuMessagesValueList[vc_rsu_id].cam.cam.camParameters.highFrequencyContainer.basicVehicleContainerHighFrequency.curvature := v_utCamTrigger.changeCurvature;
vc_rsuMessagesValueList[vc_rsu_id].cam.cam.camParameters.highFrequencyContainer.basicVehicleContainerHighFrequency.curvature.curvatureValue := v_utCamTrigger.changeCurvature;
} else {
cfPort.send(UtCamResults: { utCamTriggerResult := false } );
}
repeat;
}
[vc_cam == true] cfPort.receive(UtCamTrigger: { changePosition := ? }) {
[vc_cam == true] cfPort.receive(UtCamTrigger: { changeHeading := ? }) -> value v_utCamTrigger {
log("v_utCamTrigger = ", v_utCamTrigger);
if (ispresent(vc_rsuMessagesValueList[vc_rsu_id].cam.cam.camParameters.highFrequencyContainer.basicVehicleContainerHighFrequency)) {
cfPort.send(UtCamResults: { utCamTriggerResult := true } );
vc_rsuMessagesValueList[vc_rsu_id].cam.cam.camParameters.highFrequencyContainer.basicVehicleContainerHighFrequency.heading.headingValue := valueof(vc_rsuMessagesValueList[vc_rsu_id].cam.cam.camParameters.highFrequencyContainer.basicVehicleContainerHighFrequency.heading.headingValue) + v_utCamTrigger.changeHeading;
} else {
cfPort.send(UtCamResults: { utCamTriggerResult := false } );
}
repeat;
}
/*[vc_cam == true] cfPort.receive(UtCamTrigger: { changePosition := ? }) {
cfPort.send(UtCamResults: { utCamTriggerResult := true } );
//TODO vc_cam_timer_value := vc_cam_timer_value / 4.0;
repeat;
/branches/STF525/ttcn/AtsRSUsSimulator/ItsRSUsSimulator_Pics.ttcn
5705,6 → 5705,20
} // End of group sremEvents
 
group indications {
 
/**
* @desc Set to true to send CAM UT event indication
*/
modulepar boolean PICS_SEND_BEACON_INDICATION := false;
/**
* @desc Set to true to send CAM UT event indication
*/
modulepar boolean PICS_SEND_CAM_INDICATION := false;
} // End of group indications
group generationFrequencies {
/**
/branches/STF525/ttcn/AtsRSUsSimulator/ItsRSUsSimulator_TestCases.ttcn
104,6 → 104,18
// Nothing to do, just for logging purposes
repeat;
}*/
/*[] geoNetworkingPort.receive(
mw_geoNwInd(
mw_geoNwPdu(
mw_geoNwShbPacketWithNextHeader_cam(
?,
?,
e_btpB
)))) -> value v_gnInd { // Receive a SREM message
log("*** " & testcasename() & ": DEBUG: Processing CAM ***");
f_processCam(v_gnInd.msgIn);
repeat;
}*/
[] geoNetworkingPort.receive(mw_geoNwInd(?)) -> value v_gnInd { // Receive a message
log("*** " & testcasename() & ": DEBUG: Recieving unsollicited message ***");
// Nothing to do, just for logging purposes
/branches/STF525/ttcn/AtsRSUsSimulator/ItsRSUsSimulator_TestSystem.ttcn
149,7 → 149,7
*/
type port ConfigRsuSimulatorPort message {
out
CfInitialize, CfResult, UtGnResults, UtCamResults, UtDenmResults;
CfInitialize, CfResult, UtGnResults, UtCamResults, UtDenmResults, UtCamEventInd;
in
CfEvent, CfEventInd, UtGnInitialize, UtCamInitialize, UtDenmInitialize, UtGnTrigger, UtCamTrigger
} // End of ConfigRsuSimulatorPort