How to use the sbp.jit.msg.SBP function in sbp

To help you get started, we’ve selected a few sbp examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github swift-nav / libsbp / python / sbp / jit / flash.py View on Github external
self.addr_len = res['addr_len']
    return res, off, length

  @classmethod
  def _payload_size(self):
    ret = 0
    # target: u8
    ret += 1
    # addr_start: array of u8
    ret += 1 * 3
    # addr_len: u8
    ret += 1
    return ret
  
SBP_MSG_FLASH_ERASE = 0x00E2
class MsgFlashErase(SBP):
  """SBP class for message MSG_FLASH_ERASE (0x00E2).

  You can have MSG_FLASH_ERASE inherit its fields directly
  from an inherited SBP object, or construct it inline using a dict
  of its fields.

  
  The flash erase message from the host erases a sector of either
the STM or M25 onboard flash memory. The device will reply with a
MSG_FLASH_DONE message containing the return code - FLASH_OK (0)
on success or FLASH_INVALID_FLASH (1) if the flash specified is
invalid.


  """
  __slots__ = ['target',
github swift-nav / libsbp / python / sbp / jit / piksi.py View on Github external
return {}, offset, length
    self.sequence = res['sequence']
    self.line = res['line']
    return res, off, length

  @classmethod
  def _payload_size(self):
    ret = 0
    # sequence: u32
    ret += 4
    # line: string
    ret += 247
    return ret
  
SBP_MSG_NETWORK_STATE_REQ = 0x00BA
class MsgNetworkStateReq(SBP):
  """SBP class for message MSG_NETWORK_STATE_REQ (0x00BA).

  You can have MSG_NETWORK_STATE_REQ inherit its fields directly
  from an inherited SBP object, or construct it inline using a dict
  of its fields.

  
  Request state of Piksi network interfaces.
Output will be sent in MSG_NETWORK_STATE_RESP messages


  """
  __slots__ = []
  def _unpack_members(self, buf, offset, length):
    return {}, offset, length
github swift-nav / libsbp / python / sbp / jit / acquisition.py View on Github external
def parse_members(cls, buf, offset, length):
    ret = {}
    (__cn0, offset, length) = get_f32(buf, offset, length)
    ret['cn0'] = judicious_round(np.float32(__cn0)) if SBP.judicious_rounding else __cn0
    (__cp, offset, length) = get_f32(buf, offset, length)
    ret['cp'] = judicious_round(np.float32(__cp)) if SBP.judicious_rounding else __cp
    (__cf, offset, length) = get_f32(buf, offset, length)
    ret['cf'] = judicious_round(np.float32(__cf)) if SBP.judicious_rounding else __cf
    (__sid, offset, length) = GnssSignalDep.parse_members(buf, offset, length)
    ret['sid'] = __sid
    return ret, offset, length
github swift-nav / libsbp / python / sbp / jit / tracking.py View on Github external
self.cn0 = res['cn0']
    return res, off, length

  @classmethod
  def _payload_size(self):
    ret = 0
    # state: u8
    ret += 1
    # sid: GnssSignalDep
    ret += GnssSignalDep._payload_size()
    # cn0: float
    ret += 4
    return ret
  
SBP_MSG_TRACKING_STATE_DEP_B = 0x0013
class MsgTrackingStateDepB(SBP):
  """SBP class for message MSG_TRACKING_STATE_DEP_B (0x0013).

  You can have MSG_TRACKING_STATE_DEP_B inherit its fields directly
  from an inherited SBP object, or construct it inline using a dict
  of its fields.

  
  Deprecated.

  """
  __slots__ = ['states',
               ]
  @classmethod
  def parse_members(cls, buf, offset, length):
    ret = {}
    (__states, offset, length) = get_array(TrackingChannelStateDepB.parse_members)(buf, offset, length)
github swift-nav / libsbp / python / sbp / jit / acquisition.py View on Github external
  @classmethod
  def _payload_size(self):
    ret = 0
    # cn0: float
    ret += 4
    # cp: float
    ret += 4
    # cf: float
    ret += 4
    # sid: GnssSignal
    ret += GnssSignal._payload_size()
    return ret
  
SBP_MSG_ACQ_RESULT_DEP_C = 0x001F
class MsgAcqResultDepC(SBP):
  """SBP class for message MSG_ACQ_RESULT_DEP_C (0x001F).

  You can have MSG_ACQ_RESULT_DEP_C inherit its fields directly
  from an inherited SBP object, or construct it inline using a dict
  of its fields.

  
  Deprecated.

  """
  __slots__ = ['cn0',
               'cp',
               'cf',
               'sid',
               ]
  @classmethod
github swift-nav / libsbp / python / sbp / jit / logging.py View on Github external
import json

import numpy as np

from sbp.jit.msg import SBP, SENDER_ID
from sbp.jit.msg import get_u8, get_u16, get_u32, get_u64
from sbp.jit.msg import get_s8, get_s16, get_s32, get_s64
from sbp.jit.msg import get_f32, get_f64, judicious_round
from sbp.jit.msg import get_string, get_fixed_string, get_setting
from sbp.jit.msg import get_array, get_fixed_array

# Automatically generated from piksi/yaml/swiftnav/sbp/logging.yaml with generate.py.
# Please do not hand edit!
SBP_MSG_LOG = 0x0401
class MsgLog(SBP):
  """SBP class for message MSG_LOG (0x0401).

  You can have MSG_LOG inherit its fields directly
  from an inherited SBP object, or construct it inline using a dict
  of its fields.

  
  This message contains a human-readable payload string from the
device containing errors, warnings and informational messages at
ERROR, WARNING, DEBUG, INFO logging levels.


  """
  __slots__ = ['level',
               'text',
               ]
github swift-nav / libsbp / python / sbp / jit / flash.py View on Github external
import json

import numpy as np

from sbp.jit.msg import SBP, SENDER_ID
from sbp.jit.msg import get_u8, get_u16, get_u32, get_u64
from sbp.jit.msg import get_s8, get_s16, get_s32, get_s64
from sbp.jit.msg import get_f32, get_f64, judicious_round
from sbp.jit.msg import get_string, get_fixed_string, get_setting
from sbp.jit.msg import get_array, get_fixed_array

# Automatically generated from piksi/yaml/swiftnav/sbp/flash.yaml with generate.py.
# Please do not hand edit!
SBP_MSG_FLASH_PROGRAM = 0x00E6
class MsgFlashProgram(SBP):
  """SBP class for message MSG_FLASH_PROGRAM (0x00E6).

  You can have MSG_FLASH_PROGRAM inherit its fields directly
  from an inherited SBP object, or construct it inline using a dict
  of its fields.

  
  The flash program message programs a set of addresses of either
the STM or M25 flash. The device replies with either a
MSG_FLASH_DONE message containing the return code FLASH_OK (0)
on success, or FLASH_INVALID_LEN (2) if the maximum write size
is exceeded. Note that the sector-containing addresses must be
erased before addresses can be programmed.


  """
github swift-nav / libsbp / python / sbp / jit / tracking.py View on Github external
return {}, offset, length
    self.I = res['I']
    self.Q = res['Q']
    return res, off, length

  @classmethod
  def _payload_size(self):
    ret = 0
    # I: s32
    ret += 4
    # Q: s32
    ret += 4
    return ret
  
SBP_MSG_TRACKING_IQ_DEP_B = 0x002C
class MsgTrackingIqDepB(SBP):
  """SBP class for message MSG_TRACKING_IQ_DEP_B (0x002C).

  You can have MSG_TRACKING_IQ_DEP_B inherit its fields directly
  from an inherited SBP object, or construct it inline using a dict
  of its fields.

  
  When enabled, a tracking channel can output the correlations at each
update interval.


  """
  __slots__ = ['channel',
               'sid',
               'corrs',
               ]
github swift-nav / libsbp / python / sbp / jit / piksi.py View on Github external
return {}, offset, length
    self.mask = res['mask']
    self.sid = res['sid']
    return res, off, length

  @classmethod
  def _payload_size(self):
    ret = 0
    # mask: u8
    ret += 1
    # sid: GnssSignalDep
    ret += GnssSignalDep._payload_size()
    return ret
  
SBP_MSG_DEVICE_MONITOR = 0x00B5
class MsgDeviceMonitor(SBP):
  """SBP class for message MSG_DEVICE_MONITOR (0x00B5).

  You can have MSG_DEVICE_MONITOR inherit its fields directly
  from an inherited SBP object, or construct it inline using a dict
  of its fields.

  
  This message contains temperature and voltage level measurements from the
processor's monitoring system and the RF frontend die temperature if
available.


  """
  __slots__ = ['dev_vin',
               'cpu_vint',
               'cpu_vaux',
github swift-nav / libsbp / python / sbp / jit / navigation.py View on Github external
# cov_n_d: float
    ret += 4
    # cov_e_e: float
    ret += 4
    # cov_e_d: float
    ret += 4
    # cov_d_d: float
    ret += 4
    # n_sats: u8
    ret += 1
    # flags: u8
    ret += 1
    return ret
  
SBP_MSG_BASELINE_ECEF = 0x020B
class MsgBaselineECEF(SBP):
  """SBP class for message MSG_BASELINE_ECEF (0x020B).

  You can have MSG_BASELINE_ECEF inherit its fields directly
  from an inherited SBP object, or construct it inline using a dict
  of its fields.

  
  This message reports the baseline solution in Earth Centered
Earth Fixed (ECEF) coordinates. This baseline is the relative
vector distance from the base station to the rover receiver. The
full GPS time is given by the preceding MSG_GPS_TIME with the
matching time-of-week (tow).


  """
  __slots__ = ['tow',