本文整理汇总了Python中sbp.msg.SBP类的典型用法代码示例。如果您正苦于以下问题:Python SBP类的具体用法?Python SBP怎么用?Python SBP使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了SBP类的16个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: from_json
def from_json(s):
"""Given a JSON-encoded string s, build a message object.
"""
d = json.loads(s)
sbp = SBP.from_json_dict(d)
return MsgSettingsReadByIndexResp(sbp)
开发者ID:JoshuaGross,项目名称:libsbp,代码行数:7,代码来源:settings.py
示例2: from_json
def from_json(s):
"""Given a JSON-encoded string s, build a message object.
"""
d = json.loads(s)
sbp = SBP.from_json_dict(d)
return MsgEphemerisDepA(sbp)
开发者ID:namhh,项目名称:libsbp,代码行数:7,代码来源:observation.py
示例3: from_json
def from_json(s):
"""Given a JSON-encoded string s, build a message object.
"""
d = json.loads(s)
sbp = SBP.from_json_dict(d)
return MsgMaskSatellite(sbp)
开发者ID:chenyanming,项目名称:ArduMing,代码行数:7,代码来源:piksi.py
示例4: from_json
def from_json(s):
"""Given a JSON-encoded string s, build a message object.
"""
d = json.loads(s)
sbp = SBP.from_json_dict(d)
return MsgBootloaderHandshakeDepA(sbp)
开发者ID:chenyanming,项目名称:ArduMing,代码行数:7,代码来源:bootload.py
示例5: from_json
def from_json(s):
"""Given a JSON-encoded string s, build a message object.
"""
d = json.loads(s)
sbp = SBP.from_json_dict(d)
return MsgStmUniqueIdResp(sbp)
开发者ID:namhh,项目名称:libsbp,代码行数:7,代码来源:flash.py
示例6: from_json
def from_json(s):
"""Given a JSON-encoded string s, build a message object.
"""
d = json.loads(s)
sbp = SBP.from_json_dict(d)
return MsgBaselineHeading(sbp)
开发者ID:namhh,项目名称:libsbp,代码行数:7,代码来源:navigation.py
示例7: assert_package
def assert_package(test_filename, pkg_name):
"""
Runs unit tests for message bindings by reading a YAML unit test
specification, parsing a raw packet for each test, and then
asserting that SBP messages and parsed payloads have their intended
values.
Parameters
----------
test_filename : str
Filepath to unit test specifications
pkg_name : str
Name of package to test
"""
with open(test_filename, 'r') as f:
pkg = yaml.load(f.read())
_assert_sane_package(pkg_name, pkg)
for test_case in pkg['tests']:
sbp = SBP.unpack(base64.standard_b64decode(test_case['raw_packet']))
_assert_sbp(sbp, test_case['sbp'])
_assert_msg(dispatch(sbp), test_case['msg'])
_assert_msg_roundtrip(dispatch(sbp), test_case['raw_packet'])
_assert_msg_roundtrip_json(dispatch(sbp), test_case['raw_json'])
_assert_materialization(test_case['msg'], sbp, test_case['raw_json'])
开发者ID:swift-nav,项目名称:libsbp,代码行数:25,代码来源:utils.py
示例8: from_json_dict
def from_json_dict(d):
sbp = SBP.from_json_dict(d)
return MsgFileioConfigResp(sbp, **d)
开发者ID:swift-nav,项目名称:libsbp,代码行数:3,代码来源:file_io.py
示例9: from_json_dict
def from_json_dict(d):
sbp = SBP.from_json_dict(d)
return MsgSettingsSave(sbp, **d)
开发者ID:wltr,项目名称:libsbp,代码行数:3,代码来源:settings.py
示例10: from_json_dict
def from_json_dict(d):
sbp = SBP.from_json_dict(d)
return MsgTrackingStateDetailedDep(sbp, **d)
开发者ID:swift-nav,项目名称:libsbp,代码行数:3,代码来源:tracking.py
示例11: from_json_dict
def from_json_dict(d):
sbp = SBP.from_json_dict(d)
return MsgPrintDep(sbp, **d)
开发者ID:sashamitelman,项目名称:libsbp,代码行数:3,代码来源:logging.py
示例12: from_json_dict
def from_json_dict(d):
sbp = SBP.from_json_dict(d)
return MsgOdometry(sbp, **d)
开发者ID:swift-nav,项目名称:libsbp,代码行数:3,代码来源:vehicle.py
示例13: from_json_dict
def from_json_dict(d):
sbp = SBP.from_json_dict(d)
return MsgAcqSvProfile(sbp, **d)
开发者ID:SenteraLLC,项目名称:libsbp,代码行数:3,代码来源:acquisition.py
示例14: pull_it
def pull_it(data):
handler.framer.write(SBP.from_json(data).pack())
开发者ID:kovach,项目名称:libsbp,代码行数:2,代码来源:pusher_client.py
示例15: from_json_dict
def from_json_dict(d):
sbp = SBP.from_json_dict(d)
return MsgBasePosECEF(sbp, **d)
开发者ID:axlan,项目名称:libsbp,代码行数:3,代码来源:observation.py
示例16: from_json_dict
def from_json_dict(d):
sbp = SBP.from_json_dict(d)
return MsgSbasRaw(sbp, **d)
开发者ID:swift-nav,项目名称:libsbp,代码行数:3,代码来源:sbas.py
注:本文中的sbp.msg.SBP类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论