High-Level Samples
The recommended sample entry points are the two buildable high-level examples in samples/.
samples/high_level_sync.py
Run:
python samples/high_level_sync.py --host 192.168.250.100 --port 1025 --series iqr
What it demonstrates:
SlmpConnectionOptionsopen_and_connect_syncread_typed_syncwrite_typed_syncread_words_single_request_syncread_dwords_single_request_syncread_words_chunked_syncread_dwords_chunked_syncwrite_bit_in_word_syncread_named_syncwrite_named_syncpoll_sync
Example scenarios inside the sample:
- read one
ushort, oneshort, onefloat32, and one signed 32-bit value - write a typed recipe value
- read contiguous areas through explicit
single_requestandchunkedhelpers - set and clear one bit inside a control word
- read a mixed snapshot such as
["D100", "D200:F", "D202:L", "D50.3"] - poll the same snapshot repeatedly
samples/high_level_async.py
Run:
python samples/high_level_async.py --host 192.168.250.100 --port 1025
What it demonstrates:
SlmpConnectionOptionsopen_and_connectread_typedwrite_typedread_words_single_requestread_dwords_single_requestread_words_chunkedread_dwords_chunkedwrite_bit_in_wordread_namedwrite_namedpoll- queued shared connection usage
Example scenarios inside the sample:
- connect with an explicit frame/profile pair
- read and write typed scalar values
- read large arrays with explicit chunked helpers
- update one flag inside a word
- read and write mixed logical values by address string
- poll a snapshot every second
- share one connection across multiple concurrent tasks
Notes
- These two samples are the recommended user path.
- Older numbered samples remain in the repository for protocol-focused demonstrations, but the user manual now centers on the high-level helper layer.