Implemented Trend Log ReadRange for "By Position" and "All" options.

Fixed some issues in the rest of the Trend Log code and the general ReadRange code..
This commit is contained in:
petermcs
2009-11-29 19:32:47 +00:00
parent 52294d1dce
commit d63618d599
7 changed files with 415 additions and 39 deletions
+20
View File
@@ -399,6 +399,26 @@ bool datetime_wildcard(
return wildcard_present;
}
/* Returns true if any type of wildcard is present except for day of week
* on it's own.
*/
bool datetime_wildcard_present(
BACNET_DATE_TIME * bdatetime)
{
bool wildcard_present = false;
if (bdatetime) {
if ((bdatetime->date.year == (1900 + 0xFF)) ||
(bdatetime->date.month > 12) || (bdatetime->date.day > 31) ||
(bdatetime->time.hour == 0xFF) ||
(bdatetime->time.min == 0xFF) || (bdatetime->time.sec == 0xFF) ||
(bdatetime->time.hundredths == 0xFF)) {
wildcard_present = true;
}
}
return wildcard_present;
}
void datetime_date_wildcard_set(
BACNET_DATE * bdate)
{
+1 -1
View File
@@ -174,7 +174,7 @@ int rr_decode_service_request(
rrdata->object_property = (BACNET_PROPERTY_ID) UnsignedTemp;
rrdata->Overhead = RR_OVERHEAD; /* Start with the fixed overhead */
/* Tag 2: Optional Array Index */
/* Tag 2: Optional Array Index - set to ALL if not present */
rrdata->array_index = BACNET_ARRAY_ALL; /* Assuming this is the most common outcome... */
if (len < apdu_len) {
TagLen =