GetDataSize Returns the number of bytes of data available in the queue RETURN: The size of the available data in the queue ************************************************/
| 65 | The size of the available data in the queue |
| 66 | ************************************************/ |
| 67 | int CUT_FIFO_Queue::GetDataSize() { |
| 68 | |
| 69 | if(m_iReadPointer == m_iWritePointer) |
| 70 | return 0; |
| 71 | |
| 72 | if(m_iReadPointer < m_iWritePointer) |
| 73 | return (m_iWritePointer - m_iReadPointer); |
| 74 | |
| 75 | return ((m_iWritePointer + m_cbBuffer) - m_iReadPointer); |
| 76 | } |
| 77 | |
| 78 | /*********************************************** |
| 79 | GetFreeSize |
nothing calls this directly
no outgoing calls
no test coverage detected