aboutsummaryrefslogtreecommitdiff
path: root/tests_schema/daemon/testdevice/custom_traits.h
blob: b4f0e5922cb841b1cf0cfdaed9963ed4b7dd5abe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
// Copyright 2016 The Weave Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

namespace custom_traits {
const char kCustomTraits[] = R"({
  "_ledflasher": {
    "commands": {
      "animate": {
        "minimalRole": "user",
        "parameters": {
          "duration": {
            "type": "number",
            "minimum": 0.1,
            "maximum": 100.0
          },
          "type": {
            "type": "string",
            "enum": [ "none", "marquee_left", "marquee_right", "blink" ]
          }
        }
      }
    },
    "state": {
      "status": {
        "type": "string",
        "enum": [ "idle", "animating" ]
      }
    }
  }
})";

const char kLedflasherState[] = R"({
  "_ledflasher":{"status": "idle"}
})";

const char ledflasher[] = "ledflasher";
const char led1[] = "led1";
const char led2[] = "led2";
const char led3[] = "led3";
const char led4[] = "led4";
const char led5[] = "led5";
const size_t kLedCount = 5;
const char kLedComponentPrefix[] = "led";
}  // namespace custom_traits