Copyright | Copyright (C) 2015-2021 Swift Navigation Inc. |
---|---|
License | MIT |
Stability | experimental |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
SwiftNav.SBP.Types
Description
Common SBP type requirements, containers, and serialization utilities.
Synopsis
- data Msg = Msg {
- _msgSBPType :: !Word16
- _msgSBPSender :: !Word16
- _msgSBPLen :: !Word8
- _msgSBPPayload :: !Bytes
- _msgSBPCrc :: !Word16
- newtype Bytes = Bytes {}
- msgSBPPreamble :: Word8
- defaultSender :: Word16
- class Binary a => ToSBP a where
- class HasMsg c where
- checkCrc :: Msg -> Word16
Documentation
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
|
Wrapper around ByteString for *JSON and Binary typeclass instances.
Constructors
Bytes | |
Fields |
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.
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.