Class SdcProviderDispatcher
SdcProviderDispatcher, INTEROP_PLAN Step 3 Phase B):
exposes FRAMED as a BICEPS provider whose MDIB mirrors the mapped channels, so any SDC
consumer can discover the device over WS-Discovery, read the MDIB and subscribe to episodic
metric reports and waveform streams (MDPWS/WS-Eventing, via SDCri).
MDIB shape. One MDS ("framed.mds"); per configured device group one VMD and
one channel; one metric descriptor per mapped FRAMED channel, created on the first datapoint
that flows (so device-agnostic mapping keys and late-announced channels work): mapping
kind metric/setting becomes a numeric or string metric (BICEPS metric
category MSRMT/SET), waveform becomes a real-time sample array.
Descriptors carry a coded type only when the mapping assigns an mdc nomenclature code
(never a guessed one); units are encoded as UCUM (http://unitsofmeasure.org).
Cadence. Waveform samples bypass the EmissionGate — SDC's waveform streams are
designed for device rate — and are buffered into sample arrays of waveformChunkSize
values. Metrics and settings pass the gate like every other interop bridge.
Threading. All MDIB writes happen on the single Dispatcher push worker;
SDCri handles report fan-out on its own executors, so the bus handler thread never blocks.
Security. This phase binds plain HTTP (no TLS). Productive SDC deployments require
the MDPWS security profile; wiring CryptoConfig is deferred to INTEROP_PLAN Step 3
Phase D and must be addressed before any clinical use.
-
Field Summary
Fields inherited from class com.framed.core.Service
ADDRESS_REGISTRY_SUFFIX, eventBus, formatter, logger -
Constructor Summary
ConstructorsConstructorDescriptionSdcProviderDispatcher(EventBus eventBus, org.json.JSONArray devices, String mappingPath, String epr, String iface, double waveformSamplePeriodMs, double waveformChunkSize, org.json.JSONObject gate) Config-loadable constructor. -
Method Summary
Methods inherited from class com.framed.io.dispatch.Dispatcher
onDrop, onHandlerError, shutdownMethods inherited from class com.framed.core.Service
addressRegistry, announceAddress, subscribeToAnnouncements
-
Constructor Details
-
SdcProviderDispatcher
public SdcProviderDispatcher(EventBus eventBus, org.json.JSONArray devices, String mappingPath, String epr, String iface, double waveformSamplePeriodMs, double waveformChunkSize, org.json.JSONObject gate) Config-loadable constructor. Starts the DPWS stack and the SDC device immediately.- Parameters:
eventBus- the event busdevices- device groups whose announced channels are forwardedmappingPath- path to the interop mapping JSON (mdc/kindaware)epr- device endpoint reference; empty generates a random urn:uuidiface- network interface name to bind (e.g.eth0); empty binds the loopback interfacewaveformSamplePeriodMs- declared sample period of waveform channels, in millisecondswaveformChunkSize- samples buffered per emitted real-time sample arraygate- emission gate config for metrics/settings (onChange,minIntervalMs)
-
-
Method Details
-
push
Description copied from class:DispatcherPushes a single datapoint to the underlying sink.Invoked on the dispatcher's worker thread. Implementations may throw
IOExceptionto signal a transient failure, which triggers retry with exponential backoff.- Specified by:
pushin classDispatcher- Parameters:
dataPoint- the datapoint to push- Throws:
IOException- if the push fails due to a transient IO error and should be retried
-
pushBatch
Description copied from class:DispatcherPushes a batch of datapoints to the underlying sink.- Specified by:
pushBatchin classDispatcher- Parameters:
batch- the datapoints to push
-
stop
public void stop()Description copied from class:ServiceStops the service.By default, this method logs a message indicating that no stop logic is implemented. Subclasses should override this method to provide custom shutdown behavior when necessary.
- Overrides:
stopin classDispatcher
-
