make pretty
This commit is contained in:
@@ -62,7 +62,7 @@ static void DecodeBlock(char cBlockNum, uint8_t *pData)
|
||||
iLen += tag_len;
|
||||
if (tag_number != BACNET_APPLICATION_TAG_UNSIGNED_INT) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
iLen += decode_unsigned(&pData[iLen], len_value_type, &ulTemp);
|
||||
Response.cMyByte1 = (char)ulTemp;
|
||||
@@ -72,7 +72,7 @@ static void DecodeBlock(char cBlockNum, uint8_t *pData)
|
||||
iLen += tag_len;
|
||||
if (tag_number != BACNET_APPLICATION_TAG_UNSIGNED_INT) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
iLen += decode_unsigned(&pData[iLen], len_value_type, &ulTemp);
|
||||
Response.cMyByte2 = (char)ulTemp;
|
||||
@@ -82,7 +82,7 @@ static void DecodeBlock(char cBlockNum, uint8_t *pData)
|
||||
iLen += tag_len;
|
||||
if (tag_number != BACNET_APPLICATION_TAG_REAL) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
iLen += decode_real(&pData[iLen], &Response.fMyReal);
|
||||
|
||||
@@ -91,7 +91,7 @@ static void DecodeBlock(char cBlockNum, uint8_t *pData)
|
||||
iLen += tag_len;
|
||||
if (tag_number != BACNET_APPLICATION_TAG_CHARACTER_STRING) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
iLen += decode_character_string(&pData[iLen], len_value_type, &bsName);
|
||||
strncpy(
|
||||
|
||||
+10
-11
@@ -100,12 +100,11 @@ static void MyErrorHandler(BACNET_ADDRESS *src,
|
||||
}
|
||||
|
||||
/* complex error reply function */
|
||||
static void MyPrivateTransferErrorHandler(
|
||||
BACNET_ADDRESS * src,
|
||||
uint8_t invoke_id,
|
||||
uint8_t service_choice,
|
||||
uint8_t * service_request,
|
||||
uint16_t service_len)
|
||||
static void MyPrivateTransferErrorHandler(BACNET_ADDRESS *src,
|
||||
uint8_t invoke_id,
|
||||
uint8_t service_choice,
|
||||
uint8_t *service_request,
|
||||
uint16_t service_len)
|
||||
{
|
||||
(void)src;
|
||||
(void)invoke_id;
|
||||
@@ -163,8 +162,8 @@ static void Init_Service_Handlers(void)
|
||||
|
||||
/* handle any errors coming back */
|
||||
apdu_set_error_handler(SERVICE_CONFIRMED_READ_PROPERTY, MyErrorHandler);
|
||||
apdu_set_complex_error_handler(SERVICE_CONFIRMED_PRIVATE_TRANSFER,
|
||||
MyPrivateTransferErrorHandler);
|
||||
apdu_set_complex_error_handler(
|
||||
SERVICE_CONFIRMED_PRIVATE_TRANSFER, MyPrivateTransferErrorHandler);
|
||||
apdu_set_abort_handler(MyAbortHandler);
|
||||
apdu_set_reject_handler(MyRejectHandler);
|
||||
}
|
||||
@@ -317,12 +316,12 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
if (Error_Detected) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
/* wait until the device is bound, or timeout and quit */
|
||||
if (!found) {
|
||||
found = address_bind_request(
|
||||
Target_Device_Object_Instance, &max_apdu, &Target_Address);
|
||||
}
|
||||
}
|
||||
if (found) {
|
||||
if (invoke_id == 0) { /* Safe to send a new request */
|
||||
switch (iType) {
|
||||
@@ -414,6 +413,6 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
if (Error_Detected) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ uint8_t Send_Private_Transfer_Request(uint32_t device_id,
|
||||
/* is there a tsm available? */
|
||||
if (status) {
|
||||
invoke_id = tsm_next_free_invokeID();
|
||||
}
|
||||
}
|
||||
if (invoke_id) {
|
||||
/* encode the NPDU portion of the packet */
|
||||
datalink_get_my_address(&my_address);
|
||||
|
||||
Reference in New Issue
Block a user