OpenCurves  0.9
realtimesourceloader.h
1 //
2 // author Kazys Stepanas
3 //
4 // Copyright (c) CSIRO 2015
5 //
6 #ifndef REALTIMESOURCELOADER_H_
7 #define REALTIMESOURCELOADER_H_
8 
9 #include "ocurvesconfig.h"
10 
11 #include <QString>
12 
13 class QDomDocument;
14 class QDomElement;
15 class RealTimeConnection;
16 class RealTimeCommSpec;
17 
18 class RTMessage;
19 class RTBinaryMessage;
20 
25 {
26 public:
33  RealTimeCommSpec *load(const QString &fileName, QString *error = nullptr, int *errorLine = nullptr, int *errorColumn = nullptr);
34 
41  RealTimeCommSpec *parse(const QString &xmlString, QString *error = nullptr, int *errorLine = nullptr, int *errorColumn = nullptr);
42 
43 private:
44 
48  RealTimeCommSpec *parse(QDomDocument &doc);
49 
53  RealTimeCommSpec *parseSerial(QDomElement &element);
54 
58  RealTimeCommSpec *parseNetwork(QDomElement &element);
59 
65  bool parseCommon(QDomElement &element, RealTimeCommSpec &spec, QString &timeFieldName);
66 
72  bool parseComms(QDomElement &commsElement, RealTimeCommSpec &spec, const QString &timeFieldName);
73 
77  RTBinaryMessage *parseBinaryStruct(QDomElement &element);
78 };
79 
80 #endif // REALTIMESOURCELOADER_H_
RealTimeCommSpec * load(const QString &fileName, QString *error=nullptr, int *errorLine=nullptr, int *errorColumn=nullptr)
Attempt to load a real time source file.
Base message handling for real time data plot communications.
Definition: rtmessage.h:29
Loads the XML specification files for RealTimeSource connections.
Definition: realtimesourceloader.h:24
Represents a binary based message for real-time data plots.
Definition: rtbinarymessage.h:40
RealTimeCommSpec * parse(const QString &xmlString, QString *error=nullptr, int *errorLine=nullptr, int *errorColumn=nullptr)
Attempt to parse an XML string for a real time source specification.
This is the base class for data source which provides data in real time.
Definition: realtimeconnection.h:16
Specifies a real time communication specification, messaging and buffer setup.
Definition: realtimecommspec.h:37