\doxysubsubsection{Modbus Message Tools }
\hypertarget{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s}{}\label{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s}\index{Modbus Message Tools@{Modbus Message Tools}}


Определения протокола модбас  


Collaboration diagram for Modbus Message Tools\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=346pt]{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s}
\end{center}
\end{figure}
\doxysubsubsubsubsection*{Classes}
\begin{DoxyCompactItemize}
\item 
struct \mbox{\hyperlink{struct_m_b___dev_id_msg_type_def}{MB\+\_\+\+Dev\+Id\+Msg\+Type\+Def}}
\begin{DoxyCompactList}\small\item\em Structure for device identifications message type. \end{DoxyCompactList}\item 
struct \mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}}
\begin{DoxyCompactList}\small\item\em Structure for modbus messsage. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsubsubsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \mbox{\hyperlink{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gae135b86915da05ee9991ef1c50d3527f}{Transaction\+ID\+\_\+size}}~2
\begin{DoxyCompactList}\small\item\em size of (Transaction ID) \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_ga9d21532e66376b674c8bc7523d51350e}{Protocol\+ID\+\_\+size}}~2
\begin{DoxyCompactList}\small\item\em size of (Protocol ID) \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_ga69ca2a9dbd269a5b39dd5d29a7601a12}{PDULength\+\_\+size}}~2
\begin{DoxyCompactList}\small\item\em size of (PDU Length) \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_ga1be71951697002df6f3259ca41dc4853}{Mb\+Addr\+\_\+\+SIZE}}~1
\begin{DoxyCompactList}\small\item\em size of (Slave Addr) \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_ga3372a9da9b653cd351256d2e805a1b5b}{Func\+\_\+\+Code\+\_\+\+SIZE}}~1
\begin{DoxyCompactList}\small\item\em size of (Function Code) \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gab4b8423205cc250a9f050f4fff252d5d}{Addr\+\_\+\+SIZE}}~2
\begin{DoxyCompactList}\small\item\em size of (Address) \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gab4ed36ca923f2c451475f233124f24c4}{Qnt\+\_\+\+SIZE}}~2
\begin{DoxyCompactList}\small\item\em size of (Quantity) \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_ga2141ab64ec40fd3e7bfaafcf02f1c81b}{Byte\+Cnt\+\_\+\+SIZE}}~1
\begin{DoxyCompactList}\small\item\em size of (Byte Count) \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gaf55149bc1f05cf18af067a302e31e3f9}{DATA\+\_\+\+SIZE}}~125
\begin{DoxyCompactList}\small\item\em maximum number of data\+: DWORD (NOT MESSAGE SIZE) \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gaa93e89217587fdff12bf43b5d7f54f74}{CRC\+\_\+\+SIZE}}~2
\begin{DoxyCompactList}\small\item\em size of (Mb\+CRC) in bytes \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_ga600f4a134e94bc9ddf7a37d8f49cadcc}{INFO\+\_\+\+SIZE\+\_\+\+MAX}}~(\mbox{\hyperlink{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_ga1be71951697002df6f3259ca41dc4853}{Mb\+Addr\+\_\+\+SIZE}}+\mbox{\hyperlink{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_ga3372a9da9b653cd351256d2e805a1b5b}{Func\+\_\+\+Code\+\_\+\+SIZE}}+\mbox{\hyperlink{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gab4b8423205cc250a9f050f4fff252d5d}{Addr\+\_\+\+SIZE}}+\mbox{\hyperlink{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gab4ed36ca923f2c451475f233124f24c4}{Qnt\+\_\+\+SIZE}}+\mbox{\hyperlink{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_ga2141ab64ec40fd3e7bfaafcf02f1c81b}{Byte\+Cnt\+\_\+\+SIZE}})
\begin{DoxyCompactList}\small\item\em Size of whole RTU message. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_ga18eb6d0d9fdb6274341e892e2b41d88b}{RX\+\_\+\+FIRST\+\_\+\+PART\+\_\+\+SIZE}}~\mbox{\hyperlink{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_ga600f4a134e94bc9ddf7a37d8f49cadcc}{INFO\+\_\+\+SIZE\+\_\+\+MAX}}
\begin{DoxyCompactList}\small\item\em Size of first part of message that will be received first receive info part of message, than defines size of rest message. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_ga7d1e9e8bb8f40ce788836da0739f897c}{MSG\+\_\+\+SIZE\+\_\+\+MAX}}~(\mbox{\hyperlink{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_ga600f4a134e94bc9ddf7a37d8f49cadcc}{INFO\+\_\+\+SIZE\+\_\+\+MAX}} + \mbox{\hyperlink{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gaf55149bc1f05cf18af067a302e31e3f9}{DATA\+\_\+\+SIZE}}\texorpdfstring{$\ast$}{*}2 + \mbox{\hyperlink{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gaa93e89217587fdff12bf43b5d7f54f74}{CRC\+\_\+\+SIZE}})
\begin{DoxyCompactList}\small\item\em Size of buffer\+: max size of whole message. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_ga822b0fd9ae9ff25dfa6748473e8e8627}{FC\+\_\+\+ERR\+\_\+\+VALUES\+\_\+\+START}}~0x80U
\begin{DoxyCompactList}\small\item\em from this value starts error func codes \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gaed24f1f06633b92de65f4fab2b4e005b}{MB\+\_\+\+Set\+\_\+\+Arr16\+\_\+\+Ptr}}(\+\_\+arr\+\_\+)
\begin{DoxyCompactList}\small\item\em Macros to set pointer to 16-\/bit array. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_ga938b632e20454741b2a7f97928583776}{MB\+\_\+\+Set\+\_\+\+Register\+\_\+\+Ptr}}(\+\_\+parr\+\_\+,  \+\_\+addr\+\_\+)
\begin{DoxyCompactList}\small\item\em Macros to set pointer to register. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_ga9648b00f955b16e107b901812031cee3}{MB\+\_\+\+Set\+\_\+\+Coil\+\_\+\+Reg\+\_\+\+Ptr}}(\+\_\+parr\+\_\+,  \+\_\+coil\+\_\+)
\begin{DoxyCompactList}\small\item\em Макрос для установки указателя на регистр, содержащий запрашиваемый коил \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_ga6ab08ed18663bc72f80e4e60b30ab429}{MB\+\_\+\+Set\+\_\+\+Coil\+\_\+\+Mask}}(\+\_\+coil\+\_\+)
\begin{DoxyCompactList}\small\item\em Макрос для установки маски, чтобы выделить запрашиваемый коил из регистра \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsubsubsection*{Enumerations}
\begin{DoxyCompactItemize}
\item 
enum \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}} \{ \newline
\mbox{\hyperlink{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gga4ade64cb3fabf37f010c1e297489980caa6980c7a8d924dd975b8fa06a300eb74}{ET\+\_\+\+NO\+\_\+\+ERRORS}} = 0x00
, \mbox{\hyperlink{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gga4ade64cb3fabf37f010c1e297489980cae81af967ab54904738ee391eb7478ad1}{ET\+\_\+\+ILLEGAL\+\_\+\+FUNCTION}} = 0x01
, \mbox{\hyperlink{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gga4ade64cb3fabf37f010c1e297489980caea312adaf18aa7ebd17aca8883550425}{ET\+\_\+\+ILLEGAL\+\_\+\+DATA\+\_\+\+ADDRESS}} = 0x02
, \mbox{\hyperlink{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gga4ade64cb3fabf37f010c1e297489980ca47d6168d0692ccb7e09e19084287aba3}{ET\+\_\+\+ILLEGAL\+\_\+\+DATA\+\_\+\+VALUE}} = 0x03
, \newline
\mbox{\hyperlink{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gga4ade64cb3fabf37f010c1e297489980cacae4572933c1b43491d452f912341277}{ET\+\_\+\+SLAVE\+\_\+\+DEVICE\+\_\+\+FAILURE}} = 0x04
 \}
\begin{DoxyCompactList}\small\item\em Enum for modbus exception codes. \end{DoxyCompactList}\item 
enum \mbox{\hyperlink{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_ga38d42495bf262b70048e6d6a7af175d2}{MB\+\_\+\+Functon\+Type\+Def}} \{ \newline
\mbox{\hyperlink{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gga38d42495bf262b70048e6d6a7af175d2a399bcd53bc32faca81bbc3d1ff8b5bb6}{FC\+\_\+\+R\+\_\+\+COILS}} = 0x01
, \mbox{\hyperlink{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gga38d42495bf262b70048e6d6a7af175d2a438c348676901d3e0263fd1f8d94bf11}{FC\+\_\+\+R\+\_\+\+DISC\+\_\+\+IN}} = 0x02
, \mbox{\hyperlink{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gga38d42495bf262b70048e6d6a7af175d2ae03921b16750ef290fdd7d19a08a29a2}{FC\+\_\+\+R\+\_\+\+HOLD\+\_\+\+REGS}} = 0x03
, \mbox{\hyperlink{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gga38d42495bf262b70048e6d6a7af175d2a76139e9b7ae78856fd3a297c9f751944}{FC\+\_\+\+R\+\_\+\+IN\+\_\+\+REGS}} = 0x04
, \newline
\mbox{\hyperlink{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gga38d42495bf262b70048e6d6a7af175d2a832b94af2c427d0daae721da2528f44a}{FC\+\_\+\+W\+\_\+\+COIL}} = 0x05
, \mbox{\hyperlink{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gga38d42495bf262b70048e6d6a7af175d2a1b66683f704ef9072329e997312e3b83}{FC\+\_\+\+W\+\_\+\+HOLD\+\_\+\+REG}} = 0x06
, \mbox{\hyperlink{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gga38d42495bf262b70048e6d6a7af175d2a43a1b810697ea15ef91008dbc0187127}{FC\+\_\+\+W\+\_\+\+COILS}} = 0x0F
, \mbox{\hyperlink{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gga38d42495bf262b70048e6d6a7af175d2affa24c54ee0b59e9810f1dbdc949e684}{FC\+\_\+\+W\+\_\+\+HOLD\+\_\+\+REGS}} = 0x10
, \newline
\mbox{\hyperlink{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gga38d42495bf262b70048e6d6a7af175d2aa6423de9e908dc38ce9f1c8027ad72ec}{FC\+\_\+\+R\+\_\+\+DIAGNOSTICS}} = 0x08
, \mbox{\hyperlink{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gga38d42495bf262b70048e6d6a7af175d2a37ddf147e08b6d205319c31e6750d47c}{FC\+\_\+\+R\+\_\+\+DEVICE\+\_\+\+ID}} = 0x2B
, \mbox{\hyperlink{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gga38d42495bf262b70048e6d6a7af175d2a730c5f56799669c612945a55aa9494c4}{FC\+\_\+\+ERR\+\_\+\+R\+\_\+\+COILS}} = FC\+\_\+\+R\+\_\+\+COILS + FC\+\_\+\+ERR\+\_\+\+VALUES\+\_\+\+START
, \mbox{\hyperlink{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gga38d42495bf262b70048e6d6a7af175d2a592aee113b711b5976ce914f727c9f77}{FC\+\_\+\+ERR\+\_\+\+R\+\_\+\+DISC\+\_\+\+IN}} = FC\+\_\+\+R\+\_\+\+DISC\+\_\+\+IN + FC\+\_\+\+ERR\+\_\+\+VALUES\+\_\+\+START
, \newline
\mbox{\hyperlink{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gga38d42495bf262b70048e6d6a7af175d2ad7f2601e81f84b15cc898c490e429dd5}{FC\+\_\+\+ERR\+\_\+\+R\+\_\+\+IN\+\_\+\+REGS}} = FC\+\_\+\+R\+\_\+\+IN\+\_\+\+REGS + FC\+\_\+\+ERR\+\_\+\+VALUES\+\_\+\+START
, \mbox{\hyperlink{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gga38d42495bf262b70048e6d6a7af175d2abe215454c122b35aa658a8c11b37a258}{FC\+\_\+\+ERR\+\_\+\+R\+\_\+\+HOLD\+\_\+\+REGS}} = FC\+\_\+\+R\+\_\+\+HOLD\+\_\+\+REGS + FC\+\_\+\+ERR\+\_\+\+VALUES\+\_\+\+START
, \mbox{\hyperlink{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gga38d42495bf262b70048e6d6a7af175d2abaa0b334409929c82ec44960d368114b}{FC\+\_\+\+ERR\+\_\+\+W\+\_\+\+COIL}} = FC\+\_\+\+W\+\_\+\+COIL + FC\+\_\+\+ERR\+\_\+\+VALUES\+\_\+\+START
, \mbox{\hyperlink{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gga38d42495bf262b70048e6d6a7af175d2a21ba95630e4914c2706e8f48f6839e16}{FC\+\_\+\+ERR\+\_\+\+W\+\_\+\+HOLD\+\_\+\+REG}} = FC\+\_\+\+W\+\_\+\+HOLD\+\_\+\+REG + FC\+\_\+\+ERR\+\_\+\+VALUES\+\_\+\+START
, \newline
\mbox{\hyperlink{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gga38d42495bf262b70048e6d6a7af175d2af018f1e1deef493cfa1074583e421cc8}{FC\+\_\+\+ERR\+\_\+\+W\+\_\+\+COILS}} = FC\+\_\+\+W\+\_\+\+COILS + FC\+\_\+\+ERR\+\_\+\+VALUES\+\_\+\+START
, \mbox{\hyperlink{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gga38d42495bf262b70048e6d6a7af175d2a4de9a680cbe955bc5b30f4c497b06ff8}{FC\+\_\+\+ERR\+\_\+\+W\+\_\+\+HOLD\+\_\+\+REGS}} = FC\+\_\+\+W\+\_\+\+HOLD\+\_\+\+REGS + FC\+\_\+\+ERR\+\_\+\+VALUES\+\_\+\+START
, \mbox{\hyperlink{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gga38d42495bf262b70048e6d6a7af175d2a8fd1f1aa92af4555bafd96c835ea473c}{FC\+\_\+\+ERR\+\_\+\+R\+\_\+\+DIAGNOSTIC}} = FC\+\_\+\+R\+\_\+\+DIAGNOSTICS + FC\+\_\+\+ERR\+\_\+\+VALUES\+\_\+\+START
, \mbox{\hyperlink{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gga38d42495bf262b70048e6d6a7af175d2a1577351173a660924f7bf33d4c2ec003}{MB\+\_\+\+FC\+\_\+\+ERR\+\_\+\+R\+\_\+\+DEVICE\+\_\+\+INFO}} = FC\+\_\+\+R\+\_\+\+DEVICE\+\_\+\+ID + FC\+\_\+\+ERR\+\_\+\+VALUES\+\_\+\+START
 \}
\begin{DoxyCompactList}\small\item\em Enum for modbus func codes. \end{DoxyCompactList}\item 
enum \mbox{\hyperlink{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gaeaafeacbd239428c7e59e40d2df16ae2}{MB\+\_\+\+MEIType\+Def}} \{ {\bfseries MEI\+\_\+\+DEVICE\+\_\+\+IDENTIFICATIONS} = 0x0E
 \}
\begin{DoxyCompactList}\small\item\em Enum for MEI func codes. \end{DoxyCompactList}\item 
enum \mbox{\hyperlink{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_ga63c3a2a3adb05f591399e2c4def7c14a}{Read\+Dev\+Id}} \{ \mbox{\hyperlink{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gga63c3a2a3adb05f591399e2c4def7c14aac792ca720b19c89783b70cdeba0c9248}{RID\+\_\+\+BASIC\+\_\+\+IDENTIFICATIONS}} = 0x01
, \mbox{\hyperlink{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gga63c3a2a3adb05f591399e2c4def7c14aab930f13868df5243566759bbcf52a19d}{RID\+\_\+\+REGULAR\+\_\+\+IDENTIFICATIONS}} = 0x02
, \mbox{\hyperlink{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gga63c3a2a3adb05f591399e2c4def7c14aaca82385c8d88d6d762c369b4da4c4db8}{RID\+\_\+\+EXTENDED\+\_\+\+IDENTIFICATIONS}} = 0x03
, \mbox{\hyperlink{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gga63c3a2a3adb05f591399e2c4def7c14aabb8d7527a3aabb1eac974474255d0c5e}{RID\+\_\+\+SPEDIFIC\+\_\+\+IDENTIFICATIONS}} = 0x04
 \}
\begin{DoxyCompactList}\small\item\em Enum for Read Device Id codes. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsubsubsection*{Variables}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \mbox{\hyperlink{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_ga679c526f339999281b97010876e7a295}{MODBUS\+\_\+\+MSG}}
\begin{DoxyCompactList}\small\item\em Default Message Struct for Modbus. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsubsubsection{Detailed Description}
Определения протокола модбас 



\label{doc-define-members}
\Hypertarget{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_doc-define-members}
\doxysubsubsubsection{Macro Definition Documentation}
\Hypertarget{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gae135b86915da05ee9991ef1c50d3527f}\index{Modbus Message Tools@{Modbus Message Tools}!TransactionID\_size@{TransactionID\_size}}
\index{TransactionID\_size@{TransactionID\_size}!Modbus Message Tools@{Modbus Message Tools}}
\doxysubsubsubsubsection{\texorpdfstring{TransactionID\_size}{TransactionID\_size}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gae135b86915da05ee9991ef1c50d3527f} 
\#define Transaction\+ID\+\_\+size~2}



size of (Transaction ID) 



Definition at line \mbox{\hyperlink{modbus__core_8h_source_l00045}{45}} of file \mbox{\hyperlink{modbus__core_8h_source}{modbus\+\_\+core.\+h}}.

\Hypertarget{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_ga9d21532e66376b674c8bc7523d51350e}\index{Modbus Message Tools@{Modbus Message Tools}!ProtocolID\_size@{ProtocolID\_size}}
\index{ProtocolID\_size@{ProtocolID\_size}!Modbus Message Tools@{Modbus Message Tools}}
\doxysubsubsubsubsection{\texorpdfstring{ProtocolID\_size}{ProtocolID\_size}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_ga9d21532e66376b674c8bc7523d51350e} 
\#define Protocol\+ID\+\_\+size~2}



size of (Protocol ID) 



Definition at line \mbox{\hyperlink{modbus__core_8h_source_l00046}{46}} of file \mbox{\hyperlink{modbus__core_8h_source}{modbus\+\_\+core.\+h}}.

\Hypertarget{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_ga69ca2a9dbd269a5b39dd5d29a7601a12}\index{Modbus Message Tools@{Modbus Message Tools}!PDULength\_size@{PDULength\_size}}
\index{PDULength\_size@{PDULength\_size}!Modbus Message Tools@{Modbus Message Tools}}
\doxysubsubsubsubsection{\texorpdfstring{PDULength\_size}{PDULength\_size}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_ga69ca2a9dbd269a5b39dd5d29a7601a12} 
\#define PDULength\+\_\+size~2}



size of (PDU Length) 



Definition at line \mbox{\hyperlink{modbus__core_8h_source_l00047}{47}} of file \mbox{\hyperlink{modbus__core_8h_source}{modbus\+\_\+core.\+h}}.

\Hypertarget{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_ga1be71951697002df6f3259ca41dc4853}\index{Modbus Message Tools@{Modbus Message Tools}!MbAddr\_SIZE@{MbAddr\_SIZE}}
\index{MbAddr\_SIZE@{MbAddr\_SIZE}!Modbus Message Tools@{Modbus Message Tools}}
\doxysubsubsubsubsection{\texorpdfstring{MbAddr\_SIZE}{MbAddr\_SIZE}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_ga1be71951697002df6f3259ca41dc4853} 
\#define Mb\+Addr\+\_\+\+SIZE~1}



size of (Slave Addr) 



Definition at line \mbox{\hyperlink{modbus__core_8h_source_l00048}{48}} of file \mbox{\hyperlink{modbus__core_8h_source}{modbus\+\_\+core.\+h}}.

\Hypertarget{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_ga3372a9da9b653cd351256d2e805a1b5b}\index{Modbus Message Tools@{Modbus Message Tools}!Func\_Code\_SIZE@{Func\_Code\_SIZE}}
\index{Func\_Code\_SIZE@{Func\_Code\_SIZE}!Modbus Message Tools@{Modbus Message Tools}}
\doxysubsubsubsubsection{\texorpdfstring{Func\_Code\_SIZE}{Func\_Code\_SIZE}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_ga3372a9da9b653cd351256d2e805a1b5b} 
\#define Func\+\_\+\+Code\+\_\+\+SIZE~1}



size of (Function Code) 



Definition at line \mbox{\hyperlink{modbus__core_8h_source_l00049}{49}} of file \mbox{\hyperlink{modbus__core_8h_source}{modbus\+\_\+core.\+h}}.

\Hypertarget{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gab4b8423205cc250a9f050f4fff252d5d}\index{Modbus Message Tools@{Modbus Message Tools}!Addr\_SIZE@{Addr\_SIZE}}
\index{Addr\_SIZE@{Addr\_SIZE}!Modbus Message Tools@{Modbus Message Tools}}
\doxysubsubsubsubsection{\texorpdfstring{Addr\_SIZE}{Addr\_SIZE}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gab4b8423205cc250a9f050f4fff252d5d} 
\#define Addr\+\_\+\+SIZE~2}



size of (Address) 



Definition at line \mbox{\hyperlink{modbus__core_8h_source_l00050}{50}} of file \mbox{\hyperlink{modbus__core_8h_source}{modbus\+\_\+core.\+h}}.

\Hypertarget{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gab4ed36ca923f2c451475f233124f24c4}\index{Modbus Message Tools@{Modbus Message Tools}!Qnt\_SIZE@{Qnt\_SIZE}}
\index{Qnt\_SIZE@{Qnt\_SIZE}!Modbus Message Tools@{Modbus Message Tools}}
\doxysubsubsubsubsection{\texorpdfstring{Qnt\_SIZE}{Qnt\_SIZE}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gab4ed36ca923f2c451475f233124f24c4} 
\#define Qnt\+\_\+\+SIZE~2}



size of (Quantity) 



Definition at line \mbox{\hyperlink{modbus__core_8h_source_l00051}{51}} of file \mbox{\hyperlink{modbus__core_8h_source}{modbus\+\_\+core.\+h}}.

\Hypertarget{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_ga2141ab64ec40fd3e7bfaafcf02f1c81b}\index{Modbus Message Tools@{Modbus Message Tools}!ByteCnt\_SIZE@{ByteCnt\_SIZE}}
\index{ByteCnt\_SIZE@{ByteCnt\_SIZE}!Modbus Message Tools@{Modbus Message Tools}}
\doxysubsubsubsubsection{\texorpdfstring{ByteCnt\_SIZE}{ByteCnt\_SIZE}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_ga2141ab64ec40fd3e7bfaafcf02f1c81b} 
\#define Byte\+Cnt\+\_\+\+SIZE~1}



size of (Byte Count) 



Definition at line \mbox{\hyperlink{modbus__core_8h_source_l00052}{52}} of file \mbox{\hyperlink{modbus__core_8h_source}{modbus\+\_\+core.\+h}}.

\Hypertarget{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gaf55149bc1f05cf18af067a302e31e3f9}\index{Modbus Message Tools@{Modbus Message Tools}!DATA\_SIZE@{DATA\_SIZE}}
\index{DATA\_SIZE@{DATA\_SIZE}!Modbus Message Tools@{Modbus Message Tools}}
\doxysubsubsubsubsection{\texorpdfstring{DATA\_SIZE}{DATA\_SIZE}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gaf55149bc1f05cf18af067a302e31e3f9} 
\#define DATA\+\_\+\+SIZE~125}



maximum number of data\+: DWORD (NOT MESSAGE SIZE) 



Definition at line \mbox{\hyperlink{modbus__core_8h_source_l00053}{53}} of file \mbox{\hyperlink{modbus__core_8h_source}{modbus\+\_\+core.\+h}}.

\Hypertarget{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gaa93e89217587fdff12bf43b5d7f54f74}\index{Modbus Message Tools@{Modbus Message Tools}!CRC\_SIZE@{CRC\_SIZE}}
\index{CRC\_SIZE@{CRC\_SIZE}!Modbus Message Tools@{Modbus Message Tools}}
\doxysubsubsubsubsection{\texorpdfstring{CRC\_SIZE}{CRC\_SIZE}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gaa93e89217587fdff12bf43b5d7f54f74} 
\#define CRC\+\_\+\+SIZE~2}



size of (Mb\+CRC) in bytes 



Definition at line \mbox{\hyperlink{modbus__core_8h_source_l00054}{54}} of file \mbox{\hyperlink{modbus__core_8h_source}{modbus\+\_\+core.\+h}}.

\Hypertarget{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_ga600f4a134e94bc9ddf7a37d8f49cadcc}\index{Modbus Message Tools@{Modbus Message Tools}!INFO\_SIZE\_MAX@{INFO\_SIZE\_MAX}}
\index{INFO\_SIZE\_MAX@{INFO\_SIZE\_MAX}!Modbus Message Tools@{Modbus Message Tools}}
\doxysubsubsubsubsection{\texorpdfstring{INFO\_SIZE\_MAX}{INFO\_SIZE\_MAX}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_ga600f4a134e94bc9ddf7a37d8f49cadcc} 
\#define INFO\+\_\+\+SIZE\+\_\+\+MAX~(\mbox{\hyperlink{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_ga1be71951697002df6f3259ca41dc4853}{Mb\+Addr\+\_\+\+SIZE}}+\mbox{\hyperlink{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_ga3372a9da9b653cd351256d2e805a1b5b}{Func\+\_\+\+Code\+\_\+\+SIZE}}+\mbox{\hyperlink{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gab4b8423205cc250a9f050f4fff252d5d}{Addr\+\_\+\+SIZE}}+\mbox{\hyperlink{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gab4ed36ca923f2c451475f233124f24c4}{Qnt\+\_\+\+SIZE}}+\mbox{\hyperlink{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_ga2141ab64ec40fd3e7bfaafcf02f1c81b}{Byte\+Cnt\+\_\+\+SIZE}})}



Size of whole RTU message. 



Definition at line \mbox{\hyperlink{modbus__core_8h_source_l00058}{58}} of file \mbox{\hyperlink{modbus__core_8h_source}{modbus\+\_\+core.\+h}}.

\Hypertarget{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_ga18eb6d0d9fdb6274341e892e2b41d88b}\index{Modbus Message Tools@{Modbus Message Tools}!RX\_FIRST\_PART\_SIZE@{RX\_FIRST\_PART\_SIZE}}
\index{RX\_FIRST\_PART\_SIZE@{RX\_FIRST\_PART\_SIZE}!Modbus Message Tools@{Modbus Message Tools}}
\doxysubsubsubsubsection{\texorpdfstring{RX\_FIRST\_PART\_SIZE}{RX\_FIRST\_PART\_SIZE}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_ga18eb6d0d9fdb6274341e892e2b41d88b} 
\#define RX\+\_\+\+FIRST\+\_\+\+PART\+\_\+\+SIZE~\mbox{\hyperlink{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_ga600f4a134e94bc9ddf7a37d8f49cadcc}{INFO\+\_\+\+SIZE\+\_\+\+MAX}}}



Size of first part of message that will be received first receive info part of message, than defines size of rest message. 



Definition at line \mbox{\hyperlink{modbus__core_8h_source_l00066}{66}} of file \mbox{\hyperlink{modbus__core_8h_source}{modbus\+\_\+core.\+h}}.

\Hypertarget{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_ga7d1e9e8bb8f40ce788836da0739f897c}\index{Modbus Message Tools@{Modbus Message Tools}!MSG\_SIZE\_MAX@{MSG\_SIZE\_MAX}}
\index{MSG\_SIZE\_MAX@{MSG\_SIZE\_MAX}!Modbus Message Tools@{Modbus Message Tools}}
\doxysubsubsubsubsection{\texorpdfstring{MSG\_SIZE\_MAX}{MSG\_SIZE\_MAX}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_ga7d1e9e8bb8f40ce788836da0739f897c} 
\#define MSG\+\_\+\+SIZE\+\_\+\+MAX~(\mbox{\hyperlink{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_ga600f4a134e94bc9ddf7a37d8f49cadcc}{INFO\+\_\+\+SIZE\+\_\+\+MAX}} + \mbox{\hyperlink{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gaf55149bc1f05cf18af067a302e31e3f9}{DATA\+\_\+\+SIZE}}\texorpdfstring{$\ast$}{*}2 + \mbox{\hyperlink{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gaa93e89217587fdff12bf43b5d7f54f74}{CRC\+\_\+\+SIZE}})}



Size of buffer\+: max size of whole message. 



Definition at line \mbox{\hyperlink{modbus__core_8h_source_l00069}{69}} of file \mbox{\hyperlink{modbus__core_8h_source}{modbus\+\_\+core.\+h}}.

\Hypertarget{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_ga822b0fd9ae9ff25dfa6748473e8e8627}\index{Modbus Message Tools@{Modbus Message Tools}!FC\_ERR\_VALUES\_START@{FC\_ERR\_VALUES\_START}}
\index{FC\_ERR\_VALUES\_START@{FC\_ERR\_VALUES\_START}!Modbus Message Tools@{Modbus Message Tools}}
\doxysubsubsubsubsection{\texorpdfstring{FC\_ERR\_VALUES\_START}{FC\_ERR\_VALUES\_START}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_ga822b0fd9ae9ff25dfa6748473e8e8627} 
\#define FC\+\_\+\+ERR\+\_\+\+VALUES\+\_\+\+START~0x80U}



from this value starts error func codes 



Definition at line \mbox{\hyperlink{modbus__core_8h_source_l00088}{88}} of file \mbox{\hyperlink{modbus__core_8h_source}{modbus\+\_\+core.\+h}}.

\Hypertarget{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gaed24f1f06633b92de65f4fab2b4e005b}\index{Modbus Message Tools@{Modbus Message Tools}!MB\_Set\_Arr16\_Ptr@{MB\_Set\_Arr16\_Ptr}}
\index{MB\_Set\_Arr16\_Ptr@{MB\_Set\_Arr16\_Ptr}!Modbus Message Tools@{Modbus Message Tools}}
\doxysubsubsubsubsection{\texorpdfstring{MB\_Set\_Arr16\_Ptr}{MB\_Set\_Arr16\_Ptr}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gaed24f1f06633b92de65f4fab2b4e005b} 
\#define MB\+\_\+\+Set\+\_\+\+Arr16\+\_\+\+Ptr(\begin{DoxyParamCaption}\item[{}]{\+\_\+arr\+\_\+}{}\end{DoxyParamCaption})}

{\bfseries Value\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{((uint16\_t*)(\&(\_arr\_)))}

\end{DoxyCode}


Macros to set pointer to 16-\/bit array. 


\begin{DoxyParams}{Parameters}
{\em \+\_\+arr\+\_\+} & -\/ массив регистров (16-\/бит). \\
\hline
\end{DoxyParams}


Definition at line \mbox{\hyperlink{modbus__core_8h_source_l00209}{209}} of file \mbox{\hyperlink{modbus__core_8h_source}{modbus\+\_\+core.\+h}}.

\Hypertarget{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_ga938b632e20454741b2a7f97928583776}\index{Modbus Message Tools@{Modbus Message Tools}!MB\_Set\_Register\_Ptr@{MB\_Set\_Register\_Ptr}}
\index{MB\_Set\_Register\_Ptr@{MB\_Set\_Register\_Ptr}!Modbus Message Tools@{Modbus Message Tools}}
\doxysubsubsubsubsection{\texorpdfstring{MB\_Set\_Register\_Ptr}{MB\_Set\_Register\_Ptr}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_ga938b632e20454741b2a7f97928583776} 
\#define MB\+\_\+\+Set\+\_\+\+Register\+\_\+\+Ptr(\begin{DoxyParamCaption}\item[{}]{\+\_\+parr\+\_\+}{, }\item[{}]{\+\_\+addr\+\_\+}{}\end{DoxyParamCaption})}

{\bfseries Value\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{((uint16\_t\ *)(\_parr\_)+(\_addr\_))}

\end{DoxyCode}


Macros to set pointer to register. 


\begin{DoxyParams}{Parameters}
{\em \+\_\+parr\+\_\+} & -\/ массив регистров. \\
\hline
{\em \+\_\+addr\+\_\+} & -\/ Номер регистра (его индекс) от начала массива {\itshape arr}. \\
\hline
\end{DoxyParams}


Definition at line \mbox{\hyperlink{modbus__core_8h_source_l00215}{215}} of file \mbox{\hyperlink{modbus__core_8h_source}{modbus\+\_\+core.\+h}}.

\Hypertarget{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_ga9648b00f955b16e107b901812031cee3}\index{Modbus Message Tools@{Modbus Message Tools}!MB\_Set\_Coil\_Reg\_Ptr@{MB\_Set\_Coil\_Reg\_Ptr}}
\index{MB\_Set\_Coil\_Reg\_Ptr@{MB\_Set\_Coil\_Reg\_Ptr}!Modbus Message Tools@{Modbus Message Tools}}
\doxysubsubsubsubsection{\texorpdfstring{MB\_Set\_Coil\_Reg\_Ptr}{MB\_Set\_Coil\_Reg\_Ptr}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_ga9648b00f955b16e107b901812031cee3} 
\#define MB\+\_\+\+Set\+\_\+\+Coil\+\_\+\+Reg\+\_\+\+Ptr(\begin{DoxyParamCaption}\item[{}]{\+\_\+parr\+\_\+}{, }\item[{}]{\+\_\+coil\+\_\+}{}\end{DoxyParamCaption})}

{\bfseries Value\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{((uint16\_t\ *)(\_parr\_)+((\_coil\_)/16))}

\end{DoxyCode}


Макрос для установки указателя на регистр, содержащий запрашиваемый коил 


\begin{DoxyParams}{Parameters}
{\em \+\_\+parr\+\_\+} & -\/ массив коилов. \\
\hline
{\em \+\_\+coil\+\_\+} & -\/ Номер коила от начала массива {\itshape arr}. \\
\hline
\end{DoxyParams}
\begin{DoxyNote}{Note}
Используется вместе с \doxylink{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_ga6ab08ed18663bc72f80e4e60b30ab429}{MB\+\_\+\+Set\+\_\+\+Coil\+\_\+\+Mask} 
\begin{DoxyCode}{0}
\DoxyCodeLine{\ Пояснение\ выражений}
\DoxyCodeLine{\ \ -\/\ (\_coil\_/16)\ -\/\ индекс\ регистра,\ в\ котором\ содержится\ коил\ по\ адресу\ \_coil\_}
\DoxyCodeLine{}
\DoxyCodeLine{Визуальный\ пример:\ 30\ коил\ будет\ в\ 30/16\ =\ 1\ регистре\ (индексация\ с\ 0)}
\DoxyCodeLine{\ \ xxxxxxxx\ xxxxxxxx\ xxxxxxxx\ xxxxxxCx}
\DoxyCodeLine{\ \ |register[0]-\/-\/-\/-\/|\ |register[1]-\/-\/-\/-\/|}
\DoxyCodeLine{\ \ |skip\ this-\/-\/-\/-\/-\/-\/|\ |get\ this-\/-\/-\/-\/-\/-\/-\/|}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ |shift\ to\ 14\ bit|}

\end{DoxyCode}
 
\end{DoxyNote}


Definition at line \mbox{\hyperlink{modbus__core_8h_source_l00232}{232}} of file \mbox{\hyperlink{modbus__core_8h_source}{modbus\+\_\+core.\+h}}.

\Hypertarget{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_ga6ab08ed18663bc72f80e4e60b30ab429}\index{Modbus Message Tools@{Modbus Message Tools}!MB\_Set\_Coil\_Mask@{MB\_Set\_Coil\_Mask}}
\index{MB\_Set\_Coil\_Mask@{MB\_Set\_Coil\_Mask}!Modbus Message Tools@{Modbus Message Tools}}
\doxysubsubsubsubsection{\texorpdfstring{MB\_Set\_Coil\_Mask}{MB\_Set\_Coil\_Mask}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_ga6ab08ed18663bc72f80e4e60b30ab429} 
\#define MB\+\_\+\+Set\+\_\+\+Coil\+\_\+\+Mask(\begin{DoxyParamCaption}\item[{}]{\+\_\+coil\+\_\+}{}\end{DoxyParamCaption})}

{\bfseries Value\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{(1\ <<\ (\ \_coil\_\ -\/\ (16*((\_coil\_)/16))\ ))}

\end{DoxyCode}


Макрос для установки маски, чтобы выделить запрашиваемый коил из регистра 


\begin{DoxyParams}{Parameters}
{\em \+\_\+coil\+\_\+} & -\/ Номер коила от начала массива {\itshape arr}. \\
\hline
\end{DoxyParams}
\begin{DoxyNote}{Note}
Используется вместе с \doxylink{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_ga9648b00f955b16e107b901812031cee3}{MB\+\_\+\+Set\+\_\+\+Coil\+\_\+\+Reg\+\_\+\+Ptr} 
\begin{DoxyCode}{0}
\DoxyCodeLine{\ Пояснение\ выражений}
\DoxyCodeLine{-\/\ (16*(\_coil\_/16)\ -\/\ сколько\ коилов\ нужно\ пропустить.\ прим.\ (16*30/16)\ -\/\ первые\ 16\ коилов\ находятся\ вне\ регистра}
\DoxyCodeLine{-\/\ \_coil\_-\/(16*(\_coil\_/16))\ -\/\ сдвинуть\ бит\ на\ место\ запрашиваемого\ коила\ в\ регистре}
\DoxyCodeLine{}
\DoxyCodeLine{Визуальный\ пример:\ 30\ коил\ будет\ регистре[1],\ на\ 14\ бите:}
\DoxyCodeLine{\ \ \textcolor{keyword}{register}\ =\ 30/16\ =\ 1}
\DoxyCodeLine{\ \ bit\ =\ 30\ -\/\ (16*30/16)\ =\ 30\ -\/\ 16\ =\ 14}
\DoxyCodeLine{\ \ }
\DoxyCodeLine{xxxxxxxx\ xxxxxxxx\ xxxxxxxx\ xxxxxxCx}
\DoxyCodeLine{|\textcolor{keyword}{register}[0]-\/-\/-\/-\/|\ |\textcolor{keyword}{register}[1]-\/-\/-\/-\/|}
\DoxyCodeLine{|skip\ \textcolor{keyword}{this}-\/-\/-\/-\/-\/-\/|\ |get\ \textcolor{keyword}{this}-\/-\/-\/-\/-\/-\/-\/|}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ |shift\ to\ 14\ bit|}

\end{DoxyCode}
 
\end{DoxyNote}


Definition at line \mbox{\hyperlink{modbus__core_8h_source_l00251}{251}} of file \mbox{\hyperlink{modbus__core_8h_source}{modbus\+\_\+core.\+h}}.



\label{doc-enum-members}
\Hypertarget{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_doc-enum-members}
\doxysubsubsubsection{Enumeration Type Documentation}
\Hypertarget{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_ga4ade64cb3fabf37f010c1e297489980c}\index{Modbus Message Tools@{Modbus Message Tools}!MB\_ExceptionTypeDef@{MB\_ExceptionTypeDef}}
\index{MB\_ExceptionTypeDef@{MB\_ExceptionTypeDef}!Modbus Message Tools@{Modbus Message Tools}}
\doxysubsubsubsubsection{\texorpdfstring{MB\_ExceptionTypeDef}{MB\_ExceptionTypeDef}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_ga4ade64cb3fabf37f010c1e297489980c} 
enum \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}}}



Enum for modbus exception codes. 

Prefix ET for Error Type \begin{DoxyEnumFields}[2]{Enumerator}
\raisebox{\heightof{T}}[0pt][0pt]{\index{ET\_NO\_ERRORS@{ET\_NO\_ERRORS}!Modbus Message Tools@{Modbus Message Tools}}\index{Modbus Message Tools@{Modbus Message Tools}!ET\_NO\_ERRORS@{ET\_NO\_ERRORS}}}\Hypertarget{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gga4ade64cb3fabf37f010c1e297489980caa6980c7a8d924dd975b8fa06a300eb74}\label{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gga4ade64cb3fabf37f010c1e297489980caa6980c7a8d924dd975b8fa06a300eb74} 
ET\+\_\+\+NO\+\_\+\+ERRORS&no errors \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{ET\_ILLEGAL\_FUNCTION@{ET\_ILLEGAL\_FUNCTION}!Modbus Message Tools@{Modbus Message Tools}}\index{Modbus Message Tools@{Modbus Message Tools}!ET\_ILLEGAL\_FUNCTION@{ET\_ILLEGAL\_FUNCTION}}}\Hypertarget{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gga4ade64cb3fabf37f010c1e297489980cae81af967ab54904738ee391eb7478ad1}\label{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gga4ade64cb3fabf37f010c1e297489980cae81af967ab54904738ee391eb7478ad1} 
ET\+\_\+\+ILLEGAL\+\_\+\+FUNCTION&Принятый код функции не может быть обработан \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{ET\_ILLEGAL\_DATA\_ADDRESS@{ET\_ILLEGAL\_DATA\_ADDRESS}!Modbus Message Tools@{Modbus Message Tools}}\index{Modbus Message Tools@{Modbus Message Tools}!ET\_ILLEGAL\_DATA\_ADDRESS@{ET\_ILLEGAL\_DATA\_ADDRESS}}}\Hypertarget{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gga4ade64cb3fabf37f010c1e297489980caea312adaf18aa7ebd17aca8883550425}\label{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gga4ade64cb3fabf37f010c1e297489980caea312adaf18aa7ebd17aca8883550425} 
ET\+\_\+\+ILLEGAL\+\_\+\+DATA\+\_\+\+ADDRESS&Адрес данных, указанный в запросе, недоступен \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{ET\_ILLEGAL\_DATA\_VALUE@{ET\_ILLEGAL\_DATA\_VALUE}!Modbus Message Tools@{Modbus Message Tools}}\index{Modbus Message Tools@{Modbus Message Tools}!ET\_ILLEGAL\_DATA\_VALUE@{ET\_ILLEGAL\_DATA\_VALUE}}}\Hypertarget{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gga4ade64cb3fabf37f010c1e297489980ca47d6168d0692ccb7e09e19084287aba3}\label{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gga4ade64cb3fabf37f010c1e297489980ca47d6168d0692ccb7e09e19084287aba3} 
ET\+\_\+\+ILLEGAL\+\_\+\+DATA\+\_\+\+VALUE&Значение, содержащееся в поле данных запроса, является недопустимой величиной \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{ET\_SLAVE\_DEVICE\_FAILURE@{ET\_SLAVE\_DEVICE\_FAILURE}!Modbus Message Tools@{Modbus Message Tools}}\index{Modbus Message Tools@{Modbus Message Tools}!ET\_SLAVE\_DEVICE\_FAILURE@{ET\_SLAVE\_DEVICE\_FAILURE}}}\Hypertarget{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gga4ade64cb3fabf37f010c1e297489980cacae4572933c1b43491d452f912341277}\label{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gga4ade64cb3fabf37f010c1e297489980cacae4572933c1b43491d452f912341277} 
ET\+\_\+\+SLAVE\+\_\+\+DEVICE\+\_\+\+FAILURE&Невосстанавливаемая ошибка имела место, пока ведомое устройство пыталось выполнить затребованное действие \\
\hline

\end{DoxyEnumFields}


Definition at line \mbox{\hyperlink{modbus__core_8h_source_l00075}{75}} of file \mbox{\hyperlink{modbus__core_8h_source}{modbus\+\_\+core.\+h}}.

\Hypertarget{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_ga38d42495bf262b70048e6d6a7af175d2}\index{Modbus Message Tools@{Modbus Message Tools}!MB\_FunctonTypeDef@{MB\_FunctonTypeDef}}
\index{MB\_FunctonTypeDef@{MB\_FunctonTypeDef}!Modbus Message Tools@{Modbus Message Tools}}
\doxysubsubsubsubsection{\texorpdfstring{MB\_FunctonTypeDef}{MB\_FunctonTypeDef}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_ga38d42495bf262b70048e6d6a7af175d2} 
enum \mbox{\hyperlink{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_ga38d42495bf262b70048e6d6a7af175d2}{MB\+\_\+\+Functon\+Type\+Def}}}



Enum for modbus func codes. 

Prefix FC for Function Code \begin{DoxyEnumFields}[2]{Enumerator}
\raisebox{\heightof{T}}[0pt][0pt]{\index{FC\_R\_COILS@{FC\_R\_COILS}!Modbus Message Tools@{Modbus Message Tools}}\index{Modbus Message Tools@{Modbus Message Tools}!FC\_R\_COILS@{FC\_R\_COILS}}}\Hypertarget{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gga38d42495bf262b70048e6d6a7af175d2a399bcd53bc32faca81bbc3d1ff8b5bb6}\label{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gga38d42495bf262b70048e6d6a7af175d2a399bcd53bc32faca81bbc3d1ff8b5bb6} 
FC\+\_\+\+R\+\_\+\+COILS&Чтение битовых ячеек \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{FC\_R\_DISC\_IN@{FC\_R\_DISC\_IN}!Modbus Message Tools@{Modbus Message Tools}}\index{Modbus Message Tools@{Modbus Message Tools}!FC\_R\_DISC\_IN@{FC\_R\_DISC\_IN}}}\Hypertarget{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gga38d42495bf262b70048e6d6a7af175d2a438c348676901d3e0263fd1f8d94bf11}\label{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gga38d42495bf262b70048e6d6a7af175d2a438c348676901d3e0263fd1f8d94bf11} 
FC\+\_\+\+R\+\_\+\+DISC\+\_\+\+IN&Чтение дискретных входов \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{FC\_R\_HOLD\_REGS@{FC\_R\_HOLD\_REGS}!Modbus Message Tools@{Modbus Message Tools}}\index{Modbus Message Tools@{Modbus Message Tools}!FC\_R\_HOLD\_REGS@{FC\_R\_HOLD\_REGS}}}\Hypertarget{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gga38d42495bf262b70048e6d6a7af175d2ae03921b16750ef290fdd7d19a08a29a2}\label{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gga38d42495bf262b70048e6d6a7af175d2ae03921b16750ef290fdd7d19a08a29a2} 
FC\+\_\+\+R\+\_\+\+HOLD\+\_\+\+REGS&Чтение входных регистров \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{FC\_R\_IN\_REGS@{FC\_R\_IN\_REGS}!Modbus Message Tools@{Modbus Message Tools}}\index{Modbus Message Tools@{Modbus Message Tools}!FC\_R\_IN\_REGS@{FC\_R\_IN\_REGS}}}\Hypertarget{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gga38d42495bf262b70048e6d6a7af175d2a76139e9b7ae78856fd3a297c9f751944}\label{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gga38d42495bf262b70048e6d6a7af175d2a76139e9b7ae78856fd3a297c9f751944} 
FC\+\_\+\+R\+\_\+\+IN\+\_\+\+REGS&Чтение регистров хранения \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{FC\_W\_COIL@{FC\_W\_COIL}!Modbus Message Tools@{Modbus Message Tools}}\index{Modbus Message Tools@{Modbus Message Tools}!FC\_W\_COIL@{FC\_W\_COIL}}}\Hypertarget{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gga38d42495bf262b70048e6d6a7af175d2a832b94af2c427d0daae721da2528f44a}\label{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gga38d42495bf262b70048e6d6a7af175d2a832b94af2c427d0daae721da2528f44a} 
FC\+\_\+\+W\+\_\+\+COIL&Запись битовой ячейки \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{FC\_W\_HOLD\_REG@{FC\_W\_HOLD\_REG}!Modbus Message Tools@{Modbus Message Tools}}\index{Modbus Message Tools@{Modbus Message Tools}!FC\_W\_HOLD\_REG@{FC\_W\_HOLD\_REG}}}\Hypertarget{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gga38d42495bf262b70048e6d6a7af175d2a1b66683f704ef9072329e997312e3b83}\label{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gga38d42495bf262b70048e6d6a7af175d2a1b66683f704ef9072329e997312e3b83} 
FC\+\_\+\+W\+\_\+\+HOLD\+\_\+\+REG&Запись одиночного регистра \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{FC\_W\_COILS@{FC\_W\_COILS}!Modbus Message Tools@{Modbus Message Tools}}\index{Modbus Message Tools@{Modbus Message Tools}!FC\_W\_COILS@{FC\_W\_COILS}}}\Hypertarget{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gga38d42495bf262b70048e6d6a7af175d2a43a1b810697ea15ef91008dbc0187127}\label{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gga38d42495bf262b70048e6d6a7af175d2a43a1b810697ea15ef91008dbc0187127} 
FC\+\_\+\+W\+\_\+\+COILS&Запись нескольких битовых ячеек \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{FC\_W\_HOLD\_REGS@{FC\_W\_HOLD\_REGS}!Modbus Message Tools@{Modbus Message Tools}}\index{Modbus Message Tools@{Modbus Message Tools}!FC\_W\_HOLD\_REGS@{FC\_W\_HOLD\_REGS}}}\Hypertarget{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gga38d42495bf262b70048e6d6a7af175d2affa24c54ee0b59e9810f1dbdc949e684}\label{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gga38d42495bf262b70048e6d6a7af175d2affa24c54ee0b59e9810f1dbdc949e684} 
FC\+\_\+\+W\+\_\+\+HOLD\+\_\+\+REGS&Запись нескольких регистров \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{FC\_R\_DIAGNOSTICS@{FC\_R\_DIAGNOSTICS}!Modbus Message Tools@{Modbus Message Tools}}\index{Modbus Message Tools@{Modbus Message Tools}!FC\_R\_DIAGNOSTICS@{FC\_R\_DIAGNOSTICS}}}\Hypertarget{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gga38d42495bf262b70048e6d6a7af175d2aa6423de9e908dc38ce9f1c8027ad72ec}\label{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gga38d42495bf262b70048e6d6a7af175d2aa6423de9e908dc38ce9f1c8027ad72ec} 
FC\+\_\+\+R\+\_\+\+DIAGNOSTICS&Чтение диагностической информации устройства \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{FC\_R\_DEVICE\_ID@{FC\_R\_DEVICE\_ID}!Modbus Message Tools@{Modbus Message Tools}}\index{Modbus Message Tools@{Modbus Message Tools}!FC\_R\_DEVICE\_ID@{FC\_R\_DEVICE\_ID}}}\Hypertarget{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gga38d42495bf262b70048e6d6a7af175d2a37ddf147e08b6d205319c31e6750d47c}\label{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gga38d42495bf262b70048e6d6a7af175d2a37ddf147e08b6d205319c31e6750d47c} 
FC\+\_\+\+R\+\_\+\+DEVICE\+\_\+\+ID&Чтение информации об устройстве \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{FC\_ERR\_R\_COILS@{FC\_ERR\_R\_COILS}!Modbus Message Tools@{Modbus Message Tools}}\index{Modbus Message Tools@{Modbus Message Tools}!FC\_ERR\_R\_COILS@{FC\_ERR\_R\_COILS}}}\Hypertarget{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gga38d42495bf262b70048e6d6a7af175d2a730c5f56799669c612945a55aa9494c4}\label{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gga38d42495bf262b70048e6d6a7af175d2a730c5f56799669c612945a55aa9494c4} 
FC\+\_\+\+ERR\+\_\+\+R\+\_\+\+COILS&Ошибка чтения битовых ячеек \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{FC\_ERR\_R\_DISC\_IN@{FC\_ERR\_R\_DISC\_IN}!Modbus Message Tools@{Modbus Message Tools}}\index{Modbus Message Tools@{Modbus Message Tools}!FC\_ERR\_R\_DISC\_IN@{FC\_ERR\_R\_DISC\_IN}}}\Hypertarget{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gga38d42495bf262b70048e6d6a7af175d2a592aee113b711b5976ce914f727c9f77}\label{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gga38d42495bf262b70048e6d6a7af175d2a592aee113b711b5976ce914f727c9f77} 
FC\+\_\+\+ERR\+\_\+\+R\+\_\+\+DISC\+\_\+\+IN&Ошибка чтения дискретных входов \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{FC\_ERR\_R\_IN\_REGS@{FC\_ERR\_R\_IN\_REGS}!Modbus Message Tools@{Modbus Message Tools}}\index{Modbus Message Tools@{Modbus Message Tools}!FC\_ERR\_R\_IN\_REGS@{FC\_ERR\_R\_IN\_REGS}}}\Hypertarget{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gga38d42495bf262b70048e6d6a7af175d2ad7f2601e81f84b15cc898c490e429dd5}\label{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gga38d42495bf262b70048e6d6a7af175d2ad7f2601e81f84b15cc898c490e429dd5} 
FC\+\_\+\+ERR\+\_\+\+R\+\_\+\+IN\+\_\+\+REGS&Ошибка чтения регистров хранения \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{FC\_ERR\_R\_HOLD\_REGS@{FC\_ERR\_R\_HOLD\_REGS}!Modbus Message Tools@{Modbus Message Tools}}\index{Modbus Message Tools@{Modbus Message Tools}!FC\_ERR\_R\_HOLD\_REGS@{FC\_ERR\_R\_HOLD\_REGS}}}\Hypertarget{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gga38d42495bf262b70048e6d6a7af175d2abe215454c122b35aa658a8c11b37a258}\label{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gga38d42495bf262b70048e6d6a7af175d2abe215454c122b35aa658a8c11b37a258} 
FC\+\_\+\+ERR\+\_\+\+R\+\_\+\+HOLD\+\_\+\+REGS&Ошибка чтения входных регистров \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{FC\_ERR\_W\_COIL@{FC\_ERR\_W\_COIL}!Modbus Message Tools@{Modbus Message Tools}}\index{Modbus Message Tools@{Modbus Message Tools}!FC\_ERR\_W\_COIL@{FC\_ERR\_W\_COIL}}}\Hypertarget{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gga38d42495bf262b70048e6d6a7af175d2abaa0b334409929c82ec44960d368114b}\label{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gga38d42495bf262b70048e6d6a7af175d2abaa0b334409929c82ec44960d368114b} 
FC\+\_\+\+ERR\+\_\+\+W\+\_\+\+COIL&Ошибка записи битовой ячейки \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{FC\_ERR\_W\_HOLD\_REG@{FC\_ERR\_W\_HOLD\_REG}!Modbus Message Tools@{Modbus Message Tools}}\index{Modbus Message Tools@{Modbus Message Tools}!FC\_ERR\_W\_HOLD\_REG@{FC\_ERR\_W\_HOLD\_REG}}}\Hypertarget{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gga38d42495bf262b70048e6d6a7af175d2a21ba95630e4914c2706e8f48f6839e16}\label{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gga38d42495bf262b70048e6d6a7af175d2a21ba95630e4914c2706e8f48f6839e16} 
FC\+\_\+\+ERR\+\_\+\+W\+\_\+\+HOLD\+\_\+\+REG&Ошибка записи одиночного регистра \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{FC\_ERR\_W\_COILS@{FC\_ERR\_W\_COILS}!Modbus Message Tools@{Modbus Message Tools}}\index{Modbus Message Tools@{Modbus Message Tools}!FC\_ERR\_W\_COILS@{FC\_ERR\_W\_COILS}}}\Hypertarget{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gga38d42495bf262b70048e6d6a7af175d2af018f1e1deef493cfa1074583e421cc8}\label{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gga38d42495bf262b70048e6d6a7af175d2af018f1e1deef493cfa1074583e421cc8} 
FC\+\_\+\+ERR\+\_\+\+W\+\_\+\+COILS&Ошибка записи нескольких битовых ячеек \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{FC\_ERR\_W\_HOLD\_REGS@{FC\_ERR\_W\_HOLD\_REGS}!Modbus Message Tools@{Modbus Message Tools}}\index{Modbus Message Tools@{Modbus Message Tools}!FC\_ERR\_W\_HOLD\_REGS@{FC\_ERR\_W\_HOLD\_REGS}}}\Hypertarget{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gga38d42495bf262b70048e6d6a7af175d2a4de9a680cbe955bc5b30f4c497b06ff8}\label{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gga38d42495bf262b70048e6d6a7af175d2a4de9a680cbe955bc5b30f4c497b06ff8} 
FC\+\_\+\+ERR\+\_\+\+W\+\_\+\+HOLD\+\_\+\+REGS&Ошибка записи нескольких регистров \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{FC\_ERR\_R\_DIAGNOSTIC@{FC\_ERR\_R\_DIAGNOSTIC}!Modbus Message Tools@{Modbus Message Tools}}\index{Modbus Message Tools@{Modbus Message Tools}!FC\_ERR\_R\_DIAGNOSTIC@{FC\_ERR\_R\_DIAGNOSTIC}}}\Hypertarget{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gga38d42495bf262b70048e6d6a7af175d2a8fd1f1aa92af4555bafd96c835ea473c}\label{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gga38d42495bf262b70048e6d6a7af175d2a8fd1f1aa92af4555bafd96c835ea473c} 
FC\+\_\+\+ERR\+\_\+\+R\+\_\+\+DIAGNOSTIC&Ошибка чтения диагностической информации устройства \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{MB\_FC\_ERR\_R\_DEVICE\_INFO@{MB\_FC\_ERR\_R\_DEVICE\_INFO}!Modbus Message Tools@{Modbus Message Tools}}\index{Modbus Message Tools@{Modbus Message Tools}!MB\_FC\_ERR\_R\_DEVICE\_INFO@{MB\_FC\_ERR\_R\_DEVICE\_INFO}}}\Hypertarget{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gga38d42495bf262b70048e6d6a7af175d2a1577351173a660924f7bf33d4c2ec003}\label{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gga38d42495bf262b70048e6d6a7af175d2a1577351173a660924f7bf33d4c2ec003} 
MB\+\_\+\+FC\+\_\+\+ERR\+\_\+\+R\+\_\+\+DEVICE\+\_\+\+INFO&Ошибка чтения информации об устройстве \\
\hline

\end{DoxyEnumFields}


Definition at line \mbox{\hyperlink{modbus__core_8h_source_l00093}{93}} of file \mbox{\hyperlink{modbus__core_8h_source}{modbus\+\_\+core.\+h}}.

\Hypertarget{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gaeaafeacbd239428c7e59e40d2df16ae2}\index{Modbus Message Tools@{Modbus Message Tools}!MB\_MEITypeDef@{MB\_MEITypeDef}}
\index{MB\_MEITypeDef@{MB\_MEITypeDef}!Modbus Message Tools@{Modbus Message Tools}}
\doxysubsubsubsubsection{\texorpdfstring{MB\_MEITypeDef}{MB\_MEITypeDef}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gaeaafeacbd239428c7e59e40d2df16ae2} 
enum \mbox{\hyperlink{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gaeaafeacbd239428c7e59e40d2df16ae2}{MB\+\_\+\+MEIType\+Def}}}



Enum for MEI func codes. 



Definition at line \mbox{\hyperlink{modbus__core_8h_source_l00134}{134}} of file \mbox{\hyperlink{modbus__core_8h_source}{modbus\+\_\+core.\+h}}.

\Hypertarget{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_ga63c3a2a3adb05f591399e2c4def7c14a}\index{Modbus Message Tools@{Modbus Message Tools}!ReadDevId@{ReadDevId}}
\index{ReadDevId@{ReadDevId}!Modbus Message Tools@{Modbus Message Tools}}
\doxysubsubsubsubsection{\texorpdfstring{ReadDevId}{ReadDevId}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_ga63c3a2a3adb05f591399e2c4def7c14a} 
enum \mbox{\hyperlink{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_ga63c3a2a3adb05f591399e2c4def7c14a}{Read\+Dev\+Id}}}



Enum for Read Device Id codes. 

Prefix RID for Read ID \begin{DoxyEnumFields}[2]{Enumerator}
\raisebox{\heightof{T}}[0pt][0pt]{\index{RID\_BASIC\_IDENTIFICATIONS@{RID\_BASIC\_IDENTIFICATIONS}!Modbus Message Tools@{Modbus Message Tools}}\index{Modbus Message Tools@{Modbus Message Tools}!RID\_BASIC\_IDENTIFICATIONS@{RID\_BASIC\_IDENTIFICATIONS}}}\Hypertarget{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gga63c3a2a3adb05f591399e2c4def7c14aac792ca720b19c89783b70cdeba0c9248}\label{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gga63c3a2a3adb05f591399e2c4def7c14aac792ca720b19c89783b70cdeba0c9248} 
RID\+\_\+\+BASIC\+\_\+\+IDENTIFICATIONS&Basic Device Identifications. All objects of this category are mandatory\+: Vendor\+Name, Product code, and revision number \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{RID\_REGULAR\_IDENTIFICATIONS@{RID\_REGULAR\_IDENTIFICATIONS}!Modbus Message Tools@{Modbus Message Tools}}\index{Modbus Message Tools@{Modbus Message Tools}!RID\_REGULAR\_IDENTIFICATIONS@{RID\_REGULAR\_IDENTIFICATIONS}}}\Hypertarget{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gga63c3a2a3adb05f591399e2c4def7c14aab930f13868df5243566759bbcf52a19d}\label{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gga63c3a2a3adb05f591399e2c4def7c14aab930f13868df5243566759bbcf52a19d} 
RID\+\_\+\+REGULAR\+\_\+\+IDENTIFICATIONS&Regular Device Identifications. The device provides additional and optional identifications and description data objects \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{RID\_EXTENDED\_IDENTIFICATIONS@{RID\_EXTENDED\_IDENTIFICATIONS}!Modbus Message Tools@{Modbus Message Tools}}\index{Modbus Message Tools@{Modbus Message Tools}!RID\_EXTENDED\_IDENTIFICATIONS@{RID\_EXTENDED\_IDENTIFICATIONS}}}\Hypertarget{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gga63c3a2a3adb05f591399e2c4def7c14aaca82385c8d88d6d762c369b4da4c4db8}\label{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gga63c3a2a3adb05f591399e2c4def7c14aaca82385c8d88d6d762c369b4da4c4db8} 
RID\+\_\+\+EXTENDED\+\_\+\+IDENTIFICATIONS&Extended Device Identifications. The device provides additional and optional identifications and description private data about the physical device itself. All of these data are device dependent. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{RID\_SPEDIFIC\_IDENTIFICATIONS@{RID\_SPEDIFIC\_IDENTIFICATIONS}!Modbus Message Tools@{Modbus Message Tools}}\index{Modbus Message Tools@{Modbus Message Tools}!RID\_SPEDIFIC\_IDENTIFICATIONS@{RID\_SPEDIFIC\_IDENTIFICATIONS}}}\Hypertarget{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gga63c3a2a3adb05f591399e2c4def7c14aabb8d7527a3aabb1eac974474255d0c5e}\label{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_gga63c3a2a3adb05f591399e2c4def7c14aabb8d7527a3aabb1eac974474255d0c5e} 
RID\+\_\+\+SPEDIFIC\+\_\+\+IDENTIFICATIONS&Specific Device Identifications. The device provides one specific identifications object. \\
\hline

\end{DoxyEnumFields}


Definition at line \mbox{\hyperlink{modbus__core_8h_source_l00143}{143}} of file \mbox{\hyperlink{modbus__core_8h_source}{modbus\+\_\+core.\+h}}.



\label{doc-var-members}
\Hypertarget{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_doc-var-members}
\doxysubsubsubsection{Variable Documentation}
\Hypertarget{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_ga679c526f339999281b97010876e7a295}\index{Modbus Message Tools@{Modbus Message Tools}!MODBUS\_MSG@{MODBUS\_MSG}}
\index{MODBUS\_MSG@{MODBUS\_MSG}!Modbus Message Tools@{Modbus Message Tools}}
\doxysubsubsubsubsection{\texorpdfstring{MODBUS\_MSG}{MODBUS\_MSG}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s_ga679c526f339999281b97010876e7a295} 
\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} MODBUS\+\_\+\+MSG\hspace{0.3cm}{\ttfamily [extern]}}



Default Message Struct for Modbus. 



Definition at line \mbox{\hyperlink{modbus_8c_source_l00025}{25}} of file \mbox{\hyperlink{modbus_8c_source}{modbus.\+c}}.

