TTEthernet Model for INET Framework
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
Pages
TTEAPIApplicationBase.h
Go to the documentation of this file.
1
//
2
// This program is free software: you can redistribute it and/or modify
3
// it under the terms of the GNU Lesser General Public License as published by
4
// the Free Software Foundation, either version 3 of the License, or
5
// (at your option) any later version.
6
//
7
// This program is distributed in the hope that it will be useful,
8
// but WITHOUT ANY WARRANTY; without even the implied warranty of
9
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
// GNU Lesser General Public License for more details.
11
//
12
// You should have received a copy of the GNU Lesser General Public License
13
// along with this program. If not, see http://www.gnu.org/licenses/.
14
//
15
16
#ifndef __TTETHERNETMODELV2_TTEAPIAPPLICATIONBASE_H_
17
#define __TTETHERNETMODELV2_TTEAPIAPPLICATIONBASE_H_
18
19
#include <omnetpp.h>
20
#include "tte_api.h"
21
#include "
TTEApplicationBase.h
"
22
#include "
CTFrame_m.h
"
23
24
25
#define TTE_API_VER ( (int32_t) (0x02<<16 | 0x0000) )
26
27
namespace
TTEthernetModel {
28
32
enum
TTEAPIApplicationMessageKind
{
36
START_APPLICATION
37
};
38
42
class
TTEAPIPriv
43
{
44
public
:
48
Buffer
*
buffer
;
49
53
EtherFrame *
frame
;
54
58
void
*
data
;
59
};
60
71
class
TTEAPIApplicationBase
:
public
TTEApplicationBase
72
{
73
private
:
74
bool
synchronized
;
75
private
:
82
virtual
void
initialize
();
83
92
virtual
void
handleMessage
(cMessage *msg);
93
protected
:
98
virtual
void
startApplication
();
99
100
public
:
107
virtual
void
registerTask
(
unsigned
int
actionTime,
void
(*functionPointer)(
void
*),
void
*setFunctionArg);
108
114
virtual
int32_t
tte_get_ct_output_buf
(
const
uint8_t ctrl_id,
115
const
uint16_t ct_id,
116
tte_buffer_t *
const
buf);
117
123
virtual
int32_t
tte_get_bg_output_buf
(
const
uint8_t ctrl_id,
124
const
uint8_t channel,
125
tte_buffer_t *
const
buf);
126
132
virtual
int32_t
tte_get_bg_input_buf
(
const
uint8_t ctrl_id,
133
const
uint8_t channel,
134
tte_buffer_t *
const
buf);
135
141
virtual
int32_t
tte_get_ct_input_buf
(
const
uint8_t ctrl_id,
142
const
uint16_t ct_id,
143
tte_buffer_t *
const
buf);
144
150
virtual
int32_t
tte_get_var
(
const
uint8_t ctrl_id,
151
const
tte_var_id_t var_id,
152
const
uint32_t var_size,
153
void
*
const
value);
154
160
virtual
int32_t
tte_open_output_buf
(tte_buffer_t *
const
buf,
161
tte_frame_t *
const
frame);
162
168
virtual
int32_t
tte_open_input_buf
(tte_buffer_t *
const
buf,
169
tte_frame_t *
const
frame,
170
tte_buf_status_t *
const
status);
171
177
virtual
int32_t
tte_close_output_buf
(tte_buffer_t *
const
buf);
178
184
virtual
int32_t
tte_close_input_buf
(tte_buffer_t *
const
buf);
185
191
virtual
int32_t
tte_set_buf_var
(tte_buffer_t *
const
buf,
192
const
tte_buf_var_id_t var_id,
193
const
uint32_t var_size,
194
const
void
*
const
value);
195
201
virtual
int32_t
tte_get_buf_var
(
const
tte_buffer_t *
const
buf,
202
const
tte_buf_var_id_t var_id,
203
const
uint32_t var_size,
204
void
*
const
value);
205
};
206
207
208
}
//namespace
209
210
#endif
src
applications
api
TTEAPIApplicationBase.h
Generated on Tue May 7 2013 11:17:27 for TTEthernet Model for INET Framework by
1.8.3.1