Hd can module programmer’s guide (windows) – Hatteland Display HT B22 (Fanless) User Manual
Page 11

DOC101357-1_ - rev 2 – 2013-09-23 - Created by:6644
Page 11 of 25
Hatteland Display AS, Åmsosen, N-5578 Nedre Vats, Norway
Tel: (+47) 4814 2200 - [email protected] - www.hatteland-display.com
HD CAN Module Programmer’s Guide (Windows)
All intellectual properties belongs to Hatteland Display AS
J2534_ERROR_CODE err
;
PASSTHRU_MSG
*
rxPassThruMsgPtr
=
rxPassThruMsg
;
J2534_RxStatus rxStatus
;
err
=
PassThruReadMsgs
(
channel_1
,
rxPassThruMsgPtr
,
msgNumPtr
,
timeout
);
if
(
err
==
STATUS_NOERROR
)
{
if
(
msgNum
!=
0
)
{
for
(
unsigned
int
i
=
0
;
i
<
msgNum
;
i
++)
{
id
=
rxPassThruMsg
[
i
].
Data
[
0
]
<<
24
;
id
|=
rxPassThruMsg
[
i
].
Data
[
1
]
<<
16
;
id
|=
rxPassThruMsg
[
i
].
Data
[
2
]
<<
8
;
id
|=
rxPassThruMsg
[
i
].
Data
[
3
]
<<
0
;
cout
<<
hex
<<
uppercase
;
cout
<<
"ID:"
<<
setfill
(
'0'
)
<<
setw
(
ID_BYTES_NUM
*
2
)
<<
id
<<
"\t"
;
cout
<<
"DLC:"
<<
setfill
(
'0'
)
<<
setw
(
2
)
<<
(
rxPassThruMsg
[
i
].
DataSize
-
ID_BYTES_NUM
)
<<
"\t"
;
cout
<<
"MSG:"
;
for
(
unsigned
int
j
=
ID_BYTES_NUM
;
j
<
rxPassThruMsg
[
i
].
DataSize
;
j
++)
{
cout
<<
setfill
(
'0'
)
<<
setw
(
2
)
<<
(
int
)
rxPassThruMsg
[
i
].
Data
[
j
]
<<
" "
;
}
cout
<<
dec
;
cout
<<
"\t"
;
cout
<<
"TYPE:"
;
rxStatus
.
value
=
rxPassThruMsg
[
i
].
RxStatus
;
if
(
rxStatus
.
bits
.
Can29BitId
==
0
)
{
cout
<<
"STD"
<<
endl
;
}
else
{
cout
<<
"EXT"
<<
endl
;
}
}
}
else
{
cout
<<
"No message has been received"
<<
endl
;
}
}
}
/**************************************************************************
**********//**
* @brief Function to Write Messages
***************************************************************************
************/
static
void
callPassThruWriteMsgs
()
{
unsigned
int
id
=
0x10
;
- 26 inch - HD 26T21 MMC (Widescreen) 24 inch - HD 24T21 MMC (Widescreen) 19 inch - HD 19T21 MMC 17 inch - HD 17T21 MMC 15 inch - HD 15T21 MMC 12 inch - HD 12T21 MMC 13 inch - HD 13T21 MMC (Widescreen, Inte Cor2 Duo CPU) 13 inch - HD 13T21 MMC (Widescreen, Inte Ato CPU) 8 inch - HD 08T21 MMC (Widescreen)