Use BACNET_ENGINEERING_UNITS for basic object API for units properties (#1104)
Co-authored-by: Ed <edward@connect-ex.com> Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
This commit is contained in:
@@ -23,6 +23,8 @@ The git repositories are hosted at the following sites:
|
||||
|
||||
### Changed
|
||||
|
||||
* Changed basic object API for units properties to use BACNET_ENGINEERING_UNITS
|
||||
datatype. (#1104)
|
||||
* Changed all the property list values into int32_t to support the larger
|
||||
BACnet property enumerations when an int is 8-bit or 16-bit in size. (#1145)
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
<PreprocessorDefinitions>BACNET_STACK_STATIC_DEFINE;_UNICODE;UNICODE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<DisableSpecificWarnings>4996</DisableSpecificWarnings>
|
||||
<EnableParallelCodeGeneration>true</EnableParallelCodeGeneration>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup />
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
@echo off
|
||||
|
||||
rem Run clang-format over the source tree to conform to project requirements
|
||||
|
||||
rem Open a Tools->Command Line->Developer Command Prompt from within Visual studio
|
||||
rem run clang-format-win.bat
|
||||
|
||||
echo running clang-format
|
||||
|
||||
cd ..\..\..
|
||||
|
||||
for /R %%f in (*.c) do clang-format --style=file -i "%%f"
|
||||
for /R %%f in (*.h) do clang-format --style=file -i "%%f"
|
||||
|
||||
cd "ports\win32\microsoft visual studio"
|
||||
@@ -206,9 +206,9 @@ bool Accumulator_Present_Value_Set(
|
||||
*
|
||||
* @return units property value
|
||||
*/
|
||||
uint16_t Accumulator_Units(uint32_t object_instance)
|
||||
BACNET_ENGINEERING_UNITS Accumulator_Units(uint32_t object_instance)
|
||||
{
|
||||
uint16_t units = UNITS_NO_UNITS;
|
||||
BACNET_ENGINEERING_UNITS units = UNITS_NO_UNITS;
|
||||
|
||||
if (object_instance < MAX_ACCUMULATORS) {
|
||||
units = UNITS_WATT_HOURS;
|
||||
|
||||
@@ -52,9 +52,9 @@ bool Accumulator_Object_Name(
|
||||
uint32_t object_instance, BACNET_CHARACTER_STRING *object_name);
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
bool Accumulator_Units_Set(uint32_t instance, uint16_t units);
|
||||
bool Accumulator_Units_Set(uint32_t instance, BACNET_ENGINEERING_UNITS units);
|
||||
BACNET_STACK_EXPORT
|
||||
uint16_t Accumulator_Units(uint32_t instance);
|
||||
BACNET_ENGINEERING_UNITS Accumulator_Units(uint32_t instance);
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
int Accumulator_Read_Property(BACNET_READ_PROPERTY_DATA *rpdata);
|
||||
|
||||
@@ -599,9 +599,9 @@ void Analog_Input_COV_Increment_Set(uint32_t object_instance, float value)
|
||||
*
|
||||
* @return units property value
|
||||
*/
|
||||
uint16_t Analog_Input_Units(uint32_t object_instance)
|
||||
BACNET_ENGINEERING_UNITS Analog_Input_Units(uint32_t object_instance)
|
||||
{
|
||||
uint16_t units = UNITS_NO_UNITS;
|
||||
BACNET_ENGINEERING_UNITS units = UNITS_NO_UNITS;
|
||||
struct analog_input_descr *pObject;
|
||||
|
||||
pObject = Analog_Input_Object(object_instance);
|
||||
@@ -620,7 +620,8 @@ uint16_t Analog_Input_Units(uint32_t object_instance)
|
||||
*
|
||||
* @return true if the units property value was set
|
||||
*/
|
||||
bool Analog_Input_Units_Set(uint32_t object_instance, uint16_t units)
|
||||
bool Analog_Input_Units_Set(
|
||||
uint32_t object_instance, BACNET_ENGINEERING_UNITS units)
|
||||
{
|
||||
bool status = false;
|
||||
struct analog_input_descr *pObject;
|
||||
|
||||
@@ -95,9 +95,9 @@ bool Analog_Input_Reliability_Set(
|
||||
uint32_t object_instance, BACNET_RELIABILITY value);
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
bool Analog_Input_Units_Set(uint32_t instance, uint16_t units);
|
||||
bool Analog_Input_Units_Set(uint32_t instance, BACNET_ENGINEERING_UNITS units);
|
||||
BACNET_STACK_EXPORT
|
||||
uint16_t Analog_Input_Units(uint32_t instance);
|
||||
BACNET_ENGINEERING_UNITS Analog_Input_Units(uint32_t instance);
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
int Analog_Input_Read_Property(BACNET_READ_PROPERTY_DATA *rpdata);
|
||||
|
||||
@@ -42,7 +42,7 @@ struct object_data {
|
||||
float Relinquish_Default;
|
||||
float Min_Pres_Value;
|
||||
float Max_Pres_Value;
|
||||
uint16_t Units;
|
||||
BACNET_ENGINEERING_UNITS Units;
|
||||
uint8_t Reliability;
|
||||
const char *Object_Name;
|
||||
const char *Description;
|
||||
@@ -606,9 +606,9 @@ const char *Analog_Output_Name_ASCII(uint32_t object_instance)
|
||||
*
|
||||
* @return units property value
|
||||
*/
|
||||
uint16_t Analog_Output_Units(uint32_t object_instance)
|
||||
BACNET_ENGINEERING_UNITS Analog_Output_Units(uint32_t object_instance)
|
||||
{
|
||||
uint16_t units = UNITS_NO_UNITS;
|
||||
BACNET_ENGINEERING_UNITS units = UNITS_NO_UNITS;
|
||||
struct object_data *pObject;
|
||||
|
||||
pObject = Keylist_Data(Object_List, object_instance);
|
||||
@@ -627,7 +627,8 @@ uint16_t Analog_Output_Units(uint32_t object_instance)
|
||||
*
|
||||
* @return true if the units property value was set
|
||||
*/
|
||||
bool Analog_Output_Units_Set(uint32_t object_instance, uint16_t units)
|
||||
bool Analog_Output_Units_Set(
|
||||
uint32_t object_instance, BACNET_ENGINEERING_UNITS units)
|
||||
{
|
||||
bool status = false;
|
||||
struct object_data *pObject;
|
||||
|
||||
@@ -100,9 +100,9 @@ BACNET_STACK_EXPORT
|
||||
bool Analog_Output_Description_Set(uint32_t instance, const char *new_name);
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
bool Analog_Output_Units_Set(uint32_t instance, uint16_t units);
|
||||
bool Analog_Output_Units_Set(uint32_t instance, BACNET_ENGINEERING_UNITS units);
|
||||
BACNET_STACK_EXPORT
|
||||
uint16_t Analog_Output_Units(uint32_t instance);
|
||||
BACNET_ENGINEERING_UNITS Analog_Output_Units(uint32_t instance);
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
bool Analog_Output_Out_Of_Service(uint32_t instance);
|
||||
|
||||
@@ -607,9 +607,9 @@ void Analog_Value_COV_Increment_Set(uint32_t object_instance, float value)
|
||||
*
|
||||
* @return units property value
|
||||
*/
|
||||
uint16_t Analog_Value_Units(uint32_t object_instance)
|
||||
BACNET_ENGINEERING_UNITS Analog_Value_Units(uint32_t object_instance)
|
||||
{
|
||||
uint16_t units = UNITS_NO_UNITS;
|
||||
BACNET_ENGINEERING_UNITS units = UNITS_NO_UNITS;
|
||||
struct analog_value_descr *pObject;
|
||||
|
||||
pObject = Analog_Value_Object(object_instance);
|
||||
@@ -628,7 +628,8 @@ uint16_t Analog_Value_Units(uint32_t object_instance)
|
||||
*
|
||||
* @return true if the units property value was set
|
||||
*/
|
||||
bool Analog_Value_Units_Set(uint32_t object_instance, uint16_t units)
|
||||
bool Analog_Value_Units_Set(
|
||||
uint32_t object_instance, BACNET_ENGINEERING_UNITS units)
|
||||
{
|
||||
bool status = false;
|
||||
struct analog_value_descr *pObject;
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
typedef struct analog_value_descr {
|
||||
unsigned Event_State : 3;
|
||||
bool Out_Of_Service;
|
||||
uint16_t Units;
|
||||
BACNET_ENGINEERING_UNITS Units;
|
||||
float Present_Value;
|
||||
float Prior_Value;
|
||||
float COV_Increment;
|
||||
@@ -135,9 +135,9 @@ bool Analog_Value_Reliability_Set(
|
||||
uint32_t object_instance, BACNET_RELIABILITY value);
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
uint16_t Analog_Value_Units(uint32_t instance);
|
||||
BACNET_ENGINEERING_UNITS Analog_Value_Units(uint32_t instance);
|
||||
BACNET_STACK_EXPORT
|
||||
bool Analog_Value_Units_Set(uint32_t instance, uint16_t unit);
|
||||
bool Analog_Value_Units_Set(uint32_t instance, BACNET_ENGINEERING_UNITS unit);
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
bool Analog_Value_Out_Of_Service(uint32_t instance);
|
||||
|
||||
@@ -42,7 +42,7 @@ struct integer_object {
|
||||
int32_t Present_Value;
|
||||
int32_t Prior_Value;
|
||||
uint32_t COV_Increment;
|
||||
uint16_t Units;
|
||||
BACNET_ENGINEERING_UNITS Units;
|
||||
uint32_t Instance;
|
||||
const char *Object_Name;
|
||||
const char *Description;
|
||||
@@ -379,9 +379,9 @@ const char *Integer_Value_Description_ANSI(uint32_t object_instance)
|
||||
*
|
||||
* @return units property value
|
||||
*/
|
||||
uint16_t Integer_Value_Units(uint32_t object_instance)
|
||||
BACNET_ENGINEERING_UNITS Integer_Value_Units(uint32_t object_instance)
|
||||
{
|
||||
uint16_t units = UNITS_NO_UNITS;
|
||||
BACNET_ENGINEERING_UNITS units = UNITS_NO_UNITS;
|
||||
struct integer_object *pObject = Integer_Value_Object(object_instance);
|
||||
|
||||
if (pObject) {
|
||||
@@ -399,7 +399,8 @@ uint16_t Integer_Value_Units(uint32_t object_instance)
|
||||
*
|
||||
* @return true if the units property value was set
|
||||
*/
|
||||
bool Integer_Value_Units_Set(uint32_t object_instance, uint16_t units)
|
||||
bool Integer_Value_Units_Set(
|
||||
uint32_t object_instance, BACNET_ENGINEERING_UNITS units)
|
||||
{
|
||||
bool status = false;
|
||||
struct integer_object *pObject = Integer_Value_Object(object_instance);
|
||||
@@ -465,7 +466,7 @@ int Integer_Value_Read_Property(BACNET_READ_PROPERTY_DATA *rpdata)
|
||||
BACNET_BIT_STRING bit_string;
|
||||
BACNET_CHARACTER_STRING char_string;
|
||||
uint8_t *apdu = NULL;
|
||||
uint32_t units = 0;
|
||||
BACNET_ENGINEERING_UNITS units;
|
||||
int32_t integer_value = 0;
|
||||
bool state = false;
|
||||
|
||||
@@ -516,7 +517,7 @@ int Integer_Value_Read_Property(BACNET_READ_PROPERTY_DATA *rpdata)
|
||||
break;
|
||||
case PROP_UNITS:
|
||||
units = Integer_Value_Units(rpdata->object_instance);
|
||||
apdu_len = encode_application_enumerated(&apdu[0], units);
|
||||
apdu_len = encode_application_enumerated(&apdu[0], (uint32_t)units);
|
||||
break;
|
||||
case PROP_COV_INCREMENT:
|
||||
apdu_len = encode_application_unsigned(
|
||||
|
||||
@@ -88,9 +88,9 @@ BACNET_STACK_EXPORT
|
||||
const char *Integer_Value_Description_ANSI(uint32_t object_instance);
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
uint16_t Integer_Value_Units(uint32_t instance);
|
||||
BACNET_ENGINEERING_UNITS Integer_Value_Units(uint32_t instance);
|
||||
BACNET_STACK_EXPORT
|
||||
bool Integer_Value_Units_Set(uint32_t instance, uint16_t unit);
|
||||
bool Integer_Value_Units_Set(uint32_t instance, BACNET_ENGINEERING_UNITS unit);
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
bool Integer_Value_Out_Of_Service(uint32_t instance);
|
||||
|
||||
@@ -49,20 +49,20 @@ struct object_data {
|
||||
/* variables for object properties */
|
||||
uint32_t Update_Interval;
|
||||
float Present_Value;
|
||||
uint16_t Output_Units;
|
||||
BACNET_ENGINEERING_UNITS Output_Units;
|
||||
BACNET_OBJECT_PROPERTY_REFERENCE Manipulated_Property_Reference;
|
||||
uint16_t Controlled_Variable_Units;
|
||||
BACNET_ENGINEERING_UNITS Controlled_Variable_Units;
|
||||
float Controlled_Variable_Value;
|
||||
BACNET_OBJECT_PROPERTY_REFERENCE Controlled_Variable_Reference;
|
||||
float Setpoint;
|
||||
BACNET_OBJECT_PROPERTY_REFERENCE Setpoint_Reference;
|
||||
BACNET_ACTION Action;
|
||||
float Proportional_Constant;
|
||||
uint16_t Proportional_Constant_Units;
|
||||
BACNET_ENGINEERING_UNITS Proportional_Constant_Units;
|
||||
float Integral_Constant;
|
||||
uint16_t Integral_Constant_Units;
|
||||
BACNET_ENGINEERING_UNITS Integral_Constant_Units;
|
||||
float Derivative_Constant;
|
||||
uint16_t Derivative_Constant_Units;
|
||||
BACNET_ENGINEERING_UNITS Derivative_Constant_Units;
|
||||
float Bias;
|
||||
float Maximum_Output;
|
||||
float Minimum_Output;
|
||||
@@ -590,9 +590,9 @@ bool Loop_Update_Interval_Set(uint32_t object_instance, uint32_t value)
|
||||
* @param object_instance - object-instance number of the object
|
||||
* @return output-units property value
|
||||
*/
|
||||
uint16_t Loop_Output_Units(uint32_t object_instance)
|
||||
BACNET_ENGINEERING_UNITS Loop_Output_Units(uint32_t object_instance)
|
||||
{
|
||||
uint16_t units = UNITS_NO_UNITS;
|
||||
BACNET_ENGINEERING_UNITS units = UNITS_NO_UNITS;
|
||||
struct object_data *pObject;
|
||||
|
||||
pObject = Keylist_Data(Object_List, object_instance);
|
||||
@@ -609,7 +609,8 @@ uint16_t Loop_Output_Units(uint32_t object_instance)
|
||||
* @param units - units property value
|
||||
* @return true if the output-units property value was set
|
||||
*/
|
||||
bool Loop_Output_Units_Set(uint32_t object_instance, uint16_t units)
|
||||
bool Loop_Output_Units_Set(
|
||||
uint32_t object_instance, BACNET_ENGINEERING_UNITS units)
|
||||
{
|
||||
bool status = false;
|
||||
struct object_data *pObject;
|
||||
@@ -809,9 +810,10 @@ bool Loop_Controlled_Variable_Value_Set(uint32_t object_instance, float value)
|
||||
* @param object_instance - object-instance number of the object
|
||||
* @return output-units property value
|
||||
*/
|
||||
uint16_t Loop_Controlled_Variable_Units(uint32_t object_instance)
|
||||
BACNET_ENGINEERING_UNITS
|
||||
Loop_Controlled_Variable_Units(uint32_t object_instance)
|
||||
{
|
||||
uint16_t units = UNITS_NO_UNITS;
|
||||
BACNET_ENGINEERING_UNITS units = UNITS_NO_UNITS;
|
||||
struct object_data *pObject;
|
||||
|
||||
pObject = Keylist_Data(Object_List, object_instance);
|
||||
@@ -830,7 +832,7 @@ uint16_t Loop_Controlled_Variable_Units(uint32_t object_instance)
|
||||
* @return true if the output-units property value was set
|
||||
*/
|
||||
bool Loop_Controlled_Variable_Units_Set(
|
||||
uint32_t object_instance, uint16_t units)
|
||||
uint32_t object_instance, BACNET_ENGINEERING_UNITS units)
|
||||
{
|
||||
bool status = false;
|
||||
struct object_data *pObject;
|
||||
@@ -1013,9 +1015,10 @@ bool Loop_Proportional_Constant_Set(uint32_t object_instance, float value)
|
||||
* @param object_instance - object-instance number of the object
|
||||
* @return units property value
|
||||
*/
|
||||
uint16_t Loop_Proportional_Constant_Units(uint32_t object_instance)
|
||||
BACNET_ENGINEERING_UNITS
|
||||
Loop_Proportional_Constant_Units(uint32_t object_instance)
|
||||
{
|
||||
uint16_t units = UNITS_NO_UNITS;
|
||||
BACNET_ENGINEERING_UNITS units = UNITS_NO_UNITS;
|
||||
struct object_data *pObject;
|
||||
|
||||
pObject = Keylist_Data(Object_List, object_instance);
|
||||
@@ -1033,7 +1036,7 @@ uint16_t Loop_Proportional_Constant_Units(uint32_t object_instance)
|
||||
* @return true if the units property value was set
|
||||
*/
|
||||
bool Loop_Proportional_Constant_Units_Set(
|
||||
uint32_t object_instance, uint16_t units)
|
||||
uint32_t object_instance, BACNET_ENGINEERING_UNITS units)
|
||||
{
|
||||
bool status = false;
|
||||
struct object_data *pObject;
|
||||
@@ -1092,9 +1095,9 @@ bool Loop_Integral_Constant_Set(uint32_t object_instance, float value)
|
||||
* @param object_instance - object-instance number of the object
|
||||
* @return units property value
|
||||
*/
|
||||
uint16_t Loop_Integral_Constant_Units(uint32_t object_instance)
|
||||
BACNET_ENGINEERING_UNITS Loop_Integral_Constant_Units(uint32_t object_instance)
|
||||
{
|
||||
uint16_t units = UNITS_NO_UNITS;
|
||||
BACNET_ENGINEERING_UNITS units = UNITS_NO_UNITS;
|
||||
struct object_data *pObject;
|
||||
|
||||
pObject = Keylist_Data(Object_List, object_instance);
|
||||
@@ -1111,7 +1114,8 @@ uint16_t Loop_Integral_Constant_Units(uint32_t object_instance)
|
||||
* @param units - units property value
|
||||
* @return true if the units property value was set
|
||||
*/
|
||||
bool Loop_Integral_Constant_Units_Set(uint32_t object_instance, uint16_t units)
|
||||
bool Loop_Integral_Constant_Units_Set(
|
||||
uint32_t object_instance, BACNET_ENGINEERING_UNITS units)
|
||||
{
|
||||
bool status = false;
|
||||
struct object_data *pObject;
|
||||
@@ -1170,9 +1174,10 @@ bool Loop_Derivative_Constant_Set(uint32_t object_instance, float value)
|
||||
* @param object_instance - object-instance number of the object
|
||||
* @return units property value
|
||||
*/
|
||||
uint16_t Loop_Derivative_Constant_Units(uint32_t object_instance)
|
||||
BACNET_ENGINEERING_UNITS
|
||||
Loop_Derivative_Constant_Units(uint32_t object_instance)
|
||||
{
|
||||
uint16_t units = UNITS_NO_UNITS;
|
||||
BACNET_ENGINEERING_UNITS units = UNITS_NO_UNITS;
|
||||
struct object_data *pObject;
|
||||
|
||||
pObject = Keylist_Data(Object_List, object_instance);
|
||||
@@ -1190,7 +1195,7 @@ uint16_t Loop_Derivative_Constant_Units(uint32_t object_instance)
|
||||
* @return true if the units property value was set
|
||||
*/
|
||||
bool Loop_Derivative_Constant_Units_Set(
|
||||
uint32_t object_instance, uint16_t units)
|
||||
uint32_t object_instance, BACNET_ENGINEERING_UNITS units)
|
||||
{
|
||||
bool status = false;
|
||||
struct object_data *pObject;
|
||||
|
||||
@@ -80,9 +80,9 @@ BACNET_STACK_EXPORT
|
||||
bool Loop_Update_Interval_Set(uint32_t object_instance, uint32_t value);
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
uint16_t Loop_Output_Units(uint32_t instance);
|
||||
BACNET_ENGINEERING_UNITS Loop_Output_Units(uint32_t instance);
|
||||
BACNET_STACK_EXPORT
|
||||
bool Loop_Output_Units_Set(uint32_t instance, uint16_t units);
|
||||
bool Loop_Output_Units_Set(uint32_t instance, BACNET_ENGINEERING_UNITS units);
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
bool Loop_Manipulated_Variable_Reference(
|
||||
@@ -104,9 +104,10 @@ BACNET_STACK_EXPORT
|
||||
bool Loop_Controlled_Variable_Value_Set(uint32_t object_instance, float value);
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
uint16_t Loop_Controlled_Variable_Units(uint32_t instance);
|
||||
BACNET_ENGINEERING_UNITS Loop_Controlled_Variable_Units(uint32_t instance);
|
||||
BACNET_STACK_EXPORT
|
||||
bool Loop_Controlled_Variable_Units_Set(uint32_t instance, uint16_t units);
|
||||
bool Loop_Controlled_Variable_Units_Set(
|
||||
uint32_t instance, BACNET_ENGINEERING_UNITS units);
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
bool Loop_Setpoint_Reference(
|
||||
@@ -130,25 +131,28 @@ float Loop_Proportional_Constant(uint32_t object_instance);
|
||||
BACNET_STACK_EXPORT
|
||||
bool Loop_Proportional_Constant_Set(uint32_t object_instance, float value);
|
||||
BACNET_STACK_EXPORT
|
||||
uint16_t Loop_Proportional_Constant_Units(uint32_t instance);
|
||||
BACNET_ENGINEERING_UNITS Loop_Proportional_Constant_Units(uint32_t instance);
|
||||
BACNET_STACK_EXPORT
|
||||
bool Loop_Proportional_Constant_Units_Set(uint32_t instance, uint16_t units);
|
||||
bool Loop_Proportional_Constant_Units_Set(
|
||||
uint32_t instance, BACNET_ENGINEERING_UNITS units);
|
||||
BACNET_STACK_EXPORT
|
||||
float Loop_Integral_Constant(uint32_t object_instance);
|
||||
BACNET_STACK_EXPORT
|
||||
bool Loop_Integral_Constant_Set(uint32_t object_instance, float value);
|
||||
BACNET_STACK_EXPORT
|
||||
uint16_t Loop_Integral_Constant_Units(uint32_t instance);
|
||||
BACNET_ENGINEERING_UNITS Loop_Integral_Constant_Units(uint32_t instance);
|
||||
BACNET_STACK_EXPORT
|
||||
bool Loop_Integral_Constant_Units_Set(uint32_t instance, uint16_t units);
|
||||
bool Loop_Integral_Constant_Units_Set(
|
||||
uint32_t instance, BACNET_ENGINEERING_UNITS units);
|
||||
BACNET_STACK_EXPORT
|
||||
float Loop_Derivative_Constant(uint32_t object_instance);
|
||||
BACNET_STACK_EXPORT
|
||||
bool Loop_Derivative_Constant_Set(uint32_t object_instance, float value);
|
||||
BACNET_STACK_EXPORT
|
||||
uint16_t Loop_Derivative_Constant_Units(uint32_t instance);
|
||||
BACNET_ENGINEERING_UNITS Loop_Derivative_Constant_Units(uint32_t instance);
|
||||
BACNET_STACK_EXPORT
|
||||
bool Loop_Derivative_Constant_Units_Set(uint32_t instance, uint16_t units);
|
||||
bool Loop_Derivative_Constant_Units_Set(
|
||||
uint32_t instance, BACNET_ENGINEERING_UNITS units);
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
float Loop_Bias(uint32_t object_instance);
|
||||
|
||||
@@ -239,8 +239,8 @@ int PositiveInteger_Value_Read_Property(BACNET_READ_PROPERTY_DATA *rpdata)
|
||||
break;
|
||||
|
||||
case PROP_UNITS:
|
||||
apdu_len =
|
||||
encode_application_enumerated(&apdu[0], CurrentAV->Units);
|
||||
apdu_len = encode_application_enumerated(
|
||||
&apdu[0], (uint32_t)CurrentAV->Units);
|
||||
break;
|
||||
/* BACnet Testing Observed Incident oi00109
|
||||
Positive Integer Value / Units returned wrong datatype -
|
||||
|
||||
@@ -23,7 +23,7 @@ extern "C" {
|
||||
typedef struct positiveinteger_value_descr {
|
||||
bool Out_Of_Service : 1;
|
||||
uint32_t Present_Value;
|
||||
uint16_t Units;
|
||||
BACNET_ENGINEERING_UNITS Units;
|
||||
} POSITIVEINTEGER_VALUE_DESCR;
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
|
||||
Reference in New Issue
Block a user