lpc

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2024 License: MIT Imports: 12 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// Update of the list of remote entities supporting the Use Case
	//
	// Use `RemoteEntities` to get the current data
	UseCaseSupportUpdate api.EventType = "eg-lpc-UseCaseSupportUpdate"

	// Load control obligation limit data updated
	//
	// Use `ConsumptionLimit` to get the current data
	//
	// Use Case LPC, Scenario 1
	DataUpdateLimit api.EventType = "eg-lpc-DataUpdateLimit"

	// Failsafe limit for the consumed active (real) power of the
	// Controllable System data updated
	//
	// Use `FailsafeConsumptionActivePowerLimit` to get the current data
	//
	// Use Case LPC, Scenario 2
	DataUpdateFailsafeConsumptionActivePowerLimit api.EventType = "eg-lpc-DataUpdateFailsafeConsumptionActivePowerLimit"

	// Minimum time the Controllable System remains in "failsafe state" unless conditions
	// specified in this Use Case permit leaving the "failsafe state" data updated
	//
	// Use `FailsafeDurationMinimum` to get the current data
	//
	// Use Case LPC, Scenario 2
	DataUpdateFailsafeDurationMinimum api.EventType = "eg-lpc-DataUpdateFailsafeDurationMinimum"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type LPC

type LPC struct {
	*usecase.UseCaseBase
}

func NewLPC

func NewLPC(localEntity spineapi.EntityLocalInterface, eventCB api.EntityEventCallback) *LPC

func (*LPC) AddFeatures

func (e *LPC) AddFeatures()

func (*LPC) ConsumptionLimit

func (e *LPC) ConsumptionLimit(entity spineapi.EntityRemoteInterface) (
	limit ucapi.LoadLimit, resultErr error)

return the current loadcontrol limit data

parameters:

  • entity: the entity of the e.g. EVSE

return values:

  • limit: load limit data

possible errors:

  • ErrDataNotAvailable if no such limit is (yet) available
  • and others

func (*LPC) ConsumptionNominalMax added in v0.6.2

func (e *LPC) ConsumptionNominalMax(entity spineapi.EntityRemoteInterface) (float64, error)

return nominal maximum active (real) power the Controllable System is able to consume according to the contract (EMS), device label or data sheet.

func (*LPC) FailsafeConsumptionActivePowerLimit

func (e *LPC) FailsafeConsumptionActivePowerLimit(entity spineapi.EntityRemoteInterface) (float64, error)

return Failsafe limit for the consumed active (real) power of the Controllable System. This limit becomes activated in "init" state or "failsafe state".

func (*LPC) FailsafeDurationMinimum

func (e *LPC) FailsafeDurationMinimum(entity spineapi.EntityRemoteInterface) (time.Duration, error)

return minimum time the Controllable System remains in "failsafe state" unless conditions specified in this Use Case permit leaving the "failsafe state"

func (*LPC) HandleEvent

func (e *LPC) HandleEvent(payload spineapi.EventPayload)

handle SPINE events

func (*LPC) WriteConsumptionLimit

func (e *LPC) WriteConsumptionLimit(
	entity spineapi.EntityRemoteInterface,
	limit ucapi.LoadLimit,
	resultCB func(result model.ResultDataType),
) (*model.MsgCounterType, error)

send new LoadControlLimits

parameters:

  • entity: the entity of the e.g. EVSE
  • limit: load limit data
  • resultCB: callback function for handling the result response

func (*LPC) WriteFailsafeConsumptionActivePowerLimit

func (e *LPC) WriteFailsafeConsumptionActivePowerLimit(entity spineapi.EntityRemoteInterface, value float64) (*model.MsgCounterType, error)

send new Failsafe Consumption Active Power Limit

parameters:

  • entity: the entity of the e.g. EVSE
  • value: the new limit in W

func (*LPC) WriteFailsafeDurationMinimum

func (e *LPC) WriteFailsafeDurationMinimum(entity spineapi.EntityRemoteInterface, duration time.Duration) (*model.MsgCounterType, error)

send new Failsafe Duration Minimum

parameters:

  • entity: the entity of the e.g. EVSE
  • duration: the duration, between 2h and 24h

Jump to

Keyboard shortcuts

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