summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorluogangyi <luogangyi@cmsr.chinamobile.com>2020-07-14 10:35:12 +0800
committerluogangyi <luogangyi@cmsr.chinamobile.com>2020-07-20 14:49:17 +0800
commit069ef295210b16a8889ebc2aa68ef4d920b16560 (patch)
tree6f151b78b333b68abfd0281b70d790b63f453c8a /build
parentmove data section from top level into Spec section (diff)
downloadkubeedge-069ef295210b16a8889ebc2aa68ef4d920b16560.tar.gz
enhance on device protocol config
Diffstat (limited to 'build')
-rw-r--r--build/crd-samples/devices/create-device-instance.yaml4
-rw-r--r--build/crds/devices/devices_v1alpha2_device.yaml114
2 files changed, 75 insertions, 43 deletions
diff --git a/build/crd-samples/devices/create-device-instance.yaml b/build/crd-samples/devices/create-device-instance.yaml
index 15161b27f..c5947233e 100644
--- a/build/crd-samples/devices/create-device-instance.yaml
+++ b/build/crd-samples/devices/create-device-instance.yaml
@@ -12,12 +12,14 @@ spec:
protocol:
modbus:
rtu:
+ slaveID: 1
+ common:
+ com:
serialPort: '1'
baudRate: 115200
dataBits: 8
parity: even
stopBits: 1
- slaveID: 1
nodeSelector:
nodeSelectorTerms:
- matchExpressions:
diff --git a/build/crds/devices/devices_v1alpha2_device.yaml b/build/crds/devices/devices_v1alpha2_device.yaml
index 71c942bc7..4e10f476b 100644
--- a/build/crds/devices/devices_v1alpha2_device.yaml
+++ b/build/crds/devices/devices_v1alpha2_device.yaml
@@ -50,7 +50,50 @@ spec:
modbus:
description: Protocol configuration for modbus
properties:
- rtu:
+ slaveID:
+ description: Required. 0-255
+ format: int64
+ type: integer
+ minimum: 0
+ maximum: 255
+ required:
+ - slaveID
+ type: object
+ opcua:
+ description: Protocol configuration for opc-ua
+ properties:
+ certificate:
+ description: Certificate for access opc server.
+ type: string
+ password:
+ description: Password for access opc server.
+ type: string
+ privateKey:
+ description: PrivateKey for access opc server.
+ type: string
+ securityMode:
+ description: Defaults to "none".
+ type: string
+ securityPolicy:
+ description: Defaults to "none".
+ type: string
+ timeout:
+ description: Timeout seconds for the opc server connection.???
+ format: int64
+ type: integer
+ url:
+ description: 'Required: The URL for opc server endpoint.'
+ type: string
+ userName:
+ description: Username for access opc server.
+ type: string
+ required:
+ - url
+ type: object
+ common:
+ description: Common part of protocol configuration
+ properties:
+ com:
properties:
baudRate:
description: Required. BaudRate 115200|57600|38400|19200|9600|4800|2400|1800|1200|600|300|200|150|134|110|75|50
@@ -94,12 +137,6 @@ spec:
serialPort:
description: Required.
type: string
- slaveID:
- description: Required. 0-255
- format: int64
- type: integer
- minimum: 0
- maximum: 255
stopBits:
description: Required. Bit that stops 1|2
format: int64
@@ -112,7 +149,6 @@ spec:
- dataBits
- parity
- serialPort
- - slaveID
- stopBits
type: object
tcp:
@@ -124,45 +160,36 @@ spec:
description: Required.
format: int64
type: integer
- slaveID:
- description: Required.
- type: string
required:
- ip
- port
- - slaveID
type: object
- type: object
- opcua:
- description: Protocol configuration for opc-ua
- properties:
- certificate:
- description: Certificate for access opc server.
- type: string
- password:
- description: Password for access opc server.
- type: string
- privateKey:
- description: PrivateKey for access opc server.
- type: string
- securityMode:
- description: Defaults to "none".
+ commType:
+ description: Communication type, like tcp client, tcp server or COM
type: string
- securityPolicy:
- description: Defaults to "none".
- type: string
- timeout:
- description: Timeout seconds for the opc server connection.???
+ reconnTimeout:
+ description: Reconnection timeout
+ type: integer
+ reconnRetryTimes:
+ description: Reconnecting retry times
+ type: integer
+ collectTimeout:
+ description: 'Define timeout of mapper collect from device.'
format: int64
type: integer
- url:
- description: 'Required: The URL for opc server endpoint.'
- type: string
- userName:
- description: Username for access opc server.
+ collectRetryTimes:
+ description: 'Define retry times of mapper will collect from device.'
+ format: int64
+ type: integer
+ collectType:
+ description: 'Define collect type, sync or async.'
type: string
- required:
- - url
+ enum:
+ - sync
+ - async
+ customizedValues:
+ description: Customized values for provided protocol
+ type: object
type: object
customizedProtocol:
description: Protocol configuration for customized Protocol
@@ -312,12 +339,12 @@ spec:
protocolName:
description: The name of protocol
type: string
- definition:
- description: customized definition
+ configData:
+ description: customized config data
type: object
required:
- protocolName
- - definition
+ - configData
type: object
propertyName:
description: 'Required: The device property name to be accessed.
@@ -332,6 +359,9 @@ spec:
description: 'Define how frequent mapper will collect from device.'
format: int64
type: integer
+ customizedValues:
+ description: Customized values for visitor of provided protocols
+ type: object
required:
- propertyName
type: object