Syntax
#include "j2534_v0404.h"
long PassThruStartPeriodicMsg(unsigned long ChannelID, PASSTHRU_MSG *pMsg, unsigned long *pMsgID, unsigned long TimeInterval);
Description
Repetitively transmit network protocol messages at the specified time interval over an existing logical communication channel. There is a limit of ten periodic messages per network layer protocol.
Parameters
ChannelID - Logical communication channel identifier
pMsg - Pointer to the message structure containing the User Application’s periodic message.
pMsgId - Pointer to the variable that receives the handle to the periodic message. The returned handle is used as an argument to PassThruStopPeriodicMsg to identify a specific periodic message.
TimeInterval - Time interval (in milliseconds) at which the periodic message is repetitively transmitted. The acceptable range is 5 to 65,535 milliseconds.
See Also: PassThruStopPeriodicMsg
See Also: PassThruIotcl (CLEAR_PERIODIC_MSGS)
Example:
// Mode-PID 010D: Vehicle speed in km/h
Msg.ProtocolID = ISO15765;
Msg.TxFlags = ISO15765_FRAME_PAD;
Msg.Data = {0x00, 0x00, 0x07, 0xDF, 0x01, 0x0D};
Msg.DataSize = 6;
// Request PID 010D every 500 ms
TimeInterval = 500;
PassThruStartPeriodicMsg(ChannelID, &Msg, &MsgID, TimeInterval);