Updated for Win32 build using Borland compiler.
This commit is contained in:
+17
-8
@@ -59,12 +59,14 @@ int bacapp_encode_application_data(
|
|||||||
else if (value->tag == BACNET_APPLICATION_TAG_REAL)
|
else if (value->tag == BACNET_APPLICATION_TAG_REAL)
|
||||||
apdu_len += encode_tagged_real(&apdu[apdu_len],
|
apdu_len += encode_tagged_real(&apdu[apdu_len],
|
||||||
value->type.Real);
|
value->type.Real);
|
||||||
/* FIXME: encode the strings using the string datatype
|
|
||||||
else if (value->tag == BACNET_APPLICATION_TAG_CHARACTER_STRING)
|
else if (value->tag == BACNET_APPLICATION_TAG_CHARACTER_STRING)
|
||||||
apdu_len += encode_tagged_character_string(
|
apdu_len += encode_tagged_character_string(
|
||||||
&apdu[apdu_len],
|
&apdu[apdu_len],
|
||||||
&value->type.Character_String[0]);
|
&value->type.Character_String);
|
||||||
*/
|
else if (value->tag == BACNET_APPLICATION_TAG_OCTET_STRING)
|
||||||
|
apdu_len += encode_tagged_octet_string(
|
||||||
|
&apdu[apdu_len],
|
||||||
|
&value->type.Octet_String);
|
||||||
else if (value->tag == BACNET_APPLICATION_TAG_ENUMERATED)
|
else if (value->tag == BACNET_APPLICATION_TAG_ENUMERATED)
|
||||||
apdu_len += encode_tagged_enumerated(&apdu[apdu_len],
|
apdu_len += encode_tagged_enumerated(&apdu[apdu_len],
|
||||||
value->type.Enumerated);
|
value->type.Enumerated);
|
||||||
@@ -102,6 +104,8 @@ int bacapp_decode_application_data(
|
|||||||
int object_type = 0;
|
int object_type = 0;
|
||||||
uint32_t instance = 0;
|
uint32_t instance = 0;
|
||||||
|
|
||||||
|
/* FIXME: use apdu_len! */
|
||||||
|
(void)apdu_len;
|
||||||
if (apdu)
|
if (apdu)
|
||||||
{
|
{
|
||||||
tag_len = decode_tag_number_and_value(&apdu[0],
|
tag_len = decode_tag_number_and_value(&apdu[0],
|
||||||
@@ -126,7 +130,7 @@ int bacapp_decode_application_data(
|
|||||||
&value->type.Unsigned_Int);
|
&value->type.Unsigned_Int);
|
||||||
}
|
}
|
||||||
else if (tag_number == BACNET_APPLICATION_TAG_SIGNED_INT)
|
else if (tag_number == BACNET_APPLICATION_TAG_SIGNED_INT)
|
||||||
{
|
{
|
||||||
value->tag = tag_number;
|
value->tag = tag_number;
|
||||||
len += decode_signed(&apdu[len],
|
len += decode_signed(&apdu[len],
|
||||||
len_value_type,
|
len_value_type,
|
||||||
@@ -137,15 +141,20 @@ int bacapp_decode_application_data(
|
|||||||
value->tag = tag_number;
|
value->tag = tag_number;
|
||||||
len += decode_real(&apdu[len],&(value->type.Real));
|
len += decode_real(&apdu[len],&(value->type.Real));
|
||||||
}
|
}
|
||||||
/* FIXME: decode the strings using the string datatype
|
|
||||||
else if (tag_number == BACNET_APPLICATION_TAG_CHARACTER_STRING)
|
else if (tag_number == BACNET_APPLICATION_TAG_CHARACTER_STRING)
|
||||||
{
|
{
|
||||||
value->tag = tag_number;
|
value->tag = tag_number;
|
||||||
len += decode_character_string(&apdu[len],
|
len += decode_character_string(&apdu[len],
|
||||||
&value->type.Character_String[0],
|
len_value_type,
|
||||||
sizeof(value->type.Character_String));
|
&value->type.Character_String);
|
||||||
|
}
|
||||||
|
else if (tag_number == BACNET_APPLICATION_TAG_OCTET_STRING)
|
||||||
|
{
|
||||||
|
value->tag = tag_number;
|
||||||
|
len += decode_octet_string(&apdu[len],
|
||||||
|
len_value_type,
|
||||||
|
&value->type.Octet_String);
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
else if (tag_number == BACNET_APPLICATION_TAG_ENUMERATED)
|
else if (tag_number == BACNET_APPLICATION_TAG_ENUMERATED)
|
||||||
{
|
{
|
||||||
value->tag = tag_number;
|
value->tag = tag_number;
|
||||||
|
|||||||
@@ -345,6 +345,7 @@ void ReadPropertyAckHandler(
|
|||||||
BACNET_READ_PROPERTY_DATA data;
|
BACNET_READ_PROPERTY_DATA data;
|
||||||
|
|
||||||
(void)src;
|
(void)src;
|
||||||
|
(void)service_data; /* we could use these... */
|
||||||
len = rp_ack_decode_service_request(
|
len = rp_ack_decode_service_request(
|
||||||
service_request,
|
service_request,
|
||||||
service_len,
|
service_len,
|
||||||
|
|||||||
@@ -21,6 +21,8 @@ SRCS = main.c bip-init.c \
|
|||||||
..\..\bip.c \
|
..\..\bip.c \
|
||||||
..\..\handlers.c \
|
..\..\handlers.c \
|
||||||
..\..\bacdcode.c \
|
..\..\bacdcode.c \
|
||||||
|
..\..\bacapp.c \
|
||||||
|
..\..\bacstr.c \
|
||||||
..\..\bactext.c \
|
..\..\bactext.c \
|
||||||
..\..\indtext.c \
|
..\..\indtext.c \
|
||||||
..\..\bigend.c \
|
..\..\bigend.c \
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user