Test program used to exercise the code when connected to a real radio
#include "Address.h"
#include "PhysicalLayer.h"
#include "DataLayer.h"
#include "NetworkLayer.h"
#include "UnixPort.h"
#include "Log.h"
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <time.h>
#define RADIO_DEVICE_NAME "/dev/ttyUSB0"
#define RADIO_DEVICE_BAUD 9600
{
{
DEBUG_PRINTF("received network link_ready\n");
}
{
DEBUG_PRINTF("received network_layer_packet\n");
}
};
int main(int argc, char** argv)
{
TestNetworkLayer network;
network.setDataLayer(&data);
network.power_on();
uint8_t count = 0;
while (1)
{
network.poll();
usleep(10000);
uint8_t sst_data[] = { MAP27_NETWORK_MESSAGE_SEND_SST_CODING_OCTETS, 0x11, 0x22, 0x33, 0x44 };
uint8_t modem_data[] = { 0x11, 0x22, 0x33 };
uint8_t dialled_string[] = { '*', '4', '1', '*', '2', '3', '4', '#' };
if (network.is_idle())
{
network.sendStatus(address, count++);
}
}
return 0;
}