Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MqttPort ¶
type MqttPort interface { Connect(ctx context.Context, logger *zap.SugaredLogger, cfg *utils.Config) *autopaho.ConnectionManager Close(cancel context.CancelFunc, logger *zap.SugaredLogger) Publish(ctx context.Context, cm *autopaho.ConnectionManager, logger *zap.SugaredLogger, msgPayloads map[string]json.RawMessage, qos byte, retain bool) }
type PgPort ¶
type PgPort interface { // BuildPowerGenerators returns a slice of power-generators of length nb. BuildPowerGenerators(pGenerators []models.Generator, cfg *utils.Config, nb int) // BuildPGMessagePayloads returns a map contains the power-generator general info // (identification infos) with the corresponding topic. BuildPGMessagePayloads(sim *services.SimService, pg *models.Generator, logger *zap.SugaredLogger) map[string]json.RawMessage // Update used to generate/update the power-generator tags message payload. // it returns a map contains the pg topics with corresponding message payloads. Update(sim *services.SimService, pg *models.Generator, logger *zap.SugaredLogger) map[string]json.RawMessage }
PgPort describes a service that generates power-generator data to be published to an MQTT Broker.
Click to show internal directories.
Click to hide internal directories.