Public Member Functions | |
__init__ (self, connection=None, mgmt_comm=None, comm_descriptor=None) | |
Must pass an opened TcpComm connection that can remain opened if listening for unsolicited msgs from printer. | |
get_all_values (self) | |
Read all settings key/value pairs. | |
str | get_value_for_key (self, str key) |
Read setting associated with given key. | |
dict | get_values_for_keys (self, list keys) |
Read multiple settings associated with given list of keys. | |
bool | set_value (self, str value, str key) |
Write a setting value associated with given key. | |
bool | set_values (self, dict keys_to_set) |
Write multiple settings associated with given keys. | |
Setting | get_properties_for_key (self, str key) |
Read properties associated with the given key. | |
dict | get_properties_for_keys (self, list keys) |
Read properties associated with the given list of keys. | |
dict | get_all_properties (self) |
Read all properties. | |
SettingsReadWrite.SettingsReadWrite.__init__ | ( | self, | |
connection = None, | |||
mgmt_comm = None, | |||
comm_descriptor = None ) |
Must pass an opened TcpComm connection that can remain opened if listening for unsolicited msgs from printer.
A connection is necessary to send/receive printer status msgs.
connection | The TCP communication object. |
mgmt_comm | The JSON communication object. |
comm_descriptor | The communication descriptor. |
dict SettingsReadWrite.SettingsReadWrite.get_all_properties | ( | self | ) |
Read all properties.
Implemented in SettingsReadWrite.
SettingsReadWrite.SettingsReadWrite.get_all_values | ( | self | ) |
Read all settings key/value pairs.
Implemented in SettingsReadWrite.
Setting SettingsReadWrite.SettingsReadWrite.get_properties_for_key | ( | self, | |
str | key ) |
Read properties associated with the given key.
Implemented in SettingsReadWrite.
key | The key for which to get the properties. |
dict SettingsReadWrite.SettingsReadWrite.get_properties_for_keys | ( | self, | |
list | keys ) |
Read properties associated with the given list of keys.
Implemented in SettingsReadWrite.
keys | An array of keys for which to get the properties. |
str SettingsReadWrite.SettingsReadWrite.get_value_for_key | ( | self, | |
str | key ) |
Read setting associated with given key.
Implemented in SettingsReadWrite.
key | The key for which to get the value. |
dict SettingsReadWrite.SettingsReadWrite.get_values_for_keys | ( | self, | |
list | keys ) |
Read multiple settings associated with given list of keys.
Implemented in SettingsReadWrite.
keys | An array of keys for which to get the values. |
bool SettingsReadWrite.SettingsReadWrite.set_value | ( | self, | |
str | value, | ||
str | key ) |
Write a setting value associated with given key.
Returns true if write successful.
Note: A value that is intended to be processed as strings should be quoted. e.g. value = SomeString and value = "SomeString" will be sent exactly as received but may be handled differently by printer.
Implemented in SettingsReadWrite.
value | The value to set. |
key | The key for which to set the value. |
bool SettingsReadWrite.SettingsReadWrite.set_values | ( | self, | |
dict | keys_to_set ) |
Write multiple settings associated with given keys.
Returns true if write successful.
Note: Values that are intended to be processed as strings should be quoted. e.g. value = SomeString and value = "SomeString" will be sent exactly as received but may be handled differently by printer.
Implemented in SettingsReadWrite.
keys_to_set | A dictionary containing the keys and values to set. |