gomsgq

package module
v0.1.10 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const ALT_PATH_PREFIX = "/tmp/"
View Source
const MSGQ_PREFIX = "msgq_"
View Source
const MSGQ_PREFIXED_TEST_NAME = "msgq_logMessage"
View Source
const NUM_READERS = 15
View Source
const PATH_PREFIX = "/dev/shm/"

Variables

View Source
var HEADER_SIZE = (3*8 + 3*NUM_READERS*8) + align(3*8+3*NUM_READERS*8)
View Source
var OPENPILOT_PREFIX = os.Getenv("OPENPILOT_PREFIX")
View Source
var USE_MSGQ_PREFIX = os.Getenv("USE_MSGQ_PREFIX")

Functions

func IsPrefixedMsgq added in v0.1.9

func IsPrefixedMsgq() bool

func ThreadSignal

func ThreadSignal(tid uint32)

Types

type Header struct {
	NumReaders   *uint64
	WritePointer *uint64
	WriteUid     *uint64
	ReadPointers []uint64
	ReadValids   []uint64
	ReadUids     []uint64
}

func (*Header) Init

func (h *Header) Init(m mmap.MMap)

type Msgq

type Msgq struct {
	Size   int64
	Path   string
	File   *os.File
	Mem    mmap.MMap
	Data   []uint8
	Header Header
}

func (*Msgq) Close

func (m *Msgq) Close() (error, error)

func (*Msgq) Init

func (m *Msgq) Init(path string, size int64) error

func (*Msgq) WaitForSubscriber

func (m *Msgq) WaitForSubscriber()

type MsgqPublisher

type MsgqPublisher struct {
	Msgq Msgq
	Uid  uint64
	Id   uint64
}

func (*MsgqPublisher) Init

func (p *MsgqPublisher) Init(msgq Msgq)

func (*MsgqPublisher) Send

func (p *MsgqPublisher) Send(data []byte)

type MsgqSubscriber

type MsgqSubscriber struct {
	Shadow   bool
	Msgq     Msgq
	Uid      uint64
	Id       uint64
	Conflate bool
	// contains filtered or unexported fields
}

func (*MsgqSubscriber) Init

func (s *MsgqSubscriber) Init(msgq Msgq)

func (*MsgqSubscriber) Read

func (s *MsgqSubscriber) Read() []byte

func (*MsgqSubscriber) Ready

func (s *MsgqSubscriber) Ready() bool

func (*MsgqSubscriber) Reset

func (s *MsgqSubscriber) Reset()

Jump to

Keyboard shortcuts

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