Implement missing data types for calendar and schedule (#474)
* Added the SpecialEvent struct for the Exception_Schedule property of Schedule, encode/decode/same functions, unit tests, and integrated into bacapp functions. * Added the CalendarEntry struct for the Date_List property of Calendar and the SpecialEvent struct, encode/decode functions, unit tests, and integrated into bacapp functions. * Added the DateRange struct for the Effective_Period property of Schedule, encode/decode functions, unit tests, and integrated into bacapp functions. --------- Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
This commit is contained in:
@@ -59,8 +59,8 @@ int bacnet_weeklyschedule_decode(
|
||||
}
|
||||
value->singleDay = false;
|
||||
for (wi = 0; wi < 7; wi++) {
|
||||
len = bacnet_dailyschedule_decode(&apdu[apdu_len],
|
||||
max_apdu_len - apdu_len, &value->weeklySchedule[wi]);
|
||||
len = bacnet_dailyschedule_context_decode(&apdu[apdu_len],
|
||||
max_apdu_len - apdu_len, 0, &value->weeklySchedule[wi]);
|
||||
if (len < 0) {
|
||||
if (wi == 1) {
|
||||
value->singleDay = true;
|
||||
@@ -96,8 +96,8 @@ int bacnet_weeklyschedule_encode(uint8_t *apdu, BACNET_WEEKLY_SCHEDULE *value)
|
||||
if (apdu) {
|
||||
apdu_offset = &apdu[apdu_len];
|
||||
}
|
||||
len = bacnet_dailyschedule_encode(
|
||||
apdu_offset, &value->weeklySchedule[wi]);
|
||||
len = bacnet_dailyschedule_context_encode(
|
||||
apdu_offset, 0, &value->weeklySchedule[wi]);
|
||||
if (len < 0) {
|
||||
return BACNET_STATUS_ERROR;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user