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

## Interface VirtualFireAlarmService

- All Known Implementing Classes:
    VirtualFireAlarmServiceImpl

      public interface VirtualFireAlarmService

  This class consists the functions/APIs specific to the "actions" of the VirtualFirealarm device-type. These APIs include the ones that are used by the [Device] to contact the server (i.e: Enrollment & Publishing Data) and the ones used by the [Server/Owner] to contact the [Device] (i.e: sending control signals). This class also initializes the transport 'Connectors' [XMPP & MQTT] specific to the VirtualFirealarm device-type in order to communicate with such devices and to receive messages form it.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `SCOPE`

  - ### 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.

- - ### Field Detail

    - #### SCOPE

          static final String SCOPE

      See Also:
        Constant Field Values

  - ### Method Detail

    - #### switchBuzzer

          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. 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.
      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)

    - #### getVirtualFirealarmStats

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

      Retrieve Sensor data for the device type

    - #### downloadSketch

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

Copyright © 2017 WSO2. All rights reserved.