ADTF  3.14.3
ISampleLogabstract

The ISampleLog interface defines an interface to trace and store Sample data- and timing flow. More...

Inheritance diagram for ISampleLog:
[legend]

Classes

class  IGetLogEntryCallback
 Used class to callback within the the ISampleLog::GetLogEntries. More...
 
struct  tSampleLogEntry
 Structure for one SampleLog Entry. More...
 
struct  tSampleLogSampleID
 Sample ID to assure uniqueness of samples in system. More...
 
struct  tSampleLogTransmitReceiveState
 Storage structure for the Additional info buffer of an MSLEE_TransmitReceiveState. More...
 

Public Types

enum  eSampleLogEntryEventID : uint8_t {
  MSLEE_SomethingEvent = 0 , MSLEE_CreateEvent = 1 , MSLEE_WriteEvent = 2 , MSLEE_ReadEvent = 3 ,
  MSLEE_TransmitEvent = 4 , MSLEE_TransmitReceiveState = 5 , MSLEE_TransmitFinishedEvent = 6 , MSLEE_ReceiveEvent = 7 ,
  MSLEE_ReceiveFinishedEvent = 8 , MSLEE_LogUserOffset = 200
}
 Enumeration for Info index. More...
 
typedef uint32_t tSampleLogEntryEventID
 The Log Entry Event ID is defined by eSampleLogEntryEventID.
 
typedef uint64_t tSampleLogEntryCreatorID
 The Log Entry Creator ID will be unique in current system.
 
typedef int32_t tSampleLogEntryThreadID
 The Log Entry Thread ID will be unique in current system.
 
typedef uint64_t tSampleLogEntryProcessID
 The Log Entry Process ID will be unique in current system. More...
 

Public Member Functions

 ADTF_IID (ISampleLog, "samplelog.ant.streaming.adtf.iid")
 definiton of interface id
 
virtual tResult EnableLogging (const uint8_t &ui8Level)=0
 Enable the LogLevel. More...
 
virtual tResult ClearLog ()=0
 Clears the current Log! More...
 
virtual tResult SetSampleID (const ISampleLog::tSampleLogSampleID &sSampleID)=0
 Sets the value of the Sample. More...
 
virtual ISampleLog::tSampleLogSampleID GetSampleID () const =0
 Returns a value of the SampleID. More...
 
virtual tResult AddLogEntry (const ISampleLog::tSampleLogEntry &sLogEntry)=0
 Adds a Log Entry. More...
 
virtual tResult GetLogEntries (ISampleLog::IGetLogEntryCallback &pGetCallback) const =0
 Returns all current LogEntries to the given pGetCallback implementation. More...
 
- Public Member Functions inherited from IObject
 ADTF_IID (IObject, "object.ant.ucom.adtf.iid")
 Marks the IObject to be castable with the ucom_cast() More...
 

Protected Member Functions

 ~ISampleLog ()=default
 not destructable
 
- Protected Member Functions inherited from IObject
 ~IObject ()=default
 Protected destructor --> Use implemented Destroy() instead of delete!
 

Detailed Description

The ISampleLog interface defines an interface to trace and store Sample data- and timing flow.

This interface should only be used to add trace information of the Sample for debugging capabilities.

Remarks
The default implementation of cSample will create a deep copies of added entries and Uses dynamic memory allocation. So if activated ISampleLog, the implementation of cSample is not RT safe anymore !

See cSample for information.

Definition at line 31 of file samplelog_intf.h.

Member Typedef Documentation

◆ tSampleLogEntryProcessID

typedef uint64_t tSampleLogEntryProcessID

The Log Entry Process ID will be unique in current system.

Remarks
was int32_t in ADTF 2!!

Definition at line 81 of file samplelog_intf.h.

Member Enumeration Documentation

◆ eSampleLogEntryEventID

enum eSampleLogEntryEventID : uint8_t

Enumeration for Info index.

Enumerator
MSLEE_SomethingEvent 

Something happened Event this event is only for place holder issues.

MSLEE_CreateEvent 

Sample Buffer was created.

MSLEE_WriteEvent 

Sample Buffer was written or overwritten (not in use yet).

MSLEE_ReadEvent 

Sample Buffer was read (not in use yet).

MSLEE_TransmitEvent 

Sample Buffer is about to be transmitted via Pin.

MSLEE_TransmitReceiveState 

Sample Buffer is about to be transmitted via Pin.

This log entry will set the pAdditionalDataRef to an array of tSampleLogTransmitReceiveState. commonly it is used to log the current (Receive and Received) states of the input pins while a IPin::Transmit was called.

MSLEE_TransmitFinishedEvent 

Sample Buffer was transmitted via Pin (transmission completed).

MSLEE_ReceiveEvent 

Sample Buffer is about to be received on a Pin.

MSLEE_ReceiveFinishedEvent 

Sample Buffer was received on a Pin (receiving completed).

MSLEE_LogUserOffset 

This is a Info Offset.

Definition at line 43 of file samplelog_intf.h.

Member Function Documentation

◆ AddLogEntry()

virtual tResult AddLogEntry ( const ISampleLog::tSampleLogEntry sLogEntry)
pure virtual

Adds a Log Entry.

If Timestamp and ThreadID is not set it will be retrieved automatically. If EventID is not set, the entry will be something ! If CreatorID is not set, the entry will set to internal ! The additional data memory reference will be copied, no references to class-implementations allowed!

Remarks
This implementation will create a deep copy of the entry. So if activated ISampleLog, the Sample is not RT Safe anymore !
Parameters
sLogEntry[in] The LogEntry.
Returns
ERR_MEMORY memory allocation failed
ERR_NOERROR Log Entry added successfully.

◆ ClearLog()

virtual tResult ClearLog ( )
pure virtual

Clears the current Log!

Return values
ERR_NOERRORLog cleared

◆ EnableLogging()

virtual tResult EnableLogging ( const uint8_t &  ui8Level)
pure virtual

Enable the LogLevel.

Parameters
ui8Level[in] 0 disabled, 1 enable lifecycle of sample, 2 enable lifecycle and internal read/write action
Return values
ERR_NOERRORLevel set
ERR_INVALIDARGnLevel is in invalid range

◆ GetLogEntries()

virtual tResult GetLogEntries ( ISampleLog::IGetLogEntryCallback pGetCallback) const
pure virtual

Returns all current LogEntries to the given pGetCallback implementation.

The function returns only after iteration of the whole entry list or in cause of an error code return from IGetLogEntryCallback::GetIt .

Parameters
pGetCallback[in] Reference to a IGetLogEntryCallback implementation to get the entries
Return values
ERR_NOERRORsucceeded callback
ERR_POINTERpGetCallback has no implementation
Returns
Any other result code will be the forwarded result code of IGetLogEntryCallback::GetIt function.
Warning
Default implementation within cSample is NOT THREAD SAFE !! This should not be used while sample gets new entries !!!

◆ GetSampleID()

virtual ISampleLog::tSampleLogSampleID GetSampleID ( ) const
pure virtual

Returns a value of the SampleID.

Returns
Returns the current SampleID.

◆ SetSampleID()

virtual tResult SetSampleID ( const ISampleLog::tSampleLogSampleID sSampleID)
pure virtual

Sets the value of the Sample.

Parameters
sSampleID[in] The Sample ID to set.
Return values
ERR_NOERRORtSampleLogSampleID set.

Copyright © Audi Electronics Venture GmbH. All rights reserved. (Generated on Thu Jun 9 2022 by doxygen 1.9.1)