CHERIoT RTOS
A compartmentalised RTOS for CHERIoT hardware
Loading...
Searching...
No Matches
Bitpack< StorageParam >::FieldInfo Struct Reference

Information about a field within a Bitpack. More...

#include <bitpack.hh>

Public Member Functions

bool operator== (const FieldInfo &) const =default

Public Attributes

size_t minIndex
 Minimum 0-indexed bit position occupied by this field.
size_t maxIndex
 Maximum 0-indexed bit position occupied by this field.
bool isConst = false
 Should this field be proxied as constant (and so mutation be slightly less ergonomic)?

Detailed Description

template<typename StorageParam>
struct Bitpack< StorageParam >::FieldInfo

Information about a field within a Bitpack.

Fields are contiguous spans of bits and so have a lowest and highest bit position within the underlying Storage word.

Fields may be marked as constant to dissuade software from attempting to change their value. Do note, though, that any store of an underlying Storage word will also, necessarily, include the bits for constant Fields. It is likely generally more advisable to not mix constant and non-constant fields within the same Storage word or Bitpack.

Definition at line 461 of file bitpack.hh.

Member Data Documentation

◆ isConst

template<typename StorageParam>
bool Bitpack< StorageParam >::FieldInfo::isConst = false

Should this field be proxied as constant (and so mutation be slightly less ergonomic)?

Definition at line 471 of file bitpack.hh.

◆ maxIndex

template<typename StorageParam>
size_t Bitpack< StorageParam >::FieldInfo::maxIndex

Maximum 0-indexed bit position occupied by this field.

Definition at line 466 of file bitpack.hh.

◆ minIndex

template<typename StorageParam>
size_t Bitpack< StorageParam >::FieldInfo::minIndex

Minimum 0-indexed bit position occupied by this field.

Definition at line 464 of file bitpack.hh.


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