Documentation ¶
Index ¶
- func NewFromConfig(log *util.Logger, other map[string]interface{}) (api.Circuit, error)
- func Root() api.Circuit
- type Circuit
- func (c *Circuit) GetChargePower() float64
- func (c *Circuit) GetMaxCurrent() float64
- func (c *Circuit) GetMaxPhaseCurrent() float64
- func (c *Circuit) GetMaxPower() float64
- func (c *Circuit) GetParent() api.Circuit
- func (c *Circuit) GetTitle() string
- func (c *Circuit) HasMeter() bool
- func (c *Circuit) RegisterChild(child api.Circuit)
- func (c *Circuit) SetMaxCurrent(current float64)
- func (c *Circuit) SetMaxPower(power float64)
- func (c *Circuit) SetTitle(title string)
- func (c *Circuit) Update(loadpoints []api.CircuitLoad) (err error)
- func (c *Circuit) ValidateCurrent(old, new float64) float64
- func (c *Circuit) ValidatePower(old, new float64) float64
- func (c *Circuit) Wrap(parent api.Circuit) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewFromConfig ¶
NewFromConfig creates a new Circuit
Types ¶
type Circuit ¶
type Circuit struct {
// contains filtered or unexported fields
}
the circuit instances to control the load
func New ¶
func New(log *util.Logger, title string, maxCurrent, maxPower float64, meter api.Meter, timeout time.Duration) (*Circuit, error)
New creates a circuit
func (*Circuit) GetChargePower ¶
GetChargePower returns the actual power
func (*Circuit) GetMaxCurrent ¶
GetMaxCurrent returns the max current setting
func (*Circuit) GetMaxPhaseCurrent ¶
GetMaxPhaseCurrent returns the actual current
func (*Circuit) GetMaxPower ¶
GetMaxPower returns the max power setting
func (*Circuit) RegisterChild ¶
RegisterChild registers child circuit
func (*Circuit) SetMaxCurrent ¶
SetMaxCurrent sets the max current
func (*Circuit) SetMaxPower ¶
SetMaxPower sets the max power
func (*Circuit) ValidateCurrent ¶
ValidateCurrent validates current request
func (*Circuit) ValidatePower ¶
ValidatePower validates power request
Click to show internal directories.
Click to hide internal directories.