Class SdcDevice

  • All Implemented Interfaces:
    com.google.common.util.concurrent.Service , org.somda.sdc.dpws.device.Device , org.somda.sdc.dpws.device.EventSourceAccess , org.somda.sdc.glue.provider.SdcDeviceContext

    
    public class SdcDevice
    extends AbstractIdleService implements Device, EventSourceAccess, SdcDeviceContext
                        

    Adds SDC services to a DPWS device and manages incoming set service requests.

    The purpose of the SdcDevice class is to provide SDC data on the network.

    • Constructor Detail

    • Method Detail

      • 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 SdcDevice instance that provides this context.

        Returns:

        the DPWS device.

      • getLocalMdibAccess

         LocalMdibAccess getLocalMdibAccess()

        Gets the LocalMdibAccess passed to the SdcDevice constructor.

        Returns:

        the local MDIB access.

      • sendPeriodicStateReport

         <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.
      • getDiscoveryAccess

         DiscoveryAccess getDiscoveryAccess()

        Gets the discovery access. Please note that the discovery access is managed by this class. Overwriting types and/or scopes can cause negative side-effects.Prefer using the SdcRequiredTypesAndScopes plugin to manage discovery.

        Returns:

        the discovery access.

      • getHostingServiceAccess

         HostingServiceAccess getHostingServiceAccess()

        Gets the hosting service access.

        As the BICEPS services are managed by this class, there should not be any need to access the hosting services. In case access is required though, consider creating a plugin that accesses the hosting services. Prefer implementing a plugin and use getHostingServiceAccess from getDevice.

        Returns:

        the hosting service access.