uclpp

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: May 18, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Load control obligation limit data updated
	//
	// Use `ProductionLimit` to get the current data
	//
	// Use Case LPC, Scenario 1
	DataUpdateLimit api.EventType = "DataUpdateLimit"

	// Failsafe limit for the produced active (real) power of the
	// Controllable System data updated
	//
	// Use `FailsafeProductionActivePowerLimit` to get the current data
	//
	// Use Case LPC, Scenario 2
	DataUpdateFailsafeProductionActivePowerLimit api.EventType = "DataUpdateFailsafeProductionActivePowerLimit"

	// 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 = "DataUpdateFailsafeDurationMinimum"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type UCLPP

type UCLPP struct {
	// contains filtered or unexported fields
}

func NewUCLPP

func NewUCLPP(service eebusapi.ServiceInterface, eventCB api.EntityEventCallback) *UCLPP

func (*UCLPP) AddFeatures

func (e *UCLPP) AddFeatures()

func (*UCLPP) AddUseCase

func (e *UCLPP) AddUseCase()

func (*UCLPP) FailsafeDurationMinimum

func (e *UCLPP) 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 (*UCLPP) FailsafeProductionActivePowerLimit

func (e *UCLPP) FailsafeProductionActivePowerLimit(entity spineapi.EntityRemoteInterface) (float64, error)

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

func (*UCLPP) HandleEvent

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

handle SPINE events

func (*UCLPP) IsUseCaseSupported

func (e *UCLPP) IsUseCaseSupported(entity spineapi.EntityRemoteInterface) (bool, error)

returns if the entity supports the usecase

possible errors:

  • ErrDataNotAvailable if that information is not (yet) available
  • and others

func (*UCLPP) PowerProductionNominalMax

func (e *UCLPP) PowerProductionNominalMax(entity spineapi.EntityRemoteInterface) (float64, error)

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

func (*UCLPP) ProductionLimit

func (e *UCLPP) ProductionLimit(entity spineapi.EntityRemoteInterface) (
	limit api.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 (*UCLPP) UpdateUseCaseAvailability

func (e *UCLPP) UpdateUseCaseAvailability(available bool)

func (*UCLPP) UseCaseName

func (c *UCLPP) UseCaseName() model.UseCaseNameType

func (*UCLPP) WriteFailsafeDurationMinimum

func (e *UCLPP) 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

func (*UCLPP) WriteFailsafeProductionActivePowerLimit

func (e *UCLPP) WriteFailsafeProductionActivePowerLimit(entity spineapi.EntityRemoteInterface, value float64) (*model.MsgCounterType, error)

send new Failsafe Production Active Power Limit

parameters:

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

func (*UCLPP) WriteProductionLimit

func (e *UCLPP) WriteProductionLimit(
	entity spineapi.EntityRemoteInterface,
	limit api.LoadLimit) (*model.MsgCounterType, error)

send new LoadControlLimits

parameters:

  • entity: the entity of the e.g. EVSE
  • limit: load limit data

type UCLPPInterface

type UCLPPInterface interface {
	api.UseCaseInterface

	// return the current production 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
	ProductionLimit(entity spineapi.EntityRemoteInterface) (limit api.LoadLimit, resultErr error)

	// send new LoadControlLimits
	//
	// parameters:
	//   - entity: the entity of the e.g. EVSE
	//   - limit: load limit data
	WriteProductionLimit(entity spineapi.EntityRemoteInterface, limit api.LoadLimit) (*model.MsgCounterType, error)

	// return Failsafe limit for the produced active (real) power of the
	// Controllable System. This limit becomes activated in "init" state or "failsafe state".
	//
	// parameters:
	//   - entity: the entity of the e.g. EVSE
	//
	// return values:
	//   - positive values are used for production
	FailsafeProductionActivePowerLimit(entity spineapi.EntityRemoteInterface) (float64, error)

	// send new Failsafe Production Active Power Limit
	//
	// parameters:
	//   - entity: the entity of the e.g. EVSE
	//   - value: the new limit in W
	WriteFailsafeProductionActivePowerLimit(entity spineapi.EntityRemoteInterface, value float64) (*model.MsgCounterType, error)

	// return minimum time the Controllable System remains in "failsafe state" unless conditions
	// specified in this Use Case permit leaving the "failsafe state"
	//
	// parameters:
	//   - entity: the entity of the e.g. EVSE
	//
	// return values:
	//   - negative values are used for production
	FailsafeDurationMinimum(entity spineapi.EntityRemoteInterface) (time.Duration, error)

	// send new Failsafe Duration Minimum
	//
	// parameters:
	//   - entity: the entity of the e.g. EVSE
	//   - duration: the duration, between 2h and 24h
	WriteFailsafeDurationMinimum(entity spineapi.EntityRemoteInterface, duration time.Duration) (*model.MsgCounterType, error)

	// return nominal maximum active (real) power the Controllable System is
	// able to produce according to the device label or data sheet.
	//
	// parameters:
	//   - entity: the entity of the e.g. EVSE
	PowerProductionNominalMax(entity spineapi.EntityRemoteInterface) (float64, error)
}

interface for the Limitation of Power Production UseCase

Jump to

Keyboard shortcuts

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