Moved APDU Timeout and Retries to apdu module.

This commit is contained in:
skarg
2008-08-17 02:12:58 +00:00
parent 0326112c68
commit 9c316a65dc
25 changed files with 79 additions and 173 deletions
+2 -10
View File
@@ -35,7 +35,6 @@
#include "bacenum.h"
#include "bacdcode.h"
#include "bacdef.h"
#include "device.h"
#include "wp.h"
/* encode service */
@@ -49,8 +48,7 @@ int wp_encode_apdu(
if (apdu) {
apdu[0] = PDU_TYPE_CONFIRMED_SERVICE_REQUEST;
apdu[1] =
encode_max_segs_max_apdu(0, Device_Max_APDU_Length_Accepted());
apdu[1] = encode_max_segs_max_apdu(0, MAX_APDU);
apdu[2] = invoke_id;
apdu[3] = SERVICE_CONFIRMED_WRITE_PROPERTY; /* service choice */
apdu_len = 4;
@@ -194,7 +192,7 @@ int wp_decode_apdu(
/* optional checking - most likely was already done prior to this call */
if (apdu[0] != PDU_TYPE_CONFIRMED_SERVICE_REQUEST)
return -1;
/* apdu[1] = encode_max_segs_max_apdu(0, Device_Max_APDU_Length_Accepted()); */
/* apdu[1] = encode_max_segs_max_apdu(0, MAX_APDU); */
*invoke_id = apdu[2]; /* invoke id - filled in by net layer */
if (apdu[3] != SERVICE_CONFIRMED_WRITE_PROPERTY)
return -1;
@@ -365,12 +363,6 @@ void testWriteProperty(
}
#ifdef TEST_WRITE_PROPERTY
uint16_t Device_Max_APDU_Length_Accepted(
void)
{
return MAX_APDU;
}
int main(
void)
{