Skip to content

Commit

Permalink
host: Add string getters/setters to the Python property tree library.
Browse files Browse the repository at this point in the history
  • Loading branch information
chemeris committed Dec 21, 2015
1 parent ad8ff4a commit e4c59df
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions host/utils/umtrx_property_tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ def query_range_raw(self, path):
self._send_request('GET', path, value_type='RANGE')
return self._recv_response()

def query_string_raw(self, path):
self._send_request('GET', path, value_type='STRING')
return self._recv_response()

#
# Getters (value)
#
Expand All @@ -83,6 +87,10 @@ def query_range_value(self, path):
res = self.query_range_raw(path)
return res['result']

def query_string_value(self, path):
res = self.query_string_raw(path)
return res['result']

#
# Setters
#
Expand All @@ -99,6 +107,10 @@ def set_double(self, path, val):
self._send_request('SET', path, value_type='DOUBLE', value=val)
return self._recv_response()

def set_string(self, path, val):
self._send_request('SET', path, value_type='STRING', value=val)
return self._recv_response()

#
# Check path presence and list paths
#
Expand Down

0 comments on commit e4c59df

Please sign in to comment.