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>
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.
◆ I2CTransactionQueue()
imt::base::dff::activeparts::am3354::I2CTransactionQueue::I2CTransactionQueue |
( |
void |
| ) |
|
|
explicit |
◆ ~I2CTransactionQueue()
virtual imt::base::dff::activeparts::am3354::I2CTransactionQueue::~I2CTransactionQueue |
( |
void |
| ) |
|
|
virtual |
◆ 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()
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()
Add an new I2C master transaction to the buffer (overwrite oldest if full).
- Parameters
-
newValue | The 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
-
numberOfDataOperations | Number of remaining data operations. |
◆ top()
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.
◆ 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: