LibDAT

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrintDatFloatRecord

func PrintDatFloatRecord(record *DatFloatRecord)

func PrintTagRecord

func PrintTagRecord(tag *DatTagRecord)

PrintTagRecord prints the details of a DatTagRecord in a formatted way

Types

type DatFloatRecord

type DatFloatRecord struct {
	TimeStamp time.Time
	TagID     int
	Val       float64
	Status    byte
	Marker    byte
	IsValid   bool
}

type DatReader

type DatReader struct {
	FloatFileNames []string
}

func NewDatReader

func NewDatReader(path string) (*DatReader, error)

func (*DatReader) GetFloatFiles

func (dr *DatReader) GetFloatFiles() []string

func (*DatReader) ReadFloatFile

func (dr *DatReader) ReadFloatFile(filename string) ([]*DatFloatRecord, error)

ReadFloatFile reads the float file and returns a slice of DatFloatRecord

func (*DatReader) ReadFloatFileHeader

func (dr *DatReader) ReadFloatFileHeader(filename string) (*int32, error)

func (*DatReader) ReadFloatFileRecords

func (dr *DatReader) ReadFloatFileRecords(filename string, rowCount int32) ([]*DatFloatRecord, error)

func (*DatReader) ReadTagFile

func (dr *DatReader) ReadTagFile(floatfileName string) ([]*DatTagRecord, error)

ReadTagFile reads the tag file associated with a float file and returns the DatTagRecord instances

func (*DatReader) ReadTagFileHeader

func (dr *DatReader) ReadTagFileHeader(floatfileName string) (*int32, *string, error)

ReadTagFile reads the tag file associated with a float file and returns the DatTagRecord instances

func (*DatReader) ReadTagRecordsFile

func (dr *DatReader) ReadTagRecordsFile(floatfileName string, rowCount int) ([]*DatTagRecord, error)

ReadTagFile reads the tag file associated with a float file and returns the DatTagRecord instances

type DatTagRecord

type DatTagRecord struct {
	Name  string
	ID    int
	Type  int
	Dtype int
}

func NewDatTagRecord

func NewDatTagRecord(r io.Reader) (*DatTagRecord, error)

type Marker

type Marker struct {
	Began bool
	Ended bool
}

type Status

type Status struct {
	Good               bool
	CommunicationError bool
	Disabled           bool
	Stale              bool
	Uninitialized      bool
}

Jump to

Keyboard shortcuts

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