SIde-Channel Analysis toolKit (SICAK)
Software toolkit for side-channel analysis
prep.h
Go to the documentation of this file.
1 /*
2 * SICAK - SIde-Channel Analysis toolKit
3 * Copyright (C) 2018 Petr Socha, FIT, CTU in Prague
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <https://www.gnu.org/licenses/>.
17 */
18 
29 #ifndef PREP_H
30 #define PREP_H
31 
32 #include <QObject>
33 #include <QCommandLineParser>
34 #include "blockprocess.h"
35 #include "tracesprocess.h"
36 
44 class Prep: public QObject {
45 
46 Q_OBJECT
47 
48 public:
49 
50  enum CommandLineParseResult {
51  CommandLineTaskPlanned,
52  CommandLineNOP,
53  CommandLineError,
54  CommandLineVersionRequested,
55  CommandLineHelpRequested,
56  CommandLineQueryRequested
57  };
58 
59  Prep(QObject *parent = 0) : QObject(parent), m_tracesEngine(nullptr), m_blockEngine(nullptr), m_param(""), m_id(""), m_tracesModule(""), m_blockModule(""), m_traces(""), m_tracesN(0), m_samples(0), m_blocks(""), m_blocksM(0), m_blocksLen(0) {}
60 
62  CommandLineParseResult parseCommandLineParams(QCommandLineParser & parser);
63 
64 protected:
65 
67  bool loadTracesModule();
69  bool loadBlocksModule();
70 
71  TracesProcess * m_tracesEngine;
72  BlockProcess * m_blockEngine;
73 
74  QString m_param;
75  QString m_id;
76 
77  QString m_tracesModule;
78  QString m_blockModule;
79 
80  QString m_traces;
81  size_t m_tracesN;
82  size_t m_samples;
83 
84  QString m_blocks;
85  size_t m_blocksM;
86  size_t m_blocksLen;
87 
88 public slots:
89 
91  void queryPlugins();
92 
94  void preprocessTraces();
96  void preprocessBlocks();
97 
98 
99 signals:
100 
101  void finished();
102 
103 };
104 
105 #endif /* PREP_H */
106 
Class providing text-based UI front-end to BlockProcess and TracesProcess plug-in modules.
Definition: prep.h:44
void preprocessTraces()
Load and initialize given modules, load the input data and run the preprocessing plugin.
Definition: prep.cpp:283
bool loadTracesModule()
Load the specified traces preprocessing module.
Definition: prep.cpp:223
Block processing plugin interface for use e.g. in prep.
void queryPlugins()
Query and print available plugins.
Definition: prep.cpp:159
Block data processing QT plugin interface.
Definition: blockprocess.h:42
CommandLineParseResult parseCommandLineParams(QCommandLineParser &parser)
Parse parameters from the command line and configuration files and plan tasks for event loop accordin...
Definition: prep.cpp:46
Traces processing QT plugin interface.
Definition: tracesprocess.h:42
bool loadBlocksModule()
Load the specified block data preprocessing module.
Definition: prep.cpp:253
void preprocessBlocks()
Load and initialize given modules, load the input data and run the preprocessing plugin.
Definition: prep.cpp:374
Traces processing plugin interface for use e.g. in prep.