class

BitField(T)

Inherits Reference < Object

Instance methods

inspect(io : IO) : Nil

Appends a String representation of this object which includes its class name, its object address and the values of all instance variables.

class Person
  def initialize(@name : String, @age : Int32)
  end
end

Person.new("John", 32).inspect # => #<Person:0x10fd31f20 @name="John", @age=32>
Source

Macros

add_field(name, type, size, read_only, write_only)

Exists as a general way to add fields to the FIELDS list. Guarantees that the correct number of parameters are passed, at least.

Source
bool(name, read_only = false, write_only = false)
Source
build_methods(bit_size)
Source
def_to_s
Source
enumeration(name, type, read_only = false, write_only = false)
Source
get_val(src, size, start)
Source
mask(size)
Source
num(name, size, read_only = false, write_only = false)
Source
set_val(dst, src, size, start)
Source
shifted_mask(size, start)
Source