...
 
Commits (4)
......@@ -6,8 +6,9 @@ differs as follows:
* Asynchronous device readings are submitted using an API function call rather
than Go's "channel" facility.
Changes for 1.0.0:
Changes for Edinburgh release (1.0.0):
- Removed ReadMaxLimit configuration option.
- Events containing binary Readings are encoded using CBOR.
- This introduces a dependency on libcbor.
- Data transformations (other than "mask") are applied for device PUT requests.
......
......@@ -15,7 +15,6 @@ Port | Int | Port on which to accept the device service's REST API.
Timeout | Int | Time (in milliseconds) to wait between attempts to contact core-data and core-metadata when starting up.
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.
ReadMaxLimit | Int | Limits the number of items returned by a GET request to `/api/v1/device/all/<command>`.
CheckInterval | String | The checking interval to request if registering with Consul
## Clients section
......
......@@ -223,8 +223,11 @@ void edgex_device_autoevent_stop (edgex_device *dev)
{
for (edgex_device_autoevents *ae = dev->autos; ae; ae = ae->next)
{
edgex_autoimpl *ai = ae->impl;
iot_threadpool_add_work (ai->svc->thpool, stopper, ai, NULL);
if (ae->impl)
{
edgex_autoimpl *ai = ae->impl;
iot_threadpool_add_work (ai->svc->thpool, stopper, ai, NULL);
}
}
}
......
......@@ -194,7 +194,6 @@ void edgex_device_populateConfig
GET_CONFIG_UINT32(Timeout, service.timeout);
GET_CONFIG_UINT32(ConnectRetries, service.connectretries);
GET_CONFIG_STRING(StartupMsg, service.startupmsg);
GET_CONFIG_UINT32(ReadMaxLimit, service.readmaxlimit);
GET_CONFIG_STRING(CheckInterval, service.checkinterval);
int n = 0;
arr = toml_array_in (table, "Labels");
......@@ -452,8 +451,6 @@ void edgex_device_populateConfigNV
get_nv_config_uint32 (svc->logger, config, "Service/ConnectRetries", err);
svc->config.service.startupmsg =
get_nv_config_string (config, "Service/StartupMsg");
svc->config.service.readmaxlimit =
get_nv_config_uint32 (svc->logger, config, "Service/ReadMaxLimit", err);
svc->config.service.checkinterval =
get_nv_config_string (config, "Service/CheckInterval");
......@@ -550,7 +547,6 @@ edgex_nvpairs *edgex_device_getConfig (const edgex_device_service *svc)
PUT_CONFIG_UINT(Service/Timeout, service.timeout);
PUT_CONFIG_UINT(Service/ConnectRetries, service.connectretries);
PUT_CONFIG_STRING(Service/StartupMsg, service.startupmsg);
PUT_CONFIG_UINT(Service/ReadMaxLimit, service.readmaxlimit);
PUT_CONFIG_STRING(Service/CheckInterval, service.checkinterval);
int labellen = 0;
......@@ -735,8 +731,6 @@ int edgex_device_handler_config
json_object_set_number
(sobj, "ConnectRetries", svc->config.service.connectretries);
json_object_set_string (sobj, "StartupMsg", svc->config.service.startupmsg);
json_object_set_number
(sobj, "ReadMaxLimit", svc->config.service.readmaxlimit);
json_object_set_string
(sobj, "CheckInterval", svc->config.service.checkinterval);
......
......@@ -21,7 +21,6 @@ typedef struct edgex_device_serviceinfo
uint32_t connectretries;
char **labels;
char *startupmsg;
uint32_t readmaxlimit;
uint32_t timeout;
char *checkinterval;
} edgex_device_serviceinfo;
......
......@@ -551,7 +551,6 @@ static int allCommand
edgex_cmdqueue_t *cmdq = NULL;
edgex_cmdqueue_t *iter;
uint32_t nret = 0;
int32_t maxret = svc->config.service.readmaxlimit;
char *buff;
edgex_event_encoding enc;
size_t bsize;
......@@ -572,7 +571,7 @@ static int allCommand
retOne = runOne
(svc, iter->dev, iter->cmd, upload_data, upload_data_size, &ereply);
edgex_device_release (iter->dev);
if (ereply && (maxret == 0 || nret < maxret))
if (ereply)
{
enc = ereply->encoding;
switch (enc)
......
......@@ -4,7 +4,6 @@
ConnectRetries = 3
Labels = [ "Counter" ]
StartupMsg = "Example counting device started"
ReadMaxLimit = 256
CheckInterval = "10s"
[Clients]
......
......@@ -4,7 +4,6 @@
ConnectRetries = 3
Labels = [ "Random" ]
StartupMsg = "Example random device started"
ReadMaxLimit = 256
CheckInterval = "10s"
[Clients]
......
......@@ -4,7 +4,6 @@
ConnectRetries = 3
Labels = [ "Template" ]
StartupMsg = "Template device started"
ReadMaxLimit = 256
CheckInterval = "10s"
[Clients]
......