sigfile

package
v0.0.0-...-f5dc2ee Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2017 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decode

func Decode(sigfile []byte) (map[string]Signal, error)

Decode takes a sig file and decodes it The format is start [somechar] : 2 byte length n : record length n-2 : 2 byte length : record length n-2 ... ... end where a record is in the format of name (n-8) : memory address (4 byte) : type (2 byte)

func Fetch

func Fetch(address string) (string, error)

Fetch retrieves a sig file fromthe crestron dump

func GetCompileTime

func GetCompileTime(address string) (time.Time, error)

func GetSignalsForAddress

func GetSignalsForAddress(address string) (map[string]Signal, error)

GetSignalsForAddress returns a current sigfile for the address provided.

func Read

func Read(address string) ([]byte, error)

Read checks for a current sig file for the address provided, if none is present, calls Fetch(). Reads and returns the bytes of the current sig file.

This function may also be used to update the sig file by simply ignoring the bytes returned.

Types

type Log

type Log struct {
	Log map[string]time.Time
}

Log will correspond to the log of when we last checked for the latest programming.

type Signal

type Signal struct {
	Name    string
	MemAddr uint32
	SigType []byte
}

Signal represents a Creston programming signal

Jump to

Keyboard shortcuts

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