27#ifndef NIDAS_DYNLD_RAF_SYNCSERVER_H
28#define NIDAS_DYNLD_RAF_SYNCSERVER_H
38namespace nidas {
namespace dynld {
namespace raf {
100 read(
bool once =
false);
218 nidas::util::auto_ptr<nidas::util::SocketAddress>
_address;
Pure virtual interface of a client of Samples.
Definition SampleClient.h:38
Interface for an object that requests connections SampleOutputs.
Definition ConnectionRequester.h:43
Interface of an output stream of samples.
Definition SampleOutput.h:49
SamplePipeline sorts samples that are coming from one or more inputs.
Definition SamplePipeline.h:80
Interface to a data sample.
Definition Sample.h:190
A class for serializing Samples on an OutputStream.
Definition SampleOutputStream.h:41
Definition SyncRecordGenerator.h:38
Definition SyncServer.h:58
SampleClient * _sampleClient
Definition SyncServer.h:224
nidas::util::auto_ptr< nidas::util::SocketAddress > _address
Definition SyncServer.h:218
void init()
Call this method to parse the project, setup sample tags, preload calibrations using the time of the ...
Definition SyncServer.cc:293
void connect(SampleOutput *output)
Implementation of SampleConnectionRequester::connect().
Definition SyncServer.cc:463
RawSampleInputStream * _inputStream
Definition SyncServer.h:211
void read(bool once=false)
Definition SyncServer.cc:411
void setStopSignal(StopSignal *stop_signal)
Set a callback function which will be called when the SyncServer reaches EOF on its input stream or s...
Definition SyncServer.h:161
void addSampleClient(SampleClient *client)
Specify a SampleClient instance to receive the sync samples instead of writing the sync samples to an...
Definition SyncServer.h:142
virtual void interrupt()
Interrupt this thread.
Definition SyncServer.cc:150
void setTimeWindow(nidas::util::UTime start, nidas::util::UTime end)
Definition SyncServer.cc:379
void stop()
Definition SyncServer.cc:190
void setDataFileNames(const std::list< std::string > &dataFileNames)
Definition SyncServer.h:148
dsm_time_t _endWindow
Definition SyncServer.h:234
StopSignal * _stop_signal
Definition SyncServer.h:226
dsm_time_t _startWindow
Definition SyncServer.h:233
static const int DEFAULT_PORT
Definition SyncServer.h:172
float _sorterLengthSecs
Definition SyncServer.h:220
int run()
This method implements the Runnable interface for Threads, but it can also be called synchronously wh...
Definition SyncServer.cc:130
void initProject()
Definition SyncServer.cc:99
void setXMLFileName(const std::string &name)
Definition SyncServer.h:126
dsm_time_t _startTime
Definition SyncServer.h:230
void signalStop()
Definition SyncServer.cc:171
void openStream()
Open the data file input stream and read the nidas header, but do not parse the project.
Definition SyncServer.cc:254
SyncRecordGenerator _syncGen
Definition SyncServer.h:209
void handleSample(nidas::core::Sample *sample)
Definition SyncServer.cc:392
void initSensors(SampleInputStream &sis)
Definition SyncServer.cc:112
SyncServer(const SyncServer &)
std::string getXMLFileName()
Return the current XML filename setting.
Definition SyncServer.h:120
SamplePipeline _pipeline
Definition SyncServer.h:208
static const float RAW_SORTER_LENGTH_SECS
Definition SyncServer.h:176
void resetAddress(nidas::util::SocketAddress *addr)
Definition SyncServer.h:132
SyncServer & operator=(const SyncServer &)
void disconnect(SampleOutput *output)
Implementation of SampleConnectionRequester::disconnect().
Definition SyncServer.cc:467
float _rawSorterLengthSecs
Definition SyncServer.h:222
void getTimeWindow(nidas::util::UTime *start, nidas::util::UTime *end)
Definition SyncServer.cc:364
SyncServer()
Definition SyncServer.cc:57
std::string _xmlFileName
Definition SyncServer.h:214
void setRawSorterLengthSeconds(float sorter_secs)
Definition SyncServer.h:109
~SyncServer()
Definition SyncServer.cc:75
static const float SORTER_LENGTH_SECS
Definition SyncServer.h:174
std::list< std::string > _dataFileNames
Definition SyncServer.h:216
nidas::core::Sample * _firstSample
Definition SyncServer.h:228
void setSorterLengthSeconds(float sorter_secs)
Definition SyncServer.h:103
SampleOutputStream * _outputStream
Definition SyncServer.h:212
An interface for a socket address.
Definition SocketAddress.h:36
virtual void start()
Start the thread running, meaning execute the run method in a separate thread.
Definition Thread.cc:375
A class for parsing, formatting and doing operations on time, based on Unix time conventions,...
Definition UTime.h:95
Sample * getSample(sampleType type, unsigned int len)
A convienence method for getting a sample of an enumerated type from a pool.
Definition Sample.cc:70
long long dsm_time_t
Posix time in microseconds, the number of non-leap microseconds since 1970 Jan 1 00:00 UTC.
Definition Sample.h:62
Root namespace for the NCAR In-Situ Data Acquisition Software.
Definition A2DConverter.h:31
Definition SyncServer.h:41
StopSignal()
Definition SyncServer.h:42
virtual ~StopSignal()
Definition SyncServer.h:47
StopSignal(const StopSignal &)
StopSignal & operator=(const StopSignal &)