sbp-2.2.3: 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)

Instances

checkCrc :: Msg -> Word16 Source #

class Binary a => ToSBP a where Source #

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

Minimal complete definition

toSBP

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 MsgBootloaderHandshakeReq Source # 

Methods

toSBP :: MsgBootloaderHandshakeReq -> Word16 -> Msg Source #

ToSBP MsgBootloaderHandshakeResp Source # 
ToSBP MsgBootloaderJumpToApp Source # 

Methods

toSBP :: MsgBootloaderJumpToApp -> Word16 -> Msg Source #

ToSBP MsgNapDeviceDnaReq Source # 

Methods

toSBP :: MsgNapDeviceDnaReq -> Word16 -> Msg Source #

ToSBP MsgNapDeviceDnaResp Source # 

Methods

toSBP :: MsgNapDeviceDnaResp -> Word16 -> Msg Source #

ToSBP MsgBootloaderHandshakeDepA Source # 
ToSBP MsgExtEvent Source # 

Methods

toSBP :: MsgExtEvent -> Word16 -> Msg Source #

ToSBP MsgFileioReadReq Source # 

Methods

toSBP :: MsgFileioReadReq -> Word16 -> Msg Source #

ToSBP MsgFileioReadResp Source # 

Methods

toSBP :: MsgFileioReadResp -> Word16 -> Msg Source #

ToSBP MsgFileioReadDirReq Source # 

Methods

toSBP :: MsgFileioReadDirReq -> Word16 -> Msg Source #

ToSBP MsgFileioReadDirResp Source # 

Methods

toSBP :: MsgFileioReadDirResp -> Word16 -> Msg Source #

ToSBP MsgFileioRemove Source # 

Methods

toSBP :: MsgFileioRemove -> Word16 -> Msg Source #

ToSBP MsgFileioWriteReq Source # 

Methods

toSBP :: MsgFileioWriteReq -> Word16 -> Msg Source #

ToSBP MsgFileioWriteResp Source # 

Methods

toSBP :: MsgFileioWriteResp -> Word16 -> Msg Source #

ToSBP MsgFlashProgram Source # 

Methods

toSBP :: MsgFlashProgram -> Word16 -> Msg Source #

ToSBP MsgFlashDone Source # 

Methods

toSBP :: MsgFlashDone -> Word16 -> Msg Source #

ToSBP MsgFlashReadReq Source # 

Methods

toSBP :: MsgFlashReadReq -> Word16 -> Msg Source #

ToSBP MsgFlashReadResp Source # 

Methods

toSBP :: MsgFlashReadResp -> Word16 -> Msg Source #

ToSBP MsgFlashErase Source # 

Methods

toSBP :: MsgFlashErase -> Word16 -> Msg Source #

ToSBP MsgStmFlashLockSector Source # 

Methods

toSBP :: MsgStmFlashLockSector -> Word16 -> Msg Source #

ToSBP MsgStmFlashUnlockSector Source # 

Methods

toSBP :: MsgStmFlashUnlockSector -> Word16 -> Msg Source #

ToSBP MsgStmUniqueIdReq Source # 

Methods

toSBP :: MsgStmUniqueIdReq -> Word16 -> Msg Source #

ToSBP MsgStmUniqueIdResp Source # 

Methods

toSBP :: MsgStmUniqueIdResp -> Word16 -> Msg Source #

ToSBP MsgM25FlashWriteStatus Source # 

Methods

toSBP :: MsgM25FlashWriteStatus -> Word16 -> Msg Source #

ToSBP MsgAcqResult Source # 

Methods

toSBP :: MsgAcqResult -> Word16 -> Msg Source #

ToSBP MsgAcqResultDepB Source # 

Methods

toSBP :: MsgAcqResultDepB -> Word16 -> Msg Source #

ToSBP MsgAcqResultDepA Source # 

Methods

toSBP :: MsgAcqResultDepA -> Word16 -> Msg Source #

ToSBP MsgAcqSvProfile Source # 

Methods

toSBP :: MsgAcqSvProfile -> Word16 -> Msg Source #

ToSBP MsgImuRaw Source # 

Methods

toSBP :: MsgImuRaw -> Word16 -> Msg Source #

ToSBP MsgImuAux Source # 

Methods

toSBP :: MsgImuAux -> Word16 -> Msg Source #

ToSBP MsgLog Source # 

Methods

toSBP :: MsgLog -> Word16 -> Msg Source #

ToSBP MsgFwd Source # 

Methods

toSBP :: MsgFwd -> Word16 -> Msg Source #

ToSBP MsgTweet Source # 

Methods

toSBP :: MsgTweet -> Word16 -> Msg Source #

ToSBP MsgPrintDep Source # 

Methods

toSBP :: MsgPrintDep -> Word16 -> Msg Source #

ToSBP MsgGpsTime Source # 

Methods

toSBP :: MsgGpsTime -> Word16 -> Msg Source #

ToSBP MsgUtcTime Source # 

Methods

toSBP :: MsgUtcTime -> Word16 -> Msg Source #

ToSBP MsgDops Source # 

Methods

toSBP :: MsgDops -> Word16 -> Msg Source #

ToSBP MsgPosEcef Source # 

Methods

toSBP :: MsgPosEcef -> Word16 -> Msg Source #

ToSBP MsgPosLlh Source # 

Methods

toSBP :: MsgPosLlh -> Word16 -> Msg Source #

ToSBP MsgBaselineEcef Source # 

Methods

toSBP :: MsgBaselineEcef -> Word16 -> Msg Source #

ToSBP MsgBaselineNed Source # 

Methods

toSBP :: MsgBaselineNed -> Word16 -> Msg Source #

ToSBP MsgVelEcef Source # 

Methods

toSBP :: MsgVelEcef -> Word16 -> Msg Source #

ToSBP MsgVelNed Source # 

Methods

toSBP :: MsgVelNed -> Word16 -> Msg Source #

ToSBP MsgBaselineHeading Source # 

Methods

toSBP :: MsgBaselineHeading -> Word16 -> Msg Source #

ToSBP MsgAgeCorrections Source # 

Methods

toSBP :: MsgAgeCorrections -> Word16 -> Msg Source #

ToSBP MsgGpsTimeDepA Source # 

Methods

toSBP :: MsgGpsTimeDepA -> Word16 -> Msg Source #

ToSBP MsgDopsDepA Source # 

Methods

toSBP :: MsgDopsDepA -> Word16 -> Msg Source #

ToSBP MsgPosEcefDepA Source # 

Methods

toSBP :: MsgPosEcefDepA -> Word16 -> Msg Source #

ToSBP MsgPosLlhDepA Source # 

Methods

toSBP :: MsgPosLlhDepA -> Word16 -> Msg Source #

ToSBP MsgBaselineEcefDepA Source # 

Methods

toSBP :: MsgBaselineEcefDepA -> Word16 -> Msg Source #

ToSBP MsgBaselineNedDepA Source # 

Methods

toSBP :: MsgBaselineNedDepA -> Word16 -> Msg Source #

ToSBP MsgVelEcefDepA Source # 

Methods

toSBP :: MsgVelEcefDepA -> Word16 -> Msg Source #

ToSBP MsgVelNedDepA Source # 

Methods

toSBP :: MsgVelNedDepA -> Word16 -> Msg Source #

ToSBP MsgBaselineHeadingDepA Source # 

Methods

toSBP :: MsgBaselineHeadingDepA -> Word16 -> Msg Source #

ToSBP MsgNdbEvent Source # 

Methods

toSBP :: MsgNdbEvent -> Word16 -> Msg Source #

ToSBP MsgObs Source # 

Methods

toSBP :: MsgObs -> Word16 -> Msg Source #

ToSBP MsgBasePosLlh Source # 

Methods

toSBP :: MsgBasePosLlh -> Word16 -> Msg Source #

ToSBP MsgBasePosEcef Source # 

Methods

toSBP :: MsgBasePosEcef -> Word16 -> Msg Source #

ToSBP MsgEphemerisGpsDepE Source # 

Methods

toSBP :: MsgEphemerisGpsDepE -> Word16 -> Msg Source #

ToSBP MsgEphemerisGps Source # 

Methods

toSBP :: MsgEphemerisGps -> Word16 -> Msg Source #

ToSBP MsgEphemerisSbasDepA Source # 

Methods

toSBP :: MsgEphemerisSbasDepA -> Word16 -> Msg Source #

ToSBP MsgEphemerisGloDepA Source # 

Methods

toSBP :: MsgEphemerisGloDepA -> Word16 -> Msg Source #

ToSBP MsgEphemerisSbas Source # 

Methods

toSBP :: MsgEphemerisSbas -> Word16 -> Msg Source #

ToSBP MsgEphemerisGlo Source # 

Methods

toSBP :: MsgEphemerisGlo -> Word16 -> Msg Source #

ToSBP MsgEphemerisDepD Source # 

Methods

toSBP :: MsgEphemerisDepD -> Word16 -> Msg Source #

ToSBP MsgEphemerisDepA Source # 

Methods

toSBP :: MsgEphemerisDepA -> Word16 -> Msg Source #

ToSBP MsgEphemerisDepB Source # 

Methods

toSBP :: MsgEphemerisDepB -> Word16 -> Msg Source #

ToSBP MsgEphemerisDepC Source # 

Methods

toSBP :: MsgEphemerisDepC -> Word16 -> Msg Source #

ToSBP MsgObsDepA Source # 

Methods

toSBP :: MsgObsDepA -> Word16 -> Msg Source #

ToSBP MsgObsDepB Source # 

Methods

toSBP :: MsgObsDepB -> Word16 -> Msg Source #

ToSBP MsgObsDepC Source # 

Methods

toSBP :: MsgObsDepC -> Word16 -> Msg Source #

ToSBP MsgIono Source # 

Methods

toSBP :: MsgIono -> Word16 -> Msg Source #

ToSBP MsgSvConfigurationGps Source # 

Methods

toSBP :: MsgSvConfigurationGps -> Word16 -> Msg Source #

ToSBP MsgGroupDelayDepA Source # 

Methods

toSBP :: MsgGroupDelayDepA -> Word16 -> Msg Source #

ToSBP MsgGroupDelay Source # 

Methods

toSBP :: MsgGroupDelay -> Word16 -> Msg Source #

ToSBP MsgAlmanacGps Source # 

Methods

toSBP :: MsgAlmanacGps -> Word16 -> Msg Source #

ToSBP MsgAlmanacGlo Source # 

Methods

toSBP :: MsgAlmanacGlo -> Word16 -> Msg Source #

ToSBP MsgFcnsGlo Source # 

Methods

toSBP :: MsgFcnsGlo -> Word16 -> Msg Source #

ToSBP MsgAlmanac Source # 

Methods

toSBP :: MsgAlmanac -> Word16 -> Msg Source #

ToSBP MsgSetTime Source # 

Methods

toSBP :: MsgSetTime -> Word16 -> Msg Source #

ToSBP MsgReset Source # 

Methods

toSBP :: MsgReset -> Word16 -> Msg Source #

ToSBP MsgResetDep Source # 

Methods

toSBP :: MsgResetDep -> Word16 -> Msg Source #

ToSBP MsgCwResults Source # 

Methods

toSBP :: MsgCwResults -> Word16 -> Msg Source #

ToSBP MsgCwStart Source # 

Methods

toSBP :: MsgCwStart -> Word16 -> Msg Source #

ToSBP MsgResetFilters Source # 

Methods

toSBP :: MsgResetFilters -> Word16 -> Msg Source #

ToSBP MsgInitBase Source # 

Methods

toSBP :: MsgInitBase -> Word16 -> Msg Source #

ToSBP MsgThreadState Source # 

Methods

toSBP :: MsgThreadState -> Word16 -> Msg Source #

ToSBP MsgUartState Source # 

Methods

toSBP :: MsgUartState -> Word16 -> Msg Source #

ToSBP MsgUartStateDepa Source # 

Methods

toSBP :: MsgUartStateDepa -> Word16 -> Msg Source #

ToSBP MsgIarState Source # 

Methods

toSBP :: MsgIarState -> Word16 -> Msg Source #

ToSBP MsgMaskSatellite Source # 

Methods

toSBP :: MsgMaskSatellite -> Word16 -> Msg Source #

ToSBP MsgDeviceMonitor Source # 

Methods

toSBP :: MsgDeviceMonitor -> Word16 -> Msg Source #

ToSBP MsgCommandReq Source # 

Methods

toSBP :: MsgCommandReq -> Word16 -> Msg Source #

ToSBP MsgCommandResp Source # 

Methods

toSBP :: MsgCommandResp -> Word16 -> Msg Source #

ToSBP MsgNetworkStateReq Source # 

Methods

toSBP :: MsgNetworkStateReq -> Word16 -> Msg Source #

ToSBP MsgNetworkStateResp Source # 

Methods

toSBP :: MsgNetworkStateResp -> Word16 -> Msg Source #

ToSBP MsgSpecan Source # 

Methods

toSBP :: MsgSpecan -> Word16 -> Msg Source #

ToSBP MsgSettingsSave Source # 

Methods

toSBP :: MsgSettingsSave -> Word16 -> Msg Source #

ToSBP MsgSettingsWrite Source # 

Methods

toSBP :: MsgSettingsWrite -> Word16 -> Msg Source #

ToSBP MsgSettingsReadReq Source # 

Methods

toSBP :: MsgSettingsReadReq -> Word16 -> Msg Source #

ToSBP MsgSettingsReadResp Source # 

Methods

toSBP :: MsgSettingsReadResp -> Word16 -> Msg Source #

ToSBP MsgSettingsReadByIndexReq Source # 

Methods

toSBP :: MsgSettingsReadByIndexReq -> Word16 -> Msg Source #

ToSBP MsgSettingsReadByIndexResp Source # 
ToSBP MsgSettingsReadByIndexDone Source # 
ToSBP MsgSettingsRegister Source # 

Methods

toSBP :: MsgSettingsRegister -> Word16 -> Msg Source #

ToSBP MsgStartup Source # 

Methods

toSBP :: MsgStartup -> Word16 -> Msg Source #

ToSBP MsgDgnssStatus Source # 

Methods

toSBP :: MsgDgnssStatus -> Word16 -> Msg Source #

ToSBP MsgHeartbeat Source # 

Methods

toSBP :: MsgHeartbeat -> Word16 -> Msg Source #

ToSBP MsgTrackingStateDetailed Source # 

Methods

toSBP :: MsgTrackingStateDetailed -> Word16 -> Msg Source #

ToSBP MsgTrackingState Source # 

Methods

toSBP :: MsgTrackingState -> Word16 -> Msg Source #

ToSBP MsgTrackingIq Source # 

Methods

toSBP :: MsgTrackingIq -> Word16 -> Msg Source #

ToSBP MsgTrackingStateDepA Source # 

Methods

toSBP :: MsgTrackingStateDepA -> Word16 -> Msg Source #

ToSBP MsgTrackingStateDepB Source # 

Methods

toSBP :: MsgTrackingStateDepB -> Word16 -> Msg Source #

ToSBP MsgUserData Source # 

Methods

toSBP :: MsgUserData -> Word16 -> Msg Source #