Documentation
¶
Index ¶
- Constants
- func FakeWire(ctx model.SimContext, lsink model.DataSinkBytes, lsource model.DataSourceBytes, ...)
- type Exchange
- func (ex *Exchange) CheckInvariants()
- func (ex *Exchange) Debug(explanation string, args ...interface{})
- func (ex *Exchange) HandshakePeriod() time.Duration
- func (ex *Exchange) ReceiveBytes(bytes []byte)
- func (ex *Exchange) ReceiveCtrlChar(symbol codec.ControlChar, param uint32)
- func (ex *Exchange) Reset()
- func (ex *Exchange) Transmit(io *component.TwixtIO, sink model.DataSinkBytes, data []byte)
- type ExchangeState
Constants ¶
View Source
const ( StateInvalid = iota StateConnecting StateHandshaking StateOperating )
View Source
const DetailedDebug = false
View Source
const (
MaxOutstandingTokens = 10
)
Variables ¶
This section is empty.
Functions ¶
func FakeWire ¶
func FakeWire(ctx model.SimContext, lsink model.DataSinkBytes, lsource model.DataSourceBytes, psink fwmodel.PacketSink, psource fwmodel.PacketSource, label string)
Types ¶
type Exchange ¶
type Exchange struct { Sim model.SimContext Label string State ExchangeState SendHandshakeId uint32 RecvHandshakeId uint32 SendSecondaryHandshake bool FctsSent uint32 FctsRcvd uint32 PktsSent uint32 PktsRcvd uint32 InboundBuffer []byte InboundPending [][]byte RecvInProgress bool CondNotify *component.EventDispatcher TxBusy bool }
func (*Exchange) CheckInvariants ¶
func (ex *Exchange) CheckInvariants()
func (*Exchange) HandshakePeriod ¶
HandshakePeriod generates a random interval in the range [5ms, 15ms)
func (*Exchange) ReceiveBytes ¶
func (*Exchange) ReceiveCtrlChar ¶
func (ex *Exchange) ReceiveCtrlChar(symbol codec.ControlChar, param uint32)
type ExchangeState ¶
type ExchangeState uint8
func (ExchangeState) String ¶
func (s ExchangeState) String() string
Click to show internal directories.
Click to hide internal directories.