Documentation
¶
Index ¶
- func NewEval() *eval
- type ActionEntry
- type ActionHandler
- type ActionListEntry
- type Engine
- func (e *Engine) GetInterface(ifaceId string) *InterfaceEntry
- func (e *Engine) GetProperties(symbol string) (core.KWArgs, error)
- func (e *Engine) HasInterface(ifaceId string) bool
- func (e *Engine) HasSequence(sequencerId string) bool
- func (e *Engine) InvokeOperation(symbol string, name string, args core.KWArgs) (any, error)
- func (e *Engine) LoadScenario(doc *ScenarioDoc) error
- func (e *Engine) PlaySequence(sequencerId string)
- func (e *Engine) SetProperties(symbol string, props core.KWArgs) error
- type InterfaceEntry
- type ScenarioDoc
- type SequenceEntry
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ActionEntry ¶ added in v0.6.0
ActionEntry represents an action in an operation or sequence.
type ActionHandler ¶ added in v0.6.0
type ActionListEntry ¶ added in v0.6.0
type ActionListEntry struct {
Name string `json:"name" yaml:"name"`
Description string `json:"description" yaml:"description"`
Actions []ActionEntry `json:"actions" yaml:"actions"`
}
ActionListEntry represents a list of actions
type Engine ¶
func (*Engine) GetInterface ¶ added in v0.6.0
func (e *Engine) GetInterface(ifaceId string) *InterfaceEntry
func (*Engine) GetProperties ¶ added in v0.6.0
FetchProperties returns a copy of the properties of the interface.
func (*Engine) HasInterface ¶ added in v0.6.0
func (*Engine) HasSequence ¶ added in v0.6.0
func (*Engine) InvokeOperation ¶ added in v0.6.0
InvokeOperation invokes a operation of the interface.
func (*Engine) LoadScenario ¶ added in v0.6.0
func (e *Engine) LoadScenario(doc *ScenarioDoc) error
func (*Engine) PlaySequence ¶ added in v0.6.0
type InterfaceEntry ¶ added in v0.6.0
type InterfaceEntry struct {
Name string `json:"name" yaml:"name"`
Description string `json:"description" yaml:"description"`
Properties map[string]any `json:"properties" yaml:"properties"`
Operations []*ActionListEntry `json:"operations" yaml:"operations"`
}
InterfaceEntry represents an interface in a scenario.
func (InterfaceEntry) GetOperation ¶ added in v0.6.0
func (e InterfaceEntry) GetOperation(name string) *ActionListEntry
GetOperation returns the operation entry with the given name.
type ScenarioDoc ¶ added in v0.6.0
type ScenarioDoc struct {
Schema string `json:"schema" yaml:"schema"`
Name string `json:"name" yaml:"name"`
Description string `json:"description" yaml:"description"`
Version string `json:"version" yaml:"version"`
Interfaces []*InterfaceEntry `json:"interfaces" yaml:"interfaces"`
Sequences []*SequenceEntry `json:"sequences" yaml:"sequences"`
}
ScenarioDoc is a scenario document as part of a simulation.
func ReadScenario ¶ added in v0.6.0
func ReadScenario(fn string) (*ScenarioDoc, error)
ReadScenario reads a scenario from file.
func (*ScenarioDoc) GetInterface ¶ added in v0.6.0
func (s *ScenarioDoc) GetInterface(name string) *InterfaceEntry
GetInterface returns the interface entry with the given name.
func (*ScenarioDoc) GetSequence ¶ added in v0.6.0
func (s *ScenarioDoc) GetSequence(name string) *SequenceEntry
GetSequence returns the sequence entry with the given name.
type SequenceEntry ¶ added in v0.6.0
type SequenceEntry struct {
Name string `json:"name" yaml:"name"`
DefaultInterface string `json:"interface" yaml:"interface"`
Description string `json:"description" yaml:"description"`
Interval int `json:"interval" yaml:"interval"`
Repeat int `json:"repeat" yaml:"repeat"`
Steps []*ActionListEntry `json:"steps" yaml:"steps"`
}
SequenceEntry represents a sequence in a scenario.
Click to show internal directories.
Click to hide internal directories.