TORCS  1.3.9
The Open Racing Car Simulator
telemetryitf.cpp
Go to the documentation of this file.
1 /***************************************************************************
2 
3  file : telemetryitf.cpp
4  created : Mon Feb 28 21:18:49 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 #include <stdlib.h>
21 #include <tgf.h>
22 #include <telemetry.h>
23 
24 #include "tlm.h"
25 
26 #ifdef _WIN32
27 BOOL WINAPI DllEntryPoint (HINSTANCE hDLL, DWORD dwReason, LPVOID Reserved)
28 {
29  return TRUE;
30 }
31 #endif
32 
33 /*
34  * Function
35  * telemInit
36  *
37  * Description
38  *
39  *
40  * Parameters
41  *
42  *
43  * Return
44  *
45  */
46 static int
47 telemInit(int index, void *pt)
48 {
49  tTelemItf *ptf = (tTelemItf*)pt;
50 
51  ptf->init = TlmInit;
55  ptf->update = TlmUpdate;
56  ptf->shutdown = TlmShutdown;
57 
58  return 0;
59 }
60 
61 
62 /*
63  * Function
64  * telemetry
65  *
66  * Description
67  * module entry point
68  *
69  * Parameters
70  * modinfo : administrative info to be filled by the module
71  *
72  * Return
73  * 0 Ok
74  * -1 NOk
75  *
76  * Remarks
77  * all the logical modules should be linked in a ring
78  */
79 extern "C" int
81 {
82  modInfo->name = strdup("telemetry"); /* name of the module (short) */
83  modInfo->desc = strdup("Telemetry module, used to store telemetry information"); /* description of the module (can be long) */
84  modInfo->fctInit = telemInit; /* init function */
85  modInfo->gfId = TLM_IDENT; /* always loaded */
86  modInfo->index = 0;
87 
88  return 0;
89 }
90 
91 
92 
unsigned int gfId
supported framework version
Definition: tgf.h:192
void TlmShutdown(void)
Definition: telemetry.cpp:229
tftlmShutdown shutdown
Definition: telemetry.h:43
static int telemInit(int index, void *pt)
tftlmInit init
Definition: telemetry.h:38
void TlmStopMonitoring(void)
Definition: telemetry.cpp:198
int telemetry(tModInfo *modInfo)
void TlmInit(tdble ymin, tdble ymax)
Definition: telemetry.cpp:67
tfModPrivInit fctInit
init function
Definition: tgf.h:191
void TlmNewChannel(const char *name, tdble *var, tdble min, tdble max)
Definition: telemetry.cpp:90
The Gaming Framework API.
tftlmUpdate update
Definition: telemetry.h:42
void TlmStartMonitoring(const char *filename)
Definition: telemetry.cpp:114
void TlmUpdate(double time)
Definition: telemetry.cpp:175
tftlmStopMonitoring stopMonitoring
Definition: telemetry.h:41
tftlmNewChannel newChannel
Definition: telemetry.h:39
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
tftlmStartMonitoring startMonitoring
Definition: telemetry.h:40
#define TLM_IDENT
Definition: telemetry.h:24
char * desc
description of the module (can be long)
Definition: tgf.h:190
Module information structure.
Definition: tgf.h:188