Documentation ¶
Index ¶
- func MakeSymbol(typ, member string) string
- func SplitSymbol(symbol string) (string, string)
- type IEngine
- type MultiEngine
- func (e *MultiEngine) GetProperties(ifaceId string) (map[string]any, error)
- func (e *MultiEngine) HasInterface(ifaceId string) bool
- func (e *MultiEngine) HasSequence(sequencerId string) bool
- func (e *MultiEngine) InvokeOperation(ifaceId string, name string, args map[string]any) (any, error)
- func (e *MultiEngine) PlayAllSequences() error
- func (e *MultiEngine) PlaySequence(sequenceId string) error
- func (e *MultiEngine) SetProperties(ifaceId string, props map[string]any) error
- func (e *MultiEngine) StopAllSequences()
- func (e *MultiEngine) StopSequence(sequenceId string)
- type Notifier
- type OnChangeFunc
- type OnSignalFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakeSymbol ¶
func SplitSymbol ¶
Types ¶
type IEngine ¶
type IEngine interface { HasInterface(symbol string) bool InvokeOperation(symbol string, name string, params map[string]any) (any, error) SetProperties(symbol string, params map[string]any) error GetProperties(symbol string) (map[string]any, error) HasSequence(name string) bool PlaySequence(name string) error StopSequence(name string) PlayAllSequences() error StopAllSequences() OnChange(f OnChangeFunc) OnSignal(f OnSignalFunc) }
IEngine is the interface for the simulation engine.
type MultiEngine ¶
type MultiEngine struct { Notifier // contains filtered or unexported fields }
func NewMultiEngine ¶
func NewMultiEngine(entries ...IEngine) *MultiEngine
func (*MultiEngine) GetProperties ¶
func (e *MultiEngine) GetProperties(ifaceId string) (map[string]any, error)
FetchProperties fetches the properties of the interface.
func (*MultiEngine) HasInterface ¶
func (e *MultiEngine) HasInterface(ifaceId string) bool
HasInterface returns true if the interface is served by the simulation.
func (*MultiEngine) HasSequence ¶
func (e *MultiEngine) HasSequence(sequencerId string) bool
func (*MultiEngine) InvokeOperation ¶
func (e *MultiEngine) InvokeOperation(ifaceId string, name string, args map[string]any) (any, error)
InvokeOperation invokes the operation of the interface.
func (*MultiEngine) PlayAllSequences ¶ added in v0.8.0
func (e *MultiEngine) PlayAllSequences() error
func (*MultiEngine) PlaySequence ¶
func (e *MultiEngine) PlaySequence(sequenceId string) error
func (*MultiEngine) SetProperties ¶
func (e *MultiEngine) SetProperties(ifaceId string, props map[string]any) error
SetProperties sets the properties of the interface.
func (*MultiEngine) StopAllSequences ¶ added in v0.8.0
func (e *MultiEngine) StopAllSequences()
func (*MultiEngine) StopSequence ¶ added in v0.8.0
func (e *MultiEngine) StopSequence(sequenceId string)
type Notifier ¶
type Notifier struct {
// contains filtered or unexported fields
}
func (*Notifier) EmitOnChange ¶
func (*Notifier) EmitOnSignal ¶
func (*Notifier) OnChange ¶
func (n *Notifier) OnChange(f OnChangeFunc)
func (*Notifier) OnSignal ¶
func (n *Notifier) OnSignal(f OnSignalFunc)
type OnChangeFunc ¶
Click to show internal directories.
Click to hide internal directories.