org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl

## Class VirtualFireAlarmServiceImpl

- java.lang.Object
- - org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl.VirtualFireAlarmServiceImpl

- All Implemented Interfaces:
    VirtualFireAlarmService

      public class VirtualFireAlarmServiceImpl
      extends Object
      implements VirtualFireAlarmService

- - ### Field Summary

    - ### Fields inherited from interface org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl.VirtualFireAlarmService

      `SCOPE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `VirtualFireAlarmServiceImpl()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `javax.ws.rs.core.Response` | `downloadSketch(String deviceName, String sketchType)`
    `javax.ws.rs.core.Response` | `getVirtualFirealarmStats(String deviceId, long from, long to)` Retrieve Sensor data for the device type
    `javax.ws.rs.core.Response` | `switchBuzzer(String deviceId, String state)` This is an API called/used from within the Server(Front-End) or by a device Owner.
    `javax.ws.rs.core.Response` | `updatePolicy(String deviceId, String protocol, String policy)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### VirtualFireAlarmServiceImpl

          public VirtualFireAlarmServiceImpl()

  - ### Method Detail

    - #### switchBuzzer

          public javax.ws.rs.core.Response switchBuzzer(String deviceId,
                                               String state)

      Description copied from interface: `VirtualFireAlarmService`
      This is an API called/used from within the Server(Front-End) or by a device Owner. It sends a control command to the VirtualFirealarm device to switch `ON` or `OFF` its buzzer. The method also takes in the protocol to be used to connect-to and send the command to the device.
      Specified by:
        `switchBuzzer` in interface `VirtualFireAlarmService`
      Parameters:
        `deviceId` - the ID of the VirtualFirealarm device on which the buzzer needs to switched `ON` or `OFF`.
        `state` - the state to which the buzzer on the device needs to be changed. Either "ON" or "OFF". (Case-Insensitive String)

    - #### updatePolicy

          public javax.ws.rs.core.Response updatePolicy(String deviceId,
                                               String protocol,
                                               String policy)

    - #### getVirtualFirealarmStats

          public javax.ws.rs.core.Response getVirtualFirealarmStats(String deviceId,
                                                           long from,
                                                           long to)

      Description copied from interface: `VirtualFireAlarmService`
      Retrieve Sensor data for the device type
      Specified by:
        `getVirtualFirealarmStats` in interface `VirtualFireAlarmService`

    - #### downloadSketch

          public javax.ws.rs.core.Response downloadSketch(String deviceName,
                                                 String sketchType)

      Specified by:
        `downloadSketch` in interface `VirtualFireAlarmService`

Copyright © 2017 WSO2. All rights reserved.