ssl-go-tools: github.com/RoboCup-SSL/ssl-go-tools/pkg/persistence Index | Files

package persistence

import "github.com/RoboCup-SSL/ssl-go-tools/pkg/persistence"

Index

Package Files

broadcaster.go message.go reader.go recorder.go writer.go

func ParseMessage Uses

func ParseMessage(data []byte, message proto.Message) error

type Broadcaster Uses

type Broadcaster struct {
    Slots []*Slot

    SkipNonRunningStages bool
    // contains filtered or unexported fields
}

func NewBroadcaster Uses

func NewBroadcaster() Broadcaster

func (*Broadcaster) AddSlot Uses

func (b *Broadcaster) AddSlot(messageType MessageType, address string)

func (*Broadcaster) Start Uses

func (b *Broadcaster) Start(filename string) error

func (*Broadcaster) Stop Uses

func (b *Broadcaster) Stop()

type Message Uses

type Message struct {
    Timestamp   int64 // Receiver timestamp in ns
    MessageType MessageType
    Message     []byte
}

func (*Message) ParseReferee Uses

func (m *Message) ParseReferee() (*sslproto.Referee, error)

func (*Message) ParseVisionWrapper Uses

func (m *Message) ParseVisionWrapper() (*sslproto.SSL_WrapperPacket, error)

type MessageId Uses

type MessageId int
const (
    MessageBlank         MessageId = 0 //(ignore message)
    MessageUnknown       MessageId = 1 //(try to guess message type by parsing the data)
    MessageSslVision2010 MessageId = 2
    MessageSslRefbox2013 MessageId = 3
    MessageSslVision2014 MessageId = 4
)

type MessageType Uses

type MessageType struct {
    Id   MessageId
    Name string
}

type Reader Uses

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

func NewReader Uses

func NewReader(filename string) (logReader *Reader, err error)

func (*Reader) Close Uses

func (l *Reader) Close() error

func (*Reader) CreateChannel Uses

func (l *Reader) CreateChannel() (channel chan *Message)

func (*Reader) HasMessage Uses

func (l *Reader) HasMessage() bool

func (*Reader) ReadMessage Uses

func (l *Reader) ReadMessage() (msg *Message, err error)

func (*Reader) SkipMessage Uses

func (l *Reader) SkipMessage() (bytesRead int, err error)

type Recorder Uses

type Recorder struct {
    Slots []*Slot
    // contains filtered or unexported fields
}

func NewRecorder Uses

func NewRecorder() Recorder

func (*Recorder) AddSlot Uses

func (r *Recorder) AddSlot(messageType MessageType, address string)

func (*Recorder) RegisterToInterrupt Uses

func (r *Recorder) RegisterToInterrupt()

func (*Recorder) Start Uses

func (r *Recorder) Start() error

func (*Recorder) Stop Uses

func (r *Recorder) Stop() error

type Slot Uses

type Slot struct {
    ReceivedMessages int
    MessageType      MessageType
    // contains filtered or unexported fields
}

type Writer Uses

type Writer struct {
    Open bool
    // contains filtered or unexported fields
}

func NewWriter Uses

func NewWriter(filename string) (logWriter *Writer, err error)

func (*Writer) Close Uses

func (l *Writer) Close() error

func (*Writer) Write Uses

func (l *Writer) Write(msg *Message) (err error)

Package persistence imports 14 packages (graph) and is imported by 1 packages. Updated 2019-10-16. Refresh now. Tools for package owners.