#include "comBuf.h"
|
| comBuf () |
|
unsigned | unoccupiedBytes () const |
|
unsigned | occupiedBytes () const |
|
unsigned | uncommittedBytes () const |
|
void | clear () |
|
unsigned | copyInBytes (const void *pBuf, unsigned nBytes) |
|
unsigned | push (comBuf &) |
|
template<class T > |
bool | push (const T &value) |
|
template<class T > |
unsigned | push (const T *pValue, unsigned nElem) |
|
unsigned | push (const epicsInt8 *pValue, unsigned nElem) |
|
unsigned | push (const epicsUInt8 *pValue, unsigned nElem) |
|
unsigned | push (const epicsOldString *pValue, unsigned nElem) |
|
void | commitIncomming () |
|
void | clearUncommittedIncomming () |
|
bool | copyInAllBytes (const void *pBuf, unsigned nBytes) |
|
unsigned | copyOutBytes (void *pBuf, unsigned nBytes) |
|
bool | copyOutAllBytes (void *pBuf, unsigned nBytes) |
|
unsigned | removeBytes (unsigned nBytes) |
|
bool | flushToWire (wireSendAdapter &, const epicsTime ¤tTime) |
|
void | fillFromWire (wireRecvAdapter &, statusWireIO &) |
|
template<class T > |
popStatus | pop (T &) |
|
void * | operator new (size_t size, comBufMemoryManager &) |
|
void | operator delete (void *) |
|
template<class T > |
bool | push (const T *) |
|
| tsDLNode () |
|
| tsDLNode (const tsDLNode< comBuf > &) |
|
const tsDLNode< comBuf > & | operator= (const tsDLNode< comBuf > &) |
|
Definition at line 75 of file comBuf.h.
Definition at line 135 of file comBuf.h.
135 : commitIndex ( 0u ),
epicsPlacementDeleteOperator((void *, comBufMemoryManager &)) private unsigne nextWriteIndex)
unsigned comBuf::capacityBytes |
( |
| ) |
|
|
inlinestatic |
Definition at line 140 of file comBuf.h.
142 this->commitIndex = 0u;
epicsPlacementDeleteOperator((void *, comBufMemoryManager &)) private unsigne nextWriteIndex)
void comBuf::clearUncommittedIncomming |
( |
| ) |
|
|
inline |
Definition at line 247 of file comBuf.h.
epicsPlacementDeleteOperator((void *, comBufMemoryManager &)) private unsigne nextWriteIndex)
void comBuf::commitIncomming |
( |
| ) |
|
|
inline |
Definition at line 242 of file comBuf.h.
epicsPlacementDeleteOperator((void *, comBufMemoryManager &)) private unsigne nextWriteIndex)
bool comBuf::copyInAllBytes |
( |
const void * |
pBuf, |
|
|
unsigned |
nBytes |
|
) |
| |
|
inline |
Definition at line 252 of file comBuf.h.
255 unsigned available =
sizeof ( this->
buf ) - index;
256 if ( nBytes <= available ) {
257 memcpy ( & this->
buf[index], pBuf, nBytes );
epicsUInt8 buf[comBufSize]
epicsPlacementDeleteOperator((void *, comBufMemoryManager &)) private unsigne nextWriteIndex)
unsigned comBuf::copyInBytes |
( |
const void * |
pBuf, |
|
|
unsigned |
nBytes |
|
) |
| |
|
inline |
Definition at line 264 of file comBuf.h.
267 unsigned available =
sizeof ( this->
buf ) - index;
268 if ( nBytes > available ) {
271 memcpy ( & this->
buf[index], pBuf, nBytes );
epicsUInt8 buf[comBufSize]
epicsPlacementDeleteOperator((void *, comBufMemoryManager &)) private unsigne nextWriteIndex)
bool comBuf::copyOutAllBytes |
( |
void * |
pBuf, |
|
|
unsigned |
nBytes |
|
) |
| |
|
inline |
Definition at line 276 of file comBuf.h.
279 unsigned occupied = this->commitIndex - index;
280 if ( nBytes <= occupied ) {
281 memcpy ( pBuf, &this->
buf[index], nBytes);
epicsUInt8 buf[comBufSize]
unsigned comBuf::copyOutBytes |
( |
void * |
pBuf, |
|
|
unsigned |
nBytes |
|
) |
| |
|
inline |
Definition at line 288 of file comBuf.h.
291 unsigned occupied = this->commitIndex - index;
292 if ( nBytes > occupied ) {
295 memcpy ( pBuf, &this->
buf[index], nBytes);
epicsUInt8 buf[comBufSize]
Definition at line 176 of file comBuf.h.
181 sizeof ( this->
buf ) - this->nextWriteIndex, stat );
swioCircuitState circuitState
epicsUInt8 buf[comBufSize]
virtual void recvBytes(void *pBuf, unsigned nBytesInBuf, statusWireIO &)=0
epicsPlacementDeleteOperator((void *, comBufMemoryManager &)) private unsigne nextWriteIndex)
bool comBuf::flushToWire |
( |
wireSendAdapter & |
wire, |
|
|
const epicsTime & |
currentTime |
|
) |
| |
Definition at line 30 of file comBuf.cpp.
33 unsigned finalIndex = this->commitIndex;
34 while ( index < finalIndex ) {
epicsUInt8 buf[comBufSize]
virtual unsigned sendBytes(const void *pBuf, unsigned nBytesInBuf, const class epicsTime ¤tTime)=0
unsigned comBuf::occupiedBytes |
( |
| ) |
const |
|
inline |
void comBuf::operator delete |
( |
void * |
| ) |
|
Definition at line 54 of file comBuf.cpp.
61 errlogPrintf (
"%s:%d this compiler is confused about placement delete - memory was probably leaked",
int errlogPrintf(const char *pFormat,...)
Definition at line 121 of file comBuf.h.
virtual void * allocate(size_t)=0
Definition at line 312 of file comBuf.h.
315 unsigned popIndex = nrIndex +
sizeof ( returnVal );
316 unsigned cIndex = this->commitIndex;
318 status.success =
true;
319 status.nowEmpty =
false;
320 if ( popIndex >= cIndex ) {
321 if ( popIndex == cIndex ) {
322 status.nowEmpty =
true;
325 status.success =
false;
329 WireGet ( & this->
buf[ nrIndex ], returnVal );
epicsUInt8 buf[comBufSize]
unsigned comBuf::push |
( |
comBuf & |
bufIn | ) |
|
|
inline |
Definition at line 162 of file comBuf.h.
unsigned copyInBytes(const void *pBuf, unsigned nBytes)
epicsUInt8 buf[comBufSize]
template<class T >
bool comBuf::push |
( |
const T & |
value | ) |
|
|
inline |
Definition at line 188 of file comBuf.h.
191 unsigned available =
sizeof ( this->
buf ) - index;
192 if (
sizeof (
value ) > available ) {
epicsUInt8 buf[comBufSize]
epicsPlacementDeleteOperator((void *, comBufMemoryManager &)) private unsigne nextWriteIndex)
template<class T >
unsigned comBuf::push |
( |
const T * |
pValue, |
|
|
unsigned |
nElem |
|
) |
| |
Definition at line 225 of file comBuf.h.
228 unsigned available =
sizeof ( this->
buf ) - index;
229 unsigned nBytes =
sizeof ( *pValue ) * nElem;
230 if ( nBytes > available ) {
231 nElem = available /
sizeof ( *pValue );
233 for (
unsigned i = 0u;
i < nElem;
i++ ) {
236 index +=
sizeof ( *pValue );
epicsUInt8 buf[comBufSize]
epicsPlacementDeleteOperator((void *, comBufMemoryManager &)) private unsigne nextWriteIndex)
unsigned comBuf::push |
( |
const epicsInt8 * |
pValue, |
|
|
unsigned |
nElem |
|
) |
| |
|
inline |
Definition at line 200 of file comBuf.h.
unsigned copyInBytes(const void *pBuf, unsigned nBytes)
unsigned comBuf::push |
( |
const epicsUInt8 * |
pValue, |
|
|
unsigned |
nElem |
|
) |
| |
|
inline |
Definition at line 205 of file comBuf.h.
unsigned copyInBytes(const void *pBuf, unsigned nBytes)
unsigned comBuf::push |
( |
const epicsOldString * |
pValue, |
|
|
unsigned |
nElem |
|
) |
| |
|
inline |
Definition at line 210 of file comBuf.h.
213 unsigned available =
sizeof ( this->
buf ) - index;
214 unsigned nBytes =
sizeof ( *pValue ) * nElem;
215 if ( nBytes > available ) {
216 nElem = available /
sizeof ( *pValue );
217 nBytes = nElem *
sizeof ( *pValue );
219 memcpy ( &this->
buf[ index ], pValue, nBytes );
epicsUInt8 buf[comBufSize]
epicsPlacementDeleteOperator((void *, comBufMemoryManager &)) private unsigne nextWriteIndex)
template<class T >
bool comBuf::push |
( |
const T * |
| ) |
|
unsigned comBuf::removeBytes |
( |
unsigned |
nBytes | ) |
|
|
inline |
Definition at line 300 of file comBuf.h.
303 unsigned occupied = this->commitIndex - index;
304 if ( nBytes > occupied ) {
void comBuf::throwInsufficentBytesException |
( |
| ) |
|
|
static |
unsigned comBuf::uncommittedBytes |
( |
| ) |
const |
|
inline |
Definition at line 157 of file comBuf.h.
epicsPlacementDeleteOperator((void *, comBufMemoryManager &)) private unsigne nextWriteIndex)
unsigned comBuf::unoccupiedBytes |
( |
| ) |
const |
|
inline |
Definition at line 147 of file comBuf.h.
epicsUInt8 buf[comBufSize]
epicsPlacementDeleteOperator((void *, comBufMemoryManager &)) private unsigne nextWriteIndex)
unsigned comBuf::nextReadIndex |
epicsPlacementDeleteOperator (( void *, comBufMemoryManager & )) private unsigne comBuf::nextWriteIndex) |
The documentation for this class was generated from the following files: