root/trunk/libfreebob/src/libutil/TimeSource.h

Revision 360, 1.4 kB (checked in by pieterpalmers, 16 years ago)

- temporary commit to backup some work

- Started a framework to synchronize IsoHandlers? to

any generic TimeSource?. The idea is to introduce
one overall time reference, and resynchronize all
other timed events to this time source.
This will, on the long run, allow:

  • combining devices on multiple FW busses together,
    as these are not synched by hardware.
  • synchronizing to the system clock
  • synchronizing to any other time source (e.g.
    when implementing a jackd client, i.e. using
    the freebob devices as jackd clients).

- Implemented a realtime safe way to read the cycle

timer for an IsoHandler?. (+ test application)

- Implemented tests/test-sytmonitor:

Monitors 2 or more channels and reports the average
SYT timestamp difference between both.

- Messed around with SYT timestamping for AMDTP. Doesn't

work (yet).

Line 
1 /* $Id$ */
2
3 /*
4  *   FreeBob Streaming API
5  *   FreeBob = Firewire (pro-)audio for linux
6  *
7  *   http://freebob.sf.net
8  *
9  *   Copyright (C) 2005,2006 Pieter Palmers <pieterpalmers@users.sourceforge.net>
10  *
11  *   This program is free software {} you can redistribute it and/or modify
12  *   it under the terms of the GNU General Public License as published by
13  *   the Free Software Foundation {} either version 2 of the License, or
14  *   (at your option) any later version.
15  *
16  *   This program is distributed in the hope that it will be useful,
17  *   but WITHOUT ANY WARRANTY {} without even the implied warranty of
18  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19  *   GNU General Public License for more details.
20  *
21  *   You should have received a copy of the GNU General Public License
22  *   along with this program {} if not, write to the Free Software
23  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24  *
25  *
26  *
27  */
28 #ifndef __FREEBOB_TIMESOURCE__
29 #define __FREEBOB_TIMESOURCE__
30
31 #include "../debugmodule/debugmodule.h"
32
33 typedef uint64_t freebob_microsecs_t;
34
35 namespace FreebobUtil {
36
37 class TimeSource {
38
39 public:
40
41         TimeSource();
42         virtual ~TimeSource();
43
44     virtual freebob_microsecs_t getCurrentTime()=0;
45     virtual freebob_microsecs_t getCurrentTimeAsUsecs()=0;
46
47 protected:
48
49 };
50
51 } // end of namespace FreebobUtil
52
53 #endif /* __FREEBOB_TIMESOURCE__ */
54
55
Note: See TracBrowser for help on using the browser.