val

package
v0.0.0-...-ea60fba Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 16, 2024 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Overview

Package val provides types for Functional Bus Description Language type system.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BitStr

type BitStr string

BitStr represents FBDL bit string type.

func BitStrFromInt

func BitStrFromInt(v Int, width int64) (BitStr, error)

BitStrFromInt converts val.Int to BitStr. It only checks whether given value can be represented with given width. It uses U2 encoding for negative values.

func MakeBitStr

func MakeBitStr(s string) (BitStr, error)

func (BitStr) BitWidth

func (bs BitStr) BitWidth() int64

BitWidth returns bit width of the bit string.

func (BitStr) Bytes

func (bs BitStr) Bytes() []byte

func (BitStr) CharWidth

func (bs BitStr) CharWidth() int64

CharWidth returns character width of the bit string excluding format specifier and leading and trailing '"'.

func (BitStr) Type

func (bs BitStr) Type() string

type Bool

type Bool bool

Bool represents FBDL bool type.

func (Bool) Type

func (b Bool) Type() string

type Float

type Float float64

Float represents FBDL float type.

func (Float) Type

func (f Float) Type() string

type Int

type Int int64

Int represents FBDL integer type.

func (Int) Type

func (i Int) Type() string

type List

type List []Value

List represents FBDL list type.

func (List) Type

func (l List) Type() string

type Str

type Str string

Str represents FBDL string type.

func (Str) Type

func (s Str) Type() string

type Time

type Time struct {
	S  int64
	Ns int64
}

Time represents FBDL time type.

func (*Time) Normalize

func (t *Time) Normalize()

func (Time) Type

func (t Time) Type() string

type Value

type Value interface {
	Type() string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL