~ubuntu-branches/ubuntu/saucy/goldencheetah/saucy

« back to all changes in this revision

Viewing changes to src/RealtimeController.h

  • Committer: Package Import Robot
  • Author(s): KURASHIKI Satoru
  • Date: 2013-08-18 07:02:45 UTC
  • mfrom: (4.1.8 sid)
  • Revision ID: package-import@ubuntu.com-20130818070245-zgdvb47e1k3mtgil
Tags: 3.0-3
debian/control: remove needless dependency. (Closes: #719571)

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 
20
20
// Abstract base class for Realtime device controllers
21
21
#include "RealtimeData.h"
22
 
#include "RealtimeWindow.h"
 
22
#include "TrainTool.h"
23
23
 
24
24
#ifndef _GC_RealtimeController_h
25
25
#define _GC_RealtimeController_h 1
 
26
#include "GoldenCheetah.h"
26
27
 
27
28
#define DEVICE_ERROR 1
28
29
#define DEVICE_OK 0
29
30
 
30
 
class RealtimeController
 
31
class RealtimeController : public QObject
31
32
{
 
33
    Q_OBJECT
 
34
 
32
35
public:
33
 
    RealtimeWindow *parent;                     // for push devices
 
36
    TrainTool *parent;                     // for push devices
34
37
 
35
 
    RealtimeController (RealtimeWindow *parent, DeviceConfiguration *dc = 0);
 
38
    RealtimeController (TrainTool *parent, DeviceConfiguration *dc = 0);
36
39
    virtual ~RealtimeController() {}
37
40
 
38
41
    virtual int start();
39
42
    virtual int restart();                              // restart after paused
40
43
    virtual int pause();                                // pauses data collection, inbound telemetry is discarded
41
44
    virtual int stop();                                 // stops data collection thread
42
 
    virtual bool discover(char *pathname);              // tell if a device is present at port passed
 
45
 
 
46
    // for auto-configuration
 
47
    virtual bool find();                                // tell if the device is present (usb typically)
 
48
    virtual bool discover(QString);              // tell if a device is present at serial port passed
43
49
 
44
50
    // push or pull telemetry
45
51
    virtual bool doesPush();                    // this device is a push device (e.g. Quarq)