Documentation
¶
Index ¶
- type UnitType
- type UnitsSystem
- func (c *UnitsSystem) AddUnit(unitType string, unitId string, name string, config string) (common_interfaces.IUnit, error)
- func (c *UnitsSystem) GetConfig(unitId string) (string, string, string, string, error)
- func (c *UnitsSystem) GetConfigByType(unitType string) (string, string, error)
- func (c *UnitsSystem) GetUnitName(unitId string) (string, error)
- func (c *UnitsSystem) GetUnitState(unitId string) (nodeinterface.UnitStateResponse, error)
- func (c *UnitsSystem) GetUnitStateAll() (nodeinterface.UnitStateAllResponse, error)
- func (c *UnitsSystem) ListOfUnits() nodeinterface.UnitListResponse
- func (c *UnitsSystem) MakeUnitByType(unitType string, dataStorage common_interfaces.IDataStorage) common_interfaces.IUnit
- func (c *UnitsSystem) RegisterUnit(typeName string, category string, displayName string, ...) *UnitType
- func (c *UnitsSystem) RemoveUnits(units []string) error
- func (c *UnitsSystem) SetConfig(unitId string, name string, config string) error
- func (c *UnitsSystem) Start()
- func (c *UnitsSystem) StartUnit(unitId string) error
- func (c *UnitsSystem) Stop()
- func (c *UnitsSystem) StopUnit(unitId string) error
- func (c *UnitsSystem) UnitCategories() nodeinterface.UnitTypeCategoriesResponse
- func (c *UnitsSystem) UnitTypeForDisplayByType(t string) string
- func (c *UnitsSystem) UnitTypes() []nodeinterface.UnitTypeListResponseItem
- func (c *UnitsSystem) Units() []units_common.UnitInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type UnitType ¶
type UnitType struct {
TypeCode string `json:"type_code"`
Category string `json:"category"`
DisplayName string `json:"display_name"`
Help string `json:"help"`
Description string `json:"description"`
Picture []byte `json:"picture"`
ConfigMeta string `json:"config_meta"`
Constructor func() common_interfaces.IUnit
}
type UnitsSystem ¶
type UnitsSystem struct {
// contains filtered or unexported fields
}
func New ¶
func New(iDataStorage common_interfaces.IDataStorage) *UnitsSystem
func (*UnitsSystem) AddUnit ¶
func (c *UnitsSystem) AddUnit(unitType string, unitId string, name string, config string) (common_interfaces.IUnit, error)
func (*UnitsSystem) GetConfigByType ¶
func (c *UnitsSystem) GetConfigByType(unitType string) (string, string, error)
func (*UnitsSystem) GetUnitName ¶
func (c *UnitsSystem) GetUnitName(unitId string) (string, error)
func (*UnitsSystem) GetUnitState ¶
func (c *UnitsSystem) GetUnitState(unitId string) (nodeinterface.UnitStateResponse, error)
func (*UnitsSystem) GetUnitStateAll ¶ added in v1.0.6
func (c *UnitsSystem) GetUnitStateAll() (nodeinterface.UnitStateAllResponse, error)
func (*UnitsSystem) ListOfUnits ¶
func (c *UnitsSystem) ListOfUnits() nodeinterface.UnitListResponse
func (*UnitsSystem) MakeUnitByType ¶
func (c *UnitsSystem) MakeUnitByType(unitType string, dataStorage common_interfaces.IDataStorage) common_interfaces.IUnit
func (*UnitsSystem) RegisterUnit ¶
func (c *UnitsSystem) RegisterUnit(typeName string, category string, displayName string, constructor func() common_interfaces.IUnit, imgBytes []byte, description string) *UnitType
func (*UnitsSystem) RemoveUnits ¶
func (c *UnitsSystem) RemoveUnits(units []string) error
func (*UnitsSystem) SetConfig ¶
func (c *UnitsSystem) SetConfig(unitId string, name string, config string) error
func (*UnitsSystem) Start ¶
func (c *UnitsSystem) Start()
func (*UnitsSystem) StartUnit ¶
func (c *UnitsSystem) StartUnit(unitId string) error
func (*UnitsSystem) Stop ¶
func (c *UnitsSystem) Stop()
func (*UnitsSystem) StopUnit ¶
func (c *UnitsSystem) StopUnit(unitId string) error
func (*UnitsSystem) UnitCategories ¶
func (c *UnitsSystem) UnitCategories() nodeinterface.UnitTypeCategoriesResponse
func (*UnitsSystem) UnitTypeForDisplayByType ¶
func (c *UnitsSystem) UnitTypeForDisplayByType(t string) string
func (*UnitsSystem) UnitTypes ¶
func (c *UnitsSystem) UnitTypes() []nodeinterface.UnitTypeListResponseItem
func (*UnitsSystem) Units ¶
func (c *UnitsSystem) Units() []units_common.UnitInfo
Click to show internal directories.
Click to hide internal directories.