Documentation ¶
Index ¶
Constants ¶
View Source
const ( EventSimulationStart ProgramEventType = "simulation.start" EventSimulationStop ProgramEventType = "simulation.stop" EventCall APIEventType = "call" EventResponse APIEventType = "response" EventSignal APIEventType = "signal" EventPropertySet APIEventType = "property.set" EventPropertyChanged APIEventType = "property.changed" )
Variables ¶
View Source
var ApiEventEmitter = make(chan APIEvent)
View Source
var ErrorEventEmitter = make(chan ErrorEvent)
View Source
var ProgramEventEmitter = make(chan ProgramEvent)
Functions ¶
Types ¶
type APIEventType ¶
type APIEventType string
type ErrorEvent ¶
type ProgramEvent ¶
type ProgramEvent struct { Type APIEventType `json:"type"` Message string `json:"message"` }
type ProgramEventType ¶
type ProgramEventType string
type Simulation ¶
type Simulation struct { *core.MultiEngine // contains filtered or unexported fields }
Simulate runs one or more simulation scenarios. To unload a scenario call the Stop operation with the scenario name. To stop all scenarios call the StopAll operation. A scenario can simulation properties, operations and signals using static values or scripted behavior. The scripted behavior can be either triggered by a call or by a script entry All results are send out via the event channel.
func NewSimulation ¶
func NewSimulation() *Simulation
func (*Simulation) LoadScenario ¶ added in v0.6.0
func (s *Simulation) LoadScenario(source string, doc *spec.ScenarioDoc) error
func (*Simulation) LoadScript ¶ added in v0.6.0
func (s *Simulation) LoadScript(source string, script string) error
func (*Simulation) Stop ¶ added in v0.8.0
func (s *Simulation) Stop()
func (*Simulation) UnloadScenario ¶ added in v0.8.0
func (s *Simulation) UnloadScenario(source string) error
Click to show internal directories.
Click to hide internal directories.