Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Eclipse Projects
Eclipse Titan
titan.TestPorts.SocketCANasp
Commits
759cf87e
Commit
759cf87e
authored
Dec 12, 2018
by
Elemer Lelik
Browse files
update 20181212
parent
5ea26751
Changes
14
Expand all
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
759cf87e
# 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:
...
...
demo/CAN_matrix_test.cfg
View file @
759cf87e
##############################################################################
# Copyright (c) 20
00-
201
8
Ericsson
Telecom
AB
# Copyright (c) 20
10,
201
6
Ericsson AB
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v
2
.0
# are made available under the terms of the Eclipse Public License v
1
.0
# which accompanies this distribution, and is available at
# http
s
://www.eclipse.org/
org/documents/epl-2.0/EPL-2.
0.html
# http://www.eclipse.org/
legal/epl-v1
0.html
#
# Contributors:
# Michael Josenhans
...
...
demo/Isobus.cfg
View file @
759cf87e
##############################################################################
# Copyright (c) 20
00-
201
8
Ericsson
Telecom
AB
# Copyright (c) 20
10,
201
6
Ericsson AB
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v
2
.0
# are made available under the terms of the Eclipse Public License v
1
.0
# which accompanies this distribution, and is available at
# http
s
://www.eclipse.org/
org/documents/epl-2.0/EPL-2.
0.html
# http://www.eclipse.org/
legal/epl-v1
0.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
demo/Isobus.ttcn
View file @
759cf87e
/* Copyright (c) 20
00-
201
8
Ericsson
Telecom
AB
/* Copyright (c) 20
10,
201
6
Ericsson AB
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v
2
.0
* are made available under the terms of the Eclipse Public License v
1
.0
* which accompanies this distribution, and is available at
* http
s
://www.eclipse.org/
org/documents/epl-2.0/EPL-2.
0.html
* http://www.eclipse.org/
legal/epl-v1
0.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
)))
...
...
demo/IsobusVTMessageTypes.ttcn
View file @
759cf87e
This diff is collapsed.
Click to expand it.
demo/Isobus_Templates.ttcn
View file @
759cf87e
...
...
@@ -7,29 +7,29 @@ import from IsobusNMMessageTypes all
import
from
Isobus
all
import
from
General_Types
all
template
CAN_frame_j1939
t_message
(
Isobus
.
Priority
prio_param
,
BIT1
res_param
,
BIT1
dp_param
,
OCT1
pf_param
,
OCT1
ps_param
,
SourceAddress
sa_param
,
template
AnyIsoBusPdu
t_can_pdu
)
:=
{
can_j1939
:=
{
prio
:=
prio_param
,
res
:=
res_param
,
dp
:=
dp_param
,
pf
:=
pf_param
,
ps
:=
ps_param
,
sa
:=
sa_param
},
can_pdu
:=
t_can_pdu
}
template
CAN_frame_j1939
t_network_message
(
Isobus
.
Priority
prio_param
,
BIT1
res_param
,
BIT1
dp_param
,
OCT1
pf_param
,
OCT1
ps_param
,
SourceAddress
sa_param
,
template
IsobusNMMessageTypes
.
NetworkMessage
t_networkMessage
)
:=
{
can_j1939
:=
{
prio
:=
prio_param
,
res
:=
res_param
,
dp
:=
dp_param
,
pf
:=
pf_param
,
ps
:=
ps_param
,
sa
:=
sa_param
},
can_pdu
:=
{
networkMessage
:=
t_networkMessage
}
}
template
CAN_frame_j1939
t_message
(
Isobus
.
Priority
prio_param
,
BIT1
res_param
,
BIT1
dp_param
,
OCT1
pf_param
,
OCT1
ps_param
,
SourceAddress
sa_param
,
template
AnyIsoBusPdu
t_can_pdu
)
:=
{
can_j1939
:=
{
prio
:=
prio_param
,
res
:=
res_param
,
dp
:=
dp_param
,
pf
:=
pf_param
,
ps
:=
ps_param
,
sa
:=
sa_param
},
can_pdu
:=
t_can_pdu
}
template
CAN_frame_j1939
t_network_message
(
Isobus
.
Priority
prio_param
,
BIT1
res_param
,
BIT1
dp_param
,
OCT1
pf_param
,
OCT1
ps_param
,
SourceAddress
sa_param
,
template
IsobusNMMessageTypes
.
NetworkMessage
t_networkMessage
)
:=
{
can_j1939
:=
{
prio
:=
prio_param
,
res
:=
res_param
,
dp
:=
dp_param
,
pf
:=
pf_param
,
ps
:=
ps_param
,
sa
:=
sa_param
},
can_pdu
:=
{
networkMessage
:=
t_networkMessage
}
}
template
ECU2VT
t_GetMemoryReqX
(
INT3
p_memoryRequired
)
:=
{
getMemoryReq
:=
{
...
...
@@ -54,23 +54,265 @@ template AnyIsoBusPdu t_GetMemoryReq_pdu(INT3 p_memoryRequired) := {
}
template
GetMemoryReq
t_GetMemoryReq
(
INT3
p_memoryRequired
)
:=
{
vtfunction
:=
194
,
reserved2
:=
'
FF
'
O
,
memoryRequired
:=
p_memoryRequired
,
template
ButtonActivationReq
t_ButtonActivationReq
(
template
e_ButtonActivationReq_KeyAactivationCode
p_keyAactivationCode
,
template
ValidObjectID
p_objectID
,
template
ValidObjectID
p_parentObjectID
,
template
KeyNumberType
p_buttonKeyCode
)
:=
{
vtfunction
:=
1
,
keyAactivationCode
:=
p_keyAactivationCode
,
objectID
:=
p_objectID
,
parentObjectID
:=
p_parentObjectID
,
buttonKeyCode
:=
p_buttonKeyCode
,
reserved8
:=
'
FF
'
O
}
template
ButtonActivationRes
t_ButtonActivationRes
(
template
e_ButtonActivationRes_KeyAactivationCode
p_keyAactivationCode
,
template
ValidObjectID
p_objectID
,
template
ValidObjectID
p_parentObjectID
,
template
KeyNumberType
p_buttonKeyCode
)
:=
{
vtfunction
:=
1
,
keyAactivationCode
:=
p_keyAactivationCode
,
objectID
:=
p_objectID
,
parentObjectID
:=
p_parentObjectID
,
buttonKeyCode
:=
p_buttonKeyCode
,
reserved8
:=
'
FF
'
O
}
template
PointingEventReq
t_PointingEventReq
(
template
PositionType
p_x_position
,
template
PositionType
p_y_position
,
template
e_PointingEvent_touchState
p_touchState
)
:=
{
vtfunction
:=
2
,
x_position
:=
p_x_position
,
y_position
:=
p_y_position
,
touchState
:=
p_touchState
,
reserved7
:=
'
FF
'
O
,
reserved8
:=
'
FF
'
O
}
template
GetMemoryRes
t_GetMemoryRes
(
e_GetMemoryResVersionNumber
p_versionNumber
,
e_GetMemoryResStatus
p_status
)
:=
{
vtfunction
:=
194
,
versionNumber
:=
p_versionNumber
,
status
:=
p_status
,
reserved4
:=
'
FF
'
O
,
reserved5
:=
'
FF
'
O
,
reserved6
:=
'
FF
'
O
,
reserved7
:=
'
FF
'
O
,
reserved8
:=
'
FF
'
O
template
PointingEventRes
t_PointingEventRes
(
template
PositionType
p_x_position
,
template
PositionType
p_y_position
,
template
e_PointingEvent_touchState
p_touchState
)
:=
{
vtfunction
:=
2
,
x_position
:=
p_x_position
,
y_position
:=
p_y_position
,
touchState
:=
p_touchState
,
reserved7
:=
'
FF
'
O
,
reserved8
:=
'
FF
'
O
}
template
VTSelectInputObjectReq
t_VTSelectInputObjectReq
(
template
ValidObjectID
p_objectID
,
template
e_VTSelectInputObject_selection
p_selection
,
template
boolean
p_objectIsOpenForDataInput
,
template
boolean
p_reserved
// p_reserved for v3 or earlier: true , for v4 and later: false
)
:=
{
vtfunction
:=
3
,
objectID
:=
p_objectID
,
selection
:=
p_selection
,
bitmask
:=
{
objectIsOpenForDataInput
:=
p_objectIsOpenForDataInput
,
reserved1
:=
p_reserved
,
reserved2
:=
p_reserved
,
reserved3
:=
p_reserved
,
reserved4
:=
p_reserved
,
reserved5
:=
p_reserved
,
reserved6
:=
p_reserved
,
reserved7
:=
p_reserved
},
reserved6
:=
'
FF
'
O
,
reserved7
:=
'
FF
'
O
,
reserved8
:=
'
FF
'
O
}
template
VTSelectInputObjectReq_v3AndPrior
t_VTSelectInputObjectReq_v3AndPrior
(
template
ValidObjectID
p_objectID
,
template
e_VTSelectInputObject_selection
p_selection
)
:=
{
vtfunction
:=
3
,
objectID
:=
p_objectID
,
selection
:=
p_selection
,
reserved5
:=
'
FF
'
O
,
reserved6
:=
'
FF
'
O
,
reserved7
:=
'
FF
'
O
,
reserved8
:=
'
FF
'
O
}
template
VTSelectInputObjectReq_v4AndLater
t_VTSelectInputObjectReq_v4AndLater
(
template
ValidObjectID
p_objectID
,
template
e_VTSelectInputObject_selection
p_selection
,
template
VTSelectInputObject_v4AndLater_Bitmask
p_bitmask
)
:=
{
vtfunction
:=
3
,
objectID
:=
p_objectID
,
selection
:=
p_selection
,
bitmask
:=
p_bitmask
,
reserved6
:=
'
FF
'
O
,
reserved7
:=
'
FF
'
O
,
reserved8
:=
'
FF
'
O
}
template
VTSelectInputObjectRes
t_VTSelectInputObjectRes
(
template
ValidObjectID
p_objectID
,
template
e_VTSelectInputObject_selection
p_selection
,
template
boolean
p_objectIsOpenForDataInput
,
template
boolean
p_reserved
// p_reserved for v3 or earlier: true , for v4 and later: false
)
:=
{
vtfunction
:=
3
,
objectID
:=
p_objectID
,
selection
:=
p_selection
,
bitmask
:=
{
objectIsOpenForDataInput
:=
p_objectIsOpenForDataInput
,
reserved1
:=
p_reserved
,
reserved2
:=
p_reserved
,
reserved3
:=
p_reserved
,
reserved4
:=
p_reserved
,
reserved5
:=
p_reserved
,
reserved6
:=
p_reserved
,
reserved7
:=
p_reserved
},
reserved6
:=
'
FF
'
O
,
reserved7
:=
'
FF
'
O
,
reserved8
:=
'
FF
'
O
}
template
VTSelectInputObjectRes_v4AndPrior
t_VTSelectInputObjectRes_v4AndPrior
(
template
ValidObjectID
p_objectID
,
template
e_VTSelectInputObject_selection
p_selection
)
:=
{
vtfunction
:=
3
,
objectID
:=
p_objectID
,
selection
:=
p_selection
,
reserved5
:=
'
FF
'
O
,
reserved6
:=
'
FF
'
O
,
reserved7
:=
'
FF
'
O
,
reserved8
:=
'
FF
'
O
}
template
VTSelectInputObjectRes_v5AndLater
t_VTSelectInputObjectRes_v5AndLater
(
template
ValidObjectID
p_objectID
,
template
e_VTSelectInputObject_selection
p_selection
,
template
VTSelectInputObject_v4AndLater_Bitmask
p_bitmask
)
:=
{
vtfunction
:=
3
,
objectID
:=
p_objectID
,
selection
:=
p_selection
,
bitmask
:=
p_bitmask
,
reserved6
:=
'
FF
'
O
,
reserved7
:=
'
FF
'
O
,
reserved8
:=
'
FF
'
O
}
template
VTESCReq
t_VTESCReq
(
template
AnyObjectID
p_objectID
,
template
VTESC_ErrorCodes
p_errorCodes
)
:=
{
vtfunction
:=
4
,
objectID
:=
p_objectID
,
errorCodes
:=
p_errorCodes
,
reserved5
:=
'
FF
'
O
,
reserved6
:=
'
FF
'
O
,
reserved7
:=
'
FF
'
O
,
reserved8
:=
'
FF
'
O
}
template
VTESCRes
t_VTESCRes
(
template
AnyObjectID
p_objectID
)
:=
{
vtfunction
:=
4
,
objectID
:=
p_objectID
,
reserved4
:=
'
FF
'
O
,
reserved5
:=
'
FF
'
O
,
reserved6
:=
'
FF
'
O
,
reserved7
:=
'
FF
'
O
,
reserved8
:=
'
FF
'
O
}
template
VTChangeNumericValueReq
t_VTChangeNumericValueReq
(
template
ValidObjectID
p_objectID
,
template
OCT4
p_value
)
:=
{
vtfunction
:=
5
,
objectID
:=
p_objectID
,
reserved4
:=
'
FF
'
O
,
value_
:=
p_value
}
template
VTChangeNumericValueRes
t_VTChangeNumericValueRes
(
template
ValidObjectID
p_objectID
,
template
OCT4
p_value
)
:=
{
vtfunction
:=
5
,
objectID
:=
p_objectID
,
reserved4
:=
'
FF
'
O
,
value_
:=
p_value
}
template
VTChangeActiveMaskReq
t_VTChangeActiveMaskReq
(
template
ValidObjectID
p_activeMaskOrWindowMaskOrKeyGroupObjectID
,
template
VTChangeActiveMasErrorcodes
p_errorCodes
,
template
ValidObjectID
p_objectIDcontainingError
,
template
ValidObjectID
p_parentObjectIDofErrorObjectID
)
:=
{
vtfunction
:=
6
,
activeMaskOrWindowMaskOrKeyGroupObjectID
:=
p_activeMaskOrWindowMaskOrKeyGroupObjectID
,
errorCodes
:=
p_errorCodes
,
objectIDcontainingError
:=
p_objectIDcontainingError
,
parentObjectIDofErrorObjectID
:=
p_parentObjectIDofErrorObjectID
}
template
VTChangeActiveMaskRes
t_VTChangeActiveMaskRes
(
template
ValidObjectID
p_activeMaskObjectID
)
:=
{
vtfunction
:=
6
,
activeMaskObjectID
:=
p_activeMaskObjectID
,
reserved4
:=
'
FF
'
O
,
reserved5
:=
'
FF
'
O
,
reserved6
:=
'
FF
'
O
,
reserved7
:=
'
FF
'
O
,
reserved8
:=
'
FF
'
O
}
template
VTChangeSoftKeyMaskReq
t_VTChangeSoftKeyMaskReq
(
template
ValidObjectID
p_dataOrAlarmMaskObjectID
,
template
ValidObjectID
p_softKeyMaskObjectID
,
template
VTChangeSoftKeyMaskErrorCodes
p_errorCodes
)
:=
{
vtfunction
:=
7
,
dataOrAlarmMaskObjectID
:=
p_dataOrAlarmMaskObjectID
,
softKeyMaskObjectID
:=
p_softKeyMaskObjectID
,
errorCodes
:=
p_errorCodes
,
reserved7
:=
'
FF
'
O
,
reserved8
:=
'
FF
'
O
}
template
VTChangeSoftKeyMaskRes
t_VTChangeSoftKeyMaskRes
(
template
ValidObjectID
p_dataOrAlarmMaskObjectID
,
template
ValidObjectID
p_softKeyMaskObjectID
)
:=
{
vtfunction
:=
7
,
dataOrAlarmMaskObjectID
:=
p_dataOrAlarmMaskObjectID
,
softKeyMaskObjectID
:=
p_softKeyMaskObjectID
,
reserved6
:=
'
FF
'
O
,
reserved7
:=
'
FF
'
O
,
reserved8
:=
'
FF
'
O
}
template
VTChangeStringValueReq
t_VTChangeStringValueReq
(
template
ValidObjectID
p_inputStringOrStringVariableObjectID
,
template
octetstring
p_enteredStringValue
)
:=
{
vtfunction
:=
8
,
inputStringOrStringVariableObjectID
:=
p_inputStringOrStringVariableObjectID
,
numberOfBytes
:=
lengthof
(
p_enteredStringValue
),
enteredStringValue
:=
p_enteredStringValue
}
template
VTChangeStringValueRes
t_VTChangeStringValueRes
(
template
ValidObjectID
p_inputStringOrStringVariableObjectID
)
:=
{
vtfunction
:=
8
,
reserved2
:=
'
FF
'
O
,
reserved3
:=
'
FF
'
O
,
inputStringOrStringVariableObjectID
:=
p_inputStringOrStringVariableObjectID
,
reserved6
:=
'
FF
'
O
,
reserved7
:=
'
FF
'
O
,
reserved8
:=
'
FF
'
O
}
template
GetSupportedWidecharsReq
t_GetSupportedWidecharsReq
(
e_Codeplane
p_codeplane
,
OCT2
p_firstWideCharInInquiryRange
,
OCT2
p_lastWideCharInInquiryRange
)
:=
{
...
...
@@ -95,6 +337,25 @@ template GetSupportedWidecharsRes t_GetSupportedWidecharsRes(e_Codeplane p_codep
wideCharRangeArray
:=
p_wideCharRangeArray
}
template
GetMemoryReq
t_GetMemoryReq
(
INT3
p_memoryRequired
)
:=
{
vtfunction
:=
194
,
reserved2
:=
'
FF
'
O
,
memoryRequired
:=
p_memoryRequired
,
reserved7
:=
'
FF
'
O
,
reserved8
:=
'
FF
'
O
}
template
GetMemoryRes
t_GetMemoryRes
(
e_GetMemoryResVersionNumber
p_versionNumber
,
e_GetMemoryResStatus
p_status
)
:=
{
vtfunction
:=
194
,
versionNumber
:=
p_versionNumber
,
status
:=
p_status
,
reserved4
:=
'
FF
'
O
,
reserved5
:=
'
FF
'
O
,
reserved6
:=
'
FF
'
O
,
reserved7
:=
'
FF
'
O
,
reserved8
:=
'
FF
'
O
}
template
AnyIsoBusPdu
t_WorkingSetMaintenanceReq_pdu
(
WorkingSetMaintenanceBitMask
p_bitMask
,
e_WorkingSetMaintenanceVersionNumber
p_versionNumber
)
:=
{
...
...
@@ -115,18 +376,18 @@ template WorkingSetMaintenanceReq t_WorkingSetMaintenanceReq(
}
template
N_SP_Response
t_N_SP_Response
(
template
e_PortNumber
t_fromPort
,
template
e_PortNumber
t_toPort
,
template
N_SP_Response
.
requestedParametrics
requestedParametrics_param
)
:=
{
msgFunction
:=
132
,
portPair
:=
{
fromPort
:=
t_fromPort
,
toPort
:=
t_toPort
},
requestedParametrics
:=
requestedParametrics_param
}
template
e_PortNumber
t_toPort
,
template
N_SP_Response
.
requestedParametrics
requestedParametrics_param
)
:=
{
msgFunction
:=
132
,
portPair
:=
{
fromPort
:=
t_fromPort
,
toPort
:=
t_toPort
},
requestedParametrics
:=
requestedParametrics_param
}
template
AnyIsoBusPdu
t_N_SP_Response_pdu
(
template
e_PortNumber
t_fromPort
,
template
e_PortNumber
t_toPort
,
template
N_SP_Response
.
requestedParametrics
t_requestedParametrics_param
)
:=
{
networkMessage
:=
{
n_SP_Response
:=
t_N_SP_Response
(
t_fromPort
,
t_toPort
,
t_requestedParametrics_param
)
}}
template
e_PortNumber
t_toPort
,
template
N_SP_Response
.
requestedParametrics
t_requestedParametrics_param
)
:=
{
networkMessage
:=
{
n_SP_Response
:=
t_N_SP_Response
(
t_fromPort
,
t_toPort
,
t_requestedParametrics_param
)
}}
}
...
...
demo/Isobustest.ttcn
View file @
759cf87e
/* Copyright (c) 20
00-
201
8
Ericsson
Telecom
AB
/* Copyright (c) 20
10,
201
6
Ericsson AB
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v
2
.0
* are made available under the terms of the Eclipse Public License v
1
.0
* which accompanies this distribution, and is available at
* http
s
://www.eclipse.org/
org/documents/epl-2.0/EPL-2.
0.html
* http://www.eclipse.org/
legal/epl-v1
0.html
*
* Contributors:
* Michael Josenhans
...
...
@@ -512,8 +512,11 @@ function f_behaviour_connections() runs on PTC2_CT
log
(
"tp_dt_can_id: "
,
tp_dt_can_id
)
//var octetstring receivedData := tp_dt_can_id & receivedUnacknowledgedData
//var octetstring receivedData := receivedUnacknowledgedData
log
(
"received tp_dt frame with PGN: "
,
receivedData
);
//log ("received tp_dt frame with PGN: ", receivedData);
// changed by MJ
//receivedData := receivedUnacknowledgedData
log
(
"received multipart frame"
,
receivedData
);
v_can_frame_j1939
:=
f_decode_CAN_frame_j1939
(
receivedData
)
log
(
"received tp_dt frame j1939: "
,
v_can_frame_j1939
);
}
...
...
@@ -662,6 +665,15 @@ testcase tc_encdec_ecu2vt_workingSetMaintenanceReq() runs on MTC_CT // using a t
}
testcase
tc_encdec_etp_dt
()
runs
on
MTC_CT
// using a template
{
template
CAN_frame_j1939
t_CAN_frame_j1939
:=
{
can_j1939
:=
{
prio
:=
'000000'B
,
res
:=
'1'
B
,
dp
:=
'1'
B
,
pf
:=
'
FE
'
O
,
ps
:=
'00'O
,
sa
:=
'
F8
'
O
},
can_pdu
:=
{
etp_dt
:=
{
seq_no
:=
105
,
data
:=
'
6
C652073657276
'
O
}
}
}
log
(
f_encode_CAN_frame_j1939
(
valueof
(
t_CAN_frame_j1939
)))
log
(
f_decode_CAN_frame_j1939
(
f_encode_CAN_frame_j1939
(
valueof
(
t_CAN_frame_j1939
))))
}
testcase
tc_dec_requestForAddressClaimed
()
runs
on
MTC_CT
{
...
...
@@ -680,26 +692,27 @@ testcase tc_dec_largemessage() runs on MTC_CT
{
var
octetstring
j1939_pdu
j1939_pdu
:=
'
00
E726F8B3DA590B0066696C6520736572766572
'
O
// j1939_pdu := '03FE00F8FE2A66696C65207365727665722A3139373136392A2D2A'O
/*
03FE00F82A66696C65207365727665722A3139373136392A2D2A
03FE00262A6661726D20646973706C61792A3139373136392A2D2A
03FE00F72A7461736B20636F6E74726F6C6C65722A3139373136392A2D2A
03FE00FD2A6661726D20646973706C61792A3139373136392A2D2A
01FD00F82D2A3139373136392A2D2A2D2A6E696E67757065782A2D2A
01FD00262D2A3139373136392A2D2A2D2A6E696E67757065782A2D2A
01FD00F72D2A3139373136392A2D2A2D2A6E696E67757065782A2D2A
01FD00262D2A3139373136392A2D2A2D2A6E696E67757065782A2D2A
01FD00FD2D2A3139373136392A2D2A2D2A6E696E67757065782A2D2A
02FE00FD016661726D20646973706C617920312E33372E31362E3733352A
02FE0026026661726D20646973706C617920312E33372E31362E3733352A69736F627573206C69627261727920312E32362E332E3932382A
02FE00F8096E696E67757065782066696C6520736572766572207573657220696E74657266616365204E5820322E322E342E3237302A746F6F6C206C69627261727920322E34322E382E3834302A6C6F67206C69627261727920322E302E31312E3136342A636F6E66696775726174696F6E206C69627261727920312E31322E322E3139332A43414E20627573206861726477617265206C69627261727920312E31392E352E3139382A7365637572697479206C69627261727920312E31312E302E3332312A69736F627573206C69627261727920312E32362E332E3932382A69736F62757320636F6D6D6F6E206C69627261727920322E31322E302E3139332A66696C652073657276657220312E342E352E3235382A
9CFE0DF8FE01FFFFFFFFFFFFFF
*/
//j1939_pdu := '18EAFFFE00EE00'O
//j1939_pdu := '18EEFFF83102032E003D0080'O
//j1939_pdu := '18EEFFF73102032E008200A0'O
//j1939_pdu := '18EAF8F8EBFE00'O
j1939_pdu
:=
'
18
ECF8F810160004FFEBFE00
'
O
// j1939_pdu := '00E726F8B3DA590B0066696C6520736572766572'O
// j1939_pdu := '03FE00F8FE2A66696C65207365727665722A3139373136392A2D2A'O
// j1939_pdu := '03FE00F82A66696C65207365727665722A3139373136392A2D2A'O
// j1939_pdu := '03FE00262A6661726D20646973706C61792A3139373136392A2D2A'O
// j1939_pdu := '03FE00F72A7461736B20636F6E74726F6C6C65722A3139373136392A2D2A'O
// j1939_pdu := '03FE00FD2A6661726D20646973706C61792A3139373136392A2D2A'O
// j1939_pdu := '01FD00F82D2A3139373136392A2D2A2D2A6E696E67757065782A2D2A'O
// j1939_pdu := '01FD00262D2A3139373136392A2D2A2D2A6E696E67757065782A2D2A'O
// j1939_pdu := '01FD00F72D2A3139373136392A2D2A2D2A6E696E67757065782A2D2A'O
// j1939_pdu := '01FD00262D2A3139373136392A2D2A2D2A6E696E67757065782A2D2A'O
// j1939_pdu := '01FD00FD2D2A3139373136392A2D2A2D2A6E696E67757065782A2D2A'O
// j1939_pdu := '02FE00FD016661726D20646973706C617920312E33372E31362E3733352A'O
// j1939_pdu := '02FE0026026661726D20646973706C617920312E33372E31362E3733352A69736F627573206C69627261727920312E32362E332E3932382A'O
// j1939_pdu := '02FE00F8096E696E67757065782066696C6520736572766572207573657220696E74657266616365204E5820322E322E342E3237302A746F6F6C206C69627261727920322E34322E382E3834302A6C6F67206C69627261727920322E302E31312E3136342A636F6E66696775726174696F6E206C69627261727920312E31322E322E3139332A43414E20627573206861726477617265206C69627261727920312E31392E352E3139382A7365637572697479206C69627261727920312E31312E302E3332312A69736F627573206C69627261727920312E32362E332E3932382A69736F62757320636F6D6D6F6E206C69627261727920322E31322E302E3139332A66696C652073657276657220312E342E352E3235382A'O
// j1939_pdu := '9CFE0DF8FE01FFFFFFFFFFFFFF'O
log
(
j1939_pdu
)
log
(
"--------------------------------------------"
)
...
...
demo/Makefile
View file @
759cf87e
...
...
@@ -2,7 +2,7 @@
# of the TTCN-3 Test executor version CRL 113 200/5 R5A
# for (michael@michael-desktop) on Sun Sep 18 22:14:13 CEST 2016
# Copyright (c) 2000-201
8
Ericsson Telecom AB
# Copyright (c) 2000-201
6
Ericsson Telecom AB
# The following make commands are available:
# - make, make all Builds the executable test suite.
...
...
@@ -89,7 +89,8 @@ SocketCAN_BCM_test.ttcn ../src/SocketCAN_PortType.ttcn SocketCAN_RAW_test.ttcn .
Isobus_Templates.ttcn IsobusNMMessageTypes.ttcn IsobusCMMessageTypes.ttcn IsobusVTMessageTypes.ttcn
\
Isotp.ttcn Isotptest.ttcn
\
CAN_matrix_general_types.ttcn CAN_matrix_test.ttcn CAN_matrix.ttcn CAN_matrix_messages.ttcn CANFD_matrix_messages.ttcn
\
CAN_matrix_signals.ttcn CAN_matrix_templates.ttcn
CAN_matrix_signals.ttcn CAN_matrix_templates.ttcn
\
UnifiedDiagnosticServices.ttcn UnifiedDiagnosticServicestest.ttcn UnifiedDiagnosticServices_Template.ttcn
# ASN.1 modules of this project:
ASN1_MODULES
=
...
...
@@ -102,7 +103,8 @@ SocketCAN_Types.cc SocketCANtest.cc Isobus.cc Isobustest.cc IsobusMessageTypes.c
Isobus_Templates.cc IsobusNMMessageTypes.cc IsobusCMMessageTypes.cc IsobusVTMessageTypes.cc
\
Isotp.cc Isotptest.cc
\
CAN_matrix_general_types.cc CAN_matrix_test.cc CAN_matrix.cc CAN_matrix_messages.cc CANFD_matrix_messages.cc
\
CAN_matrix_signals.cc CAN_matrix_templates.cc
CAN_matrix_signals.cc CAN_matrix_templates.cc
\
UnifiedDiagnosticServices.cc UnifiedDiagnosticServicestest.cc UnifiedDiagnosticServices_Template.cc
GENERATED_HEADERS
=
$(GENERATED_SOURCES:.cc=.hh)
...
...
demo/SocketCAN.cfg
View file @
759cf87e
##############################################################################
# Copyright (c) 20
00-
201
8
Ericsson
Telecom
AB
# Copyright (c) 20
10,
201
6
Ericsson AB
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v
2
.0
# are made available under the terms of the Eclipse Public License v
1
.0
# which accompanies this distribution, and is available at
# http
s
://www.eclipse.org/
org/documents/epl-2.0/EPL-2.
0.html
# http://www.eclipse.org/
legal/epl-v1
0.html
#
# Contributors:
# Michael Josenhans
...
...
demo/UnifiedDiagnosticServices.cfg
0 → 100644
View file @
759cf87e
##############################################################################
# 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 v1.0
# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v10.html
#
# Contributors:
# Michael Josenhans
##############################################################################