缘计算开源框架EdgeXFoundry的配置参数

2023-11-05

EdgeXFoundry的配置参数

Notes on device profiles 关于设备配置文件的说明

This document gives a brief overview of the contents of device profiles, how these affect the behavior of the SDK, and how their elements are presented to the device service implementation.

本文简要概述了设备配置文件的内容、这些文件如何影响 SDK 的行为,以及它们的元素如何呈现给设备服务实现。

The device profile 设备配置文件

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 which it supports.

设备配置文件描述 EdgeX 系统中的设备类型。设备服务管理的每个设备都与设备配置文件有关联,配置文件根据设备所支持的操作定义设备类型。

The profile contains some identification information - it has a name and a description, and a set of labels. It also indicates the brand name of the device to which it applies, and the manufacturer of that device.

配置文件包含一些标识信息——它有名称、描述和一组标签。它还指出了它所适用的设备的品牌名称,以及该设备的制造商。

This information is followed by three sections, “deviceResources”, “deviceCommands” and “coreCommands”.

这些信息后面跟着三个部分,“ deviceResources”、“ deviceCommands”和“ coreCommands”。

coreCommands

This section specifies the commands which are available via the core-command microservice, for reading and writing to the device.

本节指定可以通过 core-command microservice 读写设备的命令。

Commands may allow get or put methods (or both). For a get type, the returned values are specified in the “expectedValues” field, for a put type, the parameters to be given are specified in “parameterNames”. In either case, the different http response codes that the service may generate are shown.

命令可能允许 get 或 put 方法(或两者)。对于 get 类型,返回值在“ expectedValues”字段中指定,对于put 类型,将在“ parameterNames”中指定给定的参数。在这两种情况下,服务可能生成的不同 http 响应代码都会显示出来。

deviceCommands

These are presented at the “device” endpoint,

这些在“设备”端点显示,

http://<device-service>:<port>/api/v1/device/<device id>/<command name>

This section defines access to reads and writes for multiple simultaneous values. Each deviceCommand should contain a get and/or a set section, describing the read or write operation respectively.

本节定义了对多个同时存在的值的读写权限。每个 deviceCommand 应该包含一个 get 和/或一个 set 部分,分别描述读或写操作。

Each line of a get section indicates a deviceResource which is to be read, and the lines in a set section indicate deviceResources to be written. The values in these lines are as follows:

Get 部分的每一行表示要读取的 deviceResource,set 部分的每一行表示要写入的 deviceResources。这些行中的值如下:

  • index - a number, used to define an order in which the resource is processed.
  • index - 一个数字,用于定义处理资源的顺序
  • operation - get or set. Ignored in this implementation, mixing of get and set operations is not supported.
  • operation - get 或 set。在此实现中忽略 get 和 set 操作,不支持 get 和 set 操作的混合
  • deviceResource - the name of the deviceResource to access.
  • deviceResource - 要访问的设备源的名称
  • parameter - optional, a value that will be used if a PUT request does not specify one.
  • parameter - 可选的,如果 PUT 请求没有指定一个值,则使用该值

deviceResources 设备资源

These are also presented at the “device” endpoint,

这些也出现在“设备”端点,

http://<device-service>:<port>/api/v1/device/<device id>/<deviceResource name>

however if a profile contains a deviceCommand with the same name as a deviceResource, the deviceCommand will take precedence.

但是,如果配置文件包含与 deviceResource 同名的 deviceCommand,则 deviceCommand 将优先。

A deviceResource specifies an individual value within a device that may be read from or written to as part of a command. It has a name for identification and a description for informational purposes.

deviceResource 指定设备中的一个单独值,该值可以作为命令的一部分读取或写入。它有一个用于标识的名称和一个用于提供信息的描述。

The Attributes in a deviceResource are the device-service-specific parameters required to access the particular 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.

deviceResource 中的属性是访问特定值所需的特定于设备服务的参数。每个设备服务实现都有自己的一组命名值,这里需要这些值,例如 BACnet 设备服务可能需要一个 Object Identifier 和一个 Property Identifier,而 Bluetooth 设备服务可以使用 UUID 来标识一个值。

The properties section in a deviceResource describes the value. Conventionally each logical value is given two properties, named value and units. The following fields are available in a property:

deviceResource 中的 properties 部分描述了该值。通常,每个逻辑值都有两个属性,命名值和单位。属性中可以使用下列字段:

  • type - Required. The data type of the value. Supported types are bool, int8 - int64, uint8 - uint64, float32, float64, binary and string. Note that the undifferentiated Integer and Float types are deprecated in EdgeX and not supported by the SDK.
  • type - 所需资料。值的数据类型。支持类型有 bool、 int8-int64、 uint8-uint64、 float32、 float64、 binary 和 string。注意,在 EdgeX 中不推荐使用未区分的 Integer 和 Float 类型,并且 SDK 不支持它们
  • readWrite - “R”, “RW”, or “W” indicating whether the value is readable or writable.
  • readWrite -“ R”、“ RW”或“ W”表示该值是可读还是可写
  • defaultValue - a value used for PUT requests which do not specify one.
  • defaultValue - 用于不指定 PUT 请求的值
  • base - a value to be raised to the power of the raw reading before it is returned.
  • base - 在返回原始读取值之前将其提高到原始读取值的功率的值
  • scale - a factor by which to multiply a reading before it is returned.
  • scale - 在读数返回之前对其进行乘法的因子
  • offset - a value to be added to a reading before it is returned.
  • offset - 在返回读数之前添加到读数中的值
  • mask - a binary mask which will be applied to an integer reading.
  • mask - 将应用于整数读取的二进制掩码
  • shift - a number of bits by which an integer reading will be shifted right.
  • shift - 整数读数右移的位数
  • minimum - a minimum value for data specified in set operations.
  • minimum - 在集合操作中指定的数据的最小值
  • maxumum - a maximum value for data specified in set operations.
  • maxumum - 在集合操作中指定的数据的最大值

The processing defined by base, scale, offset, mask and shift is applied in that order. This is done within the SDK. A reverse transformation is applied by the SDK to incoming data on set operations (mask transforms on set are implemented in the driver)

处理定义的基础,规模,偏移,掩码和移位是应用在这个顺序。这是在 SDK 中完成的。SDK 对集合操作上的输入数据应用反向转换(在驱动程序中实现集合上的掩码转换)

The minimum and maximum values may be used to enforce a range limit on values provided in write requests. They are only valid for numeric data, ie ints and floats.

最小值和最大值可用于对写请求中提供的值执行范围限制。它们只对数值数据有效,例如整数和浮点数。

The units property is used to indicate the units of the value, eg Amperes, degrees C, etc. It should have only one field, a defaultValue that specifies the units.

单位属性是用来表示单位的价值,如安培,摄氏度等。它应该只有一个字段,一个指定单位的 defaultValue。

The Device Profile in the C SDK C SDK 中的设备配置文件

When the SDK invokes the get or set handler method, parts of the device profile which pertain to the request are passed in the devsdk_commandrequest structure. This consists of the name, attributes and type of the deviceResource which is being queried or set.

当 SDK 调用 get 或 set 处理程序方法时,与请求有关的设备配置文件的部分将在 devsdk _ commandrequest 结构中传递。这包括查询或设置的 deviceResource 的名称、属性和类型。

Device service configuration options 设备服务配置选项

The device service configuration is held in TOML format. By default the SDK will load configuration from a file named configuration.toml in the res directory, but this may be changed using the --confdir, --file and --profile options.

设备服务配置以 TOML 格式保存。默认情况下,SDK 将从 res 目录中名为 configuration.toml 的文件加载配置,但这可能会使用 – confdir、 – file 和 – profile 选项进行更改。

Configuration parameters are organized within a number of sections. A section is represented by a TOML table, eg [Service].

配置参数被组织在许多部分中。一个部分由 TOML 表表示,例如[Service]。

If the Registry is in use, configuration is contained in subfolders of edgex/core/1.0/<service-name>. The “Clients” section is not present in this scenario, as the Registry provides a specific mechanism for maintaining service information.

如果 Registry 正在使用,则配置包含在 edgex/core/1.0/< service-name > 的子文件夹中。在这个场景中没有“ Clients”部分,因为 Registry 提供了维护服务信息的特定机制。

When a device service is run for the first time with Registry enabled, it reads its configuration from a TOML file and uploads it to the Registry.

当设备服务第一次在启用 Registry 的情况下运行时,它将从 TOML 文件中读取其配置并将其上传到 Registry。

The value of any configuration element can be over-ridden with a value from a corresponding environment variable. The service first looks for an environment variable whose name is of the form

任何配置元素的值都可以使用相应的环境变量中的值进行重写。这个服务首先寻找一个名字与表格相同的环境变量

<service-name>_<section-name>_<config-element>

< service-name > _ < section-name > _ < config-element >

and if that is not present, then tries

如果没有,那就试试

<section-name>_<config-element>

< section-name > _ < config-element >

For example, device-template_Device_MaxCmdOps or Logging_LogLevel.

例如,设备模板 _ device _ maxcmdops 或 Logging _ loglevel。

Service section 服务部分

Option 选择 Type Notes 注释
Host String This is the hostname to use when the service generates URLs pointing to itself. It must be resolvable by other services in the EdgeX deployment. 这是服务生成指向自身的 url 时要使用的主机名。它必须由 EdgeX 部署中的其他服务解析
Port Int Port on which to accept the device service’s REST API. The assigned port for experimental / in-development device services is 49999. 接受设备服务的 REST API 的端口。实验/开发设备服务的指定端口是49999
Timeout Int Time (in milliseconds) to wait between attempts to contact core-data and core-metadata when starting up. 启动时尝试联系 core-data 和 core-metadata 之间的等待时间(以毫秒为单位)
ConnectRetries Int Number of times to attempt to contact core-data and core-metadata when starting up. 启动时尝试联系核心数据和核心元数据的次数
StartupMsg String Message to log on successful startup. 消息登录成功启动
CheckInterval String The checking interval to request if registering with Consul 向Consul注册时请求的核对时间间隔
ServerBindAddr String The interface on which the service’s REST server should listen. By default the server listens on all available interfaces. 服务的 REST 服务器应该侦听的接口。默认情况下,服务器侦听所有可用的接口
Labels String 标签,便于区分不同设备服务

Clients section 客户部分

Defines the endpoints for other microservices in an EdgeX system.

定义 EdgeX 系统中其他微服务的端点。

Data

Option Type Notes 注释
Host String Hostname on which to contact the core-data service. 联系核心数据服务的主机名
Port Int Port on which to contact the core-data service. 联系核心数据服务的端口

Metadata 元数据

Option Type Notes 注释
Host String Hostname on which to contact the core-metadata service. 联系核心元数据服务的主机名
Port Int Port on which to contact the core-metadata service. 联系核心元数据服务的端口

Logging 日志

Option Type Notes 注释
Host String Hostname on which to contact the support-logging service. 要与支持日志记录服务联系的主机名
Port Int Port on which to contact the support-logging service. 要与支持日志记录服务联系的端口

Device section 设备部分

Option Type Notes 注释
DataTransform Bool For enabling/disabling transformations on data between the device and EdgeX. Defaults to true (enabled). 用于启用/禁用设备和 EdgeX 之间的数据转换。默认为 true (启用)
Discovery/Enabled Bool For enabling/disabling device discovery. Defaults to true (enabled). 用于启用/禁用设备发现。默认为 true (启用)
Discovery/Interval Int Time between automatic discovery runs, in seconds. Defaults to zero (do not run discovery automatically). 自动发现之间的时间,以秒为单位。默认为零(不自动运行发现)
MaxCmdOps Int Defines the maximum number of resource operations that can be sent to the driver in a single command. 定义在单个命令中可以发送到驱动程序的最大资源操作数
MaxCmdResultLen Int Not implemented. Maximum string length for command results returned from the driver. 未实现。驱动程序返回的命令结果的最大字符串长度
ProfilesDir String A directory which the service will scan at startup for Device Profile definitions in 服务在启动时扫描设备配置文件定义的目录.yaml files. Any such profiles which do not already exist in EdgeX will be uploaded to core-metadata. 任何这样的配置文件不存在于 EdgeX 将上传到核心元数据
UpdateLastConnected Bool If true, update the LastConnected attribute of a device whenever it is successfully accessed. Defaults to false. 如果为真,则在设备成功访问时更新设备的 LastConnected 属性。默认值为 false
EventQLength Int Sets the maximum number of events to be queued for transmission to core-data before blocking. Zero (default) results in no limit. 设置在阻塞之前要排队传输到核心数据的最大事件数。零(默认值)不会导致限制

Logging section 日志记录部分

Option Type Notes 注释
LogLevel String Sets the logging level. Available settings in order of increasing severity are: TRACE, DEBUG, INFO, WARNING, ERROR. 设置日志级别。可用的设置按严重性的增加顺序是: TRACE,DEBUG,INFO,WARNING,ERROR
EnableRemote Bool If this option is set, logs will be submitted to the EdgeX logging service rather than written to a local file / stdout. 如果设置了此选项,日志将提交给 EdgeX 日志记录服务,而不是写入本地文件/stdout
File String If this option is set, local logs will be written to the named file rather than standard output. 如果设置了此选项,则将本地日志写入指定的文件,而不是标准输出

Driver section 驱动部分

This section is for driver-specific options. Any configuration specified here will be passed to the driver implementation during initialization.

这个部分是针对特定于驱动程序的选项。这里指定的任何配置都将在初始化期间传递给驱动程序实现。

Device service startup parameters 设备服务启动参数

Certain aspects of a device service’s operation are controlled by command-line options and environment variable settings. These are not stored with the service configuration as they may be required before the configuration is read - in particular, they may be required in order to locate the configuration. Each commandline option may be overridden by an environment variable.

设备服务操作的某些方面是由命令行选项和环境变量/服务设置控制的。由于在读取配置之前可能需要这些配置,因此这些配置不与服务配置一起存储——特别是,为了定位配置,可能需要这些配置。每个命令行选项都可能被环境变量控件覆盖。

Registry 注册

If configuration is to be obtained from the Registry, its location may be specified as a URL. The scheme part of the URL indicates the registry implementation to use. Currently the only supported implentation in the SDK is consul.http, where the URL takes the form consul.http://hostname:port.

如果要从注册表获取配置,则可以将其位置指定为 URL。URL 的 scheme 部分指示要使用的注册表实现。目前 SDK 中唯一受支持的实现是 consul.http,其中 URL 采用 consul.http://hostname: port 的形式。

Long option 长选项 Short option 短选项 Environment 环境
--configProvider -cp EDGEX_CONFIGURATION_PROVIDER specifies the registry URL. 指定注册表 URL

Service name 服务名称

Typically a device service will have a default service name, eg device-modbus or device-virtual. However when an EdgeX deployment contains multiple instances of a particular device service, they must be assigned different names. This can be done by assigning an instance name on the command line. The instance name is then appended to the default service name, so if the bacnet device service is run with -i floor3 the service name will be device-bacnet_floor3.

通常设备服务会有一个默认的服务名称,例如 device-modbus 或 device-virtual。但是,当 EdgeX 部署包含特定设备服务的多个实例时,必须为它们分配不同的名称。这可以通过在命令行上分配实例名来实现。然后将实例名附加到默认服务名称,因此,如果 bacnet 设备服务使用-i floor3运行,服务名称将为 device-bacnet _ floor3。

Long option 长选项 Short option 短选项 Environment 环境
--instance -i EDGEX_INSTANCE_NAME specifies the instance name 指定实例名称

Profile 配置

A service has a default configuration profile, but other profiles may be selected using this option. In file-based configuration, additional profiles may be defined in files named configuration-<profilename>.toml. In Consul, they are stored in KV-store folders named <servicename>;<profilename>.

服务具有默认配置配置文件,但是可以使用此选项选择其他配置文件。在基于文件的配置中,可以在名为 configuration-< profileename > 的文件中定义其他配置文件。Toml.在执政中,它们被存放在 KV-store 文件夹中,文件夹名为 < servicename > ; < profileename > 。

Long option 长选项 Short option 短选项 Environment 环境
--profile -p EDGEX_PROFILE specifies the configuration profile 指定配置配置文件

Configuration directory 配置目录

For file-based configuration, this is the directory containing TOML files. The default value is res (note that this is a relative path).

对于基于文件的配置,这是包含 TOML 文件的目录。默认值是 res (注意这是一个相对路径)。

Long option 长选项 Short option 短选项 Environment 环境
--confdir -c EDGEX_CONF_DIR specifies the configuration directory 指定配置目录

Configuration file 配置文件

For file-based configuration, this is the filename of the TOML configuration file. If this option is used, the --profile option will be ineffective.

对于基于文件的配置,这是 TOML 配置文件的文件名。如果使用此选项,-- profile 选项将无效。

Long option 长选项 Short option 短选项 Environment 环境
--file -f EDGEX_CONFIG_FILE specifies the configuration filename 指定配置文件名

Timeouts 超时

Two additional environment variables control the retry behavior when contacting the registry at startup:

另外两个环境变量控制在启动时联系注册表时的重试行为:

Environment variable 环境变量
EDGEX_STARTUP_DURATION sets the amount of time (in seconds) in which to attempt to connect to the registry before abandoning startup 设置在放弃启动之前尝试连接注册表的时间量(以秒为单位)
EDGEX_STARTUP_INTERVAL sets the interval (in seconds) between attempts to connect to the registry 设置尝试连接到注册表之间的间隔(以秒为单位)

Device service metrics availability 设备服务指标可用性

Device services built with the C SDK support the EdgeX service metrics endpoint

使用 C SDK 构建的设备服务支持 EdgeX 服务指标端点

http://host:port/api/v1/metrics

This provides brief information on CPU and memory usage. Example output (formatted for clarity) is shown here:

这里提供了关于 CPU 和内存使用情况的简要信息:

{
  "Memory":
  {
    "Alloc":329072,
    "TotalAlloc":839680
  },
  "CpuLoadAvg":3.375,
  "CpuTime":0.027213000000000001,
  "CpuAvgUsage":0.0010293528009986004
}

The meaning of the fields is as follows:

这些字段的含义如下:

  • Memory/Alloc : Amount of heap memory in use, in bytes. : 正在使用的堆内存量(以字节为单位)
  • Memory/TotalAlloc : Total heap size, in bytes. : 堆总大小(以字节为单位)
  • CpuLoadAvg : Average overall CPU usage for the last minute, as a percentage. * 最后一分钟的平均总体 CPU 使用率,以百分比表示
  • CpuTime : The amount of CPU time used by this service, in seconds. : 此服务使用的 CPU 时间量,以秒为单位
  • CpuAvgUsage: The amount of CPU time used by this service, as a fraction of elapsed time. : 此服务使用的 CPU 时间量,占占用时间的一小部分

Notes on writing a device service 关于编写设备服务的注释

This document aims to complement the examples provided with the EdgeX C SDK by providing insight into what actions should be performed in the various parts of a Device Service.

本文旨在通过深入了解设备服务的各个部分应该执行哪些操作来补充 EdgeX c SDK 提供的示例。

Fundamentally a Device Service is composed of a number of callbacks. These callbacks are provided by the SDK to allow the service to respond to different events. These callbacks (devsdk_callbacks) are as follows:

基本上,设备服务由许多回调函数组成。这些回调是由 SDK 提供的,以允许服务响应不同的事件。这些回调(devsdk _ callbacks)如下:

  • init
  • reconfigure
  • discover
  • get
  • put
  • stop

A device service must provide an implementation of each callback, except for discover (which may be NULL if dynamic discovery is not implemented) and reconfigure (which may be NULL if the service has no driver-specific configuration). A small amount of setup is required of a device service, this is usually performed in the main. A devsdk_service_t should be created, containing, amongst other fields the devsdk_callbacks and an impldata pointer which is passed back every time a callback is invoked. The service must then call devsdk_service_new to create the device service, devsdk_service_start to start it, and upon exit the service should call devsdk_service_stop, followed by devsdk_service_free to clean up.

设备服务必须提供每个回调的实现,除了 discover (如果没有实现动态发现,它可能是 NULL)和 reconfigure (如果服务没有特定于驱动程序的配置,它可能是 NULL)。设备服务需要少量的设置,这通常在主服务中执行。应该创建一个 devsdk service _ t,其中包含 devsdk _ callbacks 和一个 impldata 指针,这个指针在每次调用回调时返回。然后服务必须调用 devsdk service new 来创建设备服务,devsdk service 启动它,退出服务时应该调用 devsdk service stop,然后是 devsdk service free 来清理。

Init 初始化

Init is called when the device service starts up, its purpose is to perform protocol-specific initialization for the device service. This typically involves allocating memory for driver specific structures, initialising synchronisation mechanisms (mutex etc.) and setting up a logging client. The logging client is being provided to the implementation, most implementations will want to store the pointer in their impldata structure for later use. Any initialization required by the device should be performed here.

在设备服务启动时调用 Init,其目的是为设备服务执行特定于协议的初始化。这通常涉及为特定于驱动程序的结构分配内存、初始化同步机制(互斥等)和设置日志客户机。日志客户端是提供给实现的,大多数实现会希望将指针存储在它们的 impldata 结构中,以便以后使用。设备需要的任何初始化都应该在这里执行。

Reconfigure 重新配置

If the Registry is in use, then dynamic updates to configuration are possible. If an element of the driver-specific configuration is changed, this callback will be invoked with the new configuration settings passed through.

如果注册表正在使用中,则可以对配置进行动态更新。如果特定于驱动程序的配置中的某个元素发生了更改,将使用传递的新配置设置调用此回调。

Discover

In Discover, protocols which are able to perform discovery can do so. They must perform their protocol specific discovery and add devices using the edgex_device_add_device() method. Careful consideration should be given to whether this mechanism is required and how dynamically discovered devices can be intelligently and correctly mapped to device profiles.

在发现中,能够执行发现的协议可以这样做。他们必须使用 edgex _ device _ add _ device ()方法执行特定于协议的发现和添加设备。应该仔细考虑是否需要这种机制,以及动态发现的设备如何智能和正确地映射到设备配置文件。

Get

The Get handler deals with incoming requests to get data from a device. The following information is provided to the device service developer:

Get 处理程序处理从设备获取数据的传入请求。以下信息提供给设备服务开发人员:

  • void *impl - The impldata pointer given as part of edgex_device_service. 作为 edge_device _ service 的一部分给出的 impldata 指针
  • char *devname - The name of the device being queried. Char * devname-被查询的设备的名称
  • devsdk_protocols *protocols - This provides information about the device that this get request is seeking to access. A list of protocols is supplied, each consists of a name and a set of name-value pairs representing the attributes required for that protocol. A function devsdk_protocols_properties() is provided which returns the name-value pairs corresponding to a named protocol. Devsdk _ protocols * 协议——该协议提供有关此 get 请求要访问的设备的信息。提供了一个协议列表,每个协议由一个名称和一组表示该协议所需属性的名称-值对组成。提供了一个函数 devsdk _ protocols _ properties () ,该函数返回与命名协议对应的名称-值对
  • uint32_t nreadings - The following requests and reading parameters are arrays of size nreadings. Uint32_t 核磁共振读数-以下请求和读数参数是尺寸核磁共振读数数组
  • const devsdk_commandrequest *requests - The name, attributes and type of each resource being requested. Const devsdk _ commandrequest * requests ——请求的每个资源的名称、属性和类型
  • devsdk_commandresult * readings - Once a reading has been taken from a device, the resulting value is placed into the readings. This is used by the SDK to return the result to EdgeX. 读数-一旦一个读数已经从一个设备,结果值被放置到读数。SDK 使用这个函数将结果返回给 EdgeX
  • const devsdk_nvpairs *qparams - This contains any parameters requested via the query string of the request URL. Const devsdk _ nvpairs * qparams-这包含通过请求 URL 的查询字符串请求的任何参数
  • iot_data_t ** exception - The handler may store a string here containing details in the event of a read failure. Iot _ data _ t * * exception – 处理程序可能会在这里存储一个字符串,包含在读取失败事件中的细节

In general the GET handler should implement a translation between a GET request from edgex and a read/get via the protocol-specific mechanism. Multiple sources of metadata are provided to allow the device-service to identify what it should query on receipt of the callback.

通常,GET 处理程序应该通过特定于协议的机制实现来自 edgex 的 GET 请求和 read/GET 之间的转换。提供了多个元数据源,以允许设备服务确定在收到回调时应查询的内容。

Put

The Put handler deals with requests to write/transmit data to a specific device. It is provided with the same set of metadata as the GET callback. However, this time the put handler should write the data provided to the device associated with the addressable. The process of using the metadata provided to perform the correct protocol-specific write/put action is similar to that of performing a get.

Put 处理程序处理将数据写入/传输到特定设备的请求。它所提供的元数据集与 GET 回调相同。但是,这一次,put 处理程序应该将提供的数据写入与可寻址关联的设备。使用提供的元数据执行正确的特定于协议的 write/put 操作的过程类似于执行 get。

Stop

The stop handler is called when devsdk_service_stop is called. This handler should be used to clean-up all device service specific resources. Typically this would involve freeing any resources allocated during execution of the device service.

当调用 devsdk _ service _ stop 时,将调用停止处理程序。此处理程序应用于清理所有设备服务特定的资源。这通常涉及释放在设备服务执行期间分配的任何资源。

Optional handlers 可选的处理程序

An implementation may implement the device_added, device_updated and device_removed handlers, it will then be notified of changes to the extent of devices managed by the service. This may be helpful if special initialization / shutdown operations are required for optimal usage of the device.

一个实现可以实现 device _ added、 device _ updated 和 device _ removed 处理程序,然后它将被通知服务管理的设备范围的更改。如果需要特殊的初始化/关机操作来优化设备的使用,这可能是有帮助的。

An implementation may also implement the ae_starter and ae_stopper callbacks, in which case it will become responsible for the AutoEvents functionality which is normally handled within the SDK. This facility is currently experimental, it may be useful in scenarios where the device can be set to generate readings autonomously.

实现还可以实现 ae _ starter 和 ae _ stopper 回调,在这种情况下,它将负责通常在 SDK 中处理的 AutoEvents 功能。这个装置目前还处于实验阶段,在设备可以自动生成读数的情况下,它可能会很有用。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

缘计算开源框架EdgeXFoundry的配置参数 的相关文章

  • Jetson开发实战记录(一):Jetson家族的基本介绍

    Jetson开发实战记录 一 Jetson家族的基本介绍 一 Jetson家族 二 Jetson家族产品横向对比 1 Jeston Nano 2 Jetson Xavier 3 Jetson Xavier NX 4 Jetson TX2 5
  • 基于人工智能与边缘计算Aidlux的工业表面缺陷检测

    一 训练yolov8得到onnx模型 相关教程有很多 二 模型转化 网站 https aimo aidlux com 输入试用账号和密码 账号 AIMOTC001 密码 AIMOTC001 我们选择 TensorFlowLite 一步步完成
  • 5G产业链正在蓬勃发展 边缘计算的未来前景如何?

    在5G商用化启动后 相关产业链的价值正在被大多数投资者挖掘 其中 边缘云的潜力尤为引人关注 可以说 目前 边缘云发已构建出独特的商业模式 其上建立的新生态正在被越来越多的企业接受 数科星球 原创 作者丨数数 编辑丨十里香 在过去 5G被认为
  • 【毕业设计】基于M5Stack UnitV2的手写识别计算器的设计与制作

    目录 一 简介 二 设计原理 三 系统设计 四 注意点 五 困难 一 简介 耗时五个月 终于完成了毕业设计和毕业答辩 在这里记录一下学习与实现过程 题目是导师给的 这是主要任务和工作内容 利用M5Stack UnitV2的目标检测功能 用摄
  • 边缘计算开源框架EdgeXFoundry的部署应用开发(三)设备服务开发

    边缘计算开源框架EdgeXFoundry的部署应用开发 三 设备服务开发 使用SDK开发真实设备接入服务 着手编写一个温湿度设备接入 准备相关文件及目录 脚本可选 用于单文件编译测试 编写温湿度设备接入设备服务 功能框架 设备名的解析 配置
  • 使用C对TOML文件的解析

    使用C对TOML文件的解析 toml书写语法 解析toml文件 测试输出内容如下 TOML是前GitHub CEO Tom Preston Werner 于2013年创建的语言 其目标是成为一个小规模的易于使用的语义化配置文件格式 TOML
  • spark机器学习训练模型示例(一)

    利用逻辑回归建立模型 建立训练集和测试集 from pyspark ml import Pipeline from pyspark ml classification import LogisticRegression from pyspa
  • IOTCS+Ekuiper搭建物联网边缘计算平台

    背景介绍 IOTCS 是专为物联网平台而设计的工业智能网关 自从 2020 年 10 月以来 我们从需求调研 设计 定型 研发 测试经过漫长的沉淀与孵化 最终顺利实现工业智能网关最初的设想 我们凭借创新设计理念 快捷的安装以及部署 易用的扩
  • 第十二章 YOLO的部署实战篇(下篇)

    文章目录 前言 专栏概括 1 cuda教程目录 2 cuda教程背景 3 cuda教程内容 一 yolov5部署整体逻辑 1 yolov5的main函数 2 yolo h头文件 3 整体架构显示 二 yolov5模型的onnx转engne代
  • 边缘计算浅析

    最近 新基建 是个热词 那么新基建到底是什么 与之紧密相关的5G何去何从 这给边缘计算带来了什么机遇 边缘计算的生态产业链条是怎样的 它的典型特征和经济效益是什么 本文将为大家带来分享 新基建是什么 近日 国家发改委官方首次明确了 新基建
  • Yolov5项目在RK3588s设备上的部署(RMYC2023技术分享)

    前言 跟作者比赛有关 可以选择略过 在RMYC以往的赛季当中大多数队伍使用到的视觉技术都依赖于RoboMaster官方给的AI人工智能教育套件 但是随着比赛难度的增加 比赛对各种技术的要求AI教育套件可能已经无法满足 同时因AI教育套件的价
  • Day20【元宇宙的实践构想06】—— 元宇宙与Web3.0

    本人简介 男 年龄 18 作者 那就叫我亮亮叭 专栏 元宇宙 部分资料参考文献 成生辉教授的 元宇宙 概念 技术及生态 和百度相关资料 0 0 写在前面 元宇宙 在2021年成为时髦的概念 元宇宙到底是什么 元宇宙是否是互联网技术的下一次革
  • 读标准01-IEEE1451-智能传感器接口标准介绍

    老规矩 这里排版不是最佳 并且下文有个别误字太麻烦去改 这里保持第一版 2021 7 14 方便的话请移步 Github Gitee 页面看最新的 或下载下来用 markdown 编辑器看排版更佳 Github仓库 Gitee仓库 记录经过
  • 工业协议网关IOTCS企业版正式发布

    一 发布前言 继今年5月份IOTCS开源版本发布以后 我们依然在致力于开源版的功能升级迭代 目前南向驱动类型支持OPCUA与Siemens S7协议 1200 1500型号 以及Modbus全协议 北向资源有HTTP MQTT 通过不同的连
  • GPU渲染管线之旅

    在这一部分中 我们来谈谈像素处理的前半部分 dispatch和实际的像素着色 事实上 这部分是大多数图形开发者在谈到PS stage时所关心的内容 有关alpha blend和Late Z的内容则会下一篇文章中去探讨 后面我们会看到 在硬件
  • #13文献学习--边缘计算的计算卸载建模综述

    文献 A survey on computation offloading modeling for edge computing 一 介绍 边缘计算 在网络边缘 代表云服务的下游数据和代表物联网服务的上游数据上执行计算 优势 计算或云计算
  • 大数据时代移动边缘计算架构中的差分隐私保护(二)

    大数据时代移动边缘计算架构中的差分隐私保护 二 实际上 给数据加拉普拉斯噪声或者是指数噪声是针对中心式的差分隐私处理框架的 对于本地化的差分隐私处理框架 现在已有的是采用随即相应技术 Bloom Filter等技术满足 本地化差分隐私 LD
  • 5G MEC在5G网络中的部署-与UPF的关系

    MEC主机部署在边缘或者核心数据网络中 而UPF负责牵引用户平面流量到目标MEC应用所在的数据网络 网络运营商除了选择数据网络和UPF之外 还需要根据技术和商业因素 例如 站点设施 应用需求 用户负载实测值或估算值 来选择物理计算资源的部署
  • Radxa Rock 3a NPU调用指南

    0x0 Radxa Rock 3a开发板介绍 Radxa Rock 3a开发板是基于瑞芯微RK3568芯片设计的 ARM CPU采用4核Cortex A55 Cortex A53的继任者 主频最高可达2 0Ghz CPU性能相当于中高端手机
  • 人工智能边缘计算:连接智能的边界

    导言 人工智能边缘计算是将智能计算推向数据源头的重要发展方向 本文将深入探讨边缘计算与人工智能的交融 以及在未来数字化社会中的前景 1 边缘计算的基础 分布式计算 边缘计算通过将计算任务推送至数据产生的地方 实现更高效的分布式计算 低延迟通

随机推荐