github.com/jingruilea/kubeedge@v1.2.0-beta.0.0.20200410162146-4bb8902b3879/build/crd-samples/devices/CC2650-device-model.yaml (about)

     1  apiVersion: devices.kubeedge.io/v1alpha1
     2  kind: DeviceModel
     3  metadata:
     4   name: cc2650-sensortag
     5   namespace: default
     6  spec:
     7   properties:
     8    - name: temperature
     9      description: temperature in degree celsius
    10      type:
    11       int:
    12        accessMode: ReadOnly
    13        maximum: 100
    14        unit: degree celsius
    15    - name: temperature-enable
    16      description: enable data collection of temperature sensor
    17      type:
    18        string:
    19          accessMode: ReadWrite
    20          defaultValue: 'ON'
    21    - name: io-config-initialize
    22      description: initialize io-config with value 0
    23      type:
    24       int:
    25        accessMode: ReadWrite
    26        defaultValue: 0
    27    - name: io-data-initialize
    28      description:  initialize io-data with value 0
    29      type:
    30       int:
    31        accessMode: ReadWrite
    32        defaultValue: 0
    33    - name: io-config
    34      description: register activation of io-config 
    35      type:
    36       int:
    37        accessMode: ReadWrite
    38        defaultValue: 1
    39    - name: io-data
    40      description: data field to control io-control
    41      type:
    42       int:
    43        accessMode: ReadWrite
    44        defaultValue: 0
    45   propertyVisitors:
    46    - propertyName: temperature
    47      bluetooth:
    48       characteristicUUID: f000aa0104514000b000000000000000
    49       dataConverter:
    50        startIndex: 1
    51        endIndex: 0
    52        shiftRight: 2
    53        orderOfOperations:
    54        - operationType: Multiply
    55          operationValue: 0.03125
    56    - propertyName: temperature-enable
    57      bluetooth:
    58       characteristicUUID: f000aa0204514000b000000000000000
    59       dataWrite:
    60        "ON": [1]   #Here "ON" refers to the value of the property "temperature-enable" and [1] refers to the corresponding []byte value to be written into the device when the value of temperature-enable is "ON" 
    61        "OFF": [0]
    62    - propertyName: io-config-initialize
    63      bluetooth:
    64       characteristicUUID: f000aa6604514000b000000000000000
    65    - propertyName: io-data-initialize
    66      bluetooth:
    67       characteristicUUID: f000aa6504514000b000000000000000
    68    - propertyName: io-config
    69      bluetooth:
    70       characteristicUUID: f000aa6604514000b000000000000000
    71    - propertyName: io-data
    72      bluetooth:
    73       characteristicUUID: f000aa6504514000b000000000000000
    74       dataWrite:
    75        "Red": [1]    #Here "Red" refers to the value of the property "io-data" and [1] refers to the corresponding []byte value to be written into the device when the value of io-data is "Red" 
    76        "Green": [2]
    77        "RedGreen": [3]
    78        "Buzzer": [4]
    79        "BuzzerRed": [5]
    80        "BuzzerGreen": [6]
    81        "BuzzerRedGreen": [7]