sbp-0.51.1: SwiftNav's SBP Library

CopyrightCopyright (C) 2015 Swift Navigation, Inc.
LicenseLGPL-3
MaintainerMark Fine <dev@swiftnav.com>
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

SwiftNav.SBP.Types

Description

Common SBP type requirements, containers, and serialization utilities.

Synopsis

Documentation

msgSBPPreamble :: Word8 Source

Denotes the start of frame transmission. For v1.0, always 0x55.

defaultSender :: Word16 Source

Default sender ID. Intended for messages sent from the host to the device.

data Msg Source

Packet structure for Swift Navigation Binary Protocol (SBP).

Definition of the over-the-wire message framing format and packet structure for Swift Navigation Binary Protocol (SBP), a minimal binary protocol for communicating with Swift devices. It is used to transmit solutions, observations, status and debugging messages, as well as receive messages from the host operating system.

Constructors

Msg 

Fields

_msgSBPType :: Word16

Uniquely identifies the type of the payload contents

_msgSBPSender :: Word16

A unique identifier of the sending hardware. For v1.0, set to the 2 least significant bytes of the device serial number

_msgSBPLen :: Word8

Byte-length of the payload field

_msgSBPPayload :: !ByteString

Binary data of the message, as identified by Message Type and Length. Usually contains the in-memory binary representation of a C struct (see documentation on individual message types)

_msgSBPCrc :: Word16

Cyclic Redundancy Check (CRC) of the packet's binary data from the Message Type up to the end of Payload (does not include the Preamble)

class Binary a => ToSBP a where Source

Class of generic representation of specialized SBP messages into SBP message frames.

Methods

toSBP :: a -> Word16 -> Msg Source

Convert an SBP message record that is serializable and a two-byte senderID to a binary into an SBP message frame.

Instances

ToSBP MsgAcqResult Source 
ToSBP MsgAcqResultDepA Source 
ToSBP MsgBootloaderHandshakeReq Source 
ToSBP MsgBootloaderHandshakeResp Source 
ToSBP MsgBootloaderJumpToApp Source 
ToSBP MsgNapDeviceDnaReq Source 
ToSBP MsgNapDeviceDnaResp Source 
ToSBP MsgBootloaderHandshakeDepA Source 
ToSBP MsgExtEvent Source 
ToSBP MsgFileioReadReq Source 
ToSBP MsgFileioReadResp Source 
ToSBP MsgFileioReadDirReq Source 
ToSBP MsgFileioReadDirResp Source 
ToSBP MsgFileioRemove Source 
ToSBP MsgFileioWriteReq Source 
ToSBP MsgFileioWriteResp Source 
ToSBP MsgFlashProgram Source 
ToSBP MsgFlashDone Source 
ToSBP MsgFlashReadReq Source 
ToSBP MsgFlashReadResp Source 
ToSBP MsgFlashErase Source 
ToSBP MsgStmFlashLockSector Source 
ToSBP MsgStmFlashUnlockSector Source 
ToSBP MsgStmUniqueIdReq Source 
ToSBP MsgStmUniqueIdResp Source 
ToSBP MsgM25FlashWriteStatus Source 
ToSBP MsgLog Source 
ToSBP MsgTweet Source 
ToSBP MsgPrintDep Source 
ToSBP MsgGpsTime Source 
ToSBP MsgDops Source 
ToSBP MsgPosEcef Source 
ToSBP MsgPosLlh Source 
ToSBP MsgBaselineEcef Source 
ToSBP MsgBaselineNed Source 
ToSBP MsgVelEcef Source 
ToSBP MsgVelNed Source 
ToSBP MsgBaselineHeading Source 
ToSBP MsgObs Source 
ToSBP MsgBasePos Source 
ToSBP MsgEphemeris Source 
ToSBP MsgEphemerisDepA Source 
ToSBP MsgEphemerisDepB Source 
ToSBP MsgObsDepA Source 
ToSBP MsgAlmanac Source 
ToSBP MsgSetTime Source 
ToSBP MsgReset Source 
ToSBP MsgCwResults Source 
ToSBP MsgCwStart Source 
ToSBP MsgResetFilters Source 
ToSBP MsgInitBase Source 
ToSBP MsgThreadState Source 
ToSBP MsgUartState Source 
ToSBP MsgIarState Source 
ToSBP MsgMaskSatellite Source 
ToSBP MsgSettingsSave Source 
ToSBP MsgSettingsWrite Source 
ToSBP MsgSettingsReadReq Source 
ToSBP MsgSettingsReadResp Source 
ToSBP MsgSettingsReadByIndexReq Source 
ToSBP MsgSettingsReadByIndexResp Source 
ToSBP MsgSettingsReadByIndexDone Source 
ToSBP MsgStartup Source 
ToSBP MsgHeartbeat Source 
ToSBP MsgTrackingState Source 
ToSBP MsgTrackingIq Source 
ToSBP MsgTrackingStateDepA Source