{"id":333388,"date":"2022-05-19T21:00:57","date_gmt":"2022-05-19T21:00:57","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=333388"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=333388","title":{"rendered":"<span>\u041f\u0438\u0448\u0435\u043c \u0432\u043d\u0435\u0448\u043d\u044e\u044e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0443 \u0434\u043b\u044f 1\u0421, NativeAPI \u043d\u0430 \u0421++, \u0434\u043b\u044f \u041e\u0421 Linux, \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c Qt Creator<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p><strong><em>\u0410\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f<\/em><\/strong><\/p>\n<p><em>\u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0432\u043d\u0435\u0448\u043d\u0435\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0434\u043b\u044f 1\u0421 \u0432 \u0441\u0440\u0435\u0434\u0435\u00a0<\/em>Qt Creator<em>\u00a0\u0434\u043b\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b Linux (ubuntu, debian, mint \u0438 \u0438\u043c \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0445). \u041d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043e\u0442 \u0432\u043d\u0435\u0448\u043d\u0435\u0439 \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u0443\u0440\u044b \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0438\u0445 \u0432 \u0431\u0430\u0437\u0435, \u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e\u043c 1\u0421. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0432\u043d\u0435\u0448\u043d\u0435\u0439 \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u0443\u0440\u044b \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Arduino UNO.<\/em><\/p>\n<p><strong>\u0414\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0432\u043d\u0435\u0448\u043d\u0435\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u044f\u0442\u0441\u044f<\/strong><\/p>\n<ol>\n<li>\n<p>\u041c\u0430\u0442\u0435\u0440\u0438\u0430\u043b \u00ab\u0422\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0432\u043d\u0435\u0448\u043d\u0438\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u00bb, \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435\u00a01\u0421:\u0418\u0422\u0421<\/p>\n<\/li>\n<li>\n<p>\u0428\u0430\u0431\u043b\u043e\u043d \u043f\u0443\u0441\u0442\u043e\u0439 \u0432\u043d\u0435\u0448\u043d\u0435\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b.<\/p>\n<\/li>\n<li>\n<p>Qt Creator.\u00a0\u042f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u0432\u0435\u0440\u0441\u0438\u044e 6.0.2.<\/p>\n<\/li>\n<\/ol>\n<p>\u00a0<strong>\u0428\u0430\u0431\u043b\u043e\u043d \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b<\/strong><\/p>\n<p>\u0412 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 Linux 1\u0421 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0432\u043d\u0435\u0448\u043d\u0438\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438 Native API, \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438 COM \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u041e\u0421 Windows \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u043b\u0438\u0441\u044c \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u043f\u043e\u0434 \u044d\u0442\u0443 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0432\u0432\u0438\u0434\u0443 \u0435\u0451 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u043e\u0441\u0442\u0438 \u0432 \u0441\u0432\u043e\u0451 \u0432\u0440\u0435\u043c\u044f. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u043c \u043d\u0430 \u0421++ \u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u043c \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438 Native API \u0448\u0430\u0431\u043b\u043e\u043d\u0435.<\/p>\n<p>\u0421 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u044b \u0432\u043e \u0432\u043d\u0435\u0448\u043d\u0435\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0435 \u043c\u043e\u0436\u043d\u043e \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u0441\u044f \u043d\u0430 \u0441\u0430\u0439\u0442\u0435 1\u0421:\u0418\u0422\u0421.<\/p>\n<p>\u0417\u0430 \u043e\u0441\u043d\u043e\u0432\u0443 \u044f \u0432\u0437\u044f\u043b \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0439 \u0448\u0430\u0431\u043b\u043e\u043d \u0441 \u0440\u0435\u0441\u0443\u0440\u0441\u0430 Github<\/p>\n<p>\u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0448\u0430\u0431\u043b\u043e\u043d \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b\u00a0https:\/\/github.com\/Infactum\/addin-template<\/p>\n<p>\u0412\u044b\u0440\u0430\u0436\u0430\u044e \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u043d\u043e\u0441\u0442\u044c \u0430\u0432\u0442\u043e\u0440\u0430\u043c \u044d\u0442\u043e\u0433\u043e \u0448\u0430\u0431\u043b\u043e\u043d\u0430, \u0442\u0430\u043a \u043a\u0430\u043a \u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u043e\u043d \u0431\u043e\u043b\u0435\u0435 \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u0447\u0435\u043c \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u043e\u0442 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 1\u0421.<\/p>\n<p><strong>\u041d\u0430\u0447\u0430\u043b\u043e \u043f\u0443\u0442\u0438<\/strong><\/p>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c\u00a0Qt Creator\u00a0\u0438 \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u043d\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u2014 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0421++<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/bfa\/b09\/1e4\/bfab091e47c5a81a3d29b8e10e1075cf.png\" width=\"1366\" height=\"735\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/bfa\/b09\/1e4\/bfab091e47c5a81a3d29b8e10e1075cf.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0412\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u043f\u0443\u0442\u044c \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u043d\u0430\u0448\u0435\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0441\u0431\u043e\u0440\u043a\u0438\u00a0qmake. \u0414\u0430\u043b\u0435\u0435 \u0432 \u043f\u0430\u043f\u043a\u0443 \u0441 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c \u043d\u0430\u0448\u0435\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u043b\u043e\u0436\u0438\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043f\u0430\u043f\u043a\u0438\u00a0src\u00a0\u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u0432\u043d\u0435\u0448\u043d\u0435\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b, \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0442\u0430\u043c \u0431\u0443\u0434\u0443\u0442\u00a0\u0444\u0430\u0439\u043b\u044b\u00a0Component.cpp,\u00a0Component.h,\u00a0dllmain.cpp,\u00a0exports.cpp,\u00a0stdafx.h\u00a0\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0435 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0438\u043c\u044f_\u043a\u043b\u0430\u0441\u0441\u0430.cpp, \u0438\u043c\u044f_\u043a\u043b\u0430\u0441\u0441\u0430.h, \u0438\u043c\u044f_\u043a\u043b\u0430\u0441\u0441\u0430_global.h (\u0443 \u043c\u0435\u043d\u044f \u044d\u0442\u043e\u00a0ttyAddin_global.h,\u00a0ttyAddin.h,\u00a0ttyAddin.cpp). \u0418 \u0432 \u043b\u044e\u0431\u043e\u0435 \u0443\u0434\u043e\u0431\u043d\u043e\u0435 \u043c\u0435\u0441\u0442\u043e\u00a0\u043f\u0430\u043f\u043a\u0443\u00a0include\u00a0(\u0441 \u0444\u0430\u0439\u043b\u0430\u043c\u0438\u00a0AddInDefBase.h,\u00a0com.h,\u00a0ComponentBase.h,\u00a0IandroidComponentHelper.h,\u00a0ImemoryManager.h,\u00a0types.h)\u00a0\u044f \u0435\u0451 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0438\u043b \u0432 \u043f\u0430\u043f\u043a\u0435 \u0441 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c.<\/p>\n<p>\u0412\u00a0*.pro\u00a0\u0444\u0430\u0439\u043b\u0435, \u0443 \u043c\u0435\u043d\u044f \u044d\u0442\u043e\u00a0ttyAddin.pro\u00a0\u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043f\u0443\u0442\u044c \u043a \u0444\u0430\u0439\u043b\u0430\u043c \u0432 \u043f\u0430\u043f\u043a\u0435 include \u043f\u0443\u0442\u0451\u043c \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u0442\u0440\u043e\u043a\u0438.<\/p>\n<pre><code>INCLUDEPATH +=\"\/home\/delphin\/ProjectQt\/estern_lib2\/include\/\"<\/code><\/pre>\n<p>\u0422\u0430\u043a \u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u0447\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u0438\u0437 \u043f\u0430\u043f\u043a\u0438\u00a0include\u00a0\u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u043f\u0430\u043f\u043a\u0443 \u0441 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c \u0438 \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0432\u00a0HEADERS\u00a0\u0438\u00a0SOURCES\u00a0\u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0438\u0445 \u0438\u043c\u0435\u043d\u0430, \u043d\u043e \u044d\u0442\u043e\u0442 \u043f\u0443\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u0434\u043e\u043b\u043e\u0433.<\/p>\n<p>\u00a0<\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0432 \u0444\u0430\u0439\u043b\u044b\u00a0ttyAddin.h,\u00a0ttyAddin.cpp\u00a0\u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c\u00a0\u043d\u0430\u0448\u00a0\u043a\u043e\u0434.\u00a0\u0421\u0430\u043c \u043a\u043b\u0430\u0441\u0441\u00a0ttyAddin\u00a0\u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u043e\u0443\u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c \u043e\u0442 \u0448\u0430\u0431\u043b\u043e\u043d\u043d\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430\u00a0Component.<\/p>\n<p>\u00a0<\/p>\n<p>\u041f\u0435\u0440\u0432\u043e\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u044d\u0442\u0438 \u0444\u0430\u0439\u043b\u044b \u0431\u0443\u0434\u0443\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0442\u0430\u043a:<\/p>\n<p>ttyAddin.h<\/p>\n<pre><code>#ifndef TTYADDIN_H #define TTYADDIN_H #include \"ttyAddin_global.h\" #include \"Component.h\" \/\/ C library headers #include &lt;iostream> class TTYADDIN_EXPORT TtyAddin : public Component { public:     const char *Version = u8\"1.0.0\";    \/\/\u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0432 \u0448\u0430\u0431\u043b\u043e\u043d\u0435 \u0432\u0435\u0440\u0441\u0438\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430     explicit TtyAddin();     std::string extensionName() override;   \/\/\u043d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u043b\u0430\u0441\u0441\u0430 private:     std::shared_ptr&lt;variant_t> sample_property;  }; #endif \/\/ TTYADDIN_H<\/code><\/pre>\n<p>\u00a0<\/p>\n<p>ttyAddin.cpp<\/p>\n<pre><code>#include \"ttyaddin.h\" std::string TtyAddin::extensionName() { \/\/ \u043d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043e \u0432 1\u0441     return \"TTY\"; \/\/ \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0441\u0432\u043e\u0451. } TtyAddin::TtyAddin() {     \/\/ Universal property. Could store any supported by native api type.    \/\/\u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0432 \u0448\u0430\u0431\u043b\u043e\u043d\u0435     sample_property = std::make_shared&lt;variant_t>();     AddProperty(L\"SampleProperty\", L\"\u041e\u0431\u0440\u0430\u0437\u0435\u0446\u0421\u0432\u043e\u0439\u0441\u0442\u0432\u0430\", sample_property);     \/\/ Full featured property registration example      \/\/\u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0432 \u0448\u0430\u0431\u043b\u043e\u043d\u0435     AddProperty(L\"Version\", L\"\u0412\u0435\u0440\u0441\u0438\u044f\u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b\", &amp; {         auto s = std::string(Version);         return std::make_shared&lt;variant_t>(std::move(s));     });<\/code><\/pre>\n<p>\u0422\u0430\u043a \u0436\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u043d\u0435\u0441\u0442\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u0444\u0430\u0439\u043b\u0435 exports.cpp<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/a14\/287\/aee\/a14287aeeab5949acbb1ee81bf45e90d.png\" width=\"656\" height=\"414\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a14\/287\/aee\/a14287aeeab5949acbb1ee81bf45e90d.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442 \u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0441\u0442\u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044e \u0441 \u0446\u0435\u043b\u044c\u044e \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u0430 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 (*.so) \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 Debug \u0438\u043b\u0438 Release. \u0412 Linux \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0438\u043c\u0435\u044e \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435\u00a0*.so\u00a0(\u0432 Windows \u0432\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u044b\u0439*.dll).<\/p>\n<p>\u0412\u0410\u0416\u041d\u041e: \u0427\u0442\u043e\u0431\u044b \u044d\u0442\u0443 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u043c\u043e\u0433\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435\u00a0\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f.\u00a0\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043d\u0430\u0448\u0443 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u0441 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u043e\u0439 \u0432 \u0441\u043f\u0438\u0441\u043e\u043a \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0445 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0439\u00a0\u0434\u043b\u044f \u0447\u0435\u0433\u043e\u00a0\u043f\u043e\u0434\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0444\u0430\u0439\u043b\u00a0\/etc\/ld.so.conf. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0443 \u043c\u0435\u043d\u044f \u044d\u0442\u043e\u0442 \u0444\u0430\u0439\u043b \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u0442\u0430\u043a\u0438\u0445 \u0441\u0442\u0440\u043e\u043a:<\/p>\n<pre><code>include \/etc\/ld.so.conf.d\/*.conf \/home\/delphin\/.cache\/fontconfig\/ \/home\/delphin\/.cache\/gstreamer-1.0\/ <\/code><\/pre>\n<p>\u0412\u043e \u0432\u0441\u0435\u0445 \u044d\u0442\u0438\u0445 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f\u0445 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0432\u0441\u0435\u043c\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438. \u0412 \u044d\u0442\u043e\u043c \u0441\u043f\u0438\u0441\u043a\u0435 \u043d\u0435\u0442 \u043b\u0438\u0448\u044c \u043e\u0434\u043d\u043e\u0439 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 &#8212;\u00a0\/lib, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u0430\u043c\u0430 \u043f\u043e \u0441\u0435\u0431\u0435 \u043d\u0435 \u043d\u0443\u0436\u0434\u0430\u0435\u0442\u0441\u044f \u0432 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0438, \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u043d\u0430 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0433\u043b\u0430\u0432\u043d\u043e\u0439. \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u043d\u0430\u0448\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0441\u0442\u0430\u043d\u0435\u0442 &#171;\u0437\u0430\u043c\u0435\u0442\u043d\u043e\u0439&#187;, \u0435\u0441\u043b\u0438 \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0435\u0435 \u0432 \u043e\u0434\u0438\u043d \u0438\u0445 \u044d\u0442\u0438\u0445 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u043e\u0432, \u043b\u0438\u0431\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u043c \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435.<\/p>\n<p>\u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432 \u043a\u043e\u043d\u0435\u0446 \u044d\u0442\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 (ld.so.conf) \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u0443\u0442\u044c \u043a \u043f\u0430\u043f\u043a\u0435 \u0441 \u043d\u0430\u0448\u0435\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u043e\u0439.<\/p>\n<pre><code>include \/etc\/ld.so.conf.d\/*.conf \/home\/delphin\/.cache\/fontconfig\/ \/home\/delphin\/.cache\/gstreamer-1.0\/ \/home\/delph\/ProjectQt\/estern_lib2\/build-ttyAddin-Desktop_Qt_6_3_0_GCC_64bit-Release\/ <\/code><\/pre>\n<p>\u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c,\u00a0\u0437\u0430\u043a\u0440\u044b\u0432\u0430\u0435\u043c.\u00a0\u0427\u0442\u043e\u0431\u044b \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043f\u0435\u0440\u0435\u0447\u0438\u0442\u0430\u043b\u0430 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0437\u0430\u043d\u043e\u0432\u043e,\u00a0\u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c\u043a\u043e\u043c\u0430\u043d\u0434\u0443\u00a0ldconfig.<\/p>\n<p><strong>\u0418\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f \u0441 1\u0421<\/strong><\/p>\n<p>\u041d\u0430\u0448 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0438\u0439 \u043f\u0443\u0442\u044c \u043f\u0440\u043e\u043b\u0435\u0433\u0430\u0435\u0442 \u0447\u0435\u0440\u0435\u0437 1\u0421. \u0421\u043e\u0437\u0434\u0430\u0451\u043c \u043f\u0443\u0441\u0442\u0443\u044e \u0431\u0430\u0437\u0443, \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0442\u043e\u0440\u0430, \u0438 \u0432 \u043c\u043e\u0434\u0443\u043b\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f (\u043f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435), \u0438\u043b\u0438 \u043a\u0430\u043a \u044f \u0432 \u043c\u043e\u0434\u0443\u043b\u0435 \u0444\u043e\u0440\u043c\u044b \u043f\u0438\u0448\u0435\u043c \u043a\u043e\u0434 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0432\u043d\u0435\u0448\u043d\u0435\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0438 \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u043e\u0431\u044a\u0435\u043a\u0442 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430.<\/p>\n<p>\u00a0<\/p>\n<p>&amp;\u041d\u0430\u041a\u043b\u0438\u0435\u043d\u0442\u0435<\/p>\n<p>\u041f\u0435\u0440\u0435\u043c \u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430, \u041f\u0443\u0442\u044c\u041a\u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435;<\/p>\n<p>&amp;\u041d\u0430\u041a\u043b\u0438\u0435\u043d\u0442\u0435<\/p>\n<p>\u041f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c(\u041a\u043e\u043c\u0430\u043d\u0434\u0430) \/\/\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b (\u043a\u043d\u043e\u043f\u043a\u0438)<\/p>\n<p>\u041f\u0443\u0442\u044c\u041a\u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435=&#187;\/home\/delphin\/ProjectQt\/estern_lib2\/build-ttyAddin-Desktop_Qt_6_3_0_GCC_64bit-Release\/libttyAddin.so&#187;;<\/p>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f = \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0412\u043d\u0435\u0448\u043d\u044e\u044e\u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0443(\u041f\u0443\u0442\u044c\u041a\u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435, &#171;libextDLib&#187;, \u0422\u0438\u043f\u0412\u043d\u0435\u0448\u043d\u0435\u0439\u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b.Native);<\/p>\n<p>\u0421\u043e\u043e\u0431\u0449\u0438\u0442\u044c (&#171;\u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0430 &#8212; &#187; + \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f );<\/p>\n<p>\u041f\u043e\u043f\u044b\u0442\u043a\u0430<\/p>\n<p>\u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 = \u043d\u043e\u0432\u044b\u0439 (&#171;AddIn.libextDLib.TTY&#187;);<\/p>\n<p>\u0421\u043e\u043e\u0431\u0449\u0438\u0442\u044c (&#171;\u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0430&#187;);<\/p>\n<p>\u0418\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/p>\n<p>\u0421\u043e\u043e\u0431\u0449\u0438\u0442\u044c (&#171;\u043d\u0435\u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0443&#187;);<\/p>\n<p>\u041a\u043e\u043d\u0435\u0446\u041f\u043e\u043f\u044b\u0442\u043a\u0438;<\/p>\n<p>\u041a\u043e\u043d\u0435\u0446\u041f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u044b<\/p>\n<p>\u00a0<\/p>\n<p>\u0412 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u00ab\u0437\u0430\u043f\u0443\u0441\u043a \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 \u0422\u043e\u043b\u0441\u0442\u043e\u0433\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u0430\u00bb, \u0442\u0430\u043a \u043a\u0430\u043a \u0434\u043b\u044f \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044f \u043a\u043e\u0434\u0430 \u043c\u044b \u0432\u0441\u0451 \u043d\u0430\u043f\u0438\u0441\u0430\u043b\u0438 \u043d\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0435.<\/p>\n<p>\u041e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e, \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c. \u0415\u0441\u043b\u0438 \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439 \u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u043e\u0431 \u043e\u0448\u0438\u0431\u043a\u0430\u0445, \u0442\u043e \u0432\u0441\u0451 \u0432 \u043f\u043e\u0440\u044f\u0434\u043a\u0435, \u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0442\u044c \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0443\u044e \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u043d\u0430\u0448\u0435\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0439.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/a28\/6da\/58f\/a286da58fb4f661d9965ad9edca4d8b2.png\" width=\"1366\" height=\"730\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a28\/6da\/58f\/a286da58fb4f661d9965ad9edca4d8b2.png\"\/><figcaption><\/figcaption><\/figure>\n<p><strong>\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432. (\u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b)<\/strong><\/p>\n<p>\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443\u00a0\u043c\u044b\u00a0\u0441\u0442\u0430\u0432\u0438\u043b\u0438\u00a0\u043f\u0435\u0440\u0435\u0434 \u0441\u043e\u0431\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0443\u00a0\u043f\u0440\u0438\u043a\u0440\u0443\u0442\u0438\u0442\u044c \u043a 1\u0421 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u043e\u0440\u0442 \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u043e\u0442 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 \u0447\u0435\u0440\u0435\u0437 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b rs-232, rs-422, rs-485, \u0442\u043e \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432 \u043d\u0430\u0448\u0435\u043c \u043a\u043b\u0430\u0441\u0441\u0435 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434\u044b \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u043f\u043e\u0440\u0442\u043e\u043c. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430 \u044f \u0432\u044b\u0431\u0440\u0430\u043b \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0443\u044e \u0421\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443\u00a0termios.h<\/p>\n<p>\u041f\u043e\u0447\u0435\u043c\u0443 \u043d\u0435\u00a0QserialPort:<\/p>\n<p>1. \u041c\u044b \u043f\u0438\u0448\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440 \u043f\u043e\u0434 Linux (\u043a\u0440\u043e\u0441\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u043d\u0435 \u043a\u0440\u0438\u0442\u0438\u0447\u043d\u0430).<\/p>\n<p>2.\u00a0termios.h\u00a0\u0431\u043e\u043b\u0435\u0435 \u0431\u044b\u0441\u0442\u0440\u0430\u044f \u0438 \u0442\u0440\u0430\u0442\u0438\u0442 \u043c\u0435\u043d\u044c\u0448\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432.<\/p>\n<p>3. \u0412 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435 \u043d\u0435\u043b\u044c\u0437\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0446\u0438\u043a\u043b \u0441\u043e\u0431\u044b\u0442\u0438\u0439, \u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0438\u0433\u043d\u0430\u043b\u044b \u0438 \u0441\u043b\u043e\u0442\u044b (\u0434\u0430\u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u043e\u0442\u043e\u043a\u0438, \u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c) \u0432\u0441\u0451 \u044d\u0442\u043e \u0441\u0432\u043e\u0434\u0438\u0442 \u043f\u043b\u044e\u0441\u044b Qt \u043d\u0430 \u043d\u0435\u0442.<\/p>\n<p>4. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f\u00a0termios.h\u00a0\u043c\u043e\u0436\u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0430\u043c\u044b\u0435 \u044d\u043a\u0437\u043e\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0438 \u0440\u0435\u0436\u0438\u043c\u044b \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u043e\u0440\u0442\u0430 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0441\u0442\u0430\u0440\u044b\u0439 \u0441\u043e\u0432\u0435\u0442\u0441\u043a\u0438\u0439 \u043f\u0440\u0438\u043d\u0442\u0435\u0440 Robotron).<\/p>\n<p>\u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434\u044b \u00ab\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043f\u043e\u0440\u0442\u0430\u00bb, \u00ab\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u043e\u0440\u0442\u0430\u00bb, \u00ab\u041e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043f\u043e\u0440\u0442\u0430\u00bb, \u00ab\u041f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0434\u0430\u043d\u043d\u044b\u0445\u00bb, \u00ab\u041f\u0440\u0438\u0451\u043c\u0430 \u0434\u0430\u043d\u043d\u044b\u0445\u00bb. \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443 \u044f \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b \u043e\u0434\u043d\u0438\u043c \u043c\u0435\u0442\u043e\u0434\u043e\u043c\u00a0ConnectPort,\u00a0\u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u043e\u043c\u00a0DisconnectPort, \u0447\u0442\u0435\u043d\u0438\u0435 \u0438 \u0437\u0430\u043f\u0438\u0441\u044c \u043c\u0435\u0442\u043e\u0434\u0430\u043c\u0438 -ReadPort\u00a0\u0438\u00a0SendToPort. \u0422\u0430\u043a \u0436\u0435 \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 1\u0421 \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u00a0\u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e\u00a0ExternalEvent \u0434\u043b\u044f \u0447\u0435\u0433\u043e \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b \u043c\u0435\u0442\u043e\u0434\u044b\u00a0ExternalEvent, CleanEventBuffer, GetEventBufferDepth<\/p>\n<p>\u00a0<\/p>\n<p>ttyAddin.h<\/p>\n<pre><code>#ifndef TTYADDIN_H #define TTYADDIN_H #include \"ttyAddin_global.h\" #include \"Component.h\" \/\/ C library headers #include &lt;iostream> #include &lt;string> \/\/ Linux headers #include &lt;fcntl.h>   \/\/ Contains file controls like O_RDWR #include &lt;errno.h>   \/\/ Error integer and strerror() function #include &lt;termios.h> \/\/ Contains POSIX terminal control definitions #include &lt;unistd.h>  \/\/ write(), read(), close() class TTYADDIN_EXPORT TtyAddin : public Component { public:     const char *Version = u8\"1.0.0\";    \/\/\u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0432 \u0448\u0430\u0431\u043b\u043e\u043d\u0435 \u0432\u0435\u0440\u0441\u0438\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430     explicit TtyAddin();     variant_t ConnectPort (const variant_t &amp;, const variant_t &amp;);\/\/ \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u0430 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u043e\u0440\u0442\u0430 \u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a \u043d\u0435\u043c\u0443     void DisconnectPort(void);  \/\/\u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u0430 \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043e\u0442 \u043f\u043e\u0440\u0442\u0430     void ReadPort ();           \/\/\u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u0430 \u0447\u0442\u0435\u043d\u0438\u044f \u0431\u0443\u0444\u0435\u0440\u0430 \u043f\u043e\u0440\u0442\u0430     void SendToPort (const variant_t &amp;);    \/\/\u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0441\u0442\u0440\u043e\u043a\u0438 \u0432 \u043f\u043e\u0440\u0442     std::string extensionName() override;   \/\/\u043d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u043b\u0430\u0441\u0441\u0430 private:     \/\/\u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u043f\u0440\u043e\u0443\u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b     bool ExternalEvent(const std::string &amp;, const std::string &amp;, const std::string &amp;);     bool SetEventBufferDepth(long);     long GetEventBufferDepth();     int serial_port;     \/\/\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0434\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440\u0430 \u043f\u043e\u0440\u0442\u0430     struct termios tty;  \/\/\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u043f\u043e\u0440\u0442\u0430     char read_buf [256]; \/\/\u0431\u0443\u0444\u0435\u0440 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0433\u043e \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u043d\u044f\u0442\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445     \/\/std::string str;     std::string PortNameStr;\/\/\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u043f\u0443\u0442\u0438 \u043a \u043f\u043e\u0440\u0442\u0443     std::shared_ptr&lt;variant_t> sample_property; \/\/\u043d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043e \u0432 1\u0441 }; #endif \/\/ TTYADDIN_H<\/code><\/pre>\n<p>\u00a0<\/p>\n<p>\u00a0<\/p>\n<p>ttyAddin.cpp<\/p>\n<pre><code>#include \"ttyaddin.h\" std::string TtyAddin::extensionName() { \/\/ \u043d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043e \u0432 1\u0441     return \"TTY\"; } TtyAddin::TtyAddin() {     \/\/ Universal property. Could store any supported by native api type.    \/\/\u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0432 \u0448\u0430\u0431\u043b\u043e\u043d\u0435     sample_property = std::make_shared&lt;variant_t>();     AddProperty(L\"SampleProperty\", L\"\u041e\u0431\u0440\u0430\u0437\u0435\u0446\u0421\u0432\u043e\u0439\u0441\u0442\u0432\u0430\", sample_property);     \/\/ Full featured property registration example      \/\/\u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0432 \u0448\u0430\u0431\u043b\u043e\u043d\u0435     AddProperty(L\"Version\", L\"\u0412\u0435\u0440\u0441\u0438\u044f\u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b\", [&amp;]() {         auto s = std::string(Version);         return std::make_shared&lt;variant_t>(std::move(s));     });     \/\/\u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044f \u043c\u0435\u0442\u043e\u0434\u043e\u0432     \/\/\u0423\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 1\u0421 \u0438 \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 \u043d\u0438\u043c\u0438 \u043c\u0435\u0442\u043e\u0434\u044b \u043a\u043b\u0430\u0441\u0441\u0430     AddMethod(L\"\u0421onnect\", L\"\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u041f\u043e\u0440\u0442\", this, &amp;TtyAddin::ConnectPort);     AddMethod(L\"Disconnect\", L\"\u041e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u041f\u043e\u0440\u0442\", this, &amp;TtyAddin::DisconnectPort);     AddMethod(L\"Read\", L\"\u0427\u0438\u0442\u0430\u0442\u044c\u041f\u043e\u0440\u0442\", this, &amp;TtyAddin::ReadPort);     AddMethod(L\"Send\", L\"\u041e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c\u0412\u041f\u043e\u0440\u0442\", this, &amp;TtyAddin::SendToPort); } \/\/ \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u0430 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u043e\u0440\u0442\u0430 \u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a \u043d\u0435\u043c\u0443 \/\/ \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0441\u0442\u0440\u043e\u043a\u0443 \u043f\u0443\u0442\u0438 \u043a \u0444\u0430\u0439\u043b\u0443 \u043f\u043e\u0440\u0442\u0430 \u0438 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043f\u043e\u0440\u0442\u0430 (\u0447\u0438\u0441\u043b\u043e) \/\/ \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0443\u0441\u043f\u0435\u0445\u0430 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0438\u0441\u0442\u0438\u043d\u0443 variant_t TtyAddin::ConnectPort (const variant_t &amp; serialPortName, const variant_t &amp; Baud) {   variant_t res = false;     \/\/\u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043e\u043f\u0435\u0440\u0430\u043d\u0434\u043e\u0432 \u043d\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 \u0442\u0438\u043f\u043e\u0432     if (std::holds_alternative&lt;std::string>(serialPortName) &amp;&amp; (std::holds_alternative&lt;int32_t>(Baud)))     {  res = true;        PortNameStr = std::get&lt;std::string>(serialPortName); \/\/\u043f\u043e\u043c\u0435\u0449\u0430\u0435\u043c \u043f\u0443\u0442\u044c \u043a \u043f\u043e\u0440\u0442\u0443 \u0432 \u0441\u0442\u0440\u043e\u043a\u0443 \u043f\u0440\u0438\u043c\u0435\u0440 \"\/dev\/ttyACM0\"        const char *PortName=PortNameStr.c_str();    \/\/ \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u043c \u0432 \u0441\u0442\u0440\u043e\u043a\u0443 \u0432 \u0441\u0442\u0438\u043b\u0435 \u0421\u0438 (\u043c\u0430\u0441\u0441\u0438\u0432 char) \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043d\u0430 \u043d\u0435\u0435        serial_port = open(PortName, O_RDWR); \/\/\u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0439 \u043f\u043e\u0440\u0442 \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f \u0438 \u0437\u0430\u043f\u0438\u0441\u0438  (\u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f O_RDONLY)        if (serial_port &lt; 0) {            throw std::runtime_error(u8\"\u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0439 \u043f\u043e\u0440\u0442 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435\");  \/\/\u0435\u0441\u043b\u0438 \u043e\u0442\u043a\u0440\u044b\u0442\u044c \u043f\u043e\u0440\u0442 \u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c        }        switch (static_cast&lt;int>(std::get&lt;int32_t>(Baud)))   \/\/ \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0439 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c\u044e \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043f\u043e\u0440\u0442\u0430         {             case 1200:cfsetspeed(&amp;tty, B1200);                       break;             case 2400:cfsetspeed(&amp;tty, B2400);                       break;             case 4800:cfsetspeed(&amp;tty, B4800);                       break;             case 9600:cfsetspeed(&amp;tty, B9600);                       break;             case 19200:cfsetspeed(&amp;tty, B19200);                       break;             default: res = false;                       throw std::runtime_error(u8\"\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u043d\u0435\u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u043e\");                       break;         }        \/\/ \u0432\u0432\u043e\u0434\u0438\u043c \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438        tty.c_cflag &amp;= ~PARENB; \/\/ \u0431\u0435\u0437 \u043f\u0430\u0440\u0438\u0442\u0435\u0442\u0430        tty.c_cflag &amp;= ~CSTOPB; \/\/ 1 \u0441\u0442\u043e\u043f \u0431\u0438\u0442        tty.c_cflag |= CS8;     \/\/ 8 \u0431\u0438\u0442        tty.c_cflag &amp;= ~CRTSCTS; \/\/ \u0431\u0435\u0437 RTS\/CTS \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u0442\u043e\u043a\u043e\u043c        \/\/\u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438        if (tcsetattr(serial_port, TCSANOW, &amp;tty) != 0)        {  throw std::runtime_error(u8\"\u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u043e\u0440\u0442\u0430\");        }        memset(&amp;read_buf, '\\0', sizeof(read_buf));\/\/\u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u0431\u0443\u0444\u0435\u0440        TtyAddin::SetEventBufferDepth(10);  \/\/\u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0440\u0430\u0437\u043c\u0435\u0440 \u043e\u0447\u0435\u0440\u0435\u0434\u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0432 1\u0441  \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043e\u043f\u0438\u0441\u0430\u043d\u0430 \u0432 1\u0421:\u0418\u0422\u0421     }     else{  res = false;            throw std::runtime_error(u8\"\u043c\u0435\u0442\u043e\u0434 serialSetting - \u043d\u0435\u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u0435 \u0442\u0438\u043f\u044b \u0434\u0430\u043d\u043d\u044b\u0445\");} \/\/\u0435\u0441\u043b\u0438 \u0438\u043c\u044f \u043f\u043e\u0440\u0442\u0430 \u043d\u0435 \u0441\u0442\u0440\u043e\u043a\u0430, \u0430 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043d\u0435 \u0447\u0438\u0441\u043b\u043e     return res; } \/\/\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u0430 \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043e\u0442 \u043f\u043e\u0440\u0442\u0430 void TtyAddin::DisconnectPort(void) \/\/\u041e\u0442\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u043f\u043e\u0440\u0442 {   close(serial_port); } \/\/\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u0430 \u0447\u0442\u0435\u043d\u0438\u044f \u0431\u0443\u0444\u0435\u0440\u0430 \u043f\u043e\u0440\u0442\u0430 void TtyAddin::ReadPort () {   tcflush(serial_port,TCIOFLUSH); \/\/ \u0447\u0438\u0441\u0442\u0438\u043c \u0431\u0443\u0444\u0435\u0440 \u043f\u043e\u0440\u0442\u0430 \u043e\u0442 \u043c\u0443\u0441\u043e\u0440\u0430 \u043f\u0435\u0440\u0435\u0434 \u0447\u0442\u0435\u043d\u0438\u0435\u043c     sleep(1);                       \/\/ \u0436\u0434\u0451\u043c (\u0441\u0435\u043a\u0443\u043d\u0434\u044b)     int num_bytes = read(serial_port, &amp;read_buf[0], sizeof(read_buf)); \/\/\u0447\u0438\u0442\u0430\u0435\u043c \u0431\u0443\u0444\u0435\u0440 \u043f\u043e\u0440\u0442\u0430     if (num_bytes &lt;= 0) \/\/\u0435\u0441\u043b\u0438 -1 \u043e\u0448\u0438\u0431\u043a\u0430 0 \u0431\u0443\u0444\u0435\u0440 \u043f\u0443\u0441\u0442     {         throw std::runtime_error(u8\"\u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u043f\u043e\u0440\u0442 \u043d\u0435 \u043f\u043e\u0441\u0442\u0443\u043f\u0430\u044e\u0442\");     }     else {   ExternalEvent(extensionName(), PortNameStr, static_cast&lt;std::string>(read_buf));} \/\/ \u0432\u044b\u0432\u043e\u0434 \u0432 1\u0441 \u0447\u0435\u0440\u0435\u0437 \u0432\u043d\u0435\u0448\u043d\u0435\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u0435 } \/\/\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0441\u0442\u0440\u043e\u043a\u0438 \u0432 \u043f\u043e\u0440\u0442 void TtyAddin::SendToPort (const variant_t &amp; data) {   if (std::holds_alternative&lt;std::string>(data))  \/\/\u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 \u0442\u0438\u043f\u0430 \u0432\u0432\u0435\u0434\u0451\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445     {   std::string dataString = std::get&lt;std::string>(data); \/\/\u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u043c \u0432 \u0441\u0442\u0440\u043e\u043a\u0443         const char * msg = dataString.c_str();      \/\/\u0438  \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0438\u043c \u0435\u0435 \u0432 \u0441\u0442\u0440\u043e\u043a\u0443 \u0432 \u0441\u0442\u0438\u043b\u0435 \u0441\u0438           write(serial_port, msg, sizeof(msg));     \/\/ \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c     }     else {   throw std::runtime_error(u8\"\u043c\u0435\u0442\u043e\u0434 serialSetting - \u043d\u0435\u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u0435 \u0442\u0438\u043f\u044b \u0434\u0430\u043d\u043d\u044b\u0445\");} } \/\/\u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u043f\u0440\u043e\u0443\u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b bool TtyAddin::ExternalEvent(const std::string &amp;src, const std::string &amp;msg, const std::string &amp;data) {   return Component::ExternalEvent( src, msg, data);} bool TtyAddin::SetEventBufferDepth(long depth) {   return Component::SetEventBufferDepth(depth);} long TtyAddin::GetEventBufferDepth() {   return Component::GetEventBufferDepth();}<\/code><\/pre>\n<p>\u00a0<\/p>\n<p>\u0421\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442, \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u043c.\u00a0<\/p>\n<p><strong>\u0412\u043d\u0435\u0448\u043d\u0435\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e (Arduino UNO)<\/strong><\/p>\n<p>Arduino \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u0443 (\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0439 \u0441\u0438\u043c\u0432\u043e\u043b), \u0438 \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 \u0434\u0430\u0432\u0430\u0442\u044c \u043e\u0442\u0432\u0435\u0442 \u2014 \u0441\u0442\u0440\u043e\u043a\u0443 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u0441 \u043d\u043e\u043c\u0435\u0440\u043e\u043c \u043e\u0442\u0432\u0435\u0442\u0430.<\/p>\n<p>\u041f\u0440\u043e\u0448\u0438\u0432\u043a\u0430 \u0434\u043b\u044f \u0430\u0440\u0434\u0443\u0438\u043d\u043e.<\/p>\n<p><code>char inChar;<\/code><\/p>\n<p><code>int counter;<\/code><\/p>\n<p><code>void setup() {<\/code><\/p>\n<p><code>Serial.begin(9600);<\/code><\/p>\n<p><code>}<\/code><\/p>\n<p><code>void loop() {<\/code><\/p>\n<p><code>if (Serial.available()) {<\/code><\/p>\n<p><code>inChar = Serial.read();<\/code><\/p>\n<p><code>delay(100);<\/code><\/p>\n<p><code>if(inChar=='e')<\/code><\/p>\n<p><code>{<\/code><\/p>\n<p><code>Serial.print(\"UNO received: \");<\/code><\/p>\n<p><code>Serial.print(inChar);<\/code><\/p>\n<p><code>Serial.print(\" \u2116\");<\/code><\/p>\n<p><code>Serial.println(++counter);<\/code><\/p>\n<p><code>}<\/code><\/p>\n<p><code>}<\/code><\/p>\n<p><code>}<\/code><\/p>\n<p>\u00a0<\/p>\n<p><strong>\u0432 \u043c\u043e\u0434\u0443\u043b\u044c \u0432 1 \u0421 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043a\u043e\u0434<\/strong><\/p>\n<p>(\u0444\u0430\u0439\u043b \u043f\u043e\u0440\u0442\u0430 \u043c\u043e\u0436\u0435\u0442 \u043d\u0430\u0437\u044b\u0432\u0430\u0442\u044c\u0441\u044f ttyUSB0 \u0438\u043b\u0438 ttyACM0 \u0433\u0434\u0435 0 \u043d\u043e\u043c\u0435\u0440 \u0435\u0441\u043b\u0438 \u0442\u0430\u043a\u0438\u0445 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e)<\/p>\n<p><code>&amp;\u041d\u0430\u041a\u043b\u0438\u0435\u043d\u0442\u0435<\/code><\/p>\n<p><code>\u041f\u0435\u0440\u0435\u043c \u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430, \u041f\u0443\u0442\u044c\u041a\u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435;<\/code><\/p>\n<p><code>&amp;\u041d\u0430\u041a\u043b\u0438\u0435\u043d\u0442\u0435<\/code><\/p>\n<p><code>\u041f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c(\u041a\u043e\u043c\u0430\u043d\u0434\u0430)<\/code><\/p>\n<p><code>\u041f\u0443\u0442\u044c\u041a\u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435=\"\/home\/delphin\/ProjectQt\/estern_lib2\/build-ttyAddin-Desktop_Qt_6_3_0_GCC_64bit-Release\/libttyAddin.so\";<\/code><\/p>\n<p><code>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f = \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0412\u043d\u0435\u0448\u043d\u044e\u044e\u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0443(\u041f\u0443\u0442\u044c\u041a\u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435, \"libextDLib\", \u0422\u0438\u043f\u0412\u043d\u0435\u0448\u043d\u0435\u0439\u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b.Native);<\/code><\/p>\n<p><code>\u0421\u043e\u043e\u0431\u0449\u0438\u0442\u044c (\"\u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0430 - \" + \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f );<\/code><\/p>\n<p><code>\u041f\u043e\u043f\u044b\u0442\u043a\u0430<\/code><\/p>\n<p><code>\u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 = \u043d\u043e\u0432\u044b\u0439 (\"AddIn.libextDLib.TTY\");<\/code><\/p>\n<p><code>\u0421\u043e\u043e\u0431\u0449\u0438\u0442\u044c (\"\u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0430\");<\/code><\/p>\n<p><code>\u0418\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/code><\/p>\n<p><code>\u0421\u043e\u043e\u0431\u0449\u0438\u0442\u044c (\"\u043d\u0435\u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0443\");<\/code><\/p>\n<p><code>\u041a\u043e\u043d\u0435\u0446\u041f\u043e\u043f\u044b\u0442\u043a\u0438;<\/code><\/p>\n<p><code>\u041f\u043e\u043f\u044b\u0442\u043a\u0430<\/code><\/p>\n<p><code>\u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430.\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u041f\u043e\u0440\u0442 (\"\/dev\/ttyACM0\", 9600); \/\/\u0443\u043a\u0430\u0437\u0430\u043d \u043f\u0443\u0442\u044c \u043a \u0444\u0430\u0439\u043b\u0443 \u043f\u043e\u0440\u0442\u0430. \u0432 \u041e\u0421 (\u043f\u0430\u043f\u043a\u0430 dev, \u0444\u0430\u0439\u043b ttyACM0)<\/code><\/p>\n<p><code>\u0421\u043e\u043e\u0431\u0449\u0438\u0442\u044c (\"\u041f\u043e\u0440\u0442 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\");<\/code><\/p>\n<p><code>\u0418\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/code><\/p>\n<p><code>\u0421\u043e\u043e\u0431\u0449\u0438\u0442\u044c (\"\u043d\u0435\u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043f\u043e\u0440\u0442\");<\/code><\/p>\n<p><code>\u041a\u043e\u043d\u0435\u0446\u041f\u043e\u043f\u044b\u0442\u043a\u0438;<\/code><\/p>\n<p><code>\u041a\u043e\u043d\u0435\u0446\u041f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u044b<\/code><\/p>\n<p><code>\u00a0<\/code><\/p>\n<p><code>&amp;\u041d\u0430\u041a\u043b\u0438\u0435\u043d\u0442\u0435<\/code><\/p>\n<p><code>\u041f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 \u041f\u0435\u0440\u0435\u0434\u0417\u0430\u043a\u0440\u044b\u0442\u0438\u0435\u043c(\u041e\u0442\u043a\u0430\u0437, \u0417\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0435\u0420\u0430\u0431\u043e\u0442\u044b, \u0422\u0435\u043a\u0441\u0442\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f, \u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0430\u044f\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430)<\/code><\/p>\n<p><code>\u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430.\u041e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u041f\u043e\u0440\u0442();<\/code><\/p>\n<p><code>\u041a\u043e\u043d\u0435\u0446\u041f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u044b<\/code><\/p>\n<p><code>\u00a0<\/code><\/p>\n<p><code>&amp;\u041d\u0430\u041a\u043b\u0438\u0435\u043d\u0442\u0435<\/code><\/p>\n<p><code>\u041f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c(\u041a\u043e\u043c\u0430\u043d\u0434\u0430)<\/code><\/p>\n<p><code>\u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430.\u041e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c\u0412\u041f\u043e\u0440\u0442(\"e\");<\/code><\/p>\n<p><code>\u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430.\u0427\u0438\u0442\u0430\u0442\u044c\u041f\u043e\u0440\u0442();<\/code><\/p>\n<p><code>\u041a\u043e\u043d\u0435\u0446\u041f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u044b<\/code><\/p>\n<p>\u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u043f\u0440\u043e\u0448\u0438\u0442\u0443\u044e \u0430\u0440\u0434\u0443\u0438\u043d\u0443, \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c. \u041f\u0440\u0438 \u043d\u0430\u0436\u0430\u0442\u0438\u0438 \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c\u0441\u044f \u043a \u043f\u043e\u0440\u0442\u0443, \u043f\u0440\u0438 \u043d\u0430\u0436\u0430\u0442\u0438\u0438 \u0447\u0438\u0442\u0430\u0442\u044c \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u0442\u0440\u043e\u043a\u0443 \u0438\u0437 \u0430\u0440\u0434\u0443\u0438\u043d\u044b.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/b66\/83f\/d8f\/b6683fd8fe5903fcb31f03ec61dcc576.png\" width=\"1366\" height=\"734\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b66\/83f\/d8f\/b6683fd8fe5903fcb31f03ec61dcc576.png\"\/><figcaption><\/figcaption><\/figure>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"v-portal\" style=\"display:none;\"><\/div>\n<\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/666718\/\"> https:\/\/habr.com\/ru\/post\/666718\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p><strong><em>\u0410\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f<\/em><\/strong><\/p>\n<p><em>\u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0432\u043d\u0435\u0448\u043d\u0435\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0434\u043b\u044f 1\u0421 \u0432 \u0441\u0440\u0435\u0434\u0435\u00a0<\/em>Qt Creator<em>\u00a0\u0434\u043b\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b Linux (ubuntu, debian, mint \u0438 \u0438\u043c \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0445). \u041d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043e\u0442 \u0432\u043d\u0435\u0448\u043d\u0435\u0439 \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u0443\u0440\u044b \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0438\u0445 \u0432 \u0431\u0430\u0437\u0435, \u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e\u043c 1\u0421. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0432\u043d\u0435\u0448\u043d\u0435\u0439 \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u0443\u0440\u044b \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Arduino UNO.<\/em><\/p>\n<p><strong>\u0414\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0432\u043d\u0435\u0448\u043d\u0435\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u044f\u0442\u0441\u044f<\/strong><\/p>\n<ol>\n<li>\n<p>\u041c\u0430\u0442\u0435\u0440\u0438\u0430\u043b \u00ab\u0422\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0432\u043d\u0435\u0448\u043d\u0438\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u00bb, \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435\u00a01\u0421:\u0418\u0422\u0421<\/p>\n<\/li>\n<li>\n<p>\u0428\u0430\u0431\u043b\u043e\u043d \u043f\u0443\u0441\u0442\u043e\u0439 \u0432\u043d\u0435\u0448\u043d\u0435\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b.<\/p>\n<\/li>\n<li>\n<p>Qt Creator.\u00a0\u042f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u0432\u0435\u0440\u0441\u0438\u044e 6.0.2.<\/p>\n<\/li>\n<\/ol>\n<p>\u00a0<strong>\u0428\u0430\u0431\u043b\u043e\u043d \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b<\/strong><\/p>\n<p>\u0412 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 Linux 1\u0421 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0432\u043d\u0435\u0448\u043d\u0438\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438 Native API, \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438 COM \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u041e\u0421 Windows \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u043b\u0438\u0441\u044c \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u043f\u043e\u0434 \u044d\u0442\u0443 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0432\u0432\u0438\u0434\u0443 \u0435\u0451 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u043e\u0441\u0442\u0438 \u0432 \u0441\u0432\u043e\u0451 \u0432\u0440\u0435\u043c\u044f. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u043c \u043d\u0430 \u0421++ \u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u043c \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438 Native API \u0448\u0430\u0431\u043b\u043e\u043d\u0435.<\/p>\n<p>\u0421 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u044b \u0432\u043e \u0432\u043d\u0435\u0448\u043d\u0435\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0435 \u043c\u043e\u0436\u043d\u043e \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u0441\u044f \u043d\u0430 \u0441\u0430\u0439\u0442\u0435 1\u0421:\u0418\u0422\u0421.<\/p>\n<p>\u0417\u0430 \u043e\u0441\u043d\u043e\u0432\u0443 \u044f \u0432\u0437\u044f\u043b \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0439 \u0448\u0430\u0431\u043b\u043e\u043d \u0441 \u0440\u0435\u0441\u0443\u0440\u0441\u0430 Github<\/p>\n<p>\u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0448\u0430\u0431\u043b\u043e\u043d \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b\u00a0https:\/\/github.com\/Infactum\/addin-template<\/p>\n<p>\u0412\u044b\u0440\u0430\u0436\u0430\u044e \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u043d\u043e\u0441\u0442\u044c \u0430\u0432\u0442\u043e\u0440\u0430\u043c \u044d\u0442\u043e\u0433\u043e \u0448\u0430\u0431\u043b\u043e\u043d\u0430, \u0442\u0430\u043a \u043a\u0430\u043a \u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u043e\u043d \u0431\u043e\u043b\u0435\u0435 \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u0447\u0435\u043c \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u043e\u0442 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 1\u0421.<\/p>\n<p><strong>\u041d\u0430\u0447\u0430\u043b\u043e \u043f\u0443\u0442\u0438<\/strong><\/p>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c\u00a0Qt Creator\u00a0\u0438 \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u043d\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u2014 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0421++<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0412\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u043f\u0443\u0442\u044c \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u043d\u0430\u0448\u0435\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0441\u0431\u043e\u0440\u043a\u0438\u00a0qmake. \u0414\u0430\u043b\u0435\u0435 \u0432 \u043f\u0430\u043f\u043a\u0443 \u0441 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c \u043d\u0430\u0448\u0435\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u043b\u043e\u0436\u0438\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043f\u0430\u043f\u043a\u0438\u00a0src\u00a0\u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u0432\u043d\u0435\u0448\u043d\u0435\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b, \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0442\u0430\u043c \u0431\u0443\u0434\u0443\u0442\u00a0\u0444\u0430\u0439\u043b\u044b\u00a0Component.cpp,\u00a0Component.h,\u00a0dllmain.cpp,\u00a0exports.cpp,\u00a0stdafx.h\u00a0\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0435 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0438\u043c\u044f_\u043a\u043b\u0430\u0441\u0441\u0430.cpp, \u0438\u043c\u044f_\u043a\u043b\u0430\u0441\u0441\u0430.h, \u0438\u043c\u044f_\u043a\u043b\u0430\u0441\u0441\u0430_global.h (\u0443 \u043c\u0435\u043d\u044f \u044d\u0442\u043e\u00a0ttyAddin_global.h,\u00a0ttyAddin.h,\u00a0ttyAddin.cpp). \u0418 \u0432 \u043b\u044e\u0431\u043e\u0435 \u0443\u0434\u043e\u0431\u043d\u043e\u0435 \u043c\u0435\u0441\u0442\u043e\u00a0\u043f\u0430\u043f\u043a\u0443\u00a0include\u00a0(\u0441 \u0444\u0430\u0439\u043b\u0430\u043c\u0438\u00a0AddInDefBase.h,\u00a0com.h,\u00a0ComponentBase.h,\u00a0IandroidComponentHelper.h,\u00a0ImemoryManager.h,\u00a0types.h)\u00a0\u044f \u0435\u0451 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0438\u043b \u0432 \u043f\u0430\u043f\u043a\u0435 \u0441 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c.<\/p>\n<p>\u0412\u00a0*.pro\u00a0\u0444\u0430\u0439\u043b\u0435, \u0443 \u043c\u0435\u043d\u044f \u044d\u0442\u043e\u00a0ttyAddin.pro\u00a0\u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043f\u0443\u0442\u044c \u043a \u0444\u0430\u0439\u043b\u0430\u043c \u0432 \u043f\u0430\u043f\u043a\u0435 include \u043f\u0443\u0442\u0451\u043c \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u0442\u0440\u043e\u043a\u0438.<\/p>\n<pre><code>INCLUDEPATH +=\"\/home\/delphin\/ProjectQt\/estern_lib2\/include\/\"<\/code><\/pre>\n<p>\u0422\u0430\u043a \u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u0447\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u0438\u0437 \u043f\u0430\u043f\u043a\u0438\u00a0include\u00a0\u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u043f\u0430\u043f\u043a\u0443 \u0441 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c \u0438 \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0432\u00a0HEADERS\u00a0\u0438\u00a0SOURCES\u00a0\u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0438\u0445 \u0438\u043c\u0435\u043d\u0430, \u043d\u043e \u044d\u0442\u043e\u0442 \u043f\u0443\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u0434\u043e\u043b\u043e\u0433.<\/p>\n<p>\u00a0<\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0432 \u0444\u0430\u0439\u043b\u044b\u00a0ttyAddin.h,\u00a0ttyAddin.cpp\u00a0\u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c\u00a0\u043d\u0430\u0448\u00a0\u043a\u043e\u0434.\u00a0\u0421\u0430\u043c \u043a\u043b\u0430\u0441\u0441\u00a0ttyAddin\u00a0\u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u043e\u0443\u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c \u043e\u0442 \u0448\u0430\u0431\u043b\u043e\u043d\u043d\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430\u00a0Component.<\/p>\n<p>\u00a0<\/p>\n<p>\u041f\u0435\u0440\u0432\u043e\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u044d\u0442\u0438 \u0444\u0430\u0439\u043b\u044b \u0431\u0443\u0434\u0443\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0442\u0430\u043a:<\/p>\n<p>ttyAddin.h<\/p>\n<pre><code>#ifndef TTYADDIN_H #define TTYADDIN_H #include \"ttyAddin_global.h\" #include \"Component.h\" \/\/ C library headers #include &lt;iostream> class TTYADDIN_EXPORT TtyAddin : public Component { public:     const char *Version = u8\"1.0.0\";    \/\/\u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0432 \u0448\u0430\u0431\u043b\u043e\u043d\u0435 \u0432\u0435\u0440\u0441\u0438\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430     explicit TtyAddin();     std::string extensionName() override;   \/\/\u043d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u043b\u0430\u0441\u0441\u0430 private:     std::shared_ptr&lt;variant_t> sample_property;  }; #endif \/\/ TTYADDIN_H<\/code><\/pre>\n<p>\u00a0<\/p>\n<p>ttyAddin.cpp<\/p>\n<pre><code>#include \"ttyaddin.h\" std::string TtyAddin::extensionName() { \/\/ \u043d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043e \u0432 1\u0441     return \"TTY\"; \/\/ \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0441\u0432\u043e\u0451. } TtyAddin::TtyAddin() {     \/\/ Universal property. Could store any supported by native api type.    \/\/\u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0432 \u0448\u0430\u0431\u043b\u043e\u043d\u0435     sample_property = std::make_shared&lt;variant_t>();     AddProperty(L\"SampleProperty\", L\"\u041e\u0431\u0440\u0430\u0437\u0435\u0446\u0421\u0432\u043e\u0439\u0441\u0442\u0432\u0430\", sample_property);     \/\/ Full featured property registration example      \/\/\u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0432 \u0448\u0430\u0431\u043b\u043e\u043d\u0435     AddProperty(L\"Version\", L\"\u0412\u0435\u0440\u0441\u0438\u044f\u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b\", &amp; {         auto s = std::string(Version);         return std::make_shared&lt;variant_t>(std::move(s));     });<\/code><\/pre>\n<p>\u0422\u0430\u043a \u0436\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u043d\u0435\u0441\u0442\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u0444\u0430\u0439\u043b\u0435 exports.cpp<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442 \u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0441\u0442\u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044e \u0441 \u0446\u0435\u043b\u044c\u044e \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u0430 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 (*.so) \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 Debug \u0438\u043b\u0438 Release. \u0412 Linux \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0438\u043c\u0435\u044e \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435\u00a0*.so\u00a0(\u0432 Windows \u0432\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u044b\u0439*.dll).<\/p>\n<p>\u0412\u0410\u0416\u041d\u041e: \u0427\u0442\u043e\u0431\u044b \u044d\u0442\u0443 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u043c\u043e\u0433\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435\u00a0\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f.\u00a0\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043d\u0430\u0448\u0443 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u0441 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u043e\u0439 \u0432 \u0441\u043f\u0438\u0441\u043e\u043a \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0445 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0439\u00a0\u0434\u043b\u044f \u0447\u0435\u0433\u043e\u00a0\u043f\u043e\u0434\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0444\u0430\u0439\u043b\u00a0\/etc\/ld.so.conf. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0443 \u043c\u0435\u043d\u044f \u044d\u0442\u043e\u0442 \u0444\u0430\u0439\u043b \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u0442\u0430\u043a\u0438\u0445 \u0441\u0442\u0440\u043e\u043a:<\/p>\n<pre><code>include \/etc\/ld.so.conf.d\/*.conf \/home\/delphin\/.cache\/fontconfig\/ \/home\/delphin\/.cache\/gstreamer-1.0\/ <\/code><\/pre>\n<p>\u0412\u043e \u0432\u0441\u0435\u0445 \u044d\u0442\u0438\u0445 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f\u0445 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0432\u0441\u0435\u043c\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438. \u0412 \u044d\u0442\u043e\u043c \u0441\u043f\u0438\u0441\u043a\u0435 \u043d\u0435\u0442 \u043b\u0438\u0448\u044c \u043e\u0434\u043d\u043e\u0439 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 &#8212;\u00a0\/lib, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u0430\u043c\u0430 \u043f\u043e \u0441\u0435\u0431\u0435 \u043d\u0435 \u043d\u0443\u0436\u0434\u0430\u0435\u0442\u0441\u044f \u0432 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0438, \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u043d\u0430 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0433\u043b\u0430\u0432\u043d\u043e\u0439. \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u043d\u0430\u0448\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0441\u0442\u0430\u043d\u0435\u0442 &#171;\u0437\u0430\u043c\u0435\u0442\u043d\u043e\u0439&#187;, \u0435\u0441\u043b\u0438 \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0435\u0435 \u0432 \u043e\u0434\u0438\u043d \u0438\u0445 \u044d\u0442\u0438\u0445 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u043e\u0432, \u043b\u0438\u0431\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u043c \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435.<\/p>\n<p>\u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432 \u043a\u043e\u043d\u0435\u0446 \u044d\u0442\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 (ld.so.conf) \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u0443\u0442\u044c \u043a \u043f\u0430\u043f\u043a\u0435 \u0441 \u043d\u0430\u0448\u0435\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u043e\u0439.<\/p>\n<pre><code>include \/etc\/ld.so.conf.d\/*.conf \/home\/delphin\/.cache\/fontconfig\/ \/home\/delphin\/.cache\/gstreamer-1.0\/ \/home\/delph\/ProjectQt\/estern_lib2\/build-ttyAddin-Desktop_Qt_6_3_0_GCC_64bit-Release\/ <\/code><\/pre>\n<p>\u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c,\u00a0\u0437\u0430\u043a\u0440\u044b\u0432\u0430\u0435\u043c.\u00a0\u0427\u0442\u043e\u0431\u044b \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043f\u0435\u0440\u0435\u0447\u0438\u0442\u0430\u043b\u0430 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0437\u0430\u043d\u043e\u0432\u043e,\u00a0\u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c\u043a\u043e\u043c\u0430\u043d\u0434\u0443\u00a0ldconfig.<\/p>\n<p><strong>\u0418\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f \u0441 1\u0421<\/strong><\/p>\n<p>\u041d\u0430\u0448 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0438\u0439 \u043f\u0443\u0442\u044c \u043f\u0440\u043e\u043b\u0435\u0433\u0430\u0435\u0442 \u0447\u0435\u0440\u0435\u0437 1\u0421. \u0421\u043e\u0437\u0434\u0430\u0451\u043c \u043f\u0443\u0441\u0442\u0443\u044e \u0431\u0430\u0437\u0443, \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0442\u043e\u0440\u0430, \u0438 \u0432 \u043c\u043e\u0434\u0443\u043b\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f (\u043f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435), \u0438\u043b\u0438 \u043a\u0430\u043a \u044f \u0432 \u043c\u043e\u0434\u0443\u043b\u0435 \u0444\u043e\u0440\u043c\u044b \u043f\u0438\u0448\u0435\u043c \u043a\u043e\u0434 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0432\u043d\u0435\u0448\u043d\u0435\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0438 \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u043e\u0431\u044a\u0435\u043a\u0442 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430.<\/p>\n<p>\u00a0<\/p>\n<p>&amp;\u041d\u0430\u041a\u043b\u0438\u0435\u043d\u0442\u0435<\/p>\n<p>\u041f\u0435\u0440\u0435\u043c \u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430, \u041f\u0443\u0442\u044c\u041a\u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435;<\/p>\n<p>&amp;\u041d\u0430\u041a\u043b\u0438\u0435\u043d\u0442\u0435<\/p>\n<p>\u041f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c(\u041a\u043e\u043c\u0430\u043d\u0434\u0430) \/\/\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b (\u043a\u043d\u043e\u043f\u043a\u0438)<\/p>\n<p>\u041f\u0443\u0442\u044c\u041a\u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435=&#187;\/home\/delphin\/ProjectQt\/estern_lib2\/build-ttyAddin-Desktop_Qt_6_3_0_GCC_64bit-Release\/libttyAddin.so&#187;;<\/p>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f = \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0412\u043d\u0435\u0448\u043d\u044e\u044e\u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0443(\u041f\u0443\u0442\u044c\u041a\u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435, &#171;libextDLib&#187;, \u0422\u0438\u043f\u0412\u043d\u0435\u0448\u043d\u0435\u0439\u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b.Native);<\/p>\n<p>\u0421\u043e\u043e\u0431\u0449\u0438\u0442\u044c (&#171;\u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0430 &#8212; &#187; + \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f );<\/p>\n<p>\u041f\u043e\u043f\u044b\u0442\u043a\u0430<\/p>\n<p>\u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 = \u043d\u043e\u0432\u044b\u0439 (&#171;AddIn.libextDLib.TTY&#187;);<\/p>\n<p>\u0421\u043e\u043e\u0431\u0449\u0438\u0442\u044c (&#171;\u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0430&#187;);<\/p>\n<p>\u0418\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/p>\n<p>\u0421\u043e\u043e\u0431\u0449\u0438\u0442\u044c (&#171;\u043d\u0435\u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0443&#187;);<\/p>\n<p>\u041a\u043e\u043d\u0435\u0446\u041f\u043e\u043f\u044b\u0442\u043a\u0438;<\/p>\n<p>\u041a\u043e\u043d\u0435\u0446\u041f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u044b<\/p>\n<p>\u00a0<\/p>\n<p>\u0412 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u00ab\u0437\u0430\u043f\u0443\u0441\u043a \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 \u0422\u043e\u043b\u0441\u0442\u043e\u0433\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u0430\u00bb, \u0442\u0430\u043a \u043a\u0430\u043a \u0434\u043b\u044f \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044f \u043a\u043e\u0434\u0430 \u043c\u044b \u0432\u0441\u0451 \u043d\u0430\u043f\u0438\u0441\u0430\u043b\u0438 \u043d\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0435.<\/p>\n<p>\u041e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e, \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c. \u0415\u0441\u043b\u0438 \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439 \u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u043e\u0431 \u043e\u0448\u0438\u0431\u043a\u0430\u0445, \u0442\u043e \u0432\u0441\u0451 \u0432 \u043f\u043e\u0440\u044f\u0434\u043a\u0435, \u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0442\u044c \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0443\u044e \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u043d\u0430\u0448\u0435\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0439.<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p><strong>\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432. (\u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b)<\/strong><\/p>\n<p>\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443\u00a0\u043c\u044b\u00a0\u0441\u0442\u0430\u0432\u0438\u043b\u0438\u00a0\u043f\u0435\u0440\u0435\u0434 \u0441\u043e\u0431\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0443\u00a0\u043f\u0440\u0438\u043a\u0440\u0443\u0442\u0438\u0442\u044c \u043a 1\u0421 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u043e\u0440\u0442 \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u043e\u0442 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 \u0447\u0435\u0440\u0435\u0437 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b rs-232, rs-422, rs-485, \u0442\u043e \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432 \u043d\u0430\u0448\u0435\u043c \u043a\u043b\u0430\u0441\u0441\u0435 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434\u044b \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u043f\u043e\u0440\u0442\u043e\u043c. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430 \u044f \u0432\u044b\u0431\u0440\u0430\u043b \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0443\u044e \u0421\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443\u00a0termios.h<\/p>\n<p>\u041f\u043e\u0447\u0435\u043c\u0443 \u043d\u0435\u00a0QserialPort:<\/p>\n<p>1. \u041c\u044b \u043f\u0438\u0448\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440 \u043f\u043e\u0434 Linux (\u043a\u0440\u043e\u0441\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u043d\u0435 \u043a\u0440\u0438\u0442\u0438\u0447\u043d\u0430).<\/p>\n<p>2.\u00a0termios.h\u00a0\u0431\u043e\u043b\u0435\u0435 \u0431\u044b\u0441\u0442\u0440\u0430\u044f \u0438 \u0442\u0440\u0430\u0442\u0438\u0442 \u043c\u0435\u043d\u044c\u0448\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432.<\/p>\n<p>3. \u0412 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435 \u043d\u0435\u043b\u044c\u0437\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0446\u0438\u043a\u043b \u0441\u043e\u0431\u044b\u0442\u0438\u0439, \u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0438\u0433\u043d\u0430\u043b\u044b \u0438 \u0441\u043b\u043e\u0442\u044b (\u0434\u0430\u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u043e\u0442\u043e\u043a\u0438, \u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c) \u0432\u0441\u0451 \u044d\u0442\u043e \u0441\u0432\u043e\u0434\u0438\u0442 \u043f\u043b\u044e\u0441\u044b Qt \u043d\u0430 \u043d\u0435\u0442.<\/p>\n<p>4. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f\u00a0termios.h\u00a0\u043c\u043e\u0436\u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0430\u043c\u044b\u0435 \u044d\u043a\u0437\u043e\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0438 \u0440\u0435\u0436\u0438\u043c\u044b \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u043e\u0440\u0442\u0430 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0441\u0442\u0430\u0440\u044b\u0439 \u0441\u043e\u0432\u0435\u0442\u0441\u043a\u0438\u0439 \u043f\u0440\u0438\u043d\u0442\u0435\u0440 Robotron).<\/p>\n<p>\u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434\u044b \u00ab\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043f\u043e\u0440\u0442\u0430\u00bb, \u00ab\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u043e\u0440\u0442\u0430\u00bb, \u00ab\u041e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043f\u043e\u0440\u0442\u0430\u00bb, \u00ab\u041f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0434\u0430\u043d\u043d\u044b\u0445\u00bb, \u00ab\u041f\u0440\u0438\u0451\u043c\u0430 \u0434\u0430\u043d\u043d\u044b\u0445\u00bb. \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443 \u044f \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b \u043e\u0434\u043d\u0438\u043c \u043c\u0435\u0442\u043e\u0434\u043e\u043c\u00a0ConnectPort,\u00a0\u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u043e\u043c\u00a0DisconnectPort, \u0447\u0442\u0435\u043d\u0438\u0435 \u0438 \u0437\u0430\u043f\u0438\u0441\u044c \u043c\u0435\u0442\u043e\u0434\u0430\u043c\u0438 -ReadPort\u00a0\u0438\u00a0SendToPort. \u0422\u0430\u043a \u0436\u0435 \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 1\u0421 \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u00a0\u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e\u00a0ExternalEvent \u0434\u043b\u044f \u0447\u0435\u0433\u043e \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b \u043c\u0435\u0442\u043e\u0434\u044b\u00a0ExternalEvent, CleanEventBuffer, GetEventBufferDepth<\/p>\n<p>\u00a0<\/p>\n<p>ttyAddin.h<\/p>\n<pre><code>#ifndef TTYADDIN_H #define TTYADDIN_H #include \"ttyAddin_global.h\" #include \"Component.h\" \/\/ C library headers #include &lt;iostream> #include &lt;string> \/\/ Linux headers #include &lt;fcntl.h>   \/\/ Contains file controls like O_RDWR #include &lt;errno.h>   \/\/ Error integer and strerror() function #include &lt;termios.h> \/\/ Contains POSIX terminal control definitions #include &lt;unistd.h>  \/\/ write(), read(), close() class TTYADDIN_EXPORT TtyAddin : public Component { public:     const char *Version = u8\"1.0.0\";    \/\/\u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0432 \u0448\u0430\u0431\u043b\u043e\u043d\u0435 \u0432\u0435\u0440\u0441\u0438\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430     explicit TtyAddin();     variant_t ConnectPort (const variant_t &amp;, const variant_t &amp;);\/\/ \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u0430 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u043e\u0440\u0442\u0430 \u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a \u043d\u0435\u043c\u0443     void DisconnectPort(void);  \/\/\u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u0430 \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043e\u0442 \u043f\u043e\u0440\u0442\u0430     void ReadPort ();           \/\/\u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u0430 \u0447\u0442\u0435\u043d\u0438\u044f \u0431\u0443\u0444\u0435\u0440\u0430 \u043f\u043e\u0440\u0442\u0430     void SendToPort (const variant_t &amp;);    \/\/\u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0441\u0442\u0440\u043e\u043a\u0438 \u0432 \u043f\u043e\u0440\u0442     std::string extensionName() override;   \/\/\u043d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u043b\u0430\u0441\u0441\u0430 private:     \/\/\u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u043f\u0440\u043e\u0443\u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b     bool ExternalEvent(const std::string &amp;, const std::string &amp;, const std::string &amp;);     bool SetEventBufferDepth(long);     long GetEventBufferDepth();     int serial_port;     \/\/\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0434\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440\u0430 \u043f\u043e\u0440\u0442\u0430     struct termios tty;  \/\/\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u043f\u043e\u0440\u0442\u0430     char read_buf [256]; \/\/\u0431\u0443\u0444\u0435\u0440 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0433\u043e \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u043d\u044f\u0442\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445     \/\/std::string str;     std::string PortNameStr;\/\/\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u043f\u0443\u0442\u0438 \u043a \u043f\u043e\u0440\u0442\u0443     std::shared_ptr&lt;variant_t> sample_property; \/\/\u043d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043e \u0432 1\u0441 }; #endif \/\/ TTYADDIN_H<\/code><\/pre>\n<p>\u00a0<\/p>\n<p>\u00a0<\/p>\n<p>ttyAddin.cpp<\/p>\n<pre><code>#include \"ttyaddin.h\" std::string TtyAddin::extensionName() { \/\/ \u043d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043e \u0432 1\u0441     return \"TTY\"; } TtyAddin::TtyAddin() {     \/\/ Universal property. Could store any supported by native api type.    \/\/\u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0432 \u0448\u0430\u0431\u043b\u043e\u043d\u0435     sample_property = std::make_shared&lt;variant_t>();     AddProperty(L\"SampleProperty\", L\"\u041e\u0431\u0440\u0430\u0437\u0435\u0446\u0421\u0432\u043e\u0439\u0441\u0442\u0432\u0430\", sample_property);     \/\/ Full featured property registration example      \/\/\u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0432 \u0448\u0430\u0431\u043b\u043e\u043d\u0435     AddProperty(L\"Version\", L\"\u0412\u0435\u0440\u0441\u0438\u044f\u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b\", [&amp;]() {         auto s = std::string(Version);         return std::make_shared&lt;variant_t>(std::move(s));     });     \/\/\u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044f \u043c\u0435\u0442\u043e\u0434\u043e\u0432     \/\/\u0423\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 1\u0421 \u0438 \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 \u043d\u0438\u043c\u0438 \u043c\u0435\u0442\u043e\u0434\u044b \u043a\u043b\u0430\u0441\u0441\u0430     AddMethod(L\"\u0421onnect\", L\"\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u041f\u043e\u0440\u0442\", this, &amp;TtyAddin::ConnectPort);     AddMethod(L\"Disconnect\", L\"\u041e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u041f\u043e\u0440\u0442\", this, &amp;TtyAddin::DisconnectPort);     AddMethod(L\"Read\", L\"\u0427\u0438\u0442\u0430\u0442\u044c\u041f\u043e\u0440\u0442\", this, &amp;T<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-333388","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/333388","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=333388"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/333388\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=333388"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=333388"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=333388"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}