oldb snippets: check existence of dp, write dp value authored by Marcus Schilling's avatar Marcus Schilling
...@@ -1903,7 +1903,15 @@ Type "help", "copyright", "credits" or "license" for more information. ...@@ -1903,7 +1903,15 @@ Type "help", "copyright", "credits" or "license" for more information.
```plaintext ```plaintext
>>> elt.oldb.CiiOldbGlobal.set_write_enabled(True) >>> elt.oldb.CiiOldbGlobal.set_write_enabled(True)
>>> oldb.create_data_point_by_value (Uri("cii.oldb:/ccs/tst/tmp1"), "my text") >>> if not oldb.data_point_exists(Uri("cii.oldb:/ccs/tst/tmp1")):
>>> oldb.create_data_point_by_value (Uri("cii.oldb:/ccs/tst/tmp1"), "my text")
```
… and, to write a datapoint:
```plaintext
>>> elt.oldb.CiiOldbGlobal.set_write_enabled(True)
>>> oldb.get_data_point (Uri("cii.oldb:/ccs/tst/tmp1")).write_value("my text")
``` ```
… and, to read a datapoint: … and, to read a datapoint:
... ...
......