Commit 858d5f2d authored by garciay's avatar garciay
Browse files

Start UpperTester changes

parent 3c7286f4
......@@ -33,7 +33,7 @@
* @desc Requests to bring the IUT in an initial state
* @param p_init The initialisation to trigger.
*/
function f_utInitializeIut(template (value) UtInitialize p_init) runs on ItsBtp {
function f_utInitializeIut(template (value) UtBtpInitialize p_init) runs on ItsBtp {
//deactivate btpPort default alts
vc_btpDefaultActive := false;
......@@ -41,9 +41,7 @@
utPort.send(p_init);
tc_wait.start;
alt {
//FIXME RGY As discussed, port in type is changed to a top-level union type
// [] utPort.receive(UtInitializeResult:true) {
[] utPort.receive(UtCommonResults:{utInitializeResult:=true}) {
[] utPort.receive(UtBtpResults: { utBtpInitializeResult := true}) {
tc_wait.stop;
log("*** f_utInitializeIut: INFO: IUT initialized ***");
}
......@@ -74,7 +72,7 @@
utPort.send(p_event);
alt {
[] utPort.receive(UtBtpTriggerResult:true) {
[] utPort.receive(UtBtpResults: { utBtpTriggerResult := true }) {
tc_wait.stop;
}
[] utPort.receive {
......@@ -239,4 +237,4 @@
}
} // end getFunctions
} // end LibItsBtp_Functions
\ No newline at end of file
} // end LibItsBtp_Functions
......@@ -44,7 +44,7 @@ module LibItsBtp_Templates {
/**
* @desc Initializes the BTP IUT.
*/
template (value) UtInitialize m_btpInitialize := {
template (value) UtBtpInitialize m_btpInitialize := {
hashedId8 := '0000000000000000'O
}
......@@ -201,4 +201,4 @@ module LibItsBtp_Templates {
} // end btpPduTemplates
} // end LibItsBtp_Templates
\ No newline at end of file
} // end LibItsBtp_Templates
......@@ -27,11 +27,9 @@ module LibItsBtp_TestSystem {
*/
type port UpperTesterPort message {
out
UtInitialize, UtBtpTrigger;
UtBtpInitialize, UtBtpTrigger;
in
//FIXME RGY!!! As discussed, list of booleans is changed by a top-level union type
// UtInitializeResult, UtBtpTriggerResult, UtBtpEventInd;
UtCommonResults, UtBtpTriggerResult, UtBtpEventInd;
UtBtpResults, UtBtpEventInd;
} // end UpperTesterPort
} // end portDefinitions
......
......@@ -11,147 +11,169 @@
*/
module LibItsBtp_TypesAndValues {
// LibCommon
import from LibCommon_BasicTypesAndValues all;
// LibCommon
import from LibCommon_BasicTypesAndValues all;
import from LibCommon_DataStrings all;
type octetstring BtpRawPayload;
type octetstring BtpRawPayload;
group btpPdus {
group btpPdus {
/**
* @desc BTP Packet
* @see ETSI TS 102 636-5-1 chapter 6
* @member header
* @member payload
*/
type record BtpPacket {
BtpHeader header,
BtpRawPayload payload optional
}
with {
variant "FIELDORDER(msb)"
encode "LibIts_Interface"
}
/**
* @desc BTP Packet
* @see ETSI TS 102 636-5-1 chapter 6
* @member header
* @member payload
*/
type record BtpPacket {
BtpHeader header,
BtpRawPayload payload optional
}
with {
variant "FIELDORDER(msb)"
encode "LibIts_Interface"
}
} // end btpPdus
} // end btpPdus
group btpHeaders {
group btpHeaders {
/**
* @desc BTP Header
* @see ETSI TS 102 636-5-1 chapter 7.1
* @member btpAHeader
* @member btpBHeader
*/
type union BtpHeader {
BtpAHeader btpAHeader,
BtpBHeader btpBHeader
} with {
variant "FIELDORDER(msb)"
}
/**
* @desc BTP Header
* @see ETSI TS 102 636-5-1 chapter 7.1
* @member btpAHeader
* @member btpBHeader
*/
type union BtpHeader {
BtpAHeader btpAHeader,
BtpBHeader btpBHeader
} with {
variant "FIELDORDER(msb)"
}
/**
* @desc BTP-A Header
* @see ETSI TS 102 636-5-1 chapter 7.2
* @member destinationPort
* @member sourcePort
*/
type record BtpAHeader {
BtpPortId destinationPort,
BtpPortId sourcePort
} with {
variant "FIELDORDER(msb)"
}
/**
* @desc BTP-A Header
* @see ETSI TS 102 636-5-1 chapter 7.2
* @member destinationPort
* @member sourcePort
*/
type record BtpAHeader {
BtpPortId destinationPort,
BtpPortId sourcePort
} with {
variant "FIELDORDER(msb)"
}
/**
* @desc BTP-B Header
* @see ETSI TS 102 636-5-1 chapter 7.3
* @member destinationPort
* @member destinationPortInfo
*/
type record BtpBHeader {
BtpPortId destinationPort,
BtpPortInfo destinationPortInfo
} with {
variant "FIELDORDER(msb)"
}
/**
* @desc BTP-B Header
* @see ETSI TS 102 636-5-1 chapter 7.3
* @member destinationPort
* @member destinationPortInfo
*/
type record BtpBHeader {
BtpPortId destinationPort,
BtpPortInfo destinationPortInfo
} with {
variant "FIELDORDER(msb)"
}
/**
* @desc BTP Port ID
* @see ETSI TS 102 636-5-1 chapter 7.3.2
*/
type UInt16 BtpPortId;
/**
* @desc BTP Port ID
* @see ETSI TS 102 636-5-1 chapter 7.3.2
*/
type UInt16 BtpPortId;
/**
* @desc BTP-B Port info
* @see ETSI TS 102 636-5-1 chapter 7.3.2
*/
type UInt16 BtpPortInfo;
/**
* @desc BTP-B Port info
* @see ETSI TS 102 636-5-1 chapter 7.3.2
*/
type UInt16 BtpPortInfo;
} // end btpHeaders
} // end btpHeaders
group utPrimitives {
group utPrimitives {
group utCommonPrimitives {
group utCommonPrimitives {
/**
* @desc UT primitives for BTP
* @member btpA -
* @member btpB -
*/
type union UtBtpTrigger {
GenerateBtpA btpA,
GenerateBtpB btpB
}
//FIXME RGY As discussed, boolean results are replaced by a union of the results
// type boolean UtBtpTriggerResult;
type union UtBtpResults {
boolean utBtpTriggerResult
}
type UtBtpResults.utBtpTriggerResult UtBtpTriggerResult;
/**
* @desc Upper Tester message to initialize IUT
* @member hashedId8 In case of secured mode set, hashedId8 indicate which certificate the IUT shall use
*/
type record UtBtpInitialize {
Oct8 hashedId8
} with {
variant "FIELDORDER(msb)"
}
/**
* @desc Upper Tester results message of the Btp IUT
* @member utBtpInitialize -
* @member utBtpTriggerResult -
*/
type union UtBtpResults {
boolean utBtpInitializeResult,
boolean utBtpTriggerResult
} with {
variant ""
}
/**
* @desc Upper Tester message to request triggering of an BTPA message at IUT
*/
type record GenerateBtpA {
BtpAHeader btpAHeader
}
/**
* @desc UT primitives for BTP
* @member btpA -
* @member btpB -
*/
type union UtBtpTrigger {
GenerateBtpA btpA,
GenerateBtpB btpB
} with {
variant ""
}
/**
* @desc Upper Tester message to request triggering of an BTPA message at IUT
*/
type record GenerateBtpA {
BtpAHeader btpAHeader
} with {
variant "FIELDORDER(msb)"
}
/**
* @desc Upper Tester message to request triggering of an BTPB message at IUT
*/
type record GenerateBtpB {
BtpBHeader btpBHeader
}
/**
* @desc Upper Tester message to request triggering of an BTPB message at IUT
*/
type record GenerateBtpB {
BtpBHeader btpBHeader
} with {
variant "FIELDORDER(msb)"
}
/**
* @desc Upper Tester message to check event/status on BTP IUT
*/
type record UtBtpEventInd {
BtpRawPayload rawPayload
}
/**
* @desc Upper Tester message to check event/status on BTP IUT
*/
type record UtBtpEventInd {
BtpRawPayload rawPayload
} with {
variant "FIELDORDER(msb)"
}
/**
* @desc List of Upper Tester messages to check event/status on CAM IUT
*/
type record of UtBtpEventInd UtBtpEventIndList;
}
// with {
// encode "LibItsCommon"
// }
/**
* @desc List of Upper Tester messages to check event/status on CAM IUT
*/
type record of UtBtpEventInd UtBtpEventIndList;
}
} // end utPrimitives
with {
encode "UpperTester"
}
} // end utPrimitives
with {
variant ""
encode "UpperTester"
}
} with {
variant ""
encode "LibItsGeoNetworking"
variant ""
encode "LibItsGeoNetworking"
}
......@@ -41,7 +41,7 @@ module LibItsCam_Functions {
* @desc Requests to bring the IUT in an initial state
* @param p_init The initialisation to trigger.
*/
function f_utInitializeIut(template (value) UtInitialize p_init) runs on ItsCam {
function f_utInitializeIut(template (value) UtCamInitialize p_init) runs on ItsCam {
//deactivate camPort default alts
vc_camDefaultActive := false;
......@@ -49,9 +49,7 @@ module LibItsCam_Functions {
utPort.send(p_init);
tc_wait.start;
alt {
//FIXME RGY As discussed, port in type is changed to a top-level union type
// [] utPort.receive(UtInitializeResult:true) {
[] utPort.receive(UtCommonResults:{utInitializeResult:=true}) {
[] utPort.receive(UtCamResults: { utCamInitializeResult := true }) {
tc_wait.stop;
log("*** f_utInitializeIut: INFO: IUT initialized ***");
}
......@@ -83,9 +81,7 @@ module LibItsCam_Functions {
utPort.send(p_event);
tc_wait.start;
alt {
//FIXME RGY As discussed, port in type is changed to a top-level union type
// [] utPort.receive(UtCamTriggerResult:true) {
[] utPort.receive(UpperTesterCamResults:{utCamTriggerResult:=true}) {
[] utPort.receive(UtCamResults: { utCamTriggerResult := true }) {
tc_wait.stop;
}
[] utPort.receive {
......@@ -104,20 +100,22 @@ module LibItsCam_Functions {
* @desc Changes the position of the IUT
* @param p_position
*/
function f_utChangePosition(template (value) UtChangePosition p_position) runs on ItsCam {
function f_utChangePosition(template (value) UtCamChangePosition p_position) runs on ItsCam {
//deactivate camPort default alts
vc_camDefaultActive := false;
utPort.send(p_position);
alt {
//FIXME RGY As discussed, port in type is changed to a top-level union type
// [] utPort.receive(UtChangePositionResult:?) {
[] utPort.receive(UtCommonResults:{utChangePositionResult:=?}) {
[] utPort.receive(UtCamResults: { utCamChangePositionResult := true}) {
tc_wait.stop;
}
[] utPort.receive {
tc_wait.stop;
[] utPort.receive(UtCamResults: { utCamChangePositionResult := false }) {
tc_wait.stop;
log("*** f_utChangePosition: INFO: IUT position change was not successful ***");
f_selfOrClientSyncAndVerdict("error", e_error);
}
[] a_utDefault() {
}
[] tc_wait.timeout {
log("*** " & testcasename() & ": INFO: Could not receive expected UT message from IUT in time ***");
......@@ -391,7 +389,7 @@ module LibItsCam_Functions {
function f_prInitialState(
in Scenario p_scenario := e_staticPosition,
in boolean p_awaitInitialCAM := true,
in template (value) UtInitialize p_camInitialize := m_camInitialize
in template (value) UtCamInitialize p_camInitialize := m_camInitialize
) runs on ItsCam {
f_utInitializeIut(p_camInitialize);
......@@ -503,4 +501,4 @@ module LibItsCam_Functions {
}
} // end of group camGenerators
} // end LibItsCam_Functions
\ No newline at end of file
} // end LibItsCam_Functions
......@@ -119,7 +119,7 @@ module LibItsCam_Templates {
/**
* @desc Initializes the CAM IUT.
*/
template (value) UtInitialize m_camInitialize := {
template (value) UtCamInitialize m_camInitialize := {
hashedId8 := '0000000000000000'O
}
......
......@@ -47,11 +47,9 @@ module LibItsCam_TestSystem {
*/
type port UpperTesterPort message {
out
UtInitialize, UtCamTrigger, UtChangePosition, UtActivatePositionTime, UtDeactivatePositionTime;
UtCamInitialize, UtCamTrigger, UtCamChangePosition, UtActivatePositionTime, UtDeactivatePositionTime;
in
//FIXME RGY As discussed, list of boolean result responses is collected into a top-level union
// UtInitializeResult, UtCamTriggerResult, UtChangePositionResult, UtActivatePositionTimeResult, UtDeactivatePositionTimeResult, UtCamEventInd;
UtCommonResults, UpperTesterCamResults, UtCamEventInd;
UtCamResults, UtCamEventInd;
} // end UpperTesterPort
} // end portDefinitions
......
......@@ -11,125 +11,174 @@
*/
module LibItsCam_TypesAndValues {
// LibCommon
import from LibCommon_BasicTypesAndValues all;
// import from LibCommon_DataStrings all;
// LibCommon
import from LibCommon_BasicTypesAndValues all;
import from LibCommon_DataStrings all;
// LibIts
import from ITS_Container language "ASN.1:1997" all;
import from CAM_PDU_Descriptions language "ASN.1:1997" all;
// import from DENM_PDU_Descriptions language "ASN.1:1997" all;
// LibIts
import from ITS_Container language "ASN.1:1997" all;
import from CAM_PDU_Descriptions language "ASN.1:1997" all;
// import from DENM_PDU_Descriptions language "ASN.1:1997" all;
group camValues {
group camValues {
const float c_lowFrequencyGenerationTime := 0.5; //500 ms
const float c_specialVehicleGenerationTime := 0.5; //500 ms
const float c_lowFrequencyGenerationTime := 0.5; //500 ms
const float c_specialVehicleGenerationTime := 0.5; //500 ms
const AccelerationControl c_accCtrlIdle := '0000000'B;
const AccelerationControl c_accCtrlIdle := '0000000'B;
const ExteriorLights c_elAllLightsOff := '00000000'B;
const ExteriorLights c_elAllLightsOff := '00000000'B;
const VehicleRole c_vehicleRole_publicTransport := publicTransport;
const VehicleRole c_vehicleRole_specialTransport := specialTransport;
const VehicleRole c_vehicleRole_dangerousGoods := dangerousGoods;
const VehicleRole c_vehicleRole_roadWork := roadWork;
const VehicleRole c_vehicleRole_rescue := rescue;
const VehicleRole c_vehicleRole_emergency := emergency;
const VehicleRole c_vehicleRole_safetyCar := safetyCar;
const VehicleRole c_vehicleRole_publicTransport := publicTransport;
const VehicleRole c_vehicleRole_specialTransport := specialTransport;
const VehicleRole c_vehicleRole_dangerousGoods := dangerousGoods;
const VehicleRole c_vehicleRole_roadWork := roadWork;
const VehicleRole c_vehicleRole_rescue := rescue;
const VehicleRole c_vehicleRole_emergency := emergency;
const VehicleRole c_vehicleRole_safetyCar := safetyCar;
const DangerousGoodsBasic c_dangerousGoodsBasic_explosives1 := explosives1;
const DangerousGoodsBasic c_dangerousGoodsBasic_explosives2 := explosives2;
const DangerousGoodsBasic c_dangerousGoodsBasic_explosives3 := explosives3;
const DangerousGoodsBasic c_dangerousGoodsBasic_explosives4 := explosives4;
const DangerousGoodsBasic c_dangerousGoodsBasic_explosives5 := explosives5;
const DangerousGoodsBasic c_dangerousGoodsBasic_explosives6 := explosives6;
const DangerousGoodsBasic c_dangerousGoodsBasic_flammableGases := flammableGases;
const DangerousGoodsBasic c_dangerousGoodsBasic_nonFlammableGases := nonFlammableGases;
const DangerousGoodsBasic c_dangerousGoodsBasic_toxicGases := toxicGases;
const DangerousGoodsBasic c_dangerousGoodsBasic_flammableLiquids := flammableLiquids;
const DangerousGoodsBasic c_dangerousGoodsBasic_flammableSolids := flammableSolids;
const DangerousGoodsBasic c_dangerousGoodsBasic_substancesLiableToSpontaneousCombustion := substancesLiableToSpontaneousCombustion;
const DangerousGoodsBasic c_dangerousGoodsBasic_substancesEmittingFlammableGasesUponContactWithWater := substancesEmittingFlammableGasesUponContactWithWater;
const DangerousGoodsBasic c_dangerousGoodsBasic_oxidizingSubstances := oxidizingSubstances;
const DangerousGoodsBasic c_dangerousGoodsBasic_organicPeroxides := organicPeroxides;
const DangerousGoodsBasic c_dangerousGoodsBasic_toxicSubstances := toxicSubstances;
const DangerousGoodsBasic c_dangerousGoodsBasic_infectiousSubstances := infectiousSubstances;
const DangerousGoodsBasic c_dangerousGoodsBasic_radioactiveMaterial := radioactiveMaterial;
const DangerousGoodsBasic c_dangerousGoodsBasic_corrosiveSubstances := corrosiveSubstances;
const DangerousGoodsBasic c_dangerousGoodsBasic_miscellaneousDangerousSubstances := miscellaneousDangerousSubstances;
const DangerousGoodsBasic c_dangerousGoodsBasic_explosives1 := explosives1;
const DangerousGoodsBasic c_dangerousGoodsBasic_explosives2 := explosives2;
const DangerousGoodsBasic c_dangerousGoodsBasic_explosives3 := explosives3;
const DangerousGoodsBasic c_dangerousGoodsBasic_explosives4 := explosives4;
const DangerousGoodsBasic c_dangerousGoodsBasic_explosives5 := explosives5;
const DangerousGoodsBasic c_dangerousGoodsBasic_explosives6 := explosives6;
const DangerousGoodsBasic c_dangerousGoodsBasic_flammableGases := flammableGases;
const DangerousGoodsBasic c_dangerousGoodsBasic_nonFlammableGases := nonFlammableGases;
const DangerousGoodsBasic c_dangerousGoodsBasic_toxicGases := toxicGases;
const DangerousGoodsBasic c_dangerousGoodsBasic_flammableLiquids := flammableLiquids;
const DangerousGoodsBasic c_dangerousGoodsBasic_flammableSolids := flammableSolids;
const DangerousGoodsBasic c_dangerousGoodsBasic_substancesLiableToSpontaneousCombustion := substancesLiableToSpontaneousCombustion;
const DangerousGoodsBasic c_dangerousGoodsBasic_substancesEmittingFlammableGasesUponContactWithWater := substancesEmittingFlammableGasesUponContactWithWater;
const DangerousGoodsBasic c_dangerousGoodsBasic_oxidizingSubstances := oxidizingSubstances;
const DangerousGoodsBasic c_dangerousGoodsBasic_organicPeroxides := organicPeroxides;
const DangerousGoodsBasic c_dangerousGoodsBasic_toxicSubstances := toxicSubstances;
const DangerousGoodsBasic c_dangerousGoodsBasic_infectiousSubstances := infectiousSubstances;
const DangerousGoodsBasic c_dangerousGoodsBasic_radioactiveMaterial := radioactiveMaterial;
const DangerousGoodsBasic c_dangerousGoodsBasic_corrosiveSubstances := corrosiveSubstances;
const DangerousGoodsBasic c_dangerousGoodsBasic_miscellaneousDangerousSubstances := miscellaneousDangerousSubstances;
} // end group camValues
} // end group camValues
group certificates {
group certificates {
const charstring PX_CERT_IUT_CAM_02 := "CERT_IUT_CAM_BO_02_AT";
const charstring PX_CERT_IUT_CAM_03 := "CERT_IUT_CAM_BO_03_AT";
const charstring PX_CERT_IUT_CAM_02 := "CERT_IUT_CAM_BO_02_AT";
const charstring PX_CERT_IUT_CAM_03 := "CERT_IUT_CAM_BO_03_AT";
}
}
group utPrimitives {
group utPrimitives {
/**
* @desc Upper Tester message to initialize IUT
* @member hashedId8 In case of secured mode set, hashedId8 indicate which certificate the IUT shall use
*/
type record UtCamInitialize {
Oct8 hashedId8
} with {
variant "FIELDORDER(msb)"
}
/**
* @desc Upper Tester results message of the CAM IUT
* @member utCamInitialize -
* @member utCamTriggerResult -
* @member utCamChangePositionResult -
* @member utActivatePositionTimeResult -
* @member utDeactivatePositionTimeResult -
*/
type union UtCamResults {
boolean utCamInitializeResult,
boolean utCamTriggerResult,
boolean utCamChangePositionResult,
boolean utActivatePositionTimeResult,
boolean utDeactivatePositionTimeResult
} with {
variant ""
} // End of type UtCamResults
/**
* @desc
* @member changeCurvature Changes the curvature.
* @member changeSpeed Changes the speed in cm/s.
* @member setAccelerationControlStatus Sets the acceleration control status.
* @member setExteriorLightsStatus Sets the exterior lights status.
* @member changeHeading Changes the heading.
* @member setDriveDirection Sets the drive direction.
* @member setStationType
* @member setVehicleRole
* @member setEmbarkationStatus
* @member setPtActivation
* @member setDangerousGoods
* @member setLightBarSireneStatus
* @member changeYawRate Changes the yaw rate in offsets of 0.01 degrees per second.
* @desc Upper Tester message to change the position of IUT. Values a relatives
*/
type union UtCamTrigger {
CurvatureValue changeCurvature,
Int16 changeSpeed,
AccelerationControl setAccelerationControlStatus,
ExteriorLights setExteriorLightsStatus,
HeadingValue changeHeading,
DriveDirection setDriveDirection,
YawRateValue changeYawRate,
StationType setStationType,
VehicleRole setVehicleRole,