The device profile describes a type of device within the EdgeX system. Each device managed by a device service has an association with a device profile, which defines that device type in terms of the operations that it supports.
For a full list of device profile fields and their required values see the device profile reference.
The profile contains various identification fields.
- The Name field is required and must be unique in an Edge Xpert deployment.
- Other fields are optional. They are not used by device services but may be populated for informational purposes:
A device resource specifies a sensor value within a device that may be read from or written to either individually or as part of a device command.
The device service allows access to device resources via its
device REST endpoint. Find examples of this in Device Service API in Edge Xpert API.
A device resource entry has the following:
A name for identification and a description for informational purposes
Attributes are specific to the device service and are required to access the value
- Each device service implementation will have its own set of named values that are required here. For example, a BACnet device service may need an Object Identifier and a Property Identifier whereas a Bluetooth device service could use a UUID to identify a value.
Properties describe the value and, optionally, request some simple processing to be performed on it. It is not necessary to use all property fields in each device resource, only those which are relevant. The following property fields are available:
Required. The data type of the value. Supported types are
- Arrays of the primitive types (ints, floats, bool). Arrays are specified as
boolarray, and so forth.
Windicating whether the value is readable, writable, or both.
Indicates the units of the value, for example: Amperes, degrees celsius
The minimum value allowed in a SET command, out of range will result in error
The maximum value allowed in a SET command, out of range will result in error
Default value to be used when a SET command does not specify one
A string value to which a reading is compared after processing. If the reading does not match the assertion value, the device's operating state will set to disabled. This can be useful for health checks.
The power a raw reading should be raised to before the value is returned
The factor by which to multiply a raw reading before the value is returned.
The value to be added to a raw reading before the value is returned.
A binary mask which will be applied to an integer reading.
The number of bits by which an integer reading will be shifted right
The processing defined by
shiftis applied in that order. This is done within the SDK. A reverse transformation is applied by the SDK to incoming data on set operations.
masktransforms on set are NYI.
Device commands define read and write access for multiple simultaneous device resources.
Device commands may be useful when readings are logically related. For example, with a 3-axis accelerometer, it is helpful to read all axes together.
Each named device command should contain a number of
resourceOperations. A resource operation consists of the following properties:
||The name of the deviceResource to access|
||Optional. A value that will be used if a SET command does not specify one.|
||Optional. Allows readings of String type to be re-mapped.|
The device service allows access to device commands via the same
device REST endpoint as is used to access device resources.