Documentation
¶
Index ¶
- func AssertPacketsMatch(t *testing.T, actual []byte, expected []byte)
- func ComparePackets(actual []byte, expected []byte) (mismatches int, lengthOk bool)
- func MakeLogger(ctx model.SimContext, name string, flushDelay time.Duration) model.DataSinkBytes
- func RandPacket(r *rand.Rand) []byte
- type DataSink
- type DataSource
- type Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ComparePackets ¶
func MakeLogger ¶
func MakeLogger(ctx model.SimContext, name string, flushDelay time.Duration) model.DataSinkBytes
func RandPacket ¶
Types ¶
type DataSink ¶
type DataSink struct { component.NullEventSource Collected []byte }
func MakeDataSink ¶
func MakeDataSink(ctx model.SimContext) *DataSink
type DataSource ¶
type DataSource struct { *component.EventDispatcher Ready []byte }
func MakeDataSource ¶
func MakeDataSource(ctx model.SimContext, ready []byte) *DataSource
func (*DataSource) IsConsumed ¶
func (ds *DataSource) IsConsumed() bool
func (*DataSource) Refill ¶
func (ds *DataSource) Refill(data []byte)
func (*DataSource) TryRead ¶
func (ds *DataSource) TryRead(into []byte) int
Click to show internal directories.
Click to hide internal directories.