Documentation ¶
Index ¶
- Constants
- type Unit
- func (c *Unit) GetConfig() string
- func (c *Unit) GetConfigMeta() string
- func (c *Unit) GetItem(name string) (common_interfaces.ItemValue, error)
- func (c *Unit) GetItemsOfUnit(unitId string) ([]common_interfaces.ItemGetUnitItems, error)
- func (c *Unit) GetValue(name string) string
- func (c *Unit) IDataStorage() common_interfaces.IDataStorage
- func (c *Unit) Id() string
- func (c *Unit) IsStarted() bool
- func (c *Unit) LogError(value string)
- func (c *Unit) LogInfo(value string)
- func (c *Unit) MainItem() string
- func (c *Unit) Name() string
- func (c *Unit) SetConfig(config string)
- func (c *Unit) SetError(value string)
- func (c *Unit) SetFloat64(name string, value float64, UOM string, precision int)
- func (c *Unit) SetIUnit(iUnit common_interfaces.IUnit)
- func (c *Unit) SetId(id string)
- func (c *Unit) SetInt(name string, value int, UOM string)
- func (c *Unit) SetInt16(name string, value int16, UOM string)
- func (c *Unit) SetInt32(name string, value int32, UOM string)
- func (c *Unit) SetInt64(name string, value int64, UOM string)
- func (c *Unit) SetMainItem(mainItem string)
- func (c *Unit) SetName(unitName string)
- func (c *Unit) SetString(name string, value string, UOM string)
- func (c *Unit) SetStringService(name string, value string, UOM string)
- func (c *Unit) SetType(unitType string)
- func (c *Unit) SetUInt16(name string, value uint16, UOM string)
- func (c *Unit) SetUInt32(name string, value uint32, UOM string)
- func (c *Unit) SetUInt64(name string, value uint64, UOM string)
- func (c *Unit) Start(iDataStorage common_interfaces.IDataStorage) error
- func (c *Unit) Stop()
- func (c *Unit) TouchItem(name string)
- func (c *Unit) Type() string
- type UnitConfigItem
- type UnitInfo
- type UnitType
Constants ¶
View Source
const ( UnitServicePrefix = ".service/" ItemNameError = "error" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Unit ¶
func (*Unit) GetConfigMeta ¶
func (*Unit) GetItemsOfUnit ¶
func (c *Unit) GetItemsOfUnit(unitId string) ([]common_interfaces.ItemGetUnitItems, error)
func (*Unit) IDataStorage ¶ added in v1.0.6
func (c *Unit) IDataStorage() common_interfaces.IDataStorage
func (*Unit) SetFloat64 ¶
func (*Unit) SetIUnit ¶
func (c *Unit) SetIUnit(iUnit common_interfaces.IUnit)
func (*Unit) SetMainItem ¶
func (*Unit) SetStringService ¶
func (*Unit) Start ¶
func (c *Unit) Start(iDataStorage common_interfaces.IDataStorage) error
type UnitConfigItem ¶
type UnitConfigItem struct { Name string `json:"name"` DisplayName string `json:"display_name"` Type string `json:"type"` MinValue string `json:"min_value"` MaxValue string `json:"max_value"` Format string `json:"format"` Children []*UnitConfigItem `json:"children"` DefaultValue string `json:"default_value"` ItemIsDisplayName bool `json:"item_is_display_name"` }
func LoadUnitConfigItems ¶
func LoadUnitConfigItems(data string) []*UnitConfigItem
func NewUnitConfigItem ¶
func (*UnitConfigItem) Add ¶
func (c *UnitConfigItem) Add(name string, displayName string, defaultValue string, tp string, minValue string, maxValue string, format string) *UnitConfigItem
func (*UnitConfigItem) Marshal ¶
func (c *UnitConfigItem) Marshal() string
Click to show internal directories.
Click to hide internal directories.