Integrating the ReadPropertyMultiple handler - not working yet.

This commit is contained in:
skarg
2007-07-17 03:02:25 +00:00
parent b952a54966
commit a8555ef196
3 changed files with 22 additions and 4 deletions
+16 -4
View File
@@ -96,19 +96,27 @@ void handler_read_property_multiple(uint8_t * service_request, uint16_t service_
/* bad decoding - send an abort */ /* bad decoding - send an abort */
if (service_len == 0) if (service_len == 0)
{ {
apdu_len = abort_encode_apdu(&Handler_Transmit_Buffer[npdu_len], service_data->invoke_id, ABORT_REASON_OTHER, true); apdu_len = abort_encode_apdu(
&Handler_Transmit_Buffer[npdu_len],
service_data->invoke_id,
ABORT_REASON_OTHER, true);
#if PRINT_ENABLED #if PRINT_ENABLED
printf("RPM: Sending Abort!\r\n"); printf("RPM: Sending Abort!\r\n");
#endif #endif
} else if (service_data->segmented_message) { } else if (service_data->segmented_message) {
apdu_len = abort_encode_apdu(&Handler_Transmit_Buffer[npdu_len], service_data->invoke_id, ABORT_REASON_SEGMENTATION_NOT_SUPPORTED, true); apdu_len = abort_encode_apdu(
&Handler_Transmit_Buffer[npdu_len],
service_data->invoke_id,
ABORT_REASON_SEGMENTATION_NOT_SUPPORTED, true);
#if PRINT_ENABLED #if PRINT_ENABLED
printf("RPM: Sending Abort!\r\n"); printf("RPM: Sending Abort!\r\n");
#endif #endif
} else { } else {
/* decode apdu request & encode apdu reply /* decode apdu request & encode apdu reply
encode complex ack, invoke id, service choice */ encode complex ack, invoke id, service choice */
apdu_len = rpm_ack_encode_apdu_init(&Handler_Transmit_Buffer[npdu_len], service_data->invoke_id); apdu_len = rpm_ack_encode_apdu_init(
&Handler_Transmit_Buffer[npdu_len],
service_data->invoke_id);
do do
{ {
len = rpm_ack_decode_object_id( len = rpm_ack_decode_object_id(
@@ -360,7 +368,11 @@ void handler_read_property_multiple(uint8_t * service_request, uint16_t service_
if (!error && property_found) { if (!error && property_found) {
len = encode_closing_tag(&Temp_Buf[0], 4); len = encode_closing_tag(&Temp_Buf[0], 4);
if (!copy_apdu_data_buffer(&apdu_len, len, npdu_len)) { if (!copy_apdu_data_buffer(&apdu_len, len, npdu_len)) {
apdu_len = abort_encode_apdu(&Handler_Transmit_Buffer[npdu_len], service_data->invoke_id, ABORT_REASON_SEGMENTATION_NOT_SUPPORTED, true); apdu_len = abort_encode_apdu(
&Handler_Transmit_Buffer[npdu_len],
service_data->invoke_id,
ABORT_REASON_SEGMENTATION_NOT_SUPPORTED,
true);
break; break;
} }
} else { } else {
+6
View File
@@ -78,6 +78,12 @@ static int Device_Properties_Required[] =
static int Device_Properties_Optional[] = static int Device_Properties_Optional[] =
{ {
PROP_DESCRIPTION,
PROP_LOCAL_TIME,
PROP_UTC_OFFSET,
PROP_LOCAL_DATE,
PROP_DAYLIGHT_SAVINGS_STATUS,
PROP_PROTOCOL_CONFORMANCE_CLASS,
-1 -1
}; };
Binary file not shown.