2016-03-09 01:59:16 +00:00
|
|
|
//
|
|
|
|
// CRTRunBuilder.h
|
|
|
|
// Clock Signal
|
|
|
|
//
|
|
|
|
// Created by Thomas Harte on 08/03/2016.
|
|
|
|
// Copyright © 2016 Thomas Harte. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
#ifndef CRTRunBuilder_h
|
|
|
|
#define CRTRunBuilder_h
|
|
|
|
|
2016-03-09 03:40:23 +00:00
|
|
|
#import <vector>
|
|
|
|
|
2016-03-09 01:59:16 +00:00
|
|
|
namespace Outputs {
|
|
|
|
namespace CRT {
|
|
|
|
|
|
|
|
struct CRTRunBuilder {
|
2016-03-19 01:11:09 +00:00
|
|
|
CRTRunBuilder() : start(0) { reset(); }
|
2016-03-09 01:59:16 +00:00
|
|
|
|
|
|
|
// Resets the run builder.
|
2016-03-19 01:11:09 +00:00
|
|
|
inline void reset()
|
|
|
|
{
|
|
|
|
duration = 0;
|
|
|
|
amount_of_uploaded_data = 0;
|
|
|
|
amount_of_data = 0;
|
|
|
|
}
|
2016-03-09 01:59:16 +00:00
|
|
|
|
|
|
|
// Container for total length in cycles of all contained runs.
|
|
|
|
uint32_t duration;
|
2016-03-17 02:29:22 +00:00
|
|
|
size_t start;
|
2016-03-09 01:59:16 +00:00
|
|
|
|
|
|
|
// Storage for the length of run data uploaded so far; reset to zero by reset but otherwise
|
|
|
|
// entrusted to the CRT to update.
|
2016-03-19 01:11:09 +00:00
|
|
|
size_t amount_of_uploaded_data;
|
|
|
|
size_t amount_of_data;
|
2016-03-09 01:59:16 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif /* CRTRunBuilder_h */
|