Documentation ¶
Index ¶
Constants ¶
View Source
const ACTISENSE_BEM = 0x40000 // Actisense specific fake PGNs
View Source
const LEN_VARIABLE = 0
View Source
const MAX_RES_LOOKUP = 16
View Source
const RES_6BITASCII = -7
View Source
const RES_ASCII = -1
View Source
const RES_BINARY = -11
View Source
const RES_DATE = -4
View Source
const RES_DEGREES = 1e-4 * RadianToDegree
View Source
const RES_FLOAT = -14
View Source
const RES_INTEGER = -8
View Source
const RES_LATITUDE = -2
View Source
const RES_LAT_LONG = 1.0e-7
View Source
const RES_LAT_LONG_64 = 1.0e-16
View Source
const RES_LAT_LONG_PRECISION = 1e7
View Source
const RES_LONGITUDE = -3
View Source
const RES_LOOKUP = -9
View Source
const RES_LOOKUP2 = -10
View Source
const RES_MANUFACTURER = -12
View Source
const RES_NOTUSED = 0
View Source
const RES_PRESSURE = -15
View Source
const RES_ROTATION = 1e-3 / 32.0 * RadianToDegree
View Source
const RES_STRING = -13
View Source
const RES_STRINGLZ = -16
View Source
const RES_TEMPERATURE = -6
View Source
const RES_TIME = -5
View Source
const RadianToDegree = 180.0 / math.Pi
Variables ¶
View Source
var PgnList = PgnArray{}/* 297 elements not displayed */
Functions ¶
This section is empty.
Types ¶
type CanBoatMessage ¶
type DecodeError ¶
func (*DecodeError) Error ¶
func (e *DecodeError) Error() string
type ParsedMessage ¶
type ParsedMessage struct { Header RawMessage Index int Data DataMap }
func FromCanBoat ¶
func FromCanBoat(data string) (*ParsedMessage, error)
func ParsePacket ¶
func ParsePacket(cmsg *can.RawMessage) (pgnParsed *ParsedMessage)
func (*ParsedMessage) JSON ¶
func (msg *ParsedMessage) JSON() []byte
Pack a PGN into a JSON formatted byte array
func (*ParsedMessage) MsgPack ¶
func (msg *ParsedMessage) MsgPack() []byte
Pack a PGN into a MsgPack formatted byte array
func (*ParsedMessage) Print ¶
func (msg *ParsedMessage) Print(verbose bool) string
type Pgn ¶
type Pgn struct { Description string Category string Pgn uint32 IsKnown bool // Are we pretty sure we've got all fields with correct definitions? Size uint32 // (Minimal) size of this PGN. Helps to determine fast/single frame and initial malloc RepeatingFields uint32 // How many fields at the end repeat until the PGN is exhausted? FieldList []Field // Fields in the PGN }
func (*Pgn) FieldOffsets ¶ added in v1.1.1
type PgnLookup ¶
func (PgnLookup) MarshalJSON ¶
func (PgnLookup) MarshalXML ¶
Placeholder until I have a chance to figure out XML encoding in Go
type PgnSubLookup ¶ added in v1.1.1
type RawMessage ¶
type RawMessage struct {
*can.RawMessage
}
func (*RawMessage) GetPgnDefinition ¶
func (msg *RawMessage) GetPgnDefinition(pgn uint32) *Pgn
Click to show internal directories.
Click to hide internal directories.