-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Opcua 3226 initialise source variable thread pool from smd (#330)
* added devicelogic to handle SourceVariableThreadPool instances in SMD element in config.xml * fixed code gen for all parent/child combinations of with/without devicelogic * added new Meta header and implementation device handler files for source var thread pool --------- Co-authored-by: Ben Farnham <[email protected]>
- Loading branch information
1 parent
2625506
commit 3f57166
Showing
6 changed files
with
178 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
|
||
/* © Copyright CERN, 2015. All rights not expressly granted are reserved. | ||
The stub of this file was generated by quasar (https://github.com/quasar-team/quasar/) | ||
Quasar is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU Lesser General Public Licence as published by | ||
the Free Software Foundation, either version 3 of the Licence. | ||
Quasar is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU Lesser General Public Licence for more details. | ||
You should have received a copy of the GNU Lesser General Public License | ||
along with Quasar. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
|
||
#ifndef __DSourceVariableThreadPool__H__ | ||
#define __DSourceVariableThreadPool__H__ | ||
|
||
#include <Base_DSourceVariableThreadPool.h> | ||
|
||
namespace Device | ||
{ | ||
|
||
class | ||
DSourceVariableThreadPool | ||
: public Base_DSourceVariableThreadPool | ||
{ | ||
|
||
public: | ||
/* sample constructor */ | ||
explicit DSourceVariableThreadPool ( | ||
const Configuration::SourceVariableThreadPool& config, | ||
Parent_DSourceVariableThreadPool* parent | ||
) ; | ||
/* sample dtr */ | ||
~DSourceVariableThreadPool (); | ||
|
||
/* delegators for | ||
cachevariables and sourcevariables */ | ||
|
||
|
||
/* delegators for methods */ | ||
|
||
private: | ||
/* Delete copy constructor and assignment operator */ | ||
DSourceVariableThreadPool( const DSourceVariableThreadPool& other ); | ||
DSourceVariableThreadPool& operator=(const DSourceVariableThreadPool& other); | ||
|
||
// ----------------------------------------------------------------------- * | ||
// - CUSTOM CODE STARTS BELOW THIS COMMENT. * | ||
// - Don't change this comment, otherwise merge tool may be troubled. * | ||
// ----------------------------------------------------------------------- * | ||
|
||
public: | ||
|
||
private: | ||
|
||
|
||
|
||
}; | ||
|
||
} | ||
|
||
#endif // __DSourceVariableThreadPool__H__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
|
||
/* © Copyright CERN, 2015. All rights not expressly granted are reserved. | ||
The stub of this file was generated by quasar (https://github.com/quasar-team/quasar/) | ||
Quasar is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU Lesser General Public Licence as published by | ||
the Free Software Foundation, either version 3 of the Licence. | ||
Quasar is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU Lesser General Public Licence for more details. | ||
You should have received a copy of the GNU Lesser General Public License | ||
along with Quasar. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
|
||
#include <Configuration.hxx> // TODO; should go away, is already in Base class for ages | ||
|
||
#include <DSourceVariableThreadPool.h> | ||
#include <ASSourceVariableThreadPool.h> | ||
|
||
#include <SourceVariables.h> | ||
|
||
namespace Device | ||
{ | ||
// 1111111111111111111111111111111111111111111111111111111111111111111111111 | ||
// 1 GENERATED CODE STARTS HERE AND FINISHES AT SECTION 2 1 | ||
// 1 Users don't modify this code!!!! 1 | ||
// 1 If you modify this code you may start a fire or a flood somewhere,1 | ||
// 1 and some human being may possible cease to exist. You don't want 1 | ||
// 1 to be charged with that! 1 | ||
// 1111111111111111111111111111111111111111111111111111111111111111111111111 | ||
|
||
|
||
|
||
|
||
|
||
|
||
// 2222222222222222222222222222222222222222222222222222222222222222222222222 | ||
// 2 SEMI CUSTOM CODE STARTS HERE AND FINISHES AT SECTION 3 2 | ||
// 2 (code for which only stubs were generated automatically) 2 | ||
// 2 You should add the implementation but dont alter the headers 2 | ||
// 2 (apart from constructor, in which you should complete initializati2 | ||
// 2 on list) 2 | ||
// 2222222222222222222222222222222222222222222222222222222222222222222222222 | ||
|
||
/* sample ctr */ | ||
DSourceVariableThreadPool::DSourceVariableThreadPool ( | ||
const Configuration::SourceVariableThreadPool& config, | ||
Parent_DSourceVariableThreadPool* parent | ||
): | ||
Base_DSourceVariableThreadPool( config, parent) | ||
|
||
/* fill up constructor initialization list here */ | ||
{ | ||
/* fill up constructor body here */ | ||
#ifndef BACKEND_OPEN62541 | ||
try | ||
{ | ||
const std::string minThreads = config.minThreads(); | ||
const std::string maxThreads = config.maxThreads(); | ||
LOG(Log::INF) << __FUNCTION__ << " starting source variable thread pool with min threads ["<<minThreads<<"] max threads ["<<maxThreads<<"]"; | ||
AddressSpace::SourceVariables_initSourceVariablesThreadPool (std::stoi(minThreads), std::stoi(maxThreads)); | ||
} | ||
catch(const std::exception& e) | ||
{ | ||
LOG(Log::ERR) << __FUNCTION__ << " failed to start source variable thread pool, error: " << e.what(); | ||
throw e; | ||
} | ||
#endif | ||
} | ||
|
||
/* sample dtr */ | ||
DSourceVariableThreadPool::~DSourceVariableThreadPool () | ||
{ | ||
} | ||
|
||
/* delegates for cachevariables */ | ||
|
||
|
||
|
||
/* delegators for methods */ | ||
|
||
// 3333333333333333333333333333333333333333333333333333333333333333333333333 | ||
// 3 FULLY CUSTOM CODE STARTS HERE 3 | ||
// 3 Below you put bodies for custom methods defined for this class. 3 | ||
// 3 You can do whatever you want, but please be decent. 3 | ||
// 3333333333333333333333333333333333333333333333333333333333333333333333333 | ||
|
||
} |