Documentation ¶
Index ¶
- func MakeSymbol(typ, member string) string
- func SplitSymbol(symbol string) (string, string)
- type EventNotifier
- func (n *EventNotifier) EmitCall(ifaceId string, opName string, args []any)
- func (n *EventNotifier) EmitCallError(symbol string, name string, err error)
- func (n *EventNotifier) EmitError(err error)
- func (n *EventNotifier) EmitEvent(e *SimuEvent)
- func (n *EventNotifier) EmitPropertyChanged(ifaceId string, propName string, value any)
- func (n *EventNotifier) EmitPropertySet(ifaceId string, kwargs map[string]any)
- func (n *EventNotifier) EmitReply(ifaceId string, opName string, value any)
- func (n *EventNotifier) EmitSignal(ifaceId string, signName string, args []any)
- func (n *EventNotifier) EmitSimuStart(name string)
- func (n *EventNotifier) EmitSimuStop(name string)
- func (n *EventNotifier) OnEvent(f OnEventFunc)
- type IEngine
- type INotifier
- 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 []any) (any, error)
- func (e *MultiEngine) PlayAllSequences(ctx context.Context) error
- func (e *MultiEngine) PlaySequence(ctx context.Context, sequenceId string) error
- func (e *MultiEngine) SetProperties(ifaceId string, props map[string]any) error
- func (e *MultiEngine) StopAllSequences()
- func (e *MultiEngine) StopSequence(sequenceId string) error
- type OnEventFunc
- type SimuEvent
- type SimuEventType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakeSymbol ¶
func SplitSymbol ¶
Types ¶
type EventNotifier ¶ added in v0.19.0
type EventNotifier struct {
// contains filtered or unexported fields
}
func (*EventNotifier) EmitCall ¶ added in v0.19.0
func (n *EventNotifier) EmitCall(ifaceId string, opName string, args []any)
func (*EventNotifier) EmitCallError ¶ added in v0.20.0
func (n *EventNotifier) EmitCallError(symbol string, name string, err error)
func (*EventNotifier) EmitError ¶ added in v0.19.0
func (n *EventNotifier) EmitError(err error)
func (*EventNotifier) EmitEvent ¶ added in v0.19.0
func (n *EventNotifier) EmitEvent(e *SimuEvent)
func (*EventNotifier) EmitPropertyChanged ¶ added in v0.19.0
func (n *EventNotifier) EmitPropertyChanged(ifaceId string, propName string, value any)
func (*EventNotifier) EmitPropertySet ¶ added in v0.19.0
func (n *EventNotifier) EmitPropertySet(ifaceId string, kwargs map[string]any)
func (*EventNotifier) EmitReply ¶ added in v0.19.0
func (n *EventNotifier) EmitReply(ifaceId string, opName string, value any)
func (*EventNotifier) EmitSignal ¶ added in v0.19.0
func (n *EventNotifier) EmitSignal(ifaceId string, signName string, args []any)
func (*EventNotifier) EmitSimuStart ¶ added in v0.19.0
func (n *EventNotifier) EmitSimuStart(name string)
func (*EventNotifier) EmitSimuStop ¶ added in v0.19.0
func (n *EventNotifier) EmitSimuStop(name string)
func (*EventNotifier) OnEvent ¶ added in v0.19.0
func (n *EventNotifier) OnEvent(f OnEventFunc)
type IEngine ¶
type IEngine interface { INotifier HasInterface(symbol string) bool InvokeOperation(symbol string, name string, args []any) (any, error) SetProperties(symbol string, params map[string]any) error GetProperties(symbol string) (map[string]any, error) HasSequence(name string) bool PlaySequence(ctx context.Context, name string) error StopSequence(name string) error PlayAllSequences(ctx context.Context) error StopAllSequences() }
IEngine is the interface for the simulation engine.
type INotifier ¶ added in v0.19.0
type INotifier interface { OnEvent(f OnEventFunc) EmitEvent(e *SimuEvent) }
type MultiEngine ¶
type MultiEngine struct { EventNotifier // 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 ¶
InvokeOperation invokes the operation of the interface.
func (*MultiEngine) PlayAllSequences ¶ added in v0.8.0
func (e *MultiEngine) PlayAllSequences(ctx context.Context) error
func (*MultiEngine) PlaySequence ¶
func (e *MultiEngine) PlaySequence(ctx context.Context, 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) error
type OnEventFunc ¶ added in v0.19.0
type OnEventFunc func(event *SimuEvent)
type SimuEventType ¶ added in v0.19.0
type SimuEventType string
const ( EventSimuStart SimuEventType = "start" EventSimuStop SimuEventType = "stop" EventCall SimuEventType = "call" EventReply SimuEventType = "response" EventSignal SimuEventType = "signal" EventPropertySet SimuEventType = "set" EventPropertyChanged SimuEventType = "changed" EventError SimuEventType = "error" )
Click to show internal directories.
Click to hide internal directories.