sbp.settings module¶
Messages for reading, writing, and discovering device settings. Settings with a “string” field have multiple values in this field delimited with a null character (the c style null terminator). For instance, when querying the ‘firmware_version’ setting in the ‘system_info’ section, the following array of characters needs to be sent for the string field in MSG_SETTINGS_READ: “system_infofirmware_version”, where the delimiting null characters are specified with the escape sequence ‘’ and all quotation marks should be omitted.
In the message descriptions below, the generic strings SECTION_SETTING and SETTING are used to refer to the two strings that comprise the identifier of an individual setting.In firmware_version example above, SECTION_SETTING is the ‘system_info’, and the SETTING portion is ‘firmware_version’.
See the “Software Settings Manual” on support.swiftnav.com for detailed documentation about all settings and sections available for each Swift firmware version. Settings manuals are available for each firmware version at the following link: https://support.swiftnav.com/customer/en/portal/articles/2628580-piksi-multi-specifications#settings. The latest settings document is also available at the following link: http://swiftnav.com/latest/piksi-multi-settings . See lastly https://github.com/swift-nav/piksi_tools/blob/master/piksi_tools/settings.py , the open source python command line utility for reading, writing, and saving settings in the piksi_tools repository on github as a helpful reference and example.
-
class
sbp.settings.
MsgSettingsReadByIndexDone
(sbp=None, **kwargs)[source]¶ Bases:
sbp.msg.SBP
SBP class for message MSG_SETTINGS_READ_BY_INDEX_DONE (0x00A6).
You can have MSG_SETTINGS_READ_BY_INDEX_DONE inherit its fields directly from an inherited SBP object, or construct it inline using a dict of its fields.
The settings message for indicating end of the settings values.
-
class
sbp.settings.
MsgSettingsReadByIndexReq
(sbp=None, **kwargs)[source]¶ Bases:
sbp.msg.SBP
SBP class for message MSG_SETTINGS_READ_BY_INDEX_REQ (0x00A2).
You can have MSG_SETTINGS_READ_BY_INDEX_REQ inherit its fields directly from an inherited SBP object, or construct it inline using a dict of its fields.
The settings message for iterating through the settings
values. A device will respond to this message with a “MSG_SETTINGS_READ_BY_INDEX_RESP”.
- sbp : SBP
- SBP parent object to inherit from.
- index : int
- An index into the device settings, with values ranging from
0 to length(settings)
- 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.
-
index
¶
-
class
sbp.settings.
MsgSettingsReadByIndexResp
(sbp=None, **kwargs)[source]¶ Bases:
sbp.msg.SBP
SBP class for message MSG_SETTINGS_READ_BY_INDEX_RESP (0x00A7).
You can have MSG_SETTINGS_READ_BY_INDEX_RESP inherit its fields directly from an inherited SBP object, or construct it inline using a dict of its fields.
The settings message that reports the value of a setting at an index.
In the string field, it reports NULL-terminated and delimited string with contents “SECTION_SETTINGSETTINGVALUEFORMAT_TYPE”. where the ‘’ escape sequence denotes the NULL character and where quotation marks are omitted. The FORMAT_TYPE field is optional and denotes possible string values of the setting as a hint to the user. If included, the format type portion of the string has the format “enum:value1,value2,value3”. An example string that could be sent from the device is “simulatorenabledTrueenum:True,False”
- sbp : SBP
- SBP parent object to inherit from.
- index : int
- An index into the device settings, with values ranging from
0 to length(settings)
- setting : string
- A NULL-terminated and delimited string with contents
“SECTION_SETTINGSETTINGVALUEFORMAT_TYPE”
- 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.
-
index
¶
-
setting
¶
-
class
sbp.settings.
MsgSettingsReadReq
(sbp=None, **kwargs)[source]¶ Bases:
sbp.msg.SBP
SBP class for message MSG_SETTINGS_READ_REQ (0x00A4).
You can have MSG_SETTINGS_READ_REQ inherit its fields directly from an inherited SBP object, or construct it inline using a dict of its fields.
The setting message that reads the device configuration. The string
field is a NULL-terminated and NULL-delimited string with contents “SECTION_SETTINGSETTING” where the ‘’ escape sequence denotes the NULL character and where quotation marks are omitted. An example string that could be sent to a device is “solutionsoln_freq”. A device will only respond to this message when it is received from sender ID 0x42. A device should respond with a MSG_SETTINGS_READ_RESP message (msg_id 0x00A5).
- sbp : SBP
- SBP parent object to inherit from.
- setting : string
- A NULL-terminated and NULL-delimited string with contents
“SECTION_SETTINGSETTING”
- 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.
-
setting
¶
-
class
sbp.settings.
MsgSettingsReadResp
(sbp=None, **kwargs)[source]¶ Bases:
sbp.msg.SBP
SBP class for message MSG_SETTINGS_READ_RESP (0x00A5).
You can have MSG_SETTINGS_READ_RESP inherit its fields directly from an inherited SBP object, or construct it inline using a dict of its fields.
The setting message wich which the device responds after a
MSG_SETTING_READ_REQ is sent to device. The string field is a NULL-terminated and NULL-delimited string with contents “SECTION_SETTINGSETTINGVALUE” where the ‘’ escape sequence denotes the NULL character and where quotation marks are omitted. An example string that could be sent from device is “solutionsoln_freq”.
- sbp : SBP
- SBP parent object to inherit from.
- setting : string
- A NULL-terminated and NULL-delimited string with contents
“SECTION_SETTINGSETTINGVALUE”
- 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.
-
setting
¶
-
class
sbp.settings.
MsgSettingsRegister
(sbp=None, **kwargs)[source]¶ Bases:
sbp.msg.SBP
SBP class for message MSG_SETTINGS_REGISTER (0x00AE).
You can have MSG_SETTINGS_REGISTER inherit its fields directly from an inherited SBP object, or construct it inline using a dict of its fields.
This message registers the presence and default value of a setting
with a settings daemon. The host should reply with MSG_SETTINGS_WRITE for this setting to set the initial value.
- sbp : SBP
- SBP parent object to inherit from.
- setting : string
- A NULL-terminated and delimited string with contents
“SECTION_SETTINGSETTINGVALUE”.
- 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.
-
setting
¶
-
class
sbp.settings.
MsgSettingsSave
(sbp=None, **kwargs)[source]¶ Bases:
sbp.msg.SBP
SBP class for message MSG_SETTINGS_SAVE (0x00A1).
You can have MSG_SETTINGS_SAVE inherit its fields directly from an inherited SBP object, or construct it inline using a dict of its fields.
The save settings message persists the device’s current settings
configuration to its onboard flash memory file system.
-
class
sbp.settings.
MsgSettingsWrite
(sbp=None, **kwargs)[source]¶ Bases:
sbp.msg.SBP
SBP class for message MSG_SETTINGS_WRITE (0x00A0).
You can have MSG_SETTINGS_WRITE inherit its fields directly from an inherited SBP object, or construct it inline using a dict of its fields.
The setting message writes the device configuration for a particular
setting via A NULL-terminated and NULL-delimited string with contents “SECTION_SETTINGSETTINGVALUE” where the ‘’ escape sequence denotes the NULL character and where quotation marks are omitted. A device will only process to this message when it is received from sender ID 0x42. An example string that could be sent to a device is “solutionsoln_freq”.
- sbp : SBP
- SBP parent object to inherit from.
- setting : string
- A NULL-terminated and NULL-delimited string with contents
“SECTION_SETTINGSETTINGVALUE”
- 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.
-
setting
¶
-
class
sbp.settings.
MsgSettingsWriteResp
(sbp=None, **kwargs)[source]¶ Bases:
sbp.msg.SBP
SBP class for message MSG_SETTINGS_WRITE_RESP (0x00AF).
You can have MSG_SETTINGS_WRITE_RESP inherit its fields directly from an inherited SBP object, or construct it inline using a dict of its fields.
Return the status of a write request with the new value of the
setting. If the requested value is rejected, the current value will be returned. The string field is a NULL-terminated and NULL-delimited string with contents “SECTION_SETTINGSETTINGVALUE” where the ‘’ escape sequence denotes the NULL character and where quotation marks are omitted. An example string that could be sent from device is “solutionsoln_freq”.
- sbp : SBP
- SBP parent object to inherit from.
- status : int
- Write status
- setting : string
- A NULL-terminated and delimited string with contents
“SECTION_SETTINGSETTINGVALUE”
- 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.
-
setting
¶
-
status
¶