CDI SDK
SDK for transporting chunks of data reliably and with low latency using a polled mode network driver.
Loading...
Searching...
No Matches
CdiPacketizerState Struct Reference

Structure to store the current state of a packet being constructed. Its purpose is to allow for the suspension of the creation of a packet if a pool from which items need to be allocated is empty. A state object is passed in to CdiPayloadInit() prior to calls to CdiPayloadParseCDIPacket() for a given payload. More...

Public Types

enum  { kStateInactive , kStateAddingHeader , kStateAddingEntries }
 

Data Fields

enum CdiPacketizerState:: { ... }  state
 
CdiSglEntrypacket_entry_hdr_ptr
 Pointer to the current payload SGL entry being consumed.
 
int header_size
 The size of the header computed for this packet.
 
int accumulated_payload_bytes
 The number of payload bytes collected so far into the current packet.
 
int sgl_entry_count
 The number of SGL entries used so far to represent the current packet.
 
uint8_t * data_addr_ptr
 The current address in the payload buffer.
 
int max_payload_bytes
 The maximum number of payload bytes that can be put into this packet.
 

Detailed Description

Structure to store the current state of a packet being constructed. Its purpose is to allow for the suspension of the creation of a packet if a pool from which items need to be allocated is empty. A state object is passed in to CdiPayloadInit() prior to calls to CdiPayloadParseCDIPacket() for a given payload.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

The state of the packetizer so that CdiPayloadPacketizerPacketGet()'s progress on a given packet can be suspended for lack of resources and resumed in a subsequent call.

Enumerator
kStateInactive 

This is the first time CdiPayloadPacketizerPacketGet() has been called for a given packet.

kStateAddingHeader 

The packetizer is attempting to add the SGL entry for the CDI packet header.

kStateAddingEntries 

The packetizer is adding the payload SGL entries.

Field Documentation

◆ []

enum { ... } CdiPacketizerState::state

The state of the packetizer so that CdiPayloadPacketizerPacketGet()'s progress on a given packet can be suspended for lack of resources and resumed in a subsequent call.


The documentation for this struct was generated from the following file: