CC

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Algebraic added in v0.0.2

type Algebraic struct {
	Info    Info
	Formula string
}

func (*Algebraic) Apply added in v0.0.2

func (a *Algebraic) Apply(sample *[]interface{})

Interporlation formula

type BitfieldText added in v0.0.3

type BitfieldText struct {
	Info    Info
	Bitmask []float64
	Links   []float64
}

func (*BitfieldText) Apply added in v0.0.3

func (bt *BitfieldText) Apply(sample *[]interface{})

type Block

type Block struct {
	Header blocks.Header
	Link   Link
	Data   Data
}

func New

func New(file *os.File, startAdress int64) *Block

func (*Block) BlankBlock

func (b *Block) BlankBlock() *Block

func (*Block) Get added in v0.0.2

func (b *Block) Get(file *os.File, channelType uint8) Conversion

Get returns an conversion struct type

func (*Block) GetAlgebraic added in v0.0.2

func (b *Block) GetAlgebraic(file *os.File) Conversion

func (*Block) GetBitfield added in v0.0.3

func (b *Block) GetBitfield(file *os.File) Conversion

func (*Block) GetLinear added in v0.0.2

func (b *Block) GetLinear(file *os.File) Conversion

GetLinear returns linear conversion struct type

func (*Block) GetRational added in v0.0.2

func (b *Block) GetRational(file *os.File) Conversion

GetRational returns rational conversion struct type

func (*Block) GetTextToText added in v0.0.3

func (b *Block) GetTextToText(file *os.File) Conversion

func (*Block) GetTextToValue added in v0.0.3

func (b *Block) GetTextToValue(file *os.File) Conversion

func (*Block) GetValueRangeToText added in v0.0.2

func (b *Block) GetValueRangeToText(file *os.File, channelType uint8) Conversion

func (*Block) GetValueRangeToValue added in v0.0.2

func (b *Block) GetValueRangeToValue(file *os.File, channelType uint8) Conversion

GetVVInterporlation returns value to value tabular look-up with interpolation

func (*Block) GetValueToText added in v0.0.2

func (b *Block) GetValueToText(file *os.File) Conversion

func (*Block) GetValueToValue added in v0.0.2

func (b *Block) GetValueToValue(file *os.File) Conversion

GetVVInterporlation returns value to value tabular look-up with interpolation

type Conversion added in v0.0.2

type Conversion interface {
	Apply(*[]interface{})
}

type Data

type Data struct {
	Type        uint8
	Precision   uint8
	Flags       uint16
	RefCount    uint16
	ValCount    uint16
	PhyRangeMin float64
	PhyRangeMax float64
	Val         []float64
}

type Info added in v0.0.2

type Info struct {
	Name    string
	Unit    string
	Comment string
}

type Linear added in v0.0.2

type Linear struct {
	Info Info
	P1   float64
	P2   float64
}

func (*Linear) Apply added in v0.0.2

func (l *Linear) Apply(sample *[]interface{})

linear formula with two parameters `(y=a*x+b)`

type Link struct {
	TxName    int64
	MdUnit    int64
	MdComment int64
	Inverse   int64
	Ref       []int64
}

type Rational added in v0.0.2

type Rational struct {
	Info Info
	P1   float64
	P2   float64
	P3   float64
	P4   float64
	P5   float64
	P6   float64
}

func (*Rational) Apply added in v0.0.2

func (r *Rational) Apply(sample *[]interface{})

Rational formula with two parameters `(y=v1*x+v2*x+v3*x/v4*x+v5*x+v6*x)`

type TextText added in v0.0.3

type TextText struct {
	Info    Info
	Keys    []string
	Values  []string
	Default string
}

func (*TextText) Apply added in v0.0.3

func (tt *TextText) Apply(sample *[]interface{})

type TextValue added in v0.0.3

type TextValue struct {
	Info    Info
	Values  []float64
	Keys    []string
	Default float64
}

func (*TextValue) Apply added in v0.0.3

func (tv *TextValue) Apply(sample *[]interface{})

type ValueRangeToText added in v0.0.2

type ValueRangeToText struct {
	Info     Info
	KeyMin   []float64
	KeyMax   []float64
	Links    []interface{}
	Default  interface{}
	DataType uint8
}

func (*ValueRangeToText) Apply added in v0.0.2

func (vt *ValueRangeToText) Apply(sample *[]interface{})

type ValueRangeToValue added in v0.0.2

type ValueRangeToValue struct {
	Info     Info
	KeyMin   []float64
	KeyMax   []float64
	Values   []float64
	Default  float64
	DataType uint8
}

func (*ValueRangeToValue) Apply added in v0.0.2

func (vr *ValueRangeToValue) Apply(sample *[]interface{})

type ValueText added in v0.0.2

type ValueText struct {
	Info    Info
	Keys    []float64
	Links   []interface{}
	Default interface{}
}

func (*ValueText) Apply added in v0.0.2

func (vt *ValueText) Apply(sample *[]interface{})

type ValueValue added in v0.0.2

type ValueValue struct {
	Info   Info
	Keys   []float64
	Values []float64
	Type   uint8
}

func (*ValueValue) Apply added in v0.0.2

func (vv *ValueValue) Apply(sample *[]interface{})

Jump to

Keyboard shortcuts

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