... before remove old files
This commit is contained in:
parent
34d22614a6
commit
a3b901223a
@ -7,12 +7,12 @@ template <mcc::traits::mcc_range_of_input_char_range R>
|
|||||||
AsibFM700Mount::AsibFM700Mount(AsibFM700Config config, std::shared_ptr<spdlog::logger> logger, const R& pattern_range)
|
AsibFM700Mount::AsibFM700Mount(AsibFM700Config config, std::shared_ptr<spdlog::logger> logger, const R& pattern_range)
|
||||||
: mcc::utils::MccSpdlogLogger(std::move(logger), pattern_range),
|
: mcc::utils::MccSpdlogLogger(std::move(logger), pattern_range),
|
||||||
_currentConfig(std::move(config)),
|
_currentConfig(std::move(config)),
|
||||||
base_gm_t(std::make_tuple(_currentConfig.astromEngineState),
|
base_gm_t({_currentConfig.astromEngineState},
|
||||||
std::make_tuple(_currentConfig.hardwareConfig),
|
{_currentConfig.hardwareConfig},
|
||||||
std::make_tuple(_currentConfig.pecData),
|
{_currentConfig.pecData},
|
||||||
std::make_tuple(std::ref(_astromEngine), std::ref(_pec), std::ref(_hardware)),
|
AsibFM700Telemetry{_astromEngine, _pec, _hardware},
|
||||||
std::make_tuple(std::ref(_telemetry), std::ref(_hardware), std::ref(_pzFuncs)),
|
slew_model_t{_telemetry, _hardware, _pzFuncs},
|
||||||
std::make_tuple(std::ref(_telemetry), std::ref(_hardware), std::ref(_pzFuncs)))
|
guiding_model_t{_telemetry, _hardware, _pzFuncs})
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -29,6 +29,9 @@ class AsibFM700Mount : public mcc::utils::MccSpdlogLogger,
|
|||||||
AsibFM700GuidingModel<mcc::utils::MccSpdlogLogger>>;
|
AsibFM700GuidingModel<mcc::utils::MccSpdlogLogger>>;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
typedef AsibFM700SlewModel<mcc::utils::MccSpdlogLogger> slew_model_t;
|
||||||
|
typedef AsibFM700GuidingModel<mcc::utils::MccSpdlogLogger> guiding_model_t;
|
||||||
|
|
||||||
template <mcc::traits::mcc_range_of_input_char_range R = decltype(LOGGER_DEFAULT_FORMAT)>
|
template <mcc::traits::mcc_range_of_input_char_range R = decltype(LOGGER_DEFAULT_FORMAT)>
|
||||||
AsibFM700Mount(AsibFM700Config config,
|
AsibFM700Mount(AsibFM700Config config,
|
||||||
std::shared_ptr<spdlog::logger> logger,
|
std::shared_ptr<spdlog::logger> logger,
|
||||||
|
|||||||
@ -32,6 +32,22 @@ struct MccPZoneWrapper {
|
|||||||
pz_inzone_func_t inZone;
|
pz_inzone_func_t inZone;
|
||||||
pz_timeto_func_t timeTo;
|
pz_timeto_func_t timeTo;
|
||||||
pz_timefrom_func_t timeFrom;
|
pz_timefrom_func_t timeFrom;
|
||||||
|
|
||||||
|
MccPZoneWrapper(MccPZoneWrapper&& other)
|
||||||
|
: inZone(std::move(other.inZone)), timeTo(std::move(other.timeTo)), timeFrom(std::move(other.timeFrom)) {};
|
||||||
|
|
||||||
|
MccPZoneWrapper& operator=(MccPZoneWrapper&& other)
|
||||||
|
{
|
||||||
|
if (this != &other) {
|
||||||
|
inZone = std::move(other.inZone);
|
||||||
|
timeTo = std::move(other.timeTo);
|
||||||
|
timeFrom = std::move(other.timeFrom);
|
||||||
|
}
|
||||||
|
|
||||||
|
return *this;
|
||||||
|
};
|
||||||
|
|
||||||
|
MccPZoneWrapper() = default;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -56,24 +72,18 @@ public:
|
|||||||
|
|
||||||
static constexpr MccMountType mountType = pec_t::mountType;
|
static constexpr MccMountType mountType = pec_t::mountType;
|
||||||
|
|
||||||
template <traits::mcc_tuple_c ASTROM_ENGINE_CTOR_T,
|
MccGenericMount(ASTROM_ENGINE_T aengine,
|
||||||
traits::mcc_tuple_c HARDWARE_CTOR_T,
|
HARDWARE_T hw,
|
||||||
traits::mcc_tuple_c PEC_CTOR_T,
|
PEC_T pec,
|
||||||
traits::mcc_tuple_c TELEMETRY_CTOR_T,
|
TELEMETRY_T tmtry,
|
||||||
traits::mcc_tuple_c SLEWMODEL_CTOR_T,
|
SLEWMODEL_T smodel,
|
||||||
traits::mcc_tuple_c GUIDINGMODEL_CTOR_T>
|
GUIDINGMODEL_T gmodel)
|
||||||
MccGenericMount(ASTROM_ENGINE_CTOR_T aengine_ctor_args,
|
: _astromEngine(std::move(aengine)),
|
||||||
HARDWARE_CTOR_T hw_ctor_args,
|
_hardware(std::move(hw)),
|
||||||
PEC_CTOR_T pec_ctor_args,
|
_pec(std::move(pec)),
|
||||||
TELEMETRY_CTOR_T t_ctor_args,
|
_telemetry(std::move(tmtry)),
|
||||||
SLEWMODEL_CTOR_T smodel_ctor_args,
|
_slewModel(std::move(smodel)),
|
||||||
GUIDINGMODEL_CTOR_T gmodel_ctor_args)
|
_guidingModel(std::move(gmodel))
|
||||||
: _astromEngine(std::make_from_tuple<ASTROM_ENGINE_T>(std::move(aengine_ctor_args))),
|
|
||||||
_hardware(std::make_from_tuple<HARDWARE_T>(std::move(hw_ctor_args))),
|
|
||||||
_pec(std::make_from_tuple<PEC_T>(std::move(pec_ctor_args))),
|
|
||||||
_telemetry(std::make_from_tuple<TELEMETRY_T>(std::move(t_ctor_args))),
|
|
||||||
_slewModel(std::make_from_tuple<SLEWMODEL_T>(std::move(smodel_ctor_args))),
|
|
||||||
_guidingModel(std::make_from_tuple<GUIDINGMODEL_T>(std::move(gmodel_ctor_args)))
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -116,7 +116,8 @@ public:
|
|||||||
|
|
||||||
template <traits::mcc_mount_telemetry_c TELEMETRY_T,
|
template <traits::mcc_mount_telemetry_c TELEMETRY_T,
|
||||||
traits::mcc_mount_hardware_c HARDWARE_T,
|
traits::mcc_mount_hardware_c HARDWARE_T,
|
||||||
traits::mcc_tuple_c PZ_T,
|
traits::mcc_irange_of_pzones_c<typename TELEMETRY_T::mount_telemetry_data_t> PZ_T,
|
||||||
|
// traits::mcc_tuple_c PZ_T,
|
||||||
typename... LoggerCtorArgTs>
|
typename... LoggerCtorArgTs>
|
||||||
MccSimpleGuidingModel(TELEMETRY_T& telemetry,
|
MccSimpleGuidingModel(TELEMETRY_T& telemetry,
|
||||||
HARDWARE_T& hardware,
|
HARDWARE_T& hardware,
|
||||||
@ -132,7 +133,9 @@ public:
|
|||||||
|
|
||||||
template <traits::mcc_mount_telemetry_c TELEMETRY_T,
|
template <traits::mcc_mount_telemetry_c TELEMETRY_T,
|
||||||
traits::mcc_mount_hardware_c HARDWARE_T,
|
traits::mcc_mount_hardware_c HARDWARE_T,
|
||||||
traits::mcc_tuple_c PZ_T>
|
traits::mcc_irange_of_pzones_c<typename TELEMETRY_T::mount_telemetry_data_t> PZ_T
|
||||||
|
// traits::mcc_tuple_c PZ_T
|
||||||
|
>
|
||||||
MccSimpleGuidingModel(TELEMETRY_T& telemetry, HARDWARE_T& hardware, PZ_T& prohibited_zone)
|
MccSimpleGuidingModel(TELEMETRY_T& telemetry, HARDWARE_T& hardware, PZ_T& prohibited_zone)
|
||||||
requires(std::same_as<LoggerT, MccNullLogger>)
|
requires(std::same_as<LoggerT, MccNullLogger>)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -429,7 +429,7 @@ concept mcc_prohibited_zone_c =
|
|||||||
|
|
||||||
// static constexpr member to represent inifite duration
|
// static constexpr member to represent inifite duration
|
||||||
requires requires {
|
requires requires {
|
||||||
requires std::same_as<decltype(T::infiniteDuration), typename T::duration_t>;
|
requires std::same_as<decltype(T::infiniteDuration), typename T::duration_t const>;
|
||||||
[]() {
|
[]() {
|
||||||
constexpr auto val = T::infiniteDuration;
|
constexpr auto val = T::infiniteDuration;
|
||||||
return val;
|
return val;
|
||||||
@ -438,7 +438,7 @@ concept mcc_prohibited_zone_c =
|
|||||||
|
|
||||||
// static constexpr member to represent zero duration
|
// static constexpr member to represent zero duration
|
||||||
requires requires {
|
requires requires {
|
||||||
requires std::same_as<decltype(T::zeroDuration), typename T::duration_t>;
|
requires std::same_as<decltype(T::zeroDuration), typename T::duration_t const>;
|
||||||
[]() {
|
[]() {
|
||||||
constexpr auto val = T::zeroDuration;
|
constexpr auto val = T::zeroDuration;
|
||||||
return val;
|
return val;
|
||||||
@ -449,13 +449,13 @@ concept mcc_prohibited_zone_c =
|
|||||||
// the type 'T' must define a static constexpr member of type MccCoordPairKind
|
// the type 'T' must define a static constexpr member of type MccCoordPairKind
|
||||||
// to declarate type of coordinate pair used to describe the zone.
|
// to declarate type of coordinate pair used to describe the zone.
|
||||||
// This coordinate pair must be used as input in the 'inZone' class method.
|
// This coordinate pair must be used as input in the 'inZone' class method.
|
||||||
requires requires {
|
// requires requires {
|
||||||
requires std::same_as<decltype(T::zoneCoordPairKind), const MccCoordPairKind>;
|
// requires std::same_as<decltype(T::zoneCoordPairKind), const MccCoordPairKind>;
|
||||||
[]() {
|
// []() {
|
||||||
constexpr MccCoordPairKind val = T::zoneCoordPairKind;
|
// constexpr MccCoordPairKind val = T::zoneCoordPairKind;
|
||||||
return val;
|
// return val;
|
||||||
}(); // to ensure that 'zoneCoordPairKind' can be used at compile-time context
|
// }(); // to ensure that 'zoneCoordPairKind' can be used at compile-time context
|
||||||
};
|
// };
|
||||||
|
|
||||||
// return a name of the zone
|
// return a name of the zone
|
||||||
{ t_const.name() } -> mcc_formattable;
|
{ t_const.name() } -> mcc_formattable;
|
||||||
|
|||||||
@ -243,4 +243,6 @@ private:
|
|||||||
typedef MccAltLimitPZ<MccAltLimitKind::MIN_ALT_LIMIT> MccMinAltPZ;
|
typedef MccAltLimitPZ<MccAltLimitKind::MIN_ALT_LIMIT> MccMinAltPZ;
|
||||||
typedef MccAltLimitPZ<MccAltLimitKind::MAX_ALT_LIMIT> MccMaxAltPZ;
|
typedef MccAltLimitPZ<MccAltLimitKind::MAX_ALT_LIMIT> MccMaxAltPZ;
|
||||||
|
|
||||||
|
static_assert(std::movable<MccMinAltPZ>);
|
||||||
|
|
||||||
} // namespace mcc
|
} // namespace mcc
|
||||||
|
|||||||
@ -126,7 +126,8 @@ public:
|
|||||||
|
|
||||||
template <traits::mcc_mount_telemetry_c TELEMETRY_T,
|
template <traits::mcc_mount_telemetry_c TELEMETRY_T,
|
||||||
traits::mcc_mount_hardware_c HARDWARE_T,
|
traits::mcc_mount_hardware_c HARDWARE_T,
|
||||||
traits::mcc_tuple_c PZ_T, // std::tuple of prohibited zones
|
traits::mcc_irange_of_pzones_c<typename TELEMETRY_T::mount_telemetry_data_t> PZ_T,
|
||||||
|
// traits::mcc_tuple_c PZ_T, // std::tuple of prohibited zones
|
||||||
typename... LoggerCtorArgTs>
|
typename... LoggerCtorArgTs>
|
||||||
MccSimpleSlewModel(TELEMETRY_T& telemetry,
|
MccSimpleSlewModel(TELEMETRY_T& telemetry,
|
||||||
HARDWARE_T& hardware,
|
HARDWARE_T& hardware,
|
||||||
@ -142,7 +143,8 @@ public:
|
|||||||
|
|
||||||
template <traits::mcc_mount_telemetry_c TELEMETRY_T,
|
template <traits::mcc_mount_telemetry_c TELEMETRY_T,
|
||||||
traits::mcc_mount_hardware_c HARDWARE_T,
|
traits::mcc_mount_hardware_c HARDWARE_T,
|
||||||
traits::mcc_tuple_c PZ_T // std::tuple of prohibited zones
|
traits::mcc_irange_of_pzones_c<typename TELEMETRY_T::mount_telemetry_data_t> PZ_T
|
||||||
|
// traits::mcc_tuple_c PZ_T // std::tuple of prohibited zones
|
||||||
>
|
>
|
||||||
MccSimpleSlewModel(TELEMETRY_T& telemetry, HARDWARE_T& hardware, PZ_T& prohibited_zone)
|
MccSimpleSlewModel(TELEMETRY_T& telemetry, HARDWARE_T& hardware, PZ_T& prohibited_zone)
|
||||||
requires(std::same_as<LoggerT, MccNullLogger>)
|
requires(std::same_as<LoggerT, MccNullLogger>)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user