81 lines
2.2 KiB
Raw Normal View History

\mainpage LIBCAPWAP Documentation
\section LIBCAPWAPInstall Installing
To install libcapwap you need the following things:
A computer, a keyboard, some software and time.
\section MsgHandling Extending CAPWAP
Probably the easies way to explain, how to extend the CAPWAP, is to show an example.\n
Here we go ...
\subsection SimpleExample A Simple Example
Imagine you whant to implement a new vendor specific message element called
"WTP LED Status and Color". In the real world this could be a message element, that
is used by a WTP to indicate it's LED status, and sent by the AC to set the WTP's
LED status.\n
There might be a specification where the message element is idefined as follows:
Vendor Specific Element - WTP LED Status and Color
0 1
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6
| Status | Color |
Type: 17
Length: 2
The first thing we have now to do, ist to define an item ID, that is interlnally
used by AC-Tube to store and find data associated with this message element.
This ID is simply a system-wide unique string constant.\n
So let's create a file "mycapwap.c" and define the ID.
const char CW_MYITEM_WTP_LED_STATUS_AND_COLOR[]="wtp_led_status_and_color";
The item ID is also used to identify message element data stored in a SQL
database or in json objects.\n
Next we should provide some information about our item, which is done by
creating an item definition, described by structure #cw_itemdef.\n
Looking at the specification of our message element we see that the value
is built of two bytes, which can be represented as word. There is a
pre-defined type MBAG_WORD which we will use.
#include "capwap/mbag.h"
const char CW_MYITEM_WTP_LED_STATUS_AND_COLOR[]="wtp_led_status_and_color";
struct cw_itemdef_t myitemdefs[] = {
\section ItemsElements Items, Elements, Messages ...
\subsection asd fdglksd
This is the text for the subsection.