Package org.somda.sdc.glue.provider
Interface SdcDeviceContext
- All Known Implementing Classes:
SdcDevice
public interface SdcDeviceContext
Context data passed to SdcDevicePlugin in order to access SdcDevice data.
-
Method Summary
Modifier and TypeMethodDescriptionGets the encapsulated device of an SdcDevice.Gets the LocalMdibAccess passed to the SdcDevice constructor.Gets a collection of OperationInvocationReceiver instances passed to the SdcDevice constructor.com.google.common.util.concurrent.Service.StateGets the enclosingSdcDeviceservice state.<T extends AbstractState>
voidsendPeriodicStateReport(List<T> states, MdibVersion mdibVersion) Sends a periodic state report.
-
Method Details
-
getDevice
Device getDevice()Gets the encapsulated device of an SdcDevice.Do not call any startup or shutdown functions from that device reference as it is still managed by the enclosing
SdcDeviceinstance that provides this context.- Returns:
- the DPWS device.
-
getLocalMdibAccess
LocalMdibAccess getLocalMdibAccess()Gets the LocalMdibAccess passed to the SdcDevice constructor.- Returns:
- the local MDIB access.
-
getOperationInvocationReceivers
Collection<OperationInvocationReceiver> getOperationInvocationReceivers()Gets a collection of OperationInvocationReceiver instances passed to the SdcDevice constructor.- Returns:
- an unmodifiable
OperationInvocationReceivercollection.
-
getServiceState
com.google.common.util.concurrent.Service.State getServiceState()Gets the enclosingSdcDeviceservice state.- Returns:
AbstractIdleService.state()of the enclosing SDC device.
-
sendPeriodicStateReport
Sends a periodic state report.This function does not control periodicity. Periodicity has to be controlled by the calling function.
Note that only one report type is supported per call, e.g. it is not possible to mix metric and context states. In accordance with the SDC, the following state types have to be sent in separate reports:
- Metric states (every subclass of
AbstractMetricState) - Alert states (every subclass of
AbstractAlertState) - Context states (every subclass of
AbstractContextState) - Operational states (every subclass of
AbstractOperationState) - Component states (every subclass of
AbstractDeviceComponentState)
- Type Parameters:
T- the state type that.- Parameters:
states- the states that are supposed to be notified.mdibVersion- the MDIB version the report belongs to.
- Metric states (every subclass of
-