indented.
This commit is contained in:
@@ -245,11 +245,11 @@ typedef enum {
|
|||||||
} BACNET_ACTION;
|
} BACNET_ACTION;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
MIN_BINARY_PV = 0, /* for validating incoming values */
|
MIN_BINARY_PV = 0, /* for validating incoming values */
|
||||||
BINARY_INACTIVE = 0,
|
BINARY_INACTIVE = 0,
|
||||||
BINARY_ACTIVE = 1,
|
BINARY_ACTIVE = 1,
|
||||||
MAX_BINARY_PV = 1, /* for validating incoming values */
|
MAX_BINARY_PV = 1, /* for validating incoming values */
|
||||||
BINARY_NULL = 2 /* our homemade way of storing this info */
|
BINARY_NULL = 2 /* our homemade way of storing this info */
|
||||||
} BACNET_BINARY_PV;
|
} BACNET_BINARY_PV;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
|
|||||||
@@ -287,8 +287,8 @@ bool Analog_Output_Write_Property(BACNET_WRITE_PROPERTY_DATA * wp_data,
|
|||||||
if (wp_data->value.tag == BACNET_APPLICATION_TAG_REAL) {
|
if (wp_data->value.tag == BACNET_APPLICATION_TAG_REAL) {
|
||||||
priority = wp_data->priority;
|
priority = wp_data->priority;
|
||||||
/* Command priority 6 is reserved for use by Minimum On/Off
|
/* Command priority 6 is reserved for use by Minimum On/Off
|
||||||
algorithm and may not be used for other purposes in any
|
algorithm and may not be used for other purposes in any
|
||||||
object. */
|
object. */
|
||||||
if (priority && (priority <= BACNET_MAX_PRIORITY) &&
|
if (priority && (priority <= BACNET_MAX_PRIORITY) &&
|
||||||
(priority != 6 /* reserved */ ) &&
|
(priority != 6 /* reserved */ ) &&
|
||||||
(wp_data->value.type.Real >= 0.0) &&
|
(wp_data->value.type.Real >= 0.0) &&
|
||||||
|
|||||||
@@ -160,8 +160,8 @@ int Binary_Output_Encode_Property_APDU(uint8_t * apdu,
|
|||||||
apdu_len = encode_tagged_object_id(&apdu[0], OBJECT_BINARY_OUTPUT,
|
apdu_len = encode_tagged_object_id(&apdu[0], OBJECT_BINARY_OUTPUT,
|
||||||
object_instance);
|
object_instance);
|
||||||
break;
|
break;
|
||||||
/* note: Name and Description don't have to be the same.
|
/* note: Name and Description don't have to be the same.
|
||||||
You could make Description writable and different */
|
You could make Description writable and different */
|
||||||
case PROP_OBJECT_NAME:
|
case PROP_OBJECT_NAME:
|
||||||
case PROP_DESCRIPTION:
|
case PROP_DESCRIPTION:
|
||||||
characterstring_init_ansi(&char_string,
|
characterstring_init_ansi(&char_string,
|
||||||
@@ -213,7 +213,9 @@ int Binary_Output_Encode_Property_APDU(uint8_t * apdu,
|
|||||||
len = encode_tagged_null(&apdu[apdu_len]);
|
len = encode_tagged_null(&apdu[apdu_len]);
|
||||||
else {
|
else {
|
||||||
present_value = Binary_Output_Level[object_index][i];
|
present_value = Binary_Output_Level[object_index][i];
|
||||||
len = encode_tagged_enumerated(&apdu[apdu_len], present_value);
|
len =
|
||||||
|
encode_tagged_enumerated(&apdu[apdu_len],
|
||||||
|
present_value);
|
||||||
}
|
}
|
||||||
/* add it if we have room */
|
/* add it if we have room */
|
||||||
if ((apdu_len + len) < MAX_APDU)
|
if ((apdu_len + len) < MAX_APDU)
|
||||||
@@ -235,7 +237,9 @@ int Binary_Output_Encode_Property_APDU(uint8_t * apdu,
|
|||||||
else {
|
else {
|
||||||
present_value =
|
present_value =
|
||||||
Binary_Output_Level[object_index][array_index];
|
Binary_Output_Level[object_index][array_index];
|
||||||
len = encode_tagged_enumerated(&apdu[apdu_len], present_value);
|
len =
|
||||||
|
encode_tagged_enumerated(&apdu[apdu_len],
|
||||||
|
present_value);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
*error_class = ERROR_CLASS_PROPERTY;
|
*error_class = ERROR_CLASS_PROPERTY;
|
||||||
@@ -280,8 +284,8 @@ bool Binary_Output_Write_Property(BACNET_WRITE_PROPERTY_DATA * wp_data,
|
|||||||
if (wp_data->value.tag == BACNET_APPLICATION_TAG_ENUMERATED) {
|
if (wp_data->value.tag == BACNET_APPLICATION_TAG_ENUMERATED) {
|
||||||
priority = wp_data->priority;
|
priority = wp_data->priority;
|
||||||
/* Command priority 6 is reserved for use by Minimum On/Off
|
/* Command priority 6 is reserved for use by Minimum On/Off
|
||||||
algorithm and may not be used for other purposes in any
|
algorithm and may not be used for other purposes in any
|
||||||
object. */
|
object. */
|
||||||
if (priority && (priority <= BACNET_MAX_PRIORITY) &&
|
if (priority && (priority <= BACNET_MAX_PRIORITY) &&
|
||||||
(priority != 6 /* reserved */ ) &&
|
(priority != 6 /* reserved */ ) &&
|
||||||
(wp_data->value.type.Enumerated >= MIN_BINARY_PV) &&
|
(wp_data->value.type.Enumerated >= MIN_BINARY_PV) &&
|
||||||
|
|||||||
Reference in New Issue
Block a user