Documentation ¶
Index ¶
- func NewEval(store ostore.IObjectStore) *eval
- func ReadScenario(source string) (*spec.ScenarioDoc, error)
- type ActionHandler
- type Engine
- func (e *Engine) GetInterface(ifaceId string) *spec.InterfaceEntry
- func (e *Engine) GetProperties(symbol string) (map[string]any, error)
- func (e *Engine) HasInterface(ifaceId string) bool
- func (e *Engine) HasSequence(name string) bool
- func (e *Engine) InvokeOperation(ifaceId string, opName string, args []any) (any, error)
- func (e *Engine) LoadScenario(source string, doc *spec.ScenarioDoc) error
- func (e *Engine) PlayAllSequences(ctx context.Context) error
- func (e *Engine) PlaySequence(ctx context.Context, name string) error
- func (e *Engine) SetProperties(symbol string, props map[string]any) error
- func (e *Engine) StopAllSequences()
- func (e *Engine) StopSequence(name string)
- func (a *Engine) UnloadScenario(source string) error
- type PlayFrame
- type Player
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewEval ¶ added in v0.6.0
func NewEval(store ostore.IObjectStore) *eval
func ReadScenario ¶ added in v0.6.0
func ReadScenario(source string) (*spec.ScenarioDoc, error)
ReadScenario reads a scenario from file.
Types ¶
type ActionHandler ¶ added in v0.6.0
type Engine ¶
type Engine struct { core.EventNotifier // contains filtered or unexported fields }
func NewEngine ¶ added in v0.6.0
func NewEngine(store ostore.IObjectStore) *Engine
func (*Engine) GetInterface ¶ added in v0.6.0
func (e *Engine) GetInterface(ifaceId string) *spec.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(source string, doc *spec.ScenarioDoc) error
func (*Engine) PlayAllSequences ¶ added in v0.8.0
func (*Engine) PlaySequence ¶ added in v0.6.0
func (*Engine) SetProperties ¶ added in v0.6.0
SetProperties sets the properties of the interface.
func (*Engine) StopAllSequences ¶ added in v0.8.0
func (e *Engine) StopAllSequences()
func (*Engine) StopSequence ¶ added in v0.8.0
func (*Engine) UnloadScenario ¶ added in v0.8.0
type PlayFrame ¶ added in v0.8.0
type PlayFrame struct { Action spec.ActionEntry Interface *spec.InterfaceEntry }
type Player ¶ added in v0.8.0
type Player struct { sync.RWMutex StepC chan *spec.ActionListEntry FramesC chan PlayFrame // contains filtered or unexported fields }
Player is a player for one sequence It plays the sequence and sends the actions to the stream The stream is closed when the sequence is finished Actions are evaluated in the context of an interface
func NewPlayer ¶ added in v0.8.0
func NewPlayer(iface *spec.InterfaceEntry, seq *spec.SequenceEntry) *Player
func (*Player) SequenceName ¶ added in v0.8.0
Click to show internal directories.
Click to hide internal directories.