openDAQ
Open data acquisition platform
IPacketBuffer Struct Referenceabstract

Represents an openDAQ packet buffer. More...

+ Inheritance diagram for IPacketBuffer:
+ Collaboration diagram for IPacketBuffer:

Detailed Description

Represents an openDAQ packet buffer.

@addgroup opendaq_packet_buffer PacketBuffer

Public Member Functions

virtual ErrCode INTERFACE_FUNC createPacket (SizeT sampleCount, IDataDescriptor *desc, IPacket *domainPacket, IDataPacket **packet)=0
 Creates a Data Packet with external memory, whose. More...
 
virtual ErrCode INTERFACE_FUNC getMaxAvailableContinousSampleCount (IDataDescriptor *desc, SizeT *count)=0
 Returns the maximum continous amount of samples either at the beginning or the end of the buffer. More...
 
virtual ErrCode INTERFACE_FUNC getAvailableSampleCount (IDataDescriptor *desc, SizeT *count)=0
 Returns the amount of samples (whoose raw size is gained from desc) at the end of the buffer. More...
 
virtual ErrCode INTERFACE_FUNC resize (SizeT sizeInBytes)=0
 Reallocates the underlying std::vector so that it size matches the new given size. More...
 
- Public Member Functions inherited from IBaseObject
virtual ErrCode INTERFACE_FUNC borrowInterface (const IntfID &intfID, void **obj) const =0
 Returns another interface which is supported by the object without incrementing the reference count. More...
 
virtual ErrCode INTERFACE_FUNC dispose ()=0
 Disposes all references held by the object. More...
 
virtual ErrCode INTERFACE_FUNC getHashCode (SizeT *hashCode)=0
 Returns hash code of the object. More...
 
virtual ErrCode INTERFACE_FUNC equals (IBaseObject *other, Bool *equal) const =0
 Compares object to another object for equality. More...
 
virtual ErrCode INTERFACE_FUNC toString (CharPtr *str)=0
 Returns a string representation of the object. More...
 
- Public Member Functions inherited from IUnknown
virtual ErrCode INTERFACE_FUNC queryInterface (const IntfID &intfID, void **obj)=0
 Returns another interface which is supported by the object and increments the reference count. More...
 
virtual int INTERFACE_FUNC addRef ()=0
 Increments the reference count for an interface on an object. More...
 
virtual int INTERFACE_FUNC releaseRef ()=0
 Decrements the reference count for an interface on an object. More...
 

Member Function Documentation

◆ createPacket()

virtual ErrCode INTERFACE_FUNC createPacket ( SizeT  sampleCount,
IDataDescriptor desc,
IPacket domainPacket,
IDataPacket **  packet 
)
pure virtual

Creates a Data Packet with external memory, whose.

Parameters
sampleCountThe amount of samples in the packet
descDescription of the samples
domainPacketA packet containing domain information
[out]packetThe returned packet

◆ getAvailableSampleCount()

virtual ErrCode INTERFACE_FUNC getAvailableSampleCount ( IDataDescriptor desc,
SizeT *  count 
)
pure virtual

Returns the amount of samples (whoose raw size is gained from desc) at the end of the buffer.

Parameters
descDescription that contains the information about raw sample size
[out]countThe available amount

◆ getMaxAvailableContinousSampleCount()

virtual ErrCode INTERFACE_FUNC getMaxAvailableContinousSampleCount ( IDataDescriptor desc,
SizeT *  count 
)
pure virtual

Returns the maximum continous amount of samples either at the beginning or the end of the buffer.

Parameters
descDescription that contains the information about raw sample size
[out]countReturns the amount of samples that can be fitted into the space available

◆ resize()

virtual ErrCode INTERFACE_FUNC resize ( SizeT  sizeInBytes)
pure virtual

Reallocates the underlying std::vector so that it size matches the new given size.

Parameters
sizeInBytesThe requested size of the new buffer in bytes