![]() |
![]() |
tf_consStatus_e tf_alignConsumer2FrozenProd | ( | tf_consumer_HANDLE | cHandle | ) |
============================================================================
tf_alignConsumer2FrozenProd
brief
API to align the internal data information on consumers when producer is responded back as frozen. This API needs to be called first after we detect producer is frozen before calling tf_consProcess API
[in] | cHandle | consumer handle |
=============================================================================
tf_consStatus_e tf_consAck | ( | tf_consumer_HANDLE | cHandle | ) |
============================================================================
tf_consAck
brief
This acknowledges the consumer buffer send and triggers the index advance
[in] | cHandle | Pointer to the consumer handle |
=============================================================================
tf_consumer_HANDLE tf_consCreate | ( | tf_consConfig_t | config | ) |
============================================================================
tf_consCreate
brief
Creates the consumer instance on the trace framework
[in] | config | consumer creation configuration |
=============================================================================
tf_consStatus_e tf_consDestroy | ( | tf_consumer_HANDLE | cHandle | ) |
============================================================================
tf_consDestroy
brief
this clears the consumer attached to the contract
[in] | cHandle | Pointer to the consumer handle |
=============================================================================
tf_consStatus_e tf_consProcess | ( | tf_consumer_HANDLE | cHandle | ) |
============================================================================
tf_consProcess
brief
this triggers consumers to look into contract and see if there are any new buffers available to ship to the transport
[in] | cHandle | Pointer to the consumer handle |
=============================================================================
============================================================================
tf_consumerForceFreezeProducer
brief
API to force freeze the produer to frozen state Keeping the in the frozen state for producer triggers the same ring buffer to be returned for the buffer exchange
[in] | cHandle | consumer handle |
=============================================================================
tf_consStatus_e tf_consumerGetContractHandle | ( | tf_cons_HANDLE | cHandle, |
tf_contract_HANDLE * | contract_handle | ||
) |
============================================================================
tf_consumerGetContractHandle
brief
API to get the contract handle that is associated with the consumer
[in] | cHandle | consumer handle |
[in] | contract_handle | Address of the contract handle to store |
=============================================================================
============================================================================
tf_consumerGetProducerState
brief
API to sample the current producer state
[in] | cHandle | consumer handle |
=============================================================================
tf_consStatus_e tf_consumerSetProducerState | ( | tf_cons_HANDLE | cHandle, |
tf_producerState_e | state | ||
) |
============================================================================
tf_consumerSetProducerState
brief
API to set the producer state to either streaming, free run or freeze
[in] | cHandle | consumer handle |
[in] | state | intended producer state change |
=============================================================================
tf_contract_HANDLE tf_contractCreate | ( | tf_contractConfig_t | tf_contractConfig, |
char * | name | ||
) |
============================================================================
tf_contractCreate
brief
sets up initial values for producer/consumer
WARNING:
- deprecated with contract version TRACE_CONTRACT_VERSION_2
Since the contracts are required to be created sequentially in memory, there needs to be a protection in the API call to make sure no two contracts are created in the same slot. This is accomplished with an OSAL call out TF_CONTRACT_osalEnter() function, which blocks this function if being used to create a contract from multi core environment.
[in] | tf_contractConfig | tf_contract configuration structure - needs knowledge about the contract base address, number of contracts in the system, ring buffer size, ring buffer start address and number of ring buffers. |
[in] | name | Pointer to the name of the tf_contract |
=============================================================================
tf_contract_HANDLE tf_contractFind | ( | void * | tf_contract_start_addr, |
uint32_t | num_contracts, | ||
char * | name | ||
) |
============================================================================
tf_contractFind
brief
finds the tf_contract based on the name
WARNING:
- deprecated with contract version TRACE_CONTRACT_VERSION_2
[in] | tf_contract_start_addr | tf_contract start address |
[in] | num_contracts | number of contracts in the system |
[in] | name | Pointer to the name of the tf_contract |
=============================================================================
void tf_contractGetInfo | ( | tf_contract_HANDLE | handle, |
tf_contractGetInfo_t * | info | ||
) |
============================================================================
tf_contractGetInfo
brief
gets contract information details
Application Requirements: Application would need to create valid contract handle before calling this function
[in] | handle | trace framework contract handle |
[in] | info | contract information returned |
=============================================================================
void tf_contractInit | ( | void * | tf_contract_base, |
uint32_t | num | ||
) |
============================================================================
tf_contractInit
brief
initializes the tf_contract as avilable for producer/consumer
WARNING:
- deprecated with contract version TRACE_CONTRACT_VERSION_2
This is the very first API that needs to be called by an one time entity to initialze all the contract memory that system can use and declare them as available
[in] | tf_contract_base | Pointer to the base address of the tf_contract array |
[in] | num | number of tf_contract buffers |
=============================================================================
uint32_t tf_getOverRunCount | ( | tf_contract_HANDLE | contract_handle | ) |
============================================================================
tf_getOverRunCount
brief
Gets the cumulative count of how many times the ring is overrun resulting in same last filled buffer
Application Requriments: Application need to save the current overrun count in some context memory for that contract handle Application needs to compare the latest cumulative overrun count retuned by the above API with earlier sampled value to decide the congestion.
[in] | contract_handle | contract handle |
=============================================================================
uint32_t tf_isLogInfoNextBuf | ( | tf_contract_HANDLE | contract_handle | ) |
============================================================================
tf_isLogInfoNextBuf
brief
Gets the flag to indicate if the logging information starts from first buffer or next buffer
Application Requirements: Application would need to create valid contract handle before calling this function
[in] | contract_handle | contract handle |
=============================================================================
uint32_t tf_isThereToConsume | ( | tf_consumer_HANDLE | cHandle | ) |
============================================================================
tf_isThereToConsume
brief
Checks the consumer if there is anything to consume
[in] | cHandle | consumer handle |
=============================================================================
tf_contract_HANDLE tf_newContract | ( | tf_contractConfig_t | tf_contractConfig | ) |
============================================================================
tf_newContract
brief
API added to create the contract between producer/consumer instances This API is applicable for the contract version TRACE_CONTRACT_VERSION_2 Application needs to maintain any names associated with this contract handle outside traceframework
[in] | tf_contractConfig | tf_contract configuration structure |
=============================================================================
Ptr tf_prodBufExchange | ( | tf_producer_HANDLE | pHandle, |
uint8_t * | full | ||
) |
============================================================================
tf_prodBufExchange
brief
Implements the buffer exchange function interface for the LoggerStreamer
[in] | pHandle | Producer Handle |
[in] | full | filled log buffer |
=============================================================================
tf_producer_HANDLE tf_prodCreate | ( | tf_prodConfig_t | config | ) |
============================================================================
tf_prodCreate
brief
Creates the local producer instance for a given contract
[in] | config | producer configuration information |
=============================================================================
tf_prodStatus_e tf_prodDestroy | ( | tf_producer_HANDLE | pHandle | ) |
============================================================================
tf_prodDestroy
brief
frees up the producer instance created
[in] | pHandle | Pointer to the producer instance |
=============================================================================
tf_prodStatus_e tf_prodGetContractHandle | ( | tf_producer_HANDLE | pHandle, |
tf_contract_HANDLE * | contract_handle | ||
) |
============================================================================
tf_prodGetContractHandle
brief
API to get the contract handle that is associated with the producer
[in] | pHandle | producer handle |
[in] | contract_handle | Address of the contract handle to store |
=============================================================================
void* tf_prodGetCurBuf | ( | tf_producer_HANDLE | pHandle | ) |
============================================================================
tf_prodGetCurBuf
brief
current ring buffer which producer is intended to write to.
[in] | pHandle | Producer Handle |
=============================================================================
void tf_prodGetOOBData | ( | tf_contract_HANDLE | cHandle, |
uint8_t * | data | ||
) |
============================================================================
tf_prodGetOOBData
brief
Gets the out of band (OOB) data in the contract memory to the application
[in] | cHandle | contract handle |
[in] | data | out of band (OOB) data read from the contrat memory |
=============================================================================
void tf_prodNotifyConsumers | ( | tf_producer_HANDLE | pHandle | ) |
============================================================================
tf_prodNotifyConsumers
brief
Each time a buffer exchange happens for that producer instance, the notifications needs to be posted to all registered consumers for that producer. This function identifies if there are any buffers in the ring buffer to be notified to the registered consumers of that producer. Few cases where this function can be called is in a background task or can be hooked to the buffer exchange done function for the producer where performance of the buffer exchange is not so critical
[in] | pHandle | Pointer to the producer handle |
=============================================================================
void tf_prodSetOOBData | ( | tf_contract_HANDLE | cHandle, |
uint8_t * | data | ||
) |
============================================================================
tf_prodSetOOBData
brief
sets the out of band (OOB) data from the application in the contract memory
[in] | cHandle | contract handle |
[in] | data | out of band (OOB) data to be filled in the contrat memory |
=============================================================================
int32_t tf_prodUpdateConsumers | ( | tf_producer_HANDLE | p_handle | ) |
============================================================================
tf_prodUpdateConsumers
brief
The local producer instance would need to be synced to the footprints from the contract This function can be called to syncrhonize the local producer instance to contrat.
Typical example of use: can be called periodically from a task/isr
[in] | p_handle | Pointer to the producer handle |
=============================================================================
void tf_systemCfg | ( | tf_StartCfg_t * | startCfg | ) |
============================================================================
tf_systemCfg
brief
starts the system with start configurations
Application Requirements: Application would need to call this API once per process/core with proper startCfg arguments before Contract Create, Produer Create and Consumer Create functions
[in] | startCfg | start configuration structure |
=============================================================================