v1alpha2

package
v1.10.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 23, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

+k8s:deepcopy-gen=package

Package v1alpha2 contains API Schema definitions for the devices v1alpha2 API group +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=kubeedge/cloud/pkg/apis/devices +k8s:defaulter-gen=TypeMeta +groupName=devices.kubeedge.io

Index

Constants

View Source
const (
	// GroupName is the group name use in this package.
	GroupName = "devices.kubeedge.io"
	// Version is the API version.
	Version = "v1alpha2"
)

Variables

View Source
var (
	SchemeBuilder runtime.SchemeBuilder

	AddToScheme = localSchemeBuilder.AddToScheme
)
View Source
var (
	// SchemeGroupVersion is the group version used to register these objects.
	SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: Version}
)

Functions

func AddDeviceCrds added in v1.6.0

func AddDeviceCrds(scheme *runtime.Scheme) error

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group-qualified GroupResource.

Types

type BluetoothArithmeticOperationType

type BluetoothArithmeticOperationType string

Operations supported by Bluetooth protocol to convert the value being read from the device into an understandable form +kubebuilder:validation:Enum:Add;Subtract;Multiply;Divide

const (
	BluetoothAdd      BluetoothArithmeticOperationType = "Add"
	BluetoothSubtract BluetoothArithmeticOperationType = "Subtract"
	BluetoothMultiply BluetoothArithmeticOperationType = "Multiply"
	BluetoothDivide   BluetoothArithmeticOperationType = "Divide"
)

Bluetooth Protocol Operation type

type BluetoothOperations

type BluetoothOperations struct {
	// Required: Specifies the operation to be performed to convert incoming data
	BluetoothOperationType BluetoothArithmeticOperationType `json:"operationType,omitempty"`
	// Required: Specifies with what value the operation is to be performed
	BluetoothOperationValue float64 `json:"operationValue,omitempty"`
}

Specify the operation that should be performed to convert incoming data into understandable form

func (*BluetoothOperations) DeepCopy

func (in *BluetoothOperations) DeepCopy() *BluetoothOperations

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BluetoothOperations.

func (*BluetoothOperations) DeepCopyInto

func (in *BluetoothOperations) DeepCopyInto(out *BluetoothOperations)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type BluetoothReadConverter

type BluetoothReadConverter struct {
	// Required: Specifies the start index of the incoming byte stream to be considered to convert the data.
	// For example: start-index:2, end-index:3 concatenates the value present at second and third index of the incoming byte stream. If we want to reverse the order we can give it as start-index:3, end-index:2
	StartIndex int `json:"startIndex,omitempty"`
	// Required: Specifies the end index of incoming byte stream to be considered to convert the data
	// the value specified should be inclusive for example if 3 is specified it includes the third index
	EndIndex int `json:"endIndex,omitempty"`
	// Refers to the number of bits to shift left, if left-shift operation is necessary for conversion
	// +optional
	ShiftLeft uint `json:"shiftLeft,omitempty"`
	// Refers to the number of bits to shift right, if right-shift operation is necessary for conversion
	// +optional
	ShiftRight uint `json:"shiftRight,omitempty"`
	// Specifies in what order the operations(which are required to be performed to convert incoming data into understandable form) are performed
	//+optional
	OrderOfOperations []BluetoothOperations `json:"orderOfOperations,omitempty"`
}

Specifies the operations that may need to be performed to convert the data

func (*BluetoothReadConverter) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BluetoothReadConverter.

func (*BluetoothReadConverter) DeepCopyInto

func (in *BluetoothReadConverter) DeepCopyInto(out *BluetoothReadConverter)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CustomizedValue

type CustomizedValue struct {
	Data map[string]interface{} `json:"-"`
}

CustomizedValue contains a map type data +kubebuilder:validation:Type=object

func (*CustomizedValue) DeepCopy

func (in *CustomizedValue) DeepCopy() *CustomizedValue

DeepCopy implements the DeepCopy interface.

func (*CustomizedValue) DeepCopyInto

func (in *CustomizedValue) DeepCopyInto(out *CustomizedValue)

DeepCopyInto implements the DeepCopyInto interface.

func (*CustomizedValue) MarshalJSON added in v1.9.0

func (in *CustomizedValue) MarshalJSON() ([]byte, error)

MarshalJSON implements the Marshaler interface.

func (*CustomizedValue) UnmarshalJSON added in v1.9.0

func (in *CustomizedValue) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the Unmarshaler interface.

type DataProperty

type DataProperty struct {
	// Required: The property name for which should be processed by external apps.
	// This property should be present in the device model.
	PropertyName string `json:"propertyName,omitempty"`
	// Additional metadata like timestamp when the value was reported etc.
	// +optional
	Metadata map[string]string `json:"metadata,omitempty"`
}

DataProperty represents the device property for external use.

func (*DataProperty) DeepCopy

func (in *DataProperty) DeepCopy() *DataProperty

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DataProperty.

func (*DataProperty) DeepCopyInto

func (in *DataProperty) DeepCopyInto(out *DataProperty)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Device

type Device struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   DeviceSpec   `json:"spec,omitempty"`
	Status DeviceStatus `json:"status,omitempty"`
}

Device is the Schema for the devices API +k8s:openapi-gen=true

func (*Device) DeepCopy

func (in *Device) DeepCopy() *Device

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Device.

func (*Device) DeepCopyInto

func (in *Device) DeepCopyInto(out *Device)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Device) DeepCopyObject

func (in *Device) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type DeviceData

type DeviceData struct {
	// Required: A list of data properties, which are not required to be processed by edgecore
	DataProperties []DataProperty `json:"dataProperties,omitempty"`
	// Topic used by mapper, all data collected from dataProperties
	// should be published to this topic,
	// the default value is $ke/events/device/+/data/update
	// +optional
	DataTopic string `json:"dataTopic,omitempty"`
}

DeviceData reports the device's time-series data to edge MQTT broker. These data should not be processed by edgecore. Instead, they can be process by third-party data-processing apps like EMQX kuiper.

func (*DeviceData) DeepCopy

func (in *DeviceData) DeepCopy() *DeviceData

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceData.

func (*DeviceData) DeepCopyInto

func (in *DeviceData) DeepCopyInto(out *DeviceData)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type DeviceList

type DeviceList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Device `json:"items"`
}

DeviceList contains a list of Device

func (*DeviceList) DeepCopy

func (in *DeviceList) DeepCopy() *DeviceList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceList.

func (*DeviceList) DeepCopyInto

func (in *DeviceList) DeepCopyInto(out *DeviceList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*DeviceList) DeepCopyObject

func (in *DeviceList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type DeviceModel

type DeviceModel struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec DeviceModelSpec `json:"spec,omitempty"`
}

DeviceModel is the Schema for the device model API +k8s:openapi-gen=true

func (*DeviceModel) DeepCopy

func (in *DeviceModel) DeepCopy() *DeviceModel

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceModel.

func (*DeviceModel) DeepCopyInto

func (in *DeviceModel) DeepCopyInto(out *DeviceModel)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*DeviceModel) DeepCopyObject

func (in *DeviceModel) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type DeviceModelList

type DeviceModelList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []DeviceModel `json:"items"`
}

DeviceModelList contains a list of DeviceModel

func (*DeviceModelList) DeepCopy

func (in *DeviceModelList) DeepCopy() *DeviceModelList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceModelList.

func (*DeviceModelList) DeepCopyInto

func (in *DeviceModelList) DeepCopyInto(out *DeviceModelList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*DeviceModelList) DeepCopyObject

func (in *DeviceModelList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type DeviceModelSpec

type DeviceModelSpec struct {
	// Required: List of device properties.
	Properties []DeviceProperty `json:"properties,omitempty"`
}

DeviceModelSpec defines the model / template for a device.It is a blueprint which describes the device capabilities and access mechanism via property visitors.

func (*DeviceModelSpec) DeepCopy

func (in *DeviceModelSpec) DeepCopy() *DeviceModelSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceModelSpec.

func (*DeviceModelSpec) DeepCopyInto

func (in *DeviceModelSpec) DeepCopyInto(out *DeviceModelSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type DeviceProperty

type DeviceProperty struct {
	// Required: The device property name.
	Name string `json:"name,omitempty"`
	// The device property description.
	// +optional
	Description string `json:"description,omitempty"`
	// Required: PropertyType represents the type and data validation of the property.
	Type PropertyType `json:"type,omitempty"`
}

DeviceProperty describes an individual device property / attribute like temperature / humidity etc.

func (*DeviceProperty) DeepCopy

func (in *DeviceProperty) DeepCopy() *DeviceProperty

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceProperty.

func (*DeviceProperty) DeepCopyInto

func (in *DeviceProperty) DeepCopyInto(out *DeviceProperty)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type DevicePropertyVisitor

type DevicePropertyVisitor struct {
	// Required: The device property name to be accessed. This should refer to one of the
	// device properties defined in the device model.
	PropertyName string `json:"propertyName,omitempty"`
	// Define how frequent mapper will report the value.
	// +optional
	ReportCycle int64 `json:"reportCycle,omitempty"`
	// Define how frequent mapper will collect from device.
	// +optional
	CollectCycle int64 `json:"collectCycle,omitempty"`
	// Customized values for visitor of provided protocols
	// +optional
	// +kubebuilder:validation:XPreserveUnknownFields
	CustomizedValues *CustomizedValue `json:"customizedValues,omitempty"`
	// Required: Protocol relevant config details about the how to access the device property.
	VisitorConfig `json:",inline"`
}

DevicePropertyVisitor describes the specifics of accessing a particular device property. Visitors are intended to be consumed by device mappers which connect to devices and collect data / perform actions on the device.

func (*DevicePropertyVisitor) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevicePropertyVisitor.

func (*DevicePropertyVisitor) DeepCopyInto

func (in *DevicePropertyVisitor) DeepCopyInto(out *DevicePropertyVisitor)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type DeviceSpec

type DeviceSpec struct {
	// Required: DeviceModelRef is reference to the device model used as a template
	// to create the device instance.
	DeviceModelRef *v1.LocalObjectReference `json:"deviceModelRef,omitempty"`
	// Required: The protocol configuration used to connect to the device.
	Protocol ProtocolConfig `json:"protocol,omitempty"`
	// List of property visitors which describe how to access the device properties.
	// PropertyVisitors must unique by propertyVisitor.propertyName.
	// +optional
	PropertyVisitors []DevicePropertyVisitor `json:"propertyVisitors,omitempty"`
	// Data section describe a list of time-series properties which should be processed
	// on edge node.
	// +optional
	Data DeviceData `json:"data,omitempty"`
	// NodeSelector indicates the binding preferences between devices and nodes.
	// Refer to k8s.io/kubernetes/pkg/apis/core NodeSelector for more details
	// +optional
	NodeSelector *v1.NodeSelector `json:"nodeSelector,omitempty"`
}

DeviceSpec represents a single device instance. It is an instantation of a device model.

func (*DeviceSpec) DeepCopy

func (in *DeviceSpec) DeepCopy() *DeviceSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceSpec.

func (*DeviceSpec) DeepCopyInto

func (in *DeviceSpec) DeepCopyInto(out *DeviceSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type DeviceStatus

type DeviceStatus struct {
	// A list of device twins containing desired/reported desired/reported values of twin properties..
	// Optional: A passive device won't have twin properties and this list could be empty.
	// +optional
	Twins []Twin `json:"twins,omitempty"`
}

DeviceStatus reports the device state and the desired/reported values of twin attributes.

func (*DeviceStatus) DeepCopy

func (in *DeviceStatus) DeepCopy() *DeviceStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceStatus.

func (*DeviceStatus) DeepCopyInto

func (in *DeviceStatus) DeepCopyInto(out *DeviceStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ModbusRegisterType

type ModbusRegisterType string

The Modbus register type to read a device property. +kubebuilder:validation:Enum=CoilRegister;DiscreteInputRegister;InputRegister;HoldingRegister

const (
	ModbusRegisterTypeCoilRegister          ModbusRegisterType = "CoilRegister"
	ModbusRegisterTypeDiscreteInputRegister ModbusRegisterType = "DiscreteInputRegister"
	ModbusRegisterTypeInputRegister         ModbusRegisterType = "InputRegister"
	ModbusRegisterTypeHoldingRegister       ModbusRegisterType = "HoldingRegister"
)

Modbus protocol register types

type PropertyAccessMode

type PropertyAccessMode string

The access mode for a device property. +kubebuilder:validation:Enum=ReadWrite;ReadOnly

const (
	ReadWrite PropertyAccessMode = "ReadWrite"
	ReadOnly  PropertyAccessMode = "ReadOnly"
)

Access mode constants for a device property.

type PropertyType

type PropertyType struct {
	// +optional
	Int *PropertyTypeInt64 `json:"int,omitempty"`
	// +optional
	String *PropertyTypeString `json:"string,omitempty"`
	// +optional
	Double *PropertyTypeDouble `json:"double,omitempty"`
	// +optional
	Float *PropertyTypeFloat `json:"float,omitempty"`
	// +optional
	Boolean *PropertyTypeBoolean `json:"boolean,omitempty"`
	// +optional
	Bytes *PropertyTypeBytes `json:"bytes,omitempty"`
}

Represents the type and data validation of a property. Only one of its members may be specified.

func (*PropertyType) DeepCopy

func (in *PropertyType) DeepCopy() *PropertyType

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PropertyType.

func (*PropertyType) DeepCopyInto

func (in *PropertyType) DeepCopyInto(out *PropertyType)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PropertyTypeBoolean

type PropertyTypeBoolean struct {
	// Required: Access mode of property, ReadWrite or ReadOnly.
	AccessMode PropertyAccessMode `json:"accessMode,omitempty"`
	// +optional
	DefaultValue bool `json:"defaultValue,omitempty"`
}

func (*PropertyTypeBoolean) DeepCopy

func (in *PropertyTypeBoolean) DeepCopy() *PropertyTypeBoolean

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PropertyTypeBoolean.

func (*PropertyTypeBoolean) DeepCopyInto

func (in *PropertyTypeBoolean) DeepCopyInto(out *PropertyTypeBoolean)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PropertyTypeBytes

type PropertyTypeBytes struct {
	// Required: Access mode of property, ReadWrite or ReadOnly.
	AccessMode PropertyAccessMode `json:"accessMode,omitempty"`
}

func (*PropertyTypeBytes) DeepCopy

func (in *PropertyTypeBytes) DeepCopy() *PropertyTypeBytes

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PropertyTypeBytes.

func (*PropertyTypeBytes) DeepCopyInto

func (in *PropertyTypeBytes) DeepCopyInto(out *PropertyTypeBytes)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PropertyTypeDouble

type PropertyTypeDouble struct {
	// Required: Access mode of property, ReadWrite or ReadOnly.
	AccessMode PropertyAccessMode `json:"accessMode,omitempty"`
	// +optional
	DefaultValue float64 `json:"defaultValue,omitempty"`
	// +optional
	Minimum float64 `json:"minimum,omitempty"`
	// +optional
	Maximum float64 `json:"maximum,omitempty"`
	// The unit of the property
	// +optional
	Unit string `json:"unit,omitempty"`
}

func (*PropertyTypeDouble) DeepCopy

func (in *PropertyTypeDouble) DeepCopy() *PropertyTypeDouble

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PropertyTypeDouble.

func (*PropertyTypeDouble) DeepCopyInto

func (in *PropertyTypeDouble) DeepCopyInto(out *PropertyTypeDouble)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PropertyTypeFloat

type PropertyTypeFloat struct {
	// Required: Access mode of property, ReadWrite or ReadOnly.
	AccessMode PropertyAccessMode `json:"accessMode,omitempty"`
	// +optional
	DefaultValue float32 `json:"defaultValue,omitempty"`
	// +optional
	Minimum float32 `json:"minimum,omitempty"`
	// +optional
	Maximum float32 `json:"maximum,omitempty"`
	// The unit of the property
	// +optional
	Unit string `json:"unit,omitempty"`
}

func (*PropertyTypeFloat) DeepCopy

func (in *PropertyTypeFloat) DeepCopy() *PropertyTypeFloat

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PropertyTypeFloat.

func (*PropertyTypeFloat) DeepCopyInto

func (in *PropertyTypeFloat) DeepCopyInto(out *PropertyTypeFloat)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PropertyTypeInt64

type PropertyTypeInt64 struct {
	// Required: Access mode of property, ReadWrite or ReadOnly.
	AccessMode PropertyAccessMode `json:"accessMode,omitempty"`
	// +optional
	DefaultValue int64 `json:"defaultValue,omitempty"`
	// +optional
	Minimum int64 `json:"minimum,omitempty"`
	// +optional
	Maximum int64 `json:"maximum,omitempty"`
	// The unit of the property
	// +optional
	Unit string `json:"unit,omitempty"`
}

func (*PropertyTypeInt64) DeepCopy

func (in *PropertyTypeInt64) DeepCopy() *PropertyTypeInt64

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PropertyTypeInt64.

func (*PropertyTypeInt64) DeepCopyInto

func (in *PropertyTypeInt64) DeepCopyInto(out *PropertyTypeInt64)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PropertyTypeString

type PropertyTypeString struct {
	// Required: Access mode of property, ReadWrite or ReadOnly.
	AccessMode PropertyAccessMode `json:"accessMode,omitempty"`
	// +optional
	DefaultValue string `json:"defaultValue,omitempty"`
}

func (*PropertyTypeString) DeepCopy

func (in *PropertyTypeString) DeepCopy() *PropertyTypeString

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PropertyTypeString.

func (*PropertyTypeString) DeepCopyInto

func (in *PropertyTypeString) DeepCopyInto(out *PropertyTypeString)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ProtocolConfig

type ProtocolConfig struct {
	// Protocol configuration for opc-ua
	// +optional
	OpcUA *ProtocolConfigOpcUA `json:"opcua,omitempty"`
	// Protocol configuration for modbus
	// +optional
	Modbus *ProtocolConfigModbus `json:"modbus,omitempty"`
	// Protocol configuration for bluetooth
	// +optional
	Bluetooth *ProtocolConfigBluetooth `json:"bluetooth,omitempty"`
	// Configuration for protocol common part
	// +optional
	Common *ProtocolConfigCommon `json:"common,omitempty"`
	// Configuration for customized protocol
	// +optional
	CustomizedProtocol *ProtocolConfigCustomized `json:"customizedProtocol,omitempty"`
}

Only one of its members may be specified.

func (*ProtocolConfig) DeepCopy

func (in *ProtocolConfig) DeepCopy() *ProtocolConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProtocolConfig.

func (*ProtocolConfig) DeepCopyInto

func (in *ProtocolConfig) DeepCopyInto(out *ProtocolConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ProtocolConfigBluetooth

type ProtocolConfigBluetooth struct {
	// Unique identifier assigned to the device.
	// +optional
	MACAddress string `json:"macAddress,omitempty"`
}

func (*ProtocolConfigBluetooth) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProtocolConfigBluetooth.

func (*ProtocolConfigBluetooth) DeepCopyInto

func (in *ProtocolConfigBluetooth) DeepCopyInto(out *ProtocolConfigBluetooth)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ProtocolConfigCOM

type ProtocolConfigCOM struct {
	// Required.
	SerialPort string `json:"serialPort,omitempty"`
	// Required. BaudRate 115200|57600|38400|19200|9600|4800|2400|1800|1200|600|300|200|150|134|110|75|50
	// +kubebuilder:validation:Enum=115200;57600;38400;19200;9600;4800;2400;1800;1200;600;300;200;150;134;110;75;50
	BaudRate int64 `json:"baudRate,omitempty"`
	// Required. Valid values are 8, 7, 6, 5.
	// +kubebuilder:validation:Enum=8;7;6;5
	DataBits int64 `json:"dataBits,omitempty"`
	// Required. Valid options are "none", "even", "odd". Defaults to "none".
	// +kubebuilder:validation:Enum=none;even;odd
	Parity string `json:"parity,omitempty"`
	// Required. Bit that stops 1|2
	// +kubebuilder:validation:Enum=1;2
	StopBits int64 `json:"stopBits,omitempty"`
}

func (*ProtocolConfigCOM) DeepCopy

func (in *ProtocolConfigCOM) DeepCopy() *ProtocolConfigCOM

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProtocolConfigCOM.

func (*ProtocolConfigCOM) DeepCopyInto

func (in *ProtocolConfigCOM) DeepCopyInto(out *ProtocolConfigCOM)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ProtocolConfigCommon

type ProtocolConfigCommon struct {
	// +optional
	COM *ProtocolConfigCOM `json:"com,omitempty"`
	// +optional
	TCP *ProtocolConfigTCP `json:"tcp,omitempty"`
	// Communication type, like tcp client, tcp server or COM
	// +optional
	CommType string `json:"commType,omitempty"`
	// Reconnection timeout
	// +optional
	ReconnTimeout int64 `json:"reconnTimeout,omitempty"`
	// Reconnecting retry times
	// +optional
	ReconnRetryTimes int64 `json:"reconnRetryTimes,omitempty"`
	// Define timeout of mapper collect from device.
	// +optional
	CollectTimeout int64 `json:"collectTimeout,omitempty"`
	// Define retry times of mapper will collect from device.
	// +optional
	CollectRetryTimes int64 `json:"collectRetryTimes,omitempty"`
	// Define collect type, sync or async.
	// +optional
	// +kubebuilder:validation:Enum=sync;async
	CollectType string `json:"collectType,omitempty"`
	// Customized values for provided protocol
	// +optional
	// +kubebuilder:validation:XPreserveUnknownFields
	CustomizedValues *CustomizedValue `json:"customizedValues,omitempty"`
}

Only one of COM or TCP may be specified.

func (*ProtocolConfigCommon) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProtocolConfigCommon.

func (*ProtocolConfigCommon) DeepCopyInto

func (in *ProtocolConfigCommon) DeepCopyInto(out *ProtocolConfigCommon)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ProtocolConfigCustomized

type ProtocolConfigCustomized struct {
	// Unique protocol name
	// Required.
	ProtocolName string `json:"protocolName,omitempty"`
	// Any config data
	// +optional
	// +kubebuilder:validation:XPreserveUnknownFields
	ConfigData *CustomizedValue `json:"configData,omitempty"`
}

func (*ProtocolConfigCustomized) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProtocolConfigCustomized.

func (*ProtocolConfigCustomized) DeepCopyInto

func (in *ProtocolConfigCustomized) DeepCopyInto(out *ProtocolConfigCustomized)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ProtocolConfigModbus

type ProtocolConfigModbus struct {
	// Required. 0-255
	SlaveID *int64 `json:"slaveID,omitempty"`
}

Only one of its members may be specified.

func (*ProtocolConfigModbus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProtocolConfigModbus.

func (*ProtocolConfigModbus) DeepCopyInto

func (in *ProtocolConfigModbus) DeepCopyInto(out *ProtocolConfigModbus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ProtocolConfigOpcUA

type ProtocolConfigOpcUA struct {
	// Required: The URL for opc server endpoint.
	URL string `json:"url,omitempty"`
	// Username for access opc server.
	// +optional
	UserName string `json:"userName,omitempty"`
	// Password for access opc server.
	// +optional
	Password string `json:"password,omitempty"`
	// Defaults to "none".
	// +optional
	SecurityPolicy string `json:"securityPolicy,omitempty"`
	// Defaults to "none".
	// +optional
	SecurityMode string `json:"securityMode,omitempty"`
	// Certificate for access opc server.
	// +optional
	Certificate string `json:"certificate,omitempty"`
	// PrivateKey for access opc server.
	// +optional
	PrivateKey string `json:"privateKey,omitempty"`
	// Timeout seconds for the opc server connection.???
	// +optional
	Timeout int64 `json:"timeout,omitempty"`
}

func (*ProtocolConfigOpcUA) DeepCopy

func (in *ProtocolConfigOpcUA) DeepCopy() *ProtocolConfigOpcUA

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProtocolConfigOpcUA.

func (*ProtocolConfigOpcUA) DeepCopyInto

func (in *ProtocolConfigOpcUA) DeepCopyInto(out *ProtocolConfigOpcUA)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ProtocolConfigTCP

type ProtocolConfigTCP struct {
	// Required.
	IP string `json:"ip,omitempty"`
	// Required.
	Port int64 `json:"port,omitempty"`
}

func (*ProtocolConfigTCP) DeepCopy

func (in *ProtocolConfigTCP) DeepCopy() *ProtocolConfigTCP

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProtocolConfigTCP.

func (*ProtocolConfigTCP) DeepCopyInto

func (in *ProtocolConfigTCP) DeepCopyInto(out *ProtocolConfigTCP)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Twin

type Twin struct {
	// Required: The property name for which the desired/reported values are specified.
	// This property should be present in the device model.
	PropertyName string `json:"propertyName,omitempty"`
	// Required: the desired property value.
	Desired TwinProperty `json:"desired,omitempty"`
	// Required: the reported property value.
	Reported TwinProperty `json:"reported,omitempty"`
}

Twin provides a logical representation of control properties (writable properties in the device model). The properties can have a Desired state and a Reported state. The cloud configures the `Desired`state of a device property and this configuration update is pushed to the edge node. The mapper sends a command to the device to change this property value as per the desired state . It receives the `Reported` state of the property once the previous operation is complete and sends the reported state to the cloud. Offline device interaction in the edge is possible via twin properties for control/command operations.

func (*Twin) DeepCopy

func (in *Twin) DeepCopy() *Twin

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Twin.

func (*Twin) DeepCopyInto

func (in *Twin) DeepCopyInto(out *Twin)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TwinProperty

type TwinProperty struct {
	// Required: The value for this property.
	Value string `json:"value,"`
	// Additional metadata like timestamp when the value was reported etc.
	// +optional
	Metadata map[string]string `json:"metadata,omitempty"`
}

TwinProperty represents the device property for which an Expected/Actual state can be defined.

func (*TwinProperty) DeepCopy

func (in *TwinProperty) DeepCopy() *TwinProperty

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TwinProperty.

func (*TwinProperty) DeepCopyInto

func (in *TwinProperty) DeepCopyInto(out *TwinProperty)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type VisitorConfig

type VisitorConfig struct {
	// Opcua represents a set of additional visitor config fields of opc-ua protocol.
	// +optional
	OpcUA *VisitorConfigOPCUA `json:"opcua,omitempty"`
	// Modbus represents a set of additional visitor config fields of modbus protocol.
	// +optional
	Modbus *VisitorConfigModbus `json:"modbus,omitempty"`
	// Bluetooth represents a set of additional visitor config fields of bluetooth protocol.
	// +optional
	Bluetooth *VisitorConfigBluetooth `json:"bluetooth,omitempty"`
	// CustomizedProtocol represents a set of visitor config fields of bluetooth protocol.
	// +optional
	CustomizedProtocol *VisitorConfigCustomized `json:"customizedProtocol,omitempty"`
}

At least one of its members must be specified.

func (*VisitorConfig) DeepCopy

func (in *VisitorConfig) DeepCopy() *VisitorConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VisitorConfig.

func (*VisitorConfig) DeepCopyInto

func (in *VisitorConfig) DeepCopyInto(out *VisitorConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type VisitorConfigBluetooth

type VisitorConfigBluetooth struct {
	// Required: Unique ID of the corresponding operation
	CharacteristicUUID string `json:"characteristicUUID,omitempty"`
	// Responsible for converting the data coming from the platform into a form that is understood by the bluetooth device
	// For example: "ON":[1], "OFF":[0]
	//+optional
	DataWriteToBluetooth map[string][]byte `json:"dataWrite,omitempty"`
	// Responsible for converting the data being read from the bluetooth device into a form that is understandable by the platform
	//+optional
	BluetoothDataConverter BluetoothReadConverter `json:"dataConverter,omitempty"`
}

Common visitor configurations for bluetooth protocol

func (*VisitorConfigBluetooth) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VisitorConfigBluetooth.

func (*VisitorConfigBluetooth) DeepCopyInto

func (in *VisitorConfigBluetooth) DeepCopyInto(out *VisitorConfigBluetooth)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type VisitorConfigCustomized

type VisitorConfigCustomized struct {
	// Required: name of customized protocol
	ProtocolName string `json:"protocolName,omitempty"`
	// Required: The configData of customized protocol
	// +kubebuilder:validation:XPreserveUnknownFields
	ConfigData *CustomizedValue `json:"configData,omitempty"`
}

Common visitor configurations for customized protocol

func (*VisitorConfigCustomized) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VisitorConfigCustomized.

func (*VisitorConfigCustomized) DeepCopyInto

func (in *VisitorConfigCustomized) DeepCopyInto(out *VisitorConfigCustomized)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type VisitorConfigModbus

type VisitorConfigModbus struct {
	// Required: Type of register
	Register ModbusRegisterType `json:"register,omitempty"`
	// Required: Offset indicates the starting register number to read/write data.
	Offset *int64 `json:"offset,omitempty"`
	// Required: Limit number of registers to read/write.
	Limit *int64 `json:"limit,omitempty"`
	// The scale to convert raw property data into final units.
	// Defaults to 1.0
	// +optional
	Scale float64 `json:"scale,omitempty"`
	// Indicates whether the high and low byte swapped.
	// Defaults to false.
	// +optional
	IsSwap bool `json:"isSwap,omitempty"`
	// Indicates whether the high and low register swapped.
	// Defaults to false.
	// +optional
	IsRegisterSwap bool `json:"isRegisterSwap,omitempty"`
}

Common visitor configurations for modbus protocol

func (*VisitorConfigModbus) DeepCopy

func (in *VisitorConfigModbus) DeepCopy() *VisitorConfigModbus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VisitorConfigModbus.

func (*VisitorConfigModbus) DeepCopyInto

func (in *VisitorConfigModbus) DeepCopyInto(out *VisitorConfigModbus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type VisitorConfigOPCUA

type VisitorConfigOPCUA struct {
	// Required: The ID of opc-ua node, e.g. "ns=1,i=1005"
	NodeID string `json:"nodeID,omitempty"`
	// The name of opc-ua node
	BrowseName string `json:"browseName,omitempty"`
}

Common visitor configurations for opc-ua protocol

func (*VisitorConfigOPCUA) DeepCopy

func (in *VisitorConfigOPCUA) DeepCopy() *VisitorConfigOPCUA

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VisitorConfigOPCUA.

func (*VisitorConfigOPCUA) DeepCopyInto

func (in *VisitorConfigOPCUA) DeepCopyInto(out *VisitorConfigOPCUA)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL