diff --git a/doc/changelog.txt b/doc/changelog.txt index 67403c8..5ac557b 100644 --- a/doc/changelog.txt +++ b/doc/changelog.txt @@ -1,3 +1,22 @@ +======================== +SDM 1.0.5 +------------------------ +Released on 2022-06-26 +======================== + +sdmconsole changes: + +* user settings directory name changed (Microproject -> Simple Device Model) +* data from register map memories can now be exported/imported in hexadecimal format in addition to CSV +* always use full 32-bit width to display hexadecimal values in the register map +* default tab stop width changed from 8 to 4 + +Scripting API changes: + +* don't create multiple instances of the same plugin +* sdm.info() now generates an error when a non-existent field is requested +* a new method, sdm.findobject(), to find an SDM object by name (and, optionally, type) + ======================== SDM 1.0.4 ------------------------ diff --git a/doc/contributors.txt b/doc/contributors.txt new file mode 100644 index 0000000..312f436 --- /dev/null +++ b/doc/contributors.txt @@ -0,0 +1,2 @@ +Microproject, LLC http://micro-project.ru +Alex I. Kuznetsov https://github.com/catharanthus diff --git a/doc/licenses/license.txt b/doc/licenses/license.txt index 317c187..f9848fd 100644 --- a/doc/licenses/license.txt +++ b/doc/licenses/license.txt @@ -1,6 +1,6 @@ SIMPLE DEVICE MODEL FRAMEWORK LICENSE NOTICE -Copyright © 2015-2021 by Microproject LLC +Copyright © 2015-2022 Simple Device Model contributors SDM framework is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by @@ -26,7 +26,7 @@ SDM plugin development SDK includes the following components: * libraries for plugin development, * example plugins. -Copyright © 2015-2021 by Microproject LLC +Copyright © 2015-2022 Simple Device Model contributors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), diff --git a/doc/manual.pdf b/doc/manual.pdf index ba0a590..983f1b1 100644 Binary files a/doc/manual.pdf and b/doc/manual.pdf differ diff --git a/src/cmake/GlobalBuildConfig.cmake b/src/cmake/GlobalBuildConfig.cmake index 0540040..7b56451 100644 --- a/src/cmake/GlobalBuildConfig.cmake +++ b/src/cmake/GlobalBuildConfig.cmake @@ -107,3 +107,13 @@ if(GCC_CMDLINE_SYNTAX) set(CMAKE_C_VISIBILITY_PRESET hidden) set(CMAKE_CXX_VISIBILITY_PRESET hidden) endif() + +# Enable timed mutex workaround for libstdc++ + +if(CMAKE_CXX_COMPILER_ID STREQUAL GNU) + if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9.0) + message("Activating timed mutex workaround for older libstdc++") + include_directories(${CMAKE_CURRENT_LIST_DIR}/workarounds) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -include timed_mutex_workaround.h") + endif() +endif() diff --git a/src/cmake/Version.cmake b/src/cmake/Version.cmake index 073848e..19d3dc8 100644 --- a/src/cmake/Version.cmake +++ b/src/cmake/Version.cmake @@ -4,7 +4,7 @@ cmake_minimum_required(VERSION 3.3.0) set(PRODUCT_VERSION_MAJOR 1) set(PRODUCT_VERSION_MINOR 0) -set(PRODUCT_VERSION_PATCH 4) +set(PRODUCT_VERSION_PATCH 5) try_compile(CPU_DETECTED "${CMAKE_CURRENT_BINARY_DIR}/try_compile/DetectCPU" "${CMAKE_CURRENT_LIST_DIR}/DetectCPU.c" COPY_FILE "${CMAKE_CURRENT_BINARY_DIR}/try_compile/DetectCPU.bin") diff --git a/src/cmake/dlldeptool/dlldeptool.h b/src/cmake/dlldeptool/dlldeptool.h index 94b8355..4bcfb05 100644 --- a/src/cmake/dlldeptool/dlldeptool.h +++ b/src/cmake/dlldeptool/dlldeptool.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/cmake/dlldeptool/main.cpp b/src/cmake/dlldeptool/main.cpp index 54f265e..0404a77 100644 --- a/src/cmake/dlldeptool/main.cpp +++ b/src/cmake/dlldeptool/main.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * @@ -222,7 +222,7 @@ void displayusage(const std::string &strProgramName) { int main(int argc,char *argv[]) { utf8cout()<<"DllDepTool: collects DLLs required for the software to run"<<endl; - utf8cout()<<"Copyright (c) 2015 by Microproject LLC"<<endl; + utf8cout()<<"Copyright (c) 2015 Simple Device Model contributors"<<endl; utf8cout()<<"Note: please make sure that you are legally allowed to redistribute the DLLs!"<<endl<<endl; auto args=cmdArgs(argc,argv); diff --git a/src/cmake/dlldeptool/peimports.cpp b/src/cmake/dlldeptool/peimports.cpp index 7459ffc..9b6f339 100644 --- a/src/cmake/dlldeptool/peimports.cpp +++ b/src/cmake/dlldeptool/peimports.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/cmake/dlldeptool/peimports.h b/src/cmake/dlldeptool/peimports.h index d4e1c92..b063aee 100644 --- a/src/cmake/dlldeptool/peimports.h +++ b/src/cmake/dlldeptool/peimports.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/cmake/dlldeptool/winpath.cpp b/src/cmake/dlldeptool/winpath.cpp index 92cac36..81bc46d 100644 --- a/src/cmake/dlldeptool/winpath.cpp +++ b/src/cmake/dlldeptool/winpath.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/cmake/dlldeptool/winpath.h b/src/cmake/dlldeptool/winpath.h index dced688..3f8edda 100644 --- a/src/cmake/dlldeptool/winpath.h +++ b/src/cmake/dlldeptool/winpath.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/cmake/installer/make_installer.nsi.in b/src/cmake/installer/make_installer.nsi.in index ddc70d6..20890ce 100644 --- a/src/cmake/installer/make_installer.nsi.in +++ b/src/cmake/installer/make_installer.nsi.in @@ -8,7 +8,7 @@ # Main definitions -!define VENDOR_NAME "Microproject" +!define VENDOR_NAME "Simple Device Model contributors" !define PROGRAM_NAME "Simple Device Model" !define PROGRAM_SHORT_NAME "SDM" !define MAIN_EXECUTABLE "sdmconsole" diff --git a/src/cmake/installer/uninstall.sh.in b/src/cmake/installer/uninstall.sh.in index cba3689..a841d5c 100644 --- a/src/cmake/installer/uninstall.sh.in +++ b/src/cmake/installer/uninstall.sh.in @@ -17,9 +17,9 @@ # Remove user configuration -@EMPTY@rm -f "$ENV{HOME}/.config/Microproject/sdmconsole.ini" -@EMPTY@rm -rf "$ENV{HOME}/.config/Microproject/sdmconsole" -@EMPTY@rm -df "$ENV{HOME}/.config/Microproject" +@EMPTY@rm -f "$ENV{HOME}/.config/Simple Device Model/sdmconsole.ini" +@EMPTY@rm -rf "$ENV{HOME}/.config/Simple Device Model/sdmconsole" +@EMPTY@rm -df "$ENV{HOME}/.config/Simple Device Model" # Remove these directories only if empty diff --git a/src/cmake/workarounds/timed_mutex_workaround.h b/src/cmake/workarounds/timed_mutex_workaround.h new file mode 100644 index 0000000..5b4fed3 --- /dev/null +++ b/src/cmake/workarounds/timed_mutex_workaround.h @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2015-2022 Simple Device Model contributors + * + * This file is part of the Simple Device Model (SDM) framework. + * + * SDM framework is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * SDM framework 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 License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with SDM framework. If not, see <https://www.gnu.org/licenses/>. + * + * This header file provides a workaround for a libstdc++ timed + * mutex bug. + */ + +// Note: Timed mutexes used to be buggy in GCC versions prior to 4.9.0. + +#ifndef TIMED_MUTEX_WORKAROUND_H_INCLUDED +#define TIMED_MUTEX_WORKAROUND_H_INCLUDED + +// The following line will include bits/c++config.h if we are using libstdc++ +#include <cstddef> + +#ifdef _GLIBCXX_USE_CLOCK_MONOTONIC +// Workaround: don't use monotonic clock + #undef _GLIBCXX_USE_CLOCK_MONOTONIC +#endif + +#endif diff --git a/src/config/sdmconfig.cpp b/src/config/sdmconfig.cpp index 06bfd5f..8a0b3a8 100644 --- a/src/config/sdmconfig.cpp +++ b/src/config/sdmconfig.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/config/sdmconfig.h b/src/config/sdmconfig.h index 2bb3489..e5eb2ba 100644 --- a/src/config/sdmconfig.h +++ b/src/config/sdmconfig.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/doc/manual/images/formdialog.png b/src/doc/manual/images/formdialog.png old mode 100644 new mode 100755 index 7f83d5d..8ae47c6 Binary files a/src/doc/manual/images/formdialog.png and b/src/doc/manual/images/formdialog.png differ diff --git a/src/doc/manual/manual.tex b/src/doc/manual/manual.tex index a30308c..0efbc92 100644 --- a/src/doc/manual/manual.tex +++ b/src/doc/manual/manual.tex @@ -6,7 +6,7 @@ \hypersetup{ pdftitle={Simple Device Model User Manual}, - pdfauthor={Microproject LLC} + pdfauthor={Simple Device Model contributors} } \begin{document} @@ -23,7 +23,6 @@ \LARGE \textbf{User Manual}\par \vspace{1.2\onelineskip} \large Version \productversion\par - Microproject LLC \end{center} \vspace*{\fill} \end{adjustwidth*} @@ -116,7 +115,7 @@ \subsection{Build system dependencies} \item A toolchain for \cplusplus{} development: \begin{itemize} \item for Microsoft Windows: Microsoft Visual Studio® 2013 or later, or MinGW-w64 GCC 4.8 or later (see notes below). Pre-built Windows packages are created with Microsoft Visual Studio 2013. - \item for Linux: GCC 4.9 or later, or Clang 3.4 or later. + \item for Linux: GCC 4.8 or later, or Clang 3.4 or later. \end{itemize} \item CMake 3.3 or later; \item Qt® 5.x, x $\ge$ 6 (optional, for \shellcmd{sdmconsole}); @@ -288,7 +287,7 @@ \subsection{Examples} \subsection{Generating installer for Windows} \label{subsec:wininstaller} -Under Microsoft Windows, SDM provides a script, \shellcmd{make\_installer.nsi}, which can be used to generate an installer with NSIS (Nullsoft Scriptable Install System)\footnote{\url{http://nsis.sourceforge.io}}. +Under Microsoft Windows, SDM provides a script, \shellcmd{make\_installer.nsi}, which can be used to generate an installer with NSIS (Nullsoft Scriptable Install System)\footnote{\url{https://nsis.sourceforge.io}}. To generate the installer package, SDM must be first built and installed using CMake (possibly to a temporary directory). The NSIS script is configured by the build system and installed alongside program executables. Then, \shellcmd{makensis} program is used to create an installer. @@ -358,7 +357,7 @@ \section{Directory hierarchy} \end{tabularx} \end{table} -User settings are stored in \shellcmd{\%APPDATA\%\textbackslash{}Microproject} on Microsoft Windows and in \shellcmd{\$HOME/.config/Microproject} on Linux. +User settings are stored in \shellcmd{\%APPDATA\%\textbackslash{}Simple Device Model} on Microsoft Windows and in \shellcmd{\$HOME/.config/Simple Device Model} on Linux. On Linux, how desktop entries (shortcuts and icons) are installed depends on the \shellcmd{CMAKE\_INSTALL\_PREFIX} value: @@ -710,7 +709,7 @@ \section{Other features} \chapter{Scripting engine} \label{ch:scripting} -SDM integrates a scripting engine based on Lua programming language\footnote{\url{http://www.lua.org/}}. The scripting engine uses Lua extension mechanism to provide bindings for the SDM plugin interface as well as (with \shellcmd{sdmconsole}) means to create dialog windows to interact with the user. +SDM integrates a scripting engine based on Lua programming language\footnote{\url{https://www.lua.org/}}. The scripting engine uses Lua extension mechanism to provide bindings for the SDM plugin interface as well as (with \shellcmd{sdmconsole}) means to create dialog windows to interact with the user. The Lua project provides a comprehensive set of documentation which is also shipped with the SDM distribution. The language itself will not be covered in this manual. @@ -840,6 +839,31 @@ \subsection{\expr{sdm} global object} When called without parameters, returns the number of opened plugins. When called with an \luaexpr{index} parameter, returns a \objtype{Plugin} type object corresponding to an opened plugin with this index. \end{funcret} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% sdm.findobject() +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\begin{luafuncprototype} +sdm.findobject(name [, type]) +\end{luafuncprototype} + +\begin{funcdescr} + Finds an opened SDM object with the specified name (and type, if present). +\end{funcdescr} + +\begin{funcparams} + \funcparam{name} (\luatype{string}): object name + \funcparam{type} (\luatype{string}, optional): object type (\luaexpr{"Plugin"}, \luaexpr{"Device"}, \luaexpr{"Channel"} or \luaexpr{"Source"}) +\end{funcparams} + +\begin{funcret} + Returns the requested object, or \luaexpr{nil} if it cannot be found. +\end{funcret} + +\begin{funcremarks} + If there are multiple objects with the same name (and type, if present), it is not specified which of them is returned. +\end{funcremarks} + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % sdm.info() %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -2196,10 +2220,10 @@ \subsection{\objtype{FormDialog} type object} A form dialog is used to request more complex user input than is possible by using \luaexpr{gui.inputdialog()}. It can be created by the \luaexpr{gui.createdialog()} function. An example is shown on Figure \ref{fig:formdialog}. \begin{shellcmds}\begin{luacode} -form=gui.createdialog("form","Enter user data:") -form.addtextoption("Name","John Smith") -form.addlistoption("Gender",{"M","F","Other"}) -form.addfileoption("Photo","open","","JPEG Images (*.jpg *.jpeg);;All files (*)") +form=gui.createdialog("form","Connection settings:") +form.addtextoption("Host","192.168.1.100") +form.addlistoption("Protocol",{"TCP","UDP"}) +form.addfileoption("Picture to send","open","","JPEG Images (*.jpg *.jpeg);;All files (*)") r=form.exec() if not r then return end print("Name is "..form.getoption(1)) @@ -2209,7 +2233,7 @@ \subsection{\objtype{FormDialog} type object} \begin{figure}[htbp] \centering -\includegraphics{images/formdialog.png} +\includegraphics[width=0.8\textwidth]{images/formdialog.png} \caption{Form dialog window} \label{fig:formdialog} \end{figure} @@ -2740,7 +2764,7 @@ \subsection{\objtype{Plotter} type object} y = \mathit{scale} \cdot (x + \mathit{inputOffset}) + \mathit{outputOffset} \end{displaymath} - Color names can be represented as in HTML or CSS (\luaexpr{"\#RRGGBB"}), SVG named colors are also supported\footnote{\url{http://www.w3.org/TR/SVG/types.html\#ColorKeywords}}. + Color names can be represented as in HTML or CSS (\luaexpr{"\#RRGGBB"}), SVG named colors are also supported\footnote{\url{https://www.w3.org/TR/SVG/types.html\#ColorKeywords}}. \end{funcremarks} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -4723,6 +4747,8 @@ \section{Overview} SDM plugins are not required to provide reentrancy or thread safety guarantees. Multi-threaded client applications must ensure that plugin functions are not accessed simultaneously from multiple threads. +SDM SDK includes a few example plugins to help you get started. Refer to the \shellcmd{examples/readme.txt} for details. + \section{Application binary interface} \label{sec:abi} @@ -4873,8 +4899,6 @@ \section{Developing SDM plugins in C} Functions that should be implemented by the plugin are listed in Section \ref{sec:sdmexport}. Their prototypes and semantics are provided in Chapter \ref{ch:sdmapireference}. -SDM SDK includes a simple example, \shellcmd{simpleplugin.c}, which can be used as a reference. - \section[Developing SDM plugins in C++]{Developing SDM plugins in \cplusplus} Plugins can be developed in \cplusplus{} as they would in C, with a few caveats: @@ -4923,8 +4947,6 @@ \section{Developing SDM plugins in C} \item Add the \shellcmd{pluginprovider} sources to the build process. \end{enumerate} -SDM SDK includes an example, \shellcmd{uartdemo}, based on \shellcmd{pluginprovider}. It communicates with an Arduino Uno board over the serial port and provides the means to control pin states and capture data from the integrated ADC. - \section{Using SDM with CMake package system} \label{sec:cmakeconfig} diff --git a/src/doc/manual/version.tex b/src/doc/manual/version.tex index 99473ed..6724cd9 100644 --- a/src/doc/manual/version.tex +++ b/src/doc/manual/version.tex @@ -1,4 +1,4 @@ % This file is automatically generated by the build system. % Do not edit it manually. -\newcommand{\productversion}{1.0.4} +\newcommand{\productversion}{1.0.5} diff --git a/src/gui/commonwidgets/autoresizingtable.cpp b/src/gui/commonwidgets/autoresizingtable.cpp index 6f450f7..595be75 100644 --- a/src/gui/commonwidgets/autoresizingtable.cpp +++ b/src/gui/commonwidgets/autoresizingtable.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/gui/commonwidgets/autoresizingtable.h b/src/gui/commonwidgets/autoresizingtable.h index 37e6474..3f78e22 100644 --- a/src/gui/commonwidgets/autoresizingtable.h +++ b/src/gui/commonwidgets/autoresizingtable.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/gui/commonwidgets/codeeditor.cpp b/src/gui/commonwidgets/codeeditor.cpp index d48e3e1..0acb378 100644 --- a/src/gui/commonwidgets/codeeditor.cpp +++ b/src/gui/commonwidgets/codeeditor.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * @@ -38,7 +38,7 @@ CodeEditor::CodeEditor(QWidget *parent): QPlainTextEdit(parent), - _tabWidth(8) + _tabWidth(4) { Q_INIT_RESOURCE(commonwidgets); diff --git a/src/gui/commonwidgets/codeeditor.h b/src/gui/commonwidgets/codeeditor.h index 2ef7326..ba89e66 100644 --- a/src/gui/commonwidgets/codeeditor.h +++ b/src/gui/commonwidgets/codeeditor.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/gui/commonwidgets/consolewidget.cpp b/src/gui/commonwidgets/consolewidget.cpp index 5f51206..6f18a08 100644 --- a/src/gui/commonwidgets/consolewidget.cpp +++ b/src/gui/commonwidgets/consolewidget.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * @@ -284,7 +284,7 @@ void ConsoleWidget::runCommand(const QString &cmd,bool suppressEcho) { void ConsoleWidget::applyFont(const QFont &f) { QFont newFont=f; - setTabStopWidth(FontUtils::tweakForTabStops(newFont,8)); + setTabStopWidth(FontUtils::tweakForTabStops(newFont,4)); setFont(newFont); } diff --git a/src/gui/commonwidgets/consolewidget.h b/src/gui/commonwidgets/consolewidget.h index 3143f6f..9b46614 100644 --- a/src/gui/commonwidgets/consolewidget.h +++ b/src/gui/commonwidgets/consolewidget.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/gui/commonwidgets/dockwrapper.cpp b/src/gui/commonwidgets/dockwrapper.cpp index 5ff02c3..3520200 100644 --- a/src/gui/commonwidgets/dockwrapper.cpp +++ b/src/gui/commonwidgets/dockwrapper.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/gui/commonwidgets/dockwrapper.h b/src/gui/commonwidgets/dockwrapper.h index 6b70b66..3e987c8 100644 --- a/src/gui/commonwidgets/dockwrapper.h +++ b/src/gui/commonwidgets/dockwrapper.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/gui/commonwidgets/filedialogex.cpp b/src/gui/commonwidgets/filedialogex.cpp index b79977f..7913e8c 100644 --- a/src/gui/commonwidgets/filedialogex.cpp +++ b/src/gui/commonwidgets/filedialogex.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/gui/commonwidgets/filedialogex.h b/src/gui/commonwidgets/filedialogex.h index c1c1f7f..0283fb8 100644 --- a/src/gui/commonwidgets/filedialogex.h +++ b/src/gui/commonwidgets/filedialogex.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/gui/commonwidgets/fileselector.cpp b/src/gui/commonwidgets/fileselector.cpp index 386d909..dc1a587 100644 --- a/src/gui/commonwidgets/fileselector.cpp +++ b/src/gui/commonwidgets/fileselector.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/gui/commonwidgets/fileselector.h b/src/gui/commonwidgets/fileselector.h index d011404..afa1ae7 100644 --- a/src/gui/commonwidgets/fileselector.h +++ b/src/gui/commonwidgets/fileselector.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/gui/commonwidgets/fontutils.cpp b/src/gui/commonwidgets/fontutils.cpp index f36b613..8473959 100644 --- a/src/gui/commonwidgets/fontutils.cpp +++ b/src/gui/commonwidgets/fontutils.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/gui/commonwidgets/fontutils.h b/src/gui/commonwidgets/fontutils.h index 2a2ac67..25531ff 100644 --- a/src/gui/commonwidgets/fontutils.h +++ b/src/gui/commonwidgets/fontutils.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/gui/commonwidgets/formatnumber.h b/src/gui/commonwidgets/formatnumber.h new file mode 100644 index 0000000..15776bd --- /dev/null +++ b/src/gui/commonwidgets/formatnumber.h @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2015-2022 Simple Device Model contributors + * + * This file is part of the Simple Device Model (SDM) framework. + * + * SDM framework is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * SDM framework 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 License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with SDM framework. If not, see <https://www.gnu.org/licenses/>. + * + * This header file defines a simple helper template to format a hexadecimal + * number. + */ + +#ifndef FORMATNUMBER_H_INCLUDED +#define FORMATNUMBER_H_INCLUDED + +#include <QString> + +template <typename T> QString hexNumber(const T &x) { + QString str; + const char *hex="0123456789ABCDEF"; + int digits=static_cast<int>(sizeof(T))*2; + for(int i=digits-1;i>=0;i--) { + int d=(x>>(4*i))&0xF; + str.append(hex[d]); + } + return str; +} + +#endif diff --git a/src/gui/commonwidgets/formdialog.cpp b/src/gui/commonwidgets/formdialog.cpp index ad7329b..3a640dc 100644 --- a/src/gui/commonwidgets/formdialog.cpp +++ b/src/gui/commonwidgets/formdialog.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/gui/commonwidgets/formdialog.h b/src/gui/commonwidgets/formdialog.h index 22cb414..5c02311 100644 --- a/src/gui/commonwidgets/formdialog.h +++ b/src/gui/commonwidgets/formdialog.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/gui/commonwidgets/fruntime_error.h b/src/gui/commonwidgets/fruntime_error.h index a0f4101..47568c8 100644 --- a/src/gui/commonwidgets/fruntime_error.h +++ b/src/gui/commonwidgets/fruntime_error.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/gui/commonwidgets/fstring.h b/src/gui/commonwidgets/fstring.h index 57b400e..5cf16da 100644 --- a/src/gui/commonwidgets/fstring.h +++ b/src/gui/commonwidgets/fstring.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/gui/commonwidgets/hintedwidget.h b/src/gui/commonwidgets/hintedwidget.h index 5ba5421..abb7372 100644 --- a/src/gui/commonwidgets/hintedwidget.h +++ b/src/gui/commonwidgets/hintedwidget.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/gui/commonwidgets/iconbutton.cpp b/src/gui/commonwidgets/iconbutton.cpp index f98e1a6..a68974e 100644 --- a/src/gui/commonwidgets/iconbutton.cpp +++ b/src/gui/commonwidgets/iconbutton.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/gui/commonwidgets/iconbutton.h b/src/gui/commonwidgets/iconbutton.h index 60319a1..48491c7 100644 --- a/src/gui/commonwidgets/iconbutton.h +++ b/src/gui/commonwidgets/iconbutton.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/gui/commonwidgets/luahighlighter.cpp b/src/gui/commonwidgets/luahighlighter.cpp index 892bee1..5905862 100644 --- a/src/gui/commonwidgets/luahighlighter.cpp +++ b/src/gui/commonwidgets/luahighlighter.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/gui/commonwidgets/luahighlighter.h b/src/gui/commonwidgets/luahighlighter.h index d6e41a3..5e137d3 100644 --- a/src/gui/commonwidgets/luahighlighter.h +++ b/src/gui/commonwidgets/luahighlighter.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/gui/commonwidgets/marshal.h b/src/gui/commonwidgets/marshal.h index b8b1105..cd1dc86 100644 --- a/src/gui/commonwidgets/marshal.h +++ b/src/gui/commonwidgets/marshal.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/gui/commonwidgets/optionselectordialog.cpp b/src/gui/commonwidgets/optionselectordialog.cpp index a9a3a27..14370f1 100644 --- a/src/gui/commonwidgets/optionselectordialog.cpp +++ b/src/gui/commonwidgets/optionselectordialog.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/gui/commonwidgets/optionselectordialog.h b/src/gui/commonwidgets/optionselectordialog.h index fdf506c..f5ba458 100644 --- a/src/gui/commonwidgets/optionselectordialog.h +++ b/src/gui/commonwidgets/optionselectordialog.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/gui/commonwidgets/plotterabstractscene.cpp b/src/gui/commonwidgets/plotterabstractscene.cpp index 5f77260..ec9db3c 100644 --- a/src/gui/commonwidgets/plotterabstractscene.cpp +++ b/src/gui/commonwidgets/plotterabstractscene.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/gui/commonwidgets/plotterabstractscene.h b/src/gui/commonwidgets/plotterabstractscene.h index 7dcbbb5..4b7b538 100644 --- a/src/gui/commonwidgets/plotterabstractscene.h +++ b/src/gui/commonwidgets/plotterabstractscene.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/gui/commonwidgets/plotteraddcursordialog.cpp b/src/gui/commonwidgets/plotteraddcursordialog.cpp index 861d500..9273db6 100644 --- a/src/gui/commonwidgets/plotteraddcursordialog.cpp +++ b/src/gui/commonwidgets/plotteraddcursordialog.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/gui/commonwidgets/plotteraddcursordialog.h b/src/gui/commonwidgets/plotteraddcursordialog.h index 25262bb..a76143c 100644 --- a/src/gui/commonwidgets/plotteraddcursordialog.h +++ b/src/gui/commonwidgets/plotteraddcursordialog.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/gui/commonwidgets/plotterbarscene.cpp b/src/gui/commonwidgets/plotterbarscene.cpp index 5875b45..0fec183 100644 --- a/src/gui/commonwidgets/plotterbarscene.cpp +++ b/src/gui/commonwidgets/plotterbarscene.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/gui/commonwidgets/plotterbarscene.h b/src/gui/commonwidgets/plotterbarscene.h index 36da3dd..50bfdb6 100644 --- a/src/gui/commonwidgets/plotterbarscene.h +++ b/src/gui/commonwidgets/plotterbarscene.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/gui/commonwidgets/plotterbinaryscene.cpp b/src/gui/commonwidgets/plotterbinaryscene.cpp index d1e8e75..feb6df1 100644 --- a/src/gui/commonwidgets/plotterbinaryscene.cpp +++ b/src/gui/commonwidgets/plotterbinaryscene.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/gui/commonwidgets/plotterbinaryscene.h b/src/gui/commonwidgets/plotterbinaryscene.h index 2e5d526..787feac 100644 --- a/src/gui/commonwidgets/plotterbinaryscene.h +++ b/src/gui/commonwidgets/plotterbinaryscene.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/gui/commonwidgets/plotterbitmapscene.cpp b/src/gui/commonwidgets/plotterbitmapscene.cpp index 3900285..05340d4 100644 --- a/src/gui/commonwidgets/plotterbitmapscene.cpp +++ b/src/gui/commonwidgets/plotterbitmapscene.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/gui/commonwidgets/plotterbitmapscene.h b/src/gui/commonwidgets/plotterbitmapscene.h index 821359a..517b196 100644 --- a/src/gui/commonwidgets/plotterbitmapscene.h +++ b/src/gui/commonwidgets/plotterbitmapscene.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/gui/commonwidgets/plottercursorwidget.cpp b/src/gui/commonwidgets/plottercursorwidget.cpp index 874e4b6..26dd2ac 100644 --- a/src/gui/commonwidgets/plottercursorwidget.cpp +++ b/src/gui/commonwidgets/plottercursorwidget.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/gui/commonwidgets/plottercursorwidget.h b/src/gui/commonwidgets/plottercursorwidget.h index a82dda2..cc65b8b 100644 --- a/src/gui/commonwidgets/plottercursorwidget.h +++ b/src/gui/commonwidgets/plottercursorwidget.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/gui/commonwidgets/plotterlayersdialog.cpp b/src/gui/commonwidgets/plotterlayersdialog.cpp index b2503df..d70a4db 100644 --- a/src/gui/commonwidgets/plotterlayersdialog.cpp +++ b/src/gui/commonwidgets/plotterlayersdialog.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/gui/commonwidgets/plotterlayersdialog.h b/src/gui/commonwidgets/plotterlayersdialog.h index 613e85f..b4638cf 100644 --- a/src/gui/commonwidgets/plotterlayersdialog.h +++ b/src/gui/commonwidgets/plotterlayersdialog.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/gui/commonwidgets/plotterscrollarea.cpp b/src/gui/commonwidgets/plotterscrollarea.cpp index 0da80d8..48ef303 100644 --- a/src/gui/commonwidgets/plotterscrollarea.cpp +++ b/src/gui/commonwidgets/plotterscrollarea.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/gui/commonwidgets/plotterscrollarea.h b/src/gui/commonwidgets/plotterscrollarea.h index 3a6f817..ef52e50 100644 --- a/src/gui/commonwidgets/plotterscrollarea.h +++ b/src/gui/commonwidgets/plotterscrollarea.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/gui/commonwidgets/plottervideoscene.cpp b/src/gui/commonwidgets/plottervideoscene.cpp index fad2899..d2d8be3 100644 --- a/src/gui/commonwidgets/plottervideoscene.cpp +++ b/src/gui/commonwidgets/plottervideoscene.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/gui/commonwidgets/plottervideoscene.h b/src/gui/commonwidgets/plottervideoscene.h index 5ade8f0..763742c 100644 --- a/src/gui/commonwidgets/plottervideoscene.h +++ b/src/gui/commonwidgets/plottervideoscene.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/gui/commonwidgets/plotterwidget.cpp b/src/gui/commonwidgets/plotterwidget.cpp index 73ad64f..3e1d18e 100644 --- a/src/gui/commonwidgets/plotterwidget.cpp +++ b/src/gui/commonwidgets/plotterwidget.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/gui/commonwidgets/plotterwidget.h b/src/gui/commonwidgets/plotterwidget.h index e6e59b5..7f5a0d4 100644 --- a/src/gui/commonwidgets/plotterwidget.h +++ b/src/gui/commonwidgets/plotterwidget.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/gui/commonwidgets/signalblocker.h b/src/gui/commonwidgets/signalblocker.h index d1182f8..45478af 100644 --- a/src/gui/commonwidgets/signalblocker.h +++ b/src/gui/commonwidgets/signalblocker.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/gui/commonwidgets/statusprogresswidget.cpp b/src/gui/commonwidgets/statusprogresswidget.cpp index efde7c5..0584c03 100644 --- a/src/gui/commonwidgets/statusprogresswidget.cpp +++ b/src/gui/commonwidgets/statusprogresswidget.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/gui/commonwidgets/statusprogresswidget.h b/src/gui/commonwidgets/statusprogresswidget.h index b255d9b..508ceee 100644 --- a/src/gui/commonwidgets/statusprogresswidget.h +++ b/src/gui/commonwidgets/statusprogresswidget.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/gui/commonwidgets/textviewer.cpp b/src/gui/commonwidgets/textviewer.cpp index bf06683..3182495 100644 --- a/src/gui/commonwidgets/textviewer.cpp +++ b/src/gui/commonwidgets/textviewer.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * @@ -130,7 +130,7 @@ void TextViewer::chooseFont() { void TextViewer::applyFont(const QFont &f) { QFont newFont=f; - _edit->setTabStopWidth(FontUtils::tweakForTabStops(newFont,8)); + _edit->setTabStopWidth(FontUtils::tweakForTabStops(newFont,4)); _edit->setFont(newFont); } diff --git a/src/gui/commonwidgets/textviewer.h b/src/gui/commonwidgets/textviewer.h index ee3253b..d438d62 100644 --- a/src/gui/commonwidgets/textviewer.h +++ b/src/gui/commonwidgets/textviewer.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/gui/commonwidgets/vectormodel.h b/src/gui/commonwidgets/vectormodel.h index 17d8252..214f2ad 100644 --- a/src/gui/commonwidgets/vectormodel.h +++ b/src/gui/commonwidgets/vectormodel.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * @@ -176,9 +176,19 @@ template <typename T> class VectorModel : public QAbstractListModel { template <typename T2> static QVariant toStringVariant(const T2 &value,int base) { QString res; QTextStream ts(&res); - ts.setIntegerBase(base); - ts.setNumberFlags(QTextStream::ShowBase|QTextStream::UppercaseDigits); - ts<<value; + if(base==16) { + ts<<"0x"; + ts.setIntegerBase(16); + ts.setNumberFlags(QTextStream::UppercaseDigits); + ts.setFieldWidth(2*sizeof(T2)); + ts.setPadChar('0'); + ts<<value; + } + else { + ts.setIntegerBase(base); + ts.setNumberFlags(QTextStream::ShowBase|QTextStream::UppercaseDigits); + ts<<value; + } if(ts.status()!=QTextStream::Ok) return QVariant(); return res; } diff --git a/src/gui/sdmconsole/appwidelock.cpp b/src/gui/sdmconsole/appwidelock.cpp index 7fc0337..e63acb4 100644 --- a/src/gui/sdmconsole/appwidelock.cpp +++ b/src/gui/sdmconsole/appwidelock.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/gui/sdmconsole/appwidelock.h b/src/gui/sdmconsole/appwidelock.h index bd339f4..c65c2a9 100644 --- a/src/gui/sdmconsole/appwidelock.h +++ b/src/gui/sdmconsole/appwidelock.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/gui/sdmconsole/cmdargs.cpp b/src/gui/sdmconsole/cmdargs.cpp index 19cb671..e9b2ed2 100644 --- a/src/gui/sdmconsole/cmdargs.cpp +++ b/src/gui/sdmconsole/cmdargs.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/gui/sdmconsole/cmdargs.h b/src/gui/sdmconsole/cmdargs.h index fd592bb..7490266 100644 --- a/src/gui/sdmconsole/cmdargs.h +++ b/src/gui/sdmconsole/cmdargs.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/gui/sdmconsole/docpanels.cpp b/src/gui/sdmconsole/docpanels.cpp index 35b5127..67a6e00 100644 --- a/src/gui/sdmconsole/docpanels.cpp +++ b/src/gui/sdmconsole/docpanels.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/gui/sdmconsole/docpanels.h b/src/gui/sdmconsole/docpanels.h index 69983a8..0978786 100644 --- a/src/gui/sdmconsole/docpanels.h +++ b/src/gui/sdmconsole/docpanels.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/gui/sdmconsole/docroot.cpp b/src/gui/sdmconsole/docroot.cpp index ddcd07a..d6a37d5 100644 --- a/src/gui/sdmconsole/docroot.cpp +++ b/src/gui/sdmconsole/docroot.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/gui/sdmconsole/docroot.h b/src/gui/sdmconsole/docroot.h index acada34..2fbacee 100644 --- a/src/gui/sdmconsole/docroot.h +++ b/src/gui/sdmconsole/docroot.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/gui/sdmconsole/extrakeywords.cpp b/src/gui/sdmconsole/extrakeywords.cpp index f9043f6..e45bb17 100644 --- a/src/gui/sdmconsole/extrakeywords.cpp +++ b/src/gui/sdmconsole/extrakeywords.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * @@ -31,6 +31,7 @@ void addExtraKeywords(LuaHighlighter *hl) { hl->addKeyword(set,"sdm"); hl->addKeyword(set,"sdm.openplugin"); hl->addKeyword(set,"sdm.plugins"); + hl->addKeyword(set,"sdm.findobject"); hl->addKeyword(set,"sdm.info"); hl->addKeyword(set,"sdm.path"); hl->addKeyword(set,"sdm.sleep"); diff --git a/src/gui/sdmconsole/extrakeywords.h b/src/gui/sdmconsole/extrakeywords.h index 0859f54..0767387 100644 --- a/src/gui/sdmconsole/extrakeywords.h +++ b/src/gui/sdmconsole/extrakeywords.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/gui/sdmconsole/hints.cpp b/src/gui/sdmconsole/hints.cpp index 5e82bd3..c4e326e 100644 --- a/src/gui/sdmconsole/hints.cpp +++ b/src/gui/sdmconsole/hints.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/gui/sdmconsole/hints.h b/src/gui/sdmconsole/hints.h index 0548ad9..e0cac7c 100644 --- a/src/gui/sdmconsole/hints.h +++ b/src/gui/sdmconsole/hints.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/gui/sdmconsole/luadialogserver.cpp b/src/gui/sdmconsole/luadialogserver.cpp index 499e7ae..26d9a98 100644 --- a/src/gui/sdmconsole/luadialogserver.cpp +++ b/src/gui/sdmconsole/luadialogserver.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * @@ -120,8 +120,10 @@ int LuaDialogServer::LuaMethod_messagebox(LuaServer &lua,const std::vector<LuaVa if(i!=std::string::npos) buttons|=QMessageBox::No; if(i==0) defButton=QMessageBox::No; - d.setStandardButtons(buttons); - d.setDefaultButton(defButton); + if(buttons!=QMessageBox::StandardButtons()) { + d.setStandardButtons(buttons); + d.setDefaultButton(defButton); + } } QMessageBox::StandardButton r=static_cast<QMessageBox::StandardButton>(d.exec()); diff --git a/src/gui/sdmconsole/luadialogserver.h b/src/gui/sdmconsole/luadialogserver.h index 8d51b0e..9e872ec 100644 --- a/src/gui/sdmconsole/luadialogserver.h +++ b/src/gui/sdmconsole/luadialogserver.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/gui/sdmconsole/luaformdialog.cpp b/src/gui/sdmconsole/luaformdialog.cpp index 4b6993a..f5791b5 100644 --- a/src/gui/sdmconsole/luaformdialog.cpp +++ b/src/gui/sdmconsole/luaformdialog.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/gui/sdmconsole/luaformdialog.h b/src/gui/sdmconsole/luaformdialog.h index b81280f..598ff5f 100644 --- a/src/gui/sdmconsole/luaformdialog.h +++ b/src/gui/sdmconsole/luaformdialog.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/gui/sdmconsole/luagui.cpp b/src/gui/sdmconsole/luagui.cpp index e599204..976e987 100644 --- a/src/gui/sdmconsole/luagui.cpp +++ b/src/gui/sdmconsole/luagui.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/gui/sdmconsole/luagui.h b/src/gui/sdmconsole/luagui.h index a28d8a3..e92435c 100644 --- a/src/gui/sdmconsole/luagui.h +++ b/src/gui/sdmconsole/luagui.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/gui/sdmconsole/luamodelessdialog.h b/src/gui/sdmconsole/luamodelessdialog.h index 200a86a..8f96e31 100644 --- a/src/gui/sdmconsole/luamodelessdialog.h +++ b/src/gui/sdmconsole/luamodelessdialog.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/gui/sdmconsole/luaplotterwidget.cpp b/src/gui/sdmconsole/luaplotterwidget.cpp index 057be98..adc67d1 100644 --- a/src/gui/sdmconsole/luaplotterwidget.cpp +++ b/src/gui/sdmconsole/luaplotterwidget.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/gui/sdmconsole/luaplotterwidget.h b/src/gui/sdmconsole/luaplotterwidget.h index e8e2bb9..8f4a0cc 100644 --- a/src/gui/sdmconsole/luaplotterwidget.h +++ b/src/gui/sdmconsole/luaplotterwidget.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/gui/sdmconsole/luaserverqt.cpp b/src/gui/sdmconsole/luaserverqt.cpp index 287bec8..137a2a6 100644 --- a/src/gui/sdmconsole/luaserverqt.cpp +++ b/src/gui/sdmconsole/luaserverqt.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/gui/sdmconsole/luaserverqt.h b/src/gui/sdmconsole/luaserverqt.h index a4819f6..4eb0f41 100644 --- a/src/gui/sdmconsole/luaserverqt.h +++ b/src/gui/sdmconsole/luaserverqt.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/gui/sdmconsole/luatextviewer.cpp b/src/gui/sdmconsole/luatextviewer.cpp index adabca7..822a7f8 100644 --- a/src/gui/sdmconsole/luatextviewer.cpp +++ b/src/gui/sdmconsole/luatextviewer.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/gui/sdmconsole/luatextviewer.h b/src/gui/sdmconsole/luatextviewer.h index 9e89a37..5d0712f 100644 --- a/src/gui/sdmconsole/luatextviewer.h +++ b/src/gui/sdmconsole/luatextviewer.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/gui/sdmconsole/luawidget.cpp b/src/gui/sdmconsole/luawidget.cpp index ce5ff61..0e0832f 100644 --- a/src/gui/sdmconsole/luawidget.cpp +++ b/src/gui/sdmconsole/luawidget.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/gui/sdmconsole/luawidget.h b/src/gui/sdmconsole/luawidget.h index 395d7b8..dc59587 100644 --- a/src/gui/sdmconsole/luawidget.h +++ b/src/gui/sdmconsole/luawidget.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/gui/sdmconsole/main.cpp b/src/gui/sdmconsole/main.cpp index 36569d1..b48f3a7 100644 --- a/src/gui/sdmconsole/main.cpp +++ b/src/gui/sdmconsole/main.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * @@ -117,7 +117,7 @@ try QLoggingCategory::setFilterRules("*=false\n"); // Set application names - QCoreApplication::setOrganizationName("Microproject"); + QCoreApplication::setOrganizationName("Simple Device Model"); QCoreApplication::setApplicationName("sdmconsole"); // Initialize settings diff --git a/src/gui/sdmconsole/mainwindow.cpp b/src/gui/sdmconsole/mainwindow.cpp index bc019a4..5b8228d 100644 --- a/src/gui/sdmconsole/mainwindow.cpp +++ b/src/gui/sdmconsole/mainwindow.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * @@ -461,9 +461,10 @@ void MainWindow::menuHelpAbout() { tr("<p><a href=\"info://doc/changelog.txt\">Changelog</a></p>\n")+ tr("<p><a href=\"https://simpledevicemodel.github.io/\">Website</a></p>\n")+ tr("<h4>Legal information</h4>\n")+ - tr("Copyright © 2015-2021 by Microproject LLC\n")+ + tr("<p>Copyright © 2015-2022 Simple Device Model contributors</p>\n")+ tr("<p>This program comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under certain conditions. See the link below for details.</p>\n")+ - tr("<p><a href=\"info://doc/licenses/license.txt\">Copyright and licensing information</a></p>\n"); + tr("<p><a href=\"info://doc/contributors.txt\">List of contributors</a></p>\n")+ + tr("<p><a href=\"info://doc/licenses/license.txt\">Licensing information</a></p>\n"); msgBox.setInformativeText(text); auto iconWidth=QApplication::style()->pixelMetric(QStyle::PM_LargeIconSize)*2; diff --git a/src/gui/sdmconsole/mainwindow.h b/src/gui/sdmconsole/mainwindow.h index 68373ac..1e4e89d 100644 --- a/src/gui/sdmconsole/mainwindow.h +++ b/src/gui/sdmconsole/mainwindow.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/gui/sdmconsole/mhdbwriter.cpp b/src/gui/sdmconsole/mhdbwriter.cpp index 2bb2967..968ddbd 100644 --- a/src/gui/sdmconsole/mhdbwriter.cpp +++ b/src/gui/sdmconsole/mhdbwriter.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/gui/sdmconsole/mhdbwriter.h b/src/gui/sdmconsole/mhdbwriter.h index 62ce44c..0c2e8df 100644 --- a/src/gui/sdmconsole/mhdbwriter.h +++ b/src/gui/sdmconsole/mhdbwriter.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/gui/sdmconsole/openplugindialog.cpp b/src/gui/sdmconsole/openplugindialog.cpp index 3bbecfa..e5f3f98 100644 --- a/src/gui/sdmconsole/openplugindialog.cpp +++ b/src/gui/sdmconsole/openplugindialog.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/gui/sdmconsole/openplugindialog.h b/src/gui/sdmconsole/openplugindialog.h index 4ffd66e..196013a 100644 --- a/src/gui/sdmconsole/openplugindialog.h +++ b/src/gui/sdmconsole/openplugindialog.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/gui/sdmconsole/propertyeditor.cpp b/src/gui/sdmconsole/propertyeditor.cpp index 7008963..a5250af 100644 --- a/src/gui/sdmconsole/propertyeditor.cpp +++ b/src/gui/sdmconsole/propertyeditor.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/gui/sdmconsole/propertyeditor.h b/src/gui/sdmconsole/propertyeditor.h index 76363b4..de0dfdc 100644 --- a/src/gui/sdmconsole/propertyeditor.h +++ b/src/gui/sdmconsole/propertyeditor.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/gui/sdmconsole/registerconfigdialog.cpp b/src/gui/sdmconsole/registerconfigdialog.cpp index 41c04fc..56b518b 100644 --- a/src/gui/sdmconsole/registerconfigdialog.cpp +++ b/src/gui/sdmconsole/registerconfigdialog.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * @@ -28,6 +28,7 @@ #include "luahighlighter.h" #include "extrakeywords.h" #include "vectormodel.h" +#include "formatnumber.h" #include <QVBoxLayout> #include <QGridLayout> @@ -405,10 +406,10 @@ FifoPage::FifoPage(RegisterMap::RowData &data,QWidget *parent): QObject::connect(fillButton,&QAbstractButton::clicked,this,&FifoPage::fillWithConstantValue); buttonsLayout->addWidget(fillButton,row++,0,1,2); - auto exportButton=new QPushButton(tr("Export to CSV")); + auto exportButton=new QPushButton(tr("Export")); QObject::connect(exportButton,&QAbstractButton::clicked,this,&FifoPage::exportToCSV); buttonsLayout->addWidget(exportButton,row++,0,1,2); - auto importButton=new QPushButton(tr("Import from CSV")); + auto importButton=new QPushButton(tr("Import")); QObject::connect(importButton,&QAbstractButton::clicked,this,&FifoPage::importFromCSV); buttonsLayout->addWidget(importButton,row++,0,1,2); @@ -516,7 +517,7 @@ void FifoPage::exportToCSV() try { if(dir.isValid()) d.setDirectory(dir.toString()); d.setAcceptMode(QFileDialog::AcceptSave); d.setFileMode(QFileDialog::AnyFile); - d.setNameFilter(tr("CSV files (*.csv);;All files (*)")); + d.setNameFilter(tr("CSV files (*.csv);;Hex files (*.hex)")); if(!d.exec()) return; s.setValue("CSVDirectory",d.directory().absolutePath()); @@ -527,7 +528,12 @@ void FifoPage::exportToCSV() try { if(!f.open(QIODevice::WriteOnly)) throw fruntime_error("Cannot open file"); QTextStream ts(&f); - for(auto const val: *_tableModel) ts<<val<<endl; + if(d.filteredExtension()=="hex") { + for(auto const val: *_tableModel) ts<<hexNumber(val)<<endl; + } + else { + for(auto const val: *_tableModel) ts<<val<<endl; + } } catch(std::exception &ex) { QMessageBox::critical(this,QObject::tr("Error"),ex.what(),QMessageBox::Ok); @@ -542,7 +548,7 @@ void FifoPage::importFromCSV() try { if(dir.isValid()) d.setDirectory(dir.toString()); d.setAcceptMode(QFileDialog::AcceptOpen); d.setFileMode(QFileDialog::ExistingFile); - d.setNameFilter(tr("CSV files (*.csv);;All files (*)")); + d.setNameFilter(tr("CSV files (*.csv);;Hex files (*.hex);;All files (*)")); if(!d.exec()) return; s.setValue("CSVDirectory",d.directory().absolutePath()); @@ -553,15 +559,25 @@ void FifoPage::importFromCSV() try { if(!f.open(QIODevice::ReadOnly)) throw fruntime_error("Cannot open file"); QTextStream ts(&f); - QRegularExpression numRegex("\\d+"); std::vector<sdm_reg_t> data; - while(!ts.atEnd()) { - QString line=ts.readLine(); - auto numbers=numRegex.globalMatch(line); - while(numbers.hasNext()) { - auto number=numbers.next(); - auto val=number.captured(0); - data.push_back(RegisterMap::Number<sdm_reg_t>(val)); + + if(filename.endsWith("hex",Qt::CaseInsensitive)) { + while(!ts.atEnd()) { + QString line=ts.readLine(); + auto val=line.toULong(nullptr,16); + data.push_back(static_cast<sdm_reg_t>(val)); + } + } + else { + QRegularExpression numRegex("\\d+"); + while(!ts.atEnd()) { + QString line=ts.readLine(); + auto numbers=numRegex.globalMatch(line); + while(numbers.hasNext()) { + auto number=numbers.next(); + auto val=number.captured(0); + data.push_back(RegisterMap::Number<sdm_reg_t>(val)); + } } } diff --git a/src/gui/sdmconsole/registerconfigdialog.h b/src/gui/sdmconsole/registerconfigdialog.h index a2297f6..22412d5 100644 --- a/src/gui/sdmconsole/registerconfigdialog.h +++ b/src/gui/sdmconsole/registerconfigdialog.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/gui/sdmconsole/registermapengine.cpp b/src/gui/sdmconsole/registermapengine.cpp index 90464ac..d4c04ce 100644 --- a/src/gui/sdmconsole/registermapengine.cpp +++ b/src/gui/sdmconsole/registermapengine.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * @@ -35,6 +35,7 @@ using namespace std::placeholders; RegisterMapEngine::RegisterMapEngine(LuaServer &l,QWidget *w): QTabWidget(w),_lua(l) { _handle=_lua.registerObject(*this); + _numMode=RegisterMap::AsIs; setMovable(true); tabBar()->hide(); pageNum=1; diff --git a/src/gui/sdmconsole/registermapengine.h b/src/gui/sdmconsole/registermapengine.h index 244ea32..7cd4921 100644 --- a/src/gui/sdmconsole/registermapengine.h +++ b/src/gui/sdmconsole/registermapengine.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/gui/sdmconsole/registermapitem.cpp b/src/gui/sdmconsole/registermapitem.cpp index d789330..7befd5c 100644 --- a/src/gui/sdmconsole/registermapitem.cpp +++ b/src/gui/sdmconsole/registermapitem.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/gui/sdmconsole/registermapitem.h b/src/gui/sdmconsole/registermapitem.h index 93e3a2d..08b15ed 100644 --- a/src/gui/sdmconsole/registermapitem.h +++ b/src/gui/sdmconsole/registermapitem.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/gui/sdmconsole/registermaptable.cpp b/src/gui/sdmconsole/registermaptable.cpp index f7777d8..4cdbce0 100644 --- a/src/gui/sdmconsole/registermaptable.cpp +++ b/src/gui/sdmconsole/registermaptable.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * @@ -53,7 +53,10 @@ void RegisterMapTable::insertRow(int i,const RegisterMap::RowData &data) { QTableWidget::insertRow(i); populateRow(i); - setRowData(i,data); + auto d(data); + d.addr.setMode(numMode); + d.data.setMode(numMode); + setRowData(i,d); RegisterMapItem *it=checkItem(i,currentColumn()); if(it) setCurrentItem(it); checkLastRow(); diff --git a/src/gui/sdmconsole/registermaptable.h b/src/gui/sdmconsole/registermaptable.h index d80f98d..4cbadd6 100644 --- a/src/gui/sdmconsole/registermaptable.h +++ b/src/gui/sdmconsole/registermaptable.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/gui/sdmconsole/registermaptypes.h b/src/gui/sdmconsole/registermaptypes.h index cb2cf77..f38f9b4 100644 --- a/src/gui/sdmconsole/registermaptypes.h +++ b/src/gui/sdmconsole/registermaptypes.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * @@ -75,8 +75,11 @@ namespace RegisterMap { QTextStream ts(&res); if(_mode==Mode::Hex) { + ts<<"0x"; ts.setIntegerBase(16); - ts.setNumberFlags(QTextStream::ShowBase|QTextStream::UppercaseDigits); + ts.setNumberFlags(QTextStream::UppercaseDigits); + ts.setFieldWidth(2*sizeof(T)); + ts.setPadChar('0'); ts<<_value; } else if(_mode==Mode::Unsigned) ts<<static_cast<unsigned_type>(_value); diff --git a/src/gui/sdmconsole/registermapwidget.cpp b/src/gui/sdmconsole/registermapwidget.cpp index 0011351..a887805 100644 --- a/src/gui/sdmconsole/registermapwidget.cpp +++ b/src/gui/sdmconsole/registermapwidget.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/gui/sdmconsole/registermapwidget.h b/src/gui/sdmconsole/registermapwidget.h index acfa5b5..a2ed6d3 100644 --- a/src/gui/sdmconsole/registermapwidget.h +++ b/src/gui/sdmconsole/registermapwidget.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/gui/sdmconsole/registermapworker.cpp b/src/gui/sdmconsole/registermapworker.cpp index 04ea327..9259950 100644 --- a/src/gui/sdmconsole/registermapworker.cpp +++ b/src/gui/sdmconsole/registermapworker.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/gui/sdmconsole/registermapworker.h b/src/gui/sdmconsole/registermapworker.h index d8f0f35..7745e50 100644 --- a/src/gui/sdmconsole/registermapworker.h +++ b/src/gui/sdmconsole/registermapworker.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/gui/sdmconsole/registermapxml.cpp b/src/gui/sdmconsole/registermapxml.cpp index 61d0c1c..bafcd89 100644 --- a/src/gui/sdmconsole/registermapxml.cpp +++ b/src/gui/sdmconsole/registermapxml.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/gui/sdmconsole/registermapxml.h b/src/gui/sdmconsole/registermapxml.h index 4e8e6e2..918ef5e 100644 --- a/src/gui/sdmconsole/registermapxml.h +++ b/src/gui/sdmconsole/registermapxml.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/gui/sdmconsole/sidebar.cpp b/src/gui/sdmconsole/sidebar.cpp index 91c9904..7822c9a 100644 --- a/src/gui/sdmconsole/sidebar.cpp +++ b/src/gui/sdmconsole/sidebar.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/gui/sdmconsole/sidebar.h b/src/gui/sdmconsole/sidebar.h index 0297186..09d0761 100644 --- a/src/gui/sdmconsole/sidebar.h +++ b/src/gui/sdmconsole/sidebar.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/gui/sdmconsole/streamreader.cpp b/src/gui/sdmconsole/streamreader.cpp index c5b8d78..159970b 100644 --- a/src/gui/sdmconsole/streamreader.cpp +++ b/src/gui/sdmconsole/streamreader.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/gui/sdmconsole/streamreader.h b/src/gui/sdmconsole/streamreader.h index ed38811..bfc0099 100644 --- a/src/gui/sdmconsole/streamreader.h +++ b/src/gui/sdmconsole/streamreader.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/gui/sdmconsole/streamselector.cpp b/src/gui/sdmconsole/streamselector.cpp index 7bb11d8..4386cac 100644 --- a/src/gui/sdmconsole/streamselector.cpp +++ b/src/gui/sdmconsole/streamselector.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/gui/sdmconsole/streamselector.h b/src/gui/sdmconsole/streamselector.h index bfc2384..cd489ef 100644 --- a/src/gui/sdmconsole/streamselector.h +++ b/src/gui/sdmconsole/streamselector.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/gui/sdmconsole/translations.cpp b/src/gui/sdmconsole/translations.cpp index b1fda59..7a49f47 100644 --- a/src/gui/sdmconsole/translations.cpp +++ b/src/gui/sdmconsole/translations.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/gui/sdmconsole/translations.h b/src/gui/sdmconsole/translations.h index e78933d..46a7e96 100644 --- a/src/gui/sdmconsole/translations.h +++ b/src/gui/sdmconsole/translations.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/gui/sdmconsole/translations/sdmconsole_ru.ts b/src/gui/sdmconsole/translations/sdmconsole_ru.ts index f8dfbaa..980253c 100644 --- a/src/gui/sdmconsole/translations/sdmconsole_ru.ts +++ b/src/gui/sdmconsole/translations/sdmconsole_ru.ts @@ -90,103 +90,107 @@ <context> <name>FifoPage</name> <message> - <location filename="../registerconfigdialog.cpp" line="381"/> + <location filename="../registerconfigdialog.cpp" line="382"/> <source>Register</source> <translation>Регистр</translation> </message> <message> - <location filename="../registerconfigdialog.cpp" line="404"/> + <location filename="../registerconfigdialog.cpp" line="405"/> <source>Fill</source> <translation>Заполнить</translation> </message> <message> - <location filename="../registerconfigdialog.cpp" line="408"/> - <source>Export to CSV</source> - <translation>Экспорт CSV</translation> - </message> - <message> - <location filename="../registerconfigdialog.cpp" line="411"/> - <source>Import from CSV</source> - <translation>Импорт CSV</translation> - </message> - <message> - <location filename="../registerconfigdialog.cpp" line="423"/> + <location filename="../registerconfigdialog.cpp" line="424"/> <source>Hexadecimal data</source> <translation>Шестнадцатеричные данные</translation> </message> <message> - <location filename="../registerconfigdialog.cpp" line="418"/> + <location filename="../registerconfigdialog.cpp" line="419"/> <source>Hexadecimal address</source> <translation>Шестнадцатеричный адрес</translation> </message> <message> - <location filename="../registerconfigdialog.cpp" line="374"/> + <location filename="../registerconfigdialog.cpp" line="375"/> <source>Base address: </source> <translation>Базовый адрес: </translation> </message> <message> - <location filename="../registerconfigdialog.cpp" line="394"/> + <location filename="../registerconfigdialog.cpp" line="395"/> <source>Data</source> <translation>Данные</translation> </message> <message> - <location filename="../registerconfigdialog.cpp" line="432"/> + <location filename="../registerconfigdialog.cpp" line="409"/> + <source>Export</source> + <translation>Экспорт</translation> + </message> + <message> + <location filename="../registerconfigdialog.cpp" line="412"/> + <source>Import</source> + <translation>Импорт</translation> + </message> + <message> + <location filename="../registerconfigdialog.cpp" line="433"/> <source>Optional ID: </source> <translation>Идентификатор (необязательно): </translation> </message> <message> - <location filename="../registerconfigdialog.cpp" line="471"/> + <location filename="../registerconfigdialog.cpp" line="472"/> <source>Value for new items: </source> <translation>Значение новых элементов: </translation> </message> <message> - <location filename="../registerconfigdialog.cpp" line="585"/> + <location filename="../registerconfigdialog.cpp" line="520"/> + <source>CSV files (*.csv);;Hex files (*.hex)</source> + <translation>Файлы CSV (*.csv);;Файлы Hex (*.hex)</translation> + </message> + <message> + <location filename="../registerconfigdialog.cpp" line="551"/> + <source>CSV files (*.csv);;Hex files (*.hex);;All files (*)</source> + <translation>Файлы CSV (*.csv);;Файлы Hex (*.hex);;Все файлы (*)</translation> + </message> + <message> + <location filename="../registerconfigdialog.cpp" line="601"/> <source>Address: </source> <translation>Адрес: </translation> </message> <message> - <location filename="../registerconfigdialog.cpp" line="626"/> + <location filename="../registerconfigdialog.cpp" line="642"/> <source>FIFO size is too large</source> <translation>Слишком большой размер FIFO</translation> </message> <message> - <location filename="../registerconfigdialog.cpp" line="460"/> - <location filename="../registerconfigdialog.cpp" line="476"/> - <location filename="../registerconfigdialog.cpp" line="501"/> + <location filename="../registerconfigdialog.cpp" line="461"/> + <location filename="../registerconfigdialog.cpp" line="477"/> + <location filename="../registerconfigdialog.cpp" line="502"/> <source>Bad value</source> <translation>Неправильное значение</translation> </message> <message> - <location filename="../registerconfigdialog.cpp" line="378"/> + <location filename="../registerconfigdialog.cpp" line="379"/> <source>Indirect addressing</source> <translation>Косвенная адресация</translation> </message> <message> - <location filename="../registerconfigdialog.cpp" line="386"/> + <location filename="../registerconfigdialog.cpp" line="387"/> <source>Value</source> <translation>Значение</translation> </message> <message> - <location filename="../registerconfigdialog.cpp" line="396"/> + <location filename="../registerconfigdialog.cpp" line="397"/> <source>Size: </source> <translation>Размер: </translation> </message> <message> - <location filename="../registerconfigdialog.cpp" line="400"/> + <location filename="../registerconfigdialog.cpp" line="401"/> <source>Apply size</source> <translation>Применить размер</translation> </message> <message> - <location filename="../registerconfigdialog.cpp" line="495"/> + <location filename="../registerconfigdialog.cpp" line="496"/> <source>Value: </source> <translation>Значение: </translation> </message> - <message> - <location filename="../registerconfigdialog.cpp" line="519"/> - <location filename="../registerconfigdialog.cpp" line="545"/> - <source>CSV files (*.csv);;All files (*)</source> - <translation>Файлы CSV (*.csv);;Все файлы (*)</translation> - </message> </context> <context> <name>LuaFormDialog</name> @@ -207,7 +211,7 @@ <context> <name>LuaProgressDialog</name> <message> - <location filename="../luadialogserver.cpp" line="251"/> + <location filename="../luadialogserver.cpp" line="253"/> <source>Operation in progress...</source> <translation>Операция в процессе выполнения...</translation> </message> @@ -365,39 +369,39 @@ </translation> </message> <message> - <location filename="../mainwindow.cpp" line="466"/> - <source><p><a href="info://doc/licenses/license.txt">Copyright and licensing information</a></p> + <location filename="../mainwindow.cpp" line="467"/> + <source><p><a href="info://doc/licenses/license.txt">Licensing information</a></p> </source> - <translation><p><a href="info://doc/licenses/license.txt">Информация об авторских правах и лицензировании</a></p> + <translation><p><a href="info://doc/licenses/license.txt">Информация о лицензировании</a></p> </translation> </message> <message> - <location filename="../mainwindow.cpp" line="503"/> + <location filename="../mainwindow.cpp" line="504"/> <source>Build information</source> <translation>Информация о сборке</translation> </message> <message> - <location filename="../mainwindow.cpp" line="507"/> + <location filename="../mainwindow.cpp" line="508"/> <source>Platform</source> <translation>Платформа</translation> </message> <message> - <location filename="../mainwindow.cpp" line="508"/> + <location filename="../mainwindow.cpp" line="509"/> <source>Compiler</source> <translation>Компилятор</translation> </message> <message> - <location filename="../mainwindow.cpp" line="510"/> + <location filename="../mainwindow.cpp" line="511"/> <source>Commit hash</source> <translation>Хеш коммита</translation> </message> <message> - <location filename="../mainwindow.cpp" line="511"/> + <location filename="../mainwindow.cpp" line="512"/> <source>Commit timestamp</source> <translation>Дата/время коммита</translation> </message> <message> - <location filename="../mainwindow.cpp" line="556"/> + <location filename="../mainwindow.cpp" line="557"/> <source>Press %1 to exit full screen mode</source> <translation>Нажмите %1 для выхода из полноэкранного режима</translation> </message> @@ -413,7 +417,7 @@ </message> <message> <location filename="../mainwindow.cpp" line="400"/> - <location filename="../mainwindow.cpp" line="475"/> + <location filename="../mainwindow.cpp" line="476"/> <source>Lua interpreter is busy</source> <translation>Интерпретатор Lua занят</translation> </message> @@ -514,33 +518,40 @@ </message> <message> <location filename="../mainwindow.cpp" line="464"/> - <source>Copyright © 2015-2021 by Microproject LLC + <source><p>Copyright © 2015-2022 Simple Device Model contributors</p> </source> - <translation>© ООО «Микропроект», 2015-2021 + <translation><p>© Авторы Simple Device Model, 2015-2022</p> </translation> </message> <message> - <location filename="../mainwindow.cpp" line="478"/> + <location filename="../mainwindow.cpp" line="466"/> + <source><p><a href="info://doc/contributors.txt">List of contributors</a></p> +</source> + <translation><p><a href="info://doc/contributors.txt">Перечень авторов</a></p> +</translation> + </message> + <message> + <location filename="../mainwindow.cpp" line="479"/> <source>Cannot open script file "</source> <translation>Невозможно открыть файл скрипта "</translation> </message> <message> - <location filename="../mainwindow.cpp" line="506"/> + <location filename="../mainwindow.cpp" line="507"/> <source>Version</source> <translation>Версия</translation> </message> <message> - <location filename="../mainwindow.cpp" line="509"/> + <location filename="../mainwindow.cpp" line="510"/> <source>Toolkit version</source> <translation>Версия инструментария</translation> </message> <message> - <location filename="../mainwindow.cpp" line="568"/> + <location filename="../mainwindow.cpp" line="569"/> <source>Lua status: Busy</source> <translation>Интерпретатор Lua: Занят</translation> </message> <message> - <location filename="../mainwindow.cpp" line="569"/> + <location filename="../mainwindow.cpp" line="570"/> <source>Lua status: Ready</source> <translation>Интерпретатор Lua: Готов</translation> </message> @@ -664,18 +675,18 @@ <location filename="../docpanels.cpp" line="625"/> <location filename="../mainwindow.cpp" line="396"/> <location filename="../mainwindow.cpp" line="422"/> - <location filename="../mainwindow.cpp" line="485"/> - <location filename="../mainwindow.cpp" line="518"/> + <location filename="../mainwindow.cpp" line="486"/> + <location filename="../mainwindow.cpp" line="519"/> <location filename="../openplugindialog.cpp" line="207"/> <location filename="../propertyeditor.cpp" line="138"/> <location filename="../propertyeditor.cpp" line="155"/> - <location filename="../registerconfigdialog.cpp" line="135"/> - <location filename="../registerconfigdialog.cpp" line="144"/> - <location filename="../registerconfigdialog.cpp" line="261"/> - <location filename="../registerconfigdialog.cpp" line="487"/> - <location filename="../registerconfigdialog.cpp" line="501"/> - <location filename="../registerconfigdialog.cpp" line="533"/> - <location filename="../registerconfigdialog.cpp" line="575"/> + <location filename="../registerconfigdialog.cpp" line="136"/> + <location filename="../registerconfigdialog.cpp" line="145"/> + <location filename="../registerconfigdialog.cpp" line="262"/> + <location filename="../registerconfigdialog.cpp" line="488"/> + <location filename="../registerconfigdialog.cpp" line="502"/> + <location filename="../registerconfigdialog.cpp" line="539"/> + <location filename="../registerconfigdialog.cpp" line="591"/> <location filename="../registermapwidget.cpp" line="167"/> <location filename="../registermapwidget.cpp" line="174"/> <location filename="../registermapwidget.cpp" line="190"/> @@ -805,37 +816,37 @@ <context> <name>RegisterActionPage</name> <message> - <location filename="../registerconfigdialog.cpp" line="644"/> + <location filename="../registerconfigdialog.cpp" line="660"/> <source>Skip group write</source> <translation>Пропускать групповую запись</translation> </message> <message> - <location filename="../registerconfigdialog.cpp" line="644"/> + <location filename="../registerconfigdialog.cpp" line="660"/> <source>Skip group read</source> <translation>Пропускать групповое чтение</translation> </message> <message> - <location filename="../registerconfigdialog.cpp" line="646"/> + <location filename="../registerconfigdialog.cpp" line="662"/> <source>Use custom action</source> <translation>Пользовательское действие</translation> </message> <message> - <location filename="../registerconfigdialog.cpp" line="714"/> + <location filename="../registerconfigdialog.cpp" line="730"/> <source>Show whitespace</source> <translation>Показывать пробелы</translation> </message> <message> - <location filename="../registerconfigdialog.cpp" line="720"/> + <location filename="../registerconfigdialog.cpp" line="736"/> <source>Wrap words</source> <translation>Перенос по словам</translation> </message> <message> - <location filename="../registerconfigdialog.cpp" line="727"/> + <location filename="../registerconfigdialog.cpp" line="743"/> <source>Font...</source> <translation>Шрифт...</translation> </message> <message> - <location filename="../registerconfigdialog.cpp" line="733"/> + <location filename="../registerconfigdialog.cpp" line="749"/> <source>Tab width: </source> <translation>Табуляция: </translation> </message> @@ -843,37 +854,37 @@ <context> <name>RegisterConfigDialog</name> <message> - <location filename="../registerconfigdialog.cpp" line="69"/> + <location filename="../registerconfigdialog.cpp" line="70"/> <source>Register properties</source> <translation>Свойства регистра</translation> </message> <message> - <location filename="../registerconfigdialog.cpp" line="82"/> + <location filename="../registerconfigdialog.cpp" line="83"/> <source>General</source> <translation>Общие</translation> </message> <message> - <location filename="../registerconfigdialog.cpp" line="86"/> + <location filename="../registerconfigdialog.cpp" line="87"/> <source>FIFO</source> <translation>FIFO</translation> </message> <message> - <location filename="../registerconfigdialog.cpp" line="90"/> + <location filename="../registerconfigdialog.cpp" line="91"/> <source>Memory</source> <translation>Память</translation> </message> <message> - <location filename="../registerconfigdialog.cpp" line="94"/> + <location filename="../registerconfigdialog.cpp" line="95"/> <source>Write action</source> <translation>Действие записи</translation> </message> <message> - <location filename="../registerconfigdialog.cpp" line="96"/> + <location filename="../registerconfigdialog.cpp" line="97"/> <source>Read action</source> <translation>Действие чтения</translation> </message> <message> - <location filename="../registerconfigdialog.cpp" line="150"/> + <location filename="../registerconfigdialog.cpp" line="151"/> <source>Discard unsaved changes?</source> <translation>Отказаться от несохранённых изменений?</translation> </message> @@ -881,19 +892,19 @@ <context> <name>RegisterMapEngine</name> <message> - <location filename="../registermapengine.cpp" line="54"/> + <location filename="../registermapengine.cpp" line="55"/> <source>Page %1</source> <translation>Страница %1</translation> </message> <message> - <location filename="../registermapengine.cpp" line="72"/> - <location filename="../registermapengine.cpp" line="85"/> - <location filename="../registermapengine.cpp" line="90"/> + <location filename="../registermapengine.cpp" line="73"/> + <location filename="../registermapengine.cpp" line="86"/> + <location filename="../registermapengine.cpp" line="91"/> <source>RegisterMapEngine: page doesn't exist</source> <translation>RegisterMapEngine: страница не существует</translation> </message> <message> - <location filename="../registermapengine.cpp" line="171"/> + <location filename="../registermapengine.cpp" line="172"/> <source>Page not selected</source> <translation>Страница не выбрана</translation> </message> @@ -916,12 +927,12 @@ <translation>Значение</translation> </message> <message> - <location filename="../registermaptable.cpp" line="70"/> + <location filename="../registermaptable.cpp" line="73"/> <source>RegisterMapTable: bad row index</source> <translation>RegisterMapTable: неправильный номер строки</translation> </message> <message> - <location filename="../registermaptable.cpp" line="99"/> + <location filename="../registermaptable.cpp" line="102"/> <source>Item doesn't exist</source> <translation>Элемент не существует</translation> </message> @@ -1201,77 +1212,77 @@ <context> <name>RegisterWidgetPage</name> <message> - <location filename="../registerconfigdialog.cpp" line="185"/> + <location filename="../registerconfigdialog.cpp" line="186"/> <source>Text input</source> <translation>Текстовое поле ввода</translation> </message> <message> - <location filename="../registerconfigdialog.cpp" line="187"/> + <location filename="../registerconfigdialog.cpp" line="188"/> <source>Drop-down list (uneditable)</source> <translation>Выпадающий список (нередактируемый)</translation> </message> <message> - <location filename="../registerconfigdialog.cpp" line="189"/> + <location filename="../registerconfigdialog.cpp" line="190"/> <source>Combobox (editable)</source> <translation>Комбобокс (редактируемый)</translation> </message> <message> - <location filename="../registerconfigdialog.cpp" line="191"/> + <location filename="../registerconfigdialog.cpp" line="192"/> <source>Push button (write-only)</source> <translation>Кнопка (только запись)</translation> </message> <message> - <location filename="../registerconfigdialog.cpp" line="202"/> + <location filename="../registerconfigdialog.cpp" line="203"/> <source>Option</source> <translation>Параметр</translation> </message> <message> - <location filename="../registerconfigdialog.cpp" line="202"/> + <location filename="../registerconfigdialog.cpp" line="203"/> <source>Value</source> <translation>Значение</translation> </message> <message> - <location filename="../registerconfigdialog.cpp" line="215"/> + <location filename="../registerconfigdialog.cpp" line="216"/> <source>Add</source> <translation>Добавить</translation> </message> <message> - <location filename="../registerconfigdialog.cpp" line="217"/> + <location filename="../registerconfigdialog.cpp" line="218"/> <source>Remove</source> <translation>Удалить</translation> </message> <message> - <location filename="../registerconfigdialog.cpp" line="219"/> + <location filename="../registerconfigdialog.cpp" line="220"/> <source>Up</source> <translation>Выше</translation> </message> <message> - <location filename="../registerconfigdialog.cpp" line="221"/> + <location filename="../registerconfigdialog.cpp" line="222"/> <source>Down</source> <translation>Ниже</translation> </message> <message> - <location filename="../registerconfigdialog.cpp" line="242"/> + <location filename="../registerconfigdialog.cpp" line="243"/> <source>Widget type:</source> <translation>Тип виджета:</translation> </message> <message> - <location filename="../registerconfigdialog.cpp" line="251"/> + <location filename="../registerconfigdialog.cpp" line="252"/> <source>Optional ID: </source> <translation>Идентификатор (необязательно): </translation> </message> <message> - <location filename="../registerconfigdialog.cpp" line="262"/> + <location filename="../registerconfigdialog.cpp" line="263"/> <source>Push button widget can only have one option</source> <translation>Виджет типа «кнопка» может иметь только одну опцию</translation> </message> <message> - <location filename="../registerconfigdialog.cpp" line="311"/> + <location filename="../registerconfigdialog.cpp" line="312"/> <source>At least one option must be present</source> <translation>Должна присутствовать хотя бы одна опция</translation> </message> <message> - <location filename="../registerconfigdialog.cpp" line="339"/> + <location filename="../registerconfigdialog.cpp" line="340"/> <source>Row %1: bad option or value</source> <translation>Строка %1: неправильный параметр или значение</translation> </message> diff --git a/src/luabridge/include/luabridge.h b/src/luabridge/include/luabridge.h index 876004b..4646971 100644 --- a/src/luabridge/include/luabridge.h +++ b/src/luabridge/include/luabridge.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * @@ -88,6 +88,7 @@ class LuaBridge : public LuaCallbackObject,public TreeItem { virtual std::function<int(LuaServer&)> enumerateLuaMethods(int i,std::string &strName,std::vector<LuaValue> &upvalues) override; int LuaMethod_openplugin(LuaServer &lua); int LuaMethod_plugins(LuaServer &lua); + int LuaMethod_findobject(LuaServer &lua); int LuaMethod_info(LuaServer &lua); int LuaMethod_path(LuaServer &lua); int LuaMethod_lock(LuaServer &lua); @@ -96,6 +97,7 @@ class LuaBridge : public LuaCallbackObject,public TreeItem { static int LuaMethod_time(LuaServer &lua); private: static void lockFinalizer(callback_mutex_t *m,const std::shared_ptr<int> &cnt); + static TreeItem *findObject(TreeItem *root,const std::string &name,const std::string &type); }; class SDMPluginLua : public TreeItem,public SDMPlugin,public LuaCallbackObject,private BridgePropertyManager { diff --git a/src/luabridge/include/luatextcodec.h b/src/luabridge/include/luatextcodec.h index 3ab5570..3409cf2 100644 --- a/src/luabridge/include/luatextcodec.h +++ b/src/luabridge/include/luatextcodec.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/luabridge/include/treeitem.h b/src/luabridge/include/treeitem.h index b642680..c96a6f1 100644 --- a/src/luabridge/include/treeitem.h +++ b/src/luabridge/include/treeitem.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/luabridge/src/luabridge.cpp b/src/luabridge/src/luabridge.cpp index aad67ee..e8c32a1 100644 --- a/src/luabridge/src/luabridge.cpp +++ b/src/luabridge/src/luabridge.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * @@ -169,27 +169,40 @@ const LuaValue &LuaBridge::luaHandle() { } SDMPluginLua &LuaBridge::addPluginItem(const std::string &path) { - SDMPluginLua &plugin=insertChild(factory().makePlugin(_lua)); + auto plugin=factory().makePlugin(_lua); for(auto it=_pluginSearchPath.cbegin();it!=_pluginSearchPath.cend();it++) { - plugin.addSearchPath(*it); + plugin->addSearchPath(*it); } try { - plugin.open(path); + plugin->open(path); } - catch(std::exception &) { - removeChild(plugin.pos()); + catch(...) { + delete plugin; throw; } - return plugin; +// Check whether the plugin is already opened + for(std::size_t i=0;i<children();i++) { + auto p=dynamic_cast<SDMPluginLua*>(&child(i)); + if(p&&*p) { + auto oldPath=Path(p->path()).toAbsolute(); + auto newPath=Path(plugin->path()).toAbsolute(); + if(oldPath==newPath) { + delete plugin; + return *p; + } + } + } + + return insertChild(plugin); } LuaValue LuaBridge::infoTag(const std::string &name) const { auto it=_infoTags.find(name); if(it!=_infoTags.end()) return it->second; - return LuaValue(); + throw std::runtime_error("Unrecognized argument: \""+name+"\""); } void LuaBridge::setInfoTag(const std::string &name,const LuaValue &value) { @@ -205,12 +218,15 @@ std::function<int(LuaServer&)> LuaBridge::enumerateLuaMethods(int i,std::string strName="plugins"; return std::bind(&LuaBridge::LuaMethod_plugins,this,_1); case 2: + strName="findobject"; + return std::bind(&LuaBridge::LuaMethod_findobject,this,_1); + case 3: strName="info"; return std::bind(&LuaBridge::LuaMethod_info,this,_1); - case 3: + case 4: strName="path"; return std::bind(&LuaBridge::LuaMethod_path,this,_1); - case 4: + case 5: strName="lock"; return std::bind(&LuaBridge::LuaMethod_lock,this,_1); default: @@ -239,6 +255,38 @@ int LuaBridge::LuaMethod_plugins(LuaServer &lua) { return 1; } +int LuaBridge::LuaMethod_findobject(LuaServer &lua) { + if(lua.argc()!=1&&lua.argc()!=2) throw std::runtime_error("findobject() method takes 1 or 2 arguments"); + std::string name=lua.argv(0).toString(); + std::string type; + if(lua.argc()>=2) { + type=lua.argv(1).toString(); + if(type!="Plugin"&&type!="Device"&&type!="Channel"&&type!="Source") + throw std::runtime_error("Incorrect type \""+type+"\""); + } + + LuaValue handle; + + auto obj=findObject(this,name,type); + if(obj) { + if(auto plugin=dynamic_cast<SDMPluginLua*>(obj)) { + handle=plugin->luaHandle(); + } + else if(auto device=dynamic_cast<SDMDeviceLua*>(obj)) { + handle=device->luaHandle(); + } + else if(auto channel=dynamic_cast<SDMChannelLua*>(obj)) { + handle=channel->luaHandle(); + } + else if(auto source=dynamic_cast<SDMSourceLua*>(obj)) { + handle=source->luaHandle(); + } + } + + lua.pushValue(handle); + return 1; +} + int LuaBridge::LuaMethod_info(LuaServer &lua) { if(lua.argc()!=1) throw std::runtime_error("info() method takes 1 argument"); lua.pushValue(infoTag(lua.argv(0).toString())); @@ -344,6 +392,46 @@ void LuaBridge::lockFinalizer(callback_mutex_t *m,const std::shared_ptr<int> &cn } } +TreeItem *LuaBridge::findObject(TreeItem *root,const std::string &name,const std::string &type) { + if(!root) return nullptr; + + if(type=="Plugin"||type=="") { + auto r=dynamic_cast<SDMPluginLua*>(root); + try { + if(r&&r->getProperty("Name")==name) return root; + } + catch(std::exception &) {} + } + if(type=="Device"||type=="") { + auto r=dynamic_cast<SDMDeviceLua*>(root); + try { + if(r&&r->getProperty("Name")==name) return root; + } + catch(std::exception &) {} + } + if(type=="Channel"||type=="") { + auto r=dynamic_cast<SDMChannelLua*>(root); + try { + if(r&&r->getProperty("Name")==name) return root; + } + catch(std::exception &) {} + } + if(type=="Source"||type=="") { + auto r=dynamic_cast<SDMSourceLua*>(root); + try { + if(r&&r->getProperty("Name")==name) return root; + } + catch(std::exception &) {} + } + + for(std::size_t i=0;i<root->children();i++) { + auto r=findObject(&root->child(i),name,type); + if(r) return r; + } + + return nullptr; +} + /* * SDMPluginLua members */ @@ -383,7 +471,7 @@ SDMDeviceLua &SDMPluginLua::addDeviceItem(int iDev) { try { device->open(*this,iDev); } - catch(std::exception &) { + catch(...) { delete device; throw; } @@ -544,7 +632,7 @@ SDMChannelLua &SDMDeviceLua::addChannelItem(int iChannel) { try { channel->open(*this,iChannel); } - catch(std::exception &) { + catch(...) { delete channel; throw; } @@ -578,7 +666,7 @@ SDMSourceLua &SDMDeviceLua::addSourceItem(int iSource) { try { source->open(*this,iSource); } - catch(std::exception &) { + catch(...) { delete source; throw; } diff --git a/src/luabridge/src/luatextcodec.cpp b/src/luabridge/src/luatextcodec.cpp index f0e00fc..6c18a43 100644 --- a/src/luabridge/src/luatextcodec.cpp +++ b/src/luabridge/src/luatextcodec.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/luamodules/luadfic/arraybuffer.h b/src/luamodules/luadfic/arraybuffer.h index 763cd1d..c28e4d5 100644 --- a/src/luamodules/luadfic/arraybuffer.h +++ b/src/luamodules/luadfic/arraybuffer.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/luamodules/luadfic/compoundtype.cpp b/src/luamodules/luadfic/compoundtype.cpp index 14b136b..ec98505 100644 --- a/src/luamodules/luadfic/compoundtype.cpp +++ b/src/luamodules/luadfic/compoundtype.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/luamodules/luadfic/compoundtype.h b/src/luamodules/luadfic/compoundtype.h index c21545c..d60f454 100644 --- a/src/luamodules/luadfic/compoundtype.h +++ b/src/luamodules/luadfic/compoundtype.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/luamodules/luadfic/dfic/dfic.cpp b/src/luamodules/luadfic/dfic/dfic.cpp index d55bc29..e0150c6 100644 --- a/src/luamodules/luadfic/dfic/dfic.cpp +++ b/src/luamodules/luadfic/dfic/dfic.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/luamodules/luadfic/dfic/dfic.h b/src/luamodules/luadfic/dfic/dfic.h index 1f5bed7..50d7a2b 100644 --- a/src/luamodules/luadfic/dfic/dfic.h +++ b/src/luamodules/luadfic/dfic/dfic.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/luamodules/luadfic/luadfic.cpp b/src/luamodules/luadfic/luadfic.cpp index f7a0ef3..89783f6 100644 --- a/src/luamodules/luadfic/luadfic.cpp +++ b/src/luamodules/luadfic/luadfic.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/luamodules/luadfic/luadfic.h b/src/luamodules/luadfic/luadfic.h index 96a40c8..3dd39a0 100644 --- a/src/luamodules/luadfic/luadfic.h +++ b/src/luamodules/luadfic/luadfic.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/luamodules/luaipsockets/luaipsockets.cpp b/src/luamodules/luaipsockets/luaipsockets.cpp index 83a811a..a880431 100644 --- a/src/luamodules/luaipsockets/luaipsockets.cpp +++ b/src/luamodules/luaipsockets/luaipsockets.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/luamodules/luaipsockets/luaipsockets.h b/src/luamodules/luaipsockets/luaipsockets.h index 33128ac..7cdba4f 100644 --- a/src/luamodules/luaipsockets/luaipsockets.h +++ b/src/luamodules/luaipsockets/luaipsockets.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/luamodules/luart/luart.cpp b/src/luamodules/luart/luart.cpp index 6fa93d6..a7c4e76 100644 --- a/src/luamodules/luart/luart.cpp +++ b/src/luamodules/luart/luart.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/luamodules/luart/luart.h b/src/luamodules/luart/luart.h index 99b9db2..9d0fc80 100644 --- a/src/luamodules/luart/luart.h +++ b/src/luamodules/luart/luart.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/luaserver/include/luacallbackobject.h b/src/luaserver/include/luacallbackobject.h index 40f3334..de0c997 100644 --- a/src/luaserver/include/luacallbackobject.h +++ b/src/luaserver/include/luacallbackobject.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/luaserver/include/luaconsole.h b/src/luaserver/include/luaconsole.h index 8cb1bf0..dc9abf6 100644 --- a/src/luaserver/include/luaconsole.h +++ b/src/luaserver/include/luaconsole.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/luaserver/include/luaiterator.h b/src/luaserver/include/luaiterator.h index f53a445..35276f7 100644 --- a/src/luaserver/include/luaiterator.h +++ b/src/luaserver/include/luaiterator.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/luaserver/include/luaserver.h b/src/luaserver/include/luaserver.h index 00cf05d..04d0e15 100644 --- a/src/luaserver/include/luaserver.h +++ b/src/luaserver/include/luaserver.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/luaserver/include/luastreamreader.h b/src/luaserver/include/luastreamreader.h index a86c657..90210fd 100644 --- a/src/luaserver/include/luastreamreader.h +++ b/src/luaserver/include/luastreamreader.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/luaserver/include/luavalue.h b/src/luaserver/include/luavalue.h index f145ca4..04ba6e5 100644 --- a/src/luaserver/include/luavalue.h +++ b/src/luaserver/include/luavalue.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/luaserver/src/luacallbackobject.cpp b/src/luaserver/src/luacallbackobject.cpp index 9af1ce7..4d03fdc 100644 --- a/src/luaserver/src/luacallbackobject.cpp +++ b/src/luaserver/src/luacallbackobject.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/luaserver/src/luaconsole.cpp b/src/luaserver/src/luaconsole.cpp index 2cde858..3733202 100644 --- a/src/luaserver/src/luaconsole.cpp +++ b/src/luaserver/src/luaconsole.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/luaserver/src/luaiterator.cpp b/src/luaserver/src/luaiterator.cpp index 1091a12..d6ac01e 100644 --- a/src/luaserver/src/luaiterator.cpp +++ b/src/luaserver/src/luaiterator.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/luaserver/src/luaserver.cpp b/src/luaserver/src/luaserver.cpp index fbcdd32..c2e2405 100644 --- a/src/luaserver/src/luaserver.cpp +++ b/src/luaserver/src/luaserver.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/luaserver/src/luastreamreader.cpp b/src/luaserver/src/luastreamreader.cpp index 33f2cea..2cca1ef 100644 --- a/src/luaserver/src/luastreamreader.cpp +++ b/src/luaserver/src/luastreamreader.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/luaserver/src/luavalue.cpp b/src/luaserver/src/luavalue.cpp index 34d54f3..69d93f8 100644 --- a/src/luaserver/src/luavalue.cpp +++ b/src/luaserver/src/luavalue.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/luaserver/src/stackguard.cpp b/src/luaserver/src/stackguard.cpp index c476701..faaf190 100644 --- a/src/luaserver/src/stackguard.cpp +++ b/src/luaserver/src/stackguard.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/sdk/api/include/sdmapi.h b/src/sdk/api/include/sdmapi.h index 360dc96..d37da89 100644 --- a/src/sdk/api/include/sdmapi.h +++ b/src/sdk/api/include/sdmapi.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework SDK. * diff --git a/src/sdk/api/include/sdmtypes.h b/src/sdk/api/include/sdmtypes.h index 9f8e6b2..d2d345f 100644 --- a/src/sdk/api/include/sdmtypes.h +++ b/src/sdk/api/include/sdmtypes.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework SDK. * diff --git a/src/sdk/examples/readme.txt b/src/sdk/examples/readme.txt index 784013e..a0e4e40 100644 --- a/src/sdk/examples/readme.txt +++ b/src/sdk/examples/readme.txt @@ -1,11 +1,12 @@ This directory contains example SDM plugins. -"simpleplugin" is written in C and demonstrates only basic SDM features. -Register and data streams are simulated in software. +"simpleplugin" (C) demonstrates basic SDM features. Registers and data streams +are simulated in software. -"uartdemo" communicates with an Arduino Uno board over the serial port and -acts like a virtual oscilloscope. It is written in C++. See the corresponding -readme for details. +"uartdemo" (C++) communicates with an Arduino Uno board over the serial port and +acts like a virtual oscilloscope. It showcases address space access, advanced +register map features and stream data acquisition. See the corresponding readme +for details. -"testplugin" is a software simulated test plugin used by the SDM test suite. -It is also written in C++. +"testplugin" (C++) is a software simulated test plugin used by the SDM test +suite. It does not require any special hardware. diff --git a/src/sdk/examples/simpleplugin/simpleplugin.c b/src/sdk/examples/simpleplugin/simpleplugin.c index 322e551..e920e5a 100644 --- a/src/sdk/examples/simpleplugin/simpleplugin.c +++ b/src/sdk/examples/simpleplugin/simpleplugin.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework SDK. * diff --git a/src/sdk/examples/testplugin/testplugin.cpp b/src/sdk/examples/testplugin/testplugin.cpp index 4fdfa8e..840e992 100644 --- a/src/sdk/examples/testplugin/testplugin.cpp +++ b/src/sdk/examples/testplugin/testplugin.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework SDK. * @@ -49,7 +49,7 @@ SDMAbstractPlugin *SDMAbstractPlugin::instance() { TestPlugin::TestPlugin() { addConstProperty("Name","Software simulated test"); - addConstProperty("Vendor","Microproject LLC"); + addConstProperty("Vendor","Simple Device Model"); addListItem("Devices","Test device 1"); addListItem("Devices","Test device 2"); diff --git a/src/sdk/examples/testplugin/testplugin.h b/src/sdk/examples/testplugin/testplugin.h index a8ade4d..847045f 100644 --- a/src/sdk/examples/testplugin/testplugin.h +++ b/src/sdk/examples/testplugin/testplugin.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework SDK. * diff --git a/src/sdk/examples/testplugin/videoframe.cpp b/src/sdk/examples/testplugin/videoframe.cpp index b3da200..8c2dc3a 100644 --- a/src/sdk/examples/testplugin/videoframe.cpp +++ b/src/sdk/examples/testplugin/videoframe.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework SDK. * diff --git a/src/sdk/examples/testplugin/videoframe.h b/src/sdk/examples/testplugin/videoframe.h index 0740256..434b181 100644 --- a/src/sdk/examples/testplugin/videoframe.h +++ b/src/sdk/examples/testplugin/videoframe.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework SDK. * diff --git a/src/sdk/examples/uartdemo/uartdemo.cpp b/src/sdk/examples/uartdemo/uartdemo.cpp index f321832..26c014c 100644 --- a/src/sdk/examples/uartdemo/uartdemo.cpp +++ b/src/sdk/examples/uartdemo/uartdemo.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework SDK. * @@ -54,7 +54,7 @@ SDMAbstractPlugin *SDMAbstractPlugin::instance() { UartPlugin::UartPlugin() { addConstProperty("Name","UART demo"); - addConstProperty("Vendor","Microproject LLC"); + addConstProperty("Vendor","Simple Device Model"); addListItem("Devices","Arduino Uno"); } diff --git a/src/sdk/examples/uartdemo/uartdemo.h b/src/sdk/examples/uartdemo/uartdemo.h index e160651..d213b4d 100644 --- a/src/sdk/examples/uartdemo/uartdemo.h +++ b/src/sdk/examples/uartdemo/uartdemo.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework SDK. * diff --git a/src/sdk/lib/ipsockets/include/ipsocket.h b/src/sdk/lib/ipsockets/include/ipsocket.h index 6f57775..31d9bd9 100644 --- a/src/sdk/lib/ipsockets/include/ipsocket.h +++ b/src/sdk/lib/ipsockets/include/ipsocket.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework SDK. * diff --git a/src/sdk/lib/ipsockets/src/ipsocket.cpp b/src/sdk/lib/ipsockets/src/ipsocket.cpp index 593b37a..8bfaf0c 100644 --- a/src/sdk/lib/ipsockets/src/ipsocket.cpp +++ b/src/sdk/lib/ipsockets/src/ipsocket.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework SDK. * diff --git a/src/sdk/lib/pluginprovider/include/sdmproperty.h b/src/sdk/lib/pluginprovider/include/sdmproperty.h index 77ad557..c4de7ba 100644 --- a/src/sdk/lib/pluginprovider/include/sdmproperty.h +++ b/src/sdk/lib/pluginprovider/include/sdmproperty.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework SDK. * diff --git a/src/sdk/lib/pluginprovider/include/sdmprovider.h b/src/sdk/lib/pluginprovider/include/sdmprovider.h index 84fcba3..a8fab11 100644 --- a/src/sdk/lib/pluginprovider/include/sdmprovider.h +++ b/src/sdk/lib/pluginprovider/include/sdmprovider.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework SDK. * diff --git a/src/sdk/lib/pluginprovider/src/sdmexport.cpp b/src/sdk/lib/pluginprovider/src/sdmexport.cpp index 48e606a..487ac1c 100644 --- a/src/sdk/lib/pluginprovider/src/sdmexport.cpp +++ b/src/sdk/lib/pluginprovider/src/sdmexport.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework SDK. * diff --git a/src/sdk/lib/pluginprovider/src/sdmproperty.cpp b/src/sdk/lib/pluginprovider/src/sdmproperty.cpp index 7762ded..6636820 100644 --- a/src/sdk/lib/pluginprovider/src/sdmproperty.cpp +++ b/src/sdk/lib/pluginprovider/src/sdmproperty.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework SDK. * diff --git a/src/sdk/lib/pluginprovider/src/sdmprovider.cpp b/src/sdk/lib/pluginprovider/src/sdmprovider.cpp index c50e0e1..06a0680 100644 --- a/src/sdk/lib/pluginprovider/src/sdmprovider.cpp +++ b/src/sdk/lib/pluginprovider/src/sdmprovider.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework SDK. * diff --git a/src/sdk/lib/uart/include/uart.h b/src/sdk/lib/uart/include/uart.h index c59fa7c..2877f13 100644 --- a/src/sdk/lib/uart/include/uart.h +++ b/src/sdk/lib/uart/include/uart.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework SDK. * diff --git a/src/sdk/lib/uart/include/uartimpl.h b/src/sdk/lib/uart/include/uartimpl.h index d43cf64..087e966 100644 --- a/src/sdk/lib/uart/include/uartimpl.h +++ b/src/sdk/lib/uart/include/uartimpl.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework SDK. * diff --git a/src/sdk/lib/uart/src/posix/uartimpl.cpp b/src/sdk/lib/uart/src/posix/uartimpl.cpp index 6c2ed0a..9fd0273 100644 --- a/src/sdk/lib/uart/src/posix/uartimpl.cpp +++ b/src/sdk/lib/uart/src/posix/uartimpl.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework SDK. * diff --git a/src/sdk/lib/uart/src/uart.cpp b/src/sdk/lib/uart/src/uart.cpp index dd2ec92..1caf619 100644 --- a/src/sdk/lib/uart/src/uart.cpp +++ b/src/sdk/lib/uart/src/uart.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework SDK. * diff --git a/src/sdk/lib/uart/src/win32/uartimpl.cpp b/src/sdk/lib/uart/src/win32/uartimpl.cpp index d9d14d6..6bf62c4 100644 --- a/src/sdk/lib/uart/src/win32/uartimpl.cpp +++ b/src/sdk/lib/uart/src/win32/uartimpl.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework SDK. * diff --git a/src/sdmhost/main.cpp b/src/sdmhost/main.cpp index a63f8e0..5741e97 100644 --- a/src/sdmhost/main.cpp +++ b/src/sdmhost/main.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * @@ -69,7 +69,7 @@ try #endif { utf8cerr()<<"sdmhost "<<Config::version()<<" ("<<Config::architecture()<<")"<<endl; - utf8cerr()<<"Copyright (c) 2015-2021 by Microproject LLC"<<endl; + utf8cerr()<<"Copyright (c) 2015-2022 Simple Device Model contributors"<<endl; utf8cerr()<<"This program comes with ABSOLUTELY NO WARRANTY."<<endl; utf8cerr()<<"This is free software, and you are welcome to redistribute it under certain conditions; see license.txt for details."<<endl; diff --git a/src/sdmhost/textconsole.cpp b/src/sdmhost/textconsole.cpp index 07f1ad8..99db22a 100644 --- a/src/sdmhost/textconsole.cpp +++ b/src/sdmhost/textconsole.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/sdmhost/textconsole.h b/src/sdmhost/textconsole.h index 85e6ed7..65d2546 100644 --- a/src/sdmhost/textconsole.h +++ b/src/sdmhost/textconsole.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/sdmplug/include/sdmplug.h b/src/sdmplug/include/sdmplug.h index b64dafb..8c3ab28 100644 --- a/src/sdmplug/include/sdmplug.h +++ b/src/sdmplug/include/sdmplug.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/sdmplug/src/sdmchannel.cpp b/src/sdmplug/src/sdmchannel.cpp index 8f50999..0d57f80 100644 --- a/src/sdmplug/src/sdmchannel.cpp +++ b/src/sdmplug/src/sdmchannel.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/sdmplug/src/sdmdevice.cpp b/src/sdmplug/src/sdmdevice.cpp index 6c2ba29..f8f4ad3 100644 --- a/src/sdmplug/src/sdmdevice.cpp +++ b/src/sdmplug/src/sdmdevice.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/sdmplug/src/sdmplugbase.cpp b/src/sdmplug/src/sdmplugbase.cpp index c9785a9..c68b646 100644 --- a/src/sdmplug/src/sdmplugbase.cpp +++ b/src/sdmplug/src/sdmplugbase.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/sdmplug/src/sdmplugin.cpp b/src/sdmplug/src/sdmplugin.cpp index 59f5d8e..5f8857d 100644 --- a/src/sdmplug/src/sdmplugin.cpp +++ b/src/sdmplug/src/sdmplugin.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/sdmplug/src/sdmsource.cpp b/src/sdmplug/src/sdmsource.cpp index 41ee54f..fc5f9ef 100644 --- a/src/sdmplug/src/sdmsource.cpp +++ b/src/sdmplug/src/sdmsource.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/tests/functional/common/testcommon.cpp b/src/tests/functional/common/testcommon.cpp index 23d9fdc..4d0960a 100644 --- a/src/tests/functional/common/testcommon.cpp +++ b/src/tests/functional/common/testcommon.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/tests/functional/common/testcommon.h b/src/tests/functional/common/testcommon.h index 6adccb5..3dc22c9 100644 --- a/src/tests/functional/common/testcommon.h +++ b/src/tests/functional/common/testcommon.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/tests/functional/test005/runtest.lua.in b/src/tests/functional/test005/runtest.lua.in index 2f90ccc..93eb910 100644 --- a/src/tests/functional/test005/runtest.lua.in +++ b/src/tests/functional/test005/runtest.lua.in @@ -25,7 +25,7 @@ for k,v in pairs(props) do end assert(rprops["Name"]=="Software simulated test") -assert(rprops["Vendor"]=="Microproject LLC") +assert(rprops["Vendor"]=="Simple Device Model") assert(rprops["Verbosity"]=="Default") plugin.Verbosity="Quiet" -- set property using __newindex metamethod @@ -50,6 +50,8 @@ print("[2] Check that device can be opened and connected") dev=plugin.opendevice(0) assert(dev.Name=="Test device 1") assert(dev.id()==0) +found=sdm.findobject("Test device 1") +assert(found.Name=="Test device 1") print("Device opened, getting list of connection parameters") diff --git a/src/u8e/include/u8ecodec.h b/src/u8e/include/u8ecodec.h index aa8c946..4f392c3 100644 --- a/src/u8e/include/u8ecodec.h +++ b/src/u8e/include/u8ecodec.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/u8e/include/u8eenv.h b/src/u8e/include/u8eenv.h index e203210..6a0d45d 100644 --- a/src/u8e/include/u8eenv.h +++ b/src/u8e/include/u8eenv.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/u8e/include/u8efile.h b/src/u8e/include/u8efile.h index d88b32d..d4216a7 100644 --- a/src/u8e/include/u8efile.h +++ b/src/u8e/include/u8efile.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/u8e/include/u8eio.h b/src/u8e/include/u8eio.h index de8ec24..10dde5e 100644 --- a/src/u8e/include/u8eio.h +++ b/src/u8e/include/u8eio.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/u8e/src/posix/u8ecodec.cpp b/src/u8e/src/posix/u8ecodec.cpp index d48c995..634efff 100644 --- a/src/u8e/src/posix/u8ecodec.cpp +++ b/src/u8e/src/posix/u8ecodec.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/u8e/src/posix/u8eio.cpp b/src/u8e/src/posix/u8eio.cpp index 2327f2e..01a9e3f 100644 --- a/src/u8e/src/posix/u8eio.cpp +++ b/src/u8e/src/posix/u8eio.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/u8e/src/u8eenv.cpp b/src/u8e/src/u8eenv.cpp index 2b746ac..bf98340 100644 --- a/src/u8e/src/u8eenv.cpp +++ b/src/u8e/src/u8eenv.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/u8e/src/u8efile.cpp b/src/u8e/src/u8efile.cpp index d8e0223..43d0592 100644 --- a/src/u8e/src/u8efile.cpp +++ b/src/u8e/src/u8efile.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/u8e/src/win32/u8ecodec.cpp b/src/u8e/src/win32/u8ecodec.cpp index f578fca..c9b2f0d 100644 --- a/src/u8e/src/win32/u8ecodec.cpp +++ b/src/u8e/src/win32/u8ecodec.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/u8e/src/win32/u8eio.cpp b/src/u8e/src/win32/u8eio.cpp index c7bebbd..396388b 100644 --- a/src/u8e/src/win32/u8eio.cpp +++ b/src/u8e/src/win32/u8eio.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/utils/include/abstractconsole.h b/src/utils/include/abstractconsole.h index ae8955c..9e941bd 100644 --- a/src/utils/include/abstractconsole.h +++ b/src/utils/include/abstractconsole.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/utils/include/csvparser.h b/src/utils/include/csvparser.h index 45b6990..fa32f08 100644 --- a/src/utils/include/csvparser.h +++ b/src/utils/include/csvparser.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/utils/include/dirutil.h b/src/utils/include/dirutil.h index 26a1ed2..1491898 100644 --- a/src/utils/include/dirutil.h +++ b/src/utils/include/dirutil.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * @@ -52,7 +52,6 @@ class Path { // Counts number of downward components in the path // root directory is counted as a distinct component, ".." - as (-1) int count() const; - std::string operator[](std::size_t index) {return path[index];} static char sep(); static Path exePath(); diff --git a/src/utils/include/ioredirector.h b/src/utils/include/ioredirector.h index 66b9d4f..ecce530 100644 --- a/src/utils/include/ioredirector.h +++ b/src/utils/include/ioredirector.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/utils/include/loadablemodule.h b/src/utils/include/loadablemodule.h index 77e9f4d..863579b 100644 --- a/src/utils/include/loadablemodule.h +++ b/src/utils/include/loadablemodule.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/utils/include/pointerwatcher.h b/src/utils/include/pointerwatcher.h index 70b3326..65bb7aa 100644 --- a/src/utils/include/pointerwatcher.h +++ b/src/utils/include/pointerwatcher.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/utils/include/safeflags.h b/src/utils/include/safeflags.h index d222032..75bd763 100644 --- a/src/utils/include/safeflags.h +++ b/src/utils/include/safeflags.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/utils/include/stringutils.h b/src/utils/include/stringutils.h index 0ff5047..01f5fff 100644 --- a/src/utils/include/stringutils.h +++ b/src/utils/include/stringutils.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/utils/src/csvparser.cpp b/src/utils/src/csvparser.cpp index d660aa7..aaf62c5 100644 --- a/src/utils/src/csvparser.cpp +++ b/src/utils/src/csvparser.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/utils/src/dirutil.cpp b/src/utils/src/dirutil.cpp index 5e7e95c..cd921a8 100644 --- a/src/utils/src/dirutil.cpp +++ b/src/utils/src/dirutil.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/utils/src/ioredirector.cpp b/src/utils/src/ioredirector.cpp index 300d303..313a885 100644 --- a/src/utils/src/ioredirector.cpp +++ b/src/utils/src/ioredirector.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/utils/src/loadablemodule.cpp b/src/utils/src/loadablemodule.cpp index fdd73a8..c046201 100644 --- a/src/utils/src/loadablemodule.cpp +++ b/src/utils/src/loadablemodule.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. * diff --git a/src/utils/src/stringutils.cpp b/src/utils/src/stringutils.cpp index 7561840..1413fcd 100644 --- a/src/utils/src/stringutils.cpp +++ b/src/utils/src/stringutils.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021 by Microproject LLC + * Copyright (c) 2015-2022 Simple Device Model contributors * * This file is part of the Simple Device Model (SDM) framework. *