param.GetSet - string parameters support

This commit is contained in:
Pavel Kirienko
2015-02-03 23:41:34 +03:00
parent 54696997af
commit a50399266a
3 changed files with 22 additions and 11 deletions
+11 -7
View File
@@ -2,19 +2,23 @@
# Get or set a parameter by name or by index.
#
# If set - parameter will be assigned this value, then the new value will be returned
# If not set - current parameter value will be returned
# If set - parameter will be assigned this value, then the new value will be returned.
# If not set - current parameter value will be returned.
# Refer to the definition of Value for details.
Value value
# Index of the parameter starting from 0; ignored if name is nonempty
# Index of the parameter starting from 0; ignored if name is nonempty.
uint8 index
# Name of the parameter; always preferred over index if nonempty
uint8[<=40] name
# Name of the parameter; always preferred over index if nonempty.
uint8[<64] name
---
# Actual parameter value. For write requests it must contain the newly assigned parameter value.
# Actual parameter value.
# For set requests, it should contain the actual parameter value after the set request was
# executed. The objective is to let the client know if the value could not be updated, e.g.
# due to its range violation, etc.
# Empty value indicates that there is no such parameter.
Value value
@@ -23,4 +27,4 @@ Value max_value # Optional
Value min_value # Optional
# Empty name in response indicates that there is no such parameter
uint8[<=40] name
uint8[<64] name
+6 -4
View File
@@ -1,8 +1,10 @@
#
# Single parameter value.
# The actual type should be detected from the available values, as described below.
# The actual type should be inferred from the available values, as described below.
# If none of the values below are present, the value is considered empty.
#
bool[<=1] value_bool # Preferred over int and float if ambiguous
int64[<=1] value_int # Preferred over float if ambiguous
float32[<=1] value_float
bool[<=1] value_bool # Preferred over int, float and string if ambiguous
int64[<=1] value_int # Preferred over float and string if ambiguous
float32[<=1] value_float # Preferred over string if ambiguous
ValueString[<=1] value_string # This one will be used only if all above are empty
@@ -0,0 +1,5 @@
#
# This type is nested in Value.
#
uint8[<=80] value