#!/usr/bin/perl

$tbname = shift;

$tbname =~ /^tb([0-9]*)/;

$ntimebins = $1;

open outfile, ">src/timebins/tb${ntimebins}.auto.tcs";

print outfile "include src/common/defines.tcs

const nsamples = $ntimebins;

// Number of Samples, c13
write           C13CPUA,nsamples

write           NITM0,  nsamples*12+50;

// Event Buffer Data Acquisition End
write TPPAE, nsamples+3; // was 0x21; SIMULATE !!!

// Response Time to GSM
write TPPGR, nsamples+1; // TPPAE - 1
";


close outfile;
