tonic v0.2.2 Tonic.Types

Link to this section Summary

Functions

Read a single bit boolean value

Read a 32-bit floating point

Read a 64-bit floating point

Read a 16-bit signed integer

Read a 32-bit signed integer

Read a 64-bit signed integer

Read an 8-bit signed integer

Read a 16-bit unsigned integer

Read a 32-bit unsigned integer

Read a 64-bit unsigned integer

Read an 8-bit unsigned integer

Link to this section Functions

Link to this macro

bit() (macro)

Read a single bit boolean value.

Link to this macro

bit(label) (macro)

Link to this macro

bit(label, endianness_or_fun) (macro)

Link to this macro

bit(label, endianness, fun) (macro)

Link to this function

bit(currently_loaded, data, name, endianness)

Link to this macro

float32() (macro)

Read a 32-bit floating point.

Link to this macro

float32(label) (macro)

Link to this macro

float32(label, endianness_or_fun) (macro)

Link to this macro

float32(label, endianness, fun) (macro)

Link to this function

float32(currently_loaded, data, name, atom)

Link to this macro

float64() (macro)

Read a 64-bit floating point.

Link to this macro

float64(label) (macro)

Link to this macro

float64(label, endianness_or_fun) (macro)

Link to this macro

float64(label, endianness, fun) (macro)

Link to this function

float64(currently_loaded, data, name, atom)

Link to this macro

int16() (macro)

Read a 16-bit signed integer.

Link to this macro

int16(label) (macro)

Link to this macro

int16(label, endianness_or_fun) (macro)

Link to this macro

int16(label, endianness, fun) (macro)

Link to this function

int16(currently_loaded, data, name, atom)

Link to this macro

int32() (macro)

Read a 32-bit signed integer.

Link to this macro

int32(label) (macro)

Link to this macro

int32(label, endianness_or_fun) (macro)

Link to this macro

int32(label, endianness, fun) (macro)

Link to this function

int32(currently_loaded, data, name, atom)

Link to this macro

int64() (macro)

Read a 64-bit signed integer.

Link to this macro

int64(label) (macro)

Link to this macro

int64(label, endianness_or_fun) (macro)

Link to this macro

int64(label, endianness, fun) (macro)

Link to this function

int64(currently_loaded, data, name, atom)

Link to this macro

int8() (macro)

Read an 8-bit signed integer.

Link to this macro

int8(label) (macro)

Link to this macro

int8(label, endianness_or_fun) (macro)

Link to this macro

int8(label, endianness, fun) (macro)

Link to this function

int8(currently_loaded, data, name, atom)

Link to this macro

string(name \\ [], options \\ []) (macro)

Read a string.

Default will read until end of data. Otherwise a length value can be specified length: 10, or it can read up to a terminator ?\n or terminator: ?\n, or both limits can be applied.

The string can have its trailing characters stripped by using strip: ?\n or strip: "\n".

Examples

string :read_to_end
string :read_8_chars, length: 8
string :read_till_nul, 0
string :read_till_newline, ?\n
string :read_till_newline_or_8_chars, length: 8, terminator: ?\n
string :read_to_end_remove_newline, strip: ?\n
Link to this macro

uint16() (macro)

Read a 16-bit unsigned integer.

Link to this macro

uint16(label) (macro)

Link to this macro

uint16(label, endianness_or_fun) (macro)

Link to this macro

uint16(label, endianness, fun) (macro)

Link to this function

uint16(currently_loaded, data, name, atom)

Link to this macro

uint32() (macro)

Read a 32-bit unsigned integer.

Link to this macro

uint32(label) (macro)

Link to this macro

uint32(label, endianness_or_fun) (macro)

Link to this macro

uint32(label, endianness, fun) (macro)

Link to this function

uint32(currently_loaded, data, name, atom)

Link to this macro

uint64() (macro)

Read a 64-bit unsigned integer.

Link to this macro

uint64(label) (macro)

Link to this macro

uint64(label, endianness_or_fun) (macro)

Link to this macro

uint64(label, endianness, fun) (macro)

Link to this function

uint64(currently_loaded, data, name, atom)

Link to this macro

uint8() (macro)

Read an 8-bit unsigned integer.

Link to this macro

uint8(label) (macro)

Link to this macro

uint8(label, endianness_or_fun) (macro)

Link to this macro

uint8(label, endianness, fun) (macro)

Link to this function

uint8(currently_loaded, data, name, atom)