Dataflow Runtime API  3.1.1.0
Public Member Functions | Static Public Attributes | List of all members
imt::base::dff::activeparts::am3354::I2CTransactionQueue Class Reference

Queue for multiple I2C transaction items and to keep track of the number of data operations from the current transaction item. More...

#include <Imt.Base.Dff.ActiveParts.AM3354/I2C/I2CTransactionQueue.h>

Public Member Functions

 I2CTransactionQueue (void)
 Constructor. More...
 
virtual ~I2CTransactionQueue (void)
 Destructor. More...
 
void setRemainingDataOperations (const uint8_t numberOfDataOperations)
 Set the remaining data operations to complete on the current transaction item. More...
 
uint8_t getRemainingDataOperations (void) const
 Return the remaining data operations to complete on the current transaction item. More...
 
void setDataOperationProcessed (void)
 Mark a data operations as completed. More...
 
void push (const I2CMasterTransactionProtocol &newValue)
 Add an new I2C master transaction to the buffer (overwrite oldest if full). More...
 
I2CMasterTransactionProtocoltop (void)
 Returns a reference to the I2C master transaction on the top of the buffer. More...
 
I2CMasterTransactionProtocol pop (void)
 Returns the I2C master transaction on the top of the buffer. More...
 
bool isEmpty (void) const
 Returns true if the transaction queue is empty. More...
 
bool isFull (void) const
 Returns true if the transaction queue is full. More...
 
uint16_t getSizeUsed (void) const
 Get the number of transactions in the buffer. More...
 

Static Public Attributes

static const uint8_t TRANSACTION_QUEUE_SIZE = 32U
 Size of the transaction queue. More...
 

Detailed Description

Queue for multiple I2C transaction items and to keep track of the number of data operations from the current transaction item.

A transaction itself can contains multiple data operations.

Constructor & Destructor Documentation

◆ I2CTransactionQueue()

imt::base::dff::activeparts::am3354::I2CTransactionQueue::I2CTransactionQueue ( void  )
explicit

Constructor.

◆ ~I2CTransactionQueue()

virtual imt::base::dff::activeparts::am3354::I2CTransactionQueue::~I2CTransactionQueue ( void  )
virtual

Destructor.

Member Function Documentation

◆ getRemainingDataOperations()

uint8_t imt::base::dff::activeparts::am3354::I2CTransactionQueue::getRemainingDataOperations ( void  ) const

Return the remaining data operations to complete on the current transaction item.

Returns
Number of remaining data operations to complete.

◆ getSizeUsed()

uint16_t imt::base::dff::activeparts::am3354::I2CTransactionQueue::getSizeUsed ( void  ) const

Get the number of transactions in the buffer.

Returns
Number of transactions in the buffer.

◆ isEmpty()

bool imt::base::dff::activeparts::am3354::I2CTransactionQueue::isEmpty ( void  ) const

Returns true if the transaction queue is empty.

Returns
True if the transaction queue is empty.

◆ isFull()

bool imt::base::dff::activeparts::am3354::I2CTransactionQueue::isFull ( void  ) const

Returns true if the transaction queue is full.

Returns
True if the transaction queue is full.

◆ pop()

I2CMasterTransactionProtocol imt::base::dff::activeparts::am3354::I2CTransactionQueue::pop ( void  )

Returns the I2C master transaction on the top of the buffer.

The value will be removed from the buffer. There is no check if the value is valid. To check this use isEmpty.

Returns
The oldest value which is on the top of the buffer.

◆ push()

void imt::base::dff::activeparts::am3354::I2CTransactionQueue::push ( const I2CMasterTransactionProtocol newValue)

Add an new I2C master transaction to the buffer (overwrite oldest if full).

Parameters
newValueThe value to be added.

◆ setDataOperationProcessed()

void imt::base::dff::activeparts::am3354::I2CTransactionQueue::setDataOperationProcessed ( void  )

Mark a data operations as completed.

◆ setRemainingDataOperations()

void imt::base::dff::activeparts::am3354::I2CTransactionQueue::setRemainingDataOperations ( const uint8_t  numberOfDataOperations)

Set the remaining data operations to complete on the current transaction item.

Parameters
numberOfDataOperationsNumber of remaining data operations.

◆ top()

I2CMasterTransactionProtocol& imt::base::dff::activeparts::am3354::I2CTransactionQueue::top ( void  )

Returns a reference to the I2C master transaction on the top of the buffer.

The value will not be removed from the buffer. There is no check if the value is valid. To check this use isEmpty.

Returns
The oldest value which is on the top of the buffer.

Member Data Documentation

◆ TRANSACTION_QUEUE_SIZE

const uint8_t imt::base::dff::activeparts::am3354::I2CTransactionQueue::TRANSACTION_QUEUE_SIZE = 32U
static

Size of the transaction queue.


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