Skip to content

Commit

Permalink
gps sheit
Browse files Browse the repository at this point in the history
  • Loading branch information
martinzink committed Oct 2, 2024
1 parent 396c607 commit 44df100
Show file tree
Hide file tree
Showing 17 changed files with 50 additions and 52 deletions.
8 changes: 4 additions & 4 deletions extensions/gps/GetGPS.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
#include <memory>
#include <utility>

#include "../FlowFileRecord.h"
#include "../core/Processor.h"
#include "FlowFileRecord.h"
#include "core/Processor.h"
#include "core/PropertyDefinition.h"
#include "core/PropertyDefinitionBuilder.h"
#include "core/PropertyType.h"
Expand All @@ -35,8 +35,8 @@ namespace org::apache::nifi::minifi::processors {

class GetGPS : public core::ProcessorImpl {
public:
explicit GetGPS(std::string name, const utils::Identifier& uuid = {})
: core::Processor(std::move(name), uuid) {
explicit GetGPS(const std::string_view name, const utils::Identifier& uuid = {})
: core::ProcessorImpl(name, uuid) {
gpsdHost_ = "localhost";
gpsdPort_ = "2947";
gpsdWaitTime_ = 50000000;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ namespace org::apache::nifi::minifi::processors {

class CollectKubernetesPodMetrics : public core::ProcessorImpl {
public:
explicit CollectKubernetesPodMetrics(const std::string& name, const utils::Identifier& uuid = {})
: Processor(name, uuid) {
explicit CollectKubernetesPodMetrics(const std::string_view name, const utils::Identifier& uuid = {})
: ProcessorImpl(name, uuid) {
}

EXTENSIONAPI static constexpr const char* Description = "A processor which collects pod metrics when MiNiFi is run inside Kubernetes.";
Expand Down
7 changes: 3 additions & 4 deletions extensions/opencv/CaptureRTSPFrame.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#include <atomic>
#include <iomanip>
#include <ctime>
#include <utility>
#include <vector>
#include <memory>
#include <string>
Expand All @@ -35,10 +34,10 @@

namespace org::apache::nifi::minifi::processors {

class CaptureRTSPFrame : public core::ProcessorImpl {
class CaptureRTSPFrame final : public core::ProcessorImpl {
public:
explicit CaptureRTSPFrame(std::string name, const utils::Identifier &uuid = {})
: Processor(std::move(name), uuid) {
explicit CaptureRTSPFrame(const std::string_view name, const utils::Identifier &uuid = {})
: ProcessorImpl(name, uuid) {
}

EXTENSIONAPI static constexpr const char* Description = "Captures a frame from the RTSP stream at specified intervals.";
Expand Down
6 changes: 3 additions & 3 deletions extensions/opencv/MotionDetector.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@

namespace org::apache::nifi::minifi::processors {

class MotionDetector : public core::ProcessorImpl {
class MotionDetector final : public core::ProcessorImpl {
public:
explicit MotionDetector(std::string name, const utils::Identifier &uuid = {})
: Processor(std::move(name), uuid) {
explicit MotionDetector(const std::string_view name, const utils::Identifier &uuid = {})
: ProcessorImpl(name, uuid) {
}

EXTENSIONAPI static constexpr const char* Description = "Detect motion from captured images.";
Expand Down
6 changes: 3 additions & 3 deletions extensions/pdh/PerformanceDataMonitor.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@ namespace nifi {
namespace minifi {
namespace processors {

class PerformanceDataMonitor : public core::ProcessorImpl {
class PerformanceDataMonitor final : public core::ProcessorImpl {
public:
static constexpr const char* JSON_FORMAT_STR = "JSON";
static constexpr const char* OPEN_TELEMETRY_FORMAT_STR = "OpenTelemetry";
static constexpr const char* PRETTY_FORMAT_STR = "Pretty";
static constexpr const char* COMPACT_FORMAT_STR = "Compact";

explicit PerformanceDataMonitor(const std::string& name, utils::Identifier uuid = utils::Identifier())
: Processor(name, uuid), output_format_(OutputFormat::JSON), pretty_output_(false),
explicit PerformanceDataMonitor(const std::string_view name, utils::Identifier uuid = utils::Identifier())
: ProcessorImpl(name, uuid), output_format_(OutputFormat::JSON), pretty_output_(false),
decimal_places_(std::nullopt), logger_(core::logging::LoggerFactory<PerformanceDataMonitor>::getLogger()),
pdh_query_(nullptr), resource_consumption_counters_() {}

Expand Down
6 changes: 3 additions & 3 deletions extensions/procfs/processors/ProcFsMonitor.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ enum class ResultRelativeness {
Absolute
};

class ProcFsMonitor : public core::ProcessorImpl {
class ProcFsMonitor final : public core::ProcessorImpl {
public:
explicit ProcFsMonitor(std::string name, utils::Identifier uuid = utils::Identifier())
: Processor(std::move(name), uuid) {
explicit ProcFsMonitor(const std::string_view name, utils::Identifier uuid = utils::Identifier())
: ProcessorImpl(name, uuid) {
}
~ProcFsMonitor() override = default;

Expand Down
5 changes: 2 additions & 3 deletions extensions/python/PythonCreator.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#pragma once

#include <vector>
#include <utility>
#include <algorithm>
#include <string>
#include <memory>
Expand Down Expand Up @@ -47,8 +46,8 @@ namespace org::apache::nifi::minifi::extensions::python {
*/
class PythonCreator : public minifi::core::CoreComponentImpl {
public:
explicit PythonCreator(std::string name, const utils::Identifier &uuid = {})
: minifi::core::CoreComponentImpl(std::move(name), uuid) {
explicit PythonCreator(const std::string_view name, const utils::Identifier &uuid = {})
: minifi::core::CoreComponentImpl(name, uuid) {
}

~PythonCreator() override {
Expand Down
6 changes: 3 additions & 3 deletions extensions/smb/FetchSmb.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@

namespace org::apache::nifi::minifi::extensions::smb {

class FetchSmb : public core::ProcessorImpl {
class FetchSmb final : public core::ProcessorImpl {
public:
explicit FetchSmb(std::string name, const utils::Identifier& uuid = {})
: core::ProcessorImpl(std::move(name), uuid) {
explicit FetchSmb(const std::string_view name, const utils::Identifier& uuid = {})
: core::ProcessorImpl(name, uuid) {
}

EXTENSIONAPI static constexpr const char* Description = "Fetches files from a SMB Share. Designed to be used in tandem with ListSmb.";
Expand Down
4 changes: 2 additions & 2 deletions extensions/smb/ListSmb.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ namespace org::apache::nifi::minifi::extensions::smb {

class ListSmb : public core::ProcessorImpl {
public:
explicit ListSmb(std::string name, const utils::Identifier& uuid = {})
: core::ProcessorImpl(std::move(name), uuid) {
explicit ListSmb(std::string_view name, const utils::Identifier& uuid = {})
: core::ProcessorImpl(name, uuid) {
}

EXTENSIONAPI static constexpr const char* Description = "Retrieves a listing of files from an SMB share. For each file that is listed, "
Expand Down
6 changes: 3 additions & 3 deletions extensions/smb/PutSmb.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@

namespace org::apache::nifi::minifi::extensions::smb {

class PutSmb : public core::ProcessorImpl {
class PutSmb final : public core::ProcessorImpl {
public:
explicit PutSmb(std::string name, const utils::Identifier& uuid = {})
: core::ProcessorImpl(std::move(name), uuid) {
explicit PutSmb(const std::string_view name, const utils::Identifier& uuid = {})
: core::ProcessorImpl(name, uuid) {
}

enum class FileExistsResolutionStrategy {
Expand Down
10 changes: 5 additions & 5 deletions extensions/sql/services/DatabaseService.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,17 @@ namespace org::apache::nifi::minifi::sql::controllers {
*/
class DatabaseService : public core::controller::ControllerServiceImpl {
public:
explicit DatabaseService(std::string_view name, const utils::Identifier &uuid = {})
explicit DatabaseService(const std::string_view name, const utils::Identifier &uuid = {})
: ControllerServiceImpl(name, uuid),
initialized_(false) {
initialize();
DatabaseService::initialize();
}

explicit DatabaseService(std::string_view name, const std::shared_ptr<Configure> &configuration)
explicit DatabaseService(const std::string_view name, const std::shared_ptr<Configure> &configuration)
: ControllerServiceImpl(name),
initialized_(false) {
setConfiguration(configuration);
initialize();
ControllerServiceImpl::setConfiguration(configuration);
DatabaseService::initialize();
}

/**
Expand Down
14 changes: 7 additions & 7 deletions extensions/sql/services/ODBCConnector.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,17 @@ namespace org::apache::nifi::minifi::sql::controllers {
* services to internal services. While a controller service is generally configured from the flow,
* we want to follow the open closed principle and provide Database services
*/
class ODBCService : public DatabaseService {
class ODBCService final : public DatabaseService {
public:
explicit ODBCService(std::string name, const utils::Identifier &uuid = {})
: DatabaseService(std::move(name), uuid) {
initialize();
explicit ODBCService(const std::string_view name, const utils::Identifier &uuid = {})
: DatabaseService(name, uuid) {
DatabaseService::initialize();
}

explicit ODBCService(std::string_view name, const std::shared_ptr<Configure> &configuration)
explicit ODBCService(const std::string_view name, const std::shared_ptr<Configure> &configuration)
: DatabaseService(name) {
setConfiguration(configuration);
initialize();
ControllerServiceImpl::setConfiguration(configuration);
DatabaseService::initialize();
}

EXTENSIONAPI static constexpr const char* Description = "Controller service that provides ODBC database connection";
Expand Down
6 changes: 3 additions & 3 deletions libminifi/include/c2/triggers/FileUpdateTrigger.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ namespace org::apache::nifi::minifi::c2 {
* Design: Extends C2Trigger, and implements a trigger, action, reset state machine. Calling
* triggered will check the file.
*/
class FileUpdateTrigger : public C2Trigger {
class FileUpdateTrigger final : public C2Trigger {
public:
MINIFIAPI static constexpr const char* Description = "Defines a file update trigger when the last write time of a file has been changed.";

explicit FileUpdateTrigger(std::string name, const utils::Identifier &uuid = {})
: C2Trigger(std::move(name), uuid),
explicit FileUpdateTrigger(const std::string_view name, const utils::Identifier &uuid = {})
: C2Trigger(name, uuid),
update_(false) {
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ namespace org::apache::nifi::minifi::state::response {
class ConfigurationChecksums : public ResponseNodeImpl {
public:
ConfigurationChecksums() = default;
explicit ConfigurationChecksums(std::string name, const utils::Identifier& uuid = {}) : ResponseNodeImpl(std::move(name), uuid) {}
explicit ConfigurationChecksums(const std::string_view name, const utils::Identifier& uuid = {}) : ResponseNodeImpl(name, uuid) {}

MINIFIAPI static constexpr const char* Description = "Metric node that defines checksums of configuration files in the C2 protocol";

Expand Down
4 changes: 2 additions & 2 deletions libminifi/include/core/state/nodes/MetricsBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ class DeviceInformation : public ResponseNodeImpl {
*/
class ObjectNode : public ResponseNodeImpl {
public:
explicit ObjectNode(std::string name, const utils::Identifier& uuid = {})
: ResponseNodeImpl(std::move(name), uuid) {
explicit ObjectNode(const std::string_view name, const utils::Identifier& uuid = {})
: ResponseNodeImpl(name, uuid) {
}

void add_node(const SharedResponseNode &node) {
Expand Down
4 changes: 2 additions & 2 deletions utils/include/core/state/nodes/ResponseNode.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@ class ResponseNodeImpl : public core::ConnectableImpl, public PublishedMetricPro
is_array_(false) {
}

explicit ResponseNodeImpl(std::string_view name)
explicit ResponseNodeImpl(const std::string_view name)
: core::ConnectableImpl(name),
is_array_(false) {
}

ResponseNodeImpl(std::string_view name, const utils::Identifier& uuid)
ResponseNodeImpl(const std::string_view name, const utils::Identifier& uuid)
: core::ConnectableImpl(name, uuid),
is_array_(false) {
}
Expand Down
4 changes: 2 additions & 2 deletions utils/src/core/Connectable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@

namespace org::apache::nifi::minifi::core {

ConnectableImpl::ConnectableImpl(std::string_view name, const utils::Identifier &uuid)
ConnectableImpl::ConnectableImpl(const std::string_view name, const utils::Identifier &uuid)
: CoreComponentImpl(name, uuid),
max_concurrent_tasks_(1),
connectable_version_(nullptr),
logger_(logging::LoggerFactory<Connectable>::getLogger(uuid_)) {
}

ConnectableImpl::ConnectableImpl(std::string_view name)
ConnectableImpl::ConnectableImpl(const std::string_view name)
: CoreComponentImpl(name),
max_concurrent_tasks_(1),
connectable_version_(nullptr),
Expand Down

0 comments on commit 44df100

Please sign in to comment.