00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
#ifndef _VRTESTCOUNTSOURCE_H_
00019
#define _VRTESTCOUNTSOURCE_H_
00020
00021
#include <VrSource.h>
00022
00023
template<
class oType>
00024 class VrTestCountSource :
public VrSource<oType> {
00025
public:
00026 virtual const char *
name() {
return "VrTestCountSource"; }
00027
virtual void work(timestamp ts,
unsigned int size,
oType *o[]);
00028
virtual void initialize();
00029 };
00030
00031
template<
class oType>
void
00032 VrTestCountSource<oType>::initialize()
00033 {
00034
setOutputSize (1);
00035 }
00036
00037
template<
class oType>
void
00038 VrTestCountSource<oType>::work(timestamp ts,
unsigned int size,
oType *o[])
00039 {
00040
00041
sync(ts);
00042
00043
while(size-- > 0) {
00044
00045
int n=ts;
00046
for(
int i=0; i<25;i++)
00047 n += n % 13;
00048
00049 *o[0]++= (
oType) ts++;
00050 }
00051
00052 }
00053
00054
#endif