beautypg.com

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

Page 21

background image

DOC101357-1_ - rev 2 – 2013-09-23 - Created by:6644

Page 21 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


k)

J2534_ERROR_CODE

J2534::PassThruS

tartMsgFilter

( unsigned long

ChannelI
D
,

J2534_FILTER

FilterType
,

PASSTHRU_MSG

*

pMaskMsg
,

PASSTHRU_MSG

*

pPattern
Msg
,

PASSTHRU_M
SG

*

pFlowControlMsg,

unsigned long
*

pFilterID

)

This function starts filtering of incoming messages. If the function is successful, a value
of STATUS_NOERROR is returned. A minimum of ten message filters shall be supported
by the interface for each supported protocol. PassThruDisconnect shall delete all message
filters on that channel. PassThruClose shall delete all filters on all channels for the device.
Pattern and Mask messages shall follow the protocol formats specified in Section 8.
However, only the first twelve (12) bytes, including header or CAN ID, are used by the
filter. ERR_INVALID_MSG shall be returned if the filter length exceeds 12. Note that this
function does not clear any messages that may have been received and queued before

the filter was set.

Parameters:

[in]

ChannelID

The channel ID assigned by the PassThruConnect
function.

[in]

FilterType

Designates filter type (PASS, BLOCK, FLOW_CONTROL).

[in]

*pMaskMsg

Pointer to the Mask message.

[in]

*pPatternMsg

Pointer to the Pattern message.

[in]

*pFlowControlMsg

Pointer to the Flow Control message (ISO 15765 only).

[in]

*pFilterID

Pointer to location for the filter ID that is assigned by
the library.

Returns:

Status, see function return codes in

hdj2534.h

Note:

MsgFilter has to be defined in order to receive messages.