Documentation ¶
Overview ¶
Package cli provides a CLI for analyzing NMEA 2000 PGN messages
Index ¶
- type CLI
- func (c *CLI) PrintFieldBinary(field *analyzer.PGNField, _ string, data []byte, startBit int, bits *int) (bool, error)
- func (c *CLI) PrintFieldBitLookup(field *analyzer.PGNField, _ string, data []byte, startBit int, bits *int) (bool, error)
- func (c *CLI) PrintFieldDate(_ *analyzer.PGNField, fieldName string, data []byte, startBit int, bits *int) (bool, error)
- func (c *CLI) PrintFieldDecimal(_ *analyzer.PGNField, _ string, data []byte, startBit int, bits *int) (bool, error)
- func (c *CLI) PrintFieldFloat(field *analyzer.PGNField, fieldName string, data []byte, startBit int, ...) (bool, error)
- func (c *CLI) PrintFieldKeyValue(field *analyzer.PGNField, fieldName string, data []byte, startBit int, ...) (bool, error)
- func (c *CLI) PrintFieldLatLon(field *analyzer.PGNField, fieldName string, data []byte, startBit int, ...) (bool, error)
- func (c *CLI) PrintFieldLookup(field *analyzer.PGNField, fieldName string, data []byte, startBit int, ...) (bool, error)
- func (c *CLI) PrintFieldMMSI(field *analyzer.PGNField, _ string, data []byte, startBit int, bits *int) (bool, error)
- func (c *CLI) PrintFieldNumber(field *analyzer.PGNField, fieldName string, data []byte, startBit int, ...) (bool, error)
- func (c *CLI) PrintFieldReserved(field *analyzer.PGNField, fieldName string, data []byte, startBit int, ...) (bool, error)
- func (c *CLI) PrintFieldSpare(field *analyzer.PGNField, fieldName string, data []byte, startBit int, ...) (bool, error)
- func (c *CLI) PrintFieldStringFix(field *analyzer.PGNField, fieldName string, data []byte, startBit int, ...) (bool, error)
- func (c *CLI) PrintFieldStringLAU(_ *analyzer.PGNField, fieldName string, data []byte, startBit int, bits *int) (bool, error)
- func (c *CLI) PrintFieldStringLZ(_ *analyzer.PGNField, _ string, data []byte, startBit int, bits *int) (bool, error)
- func (c *CLI) PrintFieldTime(field *analyzer.PGNField, fieldName string, data []byte, startBit int, ...) (bool, error)
- func (c *CLI) PrintFieldVariable(_ *analyzer.PGNField, fieldName string, data []byte, startBit int, bits *int) (bool, error)
- func (c *CLI) Run() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CLI ¶
type CLI struct {
// contains filtered or unexported fields
}
A CLI lets a user run the analyzer in a CLI environment.
func (*CLI) PrintFieldBinary ¶
func (*CLI) PrintFieldBitLookup ¶
func (*CLI) PrintFieldDate ¶
func (*CLI) PrintFieldDecimal ¶
func (c *CLI) PrintFieldDecimal( _ *analyzer.PGNField, _ string, data []byte, startBit int, bits *int, ) (bool, error)
Note(UNTESTED): See README.md.
func (*CLI) PrintFieldFloat ¶
func (c *CLI) PrintFieldFloat( field *analyzer.PGNField, fieldName string, data []byte, startBit int, bits *int, ) (bool, error)
Note(UNTESTED): See README.md.
func (*CLI) PrintFieldKeyValue ¶
func (c *CLI) PrintFieldKeyValue( field *analyzer.PGNField, fieldName string, data []byte, startBit int, bits *int, ) (bool, error)
Note(UNTESTED): See README.md.
func (*CLI) PrintFieldLatLon ¶
func (*CLI) PrintFieldLookup ¶
func (*CLI) PrintFieldMMSI ¶
func (c *CLI) PrintFieldMMSI( field *analyzer.PGNField, _ string, data []byte, startBit int, bits *int, ) (bool, error)
This is only a different printer than fieldPrintNumber so the JSON can contain a string value.
func (*CLI) PrintFieldNumber ¶
func (*CLI) PrintFieldReserved ¶
func (c *CLI) PrintFieldReserved( field *analyzer.PGNField, fieldName string, data []byte, startBit int, bits *int, ) (bool, error)
* Only print reserved fields if they are NOT all ones, in that case we have an incorrect * PGN definition.
func (*CLI) PrintFieldSpare ¶
func (c *CLI) PrintFieldSpare( field *analyzer.PGNField, fieldName string, data []byte, startBit int, bits *int, ) (bool, error)
* Only print spare fields if they are NOT all zeroes, in that case we have an incorrect * PGN definition.
func (*CLI) PrintFieldStringFix ¶
func (c *CLI) PrintFieldStringFix( field *analyzer.PGNField, fieldName string, data []byte, startBit int, bits *int, ) (bool, error)
*
- Fixed length string where the length is defined by the field definition.
func (*CLI) PrintFieldStringLAU ¶
func (*CLI) PrintFieldStringLZ ¶
func (c *CLI) PrintFieldStringLZ( _ *analyzer.PGNField, _ string, data []byte, startBit int, bits *int, ) (bool, error)
Note(UNTESTED): See README.md.
func (*CLI) PrintFieldTime ¶
func (*CLI) PrintFieldVariable ¶
Click to show internal directories.
Click to hide internal directories.