135 size_t nBufSize,
size_t nLen)
150 pBuf->
m_nWPos = nLen<=nBufSize? nLen: nBufSize;
169 if( (pTgt ==
NULL) || (pSrc ==
NULL) )
174 for(rpos=pSrc->
m_nRPos, nBytes=0;
bool_t m_bBufDel
do [not] delete internal R/W buffer
void SimpleBufSetBuf(SimpleBuf_T *pBuf, byte_t *pRWBuf, size_t nBufSize, size_t nLen)
Set simple buffer's internal read/write buffer.
byte_t * m_pRWBuf
internal read/write buffer
Memory allocation and deallocation declarations.
SimpleBuf_T * SimpleBufNewWithBuf(size_t nBufSize)
Allocate a new simple buffer with internal buffer of nBufSize.
void SimpleBufDelete(SimpleBuf_T *pBuf)
Delete a simple buffer along with the internal buffer.
size_t SimpleBufCopy(SimpleBuf_T *pTgt, SimpleBuf_T *pSrc)
Copy contents of source simple buffer to the end of the target simple buffer.
size_t m_nWPos
current write buffer position
#define NEW(T)
Allocate new type.
size_t m_nBufSize
buffer total size
RoadNarrows Robotics common configuration file.
SimpleBuf_T * SimpleBufNew()
Allocate a new simple buffer with no internal buffer allocation.
size_t m_nRPos
current read buffer position
Simple [io] buffer declarations and operations.