Closed merose closed 2 years ago
Addressed as of v1.7.6
Example usage:
from datetime import datetime, timezone
from yamcs.tmtc.model import ValueUpdate
gentime = datetime.now(tz=timezone.utc)
# Example 1
processor.set_parameter_value("/some/parameter", 123, generation_time=gentime)
processor.set_parameter_value("/some/other/parameter", 456, generation_time=gentime)
# Example 2
processor.set_parameter_values({
"/some/parameter": 123,
"/some/other/parameter": 456
}, generation_time=gentime)
# Example 3
processor.set_parameter_values({
"/some/parameter": ValueUpdate(123, generation_time=gentime),
"/some/other/parameter": ValueUpdate(456, generation_time=gentime)
})
Works also for set_parameter_value
because it gets redirected to set_parameter_values
(thinking to get rid of the non-batch HTTP method on Yamcs).
This is related to the Yamcs enhancement in https://github.com/yamcs/yamcs/issues/605.
It is currently possible to specify the generation time when writing parameters using the
batchSetParameterValues
API. The corresponding Python API should also support an optional argument to specify the generation time.