diff --git a/clients/python/src/zb_mom_ww_mxgateway/session.py b/clients/python/src/zb_mom_ww_mxgateway/session.py index 793d3fb..1302025 100644 --- a/clients/python/src/zb_mom_ww_mxgateway/session.py +++ b/clients/python/src/zb_mom_ww_mxgateway/session.py @@ -516,6 +516,10 @@ class Session: element type of the target array attribute. total_length: Total number of elements in the written array. Must be > 0 and large enough to contain every index in *elements*. + Both *total_length* and all keys in *elements* must be + non-negative; the gateway rejects negative or out-of-range + values with ``InvalidArgument`` (the proto fields are + ``uint32``). elements: Mapping of zero-based element index to scalar value. Values are converted with :func:`~zb_mom_ww_mxgateway.values.to_mx_value`. user_id: Galaxy user id to stamp on the write (requires a prior diff --git a/gateway.md b/gateway.md index 156aa1d..dd3c706 100644 --- a/gateway.md +++ b/gateway.md @@ -512,10 +512,10 @@ Default values by element type: | Element type | Default | |---|---| | `Boolean` | `false` | -| `Integer` / `LongInteger` | `0` | +| `Integer` | `0` (int32, or int64 when an element value is 64-bit) | | `Float` / `Double` | `0` | | `String` | `""` | -| `Time` / `Timestamp` | Unix epoch (1970-01-01T00:00:00Z) | +| `Time` | Unix epoch (1970-01-01T00:00:00Z) | Unmentioned indices take the element type's default — this is a **reset**, not a preserve. There is no read-modify-write merge: adding that would introduce cache