refactored the Who-Is and I-Am handling, and cleaned up some comments.

This commit is contained in:
skarg
2006-02-20 16:17:46 +00:00
parent 16c2545f45
commit 676ecf77a2
9 changed files with 149 additions and 188 deletions
+2 -7
View File
@@ -45,7 +45,7 @@
#include "net.h"
#include "txbuf.h"
/* This is an example application using the BACnet Stack */
/* This is an example server application using the BACnet Stack */
/* buffers used for receiving */
static uint8_t Rx_Buf[MAX_MPDU] = { 0 };
@@ -135,7 +135,7 @@ int main(int argc, char *argv[])
/* configure the timeout values */
last_seconds = time(NULL);
/* broadcast an I-Am on startup */
I_Am_Request = true;
iam_send(&Handler_Transmit_Buffer[0]);
/* loop forever */
for (;;) {
/* input */
@@ -151,11 +151,6 @@ int main(int argc, char *argv[])
/* at least one second has passed */
if (current_seconds != last_seconds)
dcc_timer_seconds(current_seconds - last_seconds);
/* send out the I-Am if requested */
if (I_Am_Request) {
I_Am_Request = false;
iam_send(&Handler_Transmit_Buffer[0]);
}
/* output */
/* blink LEDs, Turn on or off outputs, etc */