\doxysection{E\+:/.WORK/\+STM32/\+Diod\+\_\+\+Test/diode\+\_\+tester/\+Core/\+Modbus/\+Src/modbus\+\_\+inputregs.c File Reference} \hypertarget{modbus__inputregs_8c}{}\label{modbus__inputregs_8c}\index{E:/.WORK/STM32/Diod\_Test/diode\_tester/Core/Modbus/Src/modbus\_inputregs.c@{E:/.WORK/STM32/Diod\_Test/diode\_tester/Core/Modbus/Src/modbus\_inputregs.c}} Реализация работы с входными регистрами Modbus. {\ttfamily \#include "{}modbus\+\_\+inputregs.\+h"{}}\newline Include dependency graph for modbus\+\_\+inputregs.\+c\+:\nopagebreak \begin{figure}[H] \begin{center} \leavevmode \includegraphics[width=350pt]{modbus__inputregs_8c__incl} \end{center} \end{figure} \doxysubsubsection*{Functions} \begin{DoxyCompactItemize} \item \mbox{\hyperlink{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_ga4ade64cb3fabf37f010c1e297489980c}{MB\+\_\+\+Exception\+Type\+Def}} \mbox{\hyperlink{group___m_o_d_b_u_s___d_a_t_a___a_c_c_e_s_s___f_u_n_c_t_i_o_n_s_gafb57a29488a549d1c585234945549f2e}{MB\+\_\+\+Input\+\_\+\+Write\+\_\+\+Global}} (uint16\+\_\+t Addr, uint16\+\_\+t Write\+Val) \begin{DoxyCompactList}\small\item\em Записать входной регистр по глобальному адресу. \end{DoxyCompactList}\item uint16\+\_\+t \mbox{\hyperlink{group___m_o_d_b_u_s___d_a_t_a___a_c_c_e_s_s___f_u_n_c_t_i_o_n_s_ga28d00cd1df2a46a7a9a6a1b1fce99826}{MB\+\_\+\+Input\+\_\+\+Read\+\_\+\+Global}} (uint16\+\_\+t Addr, \mbox{\hyperlink{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_ga4ade64cb3fabf37f010c1e297489980c}{MB\+\_\+\+Exception\+Type\+Def}} \texorpdfstring{$\ast$}{*}Exception) \begin{DoxyCompactList}\small\item\em Считать входной регистр по глобальному адресу. \end{DoxyCompactList}\item 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_gad13d010f43c7ab08a85667b9e1906b7d}{MB\+\_\+\+Process\+\_\+\+Read\+\_\+\+Input\+\_\+\+Regs}} (\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \texorpdfstring{$\ast$}{*}modbus\+\_\+msg) \begin{DoxyCompactList}\small\item\em Обработать функцию Read Input Registers (04 -\/ 0x04). \end{DoxyCompactList}\end{DoxyCompactItemize} \doxysubsection{Detailed Description} Реализация работы с входными регистрами Modbus. Модуль для доступа к регистрам внутри программы\+: \begin{DoxyItemize} \item Функции для доступа к входным регистрам по глобальным адресам \end{DoxyItemize} Модуль обработки команды чтения input registers (0x04)\+:\hypertarget{modbus__inputregs_8c_ivalid}{}\doxysubsection{\texorpdfstring{Валидация данных\+:}{Валидация данных\+:}}\label{modbus__inputregs_8c_ivalid} \begin{DoxyItemize} \item Проверка соответствия количества байт и регистров \item Валидация адресов через \doxylink{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_ga1e90bb28a4cf997250daab6470d5ffe3}{MB\+\_\+\+Define\+Registers\+Address()} \item Обработка исключений при некорректных запросах \end{DoxyItemize} Definition in file \mbox{\hyperlink{modbus__inputregs_8c_source}{modbus\+\_\+inputregs.\+c}}.