features

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: 7 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DeviceClassification

type DeviceClassification struct {
	*Feature
}

func NewDeviceClassification

func NewDeviceClassification(
	localEntity spineapi.EntityLocalInterface,
	remoteEntity spineapi.EntityRemoteInterface) (*DeviceClassification, error)

Get a new DeviceClassification features helper

- The feature on the local entity has to be of role client - The feature on the remote entity has to be of role server

func (*DeviceClassification) GetManufacturerDetails

get the current manufacturer details for a remote device entity

func (*DeviceClassification) RequestManufacturerDetails added in v0.2.0

func (d *DeviceClassification) RequestManufacturerDetails() (*model.MsgCounterType, error)

request DeviceClassificationManufacturerData from a remote device entity

type DeviceConfiguration

type DeviceConfiguration struct {
	*Feature
}

func NewDeviceConfiguration

func NewDeviceConfiguration(
	localEntity spineapi.EntityLocalInterface,
	remoteEntity spineapi.EntityRemoteInterface) (*DeviceConfiguration, error)

Get a new DeviceConfiguration features helper

- The feature on the local entity has to be of role client - The feature on the remote entity has to be of role server

func (*DeviceConfiguration) GetDescriptionForKeyId added in v0.2.0

returns the description of a provided key name

func (*DeviceConfiguration) GetDescriptionForKeyName added in v0.2.0

returns the description of a provided key name returns an error if the key name was not found

func (*DeviceConfiguration) GetDescriptions added in v0.2.0

return current descriptions for Device Configuration

func (*DeviceConfiguration) GetKeyValueForKeyName added in v0.2.0

return a pointer value for a given key and value type

func (*DeviceConfiguration) GetKeyValues added in v0.2.0

return current values for Device Configuration

func (*DeviceConfiguration) RequestDescriptions added in v0.2.0

func (d *DeviceConfiguration) RequestDescriptions() (*model.MsgCounterType, error)

request DeviceConfiguration data from a remote entity

func (*DeviceConfiguration) RequestKeyValues added in v0.2.0

func (d *DeviceConfiguration) RequestKeyValues() (*model.MsgCounterType, error)

request DeviceConfigurationKeyValueListDataType from a remote entity

func (*DeviceConfiguration) WriteKeyValues added in v0.5.0

write key values returns an error if this failed

type DeviceDiagnosis

type DeviceDiagnosis struct {
	*Feature
}

func NewDeviceDiagnosis

func NewDeviceDiagnosis(
	localEntity spineapi.EntityLocalInterface,
	remoteEntity spineapi.EntityRemoteInterface) (*DeviceDiagnosis, error)

Get a new DeviceDiagnosis features helper

- The feature on the local entity has to be of role client - The feature on the remote entity has to be of role server

func (*DeviceDiagnosis) GetState

get the current diagnosis state for an device entity

func (*DeviceDiagnosis) IsHeartbeatWithinDuration added in v0.5.0

func (d *DeviceDiagnosis) IsHeartbeatWithinDuration(duration time.Duration) bool

check if the currently available heartbeat data is within a time duration

func (*DeviceDiagnosis) RequestHeartbeat added in v0.5.0

func (d *DeviceDiagnosis) RequestHeartbeat() (*model.MsgCounterType, error)

request FunctionTypeDeviceDiagnosisHeartbeatData from a remote device

func (*DeviceDiagnosis) RequestState added in v0.2.0

func (d *DeviceDiagnosis) RequestState() (*model.MsgCounterType, error)

request DeviceDiagnosisStateData from a remote entity

func (*DeviceDiagnosis) SetLocalState added in v0.5.0

func (d *DeviceDiagnosis) SetLocalState(operatingState *model.DeviceDiagnosisStateDataType)

type ElectricalConnection

type ElectricalConnection struct {
	*Feature
}

func NewElectricalConnection

func NewElectricalConnection(
	localEntity spineapi.EntityLocalInterface,
	remoteEntity spineapi.EntityRemoteInterface) (*ElectricalConnection, error)

Get a new ElectricalConnection features helper

- The feature on the local entity has to be of role client - The feature on the remote entity has to be of role server

func (*ElectricalConnection) AdjustValueToBeWithinPermittedValuesForParameter added in v0.2.0

func (e *ElectricalConnection) AdjustValueToBeWithinPermittedValuesForParameter(value float64, parameterId model.ElectricalConnectionParameterIdType) float64

Adjust a value to be within the permitted value range

func (*ElectricalConnection) GetCharacteristicForContextType added in v0.5.0

return characteristics for a Electrical Connections

func (*ElectricalConnection) GetCharacteristics added in v0.5.0

return characteristics for a Electrical Connections

func (*ElectricalConnection) GetDescriptionForMeasurementId added in v0.2.0

func (e *ElectricalConnection) GetDescriptionForMeasurementId(measurementId model.MeasurementIdType) (*model.ElectricalConnectionDescriptionDataType, error)

return current electrical description for a given measurementId

func (*ElectricalConnection) GetDescriptions added in v0.2.0

return list of description for Electrical Connection

func (*ElectricalConnection) GetLimitsForParameterId added in v0.2.0

func (e *ElectricalConnection) GetLimitsForParameterId(parameterId model.ElectricalConnectionParameterIdType) (float64, float64, float64, error)

returns minimum, maximum, default/pause limit values

func (*ElectricalConnection) GetParameterDescriptionForMeasuredPhase added in v0.2.0

return parameter description for a specific measurementId

func (*ElectricalConnection) GetParameterDescriptionForMeasurementId added in v0.2.0

func (e *ElectricalConnection) GetParameterDescriptionForMeasurementId(measurementId model.MeasurementIdType) (*model.ElectricalConnectionParameterDescriptionDataType, error)

return parameter description for a specific measurementId

func (*ElectricalConnection) GetParameterDescriptionForParameterId added in v0.2.0

return parameter description for a specific parameterId

func (*ElectricalConnection) GetParameterDescriptionForScopeType added in v0.5.0

func (e *ElectricalConnection) GetParameterDescriptionForScopeType(scope model.ScopeTypeType) (*model.ElectricalConnectionParameterDescriptionDataType, error)

return parameter description for a specific scope

func (*ElectricalConnection) GetParameterDescriptions added in v0.2.0

return parameter descriptions for all Electrical Connections

func (*ElectricalConnection) GetPermittedValueSetForMeasurementId added in v0.2.0

func (e *ElectricalConnection) GetPermittedValueSetForMeasurementId(measurementId model.MeasurementIdType) (*model.ElectricalConnectionPermittedValueSetDataType, error)

return permitted valueset for a provided measuremnetId

func (*ElectricalConnection) GetPermittedValueSetForParameterId added in v0.2.0

return permitted valueset for a provided measuremnetId

func (*ElectricalConnection) GetPermittedValueSets added in v0.2.0

return permitted values for all Electrical Connections

func (*ElectricalConnection) RequestCharacteristics added in v0.5.0

func (e *ElectricalConnection) RequestCharacteristics() (*model.MsgCounterType, error)

request FunctionTypeElectricalConnectionCharacteristicListData from a remote entity

func (*ElectricalConnection) RequestDescriptions added in v0.2.0

func (e *ElectricalConnection) RequestDescriptions() (*model.MsgCounterType, error)

request ElectricalConnectionDescriptionListDataType from a remote entity

func (*ElectricalConnection) RequestParameterDescriptions added in v0.2.0

func (e *ElectricalConnection) RequestParameterDescriptions() (*model.MsgCounterType, error)

request FunctionTypeElectricalConnectionParameterDescriptionListData from a remote entity

func (*ElectricalConnection) RequestPermittedValueSets added in v0.2.0

func (e *ElectricalConnection) RequestPermittedValueSets() (*model.MsgCounterType, error)

request FunctionTypeElectricalConnectionPermittedValueSetListData from a remote entity

type Feature

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

func NewFeature added in v0.5.0

func NewFeature(
	featureType model.FeatureTypeType,
	localEntity spineapi.EntityLocalInterface,
	remoteEntity spineapi.EntityRemoteInterface) (*Feature, error)

func (*Feature) AddResponseCallback added in v0.5.0

func (f *Feature) AddResponseCallback(
	msgCounterReference model.MsgCounterType,
	function func(msg spineapi.ResponseMessage)) error

add a callback function to be invoked once a result to a msgCounter came in

func (*Feature) AddResultCallback added in v0.5.0

func (f *Feature) AddResultCallback(function func(msg spineapi.ResponseMessage))

add a callback function to be invoked once a result came in

func (*Feature) Bind added in v0.5.0

func (f *Feature) Bind() (*model.MsgCounterType, error)

bind to the feature of the entity

func (*Feature) HasBinding added in v0.5.0

func (f *Feature) HasBinding() bool

check if there is a binding to the remote feature

func (*Feature) HasSubscription added in v0.5.0

func (f *Feature) HasSubscription() bool

check if there is a subscription to the remote feature

func (*Feature) Subscribe added in v0.5.0

func (f *Feature) Subscribe() (*model.MsgCounterType, error)

subscribe to the feature of the entity

func (*Feature) Unbind added in v0.5.0

func (f *Feature) Unbind() (*model.MsgCounterType, error)

remove a binding to the feature of the entity

func (*Feature) Unsubscribe added in v0.5.0

func (f *Feature) Unsubscribe() (*model.MsgCounterType, error)

unssubscribe to the feature of the entity

type FeatureInterface added in v0.5.0

type FeatureInterface interface {
	// check if there is a subscription to the remote feature
	HasSubscription() bool

	// subscribe to the feature of the entity
	Subscribe() (*model.MsgCounterType, error)

	// check if there is a binding to the remote feature
	HasBinding() bool

	// bind to the feature of the entity
	Bind() (*model.MsgCounterType, error)

	// add a callback function to be invoked once a result or reply message for a msgCounter came in
	AddResponseCallback(msgCounterReference model.MsgCounterType, function func(msg api.ResponseMessage)) error

	// add a callback function to be invoked once a result came in
	AddResultCallback(function func(msg api.ResponseMessage))
}

Feature interface were the local feature role is client and the remote feature role is server

type Identification

type Identification struct {
	*Feature
}

func NewIdentification

func NewIdentification(
	localEntity spineapi.EntityLocalInterface,
	remoteEntity spineapi.EntityRemoteInterface) (*Identification, error)

Get a new Identification features helper

- The feature on the local entity has to be of role client - The feature on the remote entity has to be of role server

func (*Identification) GetValues

func (i *Identification) GetValues() ([]model.IdentificationDataType, error)

return current values for Identification

func (*Identification) RequestValues added in v0.2.0

func (i *Identification) RequestValues() (*model.MsgCounterType, error)

request FunctionTypeIdentificationListData from a remote entity

type IncentiveTable

type IncentiveTable struct {
	*Feature
}

func NewIncentiveTable

func NewIncentiveTable(
	localEntity spineapi.EntityLocalInterface,
	remoteEntity spineapi.EntityRemoteInterface) (*IncentiveTable, error)

Get a new IncentiveTable features helper

- The feature on the local entity has to be of role client - The feature on the remote entity has to be of role server

func (*IncentiveTable) GetConstraints added in v0.2.0

func (i *IncentiveTable) GetConstraints() ([]model.IncentiveTableConstraintsType, error)

return list of constraints

func (*IncentiveTable) GetDescriptions added in v0.2.0

func (i *IncentiveTable) GetDescriptions() ([]model.IncentiveTableDescriptionType, error)

return list of descriptions

func (*IncentiveTable) GetDescriptionsForScope added in v0.2.0

func (i *IncentiveTable) GetDescriptionsForScope(scope model.ScopeTypeType) ([]model.IncentiveTableDescriptionType, error)

return list of descriptions

func (*IncentiveTable) GetValues added in v0.2.0

func (i *IncentiveTable) GetValues() ([]model.IncentiveTableType, error)

return current values for Time Series

func (*IncentiveTable) RequestConstraints

func (i *IncentiveTable) RequestConstraints() (*model.MsgCounterType, error)

request FunctionTypeIncentiveTableConstraintsData from a remote entity

func (*IncentiveTable) RequestDescriptions added in v0.2.0

func (i *IncentiveTable) RequestDescriptions() (*model.MsgCounterType, error)

request FunctionTypeIncentiveTableDescriptionData from a remote entity

func (*IncentiveTable) RequestValues

func (i *IncentiveTable) RequestValues() (*model.MsgCounterType, error)

request FunctionTypeIncentiveTableData from a remote entity

func (*IncentiveTable) WriteDescriptions added in v0.2.0

write incentivetable descriptions returns an error if this failed

func (*IncentiveTable) WriteValues added in v0.2.0

func (i *IncentiveTable) WriteValues(data []model.IncentiveTableType) (*model.MsgCounterType, error)

write incentivetable descriptions returns an error if this failed

type LoadControl

type LoadControl struct {
	*Feature
}

func NewLoadControl

func NewLoadControl(
	localEntity spineapi.EntityLocalInterface,
	remoteEntity spineapi.EntityRemoteInterface) (*LoadControl, error)

Get a new LoadControl features helper

- The feature on the local entity has to be of role client - The feature on the remote entity has to be of role server

func (*LoadControl) GetLimitDescriptions added in v0.2.0

func (l *LoadControl) GetLimitDescriptions() ([]model.LoadControlLimitDescriptionDataType, error)

returns the load control limit descriptions returns an error if no description data is available yet

func (*LoadControl) GetLimitDescriptionsForCategory added in v0.2.0

func (l *LoadControl) GetLimitDescriptionsForCategory(category model.LoadControlCategoryType) ([]model.LoadControlLimitDescriptionDataType, error)

returns the load control limit descriptions of a provided category returns an error if no description data for the category is available

func (*LoadControl) GetLimitDescriptionsForMeasurementId added in v0.2.0

func (l *LoadControl) GetLimitDescriptionsForMeasurementId(measurementId model.MeasurementIdType) ([]model.LoadControlLimitDescriptionDataType, error)

returns the load control limit descriptions for a provided measurementId returns an error if no description data for the measurementId is available

func (*LoadControl) GetLimitDescriptionsForTypeCategoryDirectionScope added in v0.5.0

func (l *LoadControl) GetLimitDescriptionsForTypeCategoryDirectionScope(
	limitType model.LoadControlLimitTypeType,
	limitCategory model.LoadControlCategoryType,
	limitDirection model.EnergyDirectionType,
	scope model.ScopeTypeType,
) ([]model.LoadControlLimitDescriptionDataType, error)

returns the load control limit descriptions of a provided type, direction and scope returns an error if no description data for the category is available

providing an empty string for any of the params, will ignore the value in the request

func (*LoadControl) GetLimitValueForLimitId added in v0.2.0

func (l *LoadControl) GetLimitValueForLimitId(limitId model.LoadControlLimitIdType) (*model.LoadControlLimitDataType, error)

return limit values

func (*LoadControl) GetLimitValues

func (l *LoadControl) GetLimitValues() ([]model.LoadControlLimitDataType, error)

return limit data

func (*LoadControl) RequestLimitConstraints

func (l *LoadControl) RequestLimitConstraints() (*model.MsgCounterType, error)

request FunctionTypeLoadControlLimitConstraintsListData from a remote device

func (*LoadControl) RequestLimitDescriptions added in v0.2.0

func (l *LoadControl) RequestLimitDescriptions() (*model.MsgCounterType, error)

request FunctionTypeLoadControlLimitDescriptionListData from a remote device

func (*LoadControl) RequestLimitValues added in v0.2.0

func (l *LoadControl) RequestLimitValues() (*model.MsgCounterType, error)

request FunctionTypeLoadControlLimitListData from a remote device

func (*LoadControl) WriteLimitValues

func (l *LoadControl) WriteLimitValues(data []model.LoadControlLimitDataType) (*model.MsgCounterType, error)

write load control limits returns an error if this failed

type Measurement

type Measurement struct {
	*Feature
}

func NewMeasurement

func NewMeasurement(
	localEntity spineapi.EntityLocalInterface,
	remoteEntity spineapi.EntityRemoteInterface) (*Measurement, error)

Get a new Measurement features helper

- The feature on the local entity has to be of role client - The feature on the remote entity has to be of role server

func (*Measurement) GetConstraints

func (m *Measurement) GetConstraints() ([]model.MeasurementConstraintsDataType, error)

return measurement constraints

func (*Measurement) GetDescriptionForMeasurementId added in v0.2.0

func (m *Measurement) GetDescriptionForMeasurementId(measurementId model.MeasurementIdType) (*model.MeasurementDescriptionDataType, error)

return current electrical description for a given measurementId

func (*Measurement) GetDescriptions added in v0.2.0

func (m *Measurement) GetDescriptions() ([]model.MeasurementDescriptionDataType, error)

return list of descriptions

func (*Measurement) GetDescriptionsForScope added in v0.2.0

func (m *Measurement) GetDescriptionsForScope(scope model.ScopeTypeType) ([]model.MeasurementDescriptionDataType, error)

return a list of MeasurementDescriptionDataType for a given scope

func (*Measurement) GetValueForMeasurementId added in v0.5.0

func (m *Measurement) GetValueForMeasurementId(id model.MeasurementIdType) (float64, error)

return current values of a measurementId

if nothing is found, it will return an error

func (*Measurement) GetValues

func (m *Measurement) GetValues() ([]model.MeasurementDataType, error)

return current values for measurements

func (*Measurement) GetValuesForTypeCommodityScope added in v0.2.0

func (m *Measurement) GetValuesForTypeCommodityScope(measurement model.MeasurementTypeType, commodity model.CommodityTypeType, scope model.ScopeTypeType) ([]model.MeasurementDataType, error)

return current values of a defined measurementType, commodityType and scopeType

if nothing is found, it will return an error

func (*Measurement) RequestConstraints

func (m *Measurement) RequestConstraints() (*model.MsgCounterType, error)

request FunctionTypeMeasurementConstraintsListData from a remote entity

func (*Measurement) RequestDescriptions added in v0.2.0

func (m *Measurement) RequestDescriptions() (*model.MsgCounterType, error)

request FunctionTypeMeasurementDescriptionListData from a remote device

func (*Measurement) RequestValues added in v0.2.0

func (m *Measurement) RequestValues() (*model.MsgCounterType, error)

request FunctionTypeMeasurementListData from a remote entity

type SmartEnergyManagementPs added in v0.5.0

type SmartEnergyManagementPs struct {
	*Feature
}

func NewSmartEnergyManagementPs added in v0.5.0

func NewSmartEnergyManagementPs(
	localEntity spineapi.EntityLocalInterface,
	remoteEntity spineapi.EntityRemoteInterface) (*SmartEnergyManagementPs, error)

Get a new Identification features helper

- The feature on the local entity has to be of role client - The feature on the remote entity has to be of role server

func (*SmartEnergyManagementPs) GetValues added in v0.5.0

return current values for FunctionTypeSmartEnergyManagementPsData

func (*SmartEnergyManagementPs) RequestValues added in v0.5.0

func (i *SmartEnergyManagementPs) RequestValues() (*model.MsgCounterType, error)

request FunctionTypeSmartEnergyManagementPsData from a remote entity

func (*SmartEnergyManagementPs) WriteValues added in v0.5.0

write SmartEnergyManagementPsData returns an error if this failed

type TimeSeries

type TimeSeries struct {
	*Feature
}

func NewTimeSeries

func NewTimeSeries(
	localEntity spineapi.EntityLocalInterface,
	remoteEntity spineapi.EntityRemoteInterface) (*TimeSeries, error)

Get a new TimeSeries features helper

- The feature on the local entity has to be of role client - The feature on the remote entity has to be of role server

func (*TimeSeries) GetConstraints added in v0.2.0

func (t *TimeSeries) GetConstraints() ([]model.TimeSeriesConstraintsDataType, error)

return current constraints for Time Series

func (*TimeSeries) GetDescriptionForId added in v0.2.0

func (*TimeSeries) GetDescriptionForType added in v0.2.0

func (t *TimeSeries) GetDescriptionForType(timeSeriesType model.TimeSeriesTypeType) (*model.TimeSeriesDescriptionDataType, error)

func (*TimeSeries) GetDescriptions added in v0.2.0

func (t *TimeSeries) GetDescriptions() ([]model.TimeSeriesDescriptionDataType, error)

return list of descriptions

func (*TimeSeries) GetValueForType added in v0.2.0

func (t *TimeSeries) GetValueForType(timeSeriesType model.TimeSeriesTypeType) (*model.TimeSeriesDataType, error)

return current value for a given TimeSeriesType there can only be one item matching the type

func (*TimeSeries) GetValues

func (t *TimeSeries) GetValues() ([]model.TimeSeriesDataType, error)

return current values for Time Series

func (*TimeSeries) RequestConstraints

func (t *TimeSeries) RequestConstraints() (*model.MsgCounterType, error)

request FunctionTypeTimeSeriesConstraintsListData from a remote entity

func (*TimeSeries) RequestDescriptions added in v0.2.0

func (t *TimeSeries) RequestDescriptions() (*model.MsgCounterType, error)

request FunctionTypeTimeSeriesDescriptionListData from a remote entity

func (*TimeSeries) RequestValues added in v0.2.0

func (t *TimeSeries) RequestValues() (*model.MsgCounterType, error)

request FunctionTypeTimeSeriesListData from a remote device

func (*TimeSeries) WriteValues added in v0.2.0

func (t *TimeSeries) WriteValues(data []model.TimeSeriesDataType) (*model.MsgCounterType, error)

write Time Series values returns an error if this failed

Jump to

Keyboard shortcuts

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