modeling

package
v0.0.0-...-d2dbc3a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 27, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	INFINITE uint64 = 0x7FFFFFFFFFFFFFFF
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AbstractAtomic

type AbstractAtomic struct {
	Sigma uint64 // 当前状态保持的时间
	State string // 当前状态
	// contains filtered or unexported fields
}

func (*AbstractAtomic) HoldIn

func (receiver *AbstractAtomic) HoldIn(state string, t uint64)

func (*AbstractAtomic) Init

func (receiver *AbstractAtomic) Init()

func (AbstractAtomic) MakeContent

func (receiver AbstractAtomic) MakeContent(outPort string, data interface{}) *Content

func (AbstractAtomic) Name

func (receiver AbstractAtomic) Name() string

func (*AbstractAtomic) On

func (receiver *AbstractAtomic) On(e uint64, message Message)

func (*AbstractAtomic) Out

func (receiver *AbstractAtomic) Out() (message Message)

func (*AbstractAtomic) SetName

func (receiver *AbstractAtomic) SetName(name string)

func (AbstractAtomic) Ta

func (receiver AbstractAtomic) Ta() uint64

type AbstractCoupled

type AbstractCoupled struct {
	// contains filtered or unexported fields
}

func (*AbstractCoupled) AddComponent

func (receiver *AbstractCoupled) AddComponent(entity Entity)

func (*AbstractCoupled) AddCoupling

func (receiver *AbstractCoupled) AddCoupling(from Entity, fromPort string, to Entity, toPort string)

func (*AbstractCoupled) GetComponentMap

func (receiver *AbstractCoupled) GetComponentMap() map[string]Entity

func (*AbstractCoupled) GetComponents

func (receiver *AbstractCoupled) GetComponents() []Entity

func (*AbstractCoupled) GetCoupling

func (receiver *AbstractCoupled) GetCoupling(from Entity, fromPort string) (results []Pair)

func (AbstractCoupled) Name

func (receiver AbstractCoupled) Name() string

func (*AbstractCoupled) SetName

func (receiver *AbstractCoupled) SetName(name string)

type Atomic

type Atomic interface {
	Entity
	Init()
	On(e uint64, message Message)
	Out() Message
	Ta() uint64
}

type Content

type Content struct {
	Source     string
	SourcePort string
	Target     string
	TargetPort string
	Payload    interface{}
}

type Coupled

type Coupled interface {
	Entity
	AddComponent(entity Entity)
	AddCoupling(from Entity, fromPort string, to Entity, toPort string)
	GetComponents() []Entity
	GetComponentMap() map[string]Entity
	GetCoupling(from Entity, port string) []Pair
}

type Entity

type Entity interface {
	Name() string
}

type EntityRemote

type EntityRemote struct {
	// contains filtered or unexported fields
}

func NewEntityRemote

func NewEntityRemote(name string, endpoint string) *EntityRemote

func (EntityRemote) EndPoint

func (receiver EntityRemote) EndPoint() string

func (EntityRemote) Name

func (receiver EntityRemote) Name() string

type Message

type Message struct {
	Contents []Content `json:"Contents"`
}

func NewMessage

func NewMessage() *Message

func (*Message) Add

func (receiver *Message) Add(message Message)

* 添加多个消息

func (*Message) AddContent

func (receiver *Message) AddContent(content Content)

* 添加一个消息

func (*Message) Clear

func (receiver *Message) Clear()

* 清空消息包

func (*Message) GetContents

func (receiver *Message) GetContents() []Content

* 添加一个消息

func (Message) IsEmpty

func (receiver Message) IsEmpty() bool

* 消息包是否为空

type Pair

type Pair struct {
	Component Entity
	Port      string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL