internal

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2026 License: MIT Imports: 10 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigurationWriteRequiresApproval added in v0.8.0

func ConfigurationWriteRequiresApproval(msg *spineapi.Message, localEntity spineapi.EntityLocalInterface, configsToApprove map[model.DeviceConfigurationKeyNameType]struct{}) (bool, error)

Check if an incoming device configuration write requires write approval, if yes return `true` otherwise `false`

func Deref

func Deref(v *string) string

func GetElectricalConnectionId added in v0.8.0

func GetElectricalConnectionId(localEntity spineapi.EntityLocalInterface) model.ElectricalConnectionIdType

GetElectricalConnectionId returns the ElectricalConnectionId for the AC Consume electrical connection

func GetParameterIdForACPowerTotalMeasurement added in v0.8.0

func GetParameterIdForACPowerTotalMeasurement(localEntity spineapi.EntityLocalInterface,
	electricalConnectionId model.ElectricalConnectionIdType,
	measurementId model.MeasurementIdType) model.ElectricalConnectionParameterIdType

GetParameterIdForACPowerTotalMeasurement returns the ParameterId for the AC Power Total measurement on the specified electrical connection

func GetPowerTotalMeasurementId added in v0.8.0

func GetPowerTotalMeasurementId(localEntity spineapi.EntityLocalInterface) model.MeasurementIdType

GetPowerTotalMeasurementId returns the MeasurementId for the AC Power Total measurement

func GroupPendingDeviceConfigurations added in v0.8.0

func GroupPendingDeviceConfigurations(pendingDeviceConfigs map[model.MsgCounterType]*spineapi.Message, localEntity spineapi.EntityLocalInterface) map[model.MsgCounterType][]ucapi.PendingDeviceConfiguration

Extract the device configuration writes from each pending message and return them grouped in a map by msgCounter

func IsDeviceConnected

func IsDeviceConnected(payload spineapi.EventPayload) bool

func IsDeviceDisconnected

func IsDeviceDisconnected(payload spineapi.EventPayload) bool

func IsEntityAdded added in v0.8.0

func IsEntityAdded(payload spineapi.EventPayload) bool

func IsEntityRemoved added in v0.8.0

func IsEntityRemoved(payload spineapi.EventPayload) bool

func IsHeartbeat

func IsHeartbeat(payload spineapi.EventPayload) bool

IsHeartbeat checks if the given payload represents a heartbeat event. It returns true if the payload is a heartbeat event, and false otherwise.

func LoadControlLimits

func LoadControlLimits(
	localEntity spineapi.EntityLocalInterface,
	remoteEntity spineapi.EntityRemoteInterface,
	filter model.LoadControlLimitDescriptionDataType,
) (limits []ucapi.LoadLimitsPhase, resultErr error)

return the current loadcontrol limits for a categoriy

possible errors:

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

Notes:

  • If a limit of phase is not active, the value returned is set to the maximum permitted value (if available), otherwise the phase value is not returned
  • If at least one phase value is available, no error is returned

func ManufacturerData

return the current manufacturer data for a entity

possible errors:

  • ErrNoCompatibleEntity if entity is not compatible
  • and others

func MeasurementPhaseSpecificDataForFilter

func MeasurementPhaseSpecificDataForFilter(
	localEntity spineapi.EntityLocalInterface,
	remoteEntity spineapi.EntityRemoteInterface,
	measurementFilter model.MeasurementDescriptionDataType,
	energyDirection model.EnergyDirectionType,
	validPhaseNameTypes []model.ElectricalConnectionPhaseNameType,
) (map[model.ElectricalConnectionPhaseNameType]float64, error)

return the phase specific measurement data

func WriteLoadControlLimit

func WriteLoadControlLimit(
	localEntity spineapi.EntityLocalInterface,
	remoteEntity spineapi.EntityRemoteInterface,
	filter model.LoadControlLimitDescriptionDataType,
	limit ucapi.LoadLimit,
	resultCB func(result model.ResultDataType, msgCounter model.MsgCounterType),
) (*model.MsgCounterType, error)

generic helper to be used in UCLPC & UCLPP send new LoadControlLimit to the remote entity

parameters:

  • limits: a set of limits for a given limit category containing phase specific limit data
  • resultCB: callback function for handling the result response

func WriteLoadControlPhaseLimits

func WriteLoadControlPhaseLimits(
	localEntity spineapi.EntityLocalInterface,
	remoteEntity spineapi.EntityRemoteInterface,
	filter model.LoadControlLimitDescriptionDataType,
	limits []ucapi.LoadLimitsPhase,
	resultCB func(result model.ResultDataType, msgCounter model.MsgCounterType),
) (*model.MsgCounterType, error)

generic helper to be used in UCOPEV & UCOSCEV send new LoadControlLimits to the remote EV

parameters:

  • limits: a set of limits for a given limit category containing phase specific limit data
  • resultCB: callback function for handling the result response

category obligations: Sets a maximum A limit for each phase that the EV may not exceed. Mainly used for implementing overload protection of the site or limiting the maximum charge power of EVs when the EV and EVSE communicate via IEC61851 and with ISO15118 if the EV does not support the Optimization of Self Consumption usecase.

category recommendations: Sets a recommended charge power in A for each phase. This is mainly used if the EV and EVSE communicate via ISO15118 to support charging excess solar power. The EV either needs to support the Optimization of Self Consumption usecase or the EVSE needs to be able map the recommendations into oligation limits which then works for all EVs communication either via IEC61851 or ISO15118.

notes:

  • For obligations to work for optimizing solar excess power, the EV needs to have an energy demand.
  • Recommendations work even if the EV does not have an active energy demand, given it communicated with the EVSE via ISO15118 and supports the usecase.
  • In ISO15118-2 the usecase is only supported via VAS extensions which are vendor specific and needs to have specific EVSE support for the specific EV brand.
  • In ISO15118-20 this is a standard feature which does not need special support on the EVSE.
  • Min power data is only provided via IEC61851 or using VAS in ISO15118-2.

Types

This section is empty.

Jump to

Keyboard shortcuts

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