history

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileCache

type FileCache struct {
	// contains filtered or unexported fields
}

func NewFileCache

func NewFileCache(filePath string) *FileCache

func (*FileCache) Read

func (c *FileCache) Read(begin int64, end int64) []*common_interfaces.ItemValue

func (*FileCache) Write

func (c *FileCache) Write(item *common_interfaces.ItemValue)

type FlushResult

type FlushResult struct {
	Error        error
	FullDataSize int
	CountOfItems int
}

type History

type History struct {
	// contains filtered or unexported fields
}

func NewHistory

func NewHistory() *History

func (*History) Read

func (c *History) Read(id uint64, dtBegin int64, dtEnd int64) *ReadResult

func (*History) RemoveItem added in v1.0.6

func (c *History) RemoveItem(id uint64)

func (*History) Start

func (c *History) Start()

func (*History) Stop

func (c *History) Stop()

func (*History) Write

func (c *History) Write(id uint64, value common_interfaces.ItemValue)

type Item

type Item struct {
	// contains filtered or unexported fields
}

func NewItem

func NewItem(id uint64) *Item

func (*Item) CheckDepth

func (c *Item) CheckDepth()

func (*Item) FinishFlush

func (c *Item) FinishFlush()

func (*Item) Flush

func (c *Item) Flush() FlushResult

func (*Item) Read

func (c *Item) Read(dtBegin int64, dtEnd int64) *ReadResult

func (*Item) Remove added in v1.0.6

func (c *Item) Remove()

func (*Item) Write

func (c *Item) Write(value common_interfaces.ItemValue)

type ReadResult

type ReadResult struct {
	Id      uint64                         `json:"id"`
	DTBegin int64                          `json:"dt_begin"`
	DTEnd   int64                          `json:"dt_end"`
	Items   []*common_interfaces.ItemValue `json:"items"`
}

type ReadResultItem

type ReadResultItem struct {
	DatetimeFirst int64
	DatetimeLast  int64
	FirstValue    float64
	LastValue     float64
	MinValue      float64
	MaxValue      float64
	AvgValue      float64
	Qualities     []int64
	CountOfValues int64
}

Jump to

Keyboard shortcuts

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