ExCEP. Gateway. ReportScheduler
(ex_cep v0.1.1)
Copy Markdown
Periodic and spontaneous DataSpont reporting engine for an Edge Gateway (Section 8.7 & 8.9).
Manages:
- Registered sub-devices (
device_id => model) - Live point values (
{device_id, service_id, data_refer} => %{value, angle, quality, timestamp}) ExCEP.Gateway.SubscriptionManagerrules- Automatic periodic timers (
TransCot: "peroid"per Table 112, or"period"whenlegacy_trans_cot: false) - Immediate spontaneous uploads (
TransCot: "spont") whenever a subscribed point changes
Summary
Functions
Applies a DataSubs Subs list and reschedules periodic timers.
Returns a specification to start this module under a supervisor.
Triggers an immediate periodic upload for {device_id, service_id} (useful in tests).
Registers a sub-device instance with its model name.
Updates a data point value. If the point matches an active spontaneous subscription
and the value changed, immediately uploads a DataSpont (TransCot: "spont") frame.
Functions
@spec apply_subscriptions(GenServer.server(), [map()]) :: [map()]
Applies a DataSubs Subs list and reschedules periodic timers.
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec flush_periodic(GenServer.server(), String.t(), String.t()) :: :ok
Triggers an immediate periodic upload for {device_id, service_id} (useful in tests).
@spec register_device(GenServer.server(), String.t(), String.t()) :: :ok
Registers a sub-device instance with its model name.
@spec start_link(keyword()) :: GenServer.on_start()
@spec update_point( GenServer.server(), String.t(), String.t(), String.t(), term(), keyword() ) :: :ok
Updates a data point value. If the point matches an active spontaneous subscription
and the value changed, immediately uploads a DataSpont (TransCot: "spont") frame.