IndexPacket Struct Reference

Classes

struct  IndexPacketEntry
 

Public Member Functions

void verify (unsigned bufferLength=0, uint64_t totalRecordCount=0, uint64_t fileSize=0) const
 

Public Attributes

struct IndexPacket::IndexPacketEntry entries [MAX_ENTRIES]
 
uint16_t entryCount = 0
 
uint8_t indexLevel = 0
 
uint8_t packetFlags = 0
 
uint16_t packetLogicalLengthMinus1 = 0
 
const uint8_t packetType = INDEX_PACKET
 
uint8_t reserved1 [9] = {}
 

Static Public Attributes

static constexpr unsigned MAX_ENTRIES = 2048
 

Member Function Documentation

◆ verify()

void IndexPacket::verify ( unsigned  bufferLength = 0,
uint64_t  totalRecordCount = 0,
uint64_t  fileSize = 0 
) const

Verify that packet is correct type

Check packetLength is at least large enough to hold header

Check packet length is multiple of 4

Make sure there is at least one entry in packet ??? 0 record cvect allowed?

Have to have <= 2048 entries

Index level should be <= 5. Because (5+1)* 11 bits = 66 bits, which will cover largest number of chunks possible.

Index packets above level 0 must have at least two entries (otherwise no point to existing). ??? check that this is in spec

If not later version, verify reserved fields are zero. ??? test file version if (version <= E57_FORMAT_MAJOR) { //???

Check actual packet length is large enough.

Check if entries will fit in space provided

References e57::E57_ERROR_BAD_CV_PACKET, e57::INDEX_PACKET, and e57::toString().

Referenced by e57::PacketReadCache::readPacket().

Member Data Documentation

◆ entries

struct IndexPacket::IndexPacketEntry IndexPacket::entries[MAX_ENTRIES]

◆ entryCount

uint16_t IndexPacket::entryCount = 0

◆ indexLevel

uint8_t IndexPacket::indexLevel = 0

◆ MAX_ENTRIES

constexpr unsigned IndexPacket::MAX_ENTRIES = 2048
staticconstexpr

◆ packetFlags

uint8_t IndexPacket::packetFlags = 0

◆ packetLogicalLengthMinus1

uint16_t IndexPacket::packetLogicalLengthMinus1 = 0

◆ packetType

const uint8_t IndexPacket::packetType = INDEX_PACKET

◆ reserved1

uint8_t IndexPacket::reserved1[9] = {}

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