TORCS  1.3.9
The Open Racing Car Simulator
rttelem.cpp
Go to the documentation of this file.
1 /***************************************************************************
2 
3  file : rttelem.cpp
4  created : Mon Feb 28 22:38:31 CET 2000
5  copyright : (C) 2000 by Eric Espie
6  email : torcs@free.fr
7  version : $Id$
8 
9  ***************************************************************************/
10 
11 /***************************************************************************
12  * *
13  * This program is free software; you can redistribute it and/or modify *
14  * it under the terms of the GNU General Public License as published by *
15  * the Free Software Foundation; either version 2 of the License, or *
16  * (at your option) any later version. *
17  * *
18  ***************************************************************************/
19 
20 #if 0
21 
36 #endif
37 
38 #include <stdlib.h>
39 #include <stdio.h>
40 #ifdef WIN32
41 #include <windows.h>
42 #endif
43 #include <telemetry.h>
44 #include <robottools.h>
45 #include <tgf.h>
46 #include <portability.h>
47 
48 #if 0
49 static tTelemItf tlm;
50 static tModList *modlist = (tModList*)NULL;
51 #endif
52 
60 {
61 #ifdef later
62  const int BUFSIZE = 256;
63  char buf[BUFSIZE];
64  tModInfo *curModInfo;
65 
66  memset(&tlm, 0, sizeof(tTelemItf));
67  snprintf(buf, BUFSIZE, "%smodules/telemetry/%s.%s", "telemetry", GetLibDir (), DLLEXT);
68  if (GfModLoad(TLM_IDENT, buf, &modlist)) return;
69  GfOut("--- %s loaded ---\n", modlist->modInfo->name);
70  curModInfo = modlist->modInfo;
71  curModInfo->fctInit(curModInfo->index, &tlm);
72 
73  tlm.init(ymin, ymax);
74 #endif
75 }
76 
77 
86 void RtTelemNewChannel(const char * name, tdble * var, tdble min, tdble max)
87 {
88 #if 0
89  tlm.newChannel(name, var, min, max);
90 #endif
91 }
92 
98 void RtTelemStartMonitoring(const char * filename)
99 {
100 #if 0
101  tlm.startMonitoring(filename);
102 #endif
103 }
104 
110 {
111 #if 0
112  tlm.stopMonitoring();
113 #endif
114 }
115 
121 void RtTelemUpdate(double time)
122 {
123 #if 0
124  tlm.update(time);
125 #endif
126 }
127 
132 void RtTelemShutdown(void)
133 {
134 #if 0
135  tlm.shutdown();
136  GfModUnloadList(&modlist);
137 #endif
138 }
139 
static tdble ymax
Definition: track3.cpp:30
int GfModLoad(unsigned int gfid, char *dllname, tModList **modlist)
Load the specified DLLs.
Definition: module.cpp:57
tModInfo modInfo[MAX_MOD_ITF]
module info list for this dll
Definition: tgf.h:204
tftlmShutdown shutdown
Definition: telemetry.h:43
void RtTelemStartMonitoring(const char *filename)
Start recording into a file.
Definition: rttelem.cpp:98
Scalar max(Scalar x, Scalar y)
Definition: Basic.h:50
tftlmInit init
Definition: telemetry.h:38
Robots Tools.
void RtTelemShutdown(void)
Deinstall the telemetry module.
Definition: rttelem.cpp:132
void RtTelemInit(tdble ymin, tdble ymax)
Initialization of a telemetry session.
Definition: rttelem.cpp:59
tfModPrivInit fctInit
init function
Definition: tgf.h:191
char * GetLibDir(void)
Definition: tgf.cpp:244
float tdble
Floating point type used in TORCS.
Definition: tgf.h:48
static tdble ymin
Definition: track3.cpp:30
#define GfOut
Definition: tgf.h:373
The Gaming Framework API.
void RtTelemUpdate(double time)
Record a new set of values.
Definition: rttelem.cpp:121
int GfModUnloadList(tModList **modlist)
Unload the DLLs of a list.
Definition: module.cpp:91
void RtTelemNewChannel(const char *name, tdble *var, tdble min, tdble max)
Create a new telemetry channel.
Definition: rttelem.cpp:86
tftlmUpdate update
Definition: telemetry.h:42
tftlmStopMonitoring stopMonitoring
Definition: telemetry.h:41
tftlmNewChannel newChannel
Definition: telemetry.h:39
Scalar min(Scalar x, Scalar y)
Definition: Basic.h:49
char * name
name of the module (short) (NULL if no module)
Definition: tgf.h:189
int index
index if multiple interface in one dll
Definition: tgf.h:193
void RtTelemStopMonitoring(void)
Stop recording and close the file.
Definition: rttelem.cpp:109
tftlmStartMonitoring startMonitoring
Definition: telemetry.h:40
#define TLM_IDENT
Definition: telemetry.h:24
list of module interfaces
Definition: tgf.h:203
Module information structure.
Definition: tgf.h:188