util

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: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrDeviceDisconnected = errors.New("device is disconnected")

Functions

func Deref added in v0.5.0

func Deref(v *string) string

func DeviceClassification added in v0.5.0

func DeviceClassification(service eebusapi.ServiceInterface, remoteEntity api.EntityRemoteInterface) (*features.DeviceClassification, error)

func DeviceConfiguration added in v0.5.0

func DeviceConfiguration(service eebusapi.ServiceInterface, remoteEntity api.EntityRemoteInterface) (*features.DeviceConfiguration, error)

func DeviceConfigurationCheckDataPayloadForKeyName added in v0.5.0

func DeviceConfigurationCheckDataPayloadForKeyName(localServer bool, service eebusapi.ServiceInterface,
	payload spineapi.EventPayload, keyName model.DeviceConfigurationKeyNameType) bool

func DeviceDiagnosis added in v0.5.0

func DeviceDiagnosis(service eebusapi.ServiceInterface, remoteEntity api.EntityRemoteInterface) (*features.DeviceDiagnosis, error)

func DeviceDiagnosisServer added in v0.5.0

func DeviceDiagnosisServer(service eebusapi.ServiceInterface, remoteEntity api.EntityRemoteInterface) (*features.DeviceDiagnosis, error)

func ElectricalConnection added in v0.5.0

func ElectricalConnection(service eebusapi.ServiceInterface, remoteEntity api.EntityRemoteInterface) (*features.ElectricalConnection, error)

func GetLocalDeviceConfigurationDescriptionForKeyName added in v0.5.0

func GetLocalDeviceConfigurationDescriptionForKeyName(
	service eebusapi.ServiceInterface,
	keyName model.DeviceConfigurationKeyNameType,
) (description *model.DeviceConfigurationKeyValueDescriptionDataType)

func GetLocalDeviceConfigurationKeyValueForKeyName added in v0.5.0

func GetLocalDeviceConfigurationKeyValueForKeyName(
	service eebusapi.ServiceInterface,
	keyName model.DeviceConfigurationKeyNameType,
) (keyData model.DeviceConfigurationKeyValueDataType)

func GetLocalLimitDescriptionsForTypeCategoryDirectionScope added in v0.5.0

func GetLocalLimitDescriptionsForTypeCategoryDirectionScope(
	service eebusapi.ServiceInterface,
	limitType model.LoadControlLimitTypeType,
	limitCategory model.LoadControlCategoryType,
	limitDirection model.EnergyDirectionType,
	scopeType model.ScopeTypeType,
) (descriptions []model.LoadControlLimitDescriptionDataType)

func GetLocalLimitValueForLimitId added in v0.5.0

func GetLocalLimitValueForLimitId(
	service eebusapi.ServiceInterface,
	limitId model.LoadControlLimitIdType,
) (value model.LoadControlLimitDataType)

func GetPhaseCurrentLimits added in v0.5.0

func GetPhaseCurrentLimits(
	service eebusapi.ServiceInterface,
	entity spineapi.EntityRemoteInterface,
	entityTypes []model.EntityTypeType) (
	resultMin []float64, resultMax []float64, resultDefault []float64, resultErr error)

func GetValuesForTypeCommodityScope added in v0.5.0

func GetValuesForTypeCommodityScope(
	service eebusapi.ServiceInterface,
	entity spineapi.EntityRemoteInterface,
	measurement model.MeasurementTypeType,
	commodity model.CommodityTypeType,
	scope model.ScopeTypeType) ([]model.MeasurementDataType, error)

func Identification added in v0.5.0

func Identification(service eebusapi.ServiceInterface, remoteEntity api.EntityRemoteInterface) (*features.Identification, error)

func IncentiveTable added in v0.5.0

func IncentiveTable(service eebusapi.ServiceInterface, remoteEntity api.EntityRemoteInterface) (*features.IncentiveTable, error)

func IsCompatibleEntity added in v0.5.0

func IsCompatibleEntity(entity spineapi.EntityRemoteInterface, entityTypes []model.EntityTypeType) bool

func IsDeviceConnected added in v0.5.0

func IsDeviceConnected(payload spineapi.EventPayload) bool

func IsDeviceDisconnected added in v0.5.0

func IsDeviceDisconnected(payload spineapi.EventPayload) bool

func IsEntityConnected added in v0.5.0

func IsEntityConnected(payload spineapi.EventPayload) bool

func IsEntityDisconnected added in v0.5.0

func IsEntityDisconnected(payload spineapi.EventPayload) bool

func LoadControl added in v0.5.0

func LoadControl(service eebusapi.ServiceInterface, remoteEntity api.EntityRemoteInterface) (*features.LoadControl, error)

func LoadControlLimits added in v0.5.0

func LoadControlLimits(
	service eebusapi.ServiceInterface,
	entity spineapi.EntityRemoteInterface,
	entityTypes []model.EntityTypeType,
	limitType model.LoadControlLimitTypeType,
	limitCategory model.LoadControlCategoryType,
	scopeType model.ScopeTypeType) (limits []api.LoadLimitsPhase, resultErr error)

return the current loadcontrol limits for a categoriy

possible errors:

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

func LoadControlLimitsCheckPayloadDataForTypeCategoryDirectionScope added in v0.5.0

func LoadControlLimitsCheckPayloadDataForTypeCategoryDirectionScope(
	localServer bool,
	service eebusapi.ServiceInterface,
	payload spineapi.EventPayload,
	limitType model.LoadControlLimitTypeType,
	limitCategory model.LoadControlCategoryType,
	direction model.EnergyDirectionType,
	scope model.ScopeTypeType) bool

Check the payload data if it contains measurementId values for a given scope

func ManufacturerData added in v0.5.0

func ManufacturerData(service eebusapi.ServiceInterface, entity spineapi.EntityRemoteInterface, entityTypes []model.EntityTypeType) (api.ManufacturerData, error)

return the current manufacturer data for a entity

possible errors:

  • ErrNoCompatibleEntity if entity is not compatible
  • and others

func Measurement added in v0.5.0

func Measurement(service eebusapi.ServiceInterface, remoteEntity api.EntityRemoteInterface) (*features.Measurement, error)

func MeasurementCheckPayloadDataForScope added in v0.5.0

func MeasurementCheckPayloadDataForScope(service eebusapi.ServiceInterface, payload spineapi.EventPayload, scope model.ScopeTypeType) bool

Check the payload data if it contains measurementId values for a given scope

func MeasurementValuesForTypeCommodityScope added in v0.5.0

func MeasurementValuesForTypeCommodityScope(
	service eebusapi.ServiceInterface,
	entity spineapi.EntityRemoteInterface,
	measurementType model.MeasurementTypeType,
	commodityType model.CommodityTypeType,
	scopeType model.ScopeTypeType,
	energyDirection model.EnergyDirectionType,
	validPhaseNameTypes []model.ElectricalConnectionPhaseNameType,
) ([]float64, error)

return the phase specific voltage details

func SetLocalDeviceConfigurationKeyValue added in v0.5.0

func SetLocalDeviceConfigurationKeyValue(
	service eebusapi.ServiceInterface,
	keyName model.DeviceConfigurationKeyNameType,
	changeable bool,
	value model.DeviceConfigurationKeyValueValueType,
) (resultErr error)

func SetLocalElectricalConnectionCharacteristicForContextType added in v0.5.0

func SetLocalElectricalConnectionCharacteristicForContextType(
	service eebusapi.ServiceInterface,
	context model.ElectricalConnectionCharacteristicContextType,
	charType model.ElectricalConnectionCharacteristicTypeType,
	value float64,
) (resultErr error)

func TimeSeries added in v0.5.0

func TimeSeries(service eebusapi.ServiceInterface, remoteEntity api.EntityRemoteInterface) (*features.TimeSeries, error)

func WriteLoadControlLimits added in v0.5.0

func WriteLoadControlLimits(
	service eebusapi.ServiceInterface,
	entity spineapi.EntityRemoteInterface,
	entityTypes []model.EntityTypeType,
	category model.LoadControlCategoryType,
	limits []api.LoadLimitsPhase) (*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

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