Documentation ¶
Index ¶
- Constants
- type UCMCPInterface
- type UCMPC
- func (e *UCMPC) AddFeatures()
- func (e *UCMPC) AddUseCase()
- func (e *UCMPC) CurrentPerPhase(entity spineapi.EntityRemoteInterface) ([]float64, error)
- func (e *UCMPC) EnergyConsumed(entity spineapi.EntityRemoteInterface) (float64, error)
- func (e *UCMPC) EnergyProduced(entity spineapi.EntityRemoteInterface) (float64, error)
- func (e *UCMPC) Frequency(entity spineapi.EntityRemoteInterface) (float64, error)
- func (e *UCMPC) HandleEvent(payload spineapi.EventPayload)
- func (e *UCMPC) IsUseCaseSupported(entity spineapi.EntityRemoteInterface) (bool, error)
- func (e *UCMPC) Power(entity spineapi.EntityRemoteInterface) (float64, error)
- func (e *UCMPC) PowerPerPhase(entity spineapi.EntityRemoteInterface) ([]float64, error)
- func (e *UCMPC) UpdateUseCaseAvailability(available bool)
- func (c *UCMPC) UseCaseName() model.UseCaseNameType
- func (e *UCMPC) VoltagePerPhase(entity spineapi.EntityRemoteInterface) ([]float64, error)
Constants ¶
View Source
const ( // Total momentary active power consumption or production // // Use `Power` to get the current data // // Use Case MCP, Scenario 1 DataUpdatePower api.EventType = "DataUpdatePower" // Phase specific momentary active power consumption or production // // Use `PowerPerPhase` to get the current data // // Use Case MCP, Scenario 1 DataUpdatePowerPerPhase api.EventType = "DataUpdatePowerPerPhase" // Total energy consumed // // Use `EnergyConsumed` to get the current data // // Use Case MCP, Scenario 2 DataUpdateEnergyConsumed api.EventType = "DataUpdateEnergyConsumed" // Total energy produced // // Use `EnergyProduced` to get the current data // // Use Case MCP, Scenario 2 DataUpdateEnergyProduced api.EventType = "DataUpdateEnergyProduced" // Phase specific momentary current consumption or production // // Use `CurrentPerPhase` to get the current data // // Use Case MCP, Scenario 3 DataUpdateCurrentsPerPhase api.EventType = "DataUpdateCurrentsPerPhase" // Phase specific voltage // // Use `VoltagePerPhase` to get the current data // // Use Case MCP, Scenario 3 DataUpdateVoltagePerPhase api.EventType = "DataUpdateVoltagePerPhase" // Power network frequency data updated // // Use `Frequency` to get the current data // // Use Case MCP, Scenario 3 DataUpdateFrequency api.EventType = "DataUpdateFrequency" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type UCMCPInterface ¶
type UCMCPInterface interface { api.UseCaseInterface // return the momentary active power consumption or production // // parameters: // - entity: the entity of the device (e.g. EVSE) // // possible errors: // - ErrDataNotAvailable if no such limit is (yet) available // - and others Power(entity spineapi.EntityRemoteInterface) (float64, error) // return the momentary active phase specific power consumption or production per phase // // parameters: // - entity: the entity of the device (e.g. EVSE) // // possible errors: // - ErrDataNotAvailable if no such limit is (yet) available // - and others PowerPerPhase(entity spineapi.EntityRemoteInterface) ([]float64, error) // return the total consumption energy // // parameters: // - entity: the entity of the device (e.g. EVSE) // // - positive values are used for consumption EnergyConsumed(entity spineapi.EntityRemoteInterface) (float64, error) // return the total feed in energy // // parameters: // - entity: the entity of the device (e.g. EVSE) // // return values: // - negative values are used for production EnergyProduced(entity spineapi.EntityRemoteInterface) (float64, error) // return the momentary phase specific current consumption or production // // parameters: // - entity: the entity of the device (e.g. EVSE) // // return values // - positive values are used for consumption // - negative values are used for production CurrentPerPhase(entity spineapi.EntityRemoteInterface) ([]float64, error) // return the phase specific voltage details // // parameters: // - entity: the entity of the device (e.g. EVSE) VoltagePerPhase(entity spineapi.EntityRemoteInterface) ([]float64, error) // return frequency // // parameters: // - entity: the entity of the device (e.g. EVSE) Frequency(entity spineapi.EntityRemoteInterface) (float64, error) }
interface for the Monitoring of Power Consumption UseCase
type UCMPC ¶
type UCMPC struct {
// contains filtered or unexported fields
}
func NewUCMPC ¶
func NewUCMPC(service eebusapi.ServiceInterface, eventCB api.EntityEventCallback) *UCMPC
func (*UCMPC) AddFeatures ¶
func (e *UCMPC) AddFeatures()
func (*UCMPC) AddUseCase ¶
func (e *UCMPC) AddUseCase()
func (*UCMPC) CurrentPerPhase ¶
func (e *UCMPC) CurrentPerPhase(entity spineapi.EntityRemoteInterface) ([]float64, error)
return the momentary phase specific current consumption or production
- positive values are used for consumption
- negative values are used for production
func (*UCMPC) EnergyConsumed ¶
func (e *UCMPC) EnergyConsumed(entity spineapi.EntityRemoteInterface) (float64, error)
return the total consumption energy
- positive values are used for consumption
func (*UCMPC) EnergyProduced ¶
func (e *UCMPC) EnergyProduced(entity spineapi.EntityRemoteInterface) (float64, error)
return the total feed in energy
- negative values are used for production
func (*UCMPC) Frequency ¶
func (e *UCMPC) Frequency(entity spineapi.EntityRemoteInterface) (float64, error)
return frequency
func (*UCMPC) HandleEvent ¶
func (e *UCMPC) HandleEvent(payload spineapi.EventPayload)
handle SPINE events
func (*UCMPC) IsUseCaseSupported ¶
func (e *UCMPC) 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 (*UCMPC) Power ¶
func (e *UCMPC) Power(entity spineapi.EntityRemoteInterface) (float64, error)
return the momentary active power consumption or production
possible errors:
- ErrDataNotAvailable if no such limit is (yet) available
- and others
func (*UCMPC) PowerPerPhase ¶
func (e *UCMPC) PowerPerPhase(entity spineapi.EntityRemoteInterface) ([]float64, error)
return the momentary active phase specific power consumption or production per phase
possible errors:
- ErrDataNotAvailable if no such limit is (yet) available
- and others
func (*UCMPC) UpdateUseCaseAvailability ¶
func (*UCMPC) UseCaseName ¶
func (c *UCMPC) UseCaseName() model.UseCaseNameType
func (*UCMPC) VoltagePerPhase ¶
func (e *UCMPC) VoltagePerPhase(entity spineapi.EntityRemoteInterface) ([]float64, error)
return the phase specific voltage details
Click to show internal directories.
Click to hide internal directories.