Changed API: encode_tagged is now encode_application since we are encoding an application tag.

This commit is contained in:
skarg
2007-10-13 12:26:16 +00:00
parent fe2c7cd00a
commit 3d6158443c
36 changed files with 466 additions and 464 deletions
+8 -8
View File
@@ -179,7 +179,7 @@ int Binary_Input_Encode_Property_APDU(uint8_t * apdu,
Binary_Input_Init();
switch (property) {
case PROP_OBJECT_IDENTIFIER:
apdu_len = encode_tagged_object_id(&apdu[0], OBJECT_BINARY_INPUT,
apdu_len = encode_application_object_id(&apdu[0], OBJECT_BINARY_INPUT,
object_instance);
break;
case PROP_OBJECT_NAME:
@@ -187,15 +187,15 @@ int Binary_Input_Encode_Property_APDU(uint8_t * apdu,
/* note: object name must be unique in our device */
characterstring_init_ansi(&char_string,
Binary_Input_Name(object_instance));
apdu_len = encode_tagged_character_string(&apdu[0], &char_string);
apdu_len = encode_application_character_string(&apdu[0], &char_string);
break;
case PROP_OBJECT_TYPE:
apdu_len = encode_tagged_enumerated(&apdu[0], OBJECT_BINARY_INPUT);
apdu_len = encode_application_enumerated(&apdu[0], OBJECT_BINARY_INPUT);
break;
case PROP_PRESENT_VALUE:
/* note: you need to look up the actual value */
apdu_len =
encode_tagged_enumerated(&apdu[0],
encode_application_enumerated(&apdu[0],
Binary_Input_Present_Value(object_instance));
break;
case PROP_STATUS_FLAGS:
@@ -205,17 +205,17 @@ int Binary_Input_Encode_Property_APDU(uint8_t * apdu,
bitstring_set_bit(&bit_string, STATUS_FLAG_FAULT, false);
bitstring_set_bit(&bit_string, STATUS_FLAG_OVERRIDDEN, false);
bitstring_set_bit(&bit_string, STATUS_FLAG_OUT_OF_SERVICE, false);
apdu_len = encode_tagged_bitstring(&apdu[0], &bit_string);
apdu_len = encode_application_bitstring(&apdu[0], &bit_string);
break;
case PROP_EVENT_STATE:
/* note: see the details in the standard on how to use this */
apdu_len = encode_tagged_enumerated(&apdu[0], EVENT_STATE_NORMAL);
apdu_len = encode_application_enumerated(&apdu[0], EVENT_STATE_NORMAL);
break;
case PROP_OUT_OF_SERVICE:
apdu_len = encode_tagged_boolean(&apdu[0], false);
apdu_len = encode_application_boolean(&apdu[0], false);
break;
case PROP_POLARITY:
apdu_len = encode_tagged_enumerated(&apdu[0], polarity);
apdu_len = encode_application_enumerated(&apdu[0], polarity);
break;
default:
*error_class = ERROR_CLASS_PROPERTY;