Skip to content
Open
4 changes: 0 additions & 4 deletions clientlib/python/samples/pointset/cov_throttling.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,6 @@
def simulate_fast_sensor(manager: PointsetManager):
"""
Simulates a sensor reading that changes rapidly (every 1.0s).

Represents an independently running hardware thread or fast I/O loop. It blindly
pushes raw data to the PointsetManager, illustrating that the manager itself takes
on the responsibility of throttling and interpreting Change of Value (cov_increment).
"""
val = 0.0
LOGGER.info("Starting sensor simulation (1.0s interval)...")
Expand Down
123 changes: 0 additions & 123 deletions clientlib/python/samples/pointset/custom_point_factory.py

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,6 @@
def on_writeback(point_name: str, value: Any):
"""
Callback triggered when the Cloud sends a 'set_value' in the configuration.
Acts as the single global actuator function (Legacy approach). It is responsible
for parsing the writeback command, commanding the physical hardware, simulating
feedback, and returning the resulting ValueState or an explicit WritebackResult.

This callback can return:
- None / ValueState.applied -> Mark update as success (applied)
Expand Down Expand Up @@ -108,11 +105,9 @@ def on_writeback(point_name: str, value: Any):
pointset_manager = device.get_manager(PointsetManager)

# ---------------------------------------------------------------------
# DEPRECATED: Register the global Writeback Handler
# ---------------------------------------------------------------------
# This is the legacy approach for point actuation. It is recommended to
# use the point_factory pattern and subclass AbstractPoint instead.
# See custom_point_factory.py for the modern approach.
# CRITICAL STEP: Register the Writeback Handler
# Without this, the library updates its internal state to match the config,
# but your physical device remains unchanged.
# ---------------------------------------------------------------------
pointset_manager.set_writeback_handler(on_writeback)
LOGGER.info("Writeback handler registered.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,6 @@
def report_managed_points(manager: PointsetManager):
"""
Periodically logs the inventory of points the device is tracking.
A diagnostic loop serving to prove that the PointsetManager is successfully
allocating and managing new point abstractions dynamically based purely on the
arrival of cloud configuration payloads.
"""
last_set = set()

Expand Down
3 changes: 0 additions & 3 deletions clientlib/python/samples/pointset/telemetry_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,6 @@
def update_sensors_loop(pointset_manager):
"""
Simulates a loop that reads hardware sensors and updates the PointsetManager.
Represents an independent Data Acquisition (DAQ) thread. It is completely decoupled
from the network telemetry reporting cycle. Its sole job is to keep the PointsetManager's
internal cache fresh with the latest hardware readings.
"""
LOGGER.info("Starting sensor simulation loop (Interval: 2s)...")

Expand Down
101 changes: 0 additions & 101 deletions clientlib/python/samples/pointset/telemetry_poll_bulk_provider.py

This file was deleted.

7 changes: 3 additions & 4 deletions clientlib/python/samples/pointset/telemetry_poll_callback.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,9 @@
def my_sensor_poll() -> Dict[str, Any]:
"""
Called by the PointsetManager background thread.
Provides a Just-in-Time (Pull) mechanism for data acquisition. Instead of
running a separate DAQ loop, the user delegates the polling rhythm to the
PointsetManager. This function must perform synchronous hardware reads and
return a dictionary of {point_name: value}.

This function should perform the actual hardware reads (e.g. I2C, Modbus).
It must return a dictionary of {point_name: value}.
"""
# Simulate reading hardware registers
temp = round(random.uniform(20.0, 25.0), 2)
Expand Down
Loading
Loading