mpc

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2024 License: MIT Imports: 10 Imported by: 2

Documentation

Index

Constants

View Source
const (
	// Update of the list of remote entites supporting the Use Case
	//
	// Use `RemoteEntities` to get the current data
	UseCaseSupportUpdate api.EventType = "ma-mpc-oscev-UseCaseSupportUpdate"

	// Total momentary active power consumption or production
	//
	// Use `Power` to get the current data
	//
	// Use Case MCP, Scenario 1
	DataUpdatePower api.EventType = "ma-mpc-DataUpdatePower"

	// Phase specific momentary active power consumption or production
	//
	// Use `PowerPerPhase` to get the current data
	//
	// Use Case MCP, Scenario 1
	DataUpdatePowerPerPhase api.EventType = "ma-mpc-DataUpdatePowerPerPhase"

	// Total energy consumed
	//
	// Use `EnergyConsumed` to get the current data
	//
	// Use Case MCP, Scenario 2
	DataUpdateEnergyConsumed api.EventType = "ma-mpc-DataUpdateEnergyConsumed"

	// Total energy produced
	//
	// Use `EnergyProduced` to get the current data
	//
	// Use Case MCP, Scenario 2
	DataUpdateEnergyProduced api.EventType = "ma-mpc-DataUpdateEnergyProduced"

	// Phase specific momentary current consumption or production
	//
	// Use `CurrentPerPhase` to get the current data
	//
	// Use Case MCP, Scenario 3
	DataUpdateCurrentsPerPhase api.EventType = "ma-mpc-DataUpdateCurrentsPerPhase"

	// Phase specific voltage
	//
	// Use `VoltagePerPhase` to get the current data
	//
	// Use Case MCP, Scenario 3
	DataUpdateVoltagePerPhase api.EventType = "ma-mpc-DataUpdateVoltagePerPhase"

	// Power network frequency data updated
	//
	// Use `Frequency` to get the current data
	//
	// Use Case MCP, Scenario 3
	DataUpdateFrequency api.EventType = "ma-mpc-DataUpdateFrequency"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type MPC

type MPC struct {
	*usecase.UseCaseBase
}

func NewMPC

func NewMPC(localEntity spineapi.EntityLocalInterface, eventCB api.EntityEventCallback) *MPC

func (*MPC) AddFeatures

func (e *MPC) AddFeatures()

func (*MPC) CurrentPerPhase

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

func (e *MPC) EnergyConsumed(entity spineapi.EntityRemoteInterface) (float64, error)

return the total consumption energy

  • positive values are used for consumption

func (*MPC) EnergyProduced

func (e *MPC) EnergyProduced(entity spineapi.EntityRemoteInterface) (float64, error)

return the total feed in energy

  • negative values are used for production

func (*MPC) Frequency

func (e *MPC) Frequency(entity spineapi.EntityRemoteInterface) (float64, error)

return frequency

func (*MPC) HandleEvent

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

handle SPINE events

func (*MPC) Power

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

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

func (e *MPC) VoltagePerPhase(entity spineapi.EntityRemoteInterface) ([]float64, error)

return the phase specific voltage details

Jump to

Keyboard shortcuts

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