Documentation
¶
Index ¶
- type Coordinator
- type Processor
- type ProcessorStub
- type Root
- func (this *Root) Advance(input *RootTimeArg, output *RootTimeArg) error
- func (this *Root) ComputeOutput(input *RootTimeArg, ouput *RootTimeArg) error
- func (this *Root) GetTN(input *RootTimeArg, output *RootTimeArg) error
- func (this *Root) Init(input *RootTimeArg, output *RootTimeArg) error
- func (this *Root) PutMessage(input *RootMessageArg, output *RootTimeArg) error
- func (receiver *Root) RPCSimulate(input *RootTimeArg, output *RootTimeArg) error
- func (receiver *Root) Serve(endpoint string)
- func (receiver *Root) Setup()
- func (receiver *Root) Simulate(delay time.Duration, stepsCallback func(t uint64))
- func (receiver *Root) Step() uint64
- type RootMessageArg
- type RootTimeArg
- type Simulator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Coordinator ¶
type Coordinator struct {
// contains filtered or unexported fields
}
func NewCoordinator ¶
func NewCoordinator(devs modeling.Coupled, parent Processor) *Coordinator
func (*Coordinator) Advance ¶
func (receiver *Coordinator) Advance(t uint64)
func (*Coordinator) ComputeOutput ¶
func (receiver *Coordinator) ComputeOutput(t uint64)
func (*Coordinator) GetTN ¶
func (receiver *Coordinator) GetTN() uint64
func (*Coordinator) Init ¶
func (receiver *Coordinator) Init(t uint64)
func (*Coordinator) PutMessage ¶
func (receiver *Coordinator) PutMessage(message modeling.Message, t uint64)
type ProcessorStub ¶
type ProcessorStub struct {
// contains filtered or unexported fields
}
func NewProcessorStub ¶
func NewProcessorStub(endpoint string) *ProcessorStub
func (*ProcessorStub) Advance ¶
func (this *ProcessorStub) Advance(t uint64)
func (*ProcessorStub) ComputeOutput ¶
func (this *ProcessorStub) ComputeOutput(t uint64)
func (*ProcessorStub) GetTN ¶
func (this *ProcessorStub) GetTN() uint64
func (*ProcessorStub) Init ¶
func (this *ProcessorStub) Init(t uint64)
func (*ProcessorStub) PutMessage ¶
func (this *ProcessorStub) PutMessage(message modeling.Message, t uint64)
type Root ¶
type Root struct {
// contains filtered or unexported fields
}
func (*Root) Advance ¶
func (this *Root) Advance(input *RootTimeArg, output *RootTimeArg) error
func (*Root) ComputeOutput ¶
func (this *Root) ComputeOutput(input *RootTimeArg, ouput *RootTimeArg) error
func (*Root) GetTN ¶
func (this *Root) GetTN(input *RootTimeArg, output *RootTimeArg) error
func (*Root) Init ¶
func (this *Root) Init(input *RootTimeArg, output *RootTimeArg) error
func (*Root) PutMessage ¶
func (this *Root) PutMessage(input *RootMessageArg, output *RootTimeArg) error
func (*Root) RPCSimulate ¶
func (receiver *Root) RPCSimulate(input *RootTimeArg, output *RootTimeArg) error
type RootMessageArg ¶
type RootTimeArg ¶
type RootTimeArg struct {
T uint64
}
type Simulator ¶
type Simulator struct {
// contains filtered or unexported fields
}
* 模型是抽象的,但是仿真器和协调器是具体,这就能实现,只实现一套调度代码
func (*Simulator) ComputeOutput ¶
Click to show internal directories.
Click to hide internal directories.