autobahn.flatbuffers.table

Classes

Table

Table wraps a byte slice and provides read access to its data.

Module Contents

class Table(buf, pos)[source]

Bases: object

Table wraps a byte slice and provides read access to its data.

The variable Pos indicates the root of the FlatBuffers object therein.

Bytes[source]
Get(flags, off)[source]

Get retrieves a value of the type specified by flags at the

given offset.

GetArrayAsNumpy(flags, off, length)[source]

GetArrayAsNumpy returns the array with fixed width that starts at Vector(offset)

with length length as a numpy array with the type specified by flags. The array is a view into Bytes so modifying the returned will modify Bytes in place.

GetSlot(slot, d, validator_flags)[source]
GetVOffsetTSlot(slot, d)[source]

GetVOffsetTSlot retrieves the VOffsetT that the given vtable location

points to. If the vtable value is zero, the default value d will be returned.

GetVectorAsNumpy(flags, off)[source]

GetVectorAsNumpy returns the vector that starts at Vector(off)

as a numpy array with the type specified by flags. The array is a view into Bytes, so modifying the returned array will modify Bytes in place.

Indirect(off)[source]

Indirect retrieves the relative offset stored at offset.

Offset(vtableOffset)[source]

Offset provides access into the Table’s vtable.

Deprecated fields are ignored by checking the vtable’s length.

Pos[source]
String(off)[source]

String gets a string from data stored inside the flatbuffer.

Union(t2, off)[source]

Union initializes any Table-derived type to point to the union at

the given offset.

Vector(off)[source]

Vector retrieves the start of data of the vector whose offset is

stored at “off” in this object.

VectorLen(off)[source]

VectorLen retrieves the length of the vector whose offset is stored

at “off” in this object.

__slots__ = ('Bytes', 'Pos')[source]