fixed dos-unix line feed issue.
This commit is contained in:
+23
-28
@@ -119,8 +119,7 @@ static FD_TABLE_ENTRY FD_Table[MAX_FD_ENTRIES];
|
|||||||
|
|
||||||
if (FD_Table[i].seconds_remaining == 0)
|
if (FD_Table[i].seconds_remaining == 0)
|
||||||
|
|
||||||
|
{
|
||||||
if (FD_Table[i].seconds_remaining == 0)
|
|
||||||
|
|
||||||
FD_Table[i].valid = false;
|
FD_Table[i].valid = false;
|
||||||
|
|
||||||
@@ -130,8 +129,8 @@ int bvlc_encode_address_entry(
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -190,8 +189,7 @@ int bvlc_encode_address_entry(
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return len;
|
|
||||||
int bvlc_encode_bvlc_result(uint8_t * pdu,
|
int bvlc_encode_bvlc_result(uint8_t * pdu,
|
||||||
|
|
||||||
BACNET_BVLC_RESULT result_code)
|
BACNET_BVLC_RESULT result_code)
|
||||||
@@ -216,8 +214,8 @@ int bvlc_encode_address_entry(
|
|||||||
return 6;
|
return 6;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return 6;
|
|
||||||
int bvlc_encode_write_bdt_init(
|
int bvlc_encode_write_bdt_init(
|
||||||
uint8_t * pdu,
|
uint8_t * pdu,
|
||||||
unsigned entries)
|
unsigned entries)
|
||||||
@@ -263,8 +261,8 @@ int bvlc_encode_address_entry(
|
|||||||
/* The 2-octet BVLC Length field is the length, in octets,
|
/* The 2-octet BVLC Length field is the length, in octets,
|
||||||
of the entire BVLL message, including the two octets of the
|
of the entire BVLL message, including the two octets of the
|
||||||
length field itself, most significant octet first. */
|
length field itself, most significant octet first. */
|
||||||
|
encode_unsigned16(&pdu[2], 4);
|
||||||
/* The 2-octet BVLC Length field is the length, in octets,
|
|
||||||
len = 4;
|
len = 4;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -283,8 +281,8 @@ int bvlc_encode_address_entry(
|
|||||||
int len = 0;
|
int len = 0;
|
||||||
|
|
||||||
|
|
||||||
|
if (pdu) {
|
||||||
int len = 0;
|
|
||||||
pdu[0] = BVLL_TYPE_BACNET_IP;
|
pdu[0] = BVLL_TYPE_BACNET_IP;
|
||||||
|
|
||||||
pdu[1] = BVLC_READ_BROADCAST_DISTRIBUTION_TABLE_ACK;
|
pdu[1] = BVLC_READ_BROADCAST_DISTRIBUTION_TABLE_ACK;
|
||||||
@@ -303,8 +301,8 @@ int bvlc_encode_address_entry(
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return len;
|
|
||||||
|
int bvlc_encode_forwarded_npdu(uint8_t * pdu,
|
||||||
BACNET_ADDRESS * src,
|
BACNET_ADDRESS * src,
|
||||||
uint8_t * npdu,
|
uint8_t * npdu,
|
||||||
unsigned npdu_length)
|
unsigned npdu_length)
|
||||||
@@ -323,8 +321,8 @@ int bvlc_encode_address_entry(
|
|||||||
|
|
||||||
/* The 2-octet BVLC Length field is the length, in octets,
|
/* The 2-octet BVLC Length field is the length, in octets,
|
||||||
of the entire BVLL message, including the two octets of the
|
of the entire BVLL message, including the two octets of the
|
||||||
|
length field itself, most significant octet first. */
|
||||||
pdu[1] = BVLC_FORWARDED_NPDU;
|
encode_unsigned16(&pdu[2], 4 + 6 + npdu_length);
|
||||||
|
|
||||||
len = 4;
|
len = 4;
|
||||||
|
|
||||||
@@ -349,8 +347,8 @@ int bvlc_encode_address_entry(
|
|||||||
|
|
||||||
return len;
|
return len;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int bvlc_encode_register_foreign_device(uint8_t * pdu,
|
int bvlc_encode_register_foreign_device(uint8_t * pdu,
|
||||||
|
|
||||||
@@ -368,8 +366,8 @@ void bvlc_internet_to_bacnet_address(
BACNET_ADDRESS * src, /* returns the BACn
|
|||||||
|
|
||||||
/* The 2-octet BVLC Length field is the length, in octets,
|
/* The 2-octet BVLC Length field is the length, in octets,
|
||||||
of the entire BVLL message, including the two octets of the
|
of the entire BVLL message, including the two octets of the
|
||||||
|
length field itself, most significant octet first. */
|
||||||
pdu[1] = BVLC_REGISTER_FOREIGN_DEVICE;
|
encode_unsigned16(&pdu[2], 6);
|
||||||
|
|
||||||
encode_unsigned16(&pdu[2], time_to_live_seconds);
|
encode_unsigned16(&pdu[2], time_to_live_seconds);
|
||||||
|
|
||||||
@@ -383,8 +381,8 @@ void bvlc_bacnet_to_internet_address(
struct sockaddr_in *sin, /* source intern
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return len;
|
int bvlc_encode_read_fdt(
|
||||||
|
uint8_t * pdu)
|
||||||
{
|
{
|
||||||
|
|
||||||
int len = 0;
|
int len = 0;
|
||||||
@@ -425,13 +423,11 @@ void bvlc_bacnet_to_internet_address(
struct sockaddr_in *sin, /* source intern
|
|||||||
|
|
||||||
pdu[1] = BVLC_READ_FOREIGN_DEVICE_TABLE_ACK;
|
pdu[1] = BVLC_READ_FOREIGN_DEVICE_TABLE_ACK;
|
||||||
|
|
||||||
|
/* The 2-octet BVLC Length field is the length, in octets,
|
||||||
pdu[0] = BVLL_TYPE_BACNET_IP;
|
|
||||||
of the entire BVLL message, including the two octets of the
|
of the entire BVLL message, including the two octets of the
|
||||||
length field itself, most significant octet first. */
|
length field itself, most significant octet first. */
|
||||||
encode_unsigned16(&pdu[2], 4 + entries * 10);
|
encode_unsigned16(&pdu[2], 4 + entries * 10);
|
||||||
/* The 2-octet BVLC Length field is the length, in octets,
|
|
||||||
of the entire BVLL message, including the two octets of the
|
|
||||||
len = 4;
|
len = 4;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -463,8 +459,7 @@ void bvlc_bacnet_to_internet_address(
struct sockaddr_in *sin, /* source intern
|
|||||||
encode_unsigned16(&pdu[2], 10);
|
encode_unsigned16(&pdu[2], 10);
|
||||||
|
|
||||||
/* FDT Entry */
|
/* FDT Entry */
|
||||||
encode_unsigned16(&pdu[2], 10);
|
encode_unsigned32(&pdu[0], address->s_addr);
|
||||||
|
|
||||||
|
|
||||||
encode_unsigned16(&pdu[4], port);
|
encode_unsigned16(&pdu[4], port);
|
||||||
|
|
||||||
|
|||||||
@@ -49,5 +49,4 @@ extern "C" {
|
|||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif /* __cplusplus */
|
#endif /* __cplusplus */
|
||||||
#endif /* __cplusplus */
|
|
||||||
#endif /*
|
#endif /*
|
||||||
|
|||||||
Reference in New Issue
Block a user