Commit 759cf87e authored by Elemer Lelik's avatar Elemer Lelik
Browse files

update 20181212

parent 5ea26751
# titan.TestPorts.SocketCANasp
# titan.TestPorts.SocketCANasp
# compiled with: Titan CRL 113 200/6 R5A
# GCC 7.3.0 Using OpenSSL 1.0.2n
Main project page:
......
##############################################################################
# Copyright (c) 2000-2018 Ericsson Telecom AB
# Copyright (c) 2010, 2016 Ericsson AB
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v2.0
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
# https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html
# http://www.eclipse.org/legal/epl-v10.html
#
# Contributors:
# Michael Josenhans
......
##############################################################################
# Copyright (c) 2000-2018 Ericsson Telecom AB
# Copyright (c) 2010, 2016 Ericsson AB
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v2.0
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
# https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html
# http://www.eclipse.org/legal/epl-v10.html
#
# Contributors:
# Michael Josenhans
......@@ -37,6 +37,7 @@ Isobustest.tc_encdec_networkMessage_N_SP_Response_with_template
Isobustest.tc_encdec_N_SP_Response_with_template
Isobustest.tc_encdec_ecu2vt_workingSetMaintenanceReq
Isobustest.tc_dec_requestForAddressClaimed
Isobustest.tc_encdec_etp_dt
Isobustest.tc_dec_largemessage
//Isobustest.tc_Example001
//Isobustest.tc_Example002
/* Copyright (c) 2000-2018 Ericsson Telecom AB
/* Copyright (c) 2010, 2016 Ericsson AB
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Michael Josenhans
......@@ -113,13 +113,8 @@ type record CAN_frame_j1939mod {
commandedAddress, can_j1939.comp = 'FED800'O)" //254 all and conjuction needed!!!!!!
}
//---------------------------------------------------------------------------------------
function j1939frame2can(in CAN_frame_j1939 p_can_frame_j1939, in Priority p_priority, in DestinationAddress p_da, in SourceAddress p_sa) return CAN_frame {
//---------------------------------------------------------------------------------------
var CAN_frame v_can_frame
v_can_frame.can_id := pdu1_j1939id2canid(p_can_frame_j1939.can_j1939, p_priority, p_da, p_sa)
// v_can_frame.can_pdu := encode_AnyIsoBusPdu(p_can_frame_j1939.can_pdu)
v_can_frame.can_pdu := substr(f_encode_CAN_frame_j1939(p_can_frame_j1939),0,3)//strip 3 byte header
......@@ -144,7 +139,6 @@ return v_can_id
function j1939id2canid(in J1939 p_j1939) return CAN_id{
var CAN_id v_can_id
v_can_id := int2oct(
oct2int(p_j1939.sa) + oct2int(p_j1939.ps)*256 + oct2int(p_j1939.pf) * 256 * 256 +
bit2int(p_j1939.dp) * 256 * 256 * 256 + bit2int(p_j1939.res) * 256 * 256 * 256 * 2 +
......@@ -318,6 +312,7 @@ function f_encode_CAN_frame_j1939(in CAN_frame_j1939 pdu) return octetstring
function f_decode_CAN_frame_j1939(in octetstring data) return CAN_frame_j1939
//---------------------------------------------------------------------------
{
log("f_insert_aux_hdr(data)", f_insert_aux_hdr(data));
return f_map_mod2frame(decode_CAN_frame_j1939mod(f_insert_aux_hdr(data)))
......
......@@ -8,9 +8,36 @@ type INT1 VTfunction
type integer AnyObjectID (0..65535) with { variant "FIELDLENGTH(16)" }; // includes also 65535 as no object
type integer ValidObjectID (0..65534) with { variant "FIELDLENGTH(16)" };
type integer AttributeID (0..255) with { variant "FIELDLENGTH(8)" };
type integer PercentType (0..100) with { variant "FIELDLENGTH(8)" };
type integer DeltaPositionType (-127..128) with { variant "FIELDLENGTH(8)" };
type integer XPositionType (-32768 .. +32767) with { variant "FIELDLENGTH(16)" };
type integer YPositionType (-32768 .. +32767) with { variant "FIELDLENGTH(16)" };
type integer XOffsetType (-32768 .. +32767) with { variant "FIELDLENGTH(16)" };
type integer YOffsetType (-32768 .. +32767) with { variant "FIELDLENGTH(16)" };
type integer ViewportXAttribute (-32768 .. +32767) with { variant "FIELDLENGTH(16)" };
type integer ViewportYAttribute (-32768 .. +32767) with { variant "FIELDLENGTH(16)" };
type INT2 WidthType
type INT2 HeightType
type INT2 PositionType
type INT1 KeyNumberType
type INT2 FrequencyType
type INT1 ColorType // See A.3 VT standard colour palette
type INT1 FontSize
type INT1 FontType
type INT1 FontStyle
type INT1 LineWidth
type INT1 Priority
type INT1 Index
type BIT16n LineArt
type charstring CHR7 length(7) with { variant "FIELDLENGTH(7)" };
type CHR7 VersionLabel7Char
type float SingleFloat
with {
variant "FORMAT(IEEE754 float)"
}
type enumerated e_SoftKeyActivationReq_KeyAactivationCode {
keyHasBeenReleased (0),
......@@ -108,6 +135,20 @@ type enumerated e_VTSelectInputObject_selection {
objectIsSelected (1)}
with {variant "PADDING(octet)" };
type record VTSelectInputObject_Bitmask{
boolean objectIsOpenForDataInput, // for v3 or earlier: true ,
// for v4 and later:
// 1 = object is open for data input – Byte 4 "selection" shall be set to objectIsSelected
boolean reserved1, // for v3 or earlier: true , for v4 and later: false
boolean reserved2, // for v3 or earlier: true , for v4 and later: false
boolean reserved3, // for v3 or earlier: true , for v4 and later: false
boolean reserved4, // for v3 or earlier: true , for v4 and later: false
boolean reserved5, // for v3 or earlier: true , for v4 and later: false
boolean reserved6, // for v3 or earlier: true , for v4 and later: false
boolean reserved7 // for v3 or earlier: true , for v4 and later: false
}
with {variant "" };
type record VTSelectInputObject_v4AndLater_Bitmask{
boolean objectIsOpenForDataInput,
boolean reserved1 (false),
......@@ -120,6 +161,16 @@ type record VTSelectInputObject_v4AndLater_Bitmask{
}
with {variant "" };
type record VTSelectInputObjectReq {
VTfunction vtfunction (3),
ValidObjectID objectID,
e_VTSelectInputObject_selection selection,
VTSelectInputObject_Bitmask bitmask,
OCT1 reserved6 ('FF'O),
OCT1 reserved7 ('FF'O),
OCT1 reserved8 ('FF'O)
} with {variant "" };
type record VTSelectInputObjectReq_v3AndPrior {
VTfunction vtfunction (3),
ValidObjectID objectID,
......@@ -140,6 +191,16 @@ type record VTSelectInputObjectReq_v4AndLater {
OCT1 reserved8 ('FF'O)
} with {variant "" };
type record VTSelectInputObjectRes {
VTfunction vtfunction (3),
ValidObjectID objectID,
e_VTSelectInputObject_selection selection,
VTSelectInputObject_Bitmask bitmask,
OCT1 reserved6 ('FF'O),
OCT1 reserved7 ('FF'O),
OCT1 reserved8 ('FF'O)
} with {variant "" };
type record VTSelectInputObjectRes_v4AndPrior {
VTfunction vtfunction (3),
ValidObjectID objectID,
......@@ -160,6 +221,39 @@ type record VTSelectInputObjectRes_v5AndLater {
OCT1 reserved8 ('FF'O)
} with {variant "" };
type record VTESC_ErrorCodes{
boolean noInputFieldIsSelected,
boolean reserved1 (false),
boolean reserved2 (false),
boolean reserved3 (false),
boolean anyOtherError,
boolean reserved5 (false),
boolean reserved6 (false),
boolean reserved7 (false)
}
with {variant "" };
type record VTESCReq {
VTfunction vtfunction (4),
AnyObjectID objectID, // Object ID where input was aborted if no error code
VTESC_ErrorCodes errorCodes,
OCT1 reserved5 ('FF'O),
OCT1 reserved6 ('FF'O),
OCT1 reserved7 ('FF'O),
OCT1 reserved8 ('FF'O)
} with {variant "" };
type record VTESCRes {
VTfunction vtfunction (4),
AnyObjectID objectID, // Object ID where input was aborted if no error code
OCT1 reserved4 ('FF'O),
OCT1 reserved5 ('FF'O),
OCT1 reserved6 ('FF'O),
OCT1 reserved7 ('FF'O),
OCT1 reserved8 ('FF'O)
} with {variant "" };
type record VTChangeNumericValueReq
{
VTfunction vtfunction (5),
......@@ -176,6 +270,93 @@ type record VTChangeNumericValueRes
OCT4 value_
} with { variant "" };
type record VTChangeActiveMasErrorcodes{
boolean reserved0 (false),
boolean reserved1 (false),
boolean missingObjects,
boolean maskOrChildObjectHasErrors,
boolean anyOtherError,
boolean poolBeingDeleted,
boolean reserved6 (false),
boolean reserved7 (false)
}
with {variant "" };
type record VTChangeActiveMaskReq
{
VTfunction vtfunction (6),
ValidObjectID activeMaskOrWindowMaskOrKeyGroupObjectID,
VTChangeActiveMasErrorcodes errorCodes,
ValidObjectID objectIDcontainingError,
ValidObjectID parentObjectIDofErrorObjectID
} with { variant "" };
type record VTChangeActiveMaskRes
{
VTfunction vtfunction (6),
ValidObjectID activeMaskObjectID,
OCT1 reserved4 ('FF'O),
OCT1 reserved5 ('FF'O),
OCT1 reserved6 ('FF'O),
OCT1 reserved7 ('FF'O),
OCT1 reserved8 ('FF'O)
} with { variant "" };
type record VTChangeSoftKeyMaskErrorCodes{
boolean reserved0 (false),
boolean reserved1 (false),
boolean missingObjects,
boolean maskOrChildObjectHasErrors,
boolean anyOtherError,
boolean poolBeingDeleted, // this bit is always set in v5 or later
boolean reserved6 (false),
boolean reserved7 (false)
}
with {variant "" };
type record VTChangeSoftKeyMaskReq
{
VTfunction vtfunction (7),
ValidObjectID dataOrAlarmMaskObjectID,
ValidObjectID softKeyMaskObjectID,
VTChangeSoftKeyMaskErrorCodes errorCodes,
OCT1 reserved7 ('FF'O),
OCT1 reserved8 ('FF'O)
} with { variant "" };
type record VTChangeSoftKeyMaskRes
{
VTfunction vtfunction (7),
ValidObjectID dataOrAlarmMaskObjectID,
ValidObjectID softKeyMaskObjectID,
OCT1 reserved6 ('FF'O),
OCT1 reserved7 ('FF'O),
OCT1 reserved8 ('FF'O)
} with { variant "" };
type record VTChangeStringValueReq
{
VTfunction vtfunction (8),
ValidObjectID inputStringOrStringVariableObjectID,
INT1 numberOfBytes,
octetstring enteredStringValue
} with {
variant (numberOfBytes) "LENGTHTO(enteredStringValue)";
variant (numberOfBytes) "UNIT(octets)"
}
type record VTChangeStringValueRes
{
VTfunction vtfunction (8),
OCT1 reserved2 ('FF'O),
OCT1 reserved3 ('FF'O),
ValidObjectID inputStringOrStringVariableObjectID,
OCT1 reserved6 ('FF'O),
OCT1 reserved7 ('FF'O),
OCT1 reserved8 ('FF'O)
} with { variant "" };
type record VTOnUserLayoutHideShowReq
{
VTfunction vtfunction (9),
......@@ -196,6 +377,205 @@ type record VTOnUserLayoutHideShowRes
OCT1 reserved8 ('FF'O)
} with { variant "" };
type record VTControlAudioSignalTerminationParameterTerminationCause
{
boolean AudioWasTerminated (true),
boolean reserved1 (false),
boolean reserved2 (false),
boolean reserved3 (false),
boolean reserved4 (false),
boolean reserved5 (false),
boolean reserved6 (false),
boolean reserved7 (false)
}
with {variant "" };
type record VTControlAudioSignalTerminationInd // version V4 or higher
{
VTfunction vtfunction (10),
VTControlAudioSignalTerminationParameterTerminationCause terminationCause,
OCT1 reserved3 ('FF'O),
OCT1 reserved4 ('FF'O),
OCT1 reserved5 ('FF'O),
OCT1 reserved6 ('FF'O),
OCT1 reserved7 ('FF'O),
OCT1 reserved8 ('FF'O)
} with { variant "" };
type octetstring ObjectPoolRecords with { variant "" };
type record ObjectPoolTransferInd
{
VTfunction vtfunction (17),
ObjectPoolRecords objectPoolRecords
} with { variant "" };
type record EndOfObjectPoolReq
{
VTfunction vtfunction (18),
OCT1 reserved2 ('FF'O),
OCT1 reserved3 ('FF'O),
OCT1 reserved4 ('FF'O),
OCT1 reserved5 ('FF'O),
OCT1 reserved6 ('FF'O),
OCT1 reserved7 ('FF'O),
OCT1 reserved8 ('FF'O)
} with { variant "" };
type record EndOfObjectPoolResErrorCodes
{
boolean thereAreErrorsInTheObjectPool, //refer to Bytes 3 to 8 for additional error information
boolean vtRanOutOfMemoryDuringTransfer (false),
boolean reserved2 (false),
boolean reserved3 (false),
boolean anyOtherError,
boolean reserved5 (false),
boolean reserved6 (false),
boolean reserved7 (false)
}
with {variant "" };
type record EndOfObjectPoolResObjectPoolErrorCodes
{
boolean methodOrAttributeNotSupportedByTheVT,
boolean unknownObjectReference, // (missing object)
boolean anyOtherError,
boolean objectPoolWasDeletedFromVolatileMemory,
boolean reserved4 (false),
boolean reserved5 (false),
boolean reserved6 (false),
boolean reserved7 (false)
}
with {variant "" };
type record EndOfObjectPoolRes
{
VTfunction vtfunction (18),
EndOfObjectPoolResErrorCodes errorCodes,
AnyObjectID parentObjectIDoFaultyObject, // set to NULL Object ID if there are no
AnyObjectID objectIDofFaultyObject, // set to NULL Object ID if there are no
EndOfObjectPoolResObjectPoolErrorCodes objectPoolErrorCodes,
OCT1 reserved8 ('FF'O)
} with { variant "" };
type record VTfunction32VT2ECU
{
VTfunction vtfunction (32),
octetstring notImplementedYet
} with { variant "" };
type record VTfunction32ECU2VT
{
VTfunction vtfunction (32),
octetstring notImplementedYet
} with { variant "" };
type record VTfunction33ECU2VT
{
VTfunction vtfunction (33),
octetstring notImplementedYet
} with { variant "" };
type record VTfunction34VT2ECU
{
VTfunction vtfunction (34),
octetstring notImplementedYet
} with { variant "" };
type record VTfunction34ECU2VT
{
VTfunction vtfunction (34),
octetstring notImplementedYet
} with { variant "" };
type record VTfunction36VT2ECU
{
VTfunction vtfunction (36),
octetstring notImplementedYet
} with { variant "" };
type record VTfunction36ECU2VT
{
VTfunction vtfunction (36),
octetstring notImplementedYet
} with { variant "" };
type record VTfunction37VT2ECU
{
VTfunction vtfunction (37),
octetstring notImplementedYet
} with { variant "" };
type record VTfunction37ECU2VT
{
VTfunction vtfunction (37),
octetstring notImplementedYet
} with { variant "" };
type ValidObjectID AuxiliaryInputType2StatusInd_AuxiliaryInputObjectID
type BIT2np AuxiliaryInputType2StatusInd_OperatingStateType
type record AuxiliaryInputType2StatusInd
{
VTfunction vtfunction (38),
AuxiliaryInputType2StatusInd_AuxiliaryInputObjectID auxiliaryInputObjectID,
OCT2 value1,
OCT2 value2,
AuxiliaryInputType2StatusInd_OperatingStateType operationState
} with { variant "" };
type record VTfunction39VT2ECU
{
VTfunction vtfunction (39),
octetstring notImplementedYet
} with { variant "" };
type record VTfunction39ECU2VT
{
VTfunction vtfunction (39),
octetstring notImplementedYet
} with { variant "" };
type record ESCreq
{
VTfunction vtfunction (146),
OCT1 reserved2 ('FF'O),
OCT1 reserved3 ('FF'O),
OCT1 reserved4 ('FF'O),
OCT1 reserved5 ('FF'O),
OCT1 reserved6 ('FF'O),
OCT1 reserved7 ('FF'O),
OCT1 reserved8 ('FF'O)
} with { variant "" };
type record ESCerrorCodes
{
boolean NoInputFieldIsOpenForInputESCignored,
boolean reserved1 (false),
boolean reserved2 (false),
boolean reserved3 (false),
boolean anyOtherError,
boolean reserved5 (false),
boolean reserved6 (false),
boolean reserved7 (false)
}
with {variant "" };
type record ESCres
{
VTfunction vtfunction (146),
AnyObjectID ObjectIDwhereInputWasAborted, // if no error code
ESCerrorCodes ErrorCodes,
OCT1 reserved5 ('FF'O),
OCT1 reserved6 ('FF'O),
OCT1 reserved7 ('FF'O),
OCT1 reserved8 ('FF'O)
} with { variant "" };
type enumerated e_HideShowObject_state {
hide (0),
show (1)}
......@@ -216,7 +596,7 @@ type record HideShowObjectRes_errorCodes{
boolean referencesToMissingObjects,
boolean invalidObjectID,
boolean undefined (false),
boolean AnyOtherError,
boolean anyOtherError,
boolean reserved4 (false),
boolean reserved5 (false),
boolean reserved6 (false),
......@@ -235,6 +615,60 @@ type record HideShowObjectRes
OCT1 reserved8 ('FF'O)
} with {variant "" };
type record VTfunction161VT2ECU
{
VTfunction vtfunction (161),
octetstring notImplementedYet
} with { variant "" };
type record VTfunction161ECU2VT
{
VTfunction vtfunction (161),
octetstring notImplementedYet
} with { variant "" };
type enumerated e_EnableDisableObject_DisableEnable {
disable (0),
enable (1)}
with {variant "PADDING(octet)" };
type record EnableDisableObjectReq
{
VTfunction vtfunction (161),
ValidObjectID objectID,
e_EnableDisableObject_DisableEnable DisableEnable,
OCT1 reserved5 ('FF'O),
OCT1 reserved6 ('FF'O),
OCT1 reserved7 ('FF'O),
OCT1 reserved8 ('FF'O)
} with {variant "" };
type record EnableDisableObjectRes_errorCodes {
boolean reserved0 (false),
boolean invalidObjectID,
boolean commandError,
boolean couldNotCompleteOperatorInputIsActiveOnThisObject,
boolean anyOtherError,
boolean reserved5 (false),
boolean reserved6 (false),
boolean reserved7 (false)
}
with {variant "" };
type record EnableDisableObjectRes
{
VTfunction vtfunction (161),
ValidObjectID objectID,
e_EnableDisableObject_DisableEnable DisableEnable,
EnableDisableObjectRes_errorCodes errorCodes,
OCT1 reserved6 ('FF'O),
OCT1 reserved7 ('FF'O),
OCT1 reserved8 ('FF'O)
} with {variant "" };
type enumerated e_SelectInputObjectReq_Option {
activateForDataInputTheObjectReferencedByObjectID (0),
activateForDataInputTheObjectReferencedByObjectID1 (1),
......@@ -262,7 +696,7 @@ type record SelectInputObjectRes_errorCodes {
boolean invalidObjectID,
boolean objectIsNotOnTheActiveMaskOrObjectIsInAHiddenContainer,
boolean couldNotCompleteAnotherInputFieldIsCurrentlyBeingModifiedOrAButtonOrSoftKeyisCurrentlyBeingHeld,
boolean AnyOtherError,
boolean anyOtherError,
boolean reserved5 (false),
boolean reserved6 (false),
boolean reserved7 (false)
......@@ -298,7 +732,7 @@ type record ControlAudioSignalRes_ErrorCodes {
boolean undefined1 (false),
boolean undefined2 (false),
boolean undefined3 (false),
boolean AnyOtherError,
boolean anyOtherError,
boolean reserved5 (false),
boolean reserved6 (false),
boolean reserved7 (false)
......@@ -316,48 +750,329 @@ type record ControlAudioSignalRes{
OCT1 reserved8 ('FF'O)
} with {variant "" };
type record ChangeNumericValueReq{
VTfunction vtfunction (168),
ValidObjectID objectID,
type record SetAudioVolumeReq
{
VTfunction vtfunction (164),
PercentType volumeInPercent,
OCT1 reserved4 ('FF'O),
OCT4 newValueForValueAttribute
} with {variant "" };
OCT1 reserved5 ('FF'O),