16 #ifndef DABC_NetworkTransport
17 #define DABC_NetworkTransport
19 #ifndef DABC_Transport
37 virtual void AllocateNet(
unsigned fulloutputqueue,
unsigned fullinputqueue) = 0;
112 uint32_t
TakeRec(
Buffer& buf, uint32_t kind = 0, uint32_t extras = 0);
133 virtual const char*
ClassName()
const {
return "NetworkTransport"; }
Reference on memory from memory pool.
Represents command with its arguments.
std::string PoolName(unsigned indx=0, bool fullname=false) const
virtual void SubmitRecv(uint32_t recid)=0
virtual void AllocateNet(unsigned fulloutputqueue, unsigned fullinputqueue)=0
virtual void SubmitSend(uint32_t recid)=0
virtual ~NetworkInetrface()
std::string TransportPoolName() const
Provides name of memory pool, used by transport.
void SetRecHeader(uint32_t recid, void *header)
uint32_t TakeRec(Buffer &buf, uint32_t kind=0, uint32_t extras=0)
virtual void ProcessPoolEvent(unsigned pool)
Method called by framework when pool event is produced.
void ReleaseRec(uint32_t recid)
Queue< uint32_t > NetIORecsQueue
virtual void ProcessTimerEvent(unsigned timer)
Method called by framework when timer event is produced.
virtual ~NetworkTransport()
void SubmitAllowedSendOperations()
virtual void TransportCleanup()
bool fStartBufReq
if true, request to memory pool was started and one should wait until it is finished
virtual bool StartTransport()
Methods activated by Port, when transport starts/stops.
unsigned fAcknAllowedOper
NetIORec * GetRec(unsigned id) const
void FillRecvQueue(Buffer *freebuf=0, bool onlyfreebuf=false)
unsigned GetFullHeaderSize() const
unsigned fOutputQueueSize
virtual void ProcessInputEvent(unsigned port)
Method called by framework when input event is produced.
void ProcessRecvCompl(uint32_t recid)
virtual void OnThreadAssigned()
virtual const char * ClassName() const
Returns class name of the object.
bool CheckAcknReadyCounter(unsigned newitems=0)
BufferSize_t fFullHeaderSize
BufferSize_t fInlineDataSize
void ProcessSendCompl(uint32_t recid)
unsigned fInputQueueCapacity
NetIORecsQueue fAcknSendQueue
NetworkTransport(dabc::Command cmd, const PortRef &inpport, const PortRef &outport, bool useackn, WorkerAddon *addon)
int PackHeader(uint32_t recid)
virtual bool StopTransport()
static bool Make(const ConnectionRequest &req, WorkerAddon *addon, const std::string &devthrdname="")
unsigned fAcknReadyCounter
virtual void ProcessOutputEvent(unsigned port)
Method called by framework when output event is produced.
unsigned fOutputQueueCapacity
static void GetRequiredQueuesSizes(const PortRef &port, unsigned &input_size, unsigned &output_size)
Reference on the dabc::Port class
Base class for transport implementations.
Generic addon for dabc::Worker.