TraceMgrGetConfigFromFile
(FUN)
FUNCTION TraceMgrGetConfigFromFile : RTS_IEC_RESULT
Loads a given trace file and returns the configuration it contains. After this function call a call to function TraceMgrGetConfigFromFileRelease is necessary to free the dynamically allocated memory.
- InOut:
Scope
Name
Type
Comment
Return
TraceMgrGetConfigFromFile
RTS_IEC_RESULT
- Returns the runtime system error code (see CmpErrors.library):
ERR_PARAMETER if pszFileName is not a valid file path
ERR_NOMEMORY if the memory is not sufficient for opening the file
ERR_NOT_SUPPORTED if reading from files is not supported by the runtime system or if an addressing mode is not supported (e.g. symbolic access)
ERR_NO_OBJECT if opening the file failed
ERR_FAILED if opening the file failed
ERR_END_OF_OBJECT if either the packet configuration or the record configuration is incomplete
ERR_NO_CHANGE if a NULL pointer was passed to parameter
ERR_OUT_OF_LIMITS if the parameters
pRecordConfiguration
andiMaxRecordCount
do not have enough memory to hold all the records from the file
Input
pszFileName
POINTER TO STRING
The file path (in)
pPacketConfiguration
POINTER TO TracePacketConfiguration
Points to a TracePacketConfiguration variable, where the packet configuration will be returned (out)
pRecordConfiguration
POINTER TO TraceRecordConfiguration
Points to a TraceRecordConfiguration variable (or an array of TraceRecordConfiguration variables), where the trace record configuration will be returned. (out) If a NULL pointer is passed this function only determines the number of records in the file.
iMaxRecordCount
DINT
Contains the maximum number of records, that can be stored in the array pRecordConfiguration (in)
Inout
piEffectiveRecordCount
DINT
Returns the effective number of records read (out). In case of return code ERR_NO_CHANGE this variable contains the number of records in the file.