NVIDIA DeepStream SDK API Reference

9.1 Release
service-maker/includes/lib/model_engine_watch_otf_trigger.hpp
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3  * SPDX-License-Identifier: Apache-2.0
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17 
18 #ifndef MODEL_ENGINE_WATCH_OTF_TRIGGER_HPP
19 #define MODEL_ENGINE_WATCH_OTF_TRIGGER_HPP
20 
21 #include <string>
22 #include <thread>
23 #include "element.hpp"
24 
25 namespace deepstream {
26 
28  public:
29  NvDsModelEngineWatchOTFTrigger (Element *infer, const std::string watch_file)
30  :infer_(infer), watch_file_path_(watch_file) {}
31 
33  stop();
34  }
35  bool start();
36  bool stop();
38  bool stop_watch = false;
39 
41  std::thread file_watch_thread_;
43  std::string watch_file_path_;
44  bool started = false;
45 };
46 
47 }
48 
49 #endif
deepstream::NvDsModelEngineWatchOTFTrigger
Definition: service-maker/includes/lib/model_engine_watch_otf_trigger.hpp:27
deepstream::NvDsModelEngineWatchOTFTrigger::watch_file_path_
std::string watch_file_path_
Definition: service-maker/includes/lib/model_engine_watch_otf_trigger.hpp:43
deepstream::Element
Element class definition.
Definition: service-maker/includes/element.hpp:54
deepstream::NvDsModelEngineWatchOTFTrigger::NvDsModelEngineWatchOTFTrigger
NvDsModelEngineWatchOTFTrigger(Element *infer, const std::string watch_file)
Definition: service-maker/includes/lib/model_engine_watch_otf_trigger.hpp:29
deepstream::NvDsModelEngineWatchOTFTrigger::stop
bool stop()
deepstream::NvDsModelEngineWatchOTFTrigger::started
bool started
Definition: service-maker/includes/lib/model_engine_watch_otf_trigger.hpp:44
deepstream::NvDsModelEngineWatchOTFTrigger::stop_watch
bool stop_watch
Definition: service-maker/includes/lib/model_engine_watch_otf_trigger.hpp:38
deepstream::NvDsModelEngineWatchOTFTrigger::infer_
Element * infer_
Definition: service-maker/includes/lib/model_engine_watch_otf_trigger.hpp:42
deepstream
Definition: service-maker/includes/buffer.hpp:38
deepstream::NvDsModelEngineWatchOTFTrigger::start
bool start()
deepstream::NvDsModelEngineWatchOTFTrigger::file_watch_thread_func
void file_watch_thread_func()
deepstream::NvDsModelEngineWatchOTFTrigger::ota_inotify_fd_
int ota_inotify_fd_
Definition: service-maker/includes/lib/model_engine_watch_otf_trigger.hpp:40
deepstream::NvDsModelEngineWatchOTFTrigger::file_watch_thread_
std::thread file_watch_thread_
Definition: service-maker/includes/lib/model_engine_watch_otf_trigger.hpp:41
deepstream::NvDsModelEngineWatchOTFTrigger::~NvDsModelEngineWatchOTFTrigger
~NvDsModelEngineWatchOTFTrigger()
Definition: service-maker/includes/lib/model_engine_watch_otf_trigger.hpp:32