Library
Module
Module type
Parameter
Class
Class type
The following operations assume a little-endian byte ordering of the cstruct. If the machine-native byte ordering differs, then the get operations will reorder the bytes so that they are in machine-native byte order before returning the result, and the set operations will reorder the bytes so that they are written out in the appropriate order.
Most modern processor architectures are little-endian, so more likely than not, these operations will not do any byte reordering.
get_uint16 t i
returns the two bytes in t
starting at offset i
, interpreted as an uint16
. Sign extension is not interpreted.
get_uint32 t i
returns the four bytes in t
starting at offset i
. t
needs at least read-capability rd
.
get_uint64 t i
returns the eight bytes in t
starting at offset i
. t
needs at least read-capability rd
.
set_uint16 t i v
sets the two bytes in t
starting at offset i
to the value v
. t
needs at least write-capability wr
.
set_uint32 t i v
sets the four bytes in t
starting at offset i
to the value v
. t
needs at least write-capability wr
.