ADTF
Loading...
Searching...
No Matches
adtf::streaming::ant::ISampleLog Class Referenceabstract

#include <samplelog_intf.h>

Inherits adtf::ucom::ant::IObject.

Classes

class  IGetLogEntryCallback
 
struct  tSampleLogEntry
 
struct  tSampleLogSampleID
 Sample ID to assure uniqueness of samples in system. More...
 
struct  tSampleLogTransmitReceiveState
 

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
}
 
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
 

Public Member Functions

 ADTF_IID (ISampleLog, "samplelog.ant.streaming.adtf.iid")
 definiton of interface id
 
virtual tResult EnableLogging (const uint8_t &ui8Level)=0
 
virtual tResult ClearLog ()=0
 
virtual tResult SetSampleID (const ISampleLog::tSampleLogSampleID &sSampleID)=0
 
virtual ISampleLog::tSampleLogSampleID GetSampleID () const =0
 
virtual tResult AddLogEntry (const ISampleLog::tSampleLogEntry &sLogEntry)=0
 
virtual tResult GetLogEntries (ISampleLog::IGetLogEntryCallback &pGetCallback) const =0
 
- Public Member Functions inherited from adtf::ucom::ant::IObject
 ADTF_IID (IObject, "object.ant.ucom.adtf.iid")
 

Protected Member Functions

 ~ISampleLog ()=default
 not destructable
 
- Protected Member Functions inherited from adtf::ucom::ant::IObject
 ~IObject ()=default
 Protected destructor --> Only the final implementation can be destroyed!
 

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.

Member Typedef Documentation

◆ tSampleLogEntryProcessID

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

Remarks
was int32_t in ADTF 2!!

Member Enumeration Documentation

◆ eSampleLogEntryEventID

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

Member Function Documentation

◆ AddLogEntry()

virtual tResult adtf::streaming::ant::ISampleLog::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 adtf::streaming::ant::ISampleLog::ClearLog ( )
pure virtual

Clears the current Log!

Return values
ERR_NOERRORLog cleared

◆ EnableLogging()

virtual tResult adtf::streaming::ant::ISampleLog::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 adtf::streaming::ant::ISampleLog::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 adtf::streaming::ant::ISampleLog::GetSampleID ( ) const
pure virtual

Returns a value of the SampleID.

Returns
Returns the current SampleID.

◆ SetSampleID()

virtual tResult adtf::streaming::ant::ISampleLog::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.

The documentation for this class was generated from the following file: