added secure BACnet primitive datatype encode functions. (#643)
* added secure BACnet primitive datatype encode functions.
This commit is contained in:
+68
-10
@@ -73,6 +73,9 @@ BACNET_STACK_EXPORT
|
||||
int encode_opening_tag(uint8_t *apdu, uint8_t tag_number);
|
||||
BACNET_STACK_EXPORT
|
||||
int encode_closing_tag(uint8_t *apdu, uint8_t tag_number);
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
int bacnet_tag_encode(uint8_t *apdu, uint32_t apdu_size, BACNET_TAG *tag);
|
||||
BACNET_STACK_EXPORT
|
||||
int bacnet_tag_decode(uint8_t *apdu, uint32_t apdu_size, BACNET_TAG *tag);
|
||||
|
||||
@@ -152,9 +155,13 @@ BACNET_STACK_EXPORT
|
||||
BACNET_STACK_DEPRECATED("Use bacnet_boolean_context_decode() instead")
|
||||
int decode_context_boolean2(
|
||||
uint8_t *apdu, uint8_t tag_number, bool *boolean_value);
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
int bacnet_boolean_application_encode(
|
||||
uint8_t *apdu, uint32_t apdu_size, bool value);
|
||||
BACNET_STACK_EXPORT
|
||||
int bacnet_boolean_application_decode(
|
||||
uint8_t *apdu, uint32_t apdu_len_max, bool *boolean_value);
|
||||
uint8_t *apdu, uint32_t apdu_len_max, bool *value);
|
||||
BACNET_STACK_EXPORT
|
||||
int bacnet_boolean_context_decode(uint8_t *apdu,
|
||||
uint32_t apdu_len_max,
|
||||
@@ -181,11 +188,16 @@ int bacnet_bitstring_decode(uint8_t *apdu,
|
||||
uint32_t apdu_len_max,
|
||||
uint32_t len_value,
|
||||
BACNET_BIT_STRING *value);
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
int bacnet_bitstring_application_encode(
|
||||
uint8_t *apdu, uint32_t apdu_size, BACNET_BIT_STRING *value);
|
||||
BACNET_STACK_EXPORT
|
||||
int bacnet_bitstring_application_decode(
|
||||
uint8_t *apdu, uint32_t apdu_len_max, BACNET_BIT_STRING *value);
|
||||
BACNET_STACK_EXPORT
|
||||
int bacnet_bitstring_context_decode(uint8_t *apdu,
|
||||
int bacnet_bitstring_context_decode(
|
||||
uint8_t *apdu,
|
||||
uint32_t apdu_len_max,
|
||||
uint8_t tag_value,
|
||||
BACNET_BIT_STRING *value);
|
||||
@@ -204,6 +216,9 @@ BACNET_STACK_EXPORT
|
||||
int bacnet_real_context_decode(
|
||||
uint8_t *apdu, uint32_t apdu_len_max, uint8_t tag_value, float *value);
|
||||
BACNET_STACK_EXPORT
|
||||
int bacnet_real_application_encode(
|
||||
uint8_t *apdu, uint32_t apdu_size, float value);
|
||||
BACNET_STACK_EXPORT
|
||||
int bacnet_real_application_decode(
|
||||
uint8_t *apdu, uint32_t apdu_len_max, float *value);
|
||||
|
||||
@@ -222,6 +237,9 @@ BACNET_STACK_EXPORT
|
||||
int bacnet_double_context_decode(
|
||||
uint8_t *apdu, uint32_t apdu_len_max, uint8_t tag_value, double *value);
|
||||
BACNET_STACK_EXPORT
|
||||
int bacnet_double_application_encode(
|
||||
uint8_t *apdu, uint32_t apdu_size, double value);
|
||||
BACNET_STACK_EXPORT
|
||||
int bacnet_double_application_decode(
|
||||
uint8_t *apdu, uint32_t apdu_len_max, double *value);
|
||||
|
||||
@@ -257,13 +275,22 @@ int bacnet_object_id_decode(uint8_t *apdu,
|
||||
uint32_t len_value,
|
||||
BACNET_OBJECT_TYPE *object_type,
|
||||
uint32_t *instance);
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
int bacnet_object_id_application_decode(uint8_t *apdu,
|
||||
int bacnet_object_id_application_encode(
|
||||
uint8_t *apdu,
|
||||
uint32_t apdu_size,
|
||||
BACNET_OBJECT_TYPE object_type,
|
||||
uint32_t object_instance);
|
||||
BACNET_STACK_EXPORT
|
||||
int bacnet_object_id_application_decode(
|
||||
uint8_t *apdu,
|
||||
uint32_t apdu_len_max,
|
||||
BACNET_OBJECT_TYPE *object_type,
|
||||
uint32_t *object_instance);
|
||||
BACNET_STACK_EXPORT
|
||||
int bacnet_object_id_context_decode(uint8_t *apdu,
|
||||
int bacnet_object_id_context_decode(
|
||||
uint8_t *apdu,
|
||||
uint32_t apdu_len_max,
|
||||
uint8_t tag_value,
|
||||
BACNET_OBJECT_TYPE *object_type,
|
||||
@@ -290,11 +317,16 @@ int bacnet_octet_string_decode(uint8_t *apdu,
|
||||
uint32_t apdu_len_max,
|
||||
uint32_t len_value,
|
||||
BACNET_OCTET_STRING *value);
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
int bacnet_octet_string_application_encode(
|
||||
uint8_t *apdu, uint32_t apdu_size, BACNET_OCTET_STRING *value);
|
||||
BACNET_STACK_EXPORT
|
||||
int bacnet_octet_string_application_decode(
|
||||
uint8_t *apdu, uint32_t apdu_len_max, BACNET_OCTET_STRING *value);
|
||||
BACNET_STACK_EXPORT
|
||||
int bacnet_octet_string_context_decode(uint8_t *apdu,
|
||||
int bacnet_octet_string_context_decode(
|
||||
uint8_t *apdu,
|
||||
uint32_t apdu_len_max,
|
||||
uint8_t tag_value,
|
||||
BACNET_OCTET_STRING *value);
|
||||
@@ -327,11 +359,16 @@ int bacnet_character_string_decode(uint8_t *apdu,
|
||||
uint32_t apdu_len_max,
|
||||
uint32_t len_value,
|
||||
BACNET_CHARACTER_STRING *char_string);
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
int bacnet_character_string_application_encode(
|
||||
uint8_t *apdu, uint32_t apdu_size, BACNET_CHARACTER_STRING *value);
|
||||
BACNET_STACK_EXPORT
|
||||
int bacnet_character_string_application_decode(
|
||||
uint8_t *apdu, uint32_t apdu_len_max, BACNET_CHARACTER_STRING *value);
|
||||
BACNET_STACK_EXPORT
|
||||
int bacnet_character_string_context_decode(uint8_t *apdu,
|
||||
int bacnet_character_string_context_decode(
|
||||
uint8_t *apdu,
|
||||
uint32_t apdu_len_max,
|
||||
uint8_t tag_value,
|
||||
BACNET_CHARACTER_STRING *value);
|
||||
@@ -356,11 +393,16 @@ int bacnet_unsigned_decode(uint8_t *apdu,
|
||||
uint32_t apdu_max_len,
|
||||
uint32_t len_value,
|
||||
BACNET_UNSIGNED_INTEGER *value);
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
int bacnet_unsigned_application_encode(
|
||||
uint8_t *apdu, uint32_t apdu_size, BACNET_UNSIGNED_INTEGER value);
|
||||
BACNET_STACK_EXPORT
|
||||
int bacnet_unsigned_application_decode(
|
||||
uint8_t *apdu, uint32_t apdu_len_max, BACNET_UNSIGNED_INTEGER *value);
|
||||
BACNET_STACK_EXPORT
|
||||
int bacnet_unsigned_context_decode(uint8_t *apdu,
|
||||
int bacnet_unsigned_context_decode(
|
||||
uint8_t *apdu,
|
||||
uint32_t apdu_len_max,
|
||||
uint8_t tag_number,
|
||||
BACNET_UNSIGNED_INTEGER *value);
|
||||
@@ -377,15 +419,19 @@ int decode_signed(uint8_t *apdu, uint32_t len_value, int32_t *value);
|
||||
BACNET_STACK_DEPRECATED("Use bacnet_signed_context_decode() instead")
|
||||
BACNET_STACK_EXPORT
|
||||
int decode_context_signed(uint8_t *apdu, uint8_t tag_number, int32_t *value);
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
int bacnet_signed_decode(
|
||||
uint8_t *apdu, uint32_t apdu_len_max, uint32_t len_value, int32_t *value);
|
||||
uint8_t *apdu, uint32_t apdu_size, uint32_t len_value, int32_t *value);
|
||||
BACNET_STACK_EXPORT
|
||||
int bacnet_signed_context_decode(
|
||||
uint8_t *apdu, uint32_t apdu_len_max, uint8_t tag_value, int32_t *value);
|
||||
uint8_t *apdu, uint32_t apdu_size, uint8_t tag_value, int32_t *value);
|
||||
BACNET_STACK_EXPORT
|
||||
int bacnet_signed_application_encode(
|
||||
uint8_t *apdu, uint32_t apdu_size, int32_t value);
|
||||
BACNET_STACK_EXPORT
|
||||
int bacnet_signed_application_decode(
|
||||
uint8_t *apdu, uint32_t apdu_len_max, int32_t *value);
|
||||
uint8_t *apdu, uint32_t apdu_size, int32_t *value);
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
int encode_bacnet_enumerated(uint8_t *apdu, uint32_t value);
|
||||
@@ -404,6 +450,11 @@ int decode_context_enumerated(
|
||||
BACNET_STACK_EXPORT
|
||||
int bacnet_enumerated_decode(
|
||||
uint8_t *apdu, uint32_t apdu_max_len, uint32_t len_value, uint32_t *value);
|
||||
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
int bacnet_enumerated_application_encode(
|
||||
uint8_t *apdu, uint32_t apdu_size, uint32_t value);
|
||||
BACNET_STACK_EXPORT
|
||||
int bacnet_enumerated_application_decode(
|
||||
uint8_t *apdu, uint32_t apdu_len_max, uint32_t *value);
|
||||
@@ -442,6 +493,9 @@ int bacnet_time_context_decode(uint8_t *apdu,
|
||||
uint8_t tag_value,
|
||||
BACNET_TIME *value);
|
||||
BACNET_STACK_EXPORT
|
||||
int bacnet_time_application_encode(
|
||||
uint8_t *apdu, uint32_t apdu_size, BACNET_TIME *value);
|
||||
BACNET_STACK_EXPORT
|
||||
int bacnet_time_application_decode(
|
||||
uint8_t *apdu, uint32_t apdu_len_max, BACNET_TIME *value);
|
||||
|
||||
@@ -468,6 +522,10 @@ int bacnet_date_decode(uint8_t *apdu,
|
||||
uint32_t apdu_len_max,
|
||||
uint32_t len_value,
|
||||
BACNET_DATE *value);
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
int bacnet_date_application_encode(
|
||||
uint8_t *apdu, uint32_t apdu_size, BACNET_DATE *value);
|
||||
BACNET_STACK_EXPORT
|
||||
int bacnet_date_application_decode(
|
||||
uint8_t *apdu, uint32_t apdu_len_max, BACNET_DATE *value);
|
||||
|
||||
Reference in New Issue
Block a user