tfNotifyInterfaceTask

Jump to: navigation, search

Table of Contents >> Programmer's Reference


#include <trsocket.h>


void tfNotifyInterfaceTask (
ttUserInterface interfaceHandle,
int numberRecvPackets,
int numberSendCompletePackets,
ttUser32Bit numberBytesSent,
ttUser32Bit flag
);


Function Description

This function notifies the stack with both the number of packets received and the number of packets transmitted by the chip. This function is to be called by the user inside a Task (rather than an ISR) with the appropriate number of received and sent packets. This will in turn cause the stack to notify the user's application about what has occurred. In the case of received packets, tfCheckReceiveInterface() will return 0 once for each received packets if the user is in polling mode.

In blocking mode, tfWaitReceiveInterface() will return once for each received packet. For sent packets, tfCheckSentInterface() will return 0 once for each sent packet in polling mode, or tfWaitSentInterface() will return once for each sent packet in blocking mode. These functions only notify the user of a sent packet in the case that the accumulated numberBytesSent has reached TM_NOTIFY_SEND_LOW_WATER (2048 by default), since the previous notification.


Parameters

  • interfaceHandle
    The interface handle to notify Treck of.
  • numberRecvPackets
    The number of received packets to notify of.
  • numberSendCompletePackets
    The number of packets actually sent on this interface.
  • numberBytesSent
    Then number of bytes actually sent on this interface.
  • flag
    Unused.


Note Note: The values for numberRecvPackets, numberSendCompletePackets, and numberBytesSent may be 0.


Table of Contents >> Programmer's Reference