Image parser context definition.

Public Attributes#

uint8_t

Buffer contents.

uint8_t

Amount of bytes present in buffer.

uint8_t

Current reading offset into the buffer (circular)

uint8_t

Parser flags.

bool

Parser is currently inside an encrypted tag.

bool

Parser has received and verified signature.

uint8_t

Parser has received bootloader upgrade tag.

State of the GBL parser state machine.

void *

AES-CCM decryption (= AES-CTR) context.

void *

SHA256 hashing context.

size_t

Total length of the tag currently being parsed.

size_t

Current offset into tag being parsed.

size_t

Total length of current encrypted data block.

size_t

Offset into current encrypted data block.

uint32_t

Current address the image needs to be written to.

uint32_t

Current offset of metadata/bootloader being handled (starts at 0)

uint8_t

Withheld application data.

uint8_t

Withheld bootloader upgrade data during app parsing.

uint8_t

Withheld bootloader upgrade data during bootloader parsing.

uint32_t

Running CRC-32 over the incoming GBL file.

uint32_t

Context for custom tag.

uint8_t

Current tag order.

uint8_t

Reserved flags.

Public Attribute Documentation#

internalBuffer#

uint8_t ParserContext_t::internalBuffer[64]

Buffer contents.


bytesInInternalBuffer#

uint8_t ParserContext_t::bytesInInternalBuffer

Amount of bytes present in buffer.


internalBufferOffset#

uint8_t ParserContext_t::internalBufferOffset

Current reading offset into the buffer (circular)


flags#

uint8_t ParserContext_t::flags

Parser flags.


inEncryptedContainer#

bool ParserContext_t::inEncryptedContainer

Parser is currently inside an encrypted tag.


gotSignature#

bool ParserContext_t::gotSignature

Parser has received and verified signature.


receivedFlags#

uint8_t ParserContext_t::receivedFlags

Parser has received bootloader upgrade tag.


internalState#

GblParserState_t ParserContext_t::internalState

State of the GBL parser state machine.


aesContext#

void* ParserContext_t::aesContext

AES-CCM decryption (= AES-CTR) context.


shaContext#

void* ParserContext_t::shaContext

SHA256 hashing context.


lengthOfTag#

size_t ParserContext_t::lengthOfTag

Total length of the tag currently being parsed.


offsetInTag#

size_t ParserContext_t::offsetInTag

Current offset into tag being parsed.


lengthOfEncryptedTag#

size_t ParserContext_t::lengthOfEncryptedTag

Total length of current encrypted data block.


offsetInEncryptedTag#

size_t ParserContext_t::offsetInEncryptedTag

Offset into current encrypted data block.


programmingAddress#

uint32_t ParserContext_t::programmingAddress

Current address the image needs to be written to.


tagAddress#

uint32_t ParserContext_t::tagAddress

Current offset of metadata/bootloader being handled (starts at 0)


withheldApplicationVectors#

uint8_t ParserContext_t::withheldApplicationVectors[24]

Withheld application data.


withheldUpgradeVectors#

uint8_t ParserContext_t::withheldUpgradeVectors[4]

Withheld bootloader upgrade data during app parsing.


withheldBootloaderVectors#

uint8_t ParserContext_t::withheldBootloaderVectors[4]

Withheld bootloader upgrade data during bootloader parsing.


fileCrc#

uint32_t ParserContext_t::fileCrc

Running CRC-32 over the incoming GBL file.


customTagId#

uint32_t ParserContext_t::customTagId

Context for custom tag.


currentTagOrder#

uint8_t ParserContext_t::currentTagOrder

Current tag order.


reservedFlags#

uint8_t ParserContext_t::reservedFlags[3]

Reserved flags.