Documentation ¶
Index ¶
- func SinkLog(prefix string, input <-chan Value)
- type Drainable
- type EnumRegisterStruct
- type Fillable
- type Filter
- type NumberRegisterStruct
- type NumericRegisterValue
- type Pipelineable
- type Register
- type RegisterStruct
- type RegisterType
- type RegisterValue
- type Registers
- type Source
- type State
- type Subscription
- type TextRegisterStruct
- type TextRegisterValue
- type Value
- type ValueMap
- type ValueStorageInstance
- func (instance *ValueStorageInstance) Drain() Subscription
- func (instance *ValueStorageInstance) Fill(input <-chan Value)
- func (instance *ValueStorageInstance) GetSlice(filter Filter) (result []Value)
- func (instance *ValueStorageInstance) GetState(filter Filter) State
- func (instance *ValueStorageInstance) Shutdown()
- func (instance *ValueStorageInstance) Subscribe(filter Filter) Subscription
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type EnumRegisterStruct ¶
type EnumRegisterStruct struct { RegisterStruct // contains filtered or unexported fields }
func (EnumRegisterStruct) Enum ¶
func (r EnumRegisterStruct) Enum() map[int]string
func (EnumRegisterStruct) Type ¶
func (r EnumRegisterStruct) Type() RegisterType
func (EnumRegisterStruct) Unit ¶
func (r EnumRegisterStruct) Unit() *string
type Fillable ¶
type Fillable interface {
Fill(input <-chan Value)
}
something which can consume values (-> a sink)
type NumberRegisterStruct ¶
type NumberRegisterStruct struct { RegisterStruct // contains filtered or unexported fields }
func (NumberRegisterStruct) Factor ¶
func (r NumberRegisterStruct) Factor() int
func (NumberRegisterStruct) Signed ¶
func (r NumberRegisterStruct) Signed() bool
func (NumberRegisterStruct) Type ¶
func (r NumberRegisterStruct) Type() RegisterType
func (NumberRegisterStruct) Unit ¶
func (r NumberRegisterStruct) Unit() *string
type NumericRegisterValue ¶
type NumericRegisterValue struct { RegisterValue // contains filtered or unexported fields }
func NewNumericRegisterValue ¶
func NewNumericRegisterValue(deviceName string, register Register, value float64) NumericRegisterValue
func (NumericRegisterValue) Equals ¶
func (v NumericRegisterValue) Equals(comp Value) bool
func (NumericRegisterValue) String ¶
func (v NumericRegisterValue) String() string
func (NumericRegisterValue) Value ¶
func (v NumericRegisterValue) Value() float64
type Pipelineable ¶
simething which does both (-> a pipeline stage)
type RegisterStruct ¶
type RegisterStruct struct {
// contains filtered or unexported fields
}
func (RegisterStruct) Address ¶
func (r RegisterStruct) Address() uint16
func (RegisterStruct) Category ¶
func (r RegisterStruct) Category() string
func (RegisterStruct) Description ¶
func (r RegisterStruct) Description() string
func (RegisterStruct) Name ¶
func (r RegisterStruct) Name() string
func (RegisterStruct) Static ¶
func (r RegisterStruct) Static() bool
type RegisterType ¶
type RegisterType int
const ( StringRegister RegisterType = iota NumberRegister EnumRegister )
type RegisterValue ¶
type RegisterValue struct {
// contains filtered or unexported fields
}
func (RegisterValue) DeviceName ¶
func (v RegisterValue) DeviceName() string
func (RegisterValue) Register ¶
func (v RegisterValue) Register() Register
type Subscription ¶
type Subscription struct {
// contains filtered or unexported fields
}
func (*Subscription) GetOutput ¶
func (s *Subscription) GetOutput() <-chan Value
func (*Subscription) Shutdown ¶
func (s *Subscription) Shutdown()
type TextRegisterStruct ¶
type TextRegisterStruct struct {
RegisterStruct
}
func CreateTextRegisterStruct ¶
func CreateTextRegisterStruct(category, name, description string, address uint16, static bool) TextRegisterStruct
func (TextRegisterStruct) Type ¶
func (r TextRegisterStruct) Type() RegisterType
func (TextRegisterStruct) Unit ¶
func (r TextRegisterStruct) Unit() *string
type TextRegisterValue ¶
type TextRegisterValue struct { RegisterValue // contains filtered or unexported fields }
func NewTextRegisterValue ¶
func NewTextRegisterValue(deviceName string, register Register, value string) TextRegisterValue
func (TextRegisterValue) Equals ¶
func (v TextRegisterValue) Equals(comp Value) bool
func (TextRegisterValue) String ¶
func (v TextRegisterValue) String() string
func (TextRegisterValue) Value ¶
func (v TextRegisterValue) Value() string
type ValueStorageInstance ¶
type ValueStorageInstance struct {
// contains filtered or unexported fields
}
func ValueStorageCreate ¶
func ValueStorageCreate() (valueStorageInstance *ValueStorageInstance)
func (*ValueStorageInstance) Drain ¶
func (instance *ValueStorageInstance) Drain() Subscription
func (*ValueStorageInstance) Fill ¶
func (instance *ValueStorageInstance) Fill(input <-chan Value)
this is a simple fan-in routine which copies all inputs to the same NewValue channel
func (*ValueStorageInstance) GetSlice ¶
func (instance *ValueStorageInstance) GetSlice(filter Filter) (result []Value)
func (*ValueStorageInstance) GetState ¶
func (instance *ValueStorageInstance) GetState(filter Filter) State
func (*ValueStorageInstance) Shutdown ¶
func (instance *ValueStorageInstance) Shutdown()
func (*ValueStorageInstance) Subscribe ¶
func (instance *ValueStorageInstance) Subscribe(filter Filter) Subscription
Click to show internal directories.
Click to hide internal directories.