types

package
v0.0.0-...-843624c Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2019 License: GPL-3.0 Imports: 3 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TCDataSet

type TCDataSet struct {
	Client *TClient
	Data   *TDataSet
}

type TCategory

type TCategory struct {
	ID   int16        `json:"id",yaml:"id"`
	Name string       `json:"name",yaml:"name"`
	Sub  []*TCategory `json:"sub",yaml:"sub"`
}

type TClient

type TClient struct {
	ID   int16  `json:"id",yaml:"id"`
	Name string `json:"name",yaml:"name"`
}

type TConf

type TConf struct {
	Index      int16        `json:"index",yaml:"index"`
	Categories []*TCategory `json:"categories",yaml:"categories"`
	Targets    []*TTarget   `json:"targets",yaml:"targets"`
	Clients    []*TClient   `json:"clients",yaml:"clients"`
}

type TDataSet

type TDataSet struct {
	Lock  *sync.RWMutex
	Buf   *TRecord
	Day   []*TRecord
	Week  []*TRecord
	Month []*TRecord
	Year  []*TRecord
}

type TDataSets

type TDataSets map[int16]*TTDataSet

type TRecord

type TRecord struct {
	Avg int16 `json:"avg"`
	Max int16 `json:"max"`
	Min int16 `json:"min"`
	Std int16 `json:"std"`
	Los int8  `json:"los"`
}

func BuildRecord

func BuildRecord(vs []float64, cnt int) *TRecord

func NewRecord

func NewRecord() *TRecord

type TTDataSet

type TTDataSet struct {
	Target *TTarget
	Data   map[int16]*TCDataSet
}

type TTarget

type TTarget struct {
	ID   int16   `json:"id",yaml:"id"`
	Name string  `json:"name",yaml:"name"`
	Note string  `json:"note",yaml:"note"`
	Addr string  `json:"addr",yaml:"addr"`
	Cid  []int16 `json:"cid",yaml:"cid"`
}

Jump to

Keyboard shortcuts

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