Quantex GmbH

PassThru StartPeriodicMsg Start a periodic message


This function allows you to set a message that will be displayed at a specified interval.

long PassThruStartPeriodicMsg(unsigned long ChannelID, PASSTHRU_MSG* pMsg, unsigned long* MsgID, unsigned long TimeInterval)


Returned error codes

Definition Description
STATUS_NOERROR Function completed successfully
ERR_DEVICE_NOT_CONNECTED No connection to adapter. Possible reasons: The adapter is turned off, there is no network, or the IP address is not set correctly.
ERR_INVALID_DEVICE_ID Set a non-existent adapter ID DeviceID
ERR_NOT_SUPPORTED The adapter does not support the requested parameters. For example, the repetition interval time is less than 20ms.
ERR_INVALID_MSG Invalid message structure specified in pMsg pointer
ERR_INVALID_CHANNEL_ID Set a non-existent channel identifier ChannelID
ERR_NULL_PARAMETER PMsg pointer not set
ERR_INVALID_TIME_INTERVAL Message interval set incorrectly
ERR_MSG_PROTOCOL_ID The protocol specified in the parameters of the transmitted message does not match the protocol specified in ChannelID
ERR_EXCEEDED_LIMIT The number of set periodic messages has been exceeded.
ERR_FAILED Defined by the J2534 standard. In the adapter, it is not used for this function.


#include "j2534_lib.hpp"

unsigned long DeviceID;
long Ret;

unsigned long ChannelID;
unsigned long MsgID;

Msg.ProtocolID = ISO15765;
Msg.TxFlags = ISO15765_FRAME_PAD;
Msg.Data[0] = 0x00;
Msg.Data[1] = 0x00;
Msg.Data[2] = 0x07;
Msg.Data[3] = 0xE0;
Msg.Data[4] = 0x3E;
Msg.DataSize = 5;

Ret = PassThruStartPeriodicMsg(ChannelID, &Msg, &MsgID, 500);
{	// Error handling