controlling

package
v0.0.0-...-7ff6187 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

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

Controller responsible for starting and stopping simulations; provisioning and deleting devices from a target application.

func NewController

func NewController(context context.Context, globalConfig *config.GlobalConfig) *Controller

NewController creates a new controller.

func (*Controller) DeleteAllDevices

func (c *Controller) DeleteAllDevices(ctx context.Context, sim *models.Simulation, target *models.SimulationTarget) error

func (*Controller) DeleteDevices

func (c *Controller) DeleteDevices(ctx context.Context, simulation *models.Simulation, target *models.SimulationTarget, model *models.DeviceModel, maxDeviceID int, numDevices int) error

DeleteDevices deletes devices in a target based on the deviceConfig.

func (*Controller) GetConnectedDeviceCount

func (c *Controller) GetConnectedDeviceCount(simulation *models.Simulation, modelId string) int

GetConnectedDeviceCount returns the number of devices connected for the given simulation and model

func (*Controller) GetMetricsStatus

func (c *Controller) GetMetricsStatus(ctx context.Context) models.MetricsStatus

func (*Controller) ProvisionDevices

func (c *Controller) ProvisionDevices(ctx context.Context, simulation *models.Simulation, target *models.SimulationTarget, model *models.DeviceModel, maxDeviceID int, numDevices int) error

ProvisionDevices provisions devices in a target based on the deviceConfig.

func (*Controller) ResetSimulationStatus

func (c *Controller) ResetSimulationStatus() error

ResetSimulationStatus resets all simulation status to stopped

func (*Controller) StartSimulation

func (c *Controller) StartSimulation(simulation *models.Simulation) error

StartSimulation starts a simulation.

func (*Controller) StopSimulation

func (c *Controller) StopSimulation(simulation *models.Simulation) error

StopSimulation stops a simulation.

Jump to

Keyboard shortcuts

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