diff --git a/docs/src/commandline.rst b/docs/src/commandline.rst index 11cb67ed8..9cbfdd458 100644 --- a/docs/src/commandline.rst +++ b/docs/src/commandline.rst @@ -30,3 +30,18 @@ Commands ----------- .. include:: ../commands.rst + + +Depreciated commands +------------------------ + +.. note :: + All dac commands are preceded with the **dac** command. Use command **daclist** to get correct list of dac command arguments for current detector. + +.. csv-table:: Depreciated commands + :file: ../depreciated.csv + :widths: 35, 35 + :header-rows: 1 + + + diff --git a/docs/src/gendoc.cpp b/docs/src/gendoc.cpp index d7742edeb..f0f38f867 100644 --- a/docs/src/gendoc.cpp +++ b/docs/src/gendoc.cpp @@ -51,4 +51,11 @@ int main() { auto help = replace_all(tmp, "\n\t", "\n\t\t| "); fs << '\t' << cmd << usage << help << "\n"; } + + std::ofstream fs2("depreciated.csv"); + fs2 << "Old, New\n"; + auto cmds = proxy.GetDepreciatedCommands(); + for (auto it : cmds){ + fs2 << it.first << ", " << it.second << '\n'; + } } diff --git a/slsDetectorSoftware/src/CmdProxy.cpp b/slsDetectorSoftware/src/CmdProxy.cpp index 9da9abb9e..e33872787 100644 --- a/slsDetectorSoftware/src/CmdProxy.cpp +++ b/slsDetectorSoftware/src/CmdProxy.cpp @@ -74,6 +74,10 @@ std::vector CmdProxy::GetProxyCommands() { return commands; } +std::map CmdProxy::GetDepreciatedCommands(){ + return depreciated_functions; +} + void CmdProxy::WrongNumberOfParameters(size_t expected) { throw RuntimeError( "Command " + cmd + " expected <=" + std::to_string(expected) + diff --git a/slsDetectorSoftware/src/CmdProxy.h b/slsDetectorSoftware/src/CmdProxy.h index 4df0a4c98..f67bd4a45 100644 --- a/slsDetectorSoftware/src/CmdProxy.h +++ b/slsDetectorSoftware/src/CmdProxy.h @@ -534,6 +534,7 @@ class CmdProxy { bool ReplaceIfDepreciated(std::string &command); size_t GetFunctionMapSize() const noexcept { return functions.size(); }; std::vector GetProxyCommands(); + std::map GetDepreciatedCommands(); private: Detector *det;