Interface Device

    • Method Detail

      • requestData

        List<Data> requestData​(Object... params)
        Pulls data from data feed. This method serves as handler for data from DataFeed. Forwards parameters for getNextValue method (see DataFeed.getNextValue).
        Parameters:
        params - for DataFeed computing
        Returns:
        a list of generated values
      • startCoapController

        void startCoapController()
        Enables CoaP communication with Device. Method should create tree of Resource endpoints and register them to CoaP Server. Each distinct Device (e.g. Sensor, Actuator ... ) should define Resource tree.
      • stopCoapController

        void stopCoapController()
        Remove all Resource endpoints for Device from CoaP Server, in order to deny CoaP communication with instance of Device.
      • setNetworkAdapter

        void setNetworkAdapter​(NetworkAdapter networkAdapter)
        Sets Network Adapter for device which enables sending data wi
        Parameters:
        networkAdapter - instance of NetworkAdapter
      • getNetworkAdapter

        NetworkAdapter getNetworkAdapter()
        Returns NetworkAdapter assigned to Device
        Returns:
        instance of Network Adapter
      • getDataObservable

        DataObservable getDataObservable()
        Returns DataObservable for Device
        Returns:
        instance of DataObservable
      • setDataObservable

        void setDataObservable​(DataObservable dataObservable)
        Sets DataObservable for Device.
        Parameters:
        dataObservable - instance of DataObservable
      • getCoapController

        CoapController getCoapController()
        Returns CoapController for Device
        Returns:
        instacne of CoapController
      • setCoapController

        void setCoapController​(CoapController coapController)
        Sets CoapController for Device
        Parameters:
        coapController - instance of CoapController