example_doxy.h 4.1 KB
Newer Older
1 2 3 4 5
/*
 * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The OpenAirInterface Software Alliance licenses this file to You under
6
 * the OAI Public License, Version 1.1  (the "License"); you may not use this file
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
 * except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.openairinterface.org/?page_id=698
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *-------------------------------------------------------------------------------
 * For more information about the OpenAirInterface (OAI) Software Alliance:
 *      contact@openairinterface.org
 */

22
/*! \file doxy_template.h
23
* \brief explain how this block is organized, and how it works
24 25
* \author Navid Nikaein
* \date 2006-2010
26
* \version 4.0
27 28
* \company Eurecom
* \email: navid.nikaein@eurecom.fr
29 30
* \note this a note
* \bug  this is a bug
31
* \warning  this is a warning
32
*/
33

34 35 36
#ifndef __DOCS_TEMPLATES_CODE_EXAMPLE_DOXY__H__
#define __DOCS_TEMPLATES_CODE_EXAMPLE_DOXY__H__

37 38 39 40 41 42 43 44 45 46
//-----------------------------------begin group-----------------------------


/** @defgroup _oai System definitions



There is different modules:
- OAI Address
- OAI Components
47
- \ref _frame
48

49
The following diagram is based on graphviz (http://www.graphviz.org/), you need to install the package to view the diagram.
50 51 52 53

 * \dot
 * digraph group_frame  {
 *     node [shape=rect, fontname=Helvetica, fontsize=8,style=filled,fillcolor=lightgrey];
54 55 56 57 58 59 60 61
 *     a [ label = " address"];
 *     b [ label = " component"];
 *     c [ label = " frame",URL="\ref _frame"];
 *    a->b;
 *    a->c;
 *    b->d;
 *  label="Architecture"
 *
62
 * }
63
 * \enddot
64 65

\section _doxy Doxygen Help
66 67
You can use the provided Doxyfile as the configuration file or alternatively run "doxygen -g Doxyfile" to generat the file.
You need at least to set the some variables in the Doxyfile including "PROJECT_NAME","PROJECT_NUMBER","INPUT","IMAGE_PATH".
68 69 70 71 72 73 74
Doxygen help and commands can be found at http://www.stack.nl/~dimitri/doxygen/commands.html#cmdprotocol

\section _arch Architecture

You need to set the IMAGE_PATH in your Doxyfile

\image html arch.png "Architecture"
75
\image latex arch.eps "Architecture"
76 77 78 79 80 81

\subsection _mac MAC
thisis the mac
\subsection _rlc RLC
this is the rlc
\subsection _impl Implementation
82
what about the implementation
83 84 85 86 87


*@{*/

/*!\brief OAI protocol verion */
88
#define OAI_PROTOCOL_Version  0x00
89 90 91 92 93
/*!\brief Length in bytes of the OAI address */
#define OAI_ADDR_LEN        6

/*!\brief OAI snode type */
enum NodeType {
94 95 96 97 98 99
  /*!\brief mesh routers are */
  meshrouter = 1,
  /*!\brief relay nodes are */
  relaynode = 2,
  /*!\brief clusterheads are */
  clusterhead = 3
100 101 102
};


103
/*@}*/
104 105 106 107 108 109 110 111 112 113

// --------------------------end group ------------------------------


//---------------------------begin group------------------------------
/** @defgroup _frame Frame Structure
 * @ingroup _oai
The Frame is composed of ....


114
*@{*/
115 116
/*! \brief the frame structure is ... */
struct frame {
117 118 119 120
  u_short   duration; /*!< \brief Duration in us (2 bytes) */
  u_char    da[OAI_ADDR_LEN];/*!< \brief Destination MAC@ (OAI_ADDR_LEN bytes) */
  u_char    sa[OAI_ADDR_LEN];/*!< \brief Source MAC@ (OAI_ADDR_LEN bytes)*/
  u_char    body[0]; /*!< \brief Body of the frame */
121 122 123 124 125 126 127 128 129 130 131 132 133 134 135
};
/*! \brief Broadcast ID is ... */
#define BROADCAST_ID 15


/*@}*/

//--------------------------end group-----------------------


//-----------------------begin func proto-------------------

/*! \fn int init(int,int)
* \brief this function initializes and allocates memories and etc.
* \param[in] src the memory area to copy frrm
136 137 138
* \param[out] dst the memory area to copy to
* \return 0 on success, otherwise -1
* \note
139 140 141 142 143
* @ingroup  _oai
*/
int init(int src, int dst);

//-----------------------end func proto-------------------
144
#endif