sbp.logging module

Logging and debugging messages from the device.

class sbp.logging.MsgFwd(sbp=None, **kwargs)[source]

Bases: sbp.msg.SBP

SBP class for message MSG_FWD (0x0402).

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

This message provides the ability to forward messages over SBP. This may take the form

of wrapping up SBP messages received by Piksi for logging purposes or wrapping another protocol with SBP.

The source identifier indicates from what interface a forwarded stream derived. The protocol identifier identifies what the expected protocol the forwarded msg contains. Protocol 0 represents SBP and the remaining values are implementation defined.

sbp
: SBP
SBP parent object to inherit from.
source
: int
source identifier
protocol
: int
protocol identifier
fwd_payload
: string
variable length wrapped binary message
sender
: int
Optional sender ID, defaults to SENDER_ID (see sbp/msg.py).
from_binary(d)[source]

Given a binary payload d, update the appropriate payload fields of the message.

static from_json(s)[source]

Given a JSON-encoded string s, build a message object.

static from_json_dict(d)[source]
fwd_payload
protocol
source
to_binary()[source]

Produce a framed/packed SBP message.

to_json_dict()[source]
class sbp.logging.MsgLog(sbp=None, **kwargs)[source]

Bases: sbp.msg.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.

sbp
: SBP
SBP parent object to inherit from.
level
: int
Logging level
text
: string
Human-readable string
sender
: int
Optional sender ID, defaults to SENDER_ID (see sbp/msg.py).
from_binary(d)[source]

Given a binary payload d, update the appropriate payload fields of the message.

static from_json(s)[source]

Given a JSON-encoded string s, build a message object.

static from_json_dict(d)[source]
level
text
to_binary()[source]

Produce a framed/packed SBP message.

to_json_dict()[source]
class sbp.logging.MsgPrintDep(sbp=None, **kwargs)[source]

Bases: sbp.msg.SBP

SBP class for message MSG_PRINT_DEP (0x0010).

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

Deprecated.

sbp
: SBP
SBP parent object to inherit from.
text
: string
Human-readable string
sender
: int
Optional sender ID, defaults to SENDER_ID (see sbp/msg.py).
from_binary(d)[source]

Given a binary payload d, update the appropriate payload fields of the message.

static from_json(s)[source]

Given a JSON-encoded string s, build a message object.

static from_json_dict(d)[source]
text
to_binary()[source]

Produce a framed/packed SBP message.

to_json_dict()[source]
class sbp.logging.MsgTweet(sbp=None, **kwargs)[source]

Bases: sbp.msg.SBP

SBP class for message MSG_TWEET (0x0012).

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

All the news fit to tweet.

sbp
: SBP
SBP parent object to inherit from.
tweet
: string
Human-readable string
sender
: int
Optional sender ID, defaults to SENDER_ID (see sbp/msg.py).
from_binary(d)[source]

Given a binary payload d, update the appropriate payload fields of the message.

static from_json(s)[source]

Given a JSON-encoded string s, build a message object.

static from_json_dict(d)[source]
to_binary()[source]

Produce a framed/packed SBP message.

to_json_dict()[source]
tweet