sbp-2.3.16: 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 #

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

defaultSender :: Word16 #

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

newtype Bytes #

Wrapper around ByteString for *JSON and Binary typeclass instances.

Constructors

Bytes 

Fields

data Msg #

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 :: !Bytes

    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 #

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

Minimal complete definition

toSBP

Methods

toSBP :: a -> Word16 -> Msg #

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

Instances

ToSBP MsgBaselineHeading # 
ToSBP MsgOrientQuat # 

Methods

toSBP :: MsgOrientQuat -> Word16 -> Msg #

ToSBP MsgOrientEuler # 

Methods

toSBP :: MsgOrientEuler -> Word16 -> Msg #

ToSBP MsgAngularRate # 

Methods

toSBP :: MsgAngularRate -> Word16 -> Msg #

ToSBP MsgStartup # 

Methods

toSBP :: MsgStartup -> Word16 -> Msg #

ToSBP MsgDgnssStatus # 

Methods

toSBP :: MsgDgnssStatus -> Word16 -> Msg #

ToSBP MsgHeartbeat # 

Methods

toSBP :: MsgHeartbeat -> Word16 -> Msg #

ToSBP MsgInsStatus # 

Methods

toSBP :: MsgInsStatus -> Word16 -> Msg #

ToSBP MsgSettingsSave # 

Methods

toSBP :: MsgSettingsSave -> Word16 -> Msg #

ToSBP MsgSettingsWrite # 
ToSBP MsgSettingsWriteResp # 
ToSBP MsgSettingsReadReq # 
ToSBP MsgSettingsReadResp # 
ToSBP MsgSettingsReadByIndexReq # 
ToSBP MsgSettingsReadByIndexResp # 
ToSBP MsgSettingsReadByIndexDone # 
ToSBP MsgSettingsRegister # 
ToSBP MsgGpsTime # 

Methods

toSBP :: MsgGpsTime -> Word16 -> Msg #

ToSBP MsgUtcTime # 

Methods

toSBP :: MsgUtcTime -> Word16 -> Msg #

ToSBP MsgDops # 

Methods

toSBP :: MsgDops -> Word16 -> Msg #

ToSBP MsgPosEcef # 

Methods

toSBP :: MsgPosEcef -> Word16 -> Msg #

ToSBP MsgPosEcefCov # 

Methods

toSBP :: MsgPosEcefCov -> Word16 -> Msg #

ToSBP MsgPosLlh # 

Methods

toSBP :: MsgPosLlh -> Word16 -> Msg #

ToSBP MsgPosLlhCov # 

Methods

toSBP :: MsgPosLlhCov -> Word16 -> Msg #

ToSBP MsgBaselineEcef # 

Methods

toSBP :: MsgBaselineEcef -> Word16 -> Msg #

ToSBP MsgBaselineNed # 

Methods

toSBP :: MsgBaselineNed -> Word16 -> Msg #

ToSBP MsgVelEcef # 

Methods

toSBP :: MsgVelEcef -> Word16 -> Msg #

ToSBP MsgVelEcefCov # 

Methods

toSBP :: MsgVelEcefCov -> Word16 -> Msg #

ToSBP MsgVelNed # 

Methods

toSBP :: MsgVelNed -> Word16 -> Msg #

ToSBP MsgVelNedCov # 

Methods

toSBP :: MsgVelNedCov -> Word16 -> Msg #

ToSBP MsgVelBody # 

Methods

toSBP :: MsgVelBody -> Word16 -> Msg #

ToSBP MsgAgeCorrections # 
ToSBP MsgGpsTimeDepA # 

Methods

toSBP :: MsgGpsTimeDepA -> Word16 -> Msg #

ToSBP MsgDopsDepA # 

Methods

toSBP :: MsgDopsDepA -> Word16 -> Msg #

ToSBP MsgPosEcefDepA # 

Methods

toSBP :: MsgPosEcefDepA -> Word16 -> Msg #

ToSBP MsgPosLlhDepA # 

Methods

toSBP :: MsgPosLlhDepA -> Word16 -> Msg #

ToSBP MsgBaselineEcefDepA # 
ToSBP MsgBaselineNedDepA # 
ToSBP MsgVelEcefDepA # 

Methods

toSBP :: MsgVelEcefDepA -> Word16 -> Msg #

ToSBP MsgVelNedDepA # 

Methods

toSBP :: MsgVelNedDepA -> Word16 -> Msg #

ToSBP MsgBaselineHeadingDepA # 
ToSBP MsgMagRaw # 

Methods

toSBP :: MsgMagRaw -> Word16 -> Msg #

ToSBP MsgLog # 

Methods

toSBP :: MsgLog -> Word16 -> Msg #

ToSBP MsgFwd # 

Methods

toSBP :: MsgFwd -> Word16 -> Msg #

ToSBP MsgTweet # 

Methods

toSBP :: MsgTweet -> Word16 -> Msg #

ToSBP MsgPrintDep # 

Methods

toSBP :: MsgPrintDep -> Word16 -> Msg #

ToSBP MsgImuRaw # 

Methods

toSBP :: MsgImuRaw -> Word16 -> Msg #

ToSBP MsgImuAux # 

Methods

toSBP :: MsgImuAux -> Word16 -> Msg #

ToSBP MsgTrackingStateDetailedDepA # 
ToSBP MsgTrackingStateDetailedDep # 
ToSBP MsgTrackingState # 
ToSBP MsgMeasurementState # 
ToSBP MsgTrackingIq # 

Methods

toSBP :: MsgTrackingIq -> Word16 -> Msg #

ToSBP MsgTrackingIqDep # 
ToSBP MsgTrackingStateDepA # 
ToSBP MsgTrackingStateDepB # 
ToSBP MsgSsrOrbitClock # 
ToSBP MsgSsrCodeBiases # 
ToSBP MsgSsrPhaseBiases # 
ToSBP MsgSbasRaw # 

Methods

toSBP :: MsgSbasRaw -> Word16 -> Msg #

ToSBP MsgAlmanac # 

Methods

toSBP :: MsgAlmanac -> Word16 -> Msg #

ToSBP MsgSetTime # 

Methods

toSBP :: MsgSetTime -> Word16 -> Msg #

ToSBP MsgReset # 

Methods

toSBP :: MsgReset -> Word16 -> Msg #

ToSBP MsgResetDep # 

Methods

toSBP :: MsgResetDep -> Word16 -> Msg #

ToSBP MsgCwResults # 

Methods

toSBP :: MsgCwResults -> Word16 -> Msg #

ToSBP MsgCwStart # 

Methods

toSBP :: MsgCwStart -> Word16 -> Msg #

ToSBP MsgResetFilters # 

Methods

toSBP :: MsgResetFilters -> Word16 -> Msg #

ToSBP MsgInitBase # 

Methods

toSBP :: MsgInitBase -> Word16 -> Msg #

ToSBP MsgThreadState # 

Methods

toSBP :: MsgThreadState -> Word16 -> Msg #

ToSBP MsgUartState # 

Methods

toSBP :: MsgUartState -> Word16 -> Msg #

ToSBP MsgUartStateDepa # 
ToSBP MsgIarState # 

Methods

toSBP :: MsgIarState -> Word16 -> Msg #

ToSBP MsgMaskSatellite # 
ToSBP MsgMaskSatelliteDep # 
ToSBP MsgDeviceMonitor # 
ToSBP MsgCommandReq # 

Methods

toSBP :: MsgCommandReq -> Word16 -> Msg #

ToSBP MsgCommandResp # 

Methods

toSBP :: MsgCommandResp -> Word16 -> Msg #

ToSBP MsgCommandOutput # 
ToSBP MsgNetworkStateReq # 
ToSBP MsgNetworkStateResp # 
ToSBP MsgNetworkBandwidthUsage # 
ToSBP MsgCellModemStatus # 
ToSBP MsgSpecanDep # 

Methods

toSBP :: MsgSpecanDep -> Word16 -> Msg #

ToSBP MsgSpecan # 

Methods

toSBP :: MsgSpecan -> Word16 -> Msg #

ToSBP MsgObs # 

Methods

toSBP :: MsgObs -> Word16 -> Msg #

ToSBP MsgBasePosLlh # 

Methods

toSBP :: MsgBasePosLlh -> Word16 -> Msg #

ToSBP MsgBasePosEcef # 

Methods

toSBP :: MsgBasePosEcef -> Word16 -> Msg #

ToSBP MsgEphemerisGpsDepE # 
ToSBP MsgEphemerisGps # 

Methods

toSBP :: MsgEphemerisGps -> Word16 -> Msg #

ToSBP MsgEphemerisSbasDepA # 
ToSBP MsgEphemerisGloDepA # 
ToSBP MsgEphemerisSbas # 
ToSBP MsgEphemerisGloDepB # 
ToSBP MsgEphemerisGloDepC # 
ToSBP MsgEphemerisGlo # 

Methods

toSBP :: MsgEphemerisGlo -> Word16 -> Msg #

ToSBP MsgEphemerisDepD # 
ToSBP MsgEphemerisDepA # 
ToSBP MsgEphemerisDepB # 
ToSBP MsgEphemerisDepC # 
ToSBP MsgObsDepA # 

Methods

toSBP :: MsgObsDepA -> Word16 -> Msg #

ToSBP MsgObsDepB # 

Methods

toSBP :: MsgObsDepB -> Word16 -> Msg #

ToSBP MsgObsDepC # 

Methods

toSBP :: MsgObsDepC -> Word16 -> Msg #

ToSBP MsgIono # 

Methods

toSBP :: MsgIono -> Word16 -> Msg #

ToSBP MsgSvConfigurationGps # 
ToSBP MsgGroupDelayDepA # 
ToSBP MsgGroupDelayDepB # 
ToSBP MsgGroupDelay # 

Methods

toSBP :: MsgGroupDelay -> Word16 -> Msg #

ToSBP MsgAlmanacGpsDep # 
ToSBP MsgAlmanacGps # 

Methods

toSBP :: MsgAlmanacGps -> Word16 -> Msg #

ToSBP MsgAlmanacGloDep # 
ToSBP MsgAlmanacGlo # 

Methods

toSBP :: MsgAlmanacGlo -> Word16 -> Msg #

ToSBP MsgGloBiases # 

Methods

toSBP :: MsgGloBiases -> Word16 -> Msg #

ToSBP MsgNdbEvent # 

Methods

toSBP :: MsgNdbEvent -> Word16 -> Msg #

ToSBP MsgFlashProgram # 

Methods

toSBP :: MsgFlashProgram -> Word16 -> Msg #

ToSBP MsgFlashDone # 

Methods

toSBP :: MsgFlashDone -> Word16 -> Msg #

ToSBP MsgFlashReadReq # 

Methods

toSBP :: MsgFlashReadReq -> Word16 -> Msg #

ToSBP MsgFlashReadResp # 
ToSBP MsgFlashErase # 

Methods

toSBP :: MsgFlashErase -> Word16 -> Msg #

ToSBP MsgStmFlashLockSector # 
ToSBP MsgStmFlashUnlockSector # 
ToSBP MsgStmUniqueIdReq # 
ToSBP MsgStmUniqueIdResp # 
ToSBP MsgM25FlashWriteStatus # 
ToSBP MsgFileioReadReq # 
ToSBP MsgFileioReadResp # 
ToSBP MsgFileioReadDirReq # 
ToSBP MsgFileioReadDirResp # 
ToSBP MsgFileioRemove # 

Methods

toSBP :: MsgFileioRemove -> Word16 -> Msg #

ToSBP MsgFileioWriteReq # 
ToSBP MsgFileioWriteResp # 
ToSBP MsgExtEvent # 

Methods

toSBP :: MsgExtEvent -> Word16 -> Msg #

ToSBP MsgBootloaderHandshakeReq # 
ToSBP MsgBootloaderHandshakeResp # 
ToSBP MsgBootloaderJumpToApp # 
ToSBP MsgNapDeviceDnaReq # 
ToSBP MsgNapDeviceDnaResp # 
ToSBP MsgBootloaderHandshakeDepA # 
ToSBP MsgAcqResult # 

Methods

toSBP :: MsgAcqResult -> Word16 -> Msg #

ToSBP MsgAcqResultDepC # 
ToSBP MsgAcqResultDepB # 
ToSBP MsgAcqResultDepA # 
ToSBP MsgAcqSvProfile # 

Methods

toSBP :: MsgAcqSvProfile -> Word16 -> Msg #

ToSBP MsgAcqSvProfileDep # 
ToSBP MsgUserData # 

Methods

toSBP :: MsgUserData -> Word16 -> Msg #

ToSBP MsgOdometry # 

Methods

toSBP :: MsgOdometry -> Word16 -> Msg #