model

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoValueFound = errors.New("no value found")
View Source
var ErrNotFound = errors.New("not found")
View Source
var ErrNotReady = errors.New("not ready")
View Source
var NoMatchingDeviceTypeFound = errors.New("unable to find matching device type")

Functions

func DecodeLocalId

func DecodeLocalId(encoded string) (decoded string)

func EncodeLocalId

func EncodeLocalId(raw string) (encoded string)

Types

type DeviceInfo

type DeviceInfo struct {
	NodeId         int64
	Name           string
	Manufacturer   string
	ManufacturerId string
	Product        string
	ProductType    string
	ProductId      string
	Values         map[string]Value
	Statistics     Statistics
}

func (DeviceInfo) GetTypeMappingKey

func (this DeviceInfo) GetTypeMappingKey() string

func (DeviceInfo) IsHusk

func (this DeviceInfo) IsHusk() bool

func (DeviceInfo) IsValid

func (this DeviceInfo) IsValid() bool

type Statistics

type Statistics struct {
	CommandTx         float64 `json:"commandsTX"`
	CommandsRX        float64 `json:"commandsRX"`
	CommandsDroppedRX float64 `json:"commandsDroppedRX"`
	CommandsDroppedTX float64 `json:"commandsDroppedTX"`
	TimeoutResponse   float64 `json:"timeoutResponse"`
	Rtt               float64 `json:"rtt"`
}

type Value

type Value struct {
	Description       string      `json:"description"`
	ComputedServiceId string      `json:"computedServiceId"`
	ValueId           string      `json:"value_id"`
	NodeId            int64       `json:"node_id"`
	ClassId           int64       `json:"class_id"`
	CommandClassName  string      `json:"commandClassName"`
	Type              string      `json:"type"`
	Instance          int64       `json:"instance"`
	Index             int64       `json:"index"`
	Label             string      `json:"label"`
	ReadOnly          bool        `json:"read_only"`
	WriteOnly         bool        `json:"write_only"`
	Values            interface{} `json:"values"`
	Value             interface{} `json:"value"`
	LastUpdate        int64       `json:"lastUpdate"`
}

func (Value) GetServiceId

func (this Value) GetServiceId(get bool) string

Jump to

Keyboard shortcuts

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