TORCS  1.3.10
The Open Racing Car Simulator
Loading...
Searching...
No Matches
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
27BOOL 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 */
46static int
47telemInit(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 */
79extern "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
char * desc
description of the module (can be long)
Definition tgf.h:189
int index
index if multiple interface in one dll
Definition tgf.h:192
unsigned int gfId
supported framework version
Definition tgf.h:191
char * name
name of the module (short) (NULL if no module)
Definition tgf.h:188
tfModPrivInit fctInit
init function
Definition tgf.h:190
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
void TlmStartMonitoring(const char *filename)
void TlmStopMonitoring(void)
void TlmInit(tdble ymin, tdble ymax)
Definition telemetry.cpp:67
void TlmNewChannel(const char *name, tdble *var, tdble min, tdble max)
Definition telemetry.cpp:90
void TlmShutdown(void)
void TlmUpdate(double time)
#define TLM_IDENT
Definition telemetry.h:24
int telemetry(tModInfo *modInfo)
static int telemInit(int index, void *pt)
struct ModInfo tModInfo
Module information structure.