142 lines
3.8 KiB
C++
142 lines
3.8 KiB
C++
// Copyright Onix Solutions Limited [OnixS]. All rights reserved.
|
|
//
|
|
// This software owned by Onix Solutions Limited [OnixS] and is
|
|
// protected by copyright law and international copyright treaties.
|
|
//
|
|
// Access to and use of the software is governed by the terms of the applicable
|
|
// OnixS Software Services Agreement (the Agreement) and Customer end user license
|
|
// agreements granting a non-assignable, non-transferable and non-exclusive license
|
|
// to use the software for it's own data processing purposes under the terms defined
|
|
// in the Agreement.
|
|
//
|
|
// Except as otherwise granted within the terms of the Agreement, copying or
|
|
// reproduction of any part of this source code or associated reference material
|
|
// to any other location for further reproduction or redistribution, and any
|
|
// amendments to this copyright notice, are expressly prohibited.
|
|
//
|
|
// Any reproduction or redistribution for sale or hiring of the Software not in
|
|
// accordance with the terms of the Agreement is a violation of copyright law.
|
|
//
|
|
|
|
#pragma once
|
|
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
#include <OnixS/CME/MDH/Integral.h>
|
|
#include <OnixS/CME/MDH/SessionSettings.h>
|
|
|
|
ONIXS_CMEMDH_NAMESPACE_BEGIN
|
|
|
|
/// Collection of parameters affecting replay of legacy logs.
|
|
ONIXS_CMEMDH_LTWT_CLASS
|
|
LoggedSessionSettings
|
|
: public SessionSettings
|
|
{
|
|
public:
|
|
/// Initializes instance with default
|
|
/// values for each of the parameters.
|
|
LoggedSessionSettings()
|
|
: replace_(false)
|
|
{
|
|
}
|
|
|
|
/// Indicates whether session settings detected
|
|
/// from log file to be replayed have to be replaced
|
|
/// with settings stored by given instance.
|
|
bool replace() const
|
|
{
|
|
return replace_;
|
|
}
|
|
|
|
/// Specifies whether session settings detected
|
|
/// from log file to be replayed have to be replaced
|
|
/// with settings stored by given instance.
|
|
void
|
|
replace(
|
|
bool value)
|
|
{
|
|
replace_ = value;
|
|
}
|
|
|
|
private:
|
|
bool replace_;
|
|
};
|
|
|
|
/// Ordered list of logs to be replayed.
|
|
typedef
|
|
std::vector<std::string>
|
|
FileList;
|
|
|
|
/// Defines parameters which affect logs replay.
|
|
ONIXS_CMEMDH_LTWT_CLASS
|
|
ReplaySettings
|
|
{
|
|
public:
|
|
/// Initializes instance with default values.
|
|
ReplaySettings()
|
|
{
|
|
}
|
|
|
|
/// List of instruments logs to be replayed.
|
|
/// Must be stored in 'oldest to recent' order.
|
|
const FileList& logs() const
|
|
{
|
|
return logs_;
|
|
}
|
|
|
|
/// List of instruments logs to be replayed.
|
|
/// Must be stored in 'oldest to recent' order.
|
|
FileList& logs()
|
|
{
|
|
return logs_;
|
|
}
|
|
|
|
/// Settings related with replay of log files produced
|
|
/// by older (prior to v4) version of the Handler.
|
|
const
|
|
LoggedSessionSettings&
|
|
sessionSettings() const
|
|
{
|
|
return sessionSettings_;
|
|
}
|
|
|
|
/// Settings related with replay of log files produced
|
|
/// by older (prior to v4) version of the Handler.
|
|
LoggedSessionSettings& sessionSettings()
|
|
{
|
|
return sessionSettings_;
|
|
}
|
|
|
|
private:
|
|
FileList logs_;
|
|
LoggedSessionSettings sessionSettings_;
|
|
};
|
|
|
|
/// Gathers log files logs which are available for
|
|
/// given channel and are stored in a given folder.
|
|
/// Gathering assumes log files are named by log file
|
|
/// naming routine exposed by given SDK.
|
|
ONIXS_CMEMDH_EXPORTED
|
|
void
|
|
gatherLogFiles(
|
|
FileList&,
|
|
UInt32,
|
|
const std::string&);
|
|
|
|
/// Gathers log files logs which are available for
|
|
/// given channel and are stored in a given folder.
|
|
/// Gathering assumes log files are named by log file
|
|
/// naming routine exposed by given SDK. In contrast
|
|
/// to other overloads, given one allows to define
|
|
/// prefix pattern for logs to be gathered.
|
|
ONIXS_CMEMDH_EXPORTED
|
|
void
|
|
gatherLogFiles(
|
|
FileList&,
|
|
UInt32,
|
|
const std::string&,
|
|
const std::string&);
|
|
|
|
ONIXS_CMEMDH_NAMESPACE_END
|