Cleaned up BACnet Double.
This commit is contained in:
@@ -151,6 +151,18 @@ extern "C" {
|
|||||||
int tag_number,
|
int tag_number,
|
||||||
float value);
|
float value);
|
||||||
|
|
||||||
|
/* from clause 20.2.7 Encoding of a Double Precision Real Number Value */
|
||||||
|
/* and 20.2.1 General Rules for Encoding BACnet Tags */
|
||||||
|
/* returns the number of apdu bytes consumed */
|
||||||
|
int encode_application_double(
|
||||||
|
uint8_t * apdu,
|
||||||
|
double value);
|
||||||
|
|
||||||
|
int encode_context_double(
|
||||||
|
uint8_t * apdu,
|
||||||
|
int tag_number,
|
||||||
|
double value);
|
||||||
|
|
||||||
/* from clause 20.2.14 Encoding of an Object Identifier Value */
|
/* from clause 20.2.14 Encoding of an Object Identifier Value */
|
||||||
/* and 20.2.1 General Rules for Encoding BACnet Tags */
|
/* and 20.2.1 General Rules for Encoding BACnet Tags */
|
||||||
/* returns the number of apdu bytes consumed */
|
/* returns the number of apdu bytes consumed */
|
||||||
|
|||||||
@@ -87,7 +87,6 @@ int bacapp_encode_application_data(
|
|||||||
#endif
|
#endif
|
||||||
#if defined (BACAPP_DOUBLE)
|
#if defined (BACAPP_DOUBLE)
|
||||||
case BACNET_APPLICATION_TAG_DOUBLE:
|
case BACNET_APPLICATION_TAG_DOUBLE:
|
||||||
/* FIXME: double is not implemented yet. */
|
|
||||||
apdu_len =
|
apdu_len =
|
||||||
encode_application_double(&apdu[0], value->type.Double);
|
encode_application_double(&apdu[0], value->type.Double);
|
||||||
break;
|
break;
|
||||||
@@ -326,7 +325,6 @@ int bacapp_encode_context_data_value(
|
|||||||
#endif
|
#endif
|
||||||
#if defined (BACAPP_DOUBLE)
|
#if defined (BACAPP_DOUBLE)
|
||||||
case BACNET_APPLICATION_TAG_DOUBLE:
|
case BACNET_APPLICATION_TAG_DOUBLE:
|
||||||
/* FIXME: double is not implemented yet. */
|
|
||||||
apdu_len =
|
apdu_len =
|
||||||
encode_context_double(&apdu[0], context_tag_number,
|
encode_context_double(&apdu[0], context_tag_number,
|
||||||
value->type.Double);
|
value->type.Double);
|
||||||
|
|||||||
@@ -1401,7 +1401,7 @@ int encode_context_real(
|
|||||||
/* returns the number of apdu bytes consumed */
|
/* returns the number of apdu bytes consumed */
|
||||||
int encode_application_double(
|
int encode_application_double(
|
||||||
uint8_t * apdu,
|
uint8_t * apdu,
|
||||||
float value)
|
double value)
|
||||||
{
|
{
|
||||||
int len = 0;
|
int len = 0;
|
||||||
|
|
||||||
@@ -1415,7 +1415,7 @@ int encode_application_double(
|
|||||||
int encode_context_double(
|
int encode_context_double(
|
||||||
uint8_t * apdu,
|
uint8_t * apdu,
|
||||||
int tag_number,
|
int tag_number,
|
||||||
float value)
|
double value)
|
||||||
{
|
{
|
||||||
int len = 0;
|
int len = 0;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user