Interface SdcDeviceContext
-
- All Implemented Interfaces:
public interface SdcDeviceContextContext data passed to SdcDevicePlugin in order to access SdcDevice data.
-
-
Method Summary
Modifier and Type Method Description abstract DevicegetDevice()Gets the encapsulated device of an SdcDevice. abstract LocalMdibAccessgetLocalMdibAccess()Gets the LocalMdibAccess passed to the SdcDevice constructor. abstract OperationInvocationReceivergetOperationInvocationReceiver()Gets the OperationInvocationReceiver instance passed to the SdcDevice constructor. abstract Service.StategetServiceState()Gets the enclosing SdcDevice service state. abstract <T extends AbstractState> voidsendPeriodicStateReport(Map<String, List<T>> states, MdibVersion mdibVersion)Sends a periodic state report. -
-
Method Detail
-
getDevice
abstract 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 SdcDevice instance that provides this context.
- Returns:
the DPWS device.
-
getLocalMdibAccess
abstract LocalMdibAccess getLocalMdibAccess()
Gets the LocalMdibAccess passed to the SdcDevice constructor.
- Returns:
the local MDIB access.
-
getOperationInvocationReceiver
abstract OperationInvocationReceiver getOperationInvocationReceiver()
Gets the OperationInvocationReceiver instance passed to the SdcDevice constructor.
- Returns:
-
getServiceState
abstract Service.State getServiceState()
Gets the enclosing SdcDevice service state.
- Returns:
state of the enclosing SDC device.
-
sendPeriodicStateReport
abstract <T extends AbstractState> void sendPeriodicStateReport(Map<String, List<T>> states, MdibVersion mdibVersion)
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 org.somda.sdc.biceps.model.participant.AbstractMetricState)
- Alert states (every subclass of org.somda.sdc.biceps.model.participant.AbstractAlertState)
- Context states (every subclass of org.somda.sdc.biceps.model.participant.AbstractContextState)
- Operational states (every subclass of org.somda.sdc.biceps.model.participant.AbstractOperationState)
- Component states (every subclass of org.somda.sdc.biceps.model.participant.AbstractDeviceComponentState)
- Parameters:
states- map with mds as key and lists of the states that are supposed to be notified as value.mdibVersion- the MDIB version the report belongs to.
-
-
-
-