Documentation ¶
Index ¶
- type Controller
- func (c *Controller) DeleteAllDevices(ctx context.Context, sim *models.Simulation, target *models.SimulationTarget) error
- func (c *Controller) DeleteDevices(ctx context.Context, simulation *models.Simulation, ...) error
- func (c *Controller) GetConnectedDeviceCount(simulation *models.Simulation, modelId string) int
- func (c *Controller) GetMetricsStatus(ctx context.Context) models.MetricsStatus
- func (c *Controller) ProvisionDevices(ctx context.Context, simulation *models.Simulation, ...) error
- func (c *Controller) ResetSimulationStatus() error
- func (c *Controller) StartSimulation(simulation *models.Simulation) error
- func (c *Controller) StopSimulation(simulation *models.Simulation) error
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.
Click to show internal directories.
Click to hide internal directories.