TORCS  1.3.10
The Open Racing Car Simulator
Loading...
Searching...
No Matches
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-2026 by Eric EspiƩ, Bernhard Wymann
6 email : berniw@bluewin.ch
7
8 ***************************************************************************/
9
10/***************************************************************************
11 * *
12 * This program is free software; you can redistribute it and/or modify *
13 * it under the terms of the GNU General Public License as published by *
14 * the Free Software Foundation; either version 2 of the License, or *
15 * (at your option) any later version. *
16 * *
17 ***************************************************************************/
18
19#if 0
20
27
33
34#endif
35
36#include <stdlib.h>
37#include <stdio.h>
38#ifdef WIN32
39#include <windows.h>
40#endif
41#include <telemetry.h>
42#include <robottools.h>
43#include <tgf.h>
44#include <portability.h>
45
46#if 0
47static tTelemItf tlm;
48static tModList *modlist = (tModList*)NULL;
49#endif
50
57
64{
65#ifdef later
66 const int BUFSIZE = 256;
67 char buf[BUFSIZE];
68 tModInfo *curModInfo;
69
70 memset(&tlm, 0, sizeof(tTelemItf));
71 snprintf(buf, BUFSIZE, "%smodules/telemetry/%s.%s", "telemetry", GetLibDir (), DLLEXT);
72 if (GfModLoad(TLM_IDENT, buf, &modlist)) return;
73 GfOut("--- %s loaded ---\n", modlist->modInfo->name);
74 curModInfo = modlist->modInfo;
75 curModInfo->fctInit(curModInfo->index, &tlm);
76
77 tlm.init(ymin, ymax);
78#endif
79}
80
81
89void RtTelemNewChannel(const char * name, tdble * var, tdble min, tdble max)
90{
91#if 0
92 tlm.newChannel(name, var, min, max);
93#endif
94}
95
100void RtTelemStartMonitoring(const char * filename)
101{
102#if 0
103 tlm.startMonitoring(filename);
104#endif
105}
106
111{
112#if 0
113 tlm.stopMonitoring();
114#endif
115}
116
121void RtTelemUpdate(double time)
122{
123#if 0
124 tlm.update(time);
125#endif
126}
127
132{
133#if 0
134 tlm.shutdown();
135 GfModUnloadList(&modlist);
136#endif
137}
Scalar min(Scalar x, Scalar y)
Definition Basic.h:49
Scalar max(Scalar x, Scalar y)
Definition Basic.h:50
float tdble
Floating point type used in TORCS.
Definition tgf.h:47
int GfModUnloadList(tModList **modlist)
Unload the DLLs of a list.
Definition module.cpp:91
int GfModLoad(unsigned int gfid, char *dllname, tModList **modlist)
Load the specified DLLs.
Definition module.cpp:57
void RtTelemInit(tdble ymin, tdble ymax)
Legacy telemetry initialization; currently does nothing.
Definition rttelem.cpp:63
void RtTelemShutdown(void)
Legacy telemetry shutdown; currently does nothing.
Definition rttelem.cpp:131
void RtTelemStartMonitoring(const char *filename)
Legacy start-recording request; currently creates no file and does nothing.
Definition rttelem.cpp:100
void RtTelemStopMonitoring(void)
Legacy stop-recording request; currently does nothing.
Definition rttelem.cpp:110
void RtTelemNewChannel(const char *name, tdble *var, tdble min, tdble max)
Legacy channel registration; currently does nothing.
Definition rttelem.cpp:89
void RtTelemUpdate(double time)
Legacy sample-recording request; currently does nothing.
Definition rttelem.cpp:121
Robots Tools
int index
index if multiple interface in one dll
Definition tgf.h:192
char * name
name of the module (short) (NULL if no module)
Definition tgf.h:188
tfModPrivInit fctInit
init function
Definition tgf.h:190
tModInfo modInfo[MAX_MOD_ITF]
module info list for this dll
Definition tgf.h:203
tftlmShutdown shutdown
Definition telemetry.h:43
tftlmUpdate update
Definition telemetry.h:42
tftlmNewChannel newChannel
Definition telemetry.h:39
tftlmStopMonitoring stopMonitoring
Definition telemetry.h:41
tftlmInit init
Definition telemetry.h:38
tftlmStartMonitoring startMonitoring
Definition telemetry.h:40
#define TLM_IDENT
Definition telemetry.h:24
char * GetLibDir(void)
Definition tgf.cpp:243
#define GfOut
Definition tgf.h:372
struct ModList tModList
list of module interfaces
struct ModInfo tModInfo
Module information structure.
static tdble ymin
Definition track3.cpp:30
static tdble ymax
Definition track3.cpp:30