system.c File Reference Main Page Modules Data Structures File List Data Fields Globals Related Pages Examples /opentcp/system.c File ReferenceDetailed Description Author: Jari Lahti (jari.lahti@violasystems.com) Version: 1.0 Date: 23.6.2002 Bug: Warning: Todo: This file contains system related functions and variables. See system.h for a list of function declarations, constants, etc. Definition in file system.c. Go to the source code of this file. Variables UINT32 base_timer UINT8 sleep_mode = 0 UINT8 net_buf [NETWORK_TX_BUFFER_SIZE] Transmit buffer used by all OpenTCP applications. Variable Documentation UINT32 base_timer System 1.024 msec timer Definition at line 74 of file system.c. UINT8 sleep_mode = 0 Used to store information about power-saving state we're in (if any) Definition at line 76 of file system.c. UINT8 net_buf[NETWORK_TX_BUFFER_SIZE] This buffer is the transmit buffer used by all OpenTCP applications for sending of data. Please note the warnings below for correct usage of this buffer that ensures proper operation of the applications. Warning: Transmit buffer start - to avoid data copying, the TCP/IP stack will use first part of the net_buf buffer to add it's data. This means that applications using TCP and/or UDP must not write application-level data from the beginning of the buffer but from certain offset. This offset depends on the transport-layer protocol (it's header size that is). For TCP this value is defined by the TCP_APP_OFFSET and for the UDP it is UDP_APP_OFFSET. Buffer sharing - since all applications share this buffer among each other, and with the TCP/IP stack as well, care must be taken not to overwrite other applications' data before it is sent. This is best achieved if all applications work in the main loop and when they wish to send data they fill in the buffer and send it immediately. Definition at line 99 of file system.c. Generated on Sun Aug 3 20:33:00 2003 for OpenTCP by width=110 height=53>1.2.18