\doxysection{modbus\+\_\+devid.\+h} \hypertarget{modbus__devid_8h_source}{}\label{modbus__devid_8h_source}\index{E:/.WORK/STM32/Diod\_Test/diode\_tester/Core/Modbus/Inc/modbus\_devid.h@{E:/.WORK/STM32/Diod\_Test/diode\_tester/Core/Modbus/Inc/modbus\_devid.h}} \mbox{\hyperlink{modbus__devid_8h}{Go to the documentation of this file.}} \begin{DoxyCode}{0} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00001}00001\ \textcolor{comment}{/**}} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00002}00002\ \textcolor{comment}{*******************************************************************************}} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00003}00003\ \textcolor{comment}{*\ @file\ modbus\_devid.h}} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00004}00004\ \textcolor{comment}{*\ @brief\ Идентификаторы\ устройства\ Modbus}} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00005}00005\ \textcolor{comment}{*******************************************************************************}} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00006}00006\ \textcolor{comment}{@addtogroup\ MODBUS\_DEVID\ Device\ Identifications\ Tools}} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00007}00007\ \textcolor{comment}{@ingroup\ MODBUS\_INTERNAL}} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00008}00008\ \textcolor{comment}{@brief\ Функции\ для\ работы\ с\ идентификаторами\ устройства}} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00009}00009\ \textcolor{comment}{*******************************************************************************}} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00010}00010\ \textcolor{comment}{*\ @details}} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00011}00011\ \textcolor{comment}{Модуль\ реализации\ функции\ Read\ Device\ Identifications\ (0x2B):}} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00012}00012\ \textcolor{comment}{-\/\ Базовая\ идентификация\ (Vendor,\ Product,\ Revision)}} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00013}00013\ \textcolor{comment}{-\/\ Расширенная\ идентификация\ (URL,\ Model,\ User\ fields)}} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00014}00014\ \textcolor{comment}{-\/\ Поддержка\ потоковой\ передачи\ больших\ объектов}} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00015}00015\ \textcolor{comment}{}} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00016}00016\ \textcolor{comment}{@section\ devobj\ Объекты\ идентификации:}} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00017}00017\ \textcolor{comment}{-\/\ VendorName,\ ProductCode,\ Revision\ -\/\ обязательные}} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00018}00018\ \textcolor{comment}{-\/\ VendorUrl,\ ProductName,\ ModelName\ -\/\ опциональные}} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00019}00019\ \textcolor{comment}{-\/\ User\ objects\ -\/\ пользовательские\ поля}} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00020}00020\ \textcolor{comment}{-\/\ Поддержка\ до\ 128\ пользовательских\ объектов}} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00021}00021\ \textcolor{comment}{******************************************************************************/}} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00022}00022\ \textcolor{preprocessor}{\#ifndef\ \_\_MODBUS\_DEVID\_H\_}} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00023}00023\ \textcolor{preprocessor}{\#define\ \_\_MODBUS\_DEVID\_H\_\ }} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00024}00024\ \textcolor{preprocessor}{\#include\ "{}\mbox{\hyperlink{modbus__core_8h}{modbus\_core.h}}"{}}} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00025}00025\ } \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00026}00026\ \textcolor{comment}{}} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00027}00027\ \textcolor{comment}{/////////////////////////////////////////////////////////////////////}} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00028}00028\ \textcolor{comment}{///////////////-\/-\/-\/DEVICE\ IDENTIVICATIONS\ DEFINES-\/-\/-\///////////////////}} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00029}00029\ \textcolor{comment}{}} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00030}00030\ \textcolor{comment}{/**}} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00031}00031\ \textcolor{comment}{\ \ *\ @addtogroup\ MODBUS\_DEVID}} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00032}00032\ \textcolor{comment}{\ \ *\ @\{}} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00033}00033\ \textcolor{comment}{\ \ */}} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00034}00034\ \ \ } \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00035}00035\ \textcolor{preprocessor}{\#if\ MODBUS\_NUMB\_OF\_USEROBJECTS\ >\ 0}} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00036}00036\ \textcolor{preprocessor}{\#define\ MODBUS\_DEVICE\_CONFORMITY\ 0x83}} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00037}00037\ \textcolor{preprocessor}{\#else}} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00038}00038\ \textcolor{preprocessor}{\#define\ MODBUS\_DEVICE\_CONFORMITY\ 0x82}} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00039}00039\ \textcolor{preprocessor}{\#endif}} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00040}00040\ \textcolor{comment}{}} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00041}00041\ \textcolor{comment}{/**\ @brief\ Структура\ для\ объекта\ (идентификатора\ устройства\ модбас)\ */}} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00042}\mbox{\hyperlink{struct_m_b___device_object_type_def}{00042}}\ \textcolor{keyword}{typedef}\ \textcolor{keyword}{struct}} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00043}00043\ \{} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00044}00044\ \ \ \textcolor{keywordtype}{unsigned}\ \ length;} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00045}00045\ \ \ \textcolor{keywordtype}{char}\ \ \ \ \ \ *name;} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00046}00046\ \}\mbox{\hyperlink{struct_m_b___device_object_type_def}{MB\_DeviceObjectTypeDef}};} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00047}00047\ \textcolor{comment}{}} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00048}00048\ \textcolor{comment}{/**\ @brief\ Структура\ со\ идентификаторами\ устройства\ модбас\ */}} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00049}\mbox{\hyperlink{struct_m_b___device_identifications_type_def}{00049}}\ \textcolor{keyword}{typedef}\ \textcolor{keyword}{struct}} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00050}00050\ \{} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00051}00051\ \ \ \mbox{\hyperlink{struct_m_b___device_object_type_def}{MB\_DeviceObjectTypeDef}}\ \ VendorName;} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00052}00052\ \ \ \mbox{\hyperlink{struct_m_b___device_object_type_def}{MB\_DeviceObjectTypeDef}}\ \ ProductCode;} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00053}00053\ \ \ \mbox{\hyperlink{struct_m_b___device_object_type_def}{MB\_DeviceObjectTypeDef}}\ \ Revision;} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00054}00054\ \ \ \mbox{\hyperlink{struct_m_b___device_object_type_def}{MB\_DeviceObjectTypeDef}}\ \ VendorUrl;} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00055}00055\ \ \ \mbox{\hyperlink{struct_m_b___device_object_type_def}{MB\_DeviceObjectTypeDef}}\ \ ProductName;} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00056}00056\ \ \ \mbox{\hyperlink{struct_m_b___device_object_type_def}{MB\_DeviceObjectTypeDef}}\ \ ModelName;} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00057}00057\ \ \ \mbox{\hyperlink{struct_m_b___device_object_type_def}{MB\_DeviceObjectTypeDef}}\ \ UserApplicationName;} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00058}00058\ \ \ } \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00059}00059\ \ \ \mbox{\hyperlink{struct_m_b___device_object_type_def}{MB\_DeviceObjectTypeDef}}\ \ Reserved[0x79];} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00060}00060\ \ \ } \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00061}00061\ \ \ \mbox{\hyperlink{struct_m_b___device_object_type_def}{MB\_DeviceObjectTypeDef}}\ \ User[\mbox{\hyperlink{group___m_o_d_b_u_s___c_o_n_f_i_g_s_ga5c7e9c2180ceac1208f4b791d7b70a0a}{MODBUS\_NUMB\_OF\_USEROBJECTS}}];} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00062}00062\ \}\mbox{\hyperlink{struct_m_b___device_identifications_type_def}{MB\_DeviceIdentificationsTypeDef}};} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00063}00063\ \textcolor{keyword}{extern}\ \mbox{\hyperlink{struct_m_b___device_identifications_type_def}{MB\_DeviceIdentificationsTypeDef}}\ \mbox{\hyperlink{group___m_o_d_b_u_s___d_e_v_i_d_ga0aaf735fcb26fa61af6f7f4895802b90}{MB\_DEVID}};} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00064}00064\ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{group___m_o_d_b_u_s___d_e_v_i_d_ga2b93352920bf3c6da0f67cfbaef3d572}{MB\_DeviceInentificationInit}}(\textcolor{keywordtype}{void});\textcolor{comment}{}} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00065}00065\ \textcolor{comment}{///////////////-\/-\/-\/DEVICE\ IDENTIVICATIONS\ DEFINES-\/-\/-\///////////////////}} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00066}00066\ } \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00067}00067\ \textcolor{comment}{}} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00068}00068\ \textcolor{comment}{/////////////////////////////////////////////////////////////////////}} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00069}00069\ \textcolor{comment}{////////////////////-\/-\/-\/MODBUS\ FUNCTION\ DEFINES-\/-\/-\/////////////////////}} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00070}00070\ \textcolor{comment}{}} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00071}00071\ \textcolor{comment}{/**}} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00072}00072\ \textcolor{comment}{\ \ *\ @brief\ \ \ \ Инициализация\ объектов}} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00073}00073\ \textcolor{comment}{\ \ *\ @details\ \ С\ помозью\ этого\ дефайна\ инициализируются\ объекты\ в\ @ref\ MB\_DeviceInentificationInit}} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00074}00074\ \textcolor{comment}{\ \ */}} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00075}\mbox{\hyperlink{group___m_o_d_b_u_s___d_e_v_i_d_gae5e66049f0dc66382999cf52cdeba38e}{00075}}\ \textcolor{preprocessor}{\#define\ MB\_ObjectInit(\_p\_obj\_,\ \_userstring\_)\ \(\backslash\)}} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00076}00076\ \textcolor{preprocessor}{(\_p\_obj\_)-\/>length\ \ =\ sizeof(\_userstring\_);\(\backslash\)}} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00077}00077\ \textcolor{preprocessor}{(\_p\_obj\_)-\/>name\ \ \ \ =\ \_userstring\_;}\textcolor{comment}{}} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00078}00078\ \textcolor{comment}{/**}} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00079}00079\ \textcolor{comment}{\ \ *\ @brief\ \ \ \ Инициализация\ пользовательских\ объектов}} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00080}00080\ \textcolor{comment}{\ \ *\ @details\ \ С\ помозью\ этого\ дефайна\ инициализируются\ пользовательские\ объекты\ в\ MB\_DeviceInentificationInit}} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00081}00081\ \textcolor{comment}{\ \ */}\textcolor{preprocessor}{}} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00082}\mbox{\hyperlink{group___m_o_d_b_u_s___d_e_v_i_d_ga090d04bdaee6827a9a620d149efd4978}{00082}}\ \textcolor{preprocessor}{\#define\ MB\_UserObjectInit(\_pinfostruct\_,\ \_user\_numb\_)\ \ \ MB\_ObjectInit(\&(\_pinfostruct\_)-\/>User[\_user\_numb\_],\ MODBUS\_USEROBJECT\#\#\_user\_numb\_\#\#\_NAME)}} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00083}00083\ } \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00084}00084\ } \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00085}00085\ \ \ \ \ \textcolor{comment}{}} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00086}00086\ \textcolor{comment}{/**\ MODBUS\_DEVID}} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00087}00087\ \textcolor{comment}{*\ @\}\ }} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00088}00088\ \textcolor{comment}{*/}\textcolor{comment}{}} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00089}00089\ \textcolor{comment}{////////////////////-\/-\/-\/MODBUS\ MESSAGE\ DEFINES-\/-\/-\//////////////////////}} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00090}00090\ } \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00091}00091\ } \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00092}00092\ \textcolor{comment}{}} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00093}00093\ \textcolor{comment}{/////////////////////////////////////////////////////////////////////}} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00094}00094\ \textcolor{comment}{/////////////////////////-\/-\/-\/FUNCTIONS-\/-\/-\//////////////////////////////}} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00095}00095\ \ \ \textcolor{comment}{}} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00096}00096\ \textcolor{comment}{/**}} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00097}00097\ \textcolor{comment}{\ \ *\ @addtogroup\ MODBUS\_DEVID}} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00098}00098\ \textcolor{comment}{\ \ *\ @\{}} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00099}00099\ \textcolor{comment}{\ \ */}} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00100}00100\ \ \ } \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00101}00101\ \textcolor{comment}{/*\ Записать\ Один\ Объект\ Идентификатора\ в\ массив\ данных\ */}} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00102}00102\ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{group___m_o_d_b_u_s___d_e_v_i_d_ga7c0638d252c74d0c1ef047ff23e43b3f}{MB\_WriteSingleObjectToMessage}}(\textcolor{keywordtype}{char}\ *mbdata,\ \textcolor{keywordtype}{unsigned}\ *ind,\ \mbox{\hyperlink{struct_m_b___device_object_type_def}{MB\_DeviceObjectTypeDef}}\ *obj);} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00103}00103\ \textcolor{comment}{/*\ Записать\ Массив\ Объектов\ Идентификатора\ в\ массив\ данных\ */}} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00104}00104\ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{group___m_o_d_b_u_s___d_e_v_i_d_gaf864599c95934d63f854a038e3bdccb0}{MB\_WriteObjectsToMessage}}(\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\_MsgTypeDef}}\ *modbus\_msg,\ \textcolor{keywordtype}{unsigned}\ maxidofobj);} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00105}00105\ \textcolor{comment}{}} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00106}00106\ \textcolor{comment}{/**\ MODBUS\_DEVID}} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00107}00107\ \textcolor{comment}{\ \ *\ @\}\ }} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00108}00108\ \textcolor{comment}{\ \ */}} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00109}00109\ \ \textcolor{comment}{}} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00110}00110\ \textcolor{comment}{/**\ }} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00111}00111\ \textcolor{comment}{\ \ *\ @addtogroup\ MODBUS\_CMD\_PROCESS\_FUNCTIONS}} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00112}00112\ \textcolor{comment}{\ \ *\ @\{}} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00113}00113\ \textcolor{comment}{\ \ */}} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00114}00114\ \ \ } \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00115}00115\ \textcolor{comment}{/*\ Обработать\ функцию\ Read\ Device\ Identifications\ (43/14\ -\/\ 0x2B/0E)\ */}} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00116}00116\ uint8\_t\ \mbox{\hyperlink{group___m_o_d_b_u_s___c_m_d___p_r_o_c_e_s_s___f_u_n_c_t_i_o_n_s_ga279ce6d9d175a43714862dc6661e7096}{MB\_Process\_Read\_Device\_Identifications}}(\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\_MsgTypeDef}}\ *modbus\_msg);\textcolor{comment}{}} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00117}00117\ \textcolor{comment}{/**\ MODBUS\_CMD\_PROCESS\_FUNCTIONS}} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00118}00118\ \textcolor{comment}{\ \ *\ @\}\ }} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00119}00119\ \textcolor{comment}{\ \ */}\textcolor{comment}{}} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00120}00120\ \textcolor{comment}{/////////////////////////-\/-\/-\/FUNCTIONS-\/-\/-\//////////////////////////////}} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00121}00121\ } \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00122}00122\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{//\_\_MODBUS\_DEVID\_H\_}} \DoxyCodeLine{\Hypertarget{modbus__devid_8h_source_l00123}00123\ } \end{DoxyCode}