github.com/jingruilea/kubeedge@v1.2.0-beta.0.0.20200410162146-4bb8902b3879/build/crds/devices/devices_v1alpha1_devicemodel.yaml (about)

     1  apiVersion: apiextensions.k8s.io/v1beta1
     2  kind: CustomResourceDefinition
     3  metadata:
     4    name: devicemodels.devices.kubeedge.io
     5  spec:
     6    group: devices.kubeedge.io
     7    names:
     8      kind: DeviceModel
     9      plural: devicemodels
    10    scope: Namespaced
    11    validation:
    12      openAPIV3Schema:
    13        properties:
    14          apiVersion:
    15            description: 'APIVersion defines the versioned schema of this representation
    16              of an object. Servers should convert recognized schemas to the latest
    17              internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources'
    18            type: string
    19          kind:
    20            description: 'Kind is a string value representing the REST resource this
    21              object represents. Servers may infer this from the endpoint the client
    22              submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds'
    23            type: string
    24          metadata:
    25            type: object
    26          spec:
    27            properties:
    28              properties:
    29                description: 'Required: List of device properties.'
    30                items:
    31                  properties:
    32                    description:
    33                      description: The device property description.
    34                      type: string
    35                    name:
    36                      description: 'Required: The device property name.'
    37                      type: string
    38                    type:
    39                      description: 'Required: PropertyType represents the type and data
    40                        validation of the property.'
    41                      properties:
    42                        int:
    43                          properties:
    44                            accessMode:
    45                              description: 'Required: Access mode of property, ReadWrite
    46                                or ReadOnly.'
    47                              type: string
    48                              enum:
    49                                - ReadOnly
    50                                - ReadWrite
    51                            defaultValue:
    52                              format: int64
    53                              type: integer
    54                            maximum:
    55                              format: int64
    56                              type: integer
    57                            minimum:
    58                              format: int64
    59                              type: integer
    60                            unit:
    61                              description: The unit of the property
    62                              type: string
    63                          required:
    64                            - accessMode
    65                          type: object
    66                        string:
    67                          properties:
    68                            accessMode:
    69                              description: 'Required: Access mode of property, ReadWrite
    70                                or ReadOnly.'
    71                              type: string
    72                              enum:
    73                                - ReadOnly
    74                                - ReadWrite
    75                            defaultValue:
    76                              type: string
    77                          required:
    78                            - accessMode
    79                          type: object
    80                      type: object
    81                  required:
    82                    - name
    83                    - type
    84                  type: object
    85                type: array
    86              propertyVisitors:
    87                description: 'Required: List of property visitors which describe how
    88                  to access the device properties. PropertyVisitors must unique by propertyVisitor.propertyName.'
    89                items:
    90                  properties:
    91                    bluetooth:
    92                      description: Bluetooth represents a set of additional visitor
    93                        config fields of bluetooth protocol.
    94                      properties:
    95                        characteristicUUID:
    96                          description: 'Required: Unique ID of the corresponding operation'
    97                          type: string
    98                        dataConverter:
    99                          description: Responsible for converting the data being read
   100                            from the bluetooth device into a form that is understandable
   101                            by the platform
   102                          properties:
   103                            endIndex:
   104                              description: 'Required: Specifies the end index of incoming
   105                                byte stream to be considered to convert the data the
   106                                value specified should be inclusive for example if 3
   107                                is specified it includes the third index'
   108                              format: int64
   109                              type: integer
   110                            orderOfOperations:
   111                              description: Specifies in what order the operations(which
   112                                are required to be performed to convert incoming data
   113                                into understandable form) are performed
   114                              items:
   115                                properties:
   116                                  operationType:
   117                                    description: 'Required: Specifies the operation
   118                                      to be performed to convert incoming data'
   119                                    type: string
   120                                    enum:
   121                                      - Add
   122                                      - Subtract
   123                                      - Multiply
   124                                      - Divide
   125                                  operationValue:
   126                                    description: 'Required: Specifies with what value
   127                                      the operation is to be performed'
   128                                    format: double
   129                                    type: number
   130                                type: object
   131                              type: array
   132                            shiftLeft:
   133                              description: Refers to the number of bits to shift left,
   134                                if left-shift operation is necessary for conversion
   135                              format: int64
   136                              type: integer
   137                            shiftRight:
   138                              description: Refers to the number of bits to shift right,
   139                                if right-shift operation is necessary for conversion
   140                              format: int64
   141                              type: integer
   142                            startIndex:
   143                              description: 'Required: Specifies the start index of the
   144                                incoming byte stream to be considered to convert the
   145                                data. For example: start-index:2, end-index:3 concatenates
   146                                the value present at second and third index of the incoming
   147                                byte stream. If we want to reverse the order we can
   148                                give it as start-index:3, end-index:2'
   149                              format: int64
   150                              type: integer
   151                          required:
   152                            - endIndex
   153                            - startIndex
   154                          type: object
   155                        dataWrite:
   156                          description: 'Responsible for converting the data coming from
   157                            the platform into a form that is understood by the bluetooth
   158                            device For example: "ON":[1], "OFF":[0]'
   159                          type: object
   160                      required:
   161                        - characteristicUUID
   162                      type: object
   163                    modbus:
   164                      description: Modbus represents a set of additional visitor config
   165                        fields of modbus protocol.
   166                      properties:
   167                        isRegisterSwap:
   168                          description: Indicates whether the high and low register swapped.
   169                            Defaults to false.
   170                          type: boolean
   171                        isSwap:
   172                          description: Indicates whether the high and low byte swapped.
   173                            Defaults to false.
   174                          type: boolean
   175                        limit:
   176                          description: 'Required: Limit number of registers to read/write.'
   177                          format: int64
   178                          type: integer
   179                        offset:
   180                          description: 'Required: Offset indicates the starting register
   181                            number to read/write data.'
   182                          format: int64
   183                          type: integer
   184                        register:
   185                          description: 'Required: Type of register'
   186                          type: string
   187                          enum:
   188                            - CoilRegister
   189                            - DiscreteInputRegister
   190                            - InputRegister
   191                            - HoldingRegister
   192                        scale:
   193                          description: The scale to convert raw property data into final
   194                            units. Defaults to 1.0
   195                          format: double
   196                          type: number
   197                      required:
   198                        - limit
   199                        - offset
   200                        - register
   201                      type: object
   202                    opcua:
   203                      description: Opcua represents a set of additional visitor config
   204                        fields of opc-ua protocol.
   205                      properties:
   206                        browseName:
   207                          description: The name of opc-ua node
   208                          type: string
   209                        nodeID:
   210                          description: 'Required: The ID of opc-ua node, e.g. "ns=1,i=1005"'
   211                          type: string
   212                      required:
   213                        - nodeID
   214                      type: object
   215                    propertyName:
   216                      description: 'Required: The device property name to be accessed.
   217                        This should refer to one of the device properties defined in
   218                        the device model.'
   219                      type: string
   220                  required:
   221                    - propertyName
   222                  type: object
   223                type: array
   224            type: object
   225    version: v1alpha1