#%RAML 0.8
title: OICSignalStrength
version: v1.0-20150727
schemas:
- SignalStrength: |
    {
      "id": "http://openinterconnect.org/schemas/x.com.st.signalstrength.json#",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "title": "Signal Strength",
      "definitions": {
        "x.com.st.signalstrength": {
          "type": "object",
          "properties": {
            "lqi": {
              "type": "number",
              "description": "ReadOnly, current value of Link Quality Indicator"
            },
            "rssi": {
              "type": "number",
              "description": "ReadOnly, current value of Received Signal Strength Indicator"
            }
          }
        }
      },
      "type": "object",
      "allOf": [
        {"$ref": "oic.core.json#/definitions/oic.core"},
        {"$ref": "oic.baseResource.json#/definitions/oic.r.baseResource"},
        {"$ref": "#/definitions/x.com.st.signalstrength"}
      ]
    }
traits:
  - interface:
      queryParameters:
        if:
          enum: ["oic.if.s"]

/SignalStrengthResURI:
  description: |
    This resource describes the strength of a signal by means of lqi and rssi.
    The lqi is a floating point number that represents Link Quality Indicator.
    The rssi is a floating point number that represents the received signal strength indicator.
  displayName: Signal Strength
  is: [ interface ] # valid for all methods

  get:
    responses:
      200:
        body:
          application/json:
            schema: SignalStrength
            example: |
              {
                "rt":   "x.com.st.signalstrength",
                "id":   "unique_example_id",
                "lqi":  10,
                "rssi": 55
              }
