Added enumerations and text for notification class object support.

This commit is contained in:
skarg
2009-09-14 10:58:19 +00:00
parent c4e56abcea
commit bc01893af4
3 changed files with 76 additions and 1 deletions
+9 -1
View File
@@ -1426,7 +1426,15 @@ typedef enum BACnetDaysOfWeek {
BACNET_DAYS_OF_WEEK_THURSDAY = 3,
BACNET_DAYS_OF_WEEK_FRIDAY = 4,
BACNET_DAYS_OF_WEEK_SATURDAY = 5,
BACNET_DAYS_OF_WEEK_SUNDAY = 6
BACNET_DAYS_OF_WEEK_SUNDAY = 6,
MAX_BACNET_DAYS_OF_WEEK = 7
} BACNET_DAYS_OF_WEEK;
typedef enum BACnetEventTransitionBits {
TRANSITION_TO_OFFNORMAL = 0,
TRANSITION_TO_FAULT = 1,
TRANSITION_TO_NORMAL = 2,
MAX_BACNET_EVENT_TRANSITION = 3
} BACNET_EVENT_TRANSITION_BITS;
#endif /* end of BACENUM_H */
+11
View File
@@ -97,7 +97,18 @@ extern "C" {
unsigned index);
const char *bactext_segmentation_name(
unsigned index);
const char *bactext_event_transition_name(
unsigned index);
bool bactext_event_transition_index(
const char *search_name,
unsigned *found_index);
const char *bactext_days_of_week_name(
unsigned index);
bool bactext_days_of_week_index(
const char *search_name,
unsigned *found_index);
#ifdef __cplusplus
}
+56
View File
@@ -1717,6 +1717,62 @@ const char *bactext_day_of_week_name(
ASHRAE_Reserved_String);
}
/* note: different than DayOfWeek bit string where 1=monday */
INDTEXT_DATA bacnet_days_of_week_names[] = {
{BACNET_DAYS_OF_WEEK_MONDAY, "Monday"},
{BACNET_DAYS_OF_WEEK_TUESDAY, "Tuesday"},
{BACNET_DAYS_OF_WEEK_WEDNESDAY, "Wednesday"},
{BACNET_DAYS_OF_WEEK_THURSDAY, "Thursday"},
{BACNET_DAYS_OF_WEEK_FRIDAY, "Friday"},
{BACNET_DAYS_OF_WEEK_SATURDAY, "Saturday"},
{BACNET_DAYS_OF_WEEK_SUNDAY, "Sunday"},
{0, NULL}
};
const char *bactext_days_of_week_name(
unsigned index)
{
return indtext_by_index_default(bacnet_days_of_week_names, index,
ASHRAE_Reserved_String);
}
bool bactext_days_of_week_index(
const char *search_name,
unsigned *found_index)
{
return indtext_by_istring(
bacnet_days_of_week_names,
search_name,
found_index);
}
INDTEXT_DATA bacnet_event_transition_names[] = {
{TRANSITION_TO_OFFNORMAL, "offnormal"}
,
{TRANSITION_TO_NORMAL, "normal"}
,
{TRANSITION_TO_FAULT, "fault"}
,
{0, NULL}
};
const char *bactext_event_transition_name(
unsigned index)
{
return indtext_by_index_default(bacnet_event_transition_names, index,
ASHRAE_Reserved_String);
}
bool bactext_event_transition_index(
const char *search_name,
unsigned *found_index)
{
return indtext_by_istring(
bacnet_event_transition_names,
search_name,
found_index);
}
INDTEXT_DATA bacnet_event_state_names[] = {
{EVENT_STATE_NORMAL, "normal"}
,