udptime

package
Version: v4.6.0 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2021 License: GPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Off    = 0x00
	Green  = 0x01
	Red    = 0x02
	Orange = 0x03
)

Colors

Variables

This section is empty.

Functions

func Encode

func Encode(msg *Message) []byte

Encode takes a Message struct and encodes it into 3 byte message for the udptime protocol

func Listen

func Listen(addr string) (chan *Message, error)

Listen for udptime messages on a port

Types

type Message

type Message struct {
	Minutes  int
	Seconds  int
	Green    bool
	Red      bool
	OverTime bool
}

Message is a struct for upd time commands from stage timer 2 and irisdown

func Decode

func Decode(data []byte) (*Message, error)

Decode takes the raw 3 bytes from the udp time message and decodes it into Message struct

func (*Message) String

func (msg *Message) String() string

Source Files

Jump to

Keyboard shortcuts

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