Hi Mark,
I would like to monitor the ARP resolution for UDP sockets. So I've added a "case 'A':" in the task loop to gather the messages from the ARP task. These messages are 2 bytes longer than the timer and interrupts messages that are tested in the loop.
If I modify the length in the fnRead call from HEADER_LENGTH to HEADER_LENGTH+2, the application no longer works, the timer and interrupts events are not seen.
If I set the length to HEADER_LENGTH, the application works well but I can't access the ARP infos that are after the message header.
What happens in the fnRead function when the indicated length is greater than the message length? Howto write the program ith different length messages?
Thank you for your help.
Regards
Francis
Code sample :
-----------------
unsigned char ucInputMessage[HEADER_LENGTH+2]; // +2 for ARP infos
QUEUE_TRANSFER length;
// loop
while(fnRead(PortIdInternal, ucInputMessage, HEADER_LENGTH + 2))
{
switch(ucInputMessage[MSG_SOURCE_TASK])
{
case TIMER_EVENT: // timer event either periodic or command timer
if(ucInputMessage[MSG_TIMER_EVENT] == E_TIMER_PERIODIC) // execute state machine
{
....
case 'A': // infos from ARP task
length of ucInputMessage is HEADER_LENGTH + 2
...