TraceMgrPacketReadNext2 (FUN)
FUNCTION TraceMgrPacketReadNext2 : RTS_IEC_HANDLE
Reads the contents of the next record, starting at a given time stamp.
Only entries with a time stamp greater than or equal to ulTimestamp are copied. If the time stamp is zero, the function behaves like TraceMgrPacketReadNext.
Note
if the result code is ERR_ENTRIES_REMAINING, data has been successfully copied to pTraceBuffer, but more data can be read by a subsequent call. (Either because the destination buffer was too small, or because new data has been recorded in the mean time.)
Note
Data is always returned in little endian byte order even if the device has big endian byte order.
- InOut:
Scope
Name
Type
Comment
Return
TraceMgrPacketReadNext2RTS_IEC_HANDLE- Returns the runtime system error code (see CmpErrors.library):
ERR_PARAMETER if hPacket is not a valid packet handle or if hPrevRecord is not a valid record handle
ERR_NO_OBJECT if there is no next record
ERR_NOTINITIALIZED if the packet is not complete
ERR_TIMEOUT if reading took too long
ERR_ENTRIES_REMAINING if more data can be read by a subsequent call (this is not an error)
Input
hPacketRTS_IEC_HANDLEThe trace packet handle
hPrevRecordRTS_IEC_HANDLEThe trace record handle of the current record
ulTimestampUDINTThe time stamp (relative to the trace start time) from where to start copying
Inout
pTraceBufferPointer to the destination buffer
pulReadBytesUDINTSize of the destination buffer in bytes (in), number of bytes copied (out)
pResultRTS_IEC_RESULTThe result code