User`s guide

KwikNet Overview
K
A
DAK
7
1.2 General Operation
The KwikNet TCP/IP Stack and your application operate as illustrated in Figure 1.2-1. If
you are using KwikNet with AMX, all of the components shown in the block diagram are
provided with KwikNet, ready to use with AMX. You simply provide the application.
If you are using the KwikNet Porting Kit to port KwikNet to your operating environment,
then the shaded blocks indicate modules which will require modification to adapt KwikNet
for use with your application. As you can see, very few modules require adaptation.
The KwikNet TCP/IP Stack sits between your application and the network. In some cases,
your application may exclude the TCP stack and interface directly with the UDP and IP
stack using low level KwikNet services. In most cases, your application will use the
KwikNet TCP or UDP socket services. The KwikNet application interface shields you from
any direct involvement with the underlying network, device drivers or operating system.
KwikNet includes an operating system interface which makes it suitable for use with or
without a real-time operating system. KwikNet is connected to the RT/OS by an OS
Interface Module, a C file containing procedures which provide access to the services of
the RT/OS. This module is incorporated into the KwikNet Library so that it is always
available for use by your application.
The KwikNet TCP/IP Stack consists of a single KwikNet Library built according to your
specifications to meet your particular needs. The stack interacts directly with one or
more KwikNet device drivers, each of which connects KwikNet to a particular network.
Networks can be predefined and/or dynamically constructed at runtime. Each predefined
network and its associated device driver is identified in the KwikNet network configuration
file KN_NCF.C in the KwikNet Library. The KwikNet Library is built to meet your
requirements as recorded in a parameter file generated by the KwikNet Configuration
Builder (see Chapter 2).
KwikNet communicates with an external network through the device driver which handles
the hardware device physically connected to the network. The KwikNet device driver
interface is described in the KwikNet Device Driver Technical Reference Manual. In most
applications, the device driver is interrupt driven. Only in the simplest of systems can the
device driver afford to use a polling strategy. The device driver interface allows KwikNet
to call the driver to initiate transmissions on the network. It also allows the driver to
signal
KwikNet upon receipt of a packet from the network. A separate board driver
connects
KwikNet, its device drivers and the OS Interface Module to your target hardware
in an RT/OS independent manner.
Figure 1.2-1 also shows an application OS interface, a C module used by KADAK to
provide a standard interface between the RT/OS and the sample programs (applications)
provided with KwikNet and its options. If you port the KwikNet sample programs (and it is
recommended that you do so), you will have to use this module. You may also find that
portions of this module can, with very little adaptation, be used by your own application.
Finally, the RT/OS must provide a timing source. Although the RT/OS clock driver is
shown as a separate component, it may be implemented as an interrupt service routine
which resides in the OS Interface Module or in the application OS interface. When AMX
is used, your AMX clock driver will generate the fundamental timing needed by
KwikNet.