Чет работает

This commit is contained in:
2025-12-16 17:57:59 +03:00
commit 260a6416ad
2906 changed files with 982301 additions and 0 deletions

View File

@@ -0,0 +1,42 @@
LATEX_CMD?=pdflatex
MKIDX_CMD?=makeindex
BIBTEX_CMD?=bibtex
LATEX_COUNT?=8
MANUAL_FILE?=refman
all: $(MANUAL_FILE).pdf
pdf: $(MANUAL_FILE).pdf
$(MANUAL_FILE).pdf: clean $(MANUAL_FILE).tex
$(LATEX_CMD) $(MANUAL_FILE) || \
if [ $$? != 0 ] ; then \
\echo "Please consult $(MANUAL_FILE).log to see the error messages" ; \
false; \
fi
$(MKIDX_CMD) $(MANUAL_FILE).idx
$(LATEX_CMD) $(MANUAL_FILE) || \
if [ $$? != 0 ] ; then \
\echo "Please consult $(MANUAL_FILE).log to see the error messages" ; \
false; \
fi
latex_count=$(LATEX_COUNT) ; \
while grep -E -s 'Rerun (LaTeX|to get cross-references right|to get bibliographical references right)' $(MANUAL_FILE).log && [ $$latex_count -gt 0 ] ;\
do \
echo "Rerunning latex...." ;\
$(LATEX_CMD) $(MANUAL_FILE) || \
if [ $$? != 0 ] ; then \
\echo "Please consult $(MANUAL_FILE).log to see the error messages" ; \
false; \
fi; \
latex_count=`expr $$latex_count - 1` ;\
done
$(MKIDX_CMD) $(MANUAL_FILE).idx
$(LATEX_CMD) $(MANUAL_FILE) || \
if [ $$? != 0 ] ; then \
\echo "Please consult $(MANUAL_FILE).log to see the error messages" ; \
false; \
fi
clean:
rm -f *.ps *.dvi *.aux *.toc *.idx *.ind *.ilg *.log *.out *.brf *.blg *.bbl $(MANUAL_FILE).pdf

View File

@@ -0,0 +1,122 @@
\doxysection{\+\_\+\+\_\+crc\+\_\+algs.\+c}
\hypertarget{____crc__algs_8c_source}{}\label{____crc__algs_8c_source}\index{E:/.WORK/STM32/Diod\_Test/diode\_tester/Core/Modbus/Src/\_\_crc\_algs.c@{E:/.WORK/STM32/Diod\_Test/diode\_tester/Core/Modbus/Src/\_\_crc\_algs.c}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00001}00001\ \textcolor{preprocessor}{\#include\ "{}\_\_crc\_algs.h"{}}}
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00002}00002\ }
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00003}00003\ }
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00004}00004\ uint32\_t\ CRC\_calc;}
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00005}00005\ uint32\_t\ CRC\_ref;}
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00006}00006\ }
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00007}00007\ \textcolor{comment}{//uint16\_t\ CRC\_calc;}}
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00008}00008\ \textcolor{comment}{//uint16\_t\ CRC\_ref;}}
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00009}00009\ }
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00010}00010\ }
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00011}00011\ \textcolor{comment}{//\ left\ this\ global\ for\ debug}}
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00012}00012\ uint8\_t\ uchCRCHi\ =\ 0xFF;\ \ }
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00013}00013\ uint8\_t\ uchCRCLo\ =\ 0xFF;\ }
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00014}00014\ \textcolor{keywordtype}{unsigned}\ uIndex;\ \ \ \ }
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00015}00015\ }
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00016}00016\ }
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00017}00017\ uint32\_t\ crc32(uint8\_t\ *data,\ uint32\_t\ data\_size)}
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00018}00018\ \{}
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00019}00019\ \ \ \textcolor{keyword}{static}\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{unsigned}\ \textcolor{keywordtype}{int}\ crc32\_table[]\ =}
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00020}00020\ \{}
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00021}00021\ \ \ 0x00000000,\ 0x77073096,\ 0xEE0E612C,\ 0x990951BA,\ 0x076DC419,\ 0x706AF48F,\ 0xE963A535,\ 0x9E6495A3,\ }
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00022}00022\ \ \ 0x0EDB8832,\ 0x79DCB8A4,\ 0xE0D5E91E,\ 0x97D2D988,\ 0x09B64C2B,\ 0x7EB17CBD,\ 0xE7B82D07,\ 0x90BF1D91,\ }
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00023}00023\ \ \ 0x1DB71064,\ 0x6AB020F2,\ 0xF3B97148,\ 0x84BE41DE,\ 0x1ADAD47D,\ 0x6DDDE4EB,\ 0xF4D4B551,\ 0x83D385C7,\ }
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00024}00024\ \ \ 0x136C9856,\ 0x646BA8C0,\ 0xFD62F97A,\ 0x8A65C9EC,\ 0x14015C4F,\ 0x63066CD9,\ 0xFA0F3D63,\ 0x8D080DF5,\ }
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00025}00025\ \ \ 0x3B6E20C8,\ 0x4C69105E,\ 0xD56041E4,\ 0xA2677172,\ 0x3C03E4D1,\ 0x4B04D447,\ 0xD20D85FD,\ 0xA50AB56B,\ }
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00026}00026\ \ \ 0x35B5A8FA,\ 0x42B2986C,\ 0xDBBBC9D6,\ 0xACBCF940,\ 0x32D86CE3,\ 0x45DF5C75,\ 0xDCD60DCF,\ 0xABD13D59,\ }
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00027}00027\ \ \ 0x26D930AC,\ 0x51DE003A,\ 0xC8D75180,\ 0xBFD06116,\ 0x21B4F4B5,\ 0x56B3C423,\ 0xCFBA9599,\ 0xB8BDA50F,\ }
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00028}00028\ \ \ 0x2802B89E,\ 0x5F058808,\ 0xC60CD9B2,\ 0xB10BE924,\ 0x2F6F7C87,\ 0x58684C11,\ 0xC1611DAB,\ 0xB6662D3D,\ }
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00029}00029\ \ \ 0x76DC4190,\ 0x01DB7106,\ 0x98D220BC,\ 0xEFD5102A,\ 0x71B18589,\ 0x06B6B51F,\ 0x9FBFE4A5,\ 0xE8B8D433,\ }
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00030}00030\ \ \ 0x7807C9A2,\ 0x0F00F934,\ 0x9609A88E,\ 0xE10E9818,\ 0x7F6A0DBB,\ 0x086D3D2D,\ 0x91646C97,\ 0xE6635C01,\ }
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00031}00031\ \ \ 0x6B6B51F4,\ 0x1C6C6162,\ 0x856530D8,\ 0xF262004E,\ 0x6C0695ED,\ 0x1B01A57B,\ 0x8208F4C1,\ 0xF50FC457,\ }
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00032}00032\ \ \ 0x65B0D9C6,\ 0x12B7E950,\ 0x8BBEB8EA,\ 0xFCB9887C,\ 0x62DD1DDF,\ 0x15DA2D49,\ 0x8CD37CF3,\ 0xFBD44C65,\ }
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00033}00033\ \ \ 0x4DB26158,\ 0x3AB551CE,\ 0xA3BC0074,\ 0xD4BB30E2,\ 0x4ADFA541,\ 0x3DD895D7,\ 0xA4D1C46D,\ 0xD3D6F4FB,\ }
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00034}00034\ \ \ 0x4369E96A,\ 0x346ED9FC,\ 0xAD678846,\ 0xDA60B8D0,\ 0x44042D73,\ 0x33031DE5,\ 0xAA0A4C5F,\ 0xDD0D7CC9,\ }
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00035}00035\ \ \ 0x5005713C,\ 0x270241AA,\ 0xBE0B1010,\ 0xC90C2086,\ 0x5768B525,\ 0x206F85B3,\ 0xB966D409,\ 0xCE61E49F,\ }
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00036}00036\ \ \ 0x5EDEF90E,\ 0x29D9C998,\ 0xB0D09822,\ 0xC7D7A8B4,\ 0x59B33D17,\ 0x2EB40D81,\ 0xB7BD5C3B,\ 0xC0BA6CAD,\ }
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00037}00037\ \ \ 0xEDB88320,\ 0x9ABFB3B6,\ 0x03B6E20C,\ 0x74B1D29A,\ 0xEAD54739,\ 0x9DD277AF,\ 0x04DB2615,\ 0x73DC1683,\ }
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00038}00038\ \ \ 0xE3630B12,\ 0x94643B84,\ 0x0D6D6A3E,\ 0x7A6A5AA8,\ 0xE40ECF0B,\ 0x9309FF9D,\ 0x0A00AE27,\ 0x7D079EB1,\ }
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00039}00039\ \ \ 0xF00F9344,\ 0x8708A3D2,\ 0x1E01F268,\ 0x6906C2FE,\ 0xF762575D,\ 0x806567CB,\ 0x196C3671,\ 0x6E6B06E7,\ }
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00040}00040\ \ \ 0xFED41B76,\ 0x89D32BE0,\ 0x10DA7A5A,\ 0x67DD4ACC,\ 0xF9B9DF6F,\ 0x8EBEEFF9,\ 0x17B7BE43,\ 0x60B08ED5,\ }
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00041}00041\ \ \ 0xD6D6A3E8,\ 0xA1D1937E,\ 0x38D8C2C4,\ 0x4FDFF252,\ 0xD1BB67F1,\ 0xA6BC5767,\ 0x3FB506DD,\ 0x48B2364B,\ }
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00042}00042\ \ \ 0xD80D2BDA,\ 0xAF0A1B4C,\ 0x36034AF6,\ 0x41047A60,\ 0xDF60EFC3,\ 0xA867DF55,\ 0x316E8EEF,\ 0x4669BE79,\ }
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00043}00043\ \ \ 0xCB61B38C,\ 0xBC66831A,\ 0x256FD2A0,\ 0x5268E236,\ 0xCC0C7795,\ 0xBB0B4703,\ 0x220216B9,\ 0x5505262F,\ }
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00044}00044\ \ \ 0xC5BA3BBE,\ 0xB2BD0B28,\ 0x2BB45A92,\ 0x5CB36A04,\ 0xC2D7FFA7,\ 0xB5D0CF31,\ 0x2CD99E8B,\ 0x5BDEAE1D,\ }
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00045}00045\ \ \ 0x9B64C2B0,\ 0xEC63F226,\ 0x756AA39C,\ 0x026D930A,\ 0x9C0906A9,\ 0xEB0E363F,\ 0x72076785,\ 0x05005713,\ }
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00046}00046\ \ \ 0x95BF4A82,\ 0xE2B87A14,\ 0x7BB12BAE,\ 0x0CB61B38,\ 0x92D28E9B,\ 0xE5D5BE0D,\ 0x7CDCEFB7,\ 0x0BDBDF21,\ }
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00047}00047\ \ \ 0x86D3D2D4,\ 0xF1D4E242,\ 0x68DDB3F8,\ 0x1FDA836E,\ 0x81BE16CD,\ 0xF6B9265B,\ 0x6FB077E1,\ 0x18B74777,\ }
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00048}00048\ \ \ 0x88085AE6,\ 0xFF0F6A70,\ 0x66063BCA,\ 0x11010B5C,\ 0x8F659EFF,\ 0xF862AE69,\ 0x616BFFD3,\ 0x166CCF45,\ }
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00049}00049\ \ \ 0xA00AE278,\ 0xD70DD2EE,\ 0x4E048354,\ 0x3903B3C2,\ 0xA7672661,\ 0xD06016F7,\ 0x4969474D,\ 0x3E6E77DB,\ }
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00050}00050\ \ \ 0xAED16A4A,\ 0xD9D65ADC,\ 0x40DF0B66,\ 0x37D83BF0,\ 0xA9BCAE53,\ 0xDEBB9EC5,\ 0x47B2CF7F,\ 0x30B5FFE9,\ }
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00051}00051\ \ \ 0xBDBDF21C,\ 0xCABAC28A,\ 0x53B39330,\ 0x24B4A3A6,\ 0xBAD03605,\ 0xCDD70693,\ 0x54DE5729,\ 0x23D967BF,\ }
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00052}00052\ \ \ 0xB3667A2E,\ 0xC4614AB8,\ 0x5D681B02,\ 0x2A6F2B94,\ 0xB40BBE37,\ 0xC30C8EA1,\ 0x5A05DF1B,\ 0x2D02EF8D}
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00053}00053\ \};\ \ }
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00054}00054\ \textcolor{keywordtype}{unsigned}\ \textcolor{keywordtype}{int}\ crc\ =\ 0xFFFFFFFF;}
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00055}00055\ \ \ \textcolor{keywordflow}{while}\ (data\_size-\/-\/)}
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00056}00056\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00057}00057\ \ \ \ \ \ \ crc\ =\ (crc\ >>\ 8)\ \string^\ crc32\_table[(crc\ \string^\ *data)\ \&\ 255];}
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00058}00058\ \ \ \ \ \ \ data++;}
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00059}00059\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00060}00060\ \ \ \textcolor{keywordflow}{return}\ crc\string^0xFFFFFFFF;}
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00061}00061\ \}}
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00062}00062\ }
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00063}00063\ }
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00064}00064\ uint16\_t\ crc16(uint8\_t\ *data,\ uint32\_t\ data\_size)}
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00065}00065\ \{\ }
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00066}00066\ \ \ \textcolor{comment}{/*Table\ of\ CRC\ values\ for\ high\ order\ byte*/}}
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00067}00067\ \ \ \textcolor{keyword}{static}\ \textcolor{keywordtype}{unsigned}\ \textcolor{keywordtype}{char}\ auchCRCHi[]=}
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00068}00068\ \ \ \{}
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00069}00069\ \ \ \ \ \ \ 0x00,0xC1,0x81,0x40,0x01,0xC0,0x80,0x41,0x01,0xC0,0x80,0x41,0x00,0xC1,0x81,0x40,}
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00070}00070\ \ \ \ \ \ \ 0x01,0xC0,0x80,0x41,0x00,0xC1,0x81,0x40,0x00,0xC1,0x81,0x40,0x01,0xC0,0x80,0x41,}
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00071}00071\ \ \ \ \ \ \ 0x01,0xC0,0x80,0x41,0x00,0xC1,0x81,0x40,0x00,0xC1,0x81,0x40,0x01,0xC0,0x80,0x41,}
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00072}00072\ \ \ \ \ \ \ 0x00,0xC1,0x81,0x40,0x01,0xC0,0x80,0x41,0x01,0xC0,0x80,0x41,0x00,0xC1,0x81,0x40,}
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00073}00073\ \ \ \ \ \ \ 0x01,0xC0,0x80,0x41,0x00,0xC1,0x81,0x40,0x00,0xC1,0x81,0x40,0x01,0xC0,0x80,0x41,}
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00074}00074\ \ \ \ \ \ \ 0x00,0xC1,0x81,0x40,0x01,0xC0,0x80,0x41,0x01,0xC0,0x80,0x41,0x00,0xC1,0x81,0x40,}
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00075}00075\ \ \ \ \ \ \ 0x00,0xC1,0x81,0x40,0x01,0xC0,0x80,0x41,0x01,0xC0,0x80,0x41,0x00,0xC1,0x81,0x40,}
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00076}00076\ \ \ \ \ \ \ 0x01,0xC0,0x80,0x41,0x00,0xC1,0x81,0x40,0x00,0xC1,0x81,0x40,0x01,0xC0,0x80,0x41,}
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00077}00077\ \ \ \ \ \ \ 0x01,0xC0,0x80,0x41,0x00,0xC1,0x81,0x40,0x00,0xC1,0x81,0x40,0x01,0xC0,0x80,0x41,}
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00078}00078\ \ \ \ \ \ \ 0x00,0xC1,0x81,0x40,0x01,0xC0,0x80,0x41,0x01,0xC0,0x80,0x41,0x00,0xC1,0x81,0x40,}
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00079}00079\ \ \ \ \ \ \ 0x00,0xC1,0x81,0x40,0x01,0xC0,0x80,0x41,0x01,0xC0,0x80,0x41,0x00,0xC1,0x81,0x40,}
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00080}00080\ \ \ \ \ \ \ 0x01,0xC0,0x80,0x41,0x00,0xC1,0x81,0x40,0x00,0xC1,0x81,0x40,0x01,0xC0,0x80,0x41,}
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00081}00081\ \ \ \ \ \ \ 0x00,0xC1,0x81,0x40,0x01,0xC0,0x80,0x41,0x01,0xC0,0x80,0x41,0x00,0xC1,0x81,0x40,}
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00082}00082\ \ \ \ \ \ \ 0x01,0xC0,0x80,0x41,0x00,0xC1,0x81,0x40,0x00,0xC1,0x81,0x40,0x01,0xC0,0x80,0x41,}
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00083}00083\ \ \ \ \ \ \ 0x01,0xC0,0x80,0x41,0x00,0xC1,0x81,0x40,0x00,0xC1,0x81,0x40,0x01,0xC0,0x80,0x41,}
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00084}00084\ \ \ \ \ \ \ 0x00,0xC1,0x81,0x40,0x01,0xC0,0x80,0x41,0x01,0xC0,0x80,0x41,0x00,0xC1,0x81,0x40,}
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00085}00085\ \ \ \};}
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00086}00086\ \ \ \textcolor{comment}{/*Table\ of\ CRC\ values\ for\ low\ order\ byte*/}}
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00087}00087\ \ \ \textcolor{keyword}{static}\ \textcolor{keywordtype}{char}\ auchCRCLo[]\ =}
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00088}00088\ \ \ \{}
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00089}00089\ \ \ \ \ \ \ \ \ \ \ 0x00,0xC0,0xC1,0x01,0xC3,0x03,0x02,0xC2,0xC6,0x06,0x07,0xC7,0x05,0xC5,0xC4,0x04,}
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00090}00090\ \ \ \ \ \ \ \ \ \ \ 0xCC,0x0C,0x0D,0xCD,0x0F,0xCF,0xCE,0x0E,0x0A,0xCA,0xCB,0x0B,0xC9,0x09,0x08,0xC8,}
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00091}00091\ \ \ \ \ \ \ \ \ \ \ 0xD8,0x18,0x19,0xD9,0x1B,0xDB,0xDA,0x1A,0x1E,0xDE,0xDF,0x1F,0xDD,0x1D,0x1C,0xDC,}
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00092}00092\ \ \ \ \ \ \ \ \ \ \ 0x14,0xD4,0xD5,0x15,0xD7,0x17,0x16,0xD6,0xD2,0x12,0x13,0xD3,0x11,0xD1,0xD0,0x10,}
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00093}00093\ \ \ \ \ \ \ \ \ \ \ 0xF0,0x30,0x31,0xF1,0x33,0xF3,0xF2,0x32,0x36,0xF6,0xF7,0x37,0xF5,0x35,0x34,0xF4,}
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00094}00094\ \ \ \ \ \ \ \ \ \ \ 0x3C,0xFC,0xFD,0x3D,0xFF,0x3F,0x3E,0xFE,0xFA,0x3A,0x3B,0xFB,0x39,0xF9,0xF8,0x38,}
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00095}00095\ \ \ \ \ \ \ \ \ \ \ 0x28,0xE8,0xE9,0x29,0xEB,0x2B,0x2A,0xEA,0xEE,0x2E,0x2F,0xEF,0x2D,0xED,0xEC,0x2C,}
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00096}00096\ \ \ \ \ \ \ \ \ \ \ 0xE4,0x24,0x25,0xE5,0x27,0xE7,0xE6,0x26,0x22,0xE2,0xE3,0x23,0xE1,0x21,0x20,0xE0,}
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00097}00097\ \ \ \ \ \ \ \ \ \ \ 0xA0,0x60,0x61,0xA1,0x63,0xA3,0xA2,0x62,0x66,0xA6,0xA7,0x67,0xA5,0x65,0x64,0xA4,}
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00098}00098\ \ \ \ \ \ \ \ \ \ \ 0x6C,0xAC,0xAD,0x6D,0xAF,0x6F,0x6E,0xAE,0xAA,0x6A,0x6B,0xAB,0x69,0xA9,0xA8,0x68,}
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00099}00099\ \ \ \ \ \ \ \ \ \ \ 0x78,0xB8,0xB9,0x79,0xBB,0x7B,0x7A,0xBA,0xBE,0x7E,0x7F,0xBF,0x7D,0xBD,0xBC,0x7C,}
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00100}00100\ \ \ \ \ \ \ \ \ \ \ 0xB4,0x74,0x75,0xB5,0x77,0xB7,0xB6,0x76,0x72,0xB2,0xB3,0x73,0xB1,0x71,0x70,0xB0,}
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00101}00101\ \ \ \ \ \ \ \ \ \ \ 0x50,0x90,0x91,0x51,0x93,0x53,0x52,0x92,0x96,0x56,0x57,0x97,0x55,0x95,0x94,0x54,}
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00102}00102\ \ \ \ \ \ \ \ \ \ \ 0x9C,0x5C,0x5D,0x9D,0x5F,0x9F,0x9E,0x5E,0x5A,0x9A,0x9B,0x5B,0x99,0x59,0x58,0x98,}
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00103}00103\ \ \ \ \ \ \ \ \ \ \ 0x88,0x48,0x49,0x89,0x4B,0x8B,0x8A,0x4A,0x4E,0x8E,0x8F,0x4F,0x8D,0x4D,0x4C,0x8C,}
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00104}00104\ \ \ \ \ \ \ \ \ \ \ 0x44,0x84,0x85,0x45,0x87,0x47,0x46,0x86,0x82,0x42,0x43,0x83,0x41,0x81,0x80,0x40,}
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00105}00105\ \ \ \ \ \ \ \};}
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00106}00106\ \ \ uchCRCHi\ =\ 0xFF;\ \ }
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00107}00107\ \ \ uchCRCLo\ =\ 0xFF;\ \ \ }
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00108}00108\ \ \ \ \ \textcolor{comment}{/*\ CRC\ Generation\ Function\ */}}
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00109}00109\ \ \ \textcolor{keywordflow}{while}(\ data\_size-\/-\/)\ \textcolor{comment}{/*\ pass\ through\ message\ buffer\ */}}
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00110}00110\ \ \ \{}
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00111}00111\ \ \ \ \ uIndex\ =\ uchCRCHi\ \string^\ *data++;\ \textcolor{comment}{/*\ calculate\ the\ CRC\ */}}
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00112}00112\ \ \ \ \ uchCRCHi\ =\ uchCRCLo\ \string^\ auchCRCHi[uIndex];}
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00113}00113\ \ \ \ \ uchCRCLo\ =\ auchCRCLo[uIndex];}
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00114}00114\ \ \ \}}
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00115}00115\ \ \ \textcolor{keywordflow}{return}\ uchCRCHi\ |\ uchCRCLo<<8;}
\DoxyCodeLine{\Hypertarget{____crc__algs_8c_source_l00116}00116\ \}\ }
\end{DoxyCode}

View File

@@ -0,0 +1,15 @@
\doxysection{\+\_\+\+\_\+crc\+\_\+algs.\+h}
\hypertarget{____crc__algs_8h_source}{}\label{____crc__algs_8h_source}\index{E:/.WORK/STM32/Diod\_Test/diode\_tester/Core/Modbus/Inc/\_\_crc\_algs.h@{E:/.WORK/STM32/Diod\_Test/diode\_tester/Core/Modbus/Inc/\_\_crc\_algs.h}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{____crc__algs_8h_source_l00001}00001\ \textcolor{preprocessor}{\#include\ "{}\mbox{\hyperlink{modbus__config_8h}{modbus\_config.h}}"{}}}
\DoxyCodeLine{\Hypertarget{____crc__algs_8h_source_l00002}00002\ }
\DoxyCodeLine{\Hypertarget{____crc__algs_8h_source_l00003}00003\ \textcolor{comment}{//\ extern\ here\ to\ use\ in\ bootloader.c}}
\DoxyCodeLine{\Hypertarget{____crc__algs_8h_source_l00004}00004\ \textcolor{keyword}{extern}\ uint32\_t\ CRC\_calc;}
\DoxyCodeLine{\Hypertarget{____crc__algs_8h_source_l00005}00005\ \textcolor{keyword}{extern}\ uint32\_t\ CRC\_ref;}
\DoxyCodeLine{\Hypertarget{____crc__algs_8h_source_l00006}00006\ }
\DoxyCodeLine{\Hypertarget{____crc__algs_8h_source_l00007}00007\ }
\DoxyCodeLine{\Hypertarget{____crc__algs_8h_source_l00008}00008\ uint16\_t\ crc16(uint8\_t\ *data,\ uint32\_t\ data\_size);}
\DoxyCodeLine{\Hypertarget{____crc__algs_8h_source_l00009}00009\ uint32\_t\ crc32(uint8\_t\ *data,\ uint32\_t\ data\_size);}
\end{DoxyCode}

View File

@@ -0,0 +1,24 @@
\doxysection{E\+:/.WORK/\+STM32/\+Diod\+\_\+\+Test/diode\+\_\+tester/\+Core/\+Modbus/\+Src/\+\_\+\+\_\+modbus\+\_\+compat.c File Reference}
\hypertarget{____modbus__compat_8c}{}\label{____modbus__compat_8c}\index{E:/.WORK/STM32/Diod\_Test/diode\_tester/Core/Modbus/Src/\_\_modbus\_compat.c@{E:/.WORK/STM32/Diod\_Test/diode\_tester/Core/Modbus/Src/\_\_modbus\_compat.c}}
Модуль для совместимости библиотеки MODBUS.
{\ttfamily \#include "{}modbus.\+h"{}}\newline
Include dependency graph for \+\_\+\+\_\+modbus\+\_\+compat.\+c\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{____modbus__compat_8c__incl}
\end{center}
\end{figure}
\doxysubsection{Detailed Description}
Модуль для совместимости библиотеки MODBUS.
Definition in file \mbox{\hyperlink{____modbus__compat_8c_source}{\+\_\+\+\_\+modbus\+\_\+compat.\+c}}.

View File

@@ -0,0 +1 @@
cb67cd7f9499693ebe32a59bddc436f7

View File

@@ -0,0 +1,13 @@
\doxysection{\+\_\+\+\_\+modbus\+\_\+compat.\+c}
\hypertarget{____modbus__compat_8c_source}{}\label{____modbus__compat_8c_source}\index{E:/.WORK/STM32/Diod\_Test/diode\_tester/Core/Modbus/Src/\_\_modbus\_compat.c@{E:/.WORK/STM32/Diod\_Test/diode\_tester/Core/Modbus/Src/\_\_modbus\_compat.c}}
\mbox{\hyperlink{____modbus__compat_8c}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8c_source_l00001}00001\ \textcolor{comment}{/**\ }}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8c_source_l00002}00002\ \textcolor{comment}{*******************************************************************************}}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8c_source_l00003}00003\ \textcolor{comment}{*\ @file\ \_\_modbus\_compat.c}}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8c_source_l00004}00004\ \textcolor{comment}{*\ @brief\ Модуль\ для\ совместимости\ библиотеки\ MODBUS.}}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8c_source_l00005}00005\ \textcolor{comment}{*******************************************************************************}}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8c_source_l00006}00006\ \textcolor{comment}{******************************************************************************/}}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8c_source_l00007}00007\ \textcolor{preprocessor}{\#include\ "{}\mbox{\hyperlink{modbus_8h}{modbus.h}}"{}}}
\end{DoxyCode}

View File

@@ -0,0 +1,31 @@
\doxysection{E\+:/.WORK/\+STM32/\+Diod\+\_\+\+Test/diode\+\_\+tester/\+Core/\+Modbus/\+Inc/\+\_\+\+\_\+modbus\+\_\+compat.h File Reference}
\hypertarget{____modbus__compat_8h}{}\label{____modbus__compat_8h}\index{E:/.WORK/STM32/Diod\_Test/diode\_tester/Core/Modbus/Inc/\_\_modbus\_compat.h@{E:/.WORK/STM32/Diod\_Test/diode\_tester/Core/Modbus/Inc/\_\_modbus\_compat.h}}
Модуль для совместимости библиотеки MODBUS.
{\ttfamily \#include "{}modbus\+\_\+core.\+h"{}}\newline
Include dependency graph for \+\_\+\+\_\+modbus\+\_\+compat.\+h\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=298pt]{____modbus__compat_8h__incl}
\end{center}
\end{figure}
This graph shows which files directly or indirectly include this file\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{____modbus__compat_8h__dep__incl}
\end{center}
\end{figure}
\doxysubsection{Detailed Description}
Модуль для совместимости библиотеки MODBUS.
Файл содержит API старых функций, а также заглушки для отключенных модулей\+:
Definition in file \mbox{\hyperlink{____modbus__compat_8h_source}{\+\_\+\+\_\+modbus\+\_\+compat.\+h}}.

View File

@@ -0,0 +1 @@
708122c828e1b48aefbac0e76f738749

View File

@@ -0,0 +1 @@
274484ae78d0695f8d4a4ef17d474eaf

View File

@@ -0,0 +1,124 @@
\doxysection{\+\_\+\+\_\+modbus\+\_\+compat.\+h}
\hypertarget{____modbus__compat_8h_source}{}\label{____modbus__compat_8h_source}\index{E:/.WORK/STM32/Diod\_Test/diode\_tester/Core/Modbus/Inc/\_\_modbus\_compat.h@{E:/.WORK/STM32/Diod\_Test/diode\_tester/Core/Modbus/Inc/\_\_modbus\_compat.h}}
\mbox{\hyperlink{____modbus__compat_8h}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00001}00001\ \textcolor{comment}{/**\ }}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00002}00002\ \textcolor{comment}{*******************************************************************************}}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00003}00003\ \textcolor{comment}{*\ @file\ \_\_modbus\_compat.h}}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00004}00004\ \textcolor{comment}{*\ @brief\ Модуль\ для\ совместимости\ библиотеки\ MODBUS.}}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00005}00005\ \textcolor{comment}{*******************************************************************************}}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00006}00006\ \textcolor{comment}{*\ @details\ Файл\ содержит\ API\ старых\ функций,\ а\ также\ заглушки\ для\ отключенных\ модулей:}}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00007}00007\ \textcolor{comment}{******************************************************************************/}}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00008}00008\ \textcolor{preprocessor}{\#include\ "{}\mbox{\hyperlink{modbus__core_8h}{modbus\_core.h}}"{}}}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00009}00009\ }
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00010}00010\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00011}00011\ \textcolor{comment}{/**\ @addtogroup\ MODBUS\_LEGACY\_API\ Legacy\ API\ }}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00012}00012\ \textcolor{comment}{\ \ *\ @ingroup\ MODBUS\_FUNCTIONS}}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00013}00013\ \textcolor{comment}{\ \ *\ @brief\ Старые\ API\ функций,\ сохранённые\ для\ обратной\ совместимости.}}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00014}00014\ \textcolor{comment}{\ \ *\ @note\ \ \ Не\ используйте\ эти\ функции\ в\ новом\ коде.\ Они\ могут\ быть\ удалены\ в\ будущих\ версиях.}}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00015}00015\ \textcolor{comment}{\ \ *\ \ \ \ \ \ \ \ \ Вместо\ них\ используйте\ функции\ из\ основных\ групп\ MODBUS\ API.}}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00016}00016\ \textcolor{comment}{\ \ *\ @\{}}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00017}00017\ \textcolor{comment}{\ \ */}}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00018}00018\ }
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00019}00019\ }
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00020}00020\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00021}00021\ \textcolor{comment}{/**\ MODBUS\_LEGACY\_API}}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00022}00022\ \textcolor{comment}{\ \ *\ @\}}}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00023}00023\ \textcolor{comment}{\ \ */}}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00024}00024\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00025}00025\ \textcolor{comment}{/**\ @cond\ Заглушки\ отключенных\ модулей\ */}}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00026}00026\ }
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00027}00027\ \textcolor{preprocessor}{\#ifndef\ MODBUS\_ENABLE\_COILS}}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00028}00028\ \textcolor{preprocessor}{\ \ \ \ \#define\ MB\_Coil\_Write\_Global(Addr,\ WriteVal)\ ET\_ILLEGAL\_FUNCTION}}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00029}00029\ \textcolor{preprocessor}{\ \ \ \ \#define\ MB\_Coil\_Read\_Global(Addr,\ Exception)\ 0}}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00030}00030\ \textcolor{preprocessor}{\ \ \ \ \#define\ MB\_Process\_Read\_Coils(modbus\_msg)\ 0}}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00031}00031\ \textcolor{preprocessor}{\ \ \ \ \#define\ MB\_Process\_Write\_Single\_Coil(modbus\_msg)\ 0}}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00032}00032\ \textcolor{preprocessor}{\ \ \ \ \#define\ MB\_Process\_Write\_Miltuple\_Coils(modbus\_msg)\ 0}}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00033}00033\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00034}00034\ }
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00035}00035\ \textcolor{preprocessor}{\#ifndef\ MODBUS\_ENABLE\_HOLDINGS}}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00036}00036\ \textcolor{preprocessor}{\ \ \ \ \#define\ MB\_Holding\_Write\_Global(Addr,\ WriteVal)\ ET\_ILLEGAL\_FUNCTION}}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00037}00037\ \textcolor{preprocessor}{\ \ \ \ \#define\ MB\_Holding\_Read\_Global(Addr,\ Exception)\ 0}}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00038}00038\ \textcolor{preprocessor}{\ \ \ \ \#define\ MB\_Process\_Read\_Hold\_Regs(modbus\_msg)\ 0}}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00039}00039\ \textcolor{preprocessor}{\ \ \ \ \#define\ MB\_Process\_Write\_Single\_Reg(modbus\_msg)\ 0}}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00040}00040\ \textcolor{preprocessor}{\ \ \ \ \#define\ MB\_Process\_Write\_Miltuple\_Regs(modbus\_msg)\ 0}}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00041}00041\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00042}00042\ }
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00043}00043\ \textcolor{preprocessor}{\#ifndef\ MODBUS\_ENABLE\_INPUTS}}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00044}00044\ \textcolor{preprocessor}{\ \ \ \ \#define\ MB\_Input\_Write\_Global(Addr,\ WriteVal)\ ET\_ILLEGAL\_FUNCTION}}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00045}00045\ \textcolor{preprocessor}{\ \ \ \ \#define\ MB\_Input\_Read\_Global(Addr,\ Exception)\ 0}}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00046}00046\ \textcolor{preprocessor}{\ \ \ \ \#define\ MB\_Process\_Read\_Input\_Regs(modbus\_msg)\ 0}}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00047}00047\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00048}00048\ }
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00049}00049\ \textcolor{preprocessor}{\#ifndef\ MODBUS\_ENABLE\_DEVICE\_IDENTIFICATIONS}}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00050}00050\ \textcolor{preprocessor}{\ \ \ \ \#define\ MB\_WriteSingleObjectToMessage(mbdata,\ ind,\ obj)\ }}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00051}00051\ \textcolor{preprocessor}{\ \ \ \ \#define\ MB\_WriteObjectsToMessage(modbus\_msg,\ maxidofobj)\ }}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00052}00052\ \textcolor{preprocessor}{\ \ \ \ \#define\ MB\_Process\_Read\_Device\_Identifications(modbus\_msg)\ 0}}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00053}00053\ \textcolor{preprocessor}{\ \ \ \ \#define\ MB\_DeviceInentificationInit()\ }}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00054}00054\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00055}00055\ }
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00056}00056\ }
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00057}00057\ \textcolor{preprocessor}{\#ifndef\ MODBUS\_ENABLE\_DIAGNOSTICS}}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00058}00058\ \textcolor{preprocessor}{\ \ \ \ \#define\ MB\_DiagnosticsInit()\ }}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00059}00059\ \textcolor{preprocessor}{\ \ \ \ \#define\ MB\_Diagnostics\_WriteBit(bit\_num,\ bit\_state)\ 0}}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00060}00060\ \textcolor{preprocessor}{\ \ \ \ \#define\ MB\_Diagnostics\_GetBit(bit\_num)\ 0}}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00061}00061\ \textcolor{preprocessor}{\ \ \ \ \#define\ MB\_Process\_Diagnostics(modbus\_msg)\ 0}}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00062}00062\ \textcolor{preprocessor}{\ \ \ \ \#define\ MB\_Diagnostics\_BusMessageCnt()\ }}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00063}00063\ \textcolor{preprocessor}{\ \ \ \ \#define\ MB\_Diagnostics\_CommunicationErrorCnt()\ }}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00064}00064\ \textcolor{preprocessor}{\ \ \ \ \#define\ MB\_Diagnostics\_ExceptionErrorCnt()\ }}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00065}00065\ \textcolor{preprocessor}{\ \ \ \ \#define\ MB\_Diagnostics\_CharacterOverrunCnt()\ }}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00066}00066\ \textcolor{preprocessor}{\ \ \ \ \#define\ MB\_Diagnostics\_SlaveMessageCnt()\ }}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00067}00067\ \textcolor{preprocessor}{\ \ \ \ \#define\ MB\_Diagnostics\_SlaveNoResponseCnt()\ }}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00068}00068\ \textcolor{preprocessor}{\ \ \ \ \#define\ MB\_Diagnostics\_SlaveNAKCnt()\ }}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00069}00069\ \textcolor{preprocessor}{\ \ \ \ \#define\ MB\_Diagnostics\_SlaveBusyCnt()\ }}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00070}00070\ \textcolor{preprocessor}{\ \ \ \ \#define\ MB\_GetDeviceMode(void)\ MODBUS\_NORMAL\_MODE}}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00071}00071\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00072}00072\ }
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00073}00073\ }
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00074}00074\ }
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00075}00075\ \textcolor{preprocessor}{\#ifndef\ MODBUS\_ENABLE\_MASTER}}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00076}00076\ \textcolor{preprocessor}{\ \ \ \ \#define\ MB\_RespGet\_RegisterValue(modbus\_msg,\ reg\_addr,\ reg\_value)\ 0}}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00077}00077\ \textcolor{preprocessor}{\ \ \ \ \#define\ MB\_RespGet\_CoilState(modbus\_msg,\ coil\_addr,\ coil\_state)\ 0}}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00078}00078\ \textcolor{preprocessor}{\ \ \ \ \#define\ MB\_RespGet\_NumberOfObjects(modbus\_msg)\ 0}}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00079}00079\ \textcolor{preprocessor}{\ \ \ \ \#define\ MB\_RespGet\_ObjectById(modbus\_msg,\ obj\_id,\ obj\_data,\ obj\_length)\ 0}}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00080}00080\ \textcolor{preprocessor}{\ \ \ \ \#define\ MB\_RespGet\_ObjectByIndex(modbus\_msg,\ index,\ obj\_id,\ obj\_data,\ obj\_length)\ 0}}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00081}00081\ \textcolor{preprocessor}{\ \ \ \ \#define\ MB\_RespGet\_Diagnostic(modbus\_msg,\ data)\ 0}}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00082}00082\ \textcolor{preprocessor}{\ \ \ \ \#define\ MB\_REQUEST\_READ\_COILS(slave\_addr,\ start\_addr,\ quantity)\ \{0\}}}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00083}00083\ \textcolor{preprocessor}{\ \ \ \ \#define\ MB\_REQUEST\_READ\_DISCRETE\_INPUTS(slave\_addr,\ start\_addr,\ quantity)\ \{0\}}}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00084}00084\ \textcolor{preprocessor}{\ \ \ \ \#define\ MB\_REQUEST\_READ\_HOLDING\_REGS(slave\_addr,\ start\_addr,\ quantity)\ \{0\}}}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00085}00085\ \textcolor{preprocessor}{\ \ \ \ \#define\ MB\_REQUEST\_READ\_INPUT\_REGS(slave\_addr,\ start\_addr,\ quantity)\ \{0\}}}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00086}00086\ \textcolor{preprocessor}{\ \ \ \ \#define\ MB\_REQUEST\_WRITE\_SINGLE\_COIL(slave\_addr,\ coil\_addr,\ value)\ \{0\}}}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00087}00087\ \textcolor{preprocessor}{\ \ \ \ \#define\ MB\_REQUEST\_WRITE\_SINGLE\_REG(slave\_addr,\ reg\_addr,\ value)\ \{0\}}}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00088}00088\ \textcolor{preprocessor}{\ \ \ \ \#define\ MB\_REQUEST\_WRITE\_MULTIPLE\_COILS(slave\_addr,\ start\_addr,\ quantity,\ coils\_data)\ \{0\}}}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00089}00089\ \textcolor{preprocessor}{\ \ \ \ \#define\ MB\_REQUEST\_WRITE\_MULTIPLE\_REGS(slave\_addr,\ start\_addr,\ quantity,\ regs\_data)\ \{0\}}}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00090}00090\ \textcolor{preprocessor}{\ \ \ \ \#define\ MB\_REQUEST\_DIAGNOSTIC\_QUERY(slave\_addr,\ sub\_function,\ data)\ \{0\}}}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00091}00091\ \textcolor{preprocessor}{\ \ \ \ \#define\ MB\_REQUEST\_RETURN\_QUERY\_DATA(slave\_addr)\ \{0\}}}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00092}00092\ \textcolor{preprocessor}{\ \ \ \ \#define\ MB\_REQUEST\_RESTART\_COMMUNICATIONS(slave\_addr,\ data)\ \{0\}}}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00093}00093\ \textcolor{preprocessor}{\ \ \ \ \#define\ MB\_REQUEST\_RETURN\_DIAGNOSTIC\_REGISTER(slave\_addr)\ \{0\}}}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00094}00094\ \textcolor{preprocessor}{\ \ \ \ \#define\ MB\_REQUEST\_FORCE\_LISTEN\_ONLY\_MODE(slave\_addr)\ \{0\}}}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00095}00095\ \textcolor{preprocessor}{\ \ \ \ \#define\ MB\_REQUEST\_CLEAR\_COUNTERS\_AND\_DIAGNOSTIC\_REGISTER(slave\_addr)\ \{0\}}}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00096}00096\ \textcolor{preprocessor}{\ \ \ \ \#define\ MB\_REQUEST\_RETURN\_BUS\_MESSAGE\_COUNT(slave\_addr)\ \{0\}}}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00097}00097\ \textcolor{preprocessor}{\ \ \ \ \#define\ MB\_REQUEST\_RETURN\_BUS\_COMMUNICATION\_ERROR\_COUNT(slave\_addr)\ \{0\}}}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00098}00098\ \textcolor{preprocessor}{\ \ \ \ \#define\ MB\_REQUEST\_RETURN\_SLAVE\_EXCEPTION\_ERROR\_COUNT(slave\_addr)\ \{0\}}}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00099}00099\ \textcolor{preprocessor}{\ \ \ \ \#define\ MB\_REQUEST\_RETURN\_SLAVE\_MESSAGE\_COUNT(slave\_addr)\ \{0\}}}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00100}00100\ \textcolor{preprocessor}{\ \ \ \ \#define\ MB\_REQUEST\_RETURN\_SLAVE\_NO\_RESPONSE\_COUNT(slave\_addr)\ \{0\}}}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00101}00101\ \textcolor{preprocessor}{\ \ \ \ \#define\ MB\_REQUEST\_RETURN\_SLAVE\_NAK\_COUNT(slave\_addr)\ \{0\}}}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00102}00102\ \textcolor{preprocessor}{\ \ \ \ \#define\ MB\_REQUEST\_RETURN\_SLAVE\_BUSY\_COUNT(slave\_addr)\ \{0\}}}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00103}00103\ \textcolor{preprocessor}{\ \ \ \ \#define\ MB\_REQUEST\_RETURN\_BUS\_CHARACTER\_OVERRUN\_COUNT(slave\_addr)\ \{0\}}}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00104}00104\ \textcolor{preprocessor}{\ \ \ \ \#define\ MB\_REQUEST\_READ\_DEVICE\_ID\_BASIC(slave\_addr)\ \{0\}}}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00105}00105\ \textcolor{preprocessor}{\ \ \ \ \#define\ MB\_REQUEST\_READ\_DEVICE\_ID\_REGULAR(slave\_addr)\ \{0\}}}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00106}00106\ \textcolor{preprocessor}{\ \ \ \ \#define\ MB\_REQUEST\_READ\_DEVICE\_ID\_EXTENDED(slave\_addr)\ \{0\}}}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00107}00107\ \textcolor{preprocessor}{\ \ \ \ \#define\ MB\_REQUEST\_READ\_DEVICE\_ID\_SPECIFIC(slave\_addr,\ object\_id)\ \{0\}}}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00108}00108\ \textcolor{preprocessor}{\ \ \ \ \#define\ MB\_Master\_Collect\_Message(hmodbus,\ modbus\_msg,\ modbus\_uart\_buff)\ RS\_ERR}}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00109}00109\ \textcolor{preprocessor}{\ \ \ \ \#define\ MB\_Master\_Parse\_Message(hmodbus,\ modbus\_msg,\ modbus\_uart\_buff)\ RS\_ERR}}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00110}00110\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00111}00111\ }
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00112}00112\ \textcolor{preprocessor}{\#ifndef\ \ MODBUS\_ENABLE\_SLAVE}}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00113}00113\ \textcolor{preprocessor}{\ \ \ \ \#define\ MB\_Slave\_Response(hmodbus,\ modbus\_msg)\ RS\_ERR}}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00114}00114\ \textcolor{preprocessor}{\ \ \ \ \#define\ MB\_Slave\_Collect\_Message(hmodbus,\ modbus\_msg,\ modbus\_uart\_buff)\ RS\_ERR}}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00115}00115\ \textcolor{preprocessor}{\ \ \ \ \#define\ MB\_Slave\_Parse\_Message(hmodbus,\ modbus\_msg,\ modbus\_uart\_buff)\ RS\_ERR}}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00116}00116\ \textcolor{preprocessor}{\#endif\ }}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00117}00117\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{____modbus__compat_8h_source_l00118}00118\ \textcolor{comment}{/**\ @endcond\ */}}
\end{DoxyCode}

View File

@@ -0,0 +1,76 @@
\doxysection{E\+:/.WORK/\+STM32/\+Diod\+\_\+\+Test/diode\+\_\+tester/\+Core/\+Modbus/\+\_\+\+\_\+modbus\+\_\+config.h}
\hypertarget{____modbus__config_8h_source}{}\label{____modbus__config_8h_source}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{____modbus__config_8h_source_l00001}00001\ \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{____modbus__config_8h_source_l00002}00002\ \textcolor{comment}{******************************************************************************}}
\DoxyCodeLine{\Hypertarget{____modbus__config_8h_source_l00003}00003\ \textcolor{comment}{*\ @file\ modbus\_config.h}}
\DoxyCodeLine{\Hypertarget{____modbus__config_8h_source_l00004}00004\ \textcolor{comment}{*\ @brief\ Конфигурационные\ параметры\ Modbus\ устройства}}
\DoxyCodeLine{\Hypertarget{____modbus__config_8h_source_l00005}00005\ \textcolor{comment}{******************************************************************************}}
\DoxyCodeLine{\Hypertarget{____modbus__config_8h_source_l00006}00006\ \textcolor{comment}{@addtogroup\ MODBUS\_CONFIGS\ Modbus\ configs}}
\DoxyCodeLine{\Hypertarget{____modbus__config_8h_source_l00007}00007\ \textcolor{comment}{@ingroup\ \ \ \ MODBUS}}
\DoxyCodeLine{\Hypertarget{____modbus__config_8h_source_l00008}00008\ \textcolor{comment}{@brief\ Конфигурация\ библиотеки}}
\DoxyCodeLine{\Hypertarget{____modbus__config_8h_source_l00009}00009\ \textcolor{comment}{@\{}}
\DoxyCodeLine{\Hypertarget{____modbus__config_8h_source_l00010}00010\ \textcolor{comment}{******************************************************************************}}
\DoxyCodeLine{\Hypertarget{____modbus__config_8h_source_l00011}00011\ \textcolor{comment}{*\ @details}}
\DoxyCodeLine{\Hypertarget{____modbus__config_8h_source_l00012}00012\ \textcolor{comment}{Файл\ содержит\ настройки\ для\ работы\ Modbus:}}
\DoxyCodeLine{\Hypertarget{____modbus__config_8h_source_l00013}00013\ \textcolor{comment}{-\/\ Подключение\ библиотек\ контроллера}}
\DoxyCodeLine{\Hypertarget{____modbus__config_8h_source_l00014}00014\ \textcolor{comment}{-\/\ ID\ устройства\ и\ таймауты}}
\DoxyCodeLine{\Hypertarget{____modbus__config_8h_source_l00015}00015\ \textcolor{comment}{-\/\ Строковые\ идентификаторы\ (Vendor,\ Product,\ Revision)}}
\DoxyCodeLine{\Hypertarget{____modbus__config_8h_source_l00016}00016\ \textcolor{comment}{-\/\ Настройки\ периферии\ (UART,\ TIMER)}}
\DoxyCodeLine{\Hypertarget{____modbus__config_8h_source_l00017}00017\ \textcolor{comment}{-\/\ Подключение\ модулей\ Modbus}}
\DoxyCodeLine{\Hypertarget{____modbus__config_8h_source_l00018}00018\ \textcolor{comment}{-\/\ Опциональные\ функции\ (переключение\ команд\ 0x03/0x04)}}
\DoxyCodeLine{\Hypertarget{____modbus__config_8h_source_l00019}00019\ \textcolor{comment}{******************************************************************************/}}
\DoxyCodeLine{\Hypertarget{____modbus__config_8h_source_l00020}00020\ \textcolor{preprocessor}{\#ifndef\ \_MODBUS\_CONFIG\_H\_}}
\DoxyCodeLine{\Hypertarget{____modbus__config_8h_source_l00021}00021\ \textcolor{preprocessor}{\#define\ \_MODBUS\_CONFIG\_H\_}}
\DoxyCodeLine{\Hypertarget{____modbus__config_8h_source_l00022}00022\ \textcolor{preprocessor}{\#include\ "{}stm32f1xx\_hal.h"{}}}
\DoxyCodeLine{\Hypertarget{____modbus__config_8h_source_l00023}00023\ }
\DoxyCodeLine{\Hypertarget{____modbus__config_8h_source_l00024}00024\ \textcolor{comment}{//\ Общие\ параметры}}
\DoxyCodeLine{\Hypertarget{____modbus__config_8h_source_l00025}\mbox{\hyperlink{group___m_o_d_b_u_s___c_o_n_f_i_g_s_gab9b18e108b98b225a52c5ccca58e7f2b}{00025}}\ \textcolor{preprocessor}{\#define\ MODBUS\_DEVICE\_ID\ \ \ \ \ \ \ \ \ \ \ \ \ \ 1\ \ \ \ \ \ \ }\textcolor{comment}{///<\ Адрес\ устройства\ в\ сети\ Modbus}}
\DoxyCodeLine{\Hypertarget{____modbus__config_8h_source_l00026}\mbox{\hyperlink{group___m_o_d_b_u_s___c_o_n_f_i_g_s_ga66f7c59a25c8cca6d5b0991895c26b69}{00026}}\ \textcolor{preprocessor}{\#define\ MODBUS\_TIMEOUT\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ 5000\ \ \ \ }\textcolor{comment}{///<\ Таймаут\ в\ тиках\ таймера}}
\DoxyCodeLine{\Hypertarget{____modbus__config_8h_source_l00027}00027\ }
\DoxyCodeLine{\Hypertarget{____modbus__config_8h_source_l00028}00028\ \textcolor{comment}{//\ Строковые\ идентификаторы\ устройства}}
\DoxyCodeLine{\Hypertarget{____modbus__config_8h_source_l00029}00029\ \textcolor{preprocessor}{\#define\ MODBUS\_VENDOR\_NAME\ \ \ \ \ \ \ \ \ \ \ \ "{}NIO-\/12"{}}}
\DoxyCodeLine{\Hypertarget{____modbus__config_8h_source_l00030}00030\ \textcolor{preprocessor}{\#define\ MODBUS\_PRODUCT\_CODE\ \ \ \ \ \ \ \ \ \ \ "{}"{}}}
\DoxyCodeLine{\Hypertarget{____modbus__config_8h_source_l00031}00031\ \textcolor{preprocessor}{\#define\ MODBUS\_REVISION\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "{}"{}}}
\DoxyCodeLine{\Hypertarget{____modbus__config_8h_source_l00032}00032\ \textcolor{preprocessor}{\#define\ MODBUS\_VENDOR\_URL\ \ \ \ \ \ \ \ \ \ \ \ \ "{}"{}}}
\DoxyCodeLine{\Hypertarget{____modbus__config_8h_source_l00033}00033\ \textcolor{preprocessor}{\#define\ MODBUS\_PRODUCT\_NAME\ \ \ \ \ \ \ \ \ \ \ "{}"{}}}
\DoxyCodeLine{\Hypertarget{____modbus__config_8h_source_l00034}00034\ \textcolor{preprocessor}{\#define\ MODBUS\_MODEL\_NAME\ \ \ \ \ \ \ \ \ \ \ \ \ "{}"{}}}
\DoxyCodeLine{\Hypertarget{____modbus__config_8h_source_l00035}00035\ \textcolor{preprocessor}{\#define\ MODBUS\_USER\_APPLICATION\_NAME\ \ "{}"{}}}
\DoxyCodeLine{\Hypertarget{____modbus__config_8h_source_l00036}00036\ }
\DoxyCodeLine{\Hypertarget{____modbus__config_8h_source_l00037}\mbox{\hyperlink{group___m_o_d_b_u_s___c_o_n_f_i_g_s_ga5c7e9c2180ceac1208f4b791d7b70a0a}{00037}}\ \textcolor{preprocessor}{\#define\ MODBUS\_NUMB\_OF\_USEROBJECTS\ \ \ \ 0\ \ \ }\textcolor{comment}{///<\ Количество\ пользовательских\ объектов}}
\DoxyCodeLine{\Hypertarget{____modbus__config_8h_source_l00038}\mbox{\hyperlink{group___m_o_d_b_u_s___c_o_n_f_i_g_s_gac3b162e9af2731742eb3ca8317b37397}{00038}}\ \textcolor{preprocessor}{\#define\ MODBUS\_USEROBJECT\_0\_NAME\ \ \ \ \ \ "{}"{}\ \ }\textcolor{comment}{///<\ Строка\ пользовательского\ идентификатора\ 0.\ По\ аналогии\ можно\ определить\ строки\ до\ <=128\ USEROBJECT}}
\DoxyCodeLine{\Hypertarget{____modbus__config_8h_source_l00039}00039\ }
\DoxyCodeLine{\Hypertarget{____modbus__config_8h_source_l00040}00040\ \textcolor{comment}{//\ Периферия\ (опционально)}}
\DoxyCodeLine{\Hypertarget{____modbus__config_8h_source_l00041}\mbox{\hyperlink{group___m_o_d_b_u_s___c_o_n_f_i_g_s_ga370986118b8227cb6cb33c6b748fbbcb}{00041}}\ \textcolor{preprocessor}{\#define\ mb\_huart\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ huart1\ \ \ \ \ \ \ \ }\textcolor{comment}{///<\ Удобный\ дефайн\ для\ модбасовского\ uart}}
\DoxyCodeLine{\Hypertarget{____modbus__config_8h_source_l00042}\mbox{\hyperlink{group___m_o_d_b_u_s___c_o_n_f_i_g_s_ga6723a1608946a4f86cd7c9c7e614d04e}{00042}}\ \textcolor{preprocessor}{\#define\ mb\_htim\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ htim3\ \ \ \ \ \ \ \ \ }\textcolor{comment}{///<\ Удобный\ дефайн\ для\ модбасовского\ таймера}}
\DoxyCodeLine{\Hypertarget{____modbus__config_8h_source_l00043}00043\ \textcolor{comment}{//\#define\ RS\_EnableReceive()\ \ \ \ \ \ \ \ \ \ ///<\ Функция\ изменения\ направления\ передачи\ на\ ПРИЕМ\ для\ RS-\/485}}
\DoxyCodeLine{\Hypertarget{____modbus__config_8h_source_l00044}00044\ \textcolor{comment}{//\#define\ RS\_EnableTransmit()\ \ \ \ \ \ \ \ \ ///<\ Функция\ изменения\ направления\ передачи\ на\ ПЕРЕДАЧУ\ для\ RS-\/485}}
\DoxyCodeLine{\Hypertarget{____modbus__config_8h_source_l00045}00045\ }
\DoxyCodeLine{\Hypertarget{____modbus__config_8h_source_l00046}00046\ }
\DoxyCodeLine{\Hypertarget{____modbus__config_8h_source_l00047}00047\ \textcolor{comment}{//\ Модули\ modbus}}
\DoxyCodeLine{\Hypertarget{____modbus__config_8h_source_l00048}\mbox{\hyperlink{group___m_o_d_b_u_s___c_o_n_f_i_g_s_gae11f9ed7ca5e75d332a1187d2a213f9c}{00048}}\ \textcolor{preprocessor}{\#define\ MODBUS\_ENABLE\_SLAVE\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\textcolor{comment}{///<\ Включить\ обработку\ СЛЕЙВ\ режима}}
\DoxyCodeLine{\Hypertarget{____modbus__config_8h_source_l00049}\mbox{\hyperlink{group___m_o_d_b_u_s___c_o_n_f_i_g_s_gae4fc30421556e1ee530f13a4b3924f5a}{00049}}\ \textcolor{preprocessor}{\#define\ MODBUS\_ENABLE\_MASTER\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\textcolor{comment}{///<\ Включить\ обработку\ МАСТЕР\ режима}}
\DoxyCodeLine{\Hypertarget{____modbus__config_8h_source_l00050}00050\ }
\DoxyCodeLine{\Hypertarget{____modbus__config_8h_source_l00051}\mbox{\hyperlink{group___m_o_d_b_u_s___c_o_n_f_i_g_s_ga29ce22b8b7f0622bc23171c6ae2dc8d1}{00051}}\ \textcolor{preprocessor}{\#define\ MODBUS\_ENABLE\_COILS\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\textcolor{comment}{///<\ Включить\ обработку\ коилов}}
\DoxyCodeLine{\Hypertarget{____modbus__config_8h_source_l00052}\mbox{\hyperlink{group___m_o_d_b_u_s___c_o_n_f_i_g_s_gaf6a8dfc090b3915d668d78ee19585344}{00052}}\ \textcolor{preprocessor}{\#define\ MODBUS\_ENABLE\_HOLDINGS\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\textcolor{comment}{///<\ Включить\ обработку\ регистров\ хранения}}
\DoxyCodeLine{\Hypertarget{____modbus__config_8h_source_l00053}\mbox{\hyperlink{group___m_o_d_b_u_s___c_o_n_f_i_g_s_ga23d7073c81bedb80a302140afd0d79c0}{00053}}\ \textcolor{preprocessor}{\#define\ MODBUS\_ENABLE\_INPUTS\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\textcolor{comment}{///<\ Включить\ обработку\ входных\ регистров}}
\DoxyCodeLine{\Hypertarget{____modbus__config_8h_source_l00054}\mbox{\hyperlink{group___m_o_d_b_u_s___c_o_n_f_i_g_s_ga5bf9f305bd863b10f1b350c5004ddda7}{00054}}\ \textcolor{preprocessor}{\#define\ MODBUS\_ENABLE\_DEVICE\_IDENTIFICATIONS\ \ }\textcolor{comment}{///<\ Включить\ обработку\ идентификаторы\ устройства}}
\DoxyCodeLine{\Hypertarget{____modbus__config_8h_source_l00055}\mbox{\hyperlink{group___m_o_d_b_u_s___c_o_n_f_i_g_s_gae68222efbcf3199706bfaef46af97bf8}{00055}}\ \textcolor{preprocessor}{\#define\ MODBUS\_ENABLE\_DIAGNOSTICS\ \ \ \ \ \ \ \ \ \ \ \ \ }\textcolor{comment}{///<\ Включить\ обработку\ диагностики\ модбас}}
\DoxyCodeLine{\Hypertarget{____modbus__config_8h_source_l00056}00056\ }
\DoxyCodeLine{\Hypertarget{____modbus__config_8h_source_l00057}00057\ \textcolor{comment}{//\#define\ MODBUS\_PROTOCOL\_TCP\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ///<\ Включить\ TCP-\/протокол,\ иначе\ -\/\ RTU}}
\DoxyCodeLine{\Hypertarget{____modbus__config_8h_source_l00058}00058\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{____modbus__config_8h_source_l00059}00059\ \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{____modbus__config_8h_source_l00060}00060\ \textcolor{comment}{\ \ *\ @brief\ \ \ \ Поменять\ комманды\ 0x03\ и\ 0x04\ местами\ (для\ LabView\ терминалки\ от\ двигателей)}}
\DoxyCodeLine{\Hypertarget{____modbus__config_8h_source_l00061}00061\ \textcolor{comment}{\ \ *\ @details\ \ Терминалка\ от\ двигателей\ использует\ для\ чтения\ регистров\ комманду\ R\_HOLD\_REGS\ вместо\ R\_IN\_REGS}}
\DoxyCodeLine{\Hypertarget{____modbus__config_8h_source_l00062}00062\ \textcolor{comment}{\ \ *\ \ \ \ \ \ \ \ \ \ \ Поэтому\ чтобы\ считывать\ Input\ Regs\ -\/\ надо\ поменять\ их\ местами.}}
\DoxyCodeLine{\Hypertarget{____modbus__config_8h_source_l00063}00063\ \textcolor{comment}{\ \ */}}
\DoxyCodeLine{\Hypertarget{____modbus__config_8h_source_l00064}00064\ \textcolor{comment}{//\#define\ MODBUS\_SWITCH\_COMMAND\_R\_IN\_REGS\_AND\_R\_HOLD\_REGS}}
\DoxyCodeLine{\Hypertarget{____modbus__config_8h_source_l00065}00065\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{____modbus__config_8h_source_l00066}00066\ \textcolor{comment}{/////////////////////////////////////////////////////////////////////}}
\DoxyCodeLine{\Hypertarget{____modbus__config_8h_source_l00067}00067\ \textcolor{comment}{/////////////////////////-\/-\/-\/CALC\ DEFINES-\/-\/-\///////////////////////////}}
\DoxyCodeLine{\Hypertarget{____modbus__config_8h_source_l00068}00068\ }
\DoxyCodeLine{\Hypertarget{____modbus__config_8h_source_l00069}00069\ }
\DoxyCodeLine{\Hypertarget{____modbus__config_8h_source_l00070}00070\ \ \ }
\DoxyCodeLine{\Hypertarget{____modbus__config_8h_source_l00071}00071\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{//\_MODBUS\_CONFIG\_H\_}}
\end{DoxyCode}

View File

@@ -0,0 +1,146 @@
\doxysection{E\+:/.WORK/\+STM32/\+Diod\+\_\+\+Test/diode\+\_\+tester/\+Core/\+Modbus/\+\_\+\+\_\+modbus\+\_\+data.c}
\hypertarget{____modbus__data_8c_source}{}\label{____modbus__data_8c_source}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00001}00001\ \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00002}00002\ \textcolor{comment}{******************************************************************************}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00003}00003\ \textcolor{comment}{*\ @file\ modbus\_data.c}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00004}00004\ \textcolor{comment}{*\ @brief\ Функции\ доступа\ к\ данным\ Modbus}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00005}00005\ \textcolor{comment}{******************************************************************************}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00006}00006\ \textcolor{comment}{*\ @details}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00007}00007\ \textcolor{comment}{Модуль\ реализует\ функции\ валидации\ адресов\ и\ доступа\ к\ данным:}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00008}00008\ \textcolor{comment}{-\/\ Проверка\ корректности\ запрашиваемых\ адресов}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00009}00009\ \textcolor{comment}{-\/\ Определение\ указателей\ на\ реальные\ данные\ в\ памяти}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00010}00010\ \textcolor{comment}{-\/\ Поддержка\ пользовательских\ массивов\ регистров\ и\ coils}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00011}00011\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00012}00012\ \textcolor{comment}{@section\ Валидация\ адресов:}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00013}00013\ \textcolor{comment}{-\/\ MB\_Check\_Address\_For\_Arr()\ -\/\ проверка\ принадлежности\ адреса\ массиву}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00014}00014\ \textcolor{comment}{-\/\ MB\_DefineRegistersAddress()\ -\/\ получение\ указателя\ на\ регистры}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00015}00015\ \textcolor{comment}{-\/\ MB\_DefineCoilsAddress()\ -\/\ получение\ указателя\ на\ coils}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00016}00016\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00017}00017\ \textcolor{comment}{******************************************************************************/}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00018}00018\ }
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00019}00019\ \textcolor{preprocessor}{\#include\ "{}\mbox{\hyperlink{modbus__core_8h}{modbus\_core.h}}"{}}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00020}00020\ \textcolor{preprocessor}{\#include\ "{}\mbox{\hyperlink{modbus__coils_8h}{modbus\_coils.h}}"{}}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00021}00021\ \textcolor{preprocessor}{\#include\ "{}\mbox{\hyperlink{modbus__holdregs_8h}{modbus\_holdregs.h}}"{}}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00022}00022\ \textcolor{preprocessor}{\#include\ "{}\mbox{\hyperlink{modbus__inputregs_8h}{modbus\_inputregs.h}}"{}}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00023}00023\ \textcolor{preprocessor}{\#include\ "{}\mbox{\hyperlink{modbus__devid_8h}{modbus\_devid.h}}"{}}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00024}00024\ }
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00025}00025\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00026}00026\ \textcolor{comment}{/**\ }}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00027}00027\ \textcolor{comment}{\ \ *\ @brief\ \ \ \ Check\ is\ address\ valid\ for\ certain\ array.}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00028}00028\ \textcolor{comment}{\ \ *\ @param\ \ \ \ Addr\ \ \ \ \ \ \ \ \ \ Начальный\ адресс.}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00029}00029\ \textcolor{comment}{\ \ *\ @param\ \ \ \ Qnt\ \ \ \ \ \ \ \ \ \ \ Количество\ запрашиваемых\ элементов.}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00030}00030\ \textcolor{comment}{\ \ *\ @param\ \ \ \ R\_ARR\_ADDR\ \ \ \ Начальный\ адресс\ массива\ R\_ARR.}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00031}00031\ \textcolor{comment}{\ \ *\ @param\ \ \ \ R\_ARR\_NUMB\ \ \ \ Количество\ элементов\ в\ массиве\ R\_ARR.}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00032}00032\ \textcolor{comment}{\ \ *\ @return\ \ \ ExceptionCode\ -\/\ ET\_ILLEGAL\_DATA\_ADRESS\ если\ адресс\ недействителен,\ и\ ET\_NO\_ERRORS\ если\ все\ ок.}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00033}00033\ \textcolor{comment}{\ \ *}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00034}00034\ \textcolor{comment}{\ \ *\ @details\ \ Позволяет\ определить,\ принадлежит\ ли\ адресс\ Addr\ массиву\ R\_ARR:}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00035}00035\ \textcolor{comment}{\ \ *\ \ \ \ \ \ \ \ \ \ \ Если\ адресс\ Addr\ находится\ в\ диапазоне\ адрессов\ массива\ R\_ARR,\ то\ возвращаем\ NO\_ERROR.}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00036}00036\ \textcolor{comment}{\ \ *\ \ \ \ \ \ \ \ \ \ \ Если\ адресс\ Addr\ находится\ за\ пределами\ адрессов\ массива\ R\_ARR\ -\/\ ET\_ILLEGAL\_DATA\_ADDRESSю.}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00037}00037\ \textcolor{comment}{\ \ */}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00038}\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_ga278ca9791c69aef8adeb9e7c4b273c50}{00038}}\ \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\_ExceptionTypeDef}}\ \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_ga278ca9791c69aef8adeb9e7c4b273c50}{MB\_Check\_Address\_For\_Arr}}(uint16\_t\ Addr,\ uint16\_t\ Qnt,\ uint16\_t\ R\_ARR\_ADDR,\ uint16\_t\ R\_ARR\_NUMB)}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00039}00039\ \{}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00040}00040\ \ \ \textcolor{comment}{//\ if\ address\ from\ this\ array}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00041}00041\ \ \ \textcolor{keywordflow}{if}(Addr\ >=\ R\_ARR\_ADDR)\ }
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00042}00042\ \ \ \{\ \ \ }
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00043}00043\ \ \ \ \ \textcolor{comment}{//\ if\ quantity\ too\ big\ return\ error}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00044}00044\ \ \ \ \ \textcolor{keywordflow}{if}\ ((Addr\ -\/\ R\_ARR\_ADDR)\ +\ Qnt\ >\ R\_ARR\_NUMB)\ }
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00045}00045\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00046}00046\ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \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}};\ \ \textcolor{comment}{//\ return\ exception\ code}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00047}00047\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00048}00048\ \ \ \ \ \textcolor{comment}{//\ if\ all\ ok\ -\/\ return\ no\ errors}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00049}00049\ \ \ \ \ \textcolor{keywordflow}{return}\ \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}};}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00050}00050\ \ \ \}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00051}00051\ \ \ \textcolor{comment}{//\ if\ address\ isnt\ from\ this\ array\ return\ error}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00052}00052\ \ \ \textcolor{keywordflow}{else}\ }
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00053}00053\ \ \ \ \ \textcolor{keywordflow}{return}\ \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}};\ \ \textcolor{comment}{//\ return\ exception\ code\ \ \ \ }}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00054}00054\ \}\textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00055}00055\ \textcolor{comment}{/**\ }}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00056}00056\ \textcolor{comment}{\ \ *\ @brief\ \ \ \ Define\ Address\ Origin\ for\ Input/Holding\ Registers}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00057}00057\ \textcolor{comment}{\ \ *\ @param\ \ \ \ pRegs\ \ \ \ \ \ \ \ \ Указатель\ на\ указатель\ регистров.}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00058}00058\ \textcolor{comment}{\ \ *\ @param\ \ \ \ Addr\ \ \ \ \ \ \ \ \ \ Адрес\ начального\ регистра.}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00059}00059\ \textcolor{comment}{\ \ *\ @param\ \ \ \ Qnt\ \ \ \ \ \ \ \ \ \ \ Количество\ запрашиваемых\ регистров.}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00060}00060\ \textcolor{comment}{\ \ *\ @param\ \ \ \ WriteFlag\ \ \ \ \ Флаг\ регистр\ нужны\ для\ чтения\ или\ записи.}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00061}00061\ \textcolor{comment}{\ \ *\ @return\ \ \ ExceptionCode\ Код\ исключения\ если\ есть,\ и\ ET\_NO\_ERRORS\ если\ нет.}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00062}00062\ \textcolor{comment}{\ \ *}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00063}00063\ \textcolor{comment}{\ \ *\ @details\ \ Определение\ адреса\ начального\ регистра.}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00064}00064\ \textcolor{comment}{\ \ *\ @note\ \ \ \ \ WriteFlag\ пока\ не\ используется.}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00065}00065\ \textcolor{comment}{\ \ */}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00066}\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_ga1e90bb28a4cf997250daab6470d5ffe3}{00066}}\ \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\_ExceptionTypeDef}}\ \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_ga1e90bb28a4cf997250daab6470d5ffe3}{MB\_DefineRegistersAddress}}(uint16\_t\ **pRegs,\ uint16\_t\ Addr,\ uint16\_t\ Qnt,\ uint8\_t\ RegisterType)}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00067}00067\ \{\ }
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00068}00068\ \ \ \textcolor{comment}{/*\ check\ quantity\ error\ */}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00069}00069\ \ \ \textcolor{keywordflow}{if}\ (Qnt\ >\ \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}})\ \ }
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00070}00070\ \ \ \{\ \ \ }
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00071}00071\ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \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}};\ \ \textcolor{comment}{//\ return\ exception\ code}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00072}00072\ \ \ \}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00073}00073\ \ \ }
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00074}00074\ \ \ \textcolor{keywordflow}{if}(RegisterType\ ==\ RegisterType\_Holding)}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00075}00075\ \ \ \{}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00076}00076\ \ \ \ \ \textcolor{comment}{//\ Default\ holding\ registers}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00077}00077\ \ \ \ \ \textcolor{keywordflow}{if}(\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_ga278ca9791c69aef8adeb9e7c4b273c50}{MB\_Check\_Address\_For\_Arr}}(Addr,\ Qnt,\ \mbox{\hyperlink{modbus__data_8h_a791dfd31cc06338acdd8a2eb3b7032e6}{R\_HOLDING\_ADDR}},\ \mbox{\hyperlink{modbus__data_8h_acf40437374a3227e661db1a18bcef7d7}{R\_HOLDING\_QNT}})\ ==\ \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}})}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00078}00078\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00079}00079\ \ \ \ \ \ \ *pRegs\ =\ \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}}(\&MB\_DATA.HoldRegs,\ Addr\ -\/\ \mbox{\hyperlink{modbus__data_8h_a791dfd31cc06338acdd8a2eb3b7032e6}{R\_HOLDING\_ADDR}});\ \ \textcolor{comment}{//\ указатель\ на\ выбранный\ по\ Addr\ регистр}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00080}00080\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00081}00081\ \ \ \ \ \textcolor{comment}{//\ if\ address\ doesnt\ match\ any\ array\ -\/\ return\ illegal\ data\ address\ response}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00082}00082\ \ \ \ \ \textcolor{keywordflow}{else}\ \ }
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00083}00083\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00084}00084\ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \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}};}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00085}00085\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00086}00086\ \ \ \}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00087}00087\ \ \ \textcolor{keywordflow}{else}\ \textcolor{keywordflow}{if}(RegisterType\ ==\ RegisterType\_Input)}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00088}00088\ \ \ \{}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00089}00089\ \ \ \ \ \textcolor{comment}{//\ Default\ input\ registers}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00090}00090\ \ \ \ \ \textcolor{keywordflow}{if}(\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_ga278ca9791c69aef8adeb9e7c4b273c50}{MB\_Check\_Address\_For\_Arr}}(Addr,\ Qnt,\ \mbox{\hyperlink{modbus__data_8h_a22bd1273e01d32f90a279b517d1737b6}{R\_INPUT\_ADDR}},\ \mbox{\hyperlink{modbus__data_8h_a97c0b1e20498bca34f6dfe0ac0d97b30}{R\_INPUT\_QNT}})\ ==\ \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}})}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00091}00091\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00092}00092\ \ \ \ \ \ \ *pRegs\ =\ \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}}(\&MB\_DATA.InRegs,\ Addr\ -\/\ \mbox{\hyperlink{modbus__data_8h_a22bd1273e01d32f90a279b517d1737b6}{R\_INPUT\_ADDR}});\ \ \textcolor{comment}{//\ указатель\ на\ выбранный\ по\ Addr\ регистр}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00093}00093\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00094}00094\ \ \ \ \ \textcolor{comment}{//\ if\ address\ doesnt\ match\ any\ array\ -\/\ return\ illegal\ data\ address\ response}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00095}00095\ \ \ \ \ \textcolor{keywordflow}{else}\ \ }
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00096}00096\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00097}00097\ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \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}};}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00098}00098\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00099}00099\ \ \ \}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00100}00100\ \ \ \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00101}00101\ \ \ \{}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00102}00102\ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \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}};}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00103}00103\ \ \ \}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00104}00104\ \ \ \textcolor{comment}{//\ if\ found\ requeried\ array\ return\ no\ err}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00105}00105\ \ \ \textcolor{keywordflow}{return}\ \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}};\ \textcolor{comment}{//\ return\ no\ errors}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00106}00106\ \}\textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00107}00107\ \textcolor{comment}{/**\ }}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00108}00108\ \textcolor{comment}{\ \ *\ @brief\ \ \ \ Define\ Address\ Origin\ for\ coils}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00109}00109\ \textcolor{comment}{\ \ *\ @param\ \ \ \ pCoils\ \ \ \ \ \ \ \ Указатель\ на\ указатель\ коилов.}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00110}00110\ \textcolor{comment}{\ \ *\ @param\ \ \ \ Addr\ \ \ \ \ \ \ \ \ \ Адресс\ начального\ коила.}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00111}00111\ \textcolor{comment}{\ \ *\ @param\ \ \ \ Qnt\ \ \ \ \ \ \ \ \ \ \ Количество\ запрашиваемых\ коилов.}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00112}00112\ \textcolor{comment}{\ \ *\ @param\ \ \ \ start\_shift\ \ \ Указатель\ на\ переменную\ содержащую\ сдвиг\ внутри\ регистра\ для\ начального\ коила.}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00113}00113\ \textcolor{comment}{\ \ *\ @param\ \ \ \ WriteFlag\ \ \ \ \ Флаг\ коилы\ нужны\ для\ чтения\ или\ записи.}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00114}00114\ \textcolor{comment}{\ \ *\ @return\ \ \ ExceptionCode\ Код\ исключения\ если\ есть,\ и\ ET\_NO\_ERRORS\ если\ нет.}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00115}00115\ \textcolor{comment}{\ \ *}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00116}00116\ \textcolor{comment}{\ \ *\ @details\ \ Определение\ адреса\ начального\ регистра\ запрашиваемых\ коилов.}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00117}00117\ \textcolor{comment}{\ \ *\ @note\ \ \ \ \ WriteFlag\ используется\ для\ определния\ регистров\ GPIO:\ ODR\ или\ IDR.}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00118}00118\ \textcolor{comment}{\ \ */}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00119}\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_gade717a6829a062a8a198bd933c8b2221}{00119}}\ \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\_ExceptionTypeDef}}\ \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_gade717a6829a062a8a198bd933c8b2221}{MB\_DefineCoilsAddress}}(uint16\_t\ **pCoils,\ uint16\_t\ Addr,\ uint16\_t\ Qnt,\ uint16\_t\ *start\_shift,\ uint8\_t\ WriteFlag)}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00120}00120\ \{\ }
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00121}00121\ \ \ \textcolor{comment}{/*\ check\ quantity\ error\ */}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00122}00122\ \ \ \textcolor{keywordflow}{if}\ (Qnt\ >\ 2000)\ }
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00123}00123\ \ \ \{}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00124}00124\ \ \ \ \ \textcolor{keywordflow}{return}\ \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}};\ \ \textcolor{comment}{//\ return\ exception\ code}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00125}00125\ \ \ \}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00126}00126\ \ \ \ \ }
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00127}00127\ \ \ \textcolor{comment}{//\ Default\ coils}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00128}00128\ \ \ \textcolor{keywordflow}{if}(\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_ga278ca9791c69aef8adeb9e7c4b273c50}{MB\_Check\_Address\_For\_Arr}}(Addr,\ Qnt,\ \mbox{\hyperlink{modbus__data_8h_a5057c379abcae88db30ad094eceb952d}{C\_COILS\_ADDR}},\ \mbox{\hyperlink{modbus__data_8h_a438d957058fcf102c66922f0eada3af2}{C\_COILS\_QNT}})\ ==\ \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}})}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00129}00129\ \ \ \{}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00130}00130\ \ \ \ \ *pCoils\ =\ \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}}(\&MB\_DATA.Coils,\ Addr\ -\/\ \mbox{\hyperlink{modbus__data_8h_a5057c379abcae88db30ad094eceb952d}{C\_COILS\_ADDR}});\ \ \textcolor{comment}{//\ указатель\ на\ выбранный\ по\ Addr\ массив\ коилов}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00131}00131\ \ \ \}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00132}00132\ \ \ \textcolor{comment}{//\ if\ address\ doesnt\ match\ any\ array\ -\/\ return\ illegal\ data\ address\ response}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00133}00133\ \ \ \textcolor{keywordflow}{else}\ \ }
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00134}00134\ \ \ \{}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00135}00135\ \ \ \ \ \textcolor{keywordflow}{return}\ \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}};}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00136}00136\ \ \ \}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00137}00137\ \ \ }
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00138}00138\ \ \ *start\_shift\ =\ Addr\ \%\ 16;\ \textcolor{comment}{//\ set\ shift\ to\ requested\ coil}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00139}00139\ \ \ \textcolor{comment}{//\ if\ found\ requeried\ array\ return\ no\ err}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00140}00140\ \ \ \textcolor{keywordflow}{return}\ \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}};\ \textcolor{comment}{//\ return\ no\ errors}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8c_source_l00141}00141\ \}}
\end{DoxyCode}

View File

@@ -0,0 +1,164 @@
\doxysection{E\+:/.WORK/\+STM32/\+Diod\+\_\+\+Test/diode\+\_\+tester/\+Core/\+Modbus/\+\_\+\+\_\+modbus\+\_\+data.h}
\hypertarget{____modbus__data_8h_source}{}\label{____modbus__data_8h_source}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00001}00001\ \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00002}00002\ \textcolor{comment}{******************************************************************************}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00003}00003\ \textcolor{comment}{*\ @file\ modbus\_data.h}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00004}00004\ \textcolor{comment}{*\ @brief\ Определения\ структур\ данных\ Modbus\ устройства}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00005}00005\ \textcolor{comment}{******************************************************************************}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00006}00006\ \textcolor{comment}{@defgroup\ MODBUS\_DATA\ Modbus\ Registers\ Map}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00007}00007\ \textcolor{comment}{@ingroup\ MODBUS}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00008}00008\ \textcolor{comment}{@brief\ Определение\ карты\ регистров\ и\ коилов}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00009}00009\ \textcolor{comment}{******************************************************************************}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00010}00010\ \textcolor{comment}{*\ @details}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00011}00011\ \textcolor{comment}{Файл\ содержит\ объявления\ структур\ данных,\ доступных\ через\ Modbus:}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00012}00012\ \textcolor{comment}{-\/\ Holding\ Registers\ (R/W)\ -\/\ регистры\ хранения}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00013}00013\ \textcolor{comment}{-\/\ Input\ Registers\ (R/O)\ -\/\ входные\ регистры\ \ }}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00014}00014\ \textcolor{comment}{-\/\ Coils\ (R/W)\ -\/\ дискретные\ выходы}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00015}00015\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00016}00016\ \textcolor{comment}{@section\ datinit\ Базовая\ настройка\ под\ устройство:}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00017}00017\ \textcolor{comment}{1.\ Настроить\ диапазоны\ адресов}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00018}00018\ \textcolor{comment}{\ \ -\/\ @ref\ R\_INPUT\_ADDR\ и\ @ref\ R\_INPUT\_QNT\ для\ входных\ регистров}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00019}00019\ \textcolor{comment}{\ \ -\/\ @ref\ R\_HOLDING\_ADDR\ и\ @ref\ R\_HOLDING\_QNT\ для\ регистров\ хр\ анения}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00020}00020\ \textcolor{comment}{\ \ -\/\ @ref\ C\_COILS\_ADDR\ и\ @ref\ C\_COILS\_ADDR\ для\ коилов}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00021}00021\ \textcolor{comment}{3.\ Настроить\ структуры\ данных:}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00022}00022\ \textcolor{comment}{\ \ -\/\ @ref\ MB\_DataInRegsTypeDef}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00023}00023\ \textcolor{comment}{\ \ -\/\ @ref\ MB\_DataHoldRegsTypeDef}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00024}00024\ \textcolor{comment}{\ \ -\/\ @ref\ MB\_DataCoilsTypeDef}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00025}00025\ \textcolor{comment}{\ \ \ \ }}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00026}00026\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00027}00027\ \textcolor{comment}{@section\ datexpert\ Расширенная\ настройка\ под\ устройство:}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00028}00028\ \textcolor{comment}{1.\ Добавить\ новый\ массив\ с\ нужными\ данными.}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00029}00029\ \textcolor{comment}{2.\ Добавить\ дефайны\ для\ определения\ его\ начального\ адреса\ и\ количества\ элементов}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00030}00030\ \textcolor{comment}{3.\ Добавить\ проверку\ адресов\ в\ MB\_DefineRegistersAddress/MB\_DefineCoilsAddress.\ }}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00031}00031\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00032}00032\ \textcolor{comment}{\ \ \ Пример:}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00033}00033\ \textcolor{comment}{\ \ \ @code}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00034}00034\ \textcolor{comment}{\ \ \ \ \#define\ \ \ R\_USER\_ADDR\ \ \ \ \ \ \ \ 555}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00035}00035\ \textcolor{comment}{\ \ \ \ \#define\ \ \ R\_USER\_QNT\ \ \ \ \ \ \ \ \ 16}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00036}00036\ \textcolor{comment}{\ \ \ \ uint16\_t\ \ user\_regs[16];}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00037}00037\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00038}00038\ \textcolor{comment}{\ \ \ \ //...}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00039}00039\ \textcolor{comment}{\ \ \ \ else\ if(MB\_Check\_Address\_For\_Arr(Addr,\ Qnt,\ R\_USER\_ADDR,\ R\_USER\_QNT)\ ==\ ET\_NO\_ERRORS)}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00040}00040\ \textcolor{comment}{\ \ \ \ \{}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00041}00041\ \textcolor{comment}{\ \ \ \ \ \ *pRegs\ =\ MB\_Set\_Register\_Ptr(\&user\_regs,\ Addr-\/R\_USER\_ADDR);\ //\ ВАЖНО!}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00042}00042\ \textcolor{comment}{\ \ \ \ \ \ //\ -\/R\_USER\_ADDR\ нужен\ чтобы\ взять\ адрес\ относительно\ начала\ массива}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00043}00043\ \textcolor{comment}{\ \ \ \ \}}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00044}00044\ \textcolor{comment}{\ \ \ \ else\ \ }}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00045}00045\ \textcolor{comment}{\ \ \ \ \{}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00046}00046\ \textcolor{comment}{\ \ \ \ \ \ return\ ET\_ILLEGAL\_DATA\_ADDRESS;}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00047}00047\ \textcolor{comment}{\ \ \ \ \}}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00048}00048\ \textcolor{comment}{\ \ \ @endcode}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00049}00049\ \textcolor{comment}{******************************************************************************/}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00050}00050\ }
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00051}00051\ \textcolor{preprocessor}{\#ifndef\ \_MODBUS\_DATA\_H\_}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00052}00052\ \textcolor{preprocessor}{\#define\ \_MODBUS\_DATA\_H\_}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00053}00053\ \ \ }
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00054}00054\ \textcolor{preprocessor}{\#include\ "{}stdint.h"{}}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00055}00055\ }
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00056}00056\ }
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00057}00057\ }
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00058}00058\ \textcolor{comment}{//-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/SIZES\ OF\ DATA-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00059}00059\ }
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00060}00060\ \textcolor{comment}{//\ DEFINES\ FOR\ INPUT\ REGISTERS\ ARRAYS}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00061}00061\ \textcolor{preprocessor}{\#define\ \ \ R\_INPUT\_ADDR\ \ \ \ \ \ \ \ 0\ \ \ }\textcolor{comment}{///<\ Начальный\ адрес\ входных\ регистров}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00062}00062\ \textcolor{preprocessor}{\#define\ \ \ R\_INPUT\_QNT\ \ \ \ \ \ \ \ \ 16\ \ }\textcolor{comment}{///<\ Количество\ входных\ регистров}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00063}00063\ }
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00064}00064\ \textcolor{comment}{//\ DEFINES\ FOR\ HOLDING\ REGISTERS\ ARRAYS}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00065}00065\ \textcolor{preprocessor}{\#define\ \ \ R\_HOLDING\_ADDR\ \ \ \ \ \ 0\ \ \ }\textcolor{comment}{///<\ Начальный\ адрес\ регистров\ хранения}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00066}00066\ \textcolor{preprocessor}{\#define\ \ \ R\_HOLDING\_QNT\ \ \ \ \ \ \ 16\ \ }\textcolor{comment}{///<\ Количество\ регистров\ хранения}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00067}00067\ }
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00068}00068\ \textcolor{comment}{//\ DEFINES\ FOR\ COIL\ ARRAYS}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00069}00069\ \textcolor{preprocessor}{\#define\ \ \ C\_COILS\_ADDR\ \ \ \ \ \ \ \ 0\ \ \ }\textcolor{comment}{///<\ Начальный\ адрес\ коилов}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00070}00070\ \textcolor{preprocessor}{\#define\ \ \ C\_COILS\_QNT\ \ \ \ \ \ \ \ \ 16\ \ }\textcolor{comment}{///<\ Количество\ регистров\ коилов}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00071}00071\ }
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00072}00072\ \textcolor{comment}{//-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/DEFINES\ FOR\ REGISTERS-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00073}00073\ \textcolor{comment}{//\ DEFINES\ FOR\ ARRAYS}\textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00074}00074\ \textcolor{comment}{/**\ }}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00075}00075\ \textcolor{comment}{\ \ *\ @addtogroup\ MODBUS\_DATA\_RERISTERS\_DEFINES\ Registers\ structures}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00076}00076\ \textcolor{comment}{\ \ *\ @ingroup\ \ \ \ MODBUS\_DATA}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00077}00077\ \textcolor{comment}{\ \ *\ @brief\ \ \ \ \ \ Стуруктура\ регистров\ (входных\ и\ хранения)}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00078}00078\ \textcolor{comment}{\ \ @code\ \ \ \ }}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00079}00079\ \textcolor{comment}{\ \ Для\ массивов\ регистров:}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00080}00080\ \textcolor{comment}{\ \ \ \ R\_<NAME\_ARRAY>\_ADDR\ \ \ -\/\ \ модбас\ адресс\ первого\ регистра\ в\ массиве}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00081}00081\ \textcolor{comment}{\ \ \ \ R\_<NAME\_ARRAY>\_QNT\ \ \ \ -\/\ \ количество\ регистров\ в\ массиве}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00082}00082\ \textcolor{comment}{\ \ @endcode}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00083}00083\ \textcolor{comment}{\ \ *\ @\{}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00084}00084\ \textcolor{comment}{\ \ */}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00085}00085\ \ \ }
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00086}00086\ \ \ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00087}00087\ \textcolor{comment}{/**\ }}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00088}00088\ \textcolor{comment}{\ \ *\ @brief\ Регистры\ хранения}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00089}00089\ \textcolor{comment}{\ \ */}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00090}\mbox{\hyperlink{struct_m_b___data_in_regs_type_def}{00090}}\ \textcolor{keyword}{typedef}\ \textcolor{keyword}{struct\ }\textcolor{comment}{//MB\_DataInRegsTypeDef}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00091}00091\ \{}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00092}00092\ \ \ uint16\_t\ in[16];}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00093}00093\ \}\mbox{\hyperlink{struct_m_b___data_in_regs_type_def}{MB\_DataInRegsTypeDef}};}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00094}00094\ }
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00095}00095\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00096}00096\ \textcolor{comment}{/**\ }}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00097}00097\ \textcolor{comment}{\ \ *\ @brief\ Входные\ регистры\ }}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00098}00098\ \textcolor{comment}{\ \ */}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00099}\mbox{\hyperlink{struct_m_b___data_hold_regs_type_def}{00099}}\ \textcolor{keyword}{typedef}\ \textcolor{keyword}{struct\ }\textcolor{comment}{//MB\_DataInRegsTypeDef}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00100}00100\ \{}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00101}00101\ \ \ uint16\_t\ out[16];}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00102}00102\ \}\mbox{\hyperlink{struct_m_b___data_hold_regs_type_def}{MB\_DataHoldRegsTypeDef}};}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00103}00103\ }
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00104}00104\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00105}00105\ \textcolor{comment}{/**\ MODBUS\_DATA\_RERISTERS\_DEFINES}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00106}00106\ \textcolor{comment}{\ \ *\ @\}\ }}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00107}00107\ \textcolor{comment}{\ \ */}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00108}00108\ }
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00109}00109\ \textcolor{comment}{//-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/DEFINES\ FOR\ COILS-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}\textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00110}00110\ \textcolor{comment}{/**\ }}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00111}00111\ \textcolor{comment}{\ \ *\ @addtogroup\ MODBUS\_DATA\_COILS\_DEFINES\ Coils\ Structure}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00112}00112\ \textcolor{comment}{\ \ *\ @ingroup\ \ \ \ MODBUS\_DATA}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00113}00113\ \textcolor{comment}{\ \ *\ @brief\ \ \ \ \ \ Структура\ коилов}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00114}00114\ \textcolor{comment}{\ \ @code\ \ \ \ }}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00115}00115\ \textcolor{comment}{\ \ Структура\ дефайна}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00116}00116\ \textcolor{comment}{\ \ Для\ массивов\ коилов:}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00117}00117\ \textcolor{comment}{\ \ \ \ C\_<NAME\_ARRAY>\_ADDR\ \ \ -\/\ модбас\ адресс\ первого\ коила\ в\ массиве}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00118}00118\ \textcolor{comment}{\ \ \ \ C\_<NAME\_ARRAY>\_QNT\ \ \ \ -\/\ количество\ коилов\ в\ массиве\ (минимум\ 16)}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00119}00119\ \textcolor{comment}{\ \ @endcode}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00120}00120\ \textcolor{comment}{\ \ *\ @\{}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00121}00121\ \textcolor{comment}{\ \ */}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00122}00122\ \ \ }
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00123}00123\ \ \ }
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00124}00124\ \ \ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00125}00125\ \textcolor{comment}{/**\ }}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00126}00126\ \textcolor{comment}{\ \ *\ @brief\ \ \ \ \ Коилы}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00127}00127\ \textcolor{comment}{\ \ *\ @details\ \ \ Желательно\ с\ помощью\ reserved\ делать\ стркутуру\ кратной\ 16-\/битам}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00128}00128\ \textcolor{comment}{\ \ */}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00129}\mbox{\hyperlink{struct_m_b___data_coils_type_def}{00129}}\ \textcolor{keyword}{typedef}\ \textcolor{keyword}{struct\ }\textcolor{comment}{//MB\_DataCoilsTypeDef}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00130}00130\ \{}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00131}00131\ \ \ \textcolor{keywordtype}{unsigned}\ reserved:16;}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00132}00132\ \}\mbox{\hyperlink{struct_m_b___data_coils_type_def}{MB\_DataCoilsTypeDef}};}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00133}00133\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00134}00134\ \textcolor{comment}{/**\ MODBUS\_DATA\_COILS\_DEFINES}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00135}00135\ \textcolor{comment}{\ \ *\ @\}\ }}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00136}00136\ \textcolor{comment}{\ \ */}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00137}00137\ \ \ }
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00138}00138\ \ \ }
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00139}00139\ \textcolor{comment}{//-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/MODBUS\ DEVICE\ DATA\ SETTING-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00140}00140\ \textcolor{comment}{//\ MODBUS\ DATA\ STRUCTTURE}\textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00141}00141\ \textcolor{comment}{/**\ }}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00142}00142\ \textcolor{comment}{\ \ *\ @brief\ Структура\ со\ всеми\ регистрами\ и\ коилами\ модбас\ }}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00143}00143\ \textcolor{comment}{\ \ *\ @ingroup\ \ MODBUS\_DATA}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00144}00144\ \textcolor{comment}{\ \ */}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00145}\mbox{\hyperlink{struct_m_b___data_structure_type_def}{00145}}\ \textcolor{keyword}{typedef}\ \textcolor{keyword}{struct\ }\textcolor{comment}{//\ tester\ modbus\ data}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00146}00146\ \{}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00147}\mbox{\hyperlink{struct_m_b___data_structure_type_def_ac0bf877607c54c79c1d09c4530fdcbca}{00147}}\ \ \ \mbox{\hyperlink{struct_m_b___data_in_regs_type_def}{MB\_DataInRegsTypeDef}}\ \ \ \ \ \ \mbox{\hyperlink{struct_m_b___data_structure_type_def_ac0bf877607c54c79c1d09c4530fdcbca}{InRegs}};\ \ \ \ \ \textcolor{comment}{///<\ Modbus\ input\ registers\ @ref\ MB\_DataInRegsTypeDef}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00148}00148\ }
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00149}\mbox{\hyperlink{struct_m_b___data_structure_type_def_a349e19f82ba85cb29a911468ceee76b2}{00149}}\ \ \ \mbox{\hyperlink{struct_m_b___data_coils_type_def}{MB\_DataCoilsTypeDef}}\ \ \ \ \ \ \ \mbox{\hyperlink{struct_m_b___data_structure_type_def_a349e19f82ba85cb29a911468ceee76b2}{Coils}};\ \ \ \ \ \ \textcolor{comment}{///<\ Modbus\ coils\ @ref\ MB\_DataCoilsTypeDef}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00150}00150\ \ \ }
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00151}\mbox{\hyperlink{struct_m_b___data_structure_type_def_a27d12400f322702e9d87c492e9628313}{00151}}\ \ \ \mbox{\hyperlink{struct_m_b___data_hold_regs_type_def}{MB\_DataHoldRegsTypeDef}}\ \ \ \ \mbox{\hyperlink{struct_m_b___data_structure_type_def_a27d12400f322702e9d87c492e9628313}{HoldRegs}};\ \ \ \textcolor{comment}{///<\ Modbus\ holding\ registers\ @ref\ MB\_DataHoldRegsTypeDef}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00152}00152\ \}\mbox{\hyperlink{struct_m_b___data_structure_type_def}{MB\_DataStructureTypeDef}};}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00153}00153\ \textcolor{keyword}{extern}\ \mbox{\hyperlink{struct_m_b___data_structure_type_def}{MB\_DataStructureTypeDef}}\ MB\_DATA;}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00154}00154\ }
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00155}00155\ }
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00156}00156\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{//\_MODBUS\_DATA\_H\_}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00157}00157\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00158}00158\ \textcolor{comment}{/////////////////////////////////////////////////////////////}}
\DoxyCodeLine{\Hypertarget{____modbus__data_8h_source_l00159}00159\ \textcolor{comment}{///////////////////////TEMP/OUTDATE/OTHER////////////////////}}
\end{DoxyCode}

View File

@@ -0,0 +1,14 @@
\doxysection{Class List}
Here are the classes, structs, unions and interfaces with brief descriptions\+:\begin{DoxyCompactList}
\item\contentsline{section}{\mbox{\hyperlink{struct_m_b___data_coils_type_def}{MB\+\_\+\+Data\+Coils\+Type\+Def}} \\*Коилы }{\pageref{struct_m_b___data_coils_type_def}}{}
\item\contentsline{section}{\mbox{\hyperlink{struct_m_b___data_hold_regs_type_def}{MB\+\_\+\+Data\+Hold\+Regs\+Type\+Def}} \\*Входные регистры }{\pageref{struct_m_b___data_hold_regs_type_def}}{}
\item\contentsline{section}{\mbox{\hyperlink{struct_m_b___data_in_regs_type_def}{MB\+\_\+\+Data\+In\+Regs\+Type\+Def}} \\*Регистры хранения }{\pageref{struct_m_b___data_in_regs_type_def}}{}
\item\contentsline{section}{\mbox{\hyperlink{struct_m_b___data_structure_type_def}{MB\+\_\+\+Data\+Structure\+Type\+Def}} \\*Структура со всеми регистрами и коилами модбас }{\pageref{struct_m_b___data_structure_type_def}}{}
\item\contentsline{section}{\mbox{\hyperlink{struct_m_b___device_identifications_type_def}{MB\+\_\+\+Device\+Identifications\+Type\+Def}} \\*Структура со идентификаторами устройства модбас }{\pageref{struct_m_b___device_identifications_type_def}}{}
\item\contentsline{section}{\mbox{\hyperlink{struct_m_b___device_object_type_def}{MB\+\_\+\+Device\+Object\+Type\+Def}} \\*Структура для объекта (идентификатора устройства модбас) }{\pageref{struct_m_b___device_object_type_def}}{}
\item\contentsline{section}{\mbox{\hyperlink{struct_m_b___dev_id_msg_type_def}{MB\+\_\+\+Dev\+Id\+Msg\+Type\+Def}} \\*Structure for device identifications message type }{\pageref{struct_m_b___dev_id_msg_type_def}}{}
\item\contentsline{section}{\mbox{\hyperlink{struct_m_b___diagnostics_info_type_def}{MB\+\_\+\+Diagnostics\+Info\+Type\+Def}} \\*Структура со диагностической информацией устройства модбас }{\pageref{struct_m_b___diagnostics_info_type_def}}{}
\item\contentsline{section}{\mbox{\hyperlink{struct_r_s___flags_type_def}{RS\+\_\+\+Flags\+Type\+Def}} \\*Struct for flags RS }{\pageref{struct_r_s___flags_type_def}}{}
\item\contentsline{section}{\mbox{\hyperlink{struct_r_s___handle_type_def}{RS\+\_\+\+Handle\+Type\+Def}} \\*Handle for RS communication }{\pageref{struct_r_s___handle_type_def}}{}
\item\contentsline{section}{\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \\*Structure for modbus messsage }{\pageref{struct_r_s___msg_type_def}}{}
\end{DoxyCompactList}

View File

@@ -0,0 +1,745 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{doxygen}
% Packages used by this style file
\RequirePackage{alltt}
%%\RequirePackage{array} %% moved to refman.tex due to workaround for LaTex 2019 version and unmaintained tabu package
\RequirePackage{calc}
\RequirePackage{float}
%%\RequirePackage{ifthen} %% moved to refman.tex due to workaround for LaTex 2019 version and unmaintained tabu package
\RequirePackage{verbatim}
\RequirePackage[table]{xcolor}
\RequirePackage{longtable_doxygen}
\RequirePackage{tabu_doxygen}
\RequirePackage{fancyvrb}
\RequirePackage{tabularx}
\RequirePackage{multicol}
\RequirePackage{multirow}
\RequirePackage{hanging}
\RequirePackage{ifpdf}
\RequirePackage{adjustbox}
\RequirePackage{amssymb}
\RequirePackage{stackengine}
\RequirePackage{enumitem}
\RequirePackage{alphalph}
\RequirePackage[normalem]{ulem} % for strikeout, but don't modify emphasis
%---------- Internal commands used in this style file ----------------
\newcommand{\ensurespace}[1]{%
\begingroup%
\setlength{\dimen@}{#1}%
\vskip\z@\@plus\dimen@%
\penalty -100\vskip\z@\@plus -\dimen@%
\vskip\dimen@%
\penalty 9999%
\vskip -\dimen@%
\vskip\z@skip% hide the previous |\vskip| from |\addvspace|
\endgroup%
}
\newcommand{\DoxyHorRuler}[1]{%
\setlength{\parskip}{0ex plus 0ex minus 0ex}%
\ifthenelse{#1=0}%
{%
\hrule%
}%
{%
\hrulefilll%
}%
}
\newcommand{\DoxyLabelFont}{}
\newcommand{\entrylabel}[1]{%
{%
\parbox[b]{\labelwidth-4pt}{%
\makebox[0pt][l]{\DoxyLabelFont#1}%
\vspace{1.5\baselineskip}%
}%
}%
}
\newenvironment{DoxyDesc}[1]{%
\ensurespace{4\baselineskip}%
\begin{list}{}{%
\settowidth{\labelwidth}{20pt}%
%\setlength{\parsep}{0pt}%
\setlength{\itemsep}{0pt}%
\setlength{\leftmargin}{\labelwidth+\labelsep}%
\renewcommand{\makelabel}{\entrylabel}%
}%
\item[#1]%
}{%
\end{list}%
}
\newsavebox{\xrefbox}
\newlength{\xreflength}
\newcommand{\xreflabel}[1]{%
\sbox{\xrefbox}{#1}%
\setlength{\xreflength}{\wd\xrefbox}%
\ifthenelse{\xreflength>\labelwidth}{%
\begin{minipage}{\textwidth}%
\setlength{\parindent}{0pt}%
\hangindent=15pt\bfseries #1\vspace{1.2\itemsep}%
\end{minipage}%
}{%
\parbox[b]{\labelwidth}{\makebox[0pt][l]{\textbf{#1}}}%
}%
}
%---------- Commands used by doxygen LaTeX output generator ----------
% Used by <pre> ... </pre>
\newenvironment{DoxyPre}{%
\small%
\begin{alltt}%
}{%
\end{alltt}%
\normalsize%
}
% Necessary for redefining not defined characters, i.e. "Replacement Character" in tex output.
\newlength{\CodeWidthChar}
\newlength{\CodeHeightChar}
\settowidth{\CodeWidthChar}{?}
\settoheight{\CodeHeightChar}{?}
% Necessary for hanging indent
\newlength{\DoxyCodeWidth}
\newcommand\DoxyCodeLine[1]{
\ifthenelse{\equal{\detokenize{#1}}{}}
{
\vspace*{\baselineskip}
}
{
\hangpara{\DoxyCodeWidth}{1}{#1}\par
}
}
\newcommand\NiceSpace{%
\discretionary{}{\kern\fontdimen2\font}{\kern\fontdimen2\font}%
}
% Used by @code ... @endcode
\newenvironment{DoxyCode}[1]{%
\par%
\vspace{2pt}%
\scriptsize%
\normalfont\ttfamily%
\rightskip0pt plus 1fil%
\settowidth{\DoxyCodeWidth}{000000}%
\settowidth{\CodeWidthChar}{?}%
\settoheight{\CodeHeightChar}{?}%
\setlength{\parskip}{0ex plus 0ex minus 0ex}%
\ifthenelse{\equal{#1}{0}}%
{%
{\lccode`~32 \lowercase{\global\let~}\NiceSpace}\obeyspaces%
}%
{%
{\lccode`~32 \lowercase{\global\let~}}\obeyspaces%
}%
\vspace{2pt}%
}{%
\normalfont%
\normalsize%
\settowidth{\CodeWidthChar}{?}%
\settoheight{\CodeHeightChar}{?}%
}
% Redefining not defined characters, i.e. "Replacement Character" in tex output.
\def\ucr{\adjustbox{width=\CodeWidthChar,height=\CodeHeightChar}{\stackinset{c}{}{c}{-.2pt}{%
\textcolor{white}{\sffamily\bfseries\small ?}}{%
\rotatebox{45}{$\blacksquare$}}}}
% Used by @example, @include, @includelineno and @dontinclude
\newenvironment{DoxyCodeInclude}[1]{%
\DoxyCode{#1}%
}{%
\endDoxyCode%
}
% Used by @verbatim ... @endverbatim
\newenvironment{DoxyVerb}{%
\par%
\footnotesize%
\verbatim%
}{%
\endverbatim%
\normalsize%
}
% Used by @verbinclude
\newenvironment{DoxyVerbInclude}{%
\DoxyVerb%
}{%
\endDoxyVerb%
}
% Used by numbered lists (using '-#' or <ol> ... </ol>)
\setlistdepth{12}
\newlist{DoxyEnumerate}{enumerate}{12}
\setlist[DoxyEnumerate,1]{label=\arabic*.}
\setlist[DoxyEnumerate,2]{label=(\enumalphalphcnt*)}
\setlist[DoxyEnumerate,3]{label=\roman*.}
\setlist[DoxyEnumerate,4]{label=\enumAlphAlphcnt*.}
\setlist[DoxyEnumerate,5]{label=\arabic*.}
\setlist[DoxyEnumerate,6]{label=(\enumalphalphcnt*)}
\setlist[DoxyEnumerate,7]{label=\roman*.}
\setlist[DoxyEnumerate,8]{label=\enumAlphAlphcnt*.}
\setlist[DoxyEnumerate,9]{label=\arabic*.}
\setlist[DoxyEnumerate,10]{label=(\enumalphalphcnt*)}
\setlist[DoxyEnumerate,11]{label=\roman*.}
\setlist[DoxyEnumerate,12]{label=\enumAlphAlphcnt*.}
% Used by bullet lists (using '-', @li, @arg, or <ul> ... </ul>)
\setlistdepth{12}
\newlist{DoxyItemize}{itemize}{12}
\setlist[DoxyItemize]{label=\textperiodcentered}
\setlist[DoxyItemize,1]{label=\textbullet}
\setlist[DoxyItemize,2]{label=\normalfont\bfseries \textendash}
\setlist[DoxyItemize,3]{label=\textasteriskcentered}
\setlist[DoxyItemize,4]{label=\textperiodcentered}
% Used for check boxes
\newcommand{\DoxyUnchecked}{$\square$}
\newcommand{\DoxyChecked}{\rlap{\raisebox{0.3ex}{\hspace{0.4ex}\tiny \checkmark}}$\square$}
% Used by description lists (using <dl> ... </dl>)
\newenvironment{DoxyDescription}{%
\description%
}{%
\enddescription%
}
% Used by @image, @dotfile, @dot ... @enddot, and @msc ... @endmsc
% (only if caption is specified)
\newenvironment{DoxyImage}{%
\begin{figure}[H]%
\centering%
}{%
\end{figure}%
}
% Used by @image, @dotfile, @dot ... @enddot, and @msc ... @endmsc
% (only if no caption is specified)
\newenvironment{DoxyImageNoCaption}{%
\begin{center}%
}{%
\end{center}%
}
% Used by @image
% (only if inline is specified)
\newenvironment{DoxyInlineImage}{%
}{%
}
% Used by @attention
\newenvironment{DoxyAttention}[1]{%
\begin{DoxyDesc}{#1}%
}{%
\end{DoxyDesc}%
}
% Used by @important
\newenvironment{DoxyImportant}[1]{%
\begin{DoxyDesc}{#1}%
}{%
\end{DoxyDesc}%
}
% Used by @author and @authors
\newenvironment{DoxyAuthor}[1]{%
\begin{DoxyDesc}{#1}%
}{%
\end{DoxyDesc}%
}
% Used by @date
\newenvironment{DoxyDate}[1]{%
\begin{DoxyDesc}{#1}%
}{%
\end{DoxyDesc}%
}
% Used by @invariant
\newenvironment{DoxyInvariant}[1]{%
\begin{DoxyDesc}{#1}%
}{%
\end{DoxyDesc}%
}
% Used by @note
\newenvironment{DoxyNote}[1]{%
\begin{DoxyDesc}{#1}%
}{%
\end{DoxyDesc}%
}
% Used by @post
\newenvironment{DoxyPostcond}[1]{%
\begin{DoxyDesc}{#1}%
}{%
\end{DoxyDesc}%
}
% Used by @pre
\newenvironment{DoxyPrecond}[1]{%
\begin{DoxyDesc}{#1}%
}{%
\end{DoxyDesc}%
}
% Used by @copyright
\newenvironment{DoxyCopyright}[1]{%
\begin{DoxyDesc}{#1}%
}{%
\end{DoxyDesc}%
}
% Used by @remark
\newenvironment{DoxyRemark}[1]{%
\begin{DoxyDesc}{#1}%
}{%
\end{DoxyDesc}%
}
% Used by @return and @returns
\newenvironment{DoxyReturn}[1]{%
\begin{DoxyDesc}{#1}%
}{%
\end{DoxyDesc}%
}
% Used by @since
\newenvironment{DoxySince}[1]{%
\begin{DoxyDesc}{#1}%
}{%
\end{DoxyDesc}%
}
% Used by @see
\newenvironment{DoxySeeAlso}[1]{%
\begin{DoxyDesc}{#1}%
}{%
\end{DoxyDesc}%
}
% Used by @version
\newenvironment{DoxyVersion}[1]{%
\begin{DoxyDesc}{#1}%
}{%
\end{DoxyDesc}%
}
% Used by @warning
\newenvironment{DoxyWarning}[1]{%
\begin{DoxyDesc}{#1}%
}{%
\end{DoxyDesc}%
}
% Used by @par and @paragraph
\newenvironment{DoxyParagraph}[1]{%
\begin{DoxyDesc}{#1}%
}{%
\end{DoxyDesc}%
}
% Used by parameter lists
\newenvironment{DoxyParams}[2][]{%
\tabulinesep=1mm%
\par%
\ifthenelse{\equal{#1}{}}%
{\begin{longtabu*}spread 0pt [l]{|X[-1,l]|X[-1,l]|}}% name + description
{\ifthenelse{\equal{#1}{1}}%
{\begin{longtabu*}spread 0pt [l]{|X[-1,l]|X[-1,l]|X[-1,l]|}}% in/out + name + desc
{\begin{longtabu*}spread 0pt [l]{|X[-1,l]|X[-1,l]|X[-1,l]|X[-1,l]|}}% in/out + type + name + desc
}
\multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #2}\\[1ex]%
\hline%
\endfirsthead%
\multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #2}\\[1ex]%
\hline%
\endhead%
}{%
\end{longtabu*}%
\vspace{6pt}%
}
% Used for fields of simple structs
\newenvironment{DoxyFields}[1]{%
\tabulinesep=1mm%
\par%
\begin{longtabu*}spread 0pt [l]{|X[-1,r]|X[-1,l]|X[-1,l]|}%
\multicolumn{3}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]%
\hline%
\endfirsthead%
\multicolumn{3}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]%
\hline%
\endhead%
}{%
\end{longtabu*}%
\vspace{6pt}%
}
% Used for fields simple class style enums
\newenvironment{DoxyEnumFields}[2][]{%
\tabulinesep=1mm%
\par%
\ifthenelse{\equal{#1}{2}}%
{\begin{longtabu*}spread 0pt [l]{|X[-1,r]|X[-1,l]|}}%
{\begin{longtabu*}spread 0pt [l]{|X[-1,l]|X[-1,r]|X[-1,l]|}}% with init value
\multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #2}\\[1ex]%
\hline%
\endfirsthead%
\multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #2}\\[1ex]%
\hline%
\endhead%
}{%
\end{longtabu*}%
\vspace{6pt}%
}
% Used for parameters within a detailed function description
\newenvironment{DoxyParamCaption}{%
\renewcommand{\item}[3][]{\\ \hspace*{2.0cm} ##1 {\em ##2}##3}%
}{%
}
% Used by return value lists
\newenvironment{DoxyRetVals}[1]{%
\tabulinesep=1mm%
\par%
\begin{longtabu*}spread 0pt [l]{|X[-1,r]|X[-1,l]|}%
\multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]%
\hline%
\endfirsthead%
\multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]%
\hline%
\endhead%
}{%
\end{longtabu*}%
\vspace{6pt}%
}
% Used by exception lists
\newenvironment{DoxyExceptions}[1]{%
\tabulinesep=1mm%
\par%
\begin{longtabu*}spread 0pt [l]{|X[-1,r]|X[-1,l]|}%
\multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]%
\hline%
\endfirsthead%
\multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]%
\hline%
\endhead%
}{%
\end{longtabu*}%
\vspace{6pt}%
}
% Used by template parameter lists
\newenvironment{DoxyTemplParams}[1]{%
\tabulinesep=1mm%
\par%
\begin{longtabu*}spread 0pt [l]{|X[-1,r]|X[-1,l]|}%
\multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]%
\hline%
\endfirsthead%
\multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]%
\hline%
\endhead%
}{%
\end{longtabu*}%
\vspace{6pt}%
}
% Used for member lists
\newenvironment{DoxyCompactItemize}{%
\begin{itemize}%
\setlength{\itemsep}{-3pt}%
\setlength{\parsep}{0pt}%
\setlength{\topsep}{0pt}%
\setlength{\partopsep}{0pt}%
}{%
\end{itemize}%
}
% Used for member descriptions
\newenvironment{DoxyCompactList}{%
\begin{list}{}{%
\setlength{\leftmargin}{0.5cm}%
\setlength{\itemsep}{0pt}%
\setlength{\parsep}{0pt}%
\setlength{\topsep}{0pt}%
\renewcommand{\makelabel}{\hfill}%
}%
}{%
\end{list}%
}
% Used for reference lists (@bug, @deprecated, @todo, etc.)
\newenvironment{DoxyRefList}{%
\begin{list}{}{%
\setlength{\labelwidth}{10pt}%
\setlength{\leftmargin}{\labelwidth}%
\addtolength{\leftmargin}{\labelsep}%
\renewcommand{\makelabel}{\xreflabel}%
}%
}{%
\end{list}%
}
% Used by @bug, @deprecated, @todo, etc.
\newenvironment{DoxyRefDesc}[1]{%
\begin{list}{}{%
\renewcommand\makelabel[1]{\textbf{##1}}%
\settowidth\labelwidth{\makelabel{#1}}%
\setlength\leftmargin{\labelwidth+\labelsep}%
}%
}{%
\end{list}%
}
% Used by parameter lists and simple sections
\newenvironment{Desc}
{\begin{list}{}{%
\settowidth{\labelwidth}{20pt}%
\setlength{\parsep}{0pt}%
\setlength{\itemsep}{0pt}%
\setlength{\leftmargin}{\labelwidth+\labelsep}%
\renewcommand{\makelabel}{\entrylabel}%
}
}{%
\end{list}%
}
% Used by tables
\newcommand{\PBS}[1]{\let\temp=\\#1\let\\=\temp}%
\newenvironment{TabularC}[1]%
{\tabulinesep=1mm
\begin{longtabu*}spread 0pt [c]{*#1{|X[-1]}|}}%
{\end{longtabu*}\par}%
\newenvironment{TabularNC}[1]%
{\begin{tabu}spread 0pt [l]{*#1{|X[-1]}|}}%
{\end{tabu}\par}%
% Used for member group headers
\newenvironment{Indent}{%
\begin{list}{}{%
\setlength{\leftmargin}{0.5cm}%
}%
\item[]\ignorespaces%
}{%
\unskip%
\end{list}%
}
% Used when hyperlinks are turned on
\newcommand{\doxylink}[2]{%
\mbox{\hyperlink{#1}{#2}}%
}
% Used for the cite command
\newcommand{\DoxyCite}[3]{%
\ifthenelse{#3=1}% 1 with square parenthesis
{
\ifthenelse{\equal{#2}{number}}%
{ \cite{#1} }%
{%
\ifthenelse{\equal{#2}{shortauthor}}%
{ \citetext{\citeauthor{#1}} }%
{%
\ifthenelse{\equal{#2}{year}}%
{ \citeyearpar{#1} }%
{}%
}%
}%
}%
{%
\ifthenelse{\equal{#2}{number}}%
{ \citealp{#1} }%
{%
\ifthenelse{\equal{#2}{shortauthor}}%
{ \citeauthor{#1} }%
{%
\ifthenelse{\equal{#2}{year}}%
{ \citeyear{#1} }%
{}%
}%
}%
}%
}
% Used when hyperlinks are turned on
% Third argument is the SectionType, see the doxygen internal
% documentation for the values (relevant: Page ... Subsubsection).
\newcommand{\doxysectlink}[3]{%
\mbox{\hyperlink{#1}{#2}}%
}
% Used when hyperlinks are turned off
\newcommand{\doxyref}[3]{%
\textbf{#1} (\textnormal{#2}\,\pageref{#3})%
}
% Used when hyperlinks are turned off
% Fourth argument is the SectionType, see the doxygen internal
% documentation for the values (relevant: Page ... Subsubsection).
\newcommand{\doxysectref}[4]{%
\textbf{#1} (\textnormal{#2}\,\pageref{#3})%
}
% Used to link to a table when hyperlinks are turned on
\newcommand{\doxytablelink}[2]{%
\ref{#1}%
}
% Used to link to a table when hyperlinks are turned off
\newcommand{\doxytableref}[3]{%
\ref{#3}%
}
% Used by @addindex
\newcommand{\lcurly}{\{}
\newcommand{\rcurly}{\}}
% Colors used for syntax highlighting
\definecolor{comment}{rgb}{0.5,0.0,0.0}
\definecolor{keyword}{rgb}{0.0,0.5,0.0}
\definecolor{keywordtype}{rgb}{0.38,0.25,0.125}
\definecolor{keywordflow}{rgb}{0.88,0.5,0.0}
\definecolor{preprocessor}{rgb}{0.5,0.38,0.125}
\definecolor{stringliteral}{rgb}{0.0,0.125,0.25}
\definecolor{charliteral}{rgb}{0.0,0.5,0.5}
\definecolor{xmlcdata}{rgb}{0.0,0.0,0.0}
\definecolor{vhdldigit}{rgb}{1.0,0.0,1.0}
\definecolor{vhdlkeyword}{rgb}{0.43,0.0,0.43}
\definecolor{vhdllogic}{rgb}{1.0,0.0,0.0}
\definecolor{vhdlchar}{rgb}{0.0,0.0,0.0}
% Color used for table heading
\newcommand{\tableheadbgcolor}{lightgray}%
% Version of hypertarget with correct landing location
\newcommand{\Hypertarget}[1]{\Hy@raisedlink{\hypertarget{#1}{}}}
% possibility to have sections etc. be within the margins
% unfortunately had to copy part of book.cls and add \raggedright
\makeatletter
\newcounter{subsubsubsection}[subsubsection]
\newcounter{subsubsubsubsection}[subsubsubsection]
\newcounter{subsubsubsubsubsection}[subsubsubsubsection]
\newcounter{subsubsubsubsubsubsection}[subsubsubsubsubsection]
\renewcommand{\thesubsubsubsection}{\thesubsubsection.\arabic{subsubsubsection}}
\renewcommand{\thesubsubsubsubsection}{\thesubsubsubsection.\arabic{subsubsubsubsection}}
\renewcommand{\thesubsubsubsubsubsection}{\thesubsubsubsubsection.\arabic{subsubsubsubsubsection}}
\renewcommand{\thesubsubsubsubsubsubsection}{\thesubsubsubsubsubsection.\arabic{subsubsubsubsubsubsection}}
\newcommand{\subsubsubsectionmark}[1]{}
\newcommand{\subsubsubsubsectionmark}[1]{}
\newcommand{\subsubsubsubsubsectionmark}[1]{}
\newcommand{\subsubsubsubsubsubsectionmark}[1]{}
\def\toclevel@subsubsubsection{4}
\def\toclevel@subsubsubsubsection{5}
\def\toclevel@subsubsubsubsubsection{6}
\def\toclevel@subsubsubsubsubsubsection{7}
\def\toclevel@paragraph{8}
\def\toclevel@subparagraph{9}
\newcommand\doxysection{\@startsection {section}{1}{\z@}%
{-3.5ex \@plus -1ex \@minus -.2ex}%
{2.3ex \@plus.2ex}%
{\raggedright\normalfont\Large\bfseries}}
\newcommand\doxysubsection{\@startsection{subsection}{2}{\z@}%
{-3.25ex\@plus -1ex \@minus -.2ex}%
{1.5ex \@plus .2ex}%
{\raggedright\normalfont\large\bfseries}}
\newcommand\doxysubsubsection{\@startsection{subsubsection}{3}{\z@}%
{-3.25ex\@plus -1ex \@minus -.2ex}%
{1.5ex \@plus .2ex}%
{\raggedright\normalfont\normalsize\bfseries}}
\newcommand\doxysubsubsubsection{\@startsection{subsubsubsection}{4}{\z@}%
{-3.25ex\@plus -1ex \@minus -.2ex}%
{1.5ex \@plus .2ex}%
{\raggedright\normalfont\normalsize\bfseries}}
\newcommand\doxysubsubsubsubsection{\@startsection{subsubsubsubsection}{5}{\z@}%
{-3.25ex\@plus -1ex \@minus -.2ex}%
{1.5ex \@plus .2ex}%
{\raggedright\normalfont\normalsize\bfseries}}
\newcommand\doxysubsubsubsubsubsection{\@startsection{subsubsubsubsubsection}{6}{\z@}%
{-3.25ex\@plus -1ex \@minus -.2ex}%
{1.5ex \@plus .2ex}%
{\raggedright\normalfont\normalsize\bfseries}}
\newcommand\doxysubsubsubsubsubsubsection{\@startsection{subsubsubsubsubsubsection}{7}{\z@}%
{-3.25ex\@plus -1ex \@minus -.2ex}%
{1.5ex \@plus .2ex}%
{\raggedright\normalfont\normalsize\bfseries}}
\newcommand\doxyparagraph{\@startsection{paragraph}{8}{\z@}%
{-3.25ex\@plus -1ex \@minus -.2ex}%
{1.5ex \@plus .2ex}%
{\raggedright\normalfont\normalsize\bfseries}}
\newcommand\doxysubparagraph{\@startsection{subparagraph}{9}{\parindent}%
{-3.25ex\@plus -1ex \@minus -.2ex}%
{1.5ex \@plus .2ex}%
{\raggedright\normalfont\normalsize\bfseries}}
\newcommand\l@subsubsubsection{\@dottedtocline{4}{10.0em}{7.8em}}
\newcommand\l@subsubsubsubsection{\@dottedtocline{5}{13.0em}{9.4em}}
\newcommand\l@subsubsubsubsubsection{\@dottedtocline{6}{15.0em}{11em}}
\newcommand\l@subsubsubsubsubsubsection{\@dottedtocline{7}{18.0em}{12.6em}}
\renewcommand\l@paragraph{\@dottedtocline{8}{21.0em}{14.2em}}
\renewcommand\l@subparagraph{\@dottedtocline{9}{24.0em}{15.8em}}
\makeatother
% the sectsty doesn't look to be maintained but gives, in our case, some warning like:
% LaTeX Warning: Command \underline has changed.
% Check if current package is valid.
% unfortunately had to copy the relevant part
\newcommand*{\doxypartfont} [1]
{\gdef\SS@partnumberfont{\SS@sectid{0}\SS@nopart\SS@makeulinepartchap#1}
\gdef\SS@parttitlefont{\SS@sectid{0}\SS@titlepart\SS@makeulinepartchap#1}}
\newcommand*{\doxychapterfont} [1]
{\gdef\SS@chapnumfont{\SS@sectid{1}\SS@nopart\SS@makeulinepartchap#1}
\gdef\SS@chaptitlefont{\SS@sectid{1}\SS@titlepart\SS@makeulinepartchap#1}}
\newcommand*{\doxysectionfont} [1]
{\gdef\SS@sectfont{\SS@sectid{2}\SS@rr\SS@makeulinesect#1}}
\newcommand*{\doxysubsectionfont} [1]
{\gdef\SS@subsectfont{\SS@sectid{3}\SS@rr\SS@makeulinesect#1}}
\newcommand*{\doxysubsubsectionfont} [1]
{\gdef\SS@subsubsectfont{\SS@sectid{4}\SS@rr\SS@makeulinesect#1}}
\newcommand*{\doxyparagraphfont} [1]
{\gdef\SS@parafont{\SS@sectid{5}\SS@rr\SS@makeulinesect#1}}
\newcommand*{\doxysubparagraphfont} [1]
{\gdef\SS@subparafont{\SS@sectid{6}\SS@rr\SS@makeulinesect#1}}
\newcommand*{\doxyminisecfont} [1]
{\gdef\SS@minisecfont{\SS@sectid{7}\SS@rr\SS@makeulinepartchap#1}}
\newcommand*{\doxyallsectionsfont} [1] {\doxypartfont{#1}%
\doxychapterfont{#1}%
\doxysectionfont{#1}%
\doxysubsectionfont{#1}%
\doxysubsubsectionfont{#1}%
\doxyparagraphfont{#1}%
\doxysubparagraphfont{#1}%
\doxyminisecfont{#1}}%
% Define caption that is also suitable in a table
% for usage with hyperlinks
\makeatletter
\def\doxyfigcaption{%
\H@refstepcounter{figure}%
\@dblarg{\@caption{figure}}}
% for usage without hyperlinks
\def\doxyfigcaptionnolink{%
\refstepcounter{figure}%
\@dblarg{\@caption{figure}}}
\makeatother
% Define alpha enumarative names for counters > 26
\makeatletter
\def\enumalphalphcnt#1{\expandafter\@enumalphalphcnt\csname c@#1\endcsname}
\def\@enumalphalphcnt#1{\alphalph{#1}}
\def\enumAlphAlphcnt#1{\expandafter\@enumAlphAlphcnt\csname c@#1\endcsname}
\def\@enumAlphAlphcnt#1{\AlphAlph{#1}}
\makeatother
\AddEnumerateCounter{\enumalphalphcnt}{\@enumalphalphcnt}{aa}
\AddEnumerateCounter{\enumAlphAlphcnt}{\@enumAlphAlphcnt}{AA}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,30 @@
\doxysection{File List}
Here is a list of all documented files with brief descriptions\+:\begin{DoxyCompactList}
\item\contentsline{section}{E\+:/.\+WORK/\+STM32/\+Diod\+\_\+\+Test/diode\+\_\+tester/\+Core/\+Modbus/\mbox{\hyperlink{____modbus__data_8c_source}{\+\_\+\+\_\+modbus\+\_\+data.\+c}} }{\pageref{____modbus__data_8c_source}}{}
\item\contentsline{section}{E\+:/.\+WORK/\+STM32/\+Diod\+\_\+\+Test/diode\+\_\+tester/\+Core/\+Modbus/\mbox{\hyperlink{modbus__config_8h}{modbus\+\_\+config.\+h}} \\*Конфигурационные параметры Modbus устройства }{\pageref{modbus__config_8h}}{}
\item\contentsline{section}{E\+:/.\+WORK/\+STM32/\+Diod\+\_\+\+Test/diode\+\_\+tester/\+Core/\+Modbus/\mbox{\hyperlink{modbus__data_8h}{modbus\+\_\+data.\+h}} \\*Определения структур данных Modbus устройства }{\pageref{modbus__data_8h}}{}
\item\contentsline{section}{E\+:/.\+WORK/\+STM32/\+Diod\+\_\+\+Test/diode\+\_\+tester/\+Core/\+Modbus/\+Inc/\mbox{\hyperlink{____crc__algs_8h_source}{\+\_\+\+\_\+crc\+\_\+algs.\+h}} }{\pageref{____crc__algs_8h_source}}{}
\item\contentsline{section}{E\+:/.\+WORK/\+STM32/\+Diod\+\_\+\+Test/diode\+\_\+tester/\+Core/\+Modbus/\+Inc/\mbox{\hyperlink{____modbus__compat_8h}{\+\_\+\+\_\+modbus\+\_\+compat.\+h}} \\*Модуль для совместимости библиотеки MODBUS }{\pageref{____modbus__compat_8h}}{}
\item\contentsline{section}{E\+:/.\+WORK/\+STM32/\+Diod\+\_\+\+Test/diode\+\_\+tester/\+Core/\+Modbus/\+Inc/\mbox{\hyperlink{modbus_8h}{modbus.\+h}} \\*Главный заголовочный файл Modbus библиотеки }{\pageref{modbus_8h}}{}
\item\contentsline{section}{E\+:/.\+WORK/\+STM32/\+Diod\+\_\+\+Test/diode\+\_\+tester/\+Core/\+Modbus/\+Inc/\mbox{\hyperlink{modbus__coils_8h}{modbus\+\_\+coils.\+h}} \\*Работа с коилами Modbus }{\pageref{modbus__coils_8h}}{}
\item\contentsline{section}{E\+:/.\+WORK/\+STM32/\+Diod\+\_\+\+Test/diode\+\_\+tester/\+Core/\+Modbus/\+Inc/\mbox{\hyperlink{modbus__core_8h}{modbus\+\_\+core.\+h}} \\*Ядро Modbus протокола -\/ определения и структуры }{\pageref{modbus__core_8h}}{}
\item\contentsline{section}{E\+:/.\+WORK/\+STM32/\+Diod\+\_\+\+Test/diode\+\_\+tester/\+Core/\+Modbus/\+Inc/\mbox{\hyperlink{modbus__devid_8h}{modbus\+\_\+devid.\+h}} \\*Идентификаторы устройства Modbus }{\pageref{modbus__devid_8h}}{}
\item\contentsline{section}{E\+:/.\+WORK/\+STM32/\+Diod\+\_\+\+Test/diode\+\_\+tester/\+Core/\+Modbus/\+Inc/\mbox{\hyperlink{modbus__diag_8h}{modbus\+\_\+diag.\+h}} \\*Диагностика устройства Modbus }{\pageref{modbus__diag_8h}}{}
\item\contentsline{section}{E\+:/.\+WORK/\+STM32/\+Diod\+\_\+\+Test/diode\+\_\+tester/\+Core/\+Modbus/\+Inc/\mbox{\hyperlink{modbus__holdregs_8h}{modbus\+\_\+holdregs.\+h}} \\*Работа с регистрами хранения Modbus }{\pageref{modbus__holdregs_8h}}{}
\item\contentsline{section}{E\+:/.\+WORK/\+STM32/\+Diod\+\_\+\+Test/diode\+\_\+tester/\+Core/\+Modbus/\+Inc/\mbox{\hyperlink{modbus__inputregs_8h}{modbus\+\_\+inputregs.\+h}} \\*Работа с входными регистрами Modbus }{\pageref{modbus__inputregs_8h}}{}
\item\contentsline{section}{E\+:/.\+WORK/\+STM32/\+Diod\+\_\+\+Test/diode\+\_\+tester/\+Core/\+Modbus/\+Inc/\mbox{\hyperlink{modbus__master_8h}{modbus\+\_\+master.\+h}} \\*Главный заголовочный файл Modbus библиотеки }{\pageref{modbus__master_8h}}{}
\item\contentsline{section}{E\+:/.\+WORK/\+STM32/\+Diod\+\_\+\+Test/diode\+\_\+tester/\+Core/\+Modbus/\+Inc/\mbox{\hyperlink{modbus__slave_8h}{modbus\+\_\+slave.\+h}} \\*Главный заголовочный файл Modbus библиотеки }{\pageref{modbus__slave_8h}}{}
\item\contentsline{section}{E\+:/.\+WORK/\+STM32/\+Diod\+\_\+\+Test/diode\+\_\+tester/\+Core/\+Modbus/\+Inc/\mbox{\hyperlink{rs__message_8h}{rs\+\_\+message.\+h}} \\*Библиотека обмена сообщениями по RS-\/интерфейсу }{\pageref{rs__message_8h}}{}
\item\contentsline{section}{E\+:/.\+WORK/\+STM32/\+Diod\+\_\+\+Test/diode\+\_\+tester/\+Core/\+Modbus/\+Src/\mbox{\hyperlink{____crc__algs_8c_source}{\+\_\+\+\_\+crc\+\_\+algs.\+c}} }{\pageref{____crc__algs_8c_source}}{}
\item\contentsline{section}{E\+:/.\+WORK/\+STM32/\+Diod\+\_\+\+Test/diode\+\_\+tester/\+Core/\+Modbus/\+Src/\mbox{\hyperlink{____modbus__compat_8c}{\+\_\+\+\_\+modbus\+\_\+compat.\+c}} \\*Модуль для совместимости библиотеки MODBUS }{\pageref{____modbus__compat_8c}}{}
\item\contentsline{section}{E\+:/.\+WORK/\+STM32/\+Diod\+\_\+\+Test/diode\+\_\+tester/\+Core/\+Modbus/\+Src/\mbox{\hyperlink{modbus_8c}{modbus.\+c}} \\*Модуль для реализации MODBUS }{\pageref{modbus_8c}}{}
\item\contentsline{section}{E\+:/.\+WORK/\+STM32/\+Diod\+\_\+\+Test/diode\+\_\+tester/\+Core/\+Modbus/\+Src/\mbox{\hyperlink{modbus__coils_8c}{modbus\+\_\+coils.\+c}} \\*Реализация работы с коилами Modbus }{\pageref{modbus__coils_8c}}{}
\item\contentsline{section}{E\+:/.\+WORK/\+STM32/\+Diod\+\_\+\+Test/diode\+\_\+tester/\+Core/\+Modbus/\+Src/\mbox{\hyperlink{modbus__core_8c}{modbus\+\_\+core.\+c}} \\*Базовая реализация ядра Modbus }{\pageref{modbus__core_8c}}{}
\item\contentsline{section}{E\+:/.\+WORK/\+STM32/\+Diod\+\_\+\+Test/diode\+\_\+tester/\+Core/\+Modbus/\+Src/\mbox{\hyperlink{modbus__devid_8c}{modbus\+\_\+devid.\+c}} \\*Реализация идентификаторов устройства Modbus }{\pageref{modbus__devid_8c}}{}
\item\contentsline{section}{E\+:/.\+WORK/\+STM32/\+Diod\+\_\+\+Test/diode\+\_\+tester/\+Core/\+Modbus/\+Src/\mbox{\hyperlink{modbus__diag_8c}{modbus\+\_\+diag.\+c}} \\*Реализация диагностики устройства Modbus }{\pageref{modbus__diag_8c}}{}
\item\contentsline{section}{E\+:/.\+WORK/\+STM32/\+Diod\+\_\+\+Test/diode\+\_\+tester/\+Core/\+Modbus/\+Src/\mbox{\hyperlink{modbus__holdregs_8c}{modbus\+\_\+holdregs.\+c}} \\*Реализация работы с регистрами хранения Modbus }{\pageref{modbus__holdregs_8c}}{}
\item\contentsline{section}{E\+:/.\+WORK/\+STM32/\+Diod\+\_\+\+Test/diode\+\_\+tester/\+Core/\+Modbus/\+Src/\mbox{\hyperlink{modbus__inputregs_8c}{modbus\+\_\+inputregs.\+c}} \\*Реализация работы с входными регистрами Modbus }{\pageref{modbus__inputregs_8c}}{}
\item\contentsline{section}{E\+:/.\+WORK/\+STM32/\+Diod\+\_\+\+Test/diode\+\_\+tester/\+Core/\+Modbus/\+Src/\mbox{\hyperlink{modbus__master_8c}{modbus\+\_\+master.\+c}} \\*Модуль для реализации мастера MODBUS }{\pageref{modbus__master_8c}}{}
\item\contentsline{section}{E\+:/.\+WORK/\+STM32/\+Diod\+\_\+\+Test/diode\+\_\+tester/\+Core/\+Modbus/\+Src/\mbox{\hyperlink{modbus__slave_8c}{modbus\+\_\+slave.\+c}} \\*Модуль для реализации слейв MODBUS }{\pageref{modbus__slave_8c}}{}
\item\contentsline{section}{E\+:/.\+WORK/\+STM32/\+Diod\+\_\+\+Test/diode\+\_\+tester/\+Core/\+Modbus/\+Src/\mbox{\hyperlink{rs__message_8c}{rs\+\_\+message.\+c}} \\*Реализация протоколов обмена по RS/\+UART }{\pageref{rs__message_8c}}{}
\end{DoxyCompactList}

View File

@@ -0,0 +1 @@
22930d42a6214fed2ba88471ba491dc9

Binary file not shown.

View File

@@ -0,0 +1,34 @@
\doxysection{Modbus tools }
\hypertarget{group___m_o_d_b_u_s}{}\label{group___m_o_d_b_u_s}\index{Modbus tools@{Modbus tools}}
Библиотека реализующая протокол Modbus.
Collaboration diagram for Modbus tools\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=308pt]{group___m_o_d_b_u_s}
\end{center}
\end{figure}
\doxysubsubsection*{Topics}
\begin{DoxyCompactItemize}
\item
\mbox{\hyperlink{group___m_o_d_b_u_s___d_a_t_a}{Modbus Registers Map}}
\begin{DoxyCompactList}\small\item\em Определение карты регистров и коилов \end{DoxyCompactList}\item
\mbox{\hyperlink{group___m_o_d_b_u_s___f_u_n_c_t_i_o_n_s}{Main API for Modbus Library}}
\begin{DoxyCompactList}\small\item\em Публичные функции библиотеки \end{DoxyCompactList}\item
\mbox{\hyperlink{group___m_o_d_b_u_s___i_n_t_e_r_n_a_l}{Modbus Internal Tools}}
\begin{DoxyCompactList}\small\item\em Внутренние штуки библиотеки \end{DoxyCompactList}\item
\mbox{\hyperlink{group___m_o_d_b_u_s___c_o_n_f_i_g_s}{Modbus configs}}
\begin{DoxyCompactList}\small\item\em Конфигурация библиотеки \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection{Detailed Description}
Библиотека реализующая протокол Modbus.
\input{group___m_o_d_b_u_s___d_a_t_a}
\input{group___m_o_d_b_u_s___f_u_n_c_t_i_o_n_s}
\input{group___m_o_d_b_u_s___i_n_t_e_r_n_a_l}
\input{group___m_o_d_b_u_s___c_o_n_f_i_g_s}

View File

@@ -0,0 +1 @@
a49e80383e9c0836a654c6c6f00fa3e9

View File

@@ -0,0 +1,350 @@
\doxysubsubsection{Internal Process Functions }
\hypertarget{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}{}\label{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}\index{Internal Process Functions@{Internal Process Functions}}
Функции обработки запросов модбас
Collaboration diagram for Internal Process Functions\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{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}
\end{center}
\end{figure}
\doxysubsubsubsubsection*{Topics}
\begin{DoxyCompactItemize}
\item
\mbox{\hyperlink{group___m_o_d_b_u_s___m_a_s_t_e_r}{Modbus master funtions}}
\begin{DoxyCompactList}\small\item\em Функции для работы в режиме Master. \end{DoxyCompactList}\item
\mbox{\hyperlink{group___m_o_d_b_u_s___s_l_a_v_e}{Modbus slave funtions}}
\begin{DoxyCompactList}\small\item\em Функции для работы в режиме Slave. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsubsubsection*{Functions}
\begin{DoxyCompactItemize}
\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_ga39a02e8e4911a74a619d2ef29adcbad8}{MB\+\_\+\+Process\+\_\+\+Read\+\_\+\+Coils}} (\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \texorpdfstring{$\ast$}{*}modbus\+\_\+msg)
\begin{DoxyCompactList}\small\item\em Обработать функцию Read Coils (01 -\/ 0x01). \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_ga918102931c9125a5e44a30e103d17e14}{MB\+\_\+\+Process\+\_\+\+Write\+\_\+\+Single\+\_\+\+Coil}} (\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \texorpdfstring{$\ast$}{*}modbus\+\_\+msg)
\begin{DoxyCompactList}\small\item\em Обработать функцию Write Single Coils (05 -\/ 0x05). \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_ga6f4498cec8634820025aaa9c4623ba55}{MB\+\_\+\+Process\+\_\+\+Write\+\_\+\+Miltuple\+\_\+\+Coils}} (\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \texorpdfstring{$\ast$}{*}modbus\+\_\+msg)
\begin{DoxyCompactList}\small\item\em Обработать функцию Write Multiple Coils (15 -\/ 0x0F). \end{DoxyCompactList}\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___c_m_d___p_r_o_c_e_s_s___f_u_n_c_t_i_o_n_s_ga278ca9791c69aef8adeb9e7c4b273c50}{MB\+\_\+\+Check\+\_\+\+Address\+\_\+\+For\+\_\+\+Arr}} (uint16\+\_\+t Addr, uint16\+\_\+t Qnt, uint16\+\_\+t R\+\_\+\+ARR\+\_\+\+ADDR, uint16\+\_\+t R\+\_\+\+ARR\+\_\+\+NUMB)
\begin{DoxyCompactList}\small\item\em Check is address valid for certain array. \end{DoxyCompactList}\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___c_m_d___p_r_o_c_e_s_s___f_u_n_c_t_i_o_n_s_ga1e90bb28a4cf997250daab6470d5ffe3}{MB\+\_\+\+Define\+Registers\+Address}} (uint16\+\_\+t \texorpdfstring{$\ast$}{*}\texorpdfstring{$\ast$}{*}p\+Regs, uint16\+\_\+t Addr, uint16\+\_\+t Qnt, uint8\+\_\+t Register\+Type)
\begin{DoxyCompactList}\small\item\em Define Address Origin for Input/\+Holding Registers. \end{DoxyCompactList}\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___c_m_d___p_r_o_c_e_s_s___f_u_n_c_t_i_o_n_s_gade717a6829a062a8a198bd933c8b2221}{MB\+\_\+\+Define\+Coils\+Address}} (uint16\+\_\+t \texorpdfstring{$\ast$}{*}\texorpdfstring{$\ast$}{*}p\+Coils, uint16\+\_\+t Addr, uint16\+\_\+t Qnt, uint16\+\_\+t \texorpdfstring{$\ast$}{*}start\+\_\+shift, uint8\+\_\+t Write\+Flag)
\begin{DoxyCompactList}\small\item\em Define Address Origin for coils. \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_ga279ce6d9d175a43714862dc6661e7096}{MB\+\_\+\+Process\+\_\+\+Read\+\_\+\+Device\+\_\+\+Identifications}} (\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \texorpdfstring{$\ast$}{*}modbus\+\_\+msg)
\begin{DoxyCompactList}\small\item\em Обработать функцию Read Device Identifications (43/14 -\/ 0x2\+B/0E). \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_ga6bbfc53b20b4698a08d79851b5db65f0}{MB\+\_\+\+Process\+\_\+\+Diagnostics}} (\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \texorpdfstring{$\ast$}{*}modbus\+\_\+msg)
\begin{DoxyCompactList}\small\item\em Обработать функцию Diagnostics (Serial Line only) (0x08) \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_gac28127757ba25fe0b611612a785f663b}{MB\+\_\+\+Process\+\_\+\+Read\+\_\+\+Hold\+\_\+\+Regs}} (\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \texorpdfstring{$\ast$}{*}modbus\+\_\+msg)
\begin{DoxyCompactList}\small\item\em Обработать функцию Read Holding Registers (03 -\/ 0x03). \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_ga02e192a3d9f31737c45f074a04b37648}{MB\+\_\+\+Process\+\_\+\+Write\+\_\+\+Single\+\_\+\+Reg}} (\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \texorpdfstring{$\ast$}{*}modbus\+\_\+msg)
\begin{DoxyCompactList}\small\item\em Обработать функцию Write Single Register (06 -\/ 0x06). \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_ga9c6ab159edb8dda6548b2228773ce919}{MB\+\_\+\+Process\+\_\+\+Write\+\_\+\+Miltuple\+\_\+\+Regs}} (\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \texorpdfstring{$\ast$}{*}modbus\+\_\+msg)
\begin{DoxyCompactList}\small\item\em Обработать функцию Write Multiple Registers (16 -\/ 0x10). \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}
\doxysubsubsubsection{Detailed Description}
Функции обработки запросов модбас
\label{doc-func-members}
\Hypertarget{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_doc-func-members}
\doxysubsubsubsection{Function Documentation}
\Hypertarget{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_ga39a02e8e4911a74a619d2ef29adcbad8}\index{Internal Process Functions@{Internal Process Functions}!MB\_Process\_Read\_Coils@{MB\_Process\_Read\_Coils}}
\index{MB\_Process\_Read\_Coils@{MB\_Process\_Read\_Coils}!Internal Process Functions@{Internal Process Functions}}
\doxysubsubsubsubsection{\texorpdfstring{MB\_Process\_Read\_Coils()}{MB\_Process\_Read\_Coils()}}
{\footnotesize\ttfamily \label{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_ga39a02e8e4911a74a619d2ef29adcbad8}
uint8\+\_\+t MB\+\_\+\+Process\+\_\+\+Read\+\_\+\+Coils (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \texorpdfstring{$\ast$}{*}}]{modbus\+\_\+msg}{}\end{DoxyParamCaption})}
Обработать функцию Read Coils (01 -\/ 0x01).
\begin{DoxyParams}{Parameters}
{\em modbus\+\_\+msg} & Указатель на структуру собщения modbus. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
f\+Message\+Handled Статус о результате обработки комманды.
\end{DoxyReturn}
Обработка команды Read Coils.
Definition at line \mbox{\hyperlink{modbus__coils_8c_source_l00103}{103}} of file \mbox{\hyperlink{modbus__coils_8c_source}{modbus\+\_\+coils.\+c}}.
\Hypertarget{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_ga918102931c9125a5e44a30e103d17e14}\index{Internal Process Functions@{Internal Process Functions}!MB\_Process\_Write\_Single\_Coil@{MB\_Process\_Write\_Single\_Coil}}
\index{MB\_Process\_Write\_Single\_Coil@{MB\_Process\_Write\_Single\_Coil}!Internal Process Functions@{Internal Process Functions}}
\doxysubsubsubsubsection{\texorpdfstring{MB\_Process\_Write\_Single\_Coil()}{MB\_Process\_Write\_Single\_Coil()}}
{\footnotesize\ttfamily \label{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_ga918102931c9125a5e44a30e103d17e14}
uint8\+\_\+t MB\+\_\+\+Process\+\_\+\+Write\+\_\+\+Single\+\_\+\+Coil (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \texorpdfstring{$\ast$}{*}}]{modbus\+\_\+msg}{}\end{DoxyParamCaption})}
Обработать функцию Write Single Coils (05 -\/ 0x05).
\begin{DoxyParams}{Parameters}
{\em modbus\+\_\+msg} & Указатель на структуру собщения modbus. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
f\+Message\+Handled Статус о результате обработки комманды.
\end{DoxyReturn}
Обработка команды Write Single Coils.
Definition at line \mbox{\hyperlink{modbus__coils_8c_source_l00156}{156}} of file \mbox{\hyperlink{modbus__coils_8c_source}{modbus\+\_\+coils.\+c}}.
\Hypertarget{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_ga6f4498cec8634820025aaa9c4623ba55}\index{Internal Process Functions@{Internal Process Functions}!MB\_Process\_Write\_Miltuple\_Coils@{MB\_Process\_Write\_Miltuple\_Coils}}
\index{MB\_Process\_Write\_Miltuple\_Coils@{MB\_Process\_Write\_Miltuple\_Coils}!Internal Process Functions@{Internal Process Functions}}
\doxysubsubsubsubsection{\texorpdfstring{MB\_Process\_Write\_Miltuple\_Coils()}{MB\_Process\_Write\_Miltuple\_Coils()}}
{\footnotesize\ttfamily \label{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_ga6f4498cec8634820025aaa9c4623ba55}
uint8\+\_\+t MB\+\_\+\+Process\+\_\+\+Write\+\_\+\+Miltuple\+\_\+\+Coils (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \texorpdfstring{$\ast$}{*}}]{modbus\+\_\+msg}{}\end{DoxyParamCaption})}
Обработать функцию Write Multiple Coils (15 -\/ 0x0F).
\begin{DoxyParams}{Parameters}
{\em modbus\+\_\+msg} & Указатель на структуру собщения modbus. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
f\+Message\+Handled Статус о результате обработки комманды.
\end{DoxyReturn}
Обработка команды Write Multiple Coils.
Definition at line \mbox{\hyperlink{modbus__coils_8c_source_l00187}{187}} of file \mbox{\hyperlink{modbus__coils_8c_source}{modbus\+\_\+coils.\+c}}.
\Hypertarget{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_ga278ca9791c69aef8adeb9e7c4b273c50}\index{Internal Process Functions@{Internal Process Functions}!MB\_Check\_Address\_For\_Arr@{MB\_Check\_Address\_For\_Arr}}
\index{MB\_Check\_Address\_For\_Arr@{MB\_Check\_Address\_For\_Arr}!Internal Process Functions@{Internal Process Functions}}
\doxysubsubsubsubsection{\texorpdfstring{MB\_Check\_Address\_For\_Arr()}{MB\_Check\_Address\_For\_Arr()}}
{\footnotesize\ttfamily \label{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_ga278ca9791c69aef8adeb9e7c4b273c50}
\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}} MB\+\_\+\+Check\+\_\+\+Address\+\_\+\+For\+\_\+\+Arr (\begin{DoxyParamCaption}\item[{uint16\+\_\+t}]{Addr}{, }\item[{uint16\+\_\+t}]{Qnt}{, }\item[{uint16\+\_\+t}]{R\+\_\+\+ARR\+\_\+\+ADDR}{, }\item[{uint16\+\_\+t}]{R\+\_\+\+ARR\+\_\+\+NUMB}{}\end{DoxyParamCaption})}
Check is address valid for certain array.
\begin{DoxyParams}{Parameters}
{\em Addr} & Начальный адресс. \\
\hline
{\em Qnt} & Количество запрашиваемых элементов. \\
\hline
{\em R\+\_\+\+ARR\+\_\+\+ADDR} & Начальный адресс массива R\+\_\+\+ARR. \\
\hline
{\em R\+\_\+\+ARR\+\_\+\+NUMB} & Количество элементов в массиве R\+\_\+\+ARR. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Exception\+Code -\/ ET\+\_\+\+ILLEGAL\+\_\+\+DATA\+\_\+\+ADRESS если адресс недействителен, и ET\+\_\+\+NO\+\_\+\+ERRORS если все ок.
\end{DoxyReturn}
Позволяет определить, принадлежит ли адресс Addr массиву R\+\_\+\+ARR\+: Если адресс Addr находится в диапазоне адрессов массива R\+\_\+\+ARR, то возвращаем NO\+\_\+\+ERROR. Если адресс Addr находится за пределами адрессов массива R\+\_\+\+ARR -\/ ET\+\_\+\+ILLEGAL\+\_\+\+DATA\+\_\+\+ADDRESSю.
Definition at line \mbox{\hyperlink{____modbus__data_8c_source_l00038}{38}} of file \mbox{\hyperlink{____modbus__data_8c_source}{\+\_\+\+\_\+modbus\+\_\+data.\+c}}.
\Hypertarget{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}\index{Internal Process Functions@{Internal Process Functions}!MB\_DefineRegistersAddress@{MB\_DefineRegistersAddress}}
\index{MB\_DefineRegistersAddress@{MB\_DefineRegistersAddress}!Internal Process Functions@{Internal Process Functions}}
\doxysubsubsubsubsection{\texorpdfstring{MB\_DefineRegistersAddress()}{MB\_DefineRegistersAddress()}}
{\footnotesize\ttfamily \label{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}
\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}} MB\+\_\+\+Define\+Registers\+Address (\begin{DoxyParamCaption}\item[{uint16\+\_\+t \texorpdfstring{$\ast$}{*}\texorpdfstring{$\ast$}{*}}]{p\+Regs}{, }\item[{uint16\+\_\+t}]{Addr}{, }\item[{uint16\+\_\+t}]{Qnt}{, }\item[{uint8\+\_\+t}]{Register\+Type}{}\end{DoxyParamCaption})}
Define Address Origin for Input/\+Holding Registers.
\begin{DoxyParams}{Parameters}
{\em p\+Regs} & Указатель на указатель регистров. \\
\hline
{\em Addr} & Адрес начального регистра. \\
\hline
{\em Qnt} & Количество запрашиваемых регистров. \\
\hline
{\em Write\+Flag} & Флаг регистр нужны для чтения или записи. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Exception\+Code Код исключения если есть, и ET\+\_\+\+NO\+\_\+\+ERRORS если нет.
\end{DoxyReturn}
Определение адреса начального регистра. \begin{DoxyNote}{Note}
Write\+Flag пока не используется.
\end{DoxyNote}
Definition at line \mbox{\hyperlink{____modbus__data_8c_source_l00066}{66}} of file \mbox{\hyperlink{____modbus__data_8c_source}{\+\_\+\+\_\+modbus\+\_\+data.\+c}}.
\Hypertarget{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_gade717a6829a062a8a198bd933c8b2221}\index{Internal Process Functions@{Internal Process Functions}!MB\_DefineCoilsAddress@{MB\_DefineCoilsAddress}}
\index{MB\_DefineCoilsAddress@{MB\_DefineCoilsAddress}!Internal Process Functions@{Internal Process Functions}}
\doxysubsubsubsubsection{\texorpdfstring{MB\_DefineCoilsAddress()}{MB\_DefineCoilsAddress()}}
{\footnotesize\ttfamily \label{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_gade717a6829a062a8a198bd933c8b2221}
\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}} MB\+\_\+\+Define\+Coils\+Address (\begin{DoxyParamCaption}\item[{uint16\+\_\+t \texorpdfstring{$\ast$}{*}\texorpdfstring{$\ast$}{*}}]{p\+Coils}{, }\item[{uint16\+\_\+t}]{Addr}{, }\item[{uint16\+\_\+t}]{Qnt}{, }\item[{uint16\+\_\+t \texorpdfstring{$\ast$}{*}}]{start\+\_\+shift}{, }\item[{uint8\+\_\+t}]{Write\+Flag}{}\end{DoxyParamCaption})}
Define Address Origin for coils.
\begin{DoxyParams}{Parameters}
{\em p\+Coils} & Указатель на указатель коилов. \\
\hline
{\em Addr} & Адресс начального коила. \\
\hline
{\em Qnt} & Количество запрашиваемых коилов. \\
\hline
{\em start\+\_\+shift} & Указатель на переменную содержащую сдвиг внутри регистра для начального коила. \\
\hline
{\em Write\+Flag} & Флаг коилы нужны для чтения или записи. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Exception\+Code Код исключения если есть, и ET\+\_\+\+NO\+\_\+\+ERRORS если нет.
\end{DoxyReturn}
Определение адреса начального регистра запрашиваемых коилов. \begin{DoxyNote}{Note}
Write\+Flag используется для определния регистров GPIO\+: ODR или IDR.
\end{DoxyNote}
Definition at line \mbox{\hyperlink{____modbus__data_8c_source_l00119}{119}} of file \mbox{\hyperlink{____modbus__data_8c_source}{\+\_\+\+\_\+modbus\+\_\+data.\+c}}.
\Hypertarget{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}\index{Internal Process Functions@{Internal Process Functions}!MB\_Process\_Read\_Device\_Identifications@{MB\_Process\_Read\_Device\_Identifications}}
\index{MB\_Process\_Read\_Device\_Identifications@{MB\_Process\_Read\_Device\_Identifications}!Internal Process Functions@{Internal Process Functions}}
\doxysubsubsubsubsection{\texorpdfstring{MB\_Process\_Read\_Device\_Identifications()}{MB\_Process\_Read\_Device\_Identifications()}}
{\footnotesize\ttfamily \label{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}
uint8\+\_\+t MB\+\_\+\+Process\+\_\+\+Read\+\_\+\+Device\+\_\+\+Identifications (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \texorpdfstring{$\ast$}{*}}]{modbus\+\_\+msg}{}\end{DoxyParamCaption})}
Обработать функцию Read Device Identifications (43/14 -\/ 0x2\+B/0E).
\begin{DoxyParams}{Parameters}
{\em modbus\+\_\+msg} & Указатель на структуру собщения modbus. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
f\+Message\+Handled Статус о результате обработки комманды.
\end{DoxyReturn}
Обработка команды Write Single Register.
Definition at line \mbox{\hyperlink{modbus__devid_8c_source_l00112}{112}} of file \mbox{\hyperlink{modbus__devid_8c_source}{modbus\+\_\+devid.\+c}}.
\Hypertarget{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_ga6bbfc53b20b4698a08d79851b5db65f0}\index{Internal Process Functions@{Internal Process Functions}!MB\_Process\_Diagnostics@{MB\_Process\_Diagnostics}}
\index{MB\_Process\_Diagnostics@{MB\_Process\_Diagnostics}!Internal Process Functions@{Internal Process Functions}}
\doxysubsubsubsubsection{\texorpdfstring{MB\_Process\_Diagnostics()}{MB\_Process\_Diagnostics()}}
{\footnotesize\ttfamily \label{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_ga6bbfc53b20b4698a08d79851b5db65f0}
uint8\+\_\+t MB\+\_\+\+Process\+\_\+\+Diagnostics (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \texorpdfstring{$\ast$}{*}}]{modbus\+\_\+msg}{}\end{DoxyParamCaption})}
Обработать функцию Diagnostics (Serial Line only) (0x08)
\begin{DoxyParams}{Parameters}
{\em modbus\+\_\+msg} & Указатель на структуру сообщения modbus \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
f\+Message\+Handled Статус обработки команды
\end{DoxyReturn}
Definition at line \mbox{\hyperlink{modbus__diag_8c_source_l00075}{75}} of file \mbox{\hyperlink{modbus__diag_8c_source}{modbus\+\_\+diag.\+c}}.
\Hypertarget{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_gac28127757ba25fe0b611612a785f663b}\index{Internal Process Functions@{Internal Process Functions}!MB\_Process\_Read\_Hold\_Regs@{MB\_Process\_Read\_Hold\_Regs}}
\index{MB\_Process\_Read\_Hold\_Regs@{MB\_Process\_Read\_Hold\_Regs}!Internal Process Functions@{Internal Process Functions}}
\doxysubsubsubsubsection{\texorpdfstring{MB\_Process\_Read\_Hold\_Regs()}{MB\_Process\_Read\_Hold\_Regs()}}
{\footnotesize\ttfamily \label{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_gac28127757ba25fe0b611612a785f663b}
uint8\+\_\+t MB\+\_\+\+Process\+\_\+\+Read\+\_\+\+Hold\+\_\+\+Regs (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \texorpdfstring{$\ast$}{*}}]{modbus\+\_\+msg}{}\end{DoxyParamCaption})}
Обработать функцию Read Holding Registers (03 -\/ 0x03).
\begin{DoxyParams}{Parameters}
{\em modbus\+\_\+msg} & Указатель на структуру собщения modbus. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
f\+Message\+Handled Статус о результате обработки комманды.
\end{DoxyReturn}
Обработка команды Read Holding Registers.
Definition at line \mbox{\hyperlink{modbus__holdregs_8c_source_l00092}{92}} of file \mbox{\hyperlink{modbus__holdregs_8c_source}{modbus\+\_\+holdregs.\+c}}.
\Hypertarget{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_ga02e192a3d9f31737c45f074a04b37648}\index{Internal Process Functions@{Internal Process Functions}!MB\_Process\_Write\_Single\_Reg@{MB\_Process\_Write\_Single\_Reg}}
\index{MB\_Process\_Write\_Single\_Reg@{MB\_Process\_Write\_Single\_Reg}!Internal Process Functions@{Internal Process Functions}}
\doxysubsubsubsubsection{\texorpdfstring{MB\_Process\_Write\_Single\_Reg()}{MB\_Process\_Write\_Single\_Reg()}}
{\footnotesize\ttfamily \label{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_ga02e192a3d9f31737c45f074a04b37648}
uint8\+\_\+t MB\+\_\+\+Process\+\_\+\+Write\+\_\+\+Single\+\_\+\+Reg (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \texorpdfstring{$\ast$}{*}}]{modbus\+\_\+msg}{}\end{DoxyParamCaption})}
Обработать функцию Write Single Register (06 -\/ 0x06).
\begin{DoxyParams}{Parameters}
{\em modbus\+\_\+msg} & Указатель на структуру собщения modbus. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
f\+Message\+Handled Статус о результате обработки комманды.
\end{DoxyReturn}
Обработка команды Write Single Register.
Definition at line \mbox{\hyperlink{modbus__holdregs_8c_source_l00120}{120}} of file \mbox{\hyperlink{modbus__holdregs_8c_source}{modbus\+\_\+holdregs.\+c}}.
\Hypertarget{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_ga9c6ab159edb8dda6548b2228773ce919}\index{Internal Process Functions@{Internal Process Functions}!MB\_Process\_Write\_Miltuple\_Regs@{MB\_Process\_Write\_Miltuple\_Regs}}
\index{MB\_Process\_Write\_Miltuple\_Regs@{MB\_Process\_Write\_Miltuple\_Regs}!Internal Process Functions@{Internal Process Functions}}
\doxysubsubsubsubsection{\texorpdfstring{MB\_Process\_Write\_Miltuple\_Regs()}{MB\_Process\_Write\_Miltuple\_Regs()}}
{\footnotesize\ttfamily \label{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_ga9c6ab159edb8dda6548b2228773ce919}
uint8\+\_\+t MB\+\_\+\+Process\+\_\+\+Write\+\_\+\+Miltuple\+\_\+\+Regs (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \texorpdfstring{$\ast$}{*}}]{modbus\+\_\+msg}{}\end{DoxyParamCaption})}
Обработать функцию Write Multiple Registers (16 -\/ 0x10).
\begin{DoxyParams}{Parameters}
{\em modbus\+\_\+msg} & Указатель на структуру собщения modbus. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
f\+Message\+Handled Статус о результате обработки комманды.
\end{DoxyReturn}
Обработка команды Write Multiple Registers.
Definition at line \mbox{\hyperlink{modbus__holdregs_8c_source_l00139}{139}} of file \mbox{\hyperlink{modbus__holdregs_8c_source}{modbus\+\_\+holdregs.\+c}}.
\Hypertarget{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}\index{Internal Process Functions@{Internal Process Functions}!MB\_Process\_Read\_Input\_Regs@{MB\_Process\_Read\_Input\_Regs}}
\index{MB\_Process\_Read\_Input\_Regs@{MB\_Process\_Read\_Input\_Regs}!Internal Process Functions@{Internal Process Functions}}
\doxysubsubsubsubsection{\texorpdfstring{MB\_Process\_Read\_Input\_Regs()}{MB\_Process\_Read\_Input\_Regs()}}
{\footnotesize\ttfamily \label{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}
uint8\+\_\+t MB\+\_\+\+Process\+\_\+\+Read\+\_\+\+Input\+\_\+\+Regs (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \texorpdfstring{$\ast$}{*}}]{modbus\+\_\+msg}{}\end{DoxyParamCaption})}
Обработать функцию Read Input Registers (04 -\/ 0x04).
\begin{DoxyParams}{Parameters}
{\em modbus\+\_\+msg} & Указатель на структуру собщения modbus. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
f\+Message\+Handled Статус о результате обработки комманды.
\end{DoxyReturn}
Обработка команды Read Input Registers.
Definition at line \mbox{\hyperlink{modbus__inputregs_8c_source_l00087}{87}} of file \mbox{\hyperlink{modbus__inputregs_8c_source}{modbus\+\_\+inputregs.\+c}}.
\input{group___m_o_d_b_u_s___m_a_s_t_e_r}
\input{group___m_o_d_b_u_s___s_l_a_v_e}

View File

@@ -0,0 +1 @@
0530937d9612ea6231affb7b2e7d4fcf

View File

@@ -0,0 +1,35 @@
\doxysubsubsection{Coils Tools }
\hypertarget{group___m_o_d_b_u_s___c_o_i_l_s}{}\label{group___m_o_d_b_u_s___c_o_i_l_s}\index{Coils Tools@{Coils Tools}}
Функции для работы с коилами
Collaboration diagram for Coils Tools\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=291pt]{group___m_o_d_b_u_s___c_o_i_l_s}
\end{center}
\end{figure}
Функции для работы с коилами
Модуль для доступа к coils внутри программы\+:
\begin{DoxyItemize}
\item Функции для доступа к coils по глобальным адресам
\item Макросы для доступа к coils по локальным адресам
\end{DoxyItemize}
Модуль предоставляет функции и макросы для работы с битовыми данными\+:
\begin{DoxyItemize}
\item Чтение coils (0x01) Упаковка битов в байты
\item Запись одиночного coil (0x05) Установка/сброс бита
\item Запись множественных coils (0x0F) -\/ распаковка байтов в биты
\end{DoxyItemize}\hypertarget{group___m_o_d_b_u_s___c_o_i_l_s_cbits}{}\doxysubsubsubsection{\texorpdfstring{Организация битовых данных\+:}{Организация битовых данных\+:}}\label{group___m_o_d_b_u_s___c_o_i_l_s_cbits}
Coils упакованы в 16-\/битные слова для эффективного использования памяти. Биты нумеруются от младшего к старшему внутри каждого слова.\hypertarget{group___m_o_d_b_u_s___c_o_i_l_s_caddr}{}\doxysubsubsubsection{\texorpdfstring{Адресация\+:}{Адресация\+:}}\label{group___m_o_d_b_u_s___c_o_i_l_s_caddr}
\begin{DoxyItemize}
\item Глобальная -\/ абсолютный адрес в пространстве Modbus
\item Локальная -\/ относительный адрес внутри массива coils
\item Макросы автоматически вычисляют смещения и маски
\end{DoxyItemize}

View File

@@ -0,0 +1 @@
6116efb3628704afb3d3a5646e669147

View File

@@ -0,0 +1,327 @@
\doxysubsection{Modbus configs }
\hypertarget{group___m_o_d_b_u_s___c_o_n_f_i_g_s}{}\label{group___m_o_d_b_u_s___c_o_n_f_i_g_s}\index{Modbus configs@{Modbus configs}}
Конфигурация библиотеки
Collaboration diagram for Modbus configs\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=276pt]{group___m_o_d_b_u_s___c_o_n_f_i_g_s}
\end{center}
\end{figure}
\doxysubsubsubsection*{Macros}
\begin{DoxyCompactItemize}
\item
\#define \mbox{\hyperlink{group___m_o_d_b_u_s___c_o_n_f_i_g_s_gab9b18e108b98b225a52c5ccca58e7f2b}{MODBUS\+\_\+\+DEVICE\+\_\+\+ID}}~1
\begin{DoxyCompactList}\small\item\em Адрес устройства в сети Modbus. \end{DoxyCompactList}\item
\#define \mbox{\hyperlink{group___m_o_d_b_u_s___c_o_n_f_i_g_s_ga66f7c59a25c8cca6d5b0991895c26b69}{MODBUS\+\_\+\+TIMEOUT}}~5000
\begin{DoxyCompactList}\small\item\em Таймаут в тиках таймера \end{DoxyCompactList}\item
\#define \mbox{\hyperlink{group___m_o_d_b_u_s___c_o_n_f_i_g_s_ga0e01f19c79d049b745b28cc708ba0c2f}{MODBUS\+\_\+\+VENDOR\+\_\+\+NAME}}~"{}NIO-\/12"{}
\item
\#define \mbox{\hyperlink{group___m_o_d_b_u_s___c_o_n_f_i_g_s_ga6e8dea7833243443899787fd7186ab36}{MODBUS\+\_\+\+PRODUCT\+\_\+\+CODE}}~"{}"{}
\item
\#define \mbox{\hyperlink{group___m_o_d_b_u_s___c_o_n_f_i_g_s_ga270858b2ee3dc5de6666e05ba0b7044a}{MODBUS\+\_\+\+REVISION}}~"{}"{}
\item
\#define \mbox{\hyperlink{group___m_o_d_b_u_s___c_o_n_f_i_g_s_ga0d4f8c7ad821f1e47c06fca438cc2065}{MODBUS\+\_\+\+VENDOR\+\_\+\+URL}}~"{}"{}
\item
\#define \mbox{\hyperlink{group___m_o_d_b_u_s___c_o_n_f_i_g_s_ga272ac8bc7eb92d40e731954cc627e28b}{MODBUS\+\_\+\+PRODUCT\+\_\+\+NAME}}~"{}"{}
\item
\#define \mbox{\hyperlink{group___m_o_d_b_u_s___c_o_n_f_i_g_s_ga94dff4b6008db9de88a18f80507b745c}{MODBUS\+\_\+\+MODEL\+\_\+\+NAME}}~"{}"{}
\item
\#define \mbox{\hyperlink{group___m_o_d_b_u_s___c_o_n_f_i_g_s_ga197c776ad1235d5f4fa17318e60628a9}{MODBUS\+\_\+\+USER\+\_\+\+APPLICATION\+\_\+\+NAME}}~"{}"{}
\item
\#define \mbox{\hyperlink{group___m_o_d_b_u_s___c_o_n_f_i_g_s_ga5c7e9c2180ceac1208f4b791d7b70a0a}{MODBUS\+\_\+\+NUMB\+\_\+\+OF\+\_\+\+USEROBJECTS}}~0
\begin{DoxyCompactList}\small\item\em Количество пользовательских объектов \end{DoxyCompactList}\item
\#define \mbox{\hyperlink{group___m_o_d_b_u_s___c_o_n_f_i_g_s_gac3b162e9af2731742eb3ca8317b37397}{MODBUS\+\_\+\+USEROBJECT\+\_\+0\+\_\+\+NAME}}~"{}"{}
\begin{DoxyCompactList}\small\item\em Строка пользовательского идентификатора 0. По аналогии можно определить строки до \texorpdfstring{$<$}{<}=128 USEROBJECT. \end{DoxyCompactList}\item
\#define \mbox{\hyperlink{group___m_o_d_b_u_s___c_o_n_f_i_g_s_ga370986118b8227cb6cb33c6b748fbbcb}{mb\+\_\+huart}}~huart1
\begin{DoxyCompactList}\small\item\em Удобный дефайн для модбасовского uart. \end{DoxyCompactList}\item
\#define \mbox{\hyperlink{group___m_o_d_b_u_s___c_o_n_f_i_g_s_ga6723a1608946a4f86cd7c9c7e614d04e}{mb\+\_\+htim}}~htim3
\begin{DoxyCompactList}\small\item\em Удобный дефайн для модбасовского таймера \end{DoxyCompactList}\item
\#define \mbox{\hyperlink{group___m_o_d_b_u_s___c_o_n_f_i_g_s_gae11f9ed7ca5e75d332a1187d2a213f9c}{MODBUS\+\_\+\+ENABLE\+\_\+\+SLAVE}}
\begin{DoxyCompactList}\small\item\em Включить обработку СЛЕЙВ режима \end{DoxyCompactList}\item
\#define \mbox{\hyperlink{group___m_o_d_b_u_s___c_o_n_f_i_g_s_gae4fc30421556e1ee530f13a4b3924f5a}{MODBUS\+\_\+\+ENABLE\+\_\+\+MASTER}}
\begin{DoxyCompactList}\small\item\em Включить обработку МАСТЕР режима \end{DoxyCompactList}\item
\#define \mbox{\hyperlink{group___m_o_d_b_u_s___c_o_n_f_i_g_s_ga29ce22b8b7f0622bc23171c6ae2dc8d1}{MODBUS\+\_\+\+ENABLE\+\_\+\+COILS}}
\begin{DoxyCompactList}\small\item\em Включить обработку коилов \end{DoxyCompactList}\item
\#define \mbox{\hyperlink{group___m_o_d_b_u_s___c_o_n_f_i_g_s_gaf6a8dfc090b3915d668d78ee19585344}{MODBUS\+\_\+\+ENABLE\+\_\+\+HOLDINGS}}
\begin{DoxyCompactList}\small\item\em Включить обработку регистров хранения \end{DoxyCompactList}\item
\#define \mbox{\hyperlink{group___m_o_d_b_u_s___c_o_n_f_i_g_s_ga23d7073c81bedb80a302140afd0d79c0}{MODBUS\+\_\+\+ENABLE\+\_\+\+INPUTS}}
\begin{DoxyCompactList}\small\item\em Включить обработку входных регистров \end{DoxyCompactList}\item
\#define \mbox{\hyperlink{group___m_o_d_b_u_s___c_o_n_f_i_g_s_ga5bf9f305bd863b10f1b350c5004ddda7}{MODBUS\+\_\+\+ENABLE\+\_\+\+DEVICE\+\_\+\+IDENTIFICATIONS}}
\begin{DoxyCompactList}\small\item\em Включить обработку идентификаторы устройства \end{DoxyCompactList}\item
\#define \mbox{\hyperlink{group___m_o_d_b_u_s___c_o_n_f_i_g_s_gae68222efbcf3199706bfaef46af97bf8}{MODBUS\+\_\+\+ENABLE\+\_\+\+DIAGNOSTICS}}
\begin{DoxyCompactList}\small\item\em Включить обработку диагностики модбас \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsection{Detailed Description}
Конфигурация библиотеки
Файл содержит настройки для работы Modbus\+:
\begin{DoxyItemize}
\item Подключение библиотек контроллера
\item ID устройства и таймауты
\item Строковые идентификаторы (Vendor, Product, Revision)
\item Настройки периферии (UART, TIMER)
\item Подключение модулей Modbus
\item Опциональные функции (переключение команд 0x03/0x04)
\end{DoxyItemize}
\label{doc-define-members}
\Hypertarget{group___m_o_d_b_u_s___c_o_n_f_i_g_s_doc-define-members}
\doxysubsubsection{Macro Definition Documentation}
\Hypertarget{group___m_o_d_b_u_s___c_o_n_f_i_g_s_gab9b18e108b98b225a52c5ccca58e7f2b}\index{Modbus configs@{Modbus configs}!MODBUS\_DEVICE\_ID@{MODBUS\_DEVICE\_ID}}
\index{MODBUS\_DEVICE\_ID@{MODBUS\_DEVICE\_ID}!Modbus configs@{Modbus configs}}
\doxysubsubsubsection{\texorpdfstring{MODBUS\_DEVICE\_ID}{MODBUS\_DEVICE\_ID}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___c_o_n_f_i_g_s_gab9b18e108b98b225a52c5ccca58e7f2b}
\#define MODBUS\+\_\+\+DEVICE\+\_\+\+ID~1}
Адрес устройства в сети Modbus.
Definition at line \mbox{\hyperlink{modbus__config_8h_source_l00025}{25}} of file \mbox{\hyperlink{modbus__config_8h_source}{modbus\+\_\+config.\+h}}.
\Hypertarget{group___m_o_d_b_u_s___c_o_n_f_i_g_s_ga66f7c59a25c8cca6d5b0991895c26b69}\index{Modbus configs@{Modbus configs}!MODBUS\_TIMEOUT@{MODBUS\_TIMEOUT}}
\index{MODBUS\_TIMEOUT@{MODBUS\_TIMEOUT}!Modbus configs@{Modbus configs}}
\doxysubsubsubsection{\texorpdfstring{MODBUS\_TIMEOUT}{MODBUS\_TIMEOUT}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___c_o_n_f_i_g_s_ga66f7c59a25c8cca6d5b0991895c26b69}
\#define MODBUS\+\_\+\+TIMEOUT~5000}
Таймаут в тиках таймера
Definition at line \mbox{\hyperlink{modbus__config_8h_source_l00026}{26}} of file \mbox{\hyperlink{modbus__config_8h_source}{modbus\+\_\+config.\+h}}.
\Hypertarget{group___m_o_d_b_u_s___c_o_n_f_i_g_s_ga0e01f19c79d049b745b28cc708ba0c2f}\index{Modbus configs@{Modbus configs}!MODBUS\_VENDOR\_NAME@{MODBUS\_VENDOR\_NAME}}
\index{MODBUS\_VENDOR\_NAME@{MODBUS\_VENDOR\_NAME}!Modbus configs@{Modbus configs}}
\doxysubsubsubsection{\texorpdfstring{MODBUS\_VENDOR\_NAME}{MODBUS\_VENDOR\_NAME}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___c_o_n_f_i_g_s_ga0e01f19c79d049b745b28cc708ba0c2f}
\#define MODBUS\+\_\+\+VENDOR\+\_\+\+NAME~"{}NIO-\/12"{}}
Definition at line \mbox{\hyperlink{modbus__config_8h_source_l00029}{29}} of file \mbox{\hyperlink{modbus__config_8h_source}{modbus\+\_\+config.\+h}}.
\Hypertarget{group___m_o_d_b_u_s___c_o_n_f_i_g_s_ga6e8dea7833243443899787fd7186ab36}\index{Modbus configs@{Modbus configs}!MODBUS\_PRODUCT\_CODE@{MODBUS\_PRODUCT\_CODE}}
\index{MODBUS\_PRODUCT\_CODE@{MODBUS\_PRODUCT\_CODE}!Modbus configs@{Modbus configs}}
\doxysubsubsubsection{\texorpdfstring{MODBUS\_PRODUCT\_CODE}{MODBUS\_PRODUCT\_CODE}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___c_o_n_f_i_g_s_ga6e8dea7833243443899787fd7186ab36}
\#define MODBUS\+\_\+\+PRODUCT\+\_\+\+CODE~"{}"{}}
Definition at line \mbox{\hyperlink{modbus__config_8h_source_l00030}{30}} of file \mbox{\hyperlink{modbus__config_8h_source}{modbus\+\_\+config.\+h}}.
\Hypertarget{group___m_o_d_b_u_s___c_o_n_f_i_g_s_ga270858b2ee3dc5de6666e05ba0b7044a}\index{Modbus configs@{Modbus configs}!MODBUS\_REVISION@{MODBUS\_REVISION}}
\index{MODBUS\_REVISION@{MODBUS\_REVISION}!Modbus configs@{Modbus configs}}
\doxysubsubsubsection{\texorpdfstring{MODBUS\_REVISION}{MODBUS\_REVISION}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___c_o_n_f_i_g_s_ga270858b2ee3dc5de6666e05ba0b7044a}
\#define MODBUS\+\_\+\+REVISION~"{}"{}}
Definition at line \mbox{\hyperlink{modbus__config_8h_source_l00031}{31}} of file \mbox{\hyperlink{modbus__config_8h_source}{modbus\+\_\+config.\+h}}.
\Hypertarget{group___m_o_d_b_u_s___c_o_n_f_i_g_s_ga0d4f8c7ad821f1e47c06fca438cc2065}\index{Modbus configs@{Modbus configs}!MODBUS\_VENDOR\_URL@{MODBUS\_VENDOR\_URL}}
\index{MODBUS\_VENDOR\_URL@{MODBUS\_VENDOR\_URL}!Modbus configs@{Modbus configs}}
\doxysubsubsubsection{\texorpdfstring{MODBUS\_VENDOR\_URL}{MODBUS\_VENDOR\_URL}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___c_o_n_f_i_g_s_ga0d4f8c7ad821f1e47c06fca438cc2065}
\#define MODBUS\+\_\+\+VENDOR\+\_\+\+URL~"{}"{}}
Definition at line \mbox{\hyperlink{modbus__config_8h_source_l00032}{32}} of file \mbox{\hyperlink{modbus__config_8h_source}{modbus\+\_\+config.\+h}}.
\Hypertarget{group___m_o_d_b_u_s___c_o_n_f_i_g_s_ga272ac8bc7eb92d40e731954cc627e28b}\index{Modbus configs@{Modbus configs}!MODBUS\_PRODUCT\_NAME@{MODBUS\_PRODUCT\_NAME}}
\index{MODBUS\_PRODUCT\_NAME@{MODBUS\_PRODUCT\_NAME}!Modbus configs@{Modbus configs}}
\doxysubsubsubsection{\texorpdfstring{MODBUS\_PRODUCT\_NAME}{MODBUS\_PRODUCT\_NAME}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___c_o_n_f_i_g_s_ga272ac8bc7eb92d40e731954cc627e28b}
\#define MODBUS\+\_\+\+PRODUCT\+\_\+\+NAME~"{}"{}}
Definition at line \mbox{\hyperlink{modbus__config_8h_source_l00033}{33}} of file \mbox{\hyperlink{modbus__config_8h_source}{modbus\+\_\+config.\+h}}.
\Hypertarget{group___m_o_d_b_u_s___c_o_n_f_i_g_s_ga94dff4b6008db9de88a18f80507b745c}\index{Modbus configs@{Modbus configs}!MODBUS\_MODEL\_NAME@{MODBUS\_MODEL\_NAME}}
\index{MODBUS\_MODEL\_NAME@{MODBUS\_MODEL\_NAME}!Modbus configs@{Modbus configs}}
\doxysubsubsubsection{\texorpdfstring{MODBUS\_MODEL\_NAME}{MODBUS\_MODEL\_NAME}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___c_o_n_f_i_g_s_ga94dff4b6008db9de88a18f80507b745c}
\#define MODBUS\+\_\+\+MODEL\+\_\+\+NAME~"{}"{}}
Definition at line \mbox{\hyperlink{modbus__config_8h_source_l00034}{34}} of file \mbox{\hyperlink{modbus__config_8h_source}{modbus\+\_\+config.\+h}}.
\Hypertarget{group___m_o_d_b_u_s___c_o_n_f_i_g_s_ga197c776ad1235d5f4fa17318e60628a9}\index{Modbus configs@{Modbus configs}!MODBUS\_USER\_APPLICATION\_NAME@{MODBUS\_USER\_APPLICATION\_NAME}}
\index{MODBUS\_USER\_APPLICATION\_NAME@{MODBUS\_USER\_APPLICATION\_NAME}!Modbus configs@{Modbus configs}}
\doxysubsubsubsection{\texorpdfstring{MODBUS\_USER\_APPLICATION\_NAME}{MODBUS\_USER\_APPLICATION\_NAME}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___c_o_n_f_i_g_s_ga197c776ad1235d5f4fa17318e60628a9}
\#define MODBUS\+\_\+\+USER\+\_\+\+APPLICATION\+\_\+\+NAME~"{}"{}}
Definition at line \mbox{\hyperlink{modbus__config_8h_source_l00035}{35}} of file \mbox{\hyperlink{modbus__config_8h_source}{modbus\+\_\+config.\+h}}.
\Hypertarget{group___m_o_d_b_u_s___c_o_n_f_i_g_s_ga5c7e9c2180ceac1208f4b791d7b70a0a}\index{Modbus configs@{Modbus configs}!MODBUS\_NUMB\_OF\_USEROBJECTS@{MODBUS\_NUMB\_OF\_USEROBJECTS}}
\index{MODBUS\_NUMB\_OF\_USEROBJECTS@{MODBUS\_NUMB\_OF\_USEROBJECTS}!Modbus configs@{Modbus configs}}
\doxysubsubsubsection{\texorpdfstring{MODBUS\_NUMB\_OF\_USEROBJECTS}{MODBUS\_NUMB\_OF\_USEROBJECTS}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___c_o_n_f_i_g_s_ga5c7e9c2180ceac1208f4b791d7b70a0a}
\#define MODBUS\+\_\+\+NUMB\+\_\+\+OF\+\_\+\+USEROBJECTS~0}
Количество пользовательских объектов
Definition at line \mbox{\hyperlink{modbus__config_8h_source_l00037}{37}} of file \mbox{\hyperlink{modbus__config_8h_source}{modbus\+\_\+config.\+h}}.
\Hypertarget{group___m_o_d_b_u_s___c_o_n_f_i_g_s_gac3b162e9af2731742eb3ca8317b37397}\index{Modbus configs@{Modbus configs}!MODBUS\_USEROBJECT\_0\_NAME@{MODBUS\_USEROBJECT\_0\_NAME}}
\index{MODBUS\_USEROBJECT\_0\_NAME@{MODBUS\_USEROBJECT\_0\_NAME}!Modbus configs@{Modbus configs}}
\doxysubsubsubsection{\texorpdfstring{MODBUS\_USEROBJECT\_0\_NAME}{MODBUS\_USEROBJECT\_0\_NAME}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___c_o_n_f_i_g_s_gac3b162e9af2731742eb3ca8317b37397}
\#define MODBUS\+\_\+\+USEROBJECT\+\_\+0\+\_\+\+NAME~"{}"{}}
Строка пользовательского идентификатора 0. По аналогии можно определить строки до \texorpdfstring{$<$}{<}=128 USEROBJECT.
Definition at line \mbox{\hyperlink{modbus__config_8h_source_l00038}{38}} of file \mbox{\hyperlink{modbus__config_8h_source}{modbus\+\_\+config.\+h}}.
\Hypertarget{group___m_o_d_b_u_s___c_o_n_f_i_g_s_ga370986118b8227cb6cb33c6b748fbbcb}\index{Modbus configs@{Modbus configs}!mb\_huart@{mb\_huart}}
\index{mb\_huart@{mb\_huart}!Modbus configs@{Modbus configs}}
\doxysubsubsubsection{\texorpdfstring{mb\_huart}{mb\_huart}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___c_o_n_f_i_g_s_ga370986118b8227cb6cb33c6b748fbbcb}
\#define mb\+\_\+huart~huart1}
Удобный дефайн для модбасовского uart.
Definition at line \mbox{\hyperlink{modbus__config_8h_source_l00041}{41}} of file \mbox{\hyperlink{modbus__config_8h_source}{modbus\+\_\+config.\+h}}.
\Hypertarget{group___m_o_d_b_u_s___c_o_n_f_i_g_s_ga6723a1608946a4f86cd7c9c7e614d04e}\index{Modbus configs@{Modbus configs}!mb\_htim@{mb\_htim}}
\index{mb\_htim@{mb\_htim}!Modbus configs@{Modbus configs}}
\doxysubsubsubsection{\texorpdfstring{mb\_htim}{mb\_htim}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___c_o_n_f_i_g_s_ga6723a1608946a4f86cd7c9c7e614d04e}
\#define mb\+\_\+htim~htim3}
Удобный дефайн для модбасовского таймера
Definition at line \mbox{\hyperlink{modbus__config_8h_source_l00042}{42}} of file \mbox{\hyperlink{modbus__config_8h_source}{modbus\+\_\+config.\+h}}.
\Hypertarget{group___m_o_d_b_u_s___c_o_n_f_i_g_s_gae11f9ed7ca5e75d332a1187d2a213f9c}\index{Modbus configs@{Modbus configs}!MODBUS\_ENABLE\_SLAVE@{MODBUS\_ENABLE\_SLAVE}}
\index{MODBUS\_ENABLE\_SLAVE@{MODBUS\_ENABLE\_SLAVE}!Modbus configs@{Modbus configs}}
\doxysubsubsubsection{\texorpdfstring{MODBUS\_ENABLE\_SLAVE}{MODBUS\_ENABLE\_SLAVE}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___c_o_n_f_i_g_s_gae11f9ed7ca5e75d332a1187d2a213f9c}
\#define MODBUS\+\_\+\+ENABLE\+\_\+\+SLAVE}
Включить обработку СЛЕЙВ режима
Definition at line \mbox{\hyperlink{modbus__config_8h_source_l00048}{48}} of file \mbox{\hyperlink{modbus__config_8h_source}{modbus\+\_\+config.\+h}}.
\Hypertarget{group___m_o_d_b_u_s___c_o_n_f_i_g_s_gae4fc30421556e1ee530f13a4b3924f5a}\index{Modbus configs@{Modbus configs}!MODBUS\_ENABLE\_MASTER@{MODBUS\_ENABLE\_MASTER}}
\index{MODBUS\_ENABLE\_MASTER@{MODBUS\_ENABLE\_MASTER}!Modbus configs@{Modbus configs}}
\doxysubsubsubsection{\texorpdfstring{MODBUS\_ENABLE\_MASTER}{MODBUS\_ENABLE\_MASTER}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___c_o_n_f_i_g_s_gae4fc30421556e1ee530f13a4b3924f5a}
\#define MODBUS\+\_\+\+ENABLE\+\_\+\+MASTER}
Включить обработку МАСТЕР режима
Definition at line \mbox{\hyperlink{modbus__config_8h_source_l00049}{49}} of file \mbox{\hyperlink{modbus__config_8h_source}{modbus\+\_\+config.\+h}}.
\Hypertarget{group___m_o_d_b_u_s___c_o_n_f_i_g_s_ga29ce22b8b7f0622bc23171c6ae2dc8d1}\index{Modbus configs@{Modbus configs}!MODBUS\_ENABLE\_COILS@{MODBUS\_ENABLE\_COILS}}
\index{MODBUS\_ENABLE\_COILS@{MODBUS\_ENABLE\_COILS}!Modbus configs@{Modbus configs}}
\doxysubsubsubsection{\texorpdfstring{MODBUS\_ENABLE\_COILS}{MODBUS\_ENABLE\_COILS}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___c_o_n_f_i_g_s_ga29ce22b8b7f0622bc23171c6ae2dc8d1}
\#define MODBUS\+\_\+\+ENABLE\+\_\+\+COILS}
Включить обработку коилов
Definition at line \mbox{\hyperlink{modbus__config_8h_source_l00051}{51}} of file \mbox{\hyperlink{modbus__config_8h_source}{modbus\+\_\+config.\+h}}.
\Hypertarget{group___m_o_d_b_u_s___c_o_n_f_i_g_s_gaf6a8dfc090b3915d668d78ee19585344}\index{Modbus configs@{Modbus configs}!MODBUS\_ENABLE\_HOLDINGS@{MODBUS\_ENABLE\_HOLDINGS}}
\index{MODBUS\_ENABLE\_HOLDINGS@{MODBUS\_ENABLE\_HOLDINGS}!Modbus configs@{Modbus configs}}
\doxysubsubsubsection{\texorpdfstring{MODBUS\_ENABLE\_HOLDINGS}{MODBUS\_ENABLE\_HOLDINGS}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___c_o_n_f_i_g_s_gaf6a8dfc090b3915d668d78ee19585344}
\#define MODBUS\+\_\+\+ENABLE\+\_\+\+HOLDINGS}
Включить обработку регистров хранения
Definition at line \mbox{\hyperlink{modbus__config_8h_source_l00052}{52}} of file \mbox{\hyperlink{modbus__config_8h_source}{modbus\+\_\+config.\+h}}.
\Hypertarget{group___m_o_d_b_u_s___c_o_n_f_i_g_s_ga23d7073c81bedb80a302140afd0d79c0}\index{Modbus configs@{Modbus configs}!MODBUS\_ENABLE\_INPUTS@{MODBUS\_ENABLE\_INPUTS}}
\index{MODBUS\_ENABLE\_INPUTS@{MODBUS\_ENABLE\_INPUTS}!Modbus configs@{Modbus configs}}
\doxysubsubsubsection{\texorpdfstring{MODBUS\_ENABLE\_INPUTS}{MODBUS\_ENABLE\_INPUTS}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___c_o_n_f_i_g_s_ga23d7073c81bedb80a302140afd0d79c0}
\#define MODBUS\+\_\+\+ENABLE\+\_\+\+INPUTS}
Включить обработку входных регистров
Definition at line \mbox{\hyperlink{modbus__config_8h_source_l00053}{53}} of file \mbox{\hyperlink{modbus__config_8h_source}{modbus\+\_\+config.\+h}}.
\Hypertarget{group___m_o_d_b_u_s___c_o_n_f_i_g_s_ga5bf9f305bd863b10f1b350c5004ddda7}\index{Modbus configs@{Modbus configs}!MODBUS\_ENABLE\_DEVICE\_IDENTIFICATIONS@{MODBUS\_ENABLE\_DEVICE\_IDENTIFICATIONS}}
\index{MODBUS\_ENABLE\_DEVICE\_IDENTIFICATIONS@{MODBUS\_ENABLE\_DEVICE\_IDENTIFICATIONS}!Modbus configs@{Modbus configs}}
\doxysubsubsubsection{\texorpdfstring{MODBUS\_ENABLE\_DEVICE\_IDENTIFICATIONS}{MODBUS\_ENABLE\_DEVICE\_IDENTIFICATIONS}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___c_o_n_f_i_g_s_ga5bf9f305bd863b10f1b350c5004ddda7}
\#define MODBUS\+\_\+\+ENABLE\+\_\+\+DEVICE\+\_\+\+IDENTIFICATIONS}
Включить обработку идентификаторы устройства
Definition at line \mbox{\hyperlink{modbus__config_8h_source_l00054}{54}} of file \mbox{\hyperlink{modbus__config_8h_source}{modbus\+\_\+config.\+h}}.
\Hypertarget{group___m_o_d_b_u_s___c_o_n_f_i_g_s_gae68222efbcf3199706bfaef46af97bf8}\index{Modbus configs@{Modbus configs}!MODBUS\_ENABLE\_DIAGNOSTICS@{MODBUS\_ENABLE\_DIAGNOSTICS}}
\index{MODBUS\_ENABLE\_DIAGNOSTICS@{MODBUS\_ENABLE\_DIAGNOSTICS}!Modbus configs@{Modbus configs}}
\doxysubsubsubsection{\texorpdfstring{MODBUS\_ENABLE\_DIAGNOSTICS}{MODBUS\_ENABLE\_DIAGNOSTICS}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___c_o_n_f_i_g_s_gae68222efbcf3199706bfaef46af97bf8}
\#define MODBUS\+\_\+\+ENABLE\+\_\+\+DIAGNOSTICS}
Включить обработку диагностики модбас
Definition at line \mbox{\hyperlink{modbus__config_8h_source_l00055}{55}} of file \mbox{\hyperlink{modbus__config_8h_source}{modbus\+\_\+config.\+h}}.

View File

@@ -0,0 +1 @@
61c9835afeea22bde934d75b01e2746f

View File

@@ -0,0 +1,80 @@
\doxysubsection{Modbus Registers Map }
\hypertarget{group___m_o_d_b_u_s___d_a_t_a}{}\label{group___m_o_d_b_u_s___d_a_t_a}\index{Modbus Registers Map@{Modbus Registers Map}}
Определение карты регистров и коилов
Collaboration diagram for Modbus Registers Map\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{group___m_o_d_b_u_s___d_a_t_a}
\end{center}
\end{figure}
\doxysubsubsubsection*{Topics}
\begin{DoxyCompactItemize}
\item
\mbox{\hyperlink{group___m_o_d_b_u_s___d_a_t_a___r_e_r_i_s_t_e_r_s___d_e_f_i_n_e_s}{Registers structures}}
\begin{DoxyCompactList}\small\item\em Стуруктура регистров (входных и хранения) \end{DoxyCompactList}\item
\mbox{\hyperlink{group___m_o_d_b_u_s___d_a_t_a___c_o_i_l_s___d_e_f_i_n_e_s}{Coils Structure}}
\begin{DoxyCompactList}\small\item\em Структура коилов \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsubsection*{Classes}
\begin{DoxyCompactItemize}
\item
struct \mbox{\hyperlink{struct_m_b___data_structure_type_def}{MB\+\_\+\+Data\+Structure\+Type\+Def}}
\begin{DoxyCompactList}\small\item\em Структура со всеми регистрами и коилами модбас \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsection{Detailed Description}
Определение карты регистров и коилов
Файл содержит объявления структур данных, доступных через Modbus\+:
\begin{DoxyItemize}
\item Holding Registers (R/W) -\/ регистры хранения
\item Input Registers (R/O) -\/ входные регистры ~\newline
\item Coils (R/W) -\/ дискретные выходы
\end{DoxyItemize}\hypertarget{group___m_o_d_b_u_s___d_a_t_a_datinit}{}\doxysubsubsection{\texorpdfstring{Базовая настройка под устройство\+:}{Базовая настройка под устройство\+:}}\label{group___m_o_d_b_u_s___d_a_t_a_datinit}
\begin{DoxyEnumerate}
\item Настроить диапазоны адресов
\begin{DoxyItemize}
\item \doxylink{modbus__data_8h_a22bd1273e01d32f90a279b517d1737b6}{R\+\_\+\+INPUT\+\_\+\+ADDR} и \doxylink{modbus__data_8h_a97c0b1e20498bca34f6dfe0ac0d97b30}{R\+\_\+\+INPUT\+\_\+\+QNT} для входных регистров
\item \doxylink{modbus__data_8h_a791dfd31cc06338acdd8a2eb3b7032e6}{R\+\_\+\+HOLDING\+\_\+\+ADDR} и \doxylink{modbus__data_8h_acf40437374a3227e661db1a18bcef7d7}{R\+\_\+\+HOLDING\+\_\+\+QNT} для регистров хр анения
\item \doxylink{modbus__data_8h_a5057c379abcae88db30ad094eceb952d}{C\+\_\+\+COILS\+\_\+\+ADDR} и \doxylink{modbus__data_8h_a5057c379abcae88db30ad094eceb952d}{C\+\_\+\+COILS\+\_\+\+ADDR} для коилов
\end{DoxyItemize}
\item Настроить структуры данных\+:
\begin{DoxyItemize}
\item \doxylink{struct_m_b___data_in_regs_type_def}{MB\+\_\+\+Data\+In\+Regs\+Type\+Def}
\item \doxylink{struct_m_b___data_hold_regs_type_def}{MB\+\_\+\+Data\+Hold\+Regs\+Type\+Def}
\item \doxylink{struct_m_b___data_coils_type_def}{MB\+\_\+\+Data\+Coils\+Type\+Def}
\end{DoxyItemize}
\end{DoxyEnumerate}\hypertarget{group___m_o_d_b_u_s___d_a_t_a_datexpert}{}\doxysubsubsection{\texorpdfstring{Расширенная настройка под устройство\+:}{Расширенная настройка под устройство\+:}}\label{group___m_o_d_b_u_s___d_a_t_a_datexpert}
\begin{DoxyEnumerate}
\item Добавить новый массив с нужными данными.
\item Добавить дефайны для определения его начального адреса и количества элементов
\item Добавить проверку адресов в MB\+\_\+\+Define\+Registers\+Address/\+MB\+\_\+\+Define\+Coils\+Address.
Пример\+:
\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{preprocessor}{\#define\ \ \ R\_USER\_ADDR\ \ \ \ \ \ \ \ 555}}
\DoxyCodeLine{\textcolor{preprocessor}{\#define\ \ \ R\_USER\_QNT\ \ \ \ \ \ \ \ \ 16}}
\DoxyCodeLine{uint16\_t\ \ user\_regs[16];}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{comment}{//...}}
\DoxyCodeLine{\textcolor{keywordflow}{else}\ \textcolor{keywordflow}{if}(\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_ga278ca9791c69aef8adeb9e7c4b273c50}{MB\_Check\_Address\_For\_Arr}}(Addr,\ Qnt,\ R\_USER\_ADDR,\ R\_USER\_QNT)\ ==\ \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}})}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ *pRegs\ =\ \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}}(\&user\_regs,\ Addr-\/R\_USER\_ADDR);\ \textcolor{comment}{//\ ВАЖНО!}}
\DoxyCodeLine{\ \ \textcolor{comment}{//\ -\/R\_USER\_ADDR\ нужен\ чтобы\ взять\ адрес\ относительно\ начала\ массива}}
\DoxyCodeLine{\}}
\DoxyCodeLine{\textcolor{keywordflow}{else}\ \ }
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \textcolor{keywordflow}{return}\ \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}};}
\DoxyCodeLine{\}}
\end{DoxyCode}
\end{DoxyEnumerate}\input{group___m_o_d_b_u_s___d_a_t_a___r_e_r_i_s_t_e_r_s___d_e_f_i_n_e_s}
\input{group___m_o_d_b_u_s___d_a_t_a___c_o_i_l_s___d_e_f_i_n_e_s}

View File

@@ -0,0 +1 @@
267e24e8cddb8bf32b8b2ec633d10e2d

View File

@@ -0,0 +1,530 @@
\doxysubsubsection{API for Data Access }
\hypertarget{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}{}\label{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}\index{API for Data Access@{API for Data Access}}
API для доступа к данным модбас внутри программы
Collaboration diagram for API for Data Access\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=330pt]{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}
\end{center}
\end{figure}
\doxysubsubsubsubsection*{Macros}
\begin{DoxyCompactItemize}
\item
\#define \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_ga0f8474120df77dc5f334d60d6a5f6f8f}{MB\+\_\+\+Coil\+\_\+\+Read\+\_\+\+Local}}(\+\_\+parr\+\_\+, \+\_\+coil\+\_\+)
\begin{DoxyCompactList}\small\item\em Считать коил по локальному адресу. \end{DoxyCompactList}\item
\#define \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_ga635a6c4fbce49bd1e6797642b36dae7e}{MB\+\_\+\+Coil\+\_\+\+Set\+\_\+\+Local}}(\+\_\+parr\+\_\+, \+\_\+coil\+\_\+)
\begin{DoxyCompactList}\small\item\em Выставить коил по локальному адресу. \end{DoxyCompactList}\item
\#define \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_gabc4efb5e2a6aaa021ef5fe6c69476927}{MB\+\_\+\+Coil\+\_\+\+Reset\+\_\+\+Local}}(\+\_\+parr\+\_\+, \+\_\+coil\+\_\+)
\begin{DoxyCompactList}\small\item\em Сбросить коил по локальному адресу. \end{DoxyCompactList}\item
\#define \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_gac5f409526055c3d98458ada3d3ab630c}{MB\+\_\+\+Coil\+\_\+\+Toogle\+\_\+\+Local}}(\+\_\+parr\+\_\+, \+\_\+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___d_a_t_a___a_c_c_e_s_s___f_u_n_c_t_i_o_n_s_ga8ccf569b78a17a10ac7c80d52730753a}{MB\+\_\+\+Coils\+Op\+Type\+Def}} \{ {\bfseries SET\+\_\+\+COIL}
, {\bfseries RESET\+\_\+\+COIL}
, {\bfseries TOOGLE\+\_\+\+COIL}
\}
\begin{DoxyCompactList}\small\item\em Enum for coils operation. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsubsubsection*{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_gae9b8595911d93cfbf8597f3356a494cc}{MB\+\_\+\+Coil\+\_\+\+Write\+\_\+\+Global}} (uint16\+\_\+t Addr, \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_ga8ccf569b78a17a10ac7c80d52730753a}{MB\+\_\+\+Coils\+Op\+Type\+Def}} 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_ga82334048256e266170a4b3373be59b59}{MB\+\_\+\+Coil\+\_\+\+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
int \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_gab1237f28e2db2cd2e8a93b31cd9a61be}{MB\+\_\+\+Diagnostics\+\_\+\+Write\+Bit}} (int bit\+\_\+num, int bit\+\_\+state)
\begin{DoxyCompactList}\small\item\em Выставить бит в регистре диагностике \end{DoxyCompactList}\item
int \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_ga5588ddb15ee2580e7659701e5e671e8f}{MB\+\_\+\+Diagnostics\+\_\+\+Get\+Bit}} (int bit\+\_\+num)
\begin{DoxyCompactList}\small\item\em Прочитать состояние бита диагностического регистра \end{DoxyCompactList}\item
\mbox{\hyperlink{group___m_o_d_b_u_s___d_i_a_g_ga9d139168bb88bfa1ba1597eeff9ebf6a}{MB\+\_\+\+Device\+Mode\+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_gae7b613f24e9e3d9d95a789c404a3a485}{MB\+\_\+\+Get\+Device\+Mode}} (void)
\begin{DoxyCompactList}\small\item\em Получение текущего режима устройства \end{DoxyCompactList}\item
void \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_gae379458fa9cea50d5e313a68e716cb83}{MB\+\_\+\+Diagnostics\+\_\+\+Bus\+Message\+Cnt}} (void)
\begin{DoxyCompactList}\small\item\em Увеличивает счетчик сообщений на шине \end{DoxyCompactList}\item
void \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_ga10f9e4dd9f3dda4bb0f66c323d6b29d7}{MB\+\_\+\+Diagnostics\+\_\+\+Communication\+Error\+Cnt}} (void)
\begin{DoxyCompactList}\small\item\em Увеличивает счетчик ошибок связи \end{DoxyCompactList}\item
void \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_ga82e0bf0c4452c25bf3f05a20abb7cc74}{MB\+\_\+\+Diagnostics\+\_\+\+Exception\+Error\+Cnt}} (void)
\begin{DoxyCompactList}\small\item\em Увеличивает счетчик исключений \end{DoxyCompactList}\item
void \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_gaff7c464d7d66399232770bac78b653a4}{MB\+\_\+\+Diagnostics\+\_\+\+Character\+Overrun\+Cnt}} (void)
\begin{DoxyCompactList}\small\item\em Увеличивает счетчик переполнения символов \end{DoxyCompactList}\item
void \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_ga22a48a04ef64f74b5974c4fdb1445936}{MB\+\_\+\+Diagnostics\+\_\+\+Slave\+Message\+Cnt}} (void)
\begin{DoxyCompactList}\small\item\em Увеличивает счетчик отсутствия ответов \end{DoxyCompactList}\item
void \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_gabf80c0e24a0ed3736338218c003d001d}{MB\+\_\+\+Diagnostics\+\_\+\+Slave\+No\+Response\+Cnt}} (void)
\begin{DoxyCompactList}\small\item\em Увеличивает счетчик отсутствия ответов \end{DoxyCompactList}\item
void \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_ga2585ebac184f7fa56059c81419c614b9}{MB\+\_\+\+Diagnostics\+\_\+\+Slave\+NAKCnt}} (void)
\begin{DoxyCompactList}\small\item\em Увеличивает счетчик NAK ответов \end{DoxyCompactList}\item
void \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_ga4baad1102ba3f09cf3cc121b8d548ddb}{MB\+\_\+\+Diagnostics\+\_\+\+Slave\+Busy\+Cnt}} (void)
\begin{DoxyCompactList}\small\item\em Увеличивает счетчик занятости устройства \end{DoxyCompactList}\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_ga8b7134e2fc1b65111d536c5590321b80}{MB\+\_\+\+Holding\+\_\+\+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_ga0198b337d6944329b78c59521baf5738}{MB\+\_\+\+Holding\+\_\+\+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
\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}\end{DoxyCompactItemize}
\doxysubsubsubsection{Detailed Description}
API для доступа к данным модбас внутри программы
\label{doc-define-members}
\Hypertarget{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_doc-define-members}
\doxysubsubsubsection{Macro Definition Documentation}
\Hypertarget{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_ga0f8474120df77dc5f334d60d6a5f6f8f}\index{API for Data Access@{API for Data Access}!MB\_Coil\_Read\_Local@{MB\_Coil\_Read\_Local}}
\index{MB\_Coil\_Read\_Local@{MB\_Coil\_Read\_Local}!API for Data Access@{API for Data Access}}
\doxysubsubsubsubsection{\texorpdfstring{MB\_Coil\_Read\_Local}{MB\_Coil\_Read\_Local}}
{\footnotesize\ttfamily \label{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_ga0f8474120df77dc5f334d60d6a5f6f8f}
\#define MB\+\_\+\+Coil\+\_\+\+Read\+\_\+\+Local(\begin{DoxyParamCaption}\item[{}]{\+\_\+parr\+\_\+}{, }\item[{}]{\+\_\+coil\+\_\+}{}\end{DoxyParamCaption})}
{\bfseries Value\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{((\ \ *\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\_)\ \ \&\ \ \ \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\_)\ )\ >>\ (\_coil\_))}
\end{DoxyCode}
Считать коил по локальному адресу.
\begin{DoxyParams}{Parameters}
{\em \+\_\+parr\+\_\+} & -\/ массив коилов. \\
\hline
{\em \+\_\+coil\+\_\+} & -\/ Номер коила от начала массива {\itshape arr}. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
uint16\+\_\+t Возвращает запрошенный коил на 0м бите.
\end{DoxyReturn}
Позволяет обратиться к коилу по адресу относительно {\itshape arr}.
Definition at line \mbox{\hyperlink{modbus__coils_8h_source_l00071}{71}} of file \mbox{\hyperlink{modbus__coils_8h_source}{modbus\+\_\+coils.\+h}}.
\Hypertarget{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_ga635a6c4fbce49bd1e6797642b36dae7e}\index{API for Data Access@{API for Data Access}!MB\_Coil\_Set\_Local@{MB\_Coil\_Set\_Local}}
\index{MB\_Coil\_Set\_Local@{MB\_Coil\_Set\_Local}!API for Data Access@{API for Data Access}}
\doxysubsubsubsubsection{\texorpdfstring{MB\_Coil\_Set\_Local}{MB\_Coil\_Set\_Local}}
{\footnotesize\ttfamily \label{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_ga635a6c4fbce49bd1e6797642b36dae7e}
\#define MB\+\_\+\+Coil\+\_\+\+Set\+\_\+\+Local(\begin{DoxyParamCaption}\item[{}]{\+\_\+parr\+\_\+}{, }\item[{}]{\+\_\+coil\+\_\+}{}\end{DoxyParamCaption})}
{\bfseries Value\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{*\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\_)\ \ |=\ \ \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\_)}
\end{DoxyCode}
Выставить коил по локальному адресу.
\begin{DoxyParams}{Parameters}
{\em \+\_\+parr\+\_\+} & Указатель на массив коилов. \\
\hline
{\em \+\_\+coil\+\_\+} & -\/ Номер коила от начала массива {\itshape arr}.\\
\hline
\end{DoxyParams}
Позволяет обратиться к коилу по адресу относительно {\itshape arr}.
Definition at line \mbox{\hyperlink{modbus__coils_8h_source_l00079}{79}} of file \mbox{\hyperlink{modbus__coils_8h_source}{modbus\+\_\+coils.\+h}}.
\Hypertarget{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_gabc4efb5e2a6aaa021ef5fe6c69476927}\index{API for Data Access@{API for Data Access}!MB\_Coil\_Reset\_Local@{MB\_Coil\_Reset\_Local}}
\index{MB\_Coil\_Reset\_Local@{MB\_Coil\_Reset\_Local}!API for Data Access@{API for Data Access}}
\doxysubsubsubsubsection{\texorpdfstring{MB\_Coil\_Reset\_Local}{MB\_Coil\_Reset\_Local}}
{\footnotesize\ttfamily \label{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_gabc4efb5e2a6aaa021ef5fe6c69476927}
\#define MB\+\_\+\+Coil\+\_\+\+Reset\+\_\+\+Local(\begin{DoxyParamCaption}\item[{}]{\+\_\+parr\+\_\+}{, }\item[{}]{\+\_\+coil\+\_\+}{}\end{DoxyParamCaption})}
{\bfseries Value\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{*\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\_)\ \ \&=\ \string~(\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\_))}
\end{DoxyCode}
Сбросить коил по локальному адресу.
\begin{DoxyParams}{Parameters}
{\em \+\_\+parr\+\_\+} & Указатель на массив коилов. \\
\hline
{\em \+\_\+coil\+\_\+} & -\/ Номер коила от начала массива {\itshape arr}.\\
\hline
\end{DoxyParams}
Позволяет обратиться к коилу по адресу относительно {\itshape arr}.
Definition at line \mbox{\hyperlink{modbus__coils_8h_source_l00087}{87}} of file \mbox{\hyperlink{modbus__coils_8h_source}{modbus\+\_\+coils.\+h}}.
\Hypertarget{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_gac5f409526055c3d98458ada3d3ab630c}\index{API for Data Access@{API for Data Access}!MB\_Coil\_Toogle\_Local@{MB\_Coil\_Toogle\_Local}}
\index{MB\_Coil\_Toogle\_Local@{MB\_Coil\_Toogle\_Local}!API for Data Access@{API for Data Access}}
\doxysubsubsubsubsection{\texorpdfstring{MB\_Coil\_Toogle\_Local}{MB\_Coil\_Toogle\_Local}}
{\footnotesize\ttfamily \label{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_gac5f409526055c3d98458ada3d3ab630c}
\#define MB\+\_\+\+Coil\+\_\+\+Toogle\+\_\+\+Local(\begin{DoxyParamCaption}\item[{}]{\+\_\+parr\+\_\+}{, }\item[{}]{\+\_\+coil\+\_\+}{}\end{DoxyParamCaption})}
{\bfseries Value\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{*\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\_)\ \ \string^=\ \ \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\_)}
\end{DoxyCode}
Переключить состояние коила по локальному адресу.
\begin{DoxyParams}{Parameters}
{\em \+\_\+parr\+\_\+} & Указатель на массив коилов. \\
\hline
{\em \+\_\+coil\+\_\+} & -\/ Номер коила от начала массива {\itshape arr}.\\
\hline
\end{DoxyParams}
Позволяет обратиться к коилу по адресу относительно {\itshape arr}.
Definition at line \mbox{\hyperlink{modbus__coils_8h_source_l00095}{95}} of file \mbox{\hyperlink{modbus__coils_8h_source}{modbus\+\_\+coils.\+h}}.
\label{doc-enum-members}
\Hypertarget{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_doc-enum-members}
\doxysubsubsubsection{Enumeration Type Documentation}
\Hypertarget{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_ga8ccf569b78a17a10ac7c80d52730753a}\index{API for Data Access@{API for Data Access}!MB\_CoilsOpTypeDef@{MB\_CoilsOpTypeDef}}
\index{MB\_CoilsOpTypeDef@{MB\_CoilsOpTypeDef}!API for Data Access@{API for Data Access}}
\doxysubsubsubsubsection{\texorpdfstring{MB\_CoilsOpTypeDef}{MB\_CoilsOpTypeDef}}
{\footnotesize\ttfamily \label{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_ga8ccf569b78a17a10ac7c80d52730753a}
enum \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_ga8ccf569b78a17a10ac7c80d52730753a}{MB\+\_\+\+Coils\+Op\+Type\+Def}}}
Enum for coils operation.
Definition at line \mbox{\hyperlink{modbus__coils_8h_source_l00056}{56}} of file \mbox{\hyperlink{modbus__coils_8h_source}{modbus\+\_\+coils.\+h}}.
\label{doc-func-members}
\Hypertarget{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_doc-func-members}
\doxysubsubsubsection{Function Documentation}
\Hypertarget{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_gae9b8595911d93cfbf8597f3356a494cc}\index{API for Data Access@{API for Data Access}!MB\_Coil\_Write\_Global@{MB\_Coil\_Write\_Global}}
\index{MB\_Coil\_Write\_Global@{MB\_Coil\_Write\_Global}!API for Data Access@{API for Data Access}}
\doxysubsubsubsubsection{\texorpdfstring{MB\_Coil\_Write\_Global()}{MB\_Coil\_Write\_Global()}}
{\footnotesize\ttfamily \label{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_gae9b8595911d93cfbf8597f3356a494cc}
\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}} MB\+\_\+\+Coil\+\_\+\+Write\+\_\+\+Global (\begin{DoxyParamCaption}\item[{uint16\+\_\+t}]{Addr}{, }\item[{\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_ga8ccf569b78a17a10ac7c80d52730753a}{MB\+\_\+\+Coils\+Op\+Type\+Def}}}]{Write\+Val}{}\end{DoxyParamCaption})}
Выставить/сбросить коил по глобальному адресу.
\begin{DoxyParams}{Parameters}
{\em Addr} & Адрес коила. \\
\hline
{\em Write\+Val} & Что записать в коил\+: 0 или 1. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Exception\+Code Код исключения если коила по адресу не существует, и ET\+\_\+\+NO\+\_\+\+ERRORS если все ок.
\end{DoxyReturn}
Позволяет обратиться к любому коилу по его глобальному адрессу. Вне зависимости от того как коилы размещены в памяти.
Definition at line \mbox{\hyperlink{modbus__coils_8c_source_l00034}{34}} of file \mbox{\hyperlink{modbus__coils_8c_source}{modbus\+\_\+coils.\+c}}.
\Hypertarget{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_ga82334048256e266170a4b3373be59b59}\index{API for Data Access@{API for Data Access}!MB\_Coil\_Read\_Global@{MB\_Coil\_Read\_Global}}
\index{MB\_Coil\_Read\_Global@{MB\_Coil\_Read\_Global}!API for Data Access@{API for Data Access}}
\doxysubsubsubsubsection{\texorpdfstring{MB\_Coil\_Read\_Global()}{MB\_Coil\_Read\_Global()}}
{\footnotesize\ttfamily \label{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_ga82334048256e266170a4b3373be59b59}
uint16\+\_\+t MB\+\_\+\+Coil\+\_\+\+Read\+\_\+\+Global (\begin{DoxyParamCaption}\item[{uint16\+\_\+t}]{Addr}{, }\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}} \texorpdfstring{$\ast$}{*}}]{Exception}{}\end{DoxyParamCaption})}
Считать коил по глобальному адресу.
\begin{DoxyParams}{Parameters}
{\em Addr} & Адрес коила. \\
\hline
{\em Exception} & Указатель на переменную для кода исключения, в случае неудачи при чтении. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
uint16\+\_\+t Возвращает весь регистр с маской на запрошенном коиле.
\end{DoxyReturn}
Позволяет обратиться к любому коилу по его глобальному адрессу. Вне зависимости от того как коилы размещены в памяти.
Definition at line \mbox{\hyperlink{modbus__coils_8c_source_l00074}{74}} of file \mbox{\hyperlink{modbus__coils_8c_source}{modbus\+\_\+coils.\+c}}.
\Hypertarget{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_gab1237f28e2db2cd2e8a93b31cd9a61be}\index{API for Data Access@{API for Data Access}!MB\_Diagnostics\_WriteBit@{MB\_Diagnostics\_WriteBit}}
\index{MB\_Diagnostics\_WriteBit@{MB\_Diagnostics\_WriteBit}!API for Data Access@{API for Data Access}}
\doxysubsubsubsubsection{\texorpdfstring{MB\_Diagnostics\_WriteBit()}{MB\_Diagnostics\_WriteBit()}}
{\footnotesize\ttfamily \label{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_gab1237f28e2db2cd2e8a93b31cd9a61be}
int MB\+\_\+\+Diagnostics\+\_\+\+Write\+Bit (\begin{DoxyParamCaption}\item[{int}]{bit\+\_\+num}{, }\item[{int}]{bit\+\_\+state}{}\end{DoxyParamCaption})}
Выставить бит в регистре диагностике
\begin{DoxyParams}{Parameters}
{\em bit\+\_\+num} & Номер бита для выставления (1-\/15, 0 бит нельзя выставить) \\
\hline
{\em bit\+\_\+state} & Состояние бита для выставления (Выставить/Сбросить) \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\texorpdfstring{$>$}{>}0 -\/ номер выставленного бита, 0 -\/ ошибка
\end{DoxyReturn}
Definition at line \mbox{\hyperlink{modbus__diag_8c_source_l00045}{45}} of file \mbox{\hyperlink{modbus__diag_8c_source}{modbus\+\_\+diag.\+c}}.
\Hypertarget{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_ga5588ddb15ee2580e7659701e5e671e8f}\index{API for Data Access@{API for Data Access}!MB\_Diagnostics\_GetBit@{MB\_Diagnostics\_GetBit}}
\index{MB\_Diagnostics\_GetBit@{MB\_Diagnostics\_GetBit}!API for Data Access@{API for Data Access}}
\doxysubsubsubsubsection{\texorpdfstring{MB\_Diagnostics\_GetBit()}{MB\_Diagnostics\_GetBit()}}
{\footnotesize\ttfamily \label{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_ga5588ddb15ee2580e7659701e5e671e8f}
int MB\+\_\+\+Diagnostics\+\_\+\+Get\+Bit (\begin{DoxyParamCaption}\item[{int}]{bit\+\_\+num}{}\end{DoxyParamCaption})}
Прочитать состояние бита диагностического регистра
\begin{DoxyParams}{Parameters}
{\em bit\+\_\+num} & Номер бита (0-\/15) \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
1 -\/ бит установлен, 0 -\/ бит сброшен или ошибка
\end{DoxyReturn}
Definition at line \mbox{\hyperlink{modbus__diag_8c_source_l00062}{62}} of file \mbox{\hyperlink{modbus__diag_8c_source}{modbus\+\_\+diag.\+c}}.
\Hypertarget{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_gae7b613f24e9e3d9d95a789c404a3a485}\index{API for Data Access@{API for Data Access}!MB\_GetDeviceMode@{MB\_GetDeviceMode}}
\index{MB\_GetDeviceMode@{MB\_GetDeviceMode}!API for Data Access@{API for Data Access}}
\doxysubsubsubsubsection{\texorpdfstring{MB\_GetDeviceMode()}{MB\_GetDeviceMode()}}
{\footnotesize\ttfamily \label{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_gae7b613f24e9e3d9d95a789c404a3a485}
\mbox{\hyperlink{group___m_o_d_b_u_s___d_i_a_g_ga9d139168bb88bfa1ba1597eeff9ebf6a}{MB\+\_\+\+Device\+Mode\+Type\+Def}} MB\+\_\+\+Get\+Device\+Mode (\begin{DoxyParamCaption}\item[{void}]{}{}\end{DoxyParamCaption})}
Получение текущего режима устройства
\begin{DoxyReturn}{Returns}
Текущий режим работы устройства
\end{DoxyReturn}
Definition at line \mbox{\hyperlink{modbus__diag_8c_source_l00291}{291}} of file \mbox{\hyperlink{modbus__diag_8c_source}{modbus\+\_\+diag.\+c}}.
\Hypertarget{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_gae379458fa9cea50d5e313a68e716cb83}\index{API for Data Access@{API for Data Access}!MB\_Diagnostics\_BusMessageCnt@{MB\_Diagnostics\_BusMessageCnt}}
\index{MB\_Diagnostics\_BusMessageCnt@{MB\_Diagnostics\_BusMessageCnt}!API for Data Access@{API for Data Access}}
\doxysubsubsubsubsection{\texorpdfstring{MB\_Diagnostics\_BusMessageCnt()}{MB\_Diagnostics\_BusMessageCnt()}}
{\footnotesize\ttfamily \label{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_gae379458fa9cea50d5e313a68e716cb83}
void MB\+\_\+\+Diagnostics\+\_\+\+Bus\+Message\+Cnt (\begin{DoxyParamCaption}\item[{void}]{}{}\end{DoxyParamCaption})}
Увеличивает счетчик сообщений на шине
Definition at line \mbox{\hyperlink{modbus__diag_8c_source_l00215}{215}} of file \mbox{\hyperlink{modbus__diag_8c_source}{modbus\+\_\+diag.\+c}}.
\Hypertarget{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_ga10f9e4dd9f3dda4bb0f66c323d6b29d7}\index{API for Data Access@{API for Data Access}!MB\_Diagnostics\_CommunicationErrorCnt@{MB\_Diagnostics\_CommunicationErrorCnt}}
\index{MB\_Diagnostics\_CommunicationErrorCnt@{MB\_Diagnostics\_CommunicationErrorCnt}!API for Data Access@{API for Data Access}}
\doxysubsubsubsubsection{\texorpdfstring{MB\_Diagnostics\_CommunicationErrorCnt()}{MB\_Diagnostics\_CommunicationErrorCnt()}}
{\footnotesize\ttfamily \label{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_ga10f9e4dd9f3dda4bb0f66c323d6b29d7}
void MB\+\_\+\+Diagnostics\+\_\+\+Communication\+Error\+Cnt (\begin{DoxyParamCaption}\item[{void}]{}{}\end{DoxyParamCaption})}
Увеличивает счетчик ошибок связи
Definition at line \mbox{\hyperlink{modbus__diag_8c_source_l00223}{223}} of file \mbox{\hyperlink{modbus__diag_8c_source}{modbus\+\_\+diag.\+c}}.
\Hypertarget{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_ga82e0bf0c4452c25bf3f05a20abb7cc74}\index{API for Data Access@{API for Data Access}!MB\_Diagnostics\_ExceptionErrorCnt@{MB\_Diagnostics\_ExceptionErrorCnt}}
\index{MB\_Diagnostics\_ExceptionErrorCnt@{MB\_Diagnostics\_ExceptionErrorCnt}!API for Data Access@{API for Data Access}}
\doxysubsubsubsubsection{\texorpdfstring{MB\_Diagnostics\_ExceptionErrorCnt()}{MB\_Diagnostics\_ExceptionErrorCnt()}}
{\footnotesize\ttfamily \label{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_ga82e0bf0c4452c25bf3f05a20abb7cc74}
void MB\+\_\+\+Diagnostics\+\_\+\+Exception\+Error\+Cnt (\begin{DoxyParamCaption}\item[{void}]{}{}\end{DoxyParamCaption})}
Увеличивает счетчик исключений
Definition at line \mbox{\hyperlink{modbus__diag_8c_source_l00232}{232}} of file \mbox{\hyperlink{modbus__diag_8c_source}{modbus\+\_\+diag.\+c}}.
\Hypertarget{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_gaff7c464d7d66399232770bac78b653a4}\index{API for Data Access@{API for Data Access}!MB\_Diagnostics\_CharacterOverrunCnt@{MB\_Diagnostics\_CharacterOverrunCnt}}
\index{MB\_Diagnostics\_CharacterOverrunCnt@{MB\_Diagnostics\_CharacterOverrunCnt}!API for Data Access@{API for Data Access}}
\doxysubsubsubsubsection{\texorpdfstring{MB\_Diagnostics\_CharacterOverrunCnt()}{MB\_Diagnostics\_CharacterOverrunCnt()}}
{\footnotesize\ttfamily \label{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_gaff7c464d7d66399232770bac78b653a4}
void MB\+\_\+\+Diagnostics\+\_\+\+Character\+Overrun\+Cnt (\begin{DoxyParamCaption}\item[{void}]{}{}\end{DoxyParamCaption})}
Увеличивает счетчик переполнения символов
Definition at line \mbox{\hyperlink{modbus__diag_8c_source_l00241}{241}} of file \mbox{\hyperlink{modbus__diag_8c_source}{modbus\+\_\+diag.\+c}}.
\Hypertarget{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_ga22a48a04ef64f74b5974c4fdb1445936}\index{API for Data Access@{API for Data Access}!MB\_Diagnostics\_SlaveMessageCnt@{MB\_Diagnostics\_SlaveMessageCnt}}
\index{MB\_Diagnostics\_SlaveMessageCnt@{MB\_Diagnostics\_SlaveMessageCnt}!API for Data Access@{API for Data Access}}
\doxysubsubsubsubsection{\texorpdfstring{MB\_Diagnostics\_SlaveMessageCnt()}{MB\_Diagnostics\_SlaveMessageCnt()}}
{\footnotesize\ttfamily \label{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_ga22a48a04ef64f74b5974c4fdb1445936}
void MB\+\_\+\+Diagnostics\+\_\+\+Slave\+Message\+Cnt (\begin{DoxyParamCaption}\item[{void}]{}{}\end{DoxyParamCaption})}
Увеличивает счетчик отсутствия ответов
Definition at line \mbox{\hyperlink{modbus__diag_8c_source_l00254}{254}} of file \mbox{\hyperlink{modbus__diag_8c_source}{modbus\+\_\+diag.\+c}}.
\Hypertarget{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_gabf80c0e24a0ed3736338218c003d001d}\index{API for Data Access@{API for Data Access}!MB\_Diagnostics\_SlaveNoResponseCnt@{MB\_Diagnostics\_SlaveNoResponseCnt}}
\index{MB\_Diagnostics\_SlaveNoResponseCnt@{MB\_Diagnostics\_SlaveNoResponseCnt}!API for Data Access@{API for Data Access}}
\doxysubsubsubsubsection{\texorpdfstring{MB\_Diagnostics\_SlaveNoResponseCnt()}{MB\_Diagnostics\_SlaveNoResponseCnt()}}
{\footnotesize\ttfamily \label{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_gabf80c0e24a0ed3736338218c003d001d}
void MB\+\_\+\+Diagnostics\+\_\+\+Slave\+No\+Response\+Cnt (\begin{DoxyParamCaption}\item[{void}]{}{}\end{DoxyParamCaption})}
Увеличивает счетчик отсутствия ответов
Definition at line \mbox{\hyperlink{modbus__diag_8c_source_l00263}{263}} of file \mbox{\hyperlink{modbus__diag_8c_source}{modbus\+\_\+diag.\+c}}.
\Hypertarget{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_ga2585ebac184f7fa56059c81419c614b9}\index{API for Data Access@{API for Data Access}!MB\_Diagnostics\_SlaveNAKCnt@{MB\_Diagnostics\_SlaveNAKCnt}}
\index{MB\_Diagnostics\_SlaveNAKCnt@{MB\_Diagnostics\_SlaveNAKCnt}!API for Data Access@{API for Data Access}}
\doxysubsubsubsubsection{\texorpdfstring{MB\_Diagnostics\_SlaveNAKCnt()}{MB\_Diagnostics\_SlaveNAKCnt()}}
{\footnotesize\ttfamily \label{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_ga2585ebac184f7fa56059c81419c614b9}
void MB\+\_\+\+Diagnostics\+\_\+\+Slave\+NAKCnt (\begin{DoxyParamCaption}\item[{void}]{}{}\end{DoxyParamCaption})}
Увеличивает счетчик NAK ответов
Definition at line \mbox{\hyperlink{modbus__diag_8c_source_l00272}{272}} of file \mbox{\hyperlink{modbus__diag_8c_source}{modbus\+\_\+diag.\+c}}.
\Hypertarget{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_ga4baad1102ba3f09cf3cc121b8d548ddb}\index{API for Data Access@{API for Data Access}!MB\_Diagnostics\_SlaveBusyCnt@{MB\_Diagnostics\_SlaveBusyCnt}}
\index{MB\_Diagnostics\_SlaveBusyCnt@{MB\_Diagnostics\_SlaveBusyCnt}!API for Data Access@{API for Data Access}}
\doxysubsubsubsubsection{\texorpdfstring{MB\_Diagnostics\_SlaveBusyCnt()}{MB\_Diagnostics\_SlaveBusyCnt()}}
{\footnotesize\ttfamily \label{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_ga4baad1102ba3f09cf3cc121b8d548ddb}
void MB\+\_\+\+Diagnostics\+\_\+\+Slave\+Busy\+Cnt (\begin{DoxyParamCaption}\item[{void}]{}{}\end{DoxyParamCaption})}
Увеличивает счетчик занятости устройства
Definition at line \mbox{\hyperlink{modbus__diag_8c_source_l00281}{281}} of file \mbox{\hyperlink{modbus__diag_8c_source}{modbus\+\_\+diag.\+c}}.
\Hypertarget{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_ga8b7134e2fc1b65111d536c5590321b80}\index{API for Data Access@{API for Data Access}!MB\_Holding\_Write\_Global@{MB\_Holding\_Write\_Global}}
\index{MB\_Holding\_Write\_Global@{MB\_Holding\_Write\_Global}!API for Data Access@{API for Data Access}}
\doxysubsubsubsubsection{\texorpdfstring{MB\_Holding\_Write\_Global()}{MB\_Holding\_Write\_Global()}}
{\footnotesize\ttfamily \label{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_ga8b7134e2fc1b65111d536c5590321b80}
\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}} MB\+\_\+\+Holding\+\_\+\+Write\+\_\+\+Global (\begin{DoxyParamCaption}\item[{uint16\+\_\+t}]{Addr}{, }\item[{uint16\+\_\+t}]{Write\+Val}{}\end{DoxyParamCaption})}
Записать регистр хранения по глобальному адресу.
\begin{DoxyParams}{Parameters}
{\em Addr} & Адрес регистра. \\
\hline
{\em Write\+Val} & Число для записи. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Exception\+Code Код исключения если регистра по адресу не существует, и ET\+\_\+\+NO\+\_\+\+ERRORS если все ок.
\end{DoxyReturn}
Позволяет обратиться к любому регистру по его глобальному адрессу. Вне зависимости от того как регистры размещены в памяти.
Definition at line \mbox{\hyperlink{modbus__holdregs_8c_source_l00036}{36}} of file \mbox{\hyperlink{modbus__holdregs_8c_source}{modbus\+\_\+holdregs.\+c}}.
\Hypertarget{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_ga0198b337d6944329b78c59521baf5738}\index{API for Data Access@{API for Data Access}!MB\_Holding\_Read\_Global@{MB\_Holding\_Read\_Global}}
\index{MB\_Holding\_Read\_Global@{MB\_Holding\_Read\_Global}!API for Data Access@{API for Data Access}}
\doxysubsubsubsubsection{\texorpdfstring{MB\_Holding\_Read\_Global()}{MB\_Holding\_Read\_Global()}}
{\footnotesize\ttfamily \label{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_ga0198b337d6944329b78c59521baf5738}
uint16\+\_\+t MB\+\_\+\+Holding\+\_\+\+Read\+\_\+\+Global (\begin{DoxyParamCaption}\item[{uint16\+\_\+t}]{Addr}{, }\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}} \texorpdfstring{$\ast$}{*}}]{Exception}{}\end{DoxyParamCaption})}
Считать регистр хранения по глобальному адресу.
\begin{DoxyParams}{Parameters}
{\em Addr} & Адрес регистра. \\
\hline
{\em Exception} & Указатель на переменную для кода исключения, в случае неудачи при чтении. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
uint16\+\_\+t Возвращает значение регистра.
\end{DoxyReturn}
Позволяет обратиться к любому регистру по его глобальному адрессу. Вне зависимости от того как регистры размещены в памяти.
Definition at line \mbox{\hyperlink{modbus__holdregs_8c_source_l00061}{61}} of file \mbox{\hyperlink{modbus__holdregs_8c_source}{modbus\+\_\+holdregs.\+c}}.
\Hypertarget{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}\index{API for Data Access@{API for Data Access}!MB\_Input\_Write\_Global@{MB\_Input\_Write\_Global}}
\index{MB\_Input\_Write\_Global@{MB\_Input\_Write\_Global}!API for Data Access@{API for Data Access}}
\doxysubsubsubsubsection{\texorpdfstring{MB\_Input\_Write\_Global()}{MB\_Input\_Write\_Global()}}
{\footnotesize\ttfamily \label{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}
\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}} MB\+\_\+\+Input\+\_\+\+Write\+\_\+\+Global (\begin{DoxyParamCaption}\item[{uint16\+\_\+t}]{Addr}{, }\item[{uint16\+\_\+t}]{Write\+Val}{}\end{DoxyParamCaption})}
Записать входной регистр по глобальному адресу.
\begin{DoxyParams}{Parameters}
{\em Addr} & Адрес регистра. \\
\hline
{\em Write\+Val} & Число для записи. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Exception\+Code Код исключения если регистра по адресу не существует, и ET\+\_\+\+NO\+\_\+\+ERRORS если все ок.
\end{DoxyReturn}
Позволяет обратиться к любому регистру по его глобальному адрессу. Вне зависимости от того как регистры размещены в памяти.
Definition at line \mbox{\hyperlink{modbus__inputregs_8c_source_l00032}{32}} of file \mbox{\hyperlink{modbus__inputregs_8c_source}{modbus\+\_\+inputregs.\+c}}.
\Hypertarget{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}\index{API for Data Access@{API for Data Access}!MB\_Input\_Read\_Global@{MB\_Input\_Read\_Global}}
\index{MB\_Input\_Read\_Global@{MB\_Input\_Read\_Global}!API for Data Access@{API for Data Access}}
\doxysubsubsubsubsection{\texorpdfstring{MB\_Input\_Read\_Global()}{MB\_Input\_Read\_Global()}}
{\footnotesize\ttfamily \label{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}
uint16\+\_\+t MB\+\_\+\+Input\+\_\+\+Read\+\_\+\+Global (\begin{DoxyParamCaption}\item[{uint16\+\_\+t}]{Addr}{, }\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}} \texorpdfstring{$\ast$}{*}}]{Exception}{}\end{DoxyParamCaption})}
Считать входной регистр по глобальному адресу.
\begin{DoxyParams}{Parameters}
{\em Addr} & Адрес регистра. \\
\hline
{\em Exception} & Указатель на переменную для кода исключения, в случае неудачи при чтении. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
uint16\+\_\+t Возвращает значение регистра.
\end{DoxyReturn}
Позволяет обратиться к любому регистру по его глобальному адрессу. Вне зависимости от того как регистры размещены в памяти.
Definition at line \mbox{\hyperlink{modbus__inputregs_8c_source_l00057}{57}} of file \mbox{\hyperlink{modbus__inputregs_8c_source}{modbus\+\_\+inputregs.\+c}}.

View File

@@ -0,0 +1 @@
4d1ce3cd7bbd24ad05d65c90615e896d

View File

@@ -0,0 +1,33 @@
\doxysubsubsection{Coils Structure }
\hypertarget{group___m_o_d_b_u_s___d_a_t_a___c_o_i_l_s___d_e_f_i_n_e_s}{}\label{group___m_o_d_b_u_s___d_a_t_a___c_o_i_l_s___d_e_f_i_n_e_s}\index{Coils Structure@{Coils Structure}}
Структура коилов
Collaboration diagram for Coils Structure\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=315pt]{group___m_o_d_b_u_s___d_a_t_a___c_o_i_l_s___d_e_f_i_n_e_s}
\end{center}
\end{figure}
\doxysubsubsubsubsection*{Classes}
\begin{DoxyCompactItemize}
\item
struct \mbox{\hyperlink{struct_m_b___data_coils_type_def}{MB\+\_\+\+Data\+Coils\+Type\+Def}}
\begin{DoxyCompactList}\small\item\em Коилы \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsubsection{Detailed Description}
Структура коилов
\begin{DoxyCode}{0}
\DoxyCodeLine{Структура\ дефайна}
\DoxyCodeLine{Для\ массивов\ коилов:}
\DoxyCodeLine{\ \ C\_<NAME\_ARRAY>\_ADDR\ \ \ -\/\ модбас\ адресс\ первого\ коила\ в\ массиве}
\DoxyCodeLine{\ \ C\_<NAME\_ARRAY>\_QNT\ \ \ \ -\/\ количество\ коилов\ в\ массиве\ (минимум\ 16)}
\end{DoxyCode}

View File

@@ -0,0 +1 @@
d321a96090790becf038d85695ade05b

View File

@@ -0,0 +1,34 @@
\doxysubsubsection{Registers structures }
\hypertarget{group___m_o_d_b_u_s___d_a_t_a___r_e_r_i_s_t_e_r_s___d_e_f_i_n_e_s}{}\label{group___m_o_d_b_u_s___d_a_t_a___r_e_r_i_s_t_e_r_s___d_e_f_i_n_e_s}\index{Registers structures@{Registers structures}}
Стуруктура регистров (входных и хранения)
Collaboration diagram for Registers structures\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=338pt]{group___m_o_d_b_u_s___d_a_t_a___r_e_r_i_s_t_e_r_s___d_e_f_i_n_e_s}
\end{center}
\end{figure}
\doxysubsubsubsubsection*{Classes}
\begin{DoxyCompactItemize}
\item
struct \mbox{\hyperlink{struct_m_b___data_in_regs_type_def}{MB\+\_\+\+Data\+In\+Regs\+Type\+Def}}
\begin{DoxyCompactList}\small\item\em Регистры хранения \end{DoxyCompactList}\item
struct \mbox{\hyperlink{struct_m_b___data_hold_regs_type_def}{MB\+\_\+\+Data\+Hold\+Regs\+Type\+Def}}
\begin{DoxyCompactList}\small\item\em Входные регистры \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsubsection{Detailed Description}
Стуруктура регистров (входных и хранения)
\begin{DoxyCode}{0}
\DoxyCodeLine{Для\ массивов\ регистров:}
\DoxyCodeLine{\ \ R\_<NAME\_ARRAY>\_ADDR\ \ \ -\/\ \ модбас\ адресс\ первого\ регистра\ в\ массиве}
\DoxyCodeLine{\ \ R\_<NAME\_ARRAY>\_QNT\ \ \ \ -\/\ \ количество\ регистров\ в\ массиве}
\end{DoxyCode}

View File

@@ -0,0 +1 @@
76871839154cae8b0fbbd5c157281dbd

View File

@@ -0,0 +1,197 @@
\doxysubsubsection{Device Identifications Tools }
\hypertarget{group___m_o_d_b_u_s___d_e_v_i_d}{}\label{group___m_o_d_b_u_s___d_e_v_i_d}\index{Device Identifications Tools@{Device Identifications Tools}}
Функции для работы с идентификаторами устройства
Collaboration diagram for Device Identifications Tools\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=338pt]{group___m_o_d_b_u_s___d_e_v_i_d}
\end{center}
\end{figure}
\doxysubsubsubsubsection*{Classes}
\begin{DoxyCompactItemize}
\item
struct \mbox{\hyperlink{struct_m_b___device_object_type_def}{MB\+\_\+\+Device\+Object\+Type\+Def}}
\begin{DoxyCompactList}\small\item\em Структура для объекта (идентификатора устройства модбас) \end{DoxyCompactList}\item
struct \mbox{\hyperlink{struct_m_b___device_identifications_type_def}{MB\+\_\+\+Device\+Identifications\+Type\+Def}}
\begin{DoxyCompactList}\small\item\em Структура со идентификаторами устройства модбас \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsubsubsection*{Macros}
\begin{DoxyCompactItemize}
\item
\#define \mbox{\hyperlink{group___m_o_d_b_u_s___d_e_v_i_d_gaaa2e116d48e6ffb2fa17b4be128930a9}{MODBUS\+\_\+\+DEVICE\+\_\+\+CONFORMITY}}~0x82
\item
\#define \mbox{\hyperlink{group___m_o_d_b_u_s___d_e_v_i_d_gae5e66049f0dc66382999cf52cdeba38e}{MB\+\_\+\+Object\+Init}}(\+\_\+p\+\_\+obj\+\_\+, \+\_\+userstring\+\_\+)
\begin{DoxyCompactList}\small\item\em Инициализация объектов \end{DoxyCompactList}\item
\#define \mbox{\hyperlink{group___m_o_d_b_u_s___d_e_v_i_d_ga090d04bdaee6827a9a620d149efd4978}{MB\+\_\+\+User\+Object\+Init}}(\+\_\+pinfostruct\+\_\+, \+\_\+user\+\_\+numb\+\_\+)
\begin{DoxyCompactList}\small\item\em Инициализация пользовательских объектов \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsubsubsection*{Functions}
\begin{DoxyCompactItemize}
\item
void \mbox{\hyperlink{group___m_o_d_b_u_s___d_e_v_i_d_ga2b93352920bf3c6da0f67cfbaef3d572}{MB\+\_\+\+Device\+Inentification\+Init}} (void)
\begin{DoxyCompactList}\small\item\em Инициализация идентификаторов. \end{DoxyCompactList}\item
void \mbox{\hyperlink{group___m_o_d_b_u_s___d_e_v_i_d_ga7c0638d252c74d0c1ef047ff23e43b3f}{MB\+\_\+\+Write\+Single\+Object\+To\+Message}} (char \texorpdfstring{$\ast$}{*}mbdata, unsigned \texorpdfstring{$\ast$}{*}ind, \mbox{\hyperlink{struct_m_b___device_object_type_def}{MB\+\_\+\+Device\+Object\+Type\+Def}} \texorpdfstring{$\ast$}{*}obj)
\begin{DoxyCompactList}\small\item\em Записать Один Объект Идентификатора в массив данных \end{DoxyCompactList}\item
void \mbox{\hyperlink{group___m_o_d_b_u_s___d_e_v_i_d_gaf864599c95934d63f854a038e3bdccb0}{MB\+\_\+\+Write\+Objects\+To\+Message}} (\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \texorpdfstring{$\ast$}{*}modbus\+\_\+msg, unsigned maxidofobj)
\begin{DoxyCompactList}\small\item\em Записать Массив Объектов Идентификатора в массив данных \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsubsubsection*{Variables}
\begin{DoxyCompactItemize}
\item
\mbox{\hyperlink{struct_m_b___device_identifications_type_def}{MB\+\_\+\+Device\+Identifications\+Type\+Def}} \mbox{\hyperlink{group___m_o_d_b_u_s___d_e_v_i_d_ga0aaf735fcb26fa61af6f7f4895802b90}{MB\+\_\+\+DEVID}}
\begin{DoxyCompactList}\small\item\em Глобальная структура идентификаторов устройства \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsubsection{Detailed Description}
Функции для работы с идентификаторами устройства
Модуль реализации функции Read Device Identifications (0x2B)\+:
\begin{DoxyItemize}
\item Базовая идентификация (Vendor, Product, Revision)
\item Расширенная идентификация (URL, Model, User fields)
\item Поддержка потоковой передачи больших объектов
\end{DoxyItemize}\hypertarget{group___m_o_d_b_u_s___d_e_v_i_d_devobj}{}\doxysubsubsubsection{\texorpdfstring{Объекты идентификации\+:}{Объекты идентификации\+:}}\label{group___m_o_d_b_u_s___d_e_v_i_d_devobj}
\begin{DoxyItemize}
\item Vendor\+Name, Product\+Code, Revision -\/ обязательные
\item Vendor\+Url, Product\+Name, Model\+Name -\/ опциональные
\item User objects -\/ пользовательские поля
\item Поддержка до 128 пользовательских объектов
\end{DoxyItemize}
\label{doc-define-members}
\Hypertarget{group___m_o_d_b_u_s___d_e_v_i_d_doc-define-members}
\doxysubsubsubsection{Macro Definition Documentation}
\Hypertarget{group___m_o_d_b_u_s___d_e_v_i_d_gaaa2e116d48e6ffb2fa17b4be128930a9}\index{Device Identifications Tools@{Device Identifications Tools}!MODBUS\_DEVICE\_CONFORMITY@{MODBUS\_DEVICE\_CONFORMITY}}
\index{MODBUS\_DEVICE\_CONFORMITY@{MODBUS\_DEVICE\_CONFORMITY}!Device Identifications Tools@{Device Identifications Tools}}
\doxysubsubsubsubsection{\texorpdfstring{MODBUS\_DEVICE\_CONFORMITY}{MODBUS\_DEVICE\_CONFORMITY}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___d_e_v_i_d_gaaa2e116d48e6ffb2fa17b4be128930a9}
\#define MODBUS\+\_\+\+DEVICE\+\_\+\+CONFORMITY~0x82}
Definition at line \mbox{\hyperlink{modbus__devid_8h_source_l00038}{38}} of file \mbox{\hyperlink{modbus__devid_8h_source}{modbus\+\_\+devid.\+h}}.
\Hypertarget{group___m_o_d_b_u_s___d_e_v_i_d_gae5e66049f0dc66382999cf52cdeba38e}\index{Device Identifications Tools@{Device Identifications Tools}!MB\_ObjectInit@{MB\_ObjectInit}}
\index{MB\_ObjectInit@{MB\_ObjectInit}!Device Identifications Tools@{Device Identifications Tools}}
\doxysubsubsubsubsection{\texorpdfstring{MB\_ObjectInit}{MB\_ObjectInit}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___d_e_v_i_d_gae5e66049f0dc66382999cf52cdeba38e}
\#define MB\+\_\+\+Object\+Init(\begin{DoxyParamCaption}\item[{}]{\+\_\+p\+\_\+obj\+\_\+}{, }\item[{}]{\+\_\+userstring\+\_\+}{}\end{DoxyParamCaption})}
{\bfseries Value\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{(\_p\_obj\_)-\/>length\ \ =\ \textcolor{keyword}{sizeof}(\_userstring\_);\(\backslash\)}
\DoxyCodeLine{(\_p\_obj\_)-\/>name\ \ \ \ =\ \_userstring\_;}
\end{DoxyCode}
Инициализация объектов
С помозью этого дефайна инициализируются объекты в \doxylink{group___m_o_d_b_u_s___d_e_v_i_d_ga2b93352920bf3c6da0f67cfbaef3d572}{MB\+\_\+\+Device\+Inentification\+Init}
Definition at line \mbox{\hyperlink{modbus__devid_8h_source_l00075}{75}} of file \mbox{\hyperlink{modbus__devid_8h_source}{modbus\+\_\+devid.\+h}}.
\Hypertarget{group___m_o_d_b_u_s___d_e_v_i_d_ga090d04bdaee6827a9a620d149efd4978}\index{Device Identifications Tools@{Device Identifications Tools}!MB\_UserObjectInit@{MB\_UserObjectInit}}
\index{MB\_UserObjectInit@{MB\_UserObjectInit}!Device Identifications Tools@{Device Identifications Tools}}
\doxysubsubsubsubsection{\texorpdfstring{MB\_UserObjectInit}{MB\_UserObjectInit}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___d_e_v_i_d_ga090d04bdaee6827a9a620d149efd4978}
\#define MB\+\_\+\+User\+Object\+Init(\begin{DoxyParamCaption}\item[{}]{\+\_\+pinfostruct\+\_\+}{, }\item[{}]{\+\_\+user\+\_\+numb\+\_\+}{}\end{DoxyParamCaption})}
{\bfseries Value\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{\mbox{\hyperlink{group___m_o_d_b_u_s___d_e_v_i_d_gae5e66049f0dc66382999cf52cdeba38e}{MB\_ObjectInit}}(\&(\_pinfostruct\_)-\/>User[\_user\_numb\_],\ MODBUS\_USEROBJECT\#\#\_user\_numb\_\#\#\_NAME)}
\end{DoxyCode}
Инициализация пользовательских объектов
С помозью этого дефайна инициализируются пользовательские объекты в MB\+\_\+\+Device\+Inentification\+Init
Definition at line \mbox{\hyperlink{modbus__devid_8h_source_l00082}{82}} of file \mbox{\hyperlink{modbus__devid_8h_source}{modbus\+\_\+devid.\+h}}.
\label{doc-func-members}
\Hypertarget{group___m_o_d_b_u_s___d_e_v_i_d_doc-func-members}
\doxysubsubsubsection{Function Documentation}
\Hypertarget{group___m_o_d_b_u_s___d_e_v_i_d_ga2b93352920bf3c6da0f67cfbaef3d572}\index{Device Identifications Tools@{Device Identifications Tools}!MB\_DeviceInentificationInit@{MB\_DeviceInentificationInit}}
\index{MB\_DeviceInentificationInit@{MB\_DeviceInentificationInit}!Device Identifications Tools@{Device Identifications Tools}}
\doxysubsubsubsubsection{\texorpdfstring{MB\_DeviceInentificationInit()}{MB\_DeviceInentificationInit()}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___d_e_v_i_d_ga2b93352920bf3c6da0f67cfbaef3d572}
void MB\+\_\+\+Device\+Inentification\+Init (\begin{DoxyParamCaption}\item[{void}]{}{}\end{DoxyParamCaption})}
Инициализация идентификаторов.
Definition at line \mbox{\hyperlink{modbus__devid_8c_source_l00177}{177}} of file \mbox{\hyperlink{modbus__devid_8c_source}{modbus\+\_\+devid.\+c}}.
\Hypertarget{group___m_o_d_b_u_s___d_e_v_i_d_ga7c0638d252c74d0c1ef047ff23e43b3f}\index{Device Identifications Tools@{Device Identifications Tools}!MB\_WriteSingleObjectToMessage@{MB\_WriteSingleObjectToMessage}}
\index{MB\_WriteSingleObjectToMessage@{MB\_WriteSingleObjectToMessage}!Device Identifications Tools@{Device Identifications Tools}}
\doxysubsubsubsubsection{\texorpdfstring{MB\_WriteSingleObjectToMessage()}{MB\_WriteSingleObjectToMessage()}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___d_e_v_i_d_ga7c0638d252c74d0c1ef047ff23e43b3f}
void MB\+\_\+\+Write\+Single\+Object\+To\+Message (\begin{DoxyParamCaption}\item[{char \texorpdfstring{$\ast$}{*}}]{mbdata}{, }\item[{unsigned \texorpdfstring{$\ast$}{*}}]{ind}{, }\item[{\mbox{\hyperlink{struct_m_b___device_object_type_def}{MB\+\_\+\+Device\+Object\+Type\+Def}} \texorpdfstring{$\ast$}{*}}]{obj}{}\end{DoxyParamCaption})}
Записать Один Объект Идентификатора в массив данных
\begin{DoxyParams}{Parameters}
{\em mbdata} & Указатель на массив данных в структуре \doxylink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
obj Объект для записи.
\end{DoxyReturn}
Definition at line \mbox{\hyperlink{modbus__devid_8c_source_l00031}{31}} of file \mbox{\hyperlink{modbus__devid_8c_source}{modbus\+\_\+devid.\+c}}.
\Hypertarget{group___m_o_d_b_u_s___d_e_v_i_d_gaf864599c95934d63f854a038e3bdccb0}\index{Device Identifications Tools@{Device Identifications Tools}!MB\_WriteObjectsToMessage@{MB\_WriteObjectsToMessage}}
\index{MB\_WriteObjectsToMessage@{MB\_WriteObjectsToMessage}!Device Identifications Tools@{Device Identifications Tools}}
\doxysubsubsubsubsection{\texorpdfstring{MB\_WriteObjectsToMessage()}{MB\_WriteObjectsToMessage()}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___d_e_v_i_d_gaf864599c95934d63f854a038e3bdccb0}
void MB\+\_\+\+Write\+Objects\+To\+Message (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \texorpdfstring{$\ast$}{*}}]{modbus\+\_\+msg}{, }\item[{unsigned}]{maxidofobj}{}\end{DoxyParamCaption})}
Записать Массив Объектов Идентификатора в массив данных
\begin{DoxyParams}{Parameters}
{\em mbdata} & Указатель на массив данных в структуре \doxylink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
obj Объект для записи.
\end{DoxyReturn}
Definition at line \mbox{\hyperlink{modbus__devid_8c_source_l00046}{46}} of file \mbox{\hyperlink{modbus__devid_8c_source}{modbus\+\_\+devid.\+c}}.
\label{doc-var-members}
\Hypertarget{group___m_o_d_b_u_s___d_e_v_i_d_doc-var-members}
\doxysubsubsubsection{Variable Documentation}
\Hypertarget{group___m_o_d_b_u_s___d_e_v_i_d_ga0aaf735fcb26fa61af6f7f4895802b90}\index{Device Identifications Tools@{Device Identifications Tools}!MB\_DEVID@{MB\_DEVID}}
\index{MB\_DEVID@{MB\_DEVID}!Device Identifications Tools@{Device Identifications Tools}}
\doxysubsubsubsubsection{\texorpdfstring{MB\_DEVID}{MB\_DEVID}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___d_e_v_i_d_ga0aaf735fcb26fa61af6f7f4895802b90}
\mbox{\hyperlink{struct_m_b___device_identifications_type_def}{MB\+\_\+\+Device\+Identifications\+Type\+Def}} MB\+\_\+\+DEVID\hspace{0.3cm}{\ttfamily [extern]}}
Глобальная структура идентификаторов устройства
Definition at line \mbox{\hyperlink{modbus__devid_8c_source_l00021}{21}} of file \mbox{\hyperlink{modbus__devid_8c_source}{modbus\+\_\+devid.\+c}}.

View File

@@ -0,0 +1 @@
93d8ecdbae6295dcdba35fcc34fc59b2

View File

@@ -0,0 +1,104 @@
\doxysubsubsection{Diagnostics Tools }
\hypertarget{group___m_o_d_b_u_s___d_i_a_g}{}\label{group___m_o_d_b_u_s___d_i_a_g}\index{Diagnostics Tools@{Diagnostics Tools}}
Функции для работы с диагностикой
Collaboration diagram for Diagnostics Tools\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=321pt]{group___m_o_d_b_u_s___d_i_a_g}
\end{center}
\end{figure}
\doxysubsubsubsubsection*{Classes}
\begin{DoxyCompactItemize}
\item
struct \mbox{\hyperlink{struct_m_b___diagnostics_info_type_def}{MB\+\_\+\+Diagnostics\+Info\+Type\+Def}}
\begin{DoxyCompactList}\small\item\em Структура со диагностической информацией устройства модбас \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsubsubsection*{Enumerations}
\begin{DoxyCompactItemize}
\item
enum \mbox{\hyperlink{group___m_o_d_b_u_s___d_i_a_g_ga9d139168bb88bfa1ba1597eeff9ebf6a}{MB\+\_\+\+Device\+Mode\+Type\+Def}} \{ {\bfseries MODBUS\+\_\+\+NORMAL\+\_\+\+MODE} = 0
, {\bfseries MODBUS\+\_\+\+LISTEN\+\_\+\+ONLY\+\_\+\+MODE} = 1
\}
\begin{DoxyCompactList}\small\item\em Режимы работы устройства \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsubsubsection*{Functions}
\begin{DoxyCompactItemize}
\item
void \mbox{\hyperlink{group___m_o_d_b_u_s___d_i_a_g_ga9b61a6d4139bac318868e93f03cd82c7}{MB\+\_\+\+Diagnostics\+Init}} (void)
\begin{DoxyCompactList}\small\item\em Инициализация диагностических счетчиков \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsubsubsection*{Variables}
\begin{DoxyCompactItemize}
\item
\mbox{\hyperlink{struct_m_b___diagnostics_info_type_def}{MB\+\_\+\+Diagnostics\+Info\+Type\+Def}} \mbox{\hyperlink{group___m_o_d_b_u_s___d_i_a_g_ga4ba6111ac80e342396f9703239323936}{MB\+\_\+\+DIAG}}
\begin{DoxyCompactList}\small\item\em Глобальная структура диагностики \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsubsection{Detailed Description}
Функции для работы с диагностикой
Модуль реализации Diagnostics (Serial Line only) (0x08)\+:
\begin{DoxyItemize}
\item Полная поддержка всех подфункций диагностики
\item Возможность выставить/сбросить любой бит в диагностическом регистре
\item Сбор статистики работы устройства
\item Управление режимами работы
\end{DoxyItemize}
\label{doc-enum-members}
\Hypertarget{group___m_o_d_b_u_s___d_i_a_g_doc-enum-members}
\doxysubsubsubsection{Enumeration Type Documentation}
\Hypertarget{group___m_o_d_b_u_s___d_i_a_g_ga9d139168bb88bfa1ba1597eeff9ebf6a}\index{Diagnostics Tools@{Diagnostics Tools}!MB\_DeviceModeTypeDef@{MB\_DeviceModeTypeDef}}
\index{MB\_DeviceModeTypeDef@{MB\_DeviceModeTypeDef}!Diagnostics Tools@{Diagnostics Tools}}
\doxysubsubsubsubsection{\texorpdfstring{MB\_DeviceModeTypeDef}{MB\_DeviceModeTypeDef}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___d_i_a_g_ga9d139168bb88bfa1ba1597eeff9ebf6a}
enum \mbox{\hyperlink{group___m_o_d_b_u_s___d_i_a_g_ga9d139168bb88bfa1ba1597eeff9ebf6a}{MB\+\_\+\+Device\+Mode\+Type\+Def}}}
Режимы работы устройства
Definition at line \mbox{\hyperlink{modbus__diag_8h_source_l00030}{30}} of file \mbox{\hyperlink{modbus__diag_8h_source}{modbus\+\_\+diag.\+h}}.
\label{doc-func-members}
\Hypertarget{group___m_o_d_b_u_s___d_i_a_g_doc-func-members}
\doxysubsubsubsection{Function Documentation}
\Hypertarget{group___m_o_d_b_u_s___d_i_a_g_ga9b61a6d4139bac318868e93f03cd82c7}\index{Diagnostics Tools@{Diagnostics Tools}!MB\_DiagnosticsInit@{MB\_DiagnosticsInit}}
\index{MB\_DiagnosticsInit@{MB\_DiagnosticsInit}!Diagnostics Tools@{Diagnostics Tools}}
\doxysubsubsubsubsection{\texorpdfstring{MB\_DiagnosticsInit()}{MB\_DiagnosticsInit()}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___d_i_a_g_ga9b61a6d4139bac318868e93f03cd82c7}
void MB\+\_\+\+Diagnostics\+Init (\begin{DoxyParamCaption}\item[{void}]{}{}\end{DoxyParamCaption})}
Инициализация диагностических счетчиков
Definition at line \mbox{\hyperlink{modbus__diag_8c_source_l00022}{22}} of file \mbox{\hyperlink{modbus__diag_8c_source}{modbus\+\_\+diag.\+c}}.
\label{doc-var-members}
\Hypertarget{group___m_o_d_b_u_s___d_i_a_g_doc-var-members}
\doxysubsubsubsection{Variable Documentation}
\Hypertarget{group___m_o_d_b_u_s___d_i_a_g_ga4ba6111ac80e342396f9703239323936}\index{Diagnostics Tools@{Diagnostics Tools}!MB\_DIAG@{MB\_DIAG}}
\index{MB\_DIAG@{MB\_DIAG}!Diagnostics Tools@{Diagnostics Tools}}
\doxysubsubsubsubsection{\texorpdfstring{MB\_DIAG}{MB\_DIAG}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___d_i_a_g_ga4ba6111ac80e342396f9703239323936}
\mbox{\hyperlink{struct_m_b___diagnostics_info_type_def}{MB\+\_\+\+Diagnostics\+Info\+Type\+Def}} MB\+\_\+\+DIAG\hspace{0.3cm}{\ttfamily [extern]}}
Глобальная структура диагностики
Definition at line \mbox{\hyperlink{modbus__diag_8c_source_l00017}{17}} of file \mbox{\hyperlink{modbus__diag_8c_source}{modbus\+\_\+diag.\+c}}.

View File

@@ -0,0 +1 @@
f1d7effffae825b686969ccf459f4110

View File

@@ -0,0 +1,242 @@
\doxysubsection{Main API for Modbus Library }
\hypertarget{group___m_o_d_b_u_s___f_u_n_c_t_i_o_n_s}{}\label{group___m_o_d_b_u_s___f_u_n_c_t_i_o_n_s}\index{Main API for Modbus Library@{Main API for Modbus Library}}
Публичные функции библиотеки
Collaboration diagram for Main API for Modbus Library\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{group___m_o_d_b_u_s___f_u_n_c_t_i_o_n_s}
\end{center}
\end{figure}
\doxysubsubsubsection*{Topics}
\begin{DoxyCompactItemize}
\item
\mbox{\hyperlink{group___m_o_d_b_u_s___l_e_g_a_c_y___a_p_i}{Legacy API}}
\begin{DoxyCompactList}\small\item\em Старые API функций, сохранённые для обратной совместимости. \end{DoxyCompactList}\item
\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}{API for Data Access}}
\begin{DoxyCompactList}\small\item\em API для доступа к данным модбас внутри программы \end{DoxyCompactList}\item
\mbox{\hyperlink{group___m_o_d_b_u_s___r_e_q_u_e_s_t___m_s_g}{API for Master Requests}}
\begin{DoxyCompactList}\small\item\em API для формирования фрейма-\/запроса в режиме мастер \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsubsection*{Macros}
\begin{DoxyCompactItemize}
\item
\#define \mbox{\hyperlink{group___m_o_d_b_u_s___f_u_n_c_t_i_o_n_s_gad91eec9c3350f2705f1bbe1856cb0159}{MODBUS\+\_\+\+MODE\+\_\+\+MASTER}}~1
\begin{DoxyCompactList}\small\item\em Псевдо-\/enum\+: Режим мастер \end{DoxyCompactList}\item
\#define \mbox{\hyperlink{group___m_o_d_b_u_s___f_u_n_c_t_i_o_n_s_gac0b3749af91f1007fd0291157b66b305}{MODBUS\+\_\+\+MODE\+\_\+\+SLAVE}}~0
\begin{DoxyCompactList}\small\item\em Псевдо-\/enum\+: Режим слейв \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsubsection*{Functions}
\begin{DoxyCompactItemize}
\item
HAL\+\_\+\+Status\+Type\+Def \mbox{\hyperlink{group___m_o_d_b_u_s___f_u_n_c_t_i_o_n_s_ga9e787c3454aab3293dec6e6795f687f5}{MODBUS\+\_\+\+First\+Init}} (\mbox{\hyperlink{struct_r_s___handle_type_def}{RS\+\_\+\+Handle\+Type\+Def}} \texorpdfstring{$\ast$}{*}hmodbus, UART\+\_\+\+Handle\+Type\+Def \texorpdfstring{$\ast$}{*}huart, TIM\+\_\+\+Handle\+Type\+Def \texorpdfstring{$\ast$}{*}htim)
\begin{DoxyCompactList}\small\item\em Инициализация периферии модбас. \end{DoxyCompactList}\item
HAL\+\_\+\+Status\+Type\+Def \mbox{\hyperlink{group___m_o_d_b_u_s___f_u_n_c_t_i_o_n_s_ga460466907693a256487d31f09b16edfe}{MODBUS\+\_\+\+Config}} (\mbox{\hyperlink{struct_r_s___handle_type_def}{RS\+\_\+\+Handle\+Type\+Def}} \texorpdfstring{$\ast$}{*}hmodbus, uint8\+\_\+t ID, uint16\+\_\+t Timeout, uint8\+\_\+t master)
\begin{DoxyCompactList}\small\item\em Программная конфигурация модбас. \end{DoxyCompactList}\item
HAL\+\_\+\+Status\+Type\+Def \mbox{\hyperlink{group___m_o_d_b_u_s___f_u_n_c_t_i_o_n_s_ga9a17402983188566254b7096342ba69e}{MODBUS\+\_\+\+Slave\+Start}} (\mbox{\hyperlink{struct_r_s___handle_type_def}{RS\+\_\+\+Handle\+Type\+Def}} \texorpdfstring{$\ast$}{*}hmodbus, \mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \texorpdfstring{$\ast$}{*}modbus\+\_\+msg)
\begin{DoxyCompactList}\small\item\em Запуск слейв модбас. \end{DoxyCompactList}\item
HAL\+\_\+\+Status\+Type\+Def \mbox{\hyperlink{group___m_o_d_b_u_s___f_u_n_c_t_i_o_n_s_ga19090cabfba2345391e37398125a2f55}{MODBUS\+\_\+\+Master\+Request}} (\mbox{\hyperlink{struct_r_s___handle_type_def}{RS\+\_\+\+Handle\+Type\+Def}} \texorpdfstring{$\ast$}{*}hmodbus, \mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \texorpdfstring{$\ast$}{*}modbus\+\_\+msg, void(\texorpdfstring{$\ast$}{*}p\+Clbk)(\mbox{\hyperlink{struct_r_s___handle_type_def}{RS\+\_\+\+Handle\+Type\+Def}} \texorpdfstring{$\ast$}{*}, \mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \texorpdfstring{$\ast$}{*}))
\begin{DoxyCompactList}\small\item\em Реквест мастера модбас. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsection{Detailed Description}
Публичные функции библиотеки
Объединяющий файл для подключения всей функциональности Modbus. Подключает все необходимые модули\+:\hypertarget{group___m_o_d_b_u_s___f_u_n_c_t_i_o_n_s_Start}{}\doxysubsubsection{\texorpdfstring{Инструкция по подключению}{Инструкция по подключению}}\label{group___m_o_d_b_u_s___f_u_n_c_t_i_o_n_s_Start}
Для корректной работы надо\+:
\begin{DoxyItemize}
\item Подключить обработчики \doxylink{group___r_s___t_o_o_l_s_gab27567456df0329130c7fe4fc43c6ee1}{RS\+\_\+\+UART\+\_\+\+Handler()}, \doxylink{group___r_s___t_o_o_l_s_ga2d356b2a0b4af43460bb2cacb81779ce}{RS\+\_\+\+TIM\+\_\+\+Handler()}, в соответствубщие низкоуровневые прерывания UART\+\_\+\+IRQHandler, TIM\+\_\+\+IRQHandler вместо HAL\textquotesingle{}овского обработчика
\item В \doxylink{modbus__config_8h}{modbus\+\_\+config.\+h} настроить дефайны для нужной работы UART
\item Инициализировать хендл мобдас. По умолчанию глобально создается hmodbus1
\item После для запуска Modbus\+:
\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{comment}{//-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/Слейв\ модбас-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\///}}
\DoxyCodeLine{\textcolor{preprocessor}{\#include\ "{}\mbox{\hyperlink{modbus_8h}{modbus.h}}"{}}}
\DoxyCodeLine{}
\DoxyCodeLine{\mbox{\hyperlink{group___m_o_d_b_u_s___f_u_n_c_t_i_o_n_s_ga9e787c3454aab3293dec6e6795f687f5}{MODBUS\_FirstInit}}(\&\mbox{\hyperlink{group___r_s___t_o_o_l_s_gadaef5cb7e494d0fd139199f5b6cbeb86}{hmodbus1}},\ \&huart1,\ \&htim3);}
\DoxyCodeLine{\mbox{\hyperlink{group___m_o_d_b_u_s___f_u_n_c_t_i_o_n_s_ga460466907693a256487d31f09b16edfe}{MODBUS\_Config}}(\&\mbox{\hyperlink{group___r_s___t_o_o_l_s_gadaef5cb7e494d0fd139199f5b6cbeb86}{hmodbus1}},\ \mbox{\hyperlink{group___m_o_d_b_u_s___c_o_n_f_i_g_s_gab9b18e108b98b225a52c5ccca58e7f2b}{MODBUS\_DEVICE\_ID}},\ \mbox{\hyperlink{group___m_o_d_b_u_s___c_o_n_f_i_g_s_ga66f7c59a25c8cca6d5b0991895c26b69}{MODBUS\_TIMEOUT}},\ \mbox{\hyperlink{group___m_o_d_b_u_s___f_u_n_c_t_i_o_n_s_gac0b3749af91f1007fd0291157b66b305}{MODBUS\_MODE\_SLAVE}});}
\DoxyCodeLine{\mbox{\hyperlink{group___m_o_d_b_u_s___f_u_n_c_t_i_o_n_s_ga9a17402983188566254b7096342ba69e}{MODBUS\_SlaveStart}}(\&\mbox{\hyperlink{group___r_s___t_o_o_l_s_gadaef5cb7e494d0fd139199f5b6cbeb86}{hmodbus1}},\ NULL);}
\end{DoxyCode}
\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{comment}{//-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/Мастер\ модбас-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\///}}
\DoxyCodeLine{\textcolor{preprocessor}{\#include\ "{}\mbox{\hyperlink{modbus_8h}{modbus.h}}"{}}}
\DoxyCodeLine{}
\DoxyCodeLine{\mbox{\hyperlink{group___m_o_d_b_u_s___f_u_n_c_t_i_o_n_s_ga9e787c3454aab3293dec6e6795f687f5}{MODBUS\_FirstInit}}(\&\mbox{\hyperlink{group___r_s___t_o_o_l_s_gadaef5cb7e494d0fd139199f5b6cbeb86}{hmodbus1}},\ \&huart1,\ \&htim3);}
\DoxyCodeLine{\mbox{\hyperlink{group___m_o_d_b_u_s___f_u_n_c_t_i_o_n_s_ga460466907693a256487d31f09b16edfe}{MODBUS\_Config}}(\&\mbox{\hyperlink{group___r_s___t_o_o_l_s_gadaef5cb7e494d0fd139199f5b6cbeb86}{hmodbus1}},\ 0,\ \mbox{\hyperlink{group___m_o_d_b_u_s___c_o_n_f_i_g_s_ga66f7c59a25c8cca6d5b0991895c26b69}{MODBUS\_TIMEOUT}},\ \mbox{\hyperlink{group___m_o_d_b_u_s___f_u_n_c_t_i_o_n_s_gad91eec9c3350f2705f1bbe1856cb0159}{MODBUS\_MODE\_MASTER}});}
\DoxyCodeLine{\textcolor{comment}{//\ Запрос\ на\ 1\ ID,\ считать\ холдинг\ регистры\ с\ 0\ адреса\ 10\ штук}}
\DoxyCodeLine{\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\_MsgTypeDef}}\ msg\ =\ \mbox{\hyperlink{group___m_o_d_b_u_s___r_e_q_u_e_s_t___m_s_g_ga4a4798a15608f3aac04150115a628f8e}{MB\_REQUEST\_READ\_HOLDING\_REGS}}(1,\ 0,\ 10);}
\DoxyCodeLine{\mbox{\hyperlink{group___m_o_d_b_u_s___f_u_n_c_t_i_o_n_s_ga19090cabfba2345391e37398125a2f55}{MODBUS\_MasterRequest}}(\&\mbox{\hyperlink{group___r_s___t_o_o_l_s_gadaef5cb7e494d0fd139199f5b6cbeb86}{hmodbus1}},\ \&msg,\ \&callback\_func);}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keywordtype}{void}\ callback\_func(\mbox{\hyperlink{struct_r_s___handle_type_def}{RS\_HandleTypeDef}}\ *hmodbus,\ \mbox{\hyperlink{struct_r_s___msg_type_def}{RS\_MsgTypeDef}}\ *modbus\_msg)\ }
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \textcolor{comment}{//\ MB\_RespGet\_...\ Чтобы\ достать\ нужные\ данные\ из\ ответа}}
\DoxyCodeLine{\ \ \textcolor{keywordflow}{if}(hmodbus-\/>\mbox{\hyperlink{struct_r_s___handle_type_def_a8bbcb263ae7a61790b559bcb55cd9aa9}{RS\_STATUS}}\ ==\ RS\_OK)}
\DoxyCodeLine{\ \ \{}
\DoxyCodeLine{\ \ \ \ \textcolor{keywordflow}{for}(\textcolor{keywordtype}{int}\ addr\ =\ \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}}.Addr;\ addr\ <\ \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}}.Addr\ +\ \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}}.Qnt;\ addr++)}
\DoxyCodeLine{\ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ uint16\_t\ value;}
\DoxyCodeLine{\ \ \ \ \ \ \textcolor{keywordflow}{if}(\mbox{\hyperlink{group___m_o_d_b_u_s___r_e_g_s___a_p_i_ga1f80317087624a23f84224c6f2c1d596}{MB\_RespGet\_RegisterValue}}(\&\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}},\ addr,\ \&value))}
\DoxyCodeLine{\ \ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ read\_hold[i]\ =\ value;}
\DoxyCodeLine{\ \ \ \ \ \ \}}
\DoxyCodeLine{\ \ \ \ \}}
\DoxyCodeLine{\ \ \}}
\DoxyCodeLine{\}}
\end{DoxyCode}
\end{DoxyItemize}\hypertarget{group___m_o_d_b_u_s___f_u_n_c_t_i_o_n_s_modules}{}\doxysubsubsection{\texorpdfstring{Подключаемые модули\+:}{Подключаемые модули\+:}}\label{group___m_o_d_b_u_s___f_u_n_c_t_i_o_n_s_modules}
\begin{DoxyItemize}
\item \doxylink{rs__message_8h}{rs\+\_\+message.\+h} -\/ работа с uart
\item \doxylink{modbus__core_8h}{modbus\+\_\+core.\+h} -\/ базовые определения
\item \doxylink{modbus__coils_8h}{modbus\+\_\+coils.\+h} -\/ работа с дискретными выходами
\item \doxylink{modbus__holdregs_8h}{modbus\+\_\+holdregs.\+h} -\/ работа с регистрами хранения ~\newline
\item \doxylink{modbus__inputregs_8h}{modbus\+\_\+inputregs.\+h} -\/ работа с входными регистрами
\item \doxylink{modbus__devid_8h}{modbus\+\_\+devid.\+h} -\/ идентификация устройства
\item \doxylink{modbus__diag_8h}{modbus\+\_\+diag.\+h} -\/ диагностика modbus
\end{DoxyItemize}\hypertarget{group___m_o_d_b_u_s___f_u_n_c_t_i_o_n_s_data}{}\doxysubsubsection{\texorpdfstring{Структура данных Modbus}{Структура данных Modbus}}\label{group___m_o_d_b_u_s___f_u_n_c_t_i_o_n_s_data}
\hypertarget{group___m_o_d_b_u_s___f_u_n_c_t_i_o_n_s_holdinginput-registers}{}\doxysubsubsubsubsubsection{\texorpdfstring{Holding/\+Input Registers\+:}{Holding/\+Input Registers\+:}}\label{group___m_o_d_b_u_s___f_u_n_c_t_i_o_n_s_holdinginput-registers}
\begin{DoxyItemize}
\item Регистры — 16-\/битные слова. Доступ к регистрам осуществляется через указатель. ~\newline
Таким образом, сами регистры могут представлять собой как массив так и структуру.
\end{DoxyItemize}\hypertarget{group___m_o_d_b_u_s___f_u_n_c_t_i_o_n_s_coils}{}\doxysubsubsubsubsubsection{\texorpdfstring{Coils\+:}{Coils\+:}}\label{group___m_o_d_b_u_s___f_u_n_c_t_i_o_n_s_coils}
\begin{DoxyItemize}
\item Coils — это биты, упакованные в 16-\/битные слова. Доступ к коилам осуществляется через указатель. ~\newline
Таким образом, сами коилы могут представлять собой как массив так и структуру.
\end{DoxyItemize}
\label{doc-define-members}
\Hypertarget{group___m_o_d_b_u_s___f_u_n_c_t_i_o_n_s_doc-define-members}
\doxysubsubsection{Macro Definition Documentation}
\Hypertarget{group___m_o_d_b_u_s___f_u_n_c_t_i_o_n_s_gad91eec9c3350f2705f1bbe1856cb0159}\index{Main API for Modbus Library@{Main API for Modbus Library}!MODBUS\_MODE\_MASTER@{MODBUS\_MODE\_MASTER}}
\index{MODBUS\_MODE\_MASTER@{MODBUS\_MODE\_MASTER}!Main API for Modbus Library@{Main API for Modbus Library}}
\doxysubsubsubsection{\texorpdfstring{MODBUS\_MODE\_MASTER}{MODBUS\_MODE\_MASTER}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___f_u_n_c_t_i_o_n_s_gad91eec9c3350f2705f1bbe1856cb0159}
\#define MODBUS\+\_\+\+MODE\+\_\+\+MASTER~1}
Псевдо-\/enum\+: Режим мастер
Definition at line \mbox{\hyperlink{modbus_8h_source_l00113}{113}} of file \mbox{\hyperlink{modbus_8h_source}{modbus.\+h}}.
\Hypertarget{group___m_o_d_b_u_s___f_u_n_c_t_i_o_n_s_gac0b3749af91f1007fd0291157b66b305}\index{Main API for Modbus Library@{Main API for Modbus Library}!MODBUS\_MODE\_SLAVE@{MODBUS\_MODE\_SLAVE}}
\index{MODBUS\_MODE\_SLAVE@{MODBUS\_MODE\_SLAVE}!Main API for Modbus Library@{Main API for Modbus Library}}
\doxysubsubsubsection{\texorpdfstring{MODBUS\_MODE\_SLAVE}{MODBUS\_MODE\_SLAVE}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___f_u_n_c_t_i_o_n_s_gac0b3749af91f1007fd0291157b66b305}
\#define MODBUS\+\_\+\+MODE\+\_\+\+SLAVE~0}
Псевдо-\/enum\+: Режим слейв
Definition at line \mbox{\hyperlink{modbus_8h_source_l00117}{117}} of file \mbox{\hyperlink{modbus_8h_source}{modbus.\+h}}.
\label{doc-func-members}
\Hypertarget{group___m_o_d_b_u_s___f_u_n_c_t_i_o_n_s_doc-func-members}
\doxysubsubsection{Function Documentation}
\Hypertarget{group___m_o_d_b_u_s___f_u_n_c_t_i_o_n_s_ga9e787c3454aab3293dec6e6795f687f5}\index{Main API for Modbus Library@{Main API for Modbus Library}!MODBUS\_FirstInit@{MODBUS\_FirstInit}}
\index{MODBUS\_FirstInit@{MODBUS\_FirstInit}!Main API for Modbus Library@{Main API for Modbus Library}}
\doxysubsubsubsection{\texorpdfstring{MODBUS\_FirstInit()}{MODBUS\_FirstInit()}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___f_u_n_c_t_i_o_n_s_ga9e787c3454aab3293dec6e6795f687f5}
HAL\+\_\+\+Status\+Type\+Def MODBUS\+\_\+\+First\+Init (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{struct_r_s___handle_type_def}{RS\+\_\+\+Handle\+Type\+Def}} \texorpdfstring{$\ast$}{*}}]{hmodbus}{, }\item[{UART\+\_\+\+Handle\+Type\+Def \texorpdfstring{$\ast$}{*}}]{huart}{, }\item[{TIM\+\_\+\+Handle\+Type\+Def \texorpdfstring{$\ast$}{*}}]{htim}{}\end{DoxyParamCaption})}
Инициализация периферии модбас.
\begin{DoxyParams}{Parameters}
{\em hmodbus} & Указатель на хендлер RS \\
\hline
{\em huart} & Указатель на хендлер UART \\
\hline
{\em htim} & Указатель на хендлер TIM\\
\hline
\end{DoxyParams}
Подключает хендлы периферии к hmodbus Конфигурация выставляется по умолчанию из \doxylink{modbus__config_8h}{modbus\+\_\+config.\+h}
Definition at line \mbox{\hyperlink{modbus_8c_source_l00042}{42}} of file \mbox{\hyperlink{modbus_8c_source}{modbus.\+c}}.
\Hypertarget{group___m_o_d_b_u_s___f_u_n_c_t_i_o_n_s_ga460466907693a256487d31f09b16edfe}\index{Main API for Modbus Library@{Main API for Modbus Library}!MODBUS\_Config@{MODBUS\_Config}}
\index{MODBUS\_Config@{MODBUS\_Config}!Main API for Modbus Library@{Main API for Modbus Library}}
\doxysubsubsubsection{\texorpdfstring{MODBUS\_Config()}{MODBUS\_Config()}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___f_u_n_c_t_i_o_n_s_ga460466907693a256487d31f09b16edfe}
HAL\+\_\+\+Status\+Type\+Def MODBUS\+\_\+\+Config (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{struct_r_s___handle_type_def}{RS\+\_\+\+Handle\+Type\+Def}} \texorpdfstring{$\ast$}{*}}]{hmodbus}{, }\item[{uint8\+\_\+t}]{ID}{, }\item[{uint16\+\_\+t}]{Timeout}{, }\item[{uint8\+\_\+t}]{master}{}\end{DoxyParamCaption})}
Программная конфигурация модбас.
\begin{DoxyParams}{Parameters}
{\em hmodbus} & указатель на хендлер RS \\
\hline
{\em Timeout} & Время тишины между двумя байтами после которых перезапускается прием \\
\hline
{\em master} & Режим мастер (пока не сделан)\\
\hline
\end{DoxyParams}
Конфигурирует ID, таймаут и режим hmodbus
Definition at line \mbox{\hyperlink{modbus_8c_source_l00072}{72}} of file \mbox{\hyperlink{modbus_8c_source}{modbus.\+c}}.
\Hypertarget{group___m_o_d_b_u_s___f_u_n_c_t_i_o_n_s_ga9a17402983188566254b7096342ba69e}\index{Main API for Modbus Library@{Main API for Modbus Library}!MODBUS\_SlaveStart@{MODBUS\_SlaveStart}}
\index{MODBUS\_SlaveStart@{MODBUS\_SlaveStart}!Main API for Modbus Library@{Main API for Modbus Library}}
\doxysubsubsubsection{\texorpdfstring{MODBUS\_SlaveStart()}{MODBUS\_SlaveStart()}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___f_u_n_c_t_i_o_n_s_ga9a17402983188566254b7096342ba69e}
HAL\+\_\+\+Status\+Type\+Def MODBUS\+\_\+\+Slave\+Start (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{struct_r_s___handle_type_def}{RS\+\_\+\+Handle\+Type\+Def}} \texorpdfstring{$\ast$}{*}}]{hmodbus}{, }\item[{\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \texorpdfstring{$\ast$}{*}}]{modbus\+\_\+msg}{}\end{DoxyParamCaption})}
Запуск слейв модбас.
\begin{DoxyParams}{Parameters}
{\em hmodbus} & Указатель на хендлер RS. \\
\hline
{\em modbus\+\_\+msg} & Указатель на структуру сообщения. (NULL чтобы использовать дефолтную)\\
\hline
\end{DoxyParams}
Конфигурирует ID, таймаут и режим hmodbus
Definition at line \mbox{\hyperlink{modbus_8c_source_l00105}{105}} of file \mbox{\hyperlink{modbus_8c_source}{modbus.\+c}}.
\Hypertarget{group___m_o_d_b_u_s___f_u_n_c_t_i_o_n_s_ga19090cabfba2345391e37398125a2f55}\index{Main API for Modbus Library@{Main API for Modbus Library}!MODBUS\_MasterRequest@{MODBUS\_MasterRequest}}
\index{MODBUS\_MasterRequest@{MODBUS\_MasterRequest}!Main API for Modbus Library@{Main API for Modbus Library}}
\doxysubsubsubsection{\texorpdfstring{MODBUS\_MasterRequest()}{MODBUS\_MasterRequest()}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___f_u_n_c_t_i_o_n_s_ga19090cabfba2345391e37398125a2f55}
HAL\+\_\+\+Status\+Type\+Def MODBUS\+\_\+\+Master\+Request (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{struct_r_s___handle_type_def}{RS\+\_\+\+Handle\+Type\+Def}} \texorpdfstring{$\ast$}{*}}]{hmodbus}{, }\item[{\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \texorpdfstring{$\ast$}{*}}]{modbus\+\_\+msg}{, }\item[{void(\texorpdfstring{$\ast$}{*}}]{p\+Clbk~}{)(\mbox{\hyperlink{struct_r_s___handle_type_def}{RS\+\_\+\+Handle\+Type\+Def}} \texorpdfstring{$\ast$}{*}, \mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \texorpdfstring{$\ast$}{*})}\end{DoxyParamCaption})}
Реквест мастера модбас.
\begin{DoxyParams}{Parameters}
{\em hmodbus} & Указатель на хендлер RS. \\
\hline
{\em modbus\+\_\+msg} & Указатель на структуру сообщения\\
\hline
\end{DoxyParams}
Конфигурирует ID, таймаут и режим hmodbus
Definition at line \mbox{\hyperlink{modbus_8c_source_l00136}{136}} of file \mbox{\hyperlink{modbus_8c_source}{modbus.\+c}}.
\input{group___m_o_d_b_u_s___l_e_g_a_c_y___a_p_i}
\input{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}
\input{group___m_o_d_b_u_s___r_e_q_u_e_s_t___m_s_g}

View File

@@ -0,0 +1 @@
fb191503a83e064484788e0d317d7aa9

View File

@@ -0,0 +1,30 @@
\doxysubsubsection{Holding Registers Tools }
\hypertarget{group___m_o_d_b_u_s___h_o_l_d}{}\label{group___m_o_d_b_u_s___h_o_l_d}\index{Holding Registers Tools@{Holding Registers Tools}}
Функции для работы с регистрами хранения
Collaboration diagram for Holding Registers Tools\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=347pt]{group___m_o_d_b_u_s___h_o_l_d}
\end{center}
\end{figure}
Функции для работы с регистрами хранения
Модуль для доступа к регистрам внутри программы\+:
\begin{DoxyItemize}
\item Функции для доступа к входным регистрам по глобальным адресам
\end{DoxyItemize}
Модуль обработки команд для входных регистров (Input Registers)\+:
\begin{DoxyItemize}
\item Чтение множества регистров (0x04)
\end{DoxyItemize}\hypertarget{group___m_o_d_b_u_s___h_o_l_d_in}{}\doxysubsubsubsection{\texorpdfstring{Входные регистры\+:}{Входные регистры\+:}}\label{group___m_o_d_b_u_s___h_o_l_d_in}
\begin{DoxyItemize}
\item Read-\/\+Only доступ
\item 16-\/битные значения
\end{DoxyItemize}

View File

@@ -0,0 +1 @@
b7ae72fd4ac68ca782e2630c01142243

View File

@@ -0,0 +1,32 @@
\doxysubsubsection{Input Register Tools }
\hypertarget{group___m_o_d_b_u_s___i_n_s}{}\label{group___m_o_d_b_u_s___i_n_s}\index{Input Register Tools@{Input Register Tools}}
Функции для работы с входными регистрами
Collaboration diagram for Input Register Tools\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=330pt]{group___m_o_d_b_u_s___i_n_s}
\end{center}
\end{figure}
Функции для работы с входными регистрами
Модуль для доступа к регистрам внутри программы\+:
\begin{DoxyItemize}
\item Функции для доступа к регистрам хранения по глобальным адресам
\end{DoxyItemize}
Модуль обработки команд для регистров хранения (Holding Registers)\+:
\begin{DoxyItemize}
\item Чтение множества регистров (0x03)
\item Запись одиночного регистра (0x06)
\item Запись множества регистров (0x10)
\end{DoxyItemize}\hypertarget{group___m_o_d_b_u_s___i_n_s_hold}{}\doxysubsubsubsection{\texorpdfstring{Регистры хранения\+:}{Регистры хранения\+:}}\label{group___m_o_d_b_u_s___i_n_s_hold}
\begin{DoxyItemize}
\item Read/\+Write доступ
\item 16-\/битные значения (uint16\+\_\+t)
\end{DoxyItemize}

View File

@@ -0,0 +1 @@
1ed1d85fa473e06db1880b968f6acedb

View File

@@ -0,0 +1,98 @@
\doxysubsection{Modbus Internal Tools }
\hypertarget{group___m_o_d_b_u_s___i_n_t_e_r_n_a_l}{}\label{group___m_o_d_b_u_s___i_n_t_e_r_n_a_l}\index{Modbus Internal Tools@{Modbus Internal Tools}}
Внутренние штуки библиотеки
Collaboration diagram for Modbus Internal Tools\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{group___m_o_d_b_u_s___i_n_t_e_r_n_a_l}
\end{center}
\end{figure}
\doxysubsubsubsection*{Topics}
\begin{DoxyCompactItemize}
\item
\mbox{\hyperlink{group___m_o_d_b_u_s___c_o_i_l_s}{Coils Tools}}
\begin{DoxyCompactList}\small\item\em Функции для работы с коилами \end{DoxyCompactList}\item
\mbox{\hyperlink{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s}{Modbus Message Tools}}
\begin{DoxyCompactList}\small\item\em Определения протокола модбас \end{DoxyCompactList}\item
\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}{Internal Process Functions}}
\begin{DoxyCompactList}\small\item\em Функции обработки запросов модбас \end{DoxyCompactList}\item
\mbox{\hyperlink{group___m_o_d_b_u_s___d_e_v_i_d}{Device Identifications Tools}}
\begin{DoxyCompactList}\small\item\em Функции для работы с идентификаторами устройства \end{DoxyCompactList}\item
\mbox{\hyperlink{group___m_o_d_b_u_s___d_i_a_g}{Diagnostics Tools}}
\begin{DoxyCompactList}\small\item\em Функции для работы с диагностикой \end{DoxyCompactList}\item
\mbox{\hyperlink{group___m_o_d_b_u_s___i_n_s}{Input Register Tools}}
\begin{DoxyCompactList}\small\item\em Функции для работы с входными регистрами \end{DoxyCompactList}\item
\mbox{\hyperlink{group___m_o_d_b_u_s___h_o_l_d}{Holding Registers Tools}}
\begin{DoxyCompactList}\small\item\em Функции для работы с регистрами хранения \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsubsection*{Macros}
\begin{DoxyCompactItemize}
\item
\#define \mbox{\hyperlink{group___m_o_d_b_u_s___i_n_t_e_r_n_a_l_gaa9bf5702da5f1816f1fa5509b04283dd}{Register\+Type\+\_\+\+Holding}}~0
\item
\#define \mbox{\hyperlink{group___m_o_d_b_u_s___i_n_t_e_r_n_a_l_ga15d77285b100f198575359d0bcbf8342}{Register\+Type\+\_\+\+Input}}~1
\item
\#define \mbox{\hyperlink{group___m_o_d_b_u_s___i_n_t_e_r_n_a_l_ga56e27a21e4cc0af673a714b4a822f62e}{Register\+Type\+\_\+\+Discrete}}~2
\end{DoxyCompactItemize}
\doxysubsubsection{Detailed Description}
Внутренние штуки библиотеки
Базовые определения для реализации Modbus RTU устройства\+:
\begin{DoxyItemize}
\item Структуры сообщений Modbus Коды функций и исключений Константы размеров полей Вспомогательные макросы
\end{DoxyItemize}\hypertarget{group___m_o_d_b_u_s___i_n_t_e_r_n_a_l_msg}{}\doxysubsubsection{\texorpdfstring{Структура сообщения\+:}{Структура сообщения\+:}}\label{group___m_o_d_b_u_s___i_n_t_e_r_n_a_l_msg}
\mbox{[}ADDR\mbox{]}\mbox{[}FUNC\mbox{]}\mbox{[}DATA...\mbox{]}\mbox{[}CRC\mbox{]}
\begin{DoxyItemize}
\item Адрес\+: 1 байт
\item Функция\+: 1 байт ~\newline
\item Данные\+: переменной длины
\item CRC\+: 2 байта
\end{DoxyItemize}
\label{doc-define-members}
\Hypertarget{group___m_o_d_b_u_s___i_n_t_e_r_n_a_l_doc-define-members}
\doxysubsubsection{Macro Definition Documentation}
\Hypertarget{group___m_o_d_b_u_s___i_n_t_e_r_n_a_l_gaa9bf5702da5f1816f1fa5509b04283dd}\index{Modbus Internal Tools@{Modbus Internal Tools}!RegisterType\_Holding@{RegisterType\_Holding}}
\index{RegisterType\_Holding@{RegisterType\_Holding}!Modbus Internal Tools@{Modbus Internal Tools}}
\doxysubsubsubsection{\texorpdfstring{RegisterType\_Holding}{RegisterType\_Holding}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___i_n_t_e_r_n_a_l_gaa9bf5702da5f1816f1fa5509b04283dd}
\#define Register\+Type\+\_\+\+Holding~0}
Definition at line \mbox{\hyperlink{modbus__core_8h_source_l00259}{259}} of file \mbox{\hyperlink{modbus__core_8h_source}{modbus\+\_\+core.\+h}}.
\Hypertarget{group___m_o_d_b_u_s___i_n_t_e_r_n_a_l_ga15d77285b100f198575359d0bcbf8342}\index{Modbus Internal Tools@{Modbus Internal Tools}!RegisterType\_Input@{RegisterType\_Input}}
\index{RegisterType\_Input@{RegisterType\_Input}!Modbus Internal Tools@{Modbus Internal Tools}}
\doxysubsubsubsection{\texorpdfstring{RegisterType\_Input}{RegisterType\_Input}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___i_n_t_e_r_n_a_l_ga15d77285b100f198575359d0bcbf8342}
\#define Register\+Type\+\_\+\+Input~1}
Definition at line \mbox{\hyperlink{modbus__core_8h_source_l00260}{260}} of file \mbox{\hyperlink{modbus__core_8h_source}{modbus\+\_\+core.\+h}}.
\Hypertarget{group___m_o_d_b_u_s___i_n_t_e_r_n_a_l_ga56e27a21e4cc0af673a714b4a822f62e}\index{Modbus Internal Tools@{Modbus Internal Tools}!RegisterType\_Discrete@{RegisterType\_Discrete}}
\index{RegisterType\_Discrete@{RegisterType\_Discrete}!Modbus Internal Tools@{Modbus Internal Tools}}
\doxysubsubsubsection{\texorpdfstring{RegisterType\_Discrete}{RegisterType\_Discrete}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___i_n_t_e_r_n_a_l_ga56e27a21e4cc0af673a714b4a822f62e}
\#define Register\+Type\+\_\+\+Discrete~2}
Definition at line \mbox{\hyperlink{modbus__core_8h_source_l00261}{261}} of file \mbox{\hyperlink{modbus__core_8h_source}{modbus\+\_\+core.\+h}}.
\input{group___m_o_d_b_u_s___c_o_i_l_s}
\input{group___m_o_d_b_u_s___m_e_s_s_a_g_e___d_e_f_i_n_e_s}
\input{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}
\input{group___m_o_d_b_u_s___d_e_v_i_d}
\input{group___m_o_d_b_u_s___d_i_a_g}
\input{group___m_o_d_b_u_s___i_n_s}
\input{group___m_o_d_b_u_s___h_o_l_d}

View File

@@ -0,0 +1 @@
ea52f688b2f0260cd8d72be5f31452bd

View File

@@ -0,0 +1,19 @@
\doxysubsubsection{Legacy API }
\hypertarget{group___m_o_d_b_u_s___l_e_g_a_c_y___a_p_i}{}\label{group___m_o_d_b_u_s___l_e_g_a_c_y___a_p_i}\index{Legacy API@{Legacy API}}
Старые API функций, сохранённые для обратной совместимости.
Collaboration diagram for Legacy API\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=290pt]{group___m_o_d_b_u_s___l_e_g_a_c_y___a_p_i}
\end{center}
\end{figure}
Старые API функций, сохранённые для обратной совместимости.
\begin{DoxyNote}{Note}
Не используйте эти функции в новом коде. Они могут быть удалены в будущих версиях. Вместо них используйте функции из основных групп MODBUS API.
\end{DoxyNote}

View File

@@ -0,0 +1 @@
5483c7c577a3cb324c6504ce1054b55d

View File

@@ -0,0 +1,83 @@
\doxysubsubsubsection{Modbus master funtions }
\hypertarget{group___m_o_d_b_u_s___m_a_s_t_e_r}{}\label{group___m_o_d_b_u_s___m_a_s_t_e_r}\index{Modbus master funtions@{Modbus master funtions}}
Функции для работы в режиме Master.
Collaboration diagram for Modbus master funtions\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{group___m_o_d_b_u_s___m_a_s_t_e_r}
\end{center}
\end{figure}
\doxysubsubsubsubsubsection*{Functions}
\begin{DoxyCompactItemize}
\item
\mbox{\hyperlink{group___r_s___t_o_o_l_s_ga727154b368397b4796aa892de12a2289}{RS\+\_\+\+Status\+Type\+Def}} \mbox{\hyperlink{group___m_o_d_b_u_s___m_a_s_t_e_r_ga096d2790ab887eb815e17d8cd9ede125}{MB\+\_\+\+Master\+\_\+\+Collect\+\_\+\+Message}} (\mbox{\hyperlink{struct_r_s___handle_type_def}{RS\+\_\+\+Handle\+Type\+Def}} \texorpdfstring{$\ast$}{*}hmodbus, \mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \texorpdfstring{$\ast$}{*}modbus\+\_\+msg, uint8\+\_\+t \texorpdfstring{$\ast$}{*}modbus\+\_\+uart\+\_\+buff)
\begin{DoxyCompactList}\small\item\em Сбор сообщения в буфер UART в режиме мастер (фрейм мастера из msg -\/\texorpdfstring{$>$}{>} uart). \end{DoxyCompactList}\item
\mbox{\hyperlink{group___r_s___t_o_o_l_s_ga727154b368397b4796aa892de12a2289}{RS\+\_\+\+Status\+Type\+Def}} \mbox{\hyperlink{group___m_o_d_b_u_s___m_a_s_t_e_r_ga461e77fe31ce64c7ee5f1a932dc1183f}{MB\+\_\+\+Master\+\_\+\+Parse\+\_\+\+Message}} (\mbox{\hyperlink{struct_r_s___handle_type_def}{RS\+\_\+\+Handle\+Type\+Def}} \texorpdfstring{$\ast$}{*}hmodbus, \mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \texorpdfstring{$\ast$}{*}modbus\+\_\+msg, uint8\+\_\+t \texorpdfstring{$\ast$}{*}modbus\+\_\+uart\+\_\+buff)
\begin{DoxyCompactList}\small\item\em Парс сообщения в режиме мастер (фрейм слейва из uart -\/\texorpdfstring{$>$}{>} msg). \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsubsubsection{Detailed Description}
Функции для работы в режиме Master.
Модуль реализации Modbus в режиме мастер
\label{doc-func-members}
\Hypertarget{group___m_o_d_b_u_s___m_a_s_t_e_r_doc-func-members}
\doxysubsubsubsubsection{Function Documentation}
\Hypertarget{group___m_o_d_b_u_s___m_a_s_t_e_r_ga096d2790ab887eb815e17d8cd9ede125}\index{Modbus master funtions@{Modbus master funtions}!MB\_Master\_Collect\_Message@{MB\_Master\_Collect\_Message}}
\index{MB\_Master\_Collect\_Message@{MB\_Master\_Collect\_Message}!Modbus master funtions@{Modbus master funtions}}
\doxysubsubsubsubsubsection{\texorpdfstring{MB\_Master\_Collect\_Message()}{MB\_Master\_Collect\_Message()}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___m_a_s_t_e_r_ga096d2790ab887eb815e17d8cd9ede125}
\mbox{\hyperlink{group___r_s___t_o_o_l_s_ga727154b368397b4796aa892de12a2289}{RS\+\_\+\+Status\+Type\+Def}} MB\+\_\+\+Master\+\_\+\+Collect\+\_\+\+Message (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{struct_r_s___handle_type_def}{RS\+\_\+\+Handle\+Type\+Def}} \texorpdfstring{$\ast$}{*}}]{hmodbus}{, }\item[{\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \texorpdfstring{$\ast$}{*}}]{modbus\+\_\+msg}{, }\item[{uint8\+\_\+t \texorpdfstring{$\ast$}{*}}]{modbus\+\_\+uart\+\_\+buff}{}\end{DoxyParamCaption})}
Сбор сообщения в буфер UART в режиме мастер (фрейм мастера из msg -\/\texorpdfstring{$>$}{>} uart).
\begin{DoxyParams}{Parameters}
{\em hmodbus} & Указатель на хендлер RS. \\
\hline
{\em modbus\+\_\+msg} & Указатель на структуру сообщения. \\
\hline
{\em modbus\+\_\+uart\+\_\+buff} & Указатель на буффер UART. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
RS\+\_\+\+RES Статус о результате заполнения буфера.
\end{DoxyReturn}
Definition at line \mbox{\hyperlink{modbus__master_8c_source_l00388}{388}} of file \mbox{\hyperlink{modbus__master_8c_source}{modbus\+\_\+master.\+c}}.
\Hypertarget{group___m_o_d_b_u_s___m_a_s_t_e_r_ga461e77fe31ce64c7ee5f1a932dc1183f}\index{Modbus master funtions@{Modbus master funtions}!MB\_Master\_Parse\_Message@{MB\_Master\_Parse\_Message}}
\index{MB\_Master\_Parse\_Message@{MB\_Master\_Parse\_Message}!Modbus master funtions@{Modbus master funtions}}
\doxysubsubsubsubsubsection{\texorpdfstring{MB\_Master\_Parse\_Message()}{MB\_Master\_Parse\_Message()}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___m_a_s_t_e_r_ga461e77fe31ce64c7ee5f1a932dc1183f}
\mbox{\hyperlink{group___r_s___t_o_o_l_s_ga727154b368397b4796aa892de12a2289}{RS\+\_\+\+Status\+Type\+Def}} MB\+\_\+\+Master\+\_\+\+Parse\+\_\+\+Message (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{struct_r_s___handle_type_def}{RS\+\_\+\+Handle\+Type\+Def}} \texorpdfstring{$\ast$}{*}}]{hmodbus}{, }\item[{\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \texorpdfstring{$\ast$}{*}}]{modbus\+\_\+msg}{, }\item[{uint8\+\_\+t \texorpdfstring{$\ast$}{*}}]{modbus\+\_\+uart\+\_\+buff}{}\end{DoxyParamCaption})}
Парс сообщения в режиме мастер (фрейм слейва из uart -\/\texorpdfstring{$>$}{>} msg).
\begin{DoxyParams}{Parameters}
{\em hmodbus} & Указатель на хендлер RS. \\
\hline
{\em modbus\+\_\+msg} & Указатель на структуру сообщения. \\
\hline
{\em modbus\+\_\+uart\+\_\+buff} & Указатель на буффер UART. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
RS\+\_\+\+RES Статус о результате заполнения структуры.
\end{DoxyReturn}
Definition at line \mbox{\hyperlink{modbus__master_8c_source_l00469}{469}} of file \mbox{\hyperlink{modbus__master_8c_source}{modbus\+\_\+master.\+c}}.

View File

@@ -0,0 +1 @@
25d277753cfb42e0288bf9c2d6733a2a

View File

@@ -0,0 +1,655 @@
\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}}.

View File

@@ -0,0 +1 @@
e17d8323fc6ce11941e8a3d48657c353

View File

@@ -0,0 +1,99 @@
\doxysubsubsubsection{API for Registers }
\hypertarget{group___m_o_d_b_u_s___r_e_g_s___a_p_i}{}\label{group___m_o_d_b_u_s___r_e_g_s___a_p_i}\index{API for Registers@{API for Registers}}
API для чтения регистров из ответа в режиме мастер
Collaboration diagram for API for Registers\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=333pt]{group___m_o_d_b_u_s___r_e_g_s___a_p_i}
\end{center}
\end{figure}
\doxysubsubsubsubsubsection*{Functions}
\begin{DoxyCompactItemize}
\item
int \mbox{\hyperlink{group___m_o_d_b_u_s___r_e_g_s___a_p_i_ga86160c23899d6ece041e3680ba863019}{MB\+\_\+\+Resp\+Get\+\_\+\+Register\+All}} (\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \texorpdfstring{$\ast$}{*}modbus\+\_\+msg, uint16\+\_\+t \texorpdfstring{$\ast$}{*}reg\+\_\+arr)
\begin{DoxyCompactList}\small\item\em Получить значение ВСЕХ регистров в ответе \end{DoxyCompactList}\item
int \mbox{\hyperlink{group___m_o_d_b_u_s___r_e_g_s___a_p_i_ga1f80317087624a23f84224c6f2c1d596}{MB\+\_\+\+Resp\+Get\+\_\+\+Register\+Value}} (\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \texorpdfstring{$\ast$}{*}modbus\+\_\+msg, uint16\+\_\+t reg\+\_\+addr, uint16\+\_\+t \texorpdfstring{$\ast$}{*}reg\+\_\+value)
\begin{DoxyCompactList}\small\item\em Получить значение регистра в ответе по его адресу \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsubsubsection{Detailed Description}
API для чтения регистров из ответа в режиме мастер
Примеры использования\+:
\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{comment}{//\ Пример:\ Запросили\ 10\ регистров\ с\ адреса\ 100,\ хотим\ получить\ значение\ регистра\ 105}}
\DoxyCodeLine{uint16\_t\ reg\_value;}
\DoxyCodeLine{\textcolor{keywordflow}{if}(\mbox{\hyperlink{group___m_o_d_b_u_s___r_e_g_s___a_p_i_ga1f80317087624a23f84224c6f2c1d596}{MB\_RespGet\_RegisterValue}}(modbus\_msg,\ 105,\ \&reg\_value))}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ printf(\textcolor{stringliteral}{"{}Register\ 105\ value:\ \%d\(\backslash\)n"{}},\ reg\_value);}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{comment}{//\ Пример:\ Получить\ все\ запрошенные\ регистры}}
\DoxyCodeLine{uint16\_t\ reg\_value[125];}
\DoxyCodeLine{\mbox{\hyperlink{group___m_o_d_b_u_s___r_e_g_s___a_p_i_ga86160c23899d6ece041e3680ba863019}{MB\_RespGet\_RegisterAll}}(modbus\_msg)}
\end{DoxyCode}
\label{doc-func-members}
\Hypertarget{group___m_o_d_b_u_s___r_e_g_s___a_p_i_doc-func-members}
\doxysubsubsubsubsection{Function Documentation}
\Hypertarget{group___m_o_d_b_u_s___r_e_g_s___a_p_i_ga86160c23899d6ece041e3680ba863019}\index{API for Registers@{API for Registers}!MB\_RespGet\_RegisterAll@{MB\_RespGet\_RegisterAll}}
\index{MB\_RespGet\_RegisterAll@{MB\_RespGet\_RegisterAll}!API for Registers@{API for Registers}}
\doxysubsubsubsubsubsection{\texorpdfstring{MB\_RespGet\_RegisterAll()}{MB\_RespGet\_RegisterAll()}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___r_e_g_s___a_p_i_ga86160c23899d6ece041e3680ba863019}
int MB\+\_\+\+Resp\+Get\+\_\+\+Register\+All (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \texorpdfstring{$\ast$}{*}}]{modbus\+\_\+msg}{, }\item[{uint16\+\_\+t \texorpdfstring{$\ast$}{*}}]{reg\+\_\+arr}{}\end{DoxyParamCaption})}
Получить значение ВСЕХ регистров в ответе
\begin{DoxyParams}{Parameters}
{\em modbus\+\_\+msg} & Указатель на структуру сообщения \\
\hline
{\em reg\+\_\+addr} & Адрес регистра, значение которого нужно получить \\
\hline
{\em reg\+\_\+arr} & Указатель для массив для сохранения значений регистров \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
количество считанных регистров, 0 -\/ ошибка
\end{DoxyReturn}
Definition at line \mbox{\hyperlink{modbus__master_8c_source_l00038}{38}} of file \mbox{\hyperlink{modbus__master_8c_source}{modbus\+\_\+master.\+c}}.
\Hypertarget{group___m_o_d_b_u_s___r_e_g_s___a_p_i_ga1f80317087624a23f84224c6f2c1d596}\index{API for Registers@{API for Registers}!MB\_RespGet\_RegisterValue@{MB\_RespGet\_RegisterValue}}
\index{MB\_RespGet\_RegisterValue@{MB\_RespGet\_RegisterValue}!API for Registers@{API for Registers}}
\doxysubsubsubsubsubsection{\texorpdfstring{MB\_RespGet\_RegisterValue()}{MB\_RespGet\_RegisterValue()}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___r_e_g_s___a_p_i_ga1f80317087624a23f84224c6f2c1d596}
int MB\+\_\+\+Resp\+Get\+\_\+\+Register\+Value (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \texorpdfstring{$\ast$}{*}}]{modbus\+\_\+msg}{, }\item[{uint16\+\_\+t}]{reg\+\_\+addr}{, }\item[{uint16\+\_\+t \texorpdfstring{$\ast$}{*}}]{reg\+\_\+value}{}\end{DoxyParamCaption})}
Получить значение регистра в ответе по его адресу
\begin{DoxyParams}{Parameters}
{\em modbus\+\_\+msg} & Указатель на структуру сообщения \\
\hline
{\em reg\+\_\+addr} & Адрес регистра, значение которого нужно получить \\
\hline
{\em reg\+\_\+value} & Указатель для значения регистра \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
1 -\/ успех, 0 -\/ ошибка или reg\+\_\+addr вне диапазона запроса
\end{DoxyReturn}
Definition at line \mbox{\hyperlink{modbus__master_8c_source_l00063}{63}} of file \mbox{\hyperlink{modbus__master_8c_source}{modbus\+\_\+master.\+c}}.

View File

@@ -0,0 +1 @@
62e7eebbc8925bbd543001ff6d7cb38e

View File

@@ -0,0 +1,106 @@
\doxysubsubsubsection{API for Coils }
\hypertarget{group___m_o_d_b_u_s___r_e_q___c_o_i_l_s___a_p_i}{}\label{group___m_o_d_b_u_s___r_e_q___c_o_i_l_s___a_p_i}\index{API for Coils@{API for Coils}}
API для чтения coils из ответа в режиме мастер
Collaboration diagram for API for Coils\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=313pt]{group___m_o_d_b_u_s___r_e_q___c_o_i_l_s___a_p_i}
\end{center}
\end{figure}
\doxysubsubsubsubsubsection*{Functions}
\begin{DoxyCompactItemize}
\item
int \mbox{\hyperlink{group___m_o_d_b_u_s___r_e_q___c_o_i_l_s___a_p_i_ga14750bad3976a9fcc6bdece1c800dbf5}{MB\+\_\+\+Resp\+Get\+\_\+\+Coil\+All}} (\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \texorpdfstring{$\ast$}{*}modbus\+\_\+msg, int \texorpdfstring{$\ast$}{*}coil\+\_\+arr)
\begin{DoxyCompactList}\small\item\em Получить состояние ВСЕХ coil в ответе \end{DoxyCompactList}\item
int \mbox{\hyperlink{group___m_o_d_b_u_s___r_e_q___c_o_i_l_s___a_p_i_ga643a0be1ccd587a6dfe544d9fd5ed018}{MB\+\_\+\+Resp\+Get\+\_\+\+Coil\+State}} (\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \texorpdfstring{$\ast$}{*}modbus\+\_\+msg, uint16\+\_\+t coil\+\_\+addr, int \texorpdfstring{$\ast$}{*}coil\+\_\+state)
\begin{DoxyCompactList}\small\item\em Получить состояние coil в ответе по его адресу \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsubsubsection{Detailed Description}
API для чтения coils из ответа в режиме мастер
~\newline
Примеры использования\+:
\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{comment}{//\ Пример:\ Запросили\ 10\ coils\ с\ адреса\ 20,\ хотим\ узнать\ состояние\ coil\ 25}}
\DoxyCodeLine{\textcolor{keywordtype}{int}\ coil\_state;}
\DoxyCodeLine{\textcolor{keywordflow}{if}(\mbox{\hyperlink{group___m_o_d_b_u_s___r_e_q___c_o_i_l_s___a_p_i_ga643a0be1ccd587a6dfe544d9fd5ed018}{MB\_RespGet\_CoilState}}(modbus\_msg,\ 25,\ \&coil\_state))}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ printf(\textcolor{stringliteral}{"{}Coil\ 25\ state:\ \%s\(\backslash\)n"{}},\ coil\_state\ ?\ \textcolor{stringliteral}{"{}ON"{}}\ :\ \textcolor{stringliteral}{"{}OFF"{}});}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{comment}{//\ Пример:\ Получить\ состояние\ всех\ запрошенных\ coils}}
\DoxyCodeLine{\textcolor{keywordflow}{for}(\textcolor{keywordtype}{int}\ addr\ =\ \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}}.Addr;\ addr\ <\ \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}}.Addr\ +\ \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}}.Qnt;\ addr++)}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \textcolor{keywordtype}{int}\ state;}
\DoxyCodeLine{\ \ \textcolor{keywordflow}{if}(\mbox{\hyperlink{group___m_o_d_b_u_s___r_e_q___c_o_i_l_s___a_p_i_ga643a0be1ccd587a6dfe544d9fd5ed018}{MB\_RespGet\_CoilState}}(modbus\_msg,\ addr,\ \&state))}
\DoxyCodeLine{\ \ \{}
\DoxyCodeLine{\ \ \ \ printf(\textcolor{stringliteral}{"{}Coil\ \%d:\ \%s\(\backslash\)n"{}},\ addr,\ state\ ?\ \textcolor{stringliteral}{"{}ON"{}}\ :\ \textcolor{stringliteral}{"{}OFF"{}});}
\DoxyCodeLine{\ \ \}}
\DoxyCodeLine{\}}
\end{DoxyCode}
\label{doc-func-members}
\Hypertarget{group___m_o_d_b_u_s___r_e_q___c_o_i_l_s___a_p_i_doc-func-members}
\doxysubsubsubsubsection{Function Documentation}
\Hypertarget{group___m_o_d_b_u_s___r_e_q___c_o_i_l_s___a_p_i_ga14750bad3976a9fcc6bdece1c800dbf5}\index{API for Coils@{API for Coils}!MB\_RespGet\_CoilAll@{MB\_RespGet\_CoilAll}}
\index{MB\_RespGet\_CoilAll@{MB\_RespGet\_CoilAll}!API for Coils@{API for Coils}}
\doxysubsubsubsubsubsection{\texorpdfstring{MB\_RespGet\_CoilAll()}{MB\_RespGet\_CoilAll()}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___r_e_q___c_o_i_l_s___a_p_i_ga14750bad3976a9fcc6bdece1c800dbf5}
int MB\+\_\+\+Resp\+Get\+\_\+\+Coil\+All (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \texorpdfstring{$\ast$}{*}}]{modbus\+\_\+msg}{, }\item[{int \texorpdfstring{$\ast$}{*}}]{coil\+\_\+arr}{}\end{DoxyParamCaption})}
Получить состояние ВСЕХ coil в ответе
\begin{DoxyParams}{Parameters}
{\em modbus\+\_\+msg} & Указатель на структуру сообщения \\
\hline
{\em coil\+\_\+arr} & Указатель для массив доя сохранения состояний coil (1 -\/ ON, 0 -\/ OFF) \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
1 -\/ успех, 0 -\/ ошибка или coil\+\_\+addr вне диапазона запроса
\end{DoxyReturn}
Definition at line \mbox{\hyperlink{modbus__master_8c_source_l00101}{101}} of file \mbox{\hyperlink{modbus__master_8c_source}{modbus\+\_\+master.\+c}}.
\Hypertarget{group___m_o_d_b_u_s___r_e_q___c_o_i_l_s___a_p_i_ga643a0be1ccd587a6dfe544d9fd5ed018}\index{API for Coils@{API for Coils}!MB\_RespGet\_CoilState@{MB\_RespGet\_CoilState}}
\index{MB\_RespGet\_CoilState@{MB\_RespGet\_CoilState}!API for Coils@{API for Coils}}
\doxysubsubsubsubsubsection{\texorpdfstring{MB\_RespGet\_CoilState()}{MB\_RespGet\_CoilState()}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___r_e_q___c_o_i_l_s___a_p_i_ga643a0be1ccd587a6dfe544d9fd5ed018}
int MB\+\_\+\+Resp\+Get\+\_\+\+Coil\+State (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \texorpdfstring{$\ast$}{*}}]{modbus\+\_\+msg}{, }\item[{uint16\+\_\+t}]{coil\+\_\+addr}{, }\item[{int \texorpdfstring{$\ast$}{*}}]{coil\+\_\+state}{}\end{DoxyParamCaption})}
Получить состояние coil в ответе по его адресу
\begin{DoxyParams}{Parameters}
{\em modbus\+\_\+msg} & Указатель на структуру сообщения \\
\hline
{\em coil\+\_\+addr} & Адрес coil, состояние которого нужно получить \\
\hline
{\em coil\+\_\+state} & Указатель для состояния coil (1 -\/ ON, 0 -\/ OFF) \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
1 -\/ успех, 0 -\/ ошибка или coil\+\_\+addr вне диапазона запроса
\end{DoxyReturn}
Definition at line \mbox{\hyperlink{modbus__master_8c_source_l00127}{127}} of file \mbox{\hyperlink{modbus__master_8c_source}{modbus\+\_\+master.\+c}}.

View File

@@ -0,0 +1 @@
b8025d569f5a994f24944c2b3413ecac

View File

@@ -0,0 +1,141 @@
\doxysubsubsubsection{API for Device Identifications }
\hypertarget{group___m_o_d_b_u_s___r_e_q___d_e_f_i_d___a_p_i}{}\label{group___m_o_d_b_u_s___r_e_q___d_e_f_i_d___a_p_i}\index{API for Device Identifications@{API for Device Identifications}}
API для чтения идентификторов из ответа в режиме мастер
Collaboration diagram for API for Device Identifications\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{group___m_o_d_b_u_s___r_e_q___d_e_f_i_d___a_p_i}
\end{center}
\end{figure}
\doxysubsubsubsubsubsection*{Functions}
\begin{DoxyCompactItemize}
\item
int \mbox{\hyperlink{group___m_o_d_b_u_s___r_e_q___d_e_f_i_d___a_p_i_ga16b90d4a74a249514161aa4576724d1c}{MB\+\_\+\+Resp\+Get\+\_\+\+Number\+Of\+Objects}} (\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \texorpdfstring{$\ast$}{*}modbus\+\_\+msg)
\begin{DoxyCompactList}\small\item\em Получить количество объектов в сообщении \end{DoxyCompactList}\item
int \mbox{\hyperlink{group___m_o_d_b_u_s___r_e_q___d_e_f_i_d___a_p_i_ga0dc4119c008af34d5997eab339c437be}{MB\+\_\+\+Resp\+Get\+\_\+\+Object\+By\+Id}} (\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \texorpdfstring{$\ast$}{*}modbus\+\_\+msg, uint8\+\_\+t obj\+\_\+id, char \texorpdfstring{$\ast$}{*}obj\+\_\+data, uint8\+\_\+t \texorpdfstring{$\ast$}{*}obj\+\_\+length)
\begin{DoxyCompactList}\small\item\em Найти объект по ID в сообщении \end{DoxyCompactList}\item
int \mbox{\hyperlink{group___m_o_d_b_u_s___r_e_q___d_e_f_i_d___a_p_i_ga3fc5fc5abfe4f8767ccee5c11ea3d5d5}{MB\+\_\+\+Resp\+Get\+\_\+\+Object\+By\+Index}} (\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \texorpdfstring{$\ast$}{*}modbus\+\_\+msg, int index, uint8\+\_\+t \texorpdfstring{$\ast$}{*}obj\+\_\+id, char \texorpdfstring{$\ast$}{*}obj\+\_\+data, uint8\+\_\+t \texorpdfstring{$\ast$}{*}obj\+\_\+length)
\begin{DoxyCompactList}\small\item\em Получить объект по индексу в сообщении \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsubsubsection{Detailed Description}
API для чтения идентификторов из ответа в режиме мастер
Примеры использования\+:
\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{comment}{//\ Пример\ 1:\ Получить\ VendorName\ (ID\ =\ 0x00)}}
\DoxyCodeLine{uint8\_t\ length;}
\DoxyCodeLine{\textcolor{keywordtype}{char}\ vendor\_name[64];}
\DoxyCodeLine{\textcolor{keywordflow}{if}(\mbox{\hyperlink{group___m_o_d_b_u_s___r_e_q___d_e_f_i_d___a_p_i_ga0dc4119c008af34d5997eab339c437be}{MB\_RespGet\_ObjectById}}(modbus\_msg,\ 0x00,\ vendor\_name,\ \&length))}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \textcolor{comment}{//\ получено}}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{comment}{//\ Пример\ 2:\ Перебрать\ все\ объекты\ в\ сообщении}}
\DoxyCodeLine{uint8\_t\ obj\_id,\ obj\_length;}
\DoxyCodeLine{\textcolor{keywordtype}{char}\ obj\_data[256];}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keywordtype}{int}\ obj\_count\ =\ \mbox{\hyperlink{group___m_o_d_b_u_s___r_e_q___d_e_f_i_d___a_p_i_ga16b90d4a74a249514161aa4576724d1c}{MB\_RespGet\_NumberOfObjects}}(modbus\_msg);}
\DoxyCodeLine{printf(\textcolor{stringliteral}{"{}Total\ objects:\ \%d\(\backslash\)n"{}},\ obj\_count);}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keywordflow}{for}(\textcolor{keywordtype}{int}\ i\ =\ 0;\ i\ <\ obj\_count;\ i++)}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \textcolor{keywordflow}{if}(\mbox{\hyperlink{group___m_o_d_b_u_s___r_e_q___d_e_f_i_d___a_p_i_ga3fc5fc5abfe4f8767ccee5c11ea3d5d5}{MB\_RespGet\_ObjectByIndex}}(modbus\_msg,\ i,\ \&obj\_id,\ obj\_data,\ \&obj\_length))}
\DoxyCodeLine{\ \ \{}
\DoxyCodeLine{\ \ \ \ \textcolor{comment}{//\ получено}}
\DoxyCodeLine{\ \ \}}
\DoxyCodeLine{\}}
\end{DoxyCode}
\label{doc-func-members}
\Hypertarget{group___m_o_d_b_u_s___r_e_q___d_e_f_i_d___a_p_i_doc-func-members}
\doxysubsubsubsubsection{Function Documentation}
\Hypertarget{group___m_o_d_b_u_s___r_e_q___d_e_f_i_d___a_p_i_ga16b90d4a74a249514161aa4576724d1c}\index{API for Device Identifications@{API for Device Identifications}!MB\_RespGet\_NumberOfObjects@{MB\_RespGet\_NumberOfObjects}}
\index{MB\_RespGet\_NumberOfObjects@{MB\_RespGet\_NumberOfObjects}!API for Device Identifications@{API for Device Identifications}}
\doxysubsubsubsubsubsection{\texorpdfstring{MB\_RespGet\_NumberOfObjects()}{MB\_RespGet\_NumberOfObjects()}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___r_e_q___d_e_f_i_d___a_p_i_ga16b90d4a74a249514161aa4576724d1c}
int MB\+\_\+\+Resp\+Get\+\_\+\+Number\+Of\+Objects (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \texorpdfstring{$\ast$}{*}}]{modbus\+\_\+msg}{}\end{DoxyParamCaption})}
Получить количество объектов в сообщении
\begin{DoxyParams}{Parameters}
{\em modbus\+\_\+msg} & Указатель на структуру сообщения \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
int Количество объектов
\end{DoxyReturn}
Definition at line \mbox{\hyperlink{modbus__master_8c_source_l00170}{170}} of file \mbox{\hyperlink{modbus__master_8c_source}{modbus\+\_\+master.\+c}}.
\Hypertarget{group___m_o_d_b_u_s___r_e_q___d_e_f_i_d___a_p_i_ga0dc4119c008af34d5997eab339c437be}\index{API for Device Identifications@{API for Device Identifications}!MB\_RespGet\_ObjectById@{MB\_RespGet\_ObjectById}}
\index{MB\_RespGet\_ObjectById@{MB\_RespGet\_ObjectById}!API for Device Identifications@{API for Device Identifications}}
\doxysubsubsubsubsubsection{\texorpdfstring{MB\_RespGet\_ObjectById()}{MB\_RespGet\_ObjectById()}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___r_e_q___d_e_f_i_d___a_p_i_ga0dc4119c008af34d5997eab339c437be}
int MB\+\_\+\+Resp\+Get\+\_\+\+Object\+By\+Id (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \texorpdfstring{$\ast$}{*}}]{modbus\+\_\+msg}{, }\item[{uint8\+\_\+t}]{obj\+\_\+id}{, }\item[{char \texorpdfstring{$\ast$}{*}}]{obj\+\_\+data}{, }\item[{uint8\+\_\+t \texorpdfstring{$\ast$}{*}}]{obj\+\_\+length}{}\end{DoxyParamCaption})}
Найти объект по ID в сообщении
\begin{DoxyParams}{Parameters}
{\em modbus\+\_\+msg} & Указатель на структуру сообщения \\
\hline
{\em obj\+\_\+id} & ID искомого объекта \\
\hline
{\em obj\+\_\+data} & Буфер для данных объекта (может быть NULL) \\
\hline
{\em obj\+\_\+length} & Указатель для длины объекта \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
int Найден ли объект (1 -\/ да, 0 -\/ нет)
\end{DoxyReturn}
Definition at line \mbox{\hyperlink{modbus__master_8c_source_l00193}{193}} of file \mbox{\hyperlink{modbus__master_8c_source}{modbus\+\_\+master.\+c}}.
\Hypertarget{group___m_o_d_b_u_s___r_e_q___d_e_f_i_d___a_p_i_ga3fc5fc5abfe4f8767ccee5c11ea3d5d5}\index{API for Device Identifications@{API for Device Identifications}!MB\_RespGet\_ObjectByIndex@{MB\_RespGet\_ObjectByIndex}}
\index{MB\_RespGet\_ObjectByIndex@{MB\_RespGet\_ObjectByIndex}!API for Device Identifications@{API for Device Identifications}}
\doxysubsubsubsubsubsection{\texorpdfstring{MB\_RespGet\_ObjectByIndex()}{MB\_RespGet\_ObjectByIndex()}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___r_e_q___d_e_f_i_d___a_p_i_ga3fc5fc5abfe4f8767ccee5c11ea3d5d5}
int MB\+\_\+\+Resp\+Get\+\_\+\+Object\+By\+Index (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \texorpdfstring{$\ast$}{*}}]{modbus\+\_\+msg}{, }\item[{int}]{index}{, }\item[{uint8\+\_\+t \texorpdfstring{$\ast$}{*}}]{obj\+\_\+id}{, }\item[{char \texorpdfstring{$\ast$}{*}}]{obj\+\_\+data}{, }\item[{uint8\+\_\+t \texorpdfstring{$\ast$}{*}}]{obj\+\_\+length}{}\end{DoxyParamCaption})}
Получить объект по индексу в сообщении
\begin{DoxyParams}{Parameters}
{\em modbus\+\_\+msg} & Указатель на структуру сообщения \\
\hline
{\em index} & Индекс объекта (0..N-\/1) \\
\hline
{\em obj\+\_\+id} & Указатель для ID объекта \\
\hline
{\em obj\+\_\+data} & Буфер для данных объекта \\
\hline
{\em obj\+\_\+length} & Указатель для длины объекта \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
int Успешность получения (1 -\/ получен, 0 -\/ не найден)
\end{DoxyReturn}
Definition at line \mbox{\hyperlink{modbus__master_8c_source_l00244}{244}} of file \mbox{\hyperlink{modbus__master_8c_source}{modbus\+\_\+master.\+c}}.

View File

@@ -0,0 +1 @@
213e05d2f1acc38ca8423f1f9c8884d8

View File

@@ -0,0 +1,68 @@
\doxysubsubsubsection{API for Diagnostics }
\hypertarget{group___m_o_d_b_u_s___r_e_q___d_i_a_g___a_p_i}{}\label{group___m_o_d_b_u_s___r_e_q___d_i_a_g___a_p_i}\index{API for Diagnostics@{API for Diagnostics}}
API для чтения диагностической информации из ответа в режиме мастер
Collaboration diagram for API for Diagnostics\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=342pt]{group___m_o_d_b_u_s___r_e_q___d_i_a_g___a_p_i}
\end{center}
\end{figure}
\doxysubsubsubsubsubsection*{Functions}
\begin{DoxyCompactItemize}
\item
int \mbox{\hyperlink{group___m_o_d_b_u_s___r_e_q___d_i_a_g___a_p_i_ga46a9650ec68832e6f95eda579f4d9ded}{MB\+\_\+\+Resp\+Get\+\_\+\+Diagnostic}} (\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \texorpdfstring{$\ast$}{*}modbus\+\_\+msg, uint16\+\_\+t \texorpdfstring{$\ast$}{*}data)
\begin{DoxyCompactList}\small\item\em Получить данные диагностики из сообщения (Mb\+Data\mbox{[}1\mbox{]}) \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsubsubsection{Detailed Description}
API для чтения диагностической информации из ответа в режиме мастер
~\newline
Примеры использования\+:
\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{comment}{//\ Получить\ данные\ диагностики\ (значение\ счетчика)}}
\DoxyCodeLine{uint16\_t\ counter\_value;}
\DoxyCodeLine{\textcolor{keywordflow}{if}(\mbox{\hyperlink{group___m_o_d_b_u_s___r_e_q___d_i_a_g___a_p_i_ga46a9650ec68832e6f95eda579f4d9ded}{MB\_RespGet\_Diagnostic}}(modbus\_msg,\ \&counter\_value))}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ printf(\textcolor{stringliteral}{"{}Counter\ value:\ \%d\(\backslash\)n"{}},\ counter\_value);}
\DoxyCodeLine{\}}
\end{DoxyCode}
\label{doc-func-members}
\Hypertarget{group___m_o_d_b_u_s___r_e_q___d_i_a_g___a_p_i_doc-func-members}
\doxysubsubsubsubsection{Function Documentation}
\Hypertarget{group___m_o_d_b_u_s___r_e_q___d_i_a_g___a_p_i_ga46a9650ec68832e6f95eda579f4d9ded}\index{API for Diagnostics@{API for Diagnostics}!MB\_RespGet\_Diagnostic@{MB\_RespGet\_Diagnostic}}
\index{MB\_RespGet\_Diagnostic@{MB\_RespGet\_Diagnostic}!API for Diagnostics@{API for Diagnostics}}
\doxysubsubsubsubsubsection{\texorpdfstring{MB\_RespGet\_Diagnostic()}{MB\_RespGet\_Diagnostic()}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___r_e_q___d_i_a_g___a_p_i_ga46a9650ec68832e6f95eda579f4d9ded}
int MB\+\_\+\+Resp\+Get\+\_\+\+Diagnostic (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \texorpdfstring{$\ast$}{*}}]{modbus\+\_\+msg}{, }\item[{uint16\+\_\+t \texorpdfstring{$\ast$}{*}}]{data}{}\end{DoxyParamCaption})}
Получить данные диагностики из сообщения (Mb\+Data\mbox{[}1\mbox{]})
\begin{DoxyParams}{Parameters}
{\em modbus\+\_\+msg} & Указатель на структуру сообщения \\
\hline
{\em data} & Указатель куда положить данные \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
1 -\/ успех, 0 -\/ ошибка
\end{DoxyReturn}
Definition at line \mbox{\hyperlink{modbus__master_8c_source_l00297}{297}} of file \mbox{\hyperlink{modbus__master_8c_source}{modbus\+\_\+master.\+c}}.

View File

@@ -0,0 +1 @@
772561268d1960344526a99df6938b57

View File

@@ -0,0 +1,401 @@
\doxysubsubsection{API for Master Requests }
\hypertarget{group___m_o_d_b_u_s___r_e_q_u_e_s_t___m_s_g}{}\label{group___m_o_d_b_u_s___r_e_q_u_e_s_t___m_s_g}\index{API for Master Requests@{API for Master Requests}}
API для формирования фрейма-\/запроса в режиме мастер
Collaboration diagram for API for Master Requests\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{group___m_o_d_b_u_s___r_e_q_u_e_s_t___m_s_g}
\end{center}
\end{figure}
\doxysubsubsubsubsection*{Topics}
\begin{DoxyCompactItemize}
\item
\mbox{\hyperlink{group___m_o_d_b_u_s___r_e_g_s___a_p_i}{API for Registers}}
\begin{DoxyCompactList}\small\item\em API для чтения регистров из ответа в режиме мастер \end{DoxyCompactList}\item
\mbox{\hyperlink{group___m_o_d_b_u_s___r_e_q___c_o_i_l_s___a_p_i}{API for Coils}}
\begin{DoxyCompactList}\small\item\em API для чтения coils из ответа в режиме мастер \end{DoxyCompactList}\item
\mbox{\hyperlink{group___m_o_d_b_u_s___r_e_q___d_e_f_i_d___a_p_i}{API for Device Identifications}}
\begin{DoxyCompactList}\small\item\em API для чтения идентификторов из ответа в режиме мастер \end{DoxyCompactList}\item
\mbox{\hyperlink{group___m_o_d_b_u_s___r_e_q___d_i_a_g___a_p_i}{API for Diagnostics}}
\begin{DoxyCompactList}\small\item\em API для чтения диагностической информации из ответа в режиме мастер \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsubsubsection*{Functions}
\begin{DoxyCompactItemize}
\item
\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \mbox{\hyperlink{group___m_o_d_b_u_s___r_e_q_u_e_s_t___m_s_g_gadb1b59bd6832b017b7ff4f5d694f59aa}{MB\+\_\+\+REQUEST\+\_\+\+READ\+\_\+\+COILS}} (uint8\+\_\+t slave\+\_\+addr, uint16\+\_\+t start\+\_\+addr, uint16\+\_\+t quantity)
\begin{DoxyCompactList}\small\item\em Сформировать запрос на чтение коилов \end{DoxyCompactList}\item
\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \mbox{\hyperlink{group___m_o_d_b_u_s___r_e_q_u_e_s_t___m_s_g_ga85028c4de63ca63cb04e332a3fdcd676}{MB\+\_\+\+REQUEST\+\_\+\+READ\+\_\+\+DISCRETE\+\_\+\+INPUTS}} (uint8\+\_\+t slave\+\_\+addr, uint16\+\_\+t start\+\_\+addr, uint16\+\_\+t quantity)
\begin{DoxyCompactList}\small\item\em Сформировать запрос на чтение дискретных регистров \end{DoxyCompactList}\item
\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \mbox{\hyperlink{group___m_o_d_b_u_s___r_e_q_u_e_s_t___m_s_g_ga4a4798a15608f3aac04150115a628f8e}{MB\+\_\+\+REQUEST\+\_\+\+READ\+\_\+\+HOLDING\+\_\+\+REGS}} (uint8\+\_\+t slave\+\_\+addr, uint16\+\_\+t start\+\_\+addr, uint16\+\_\+t quantity)
\begin{DoxyCompactList}\small\item\em Сформировать запрос на чтение холдинг регистров \end{DoxyCompactList}\item
\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \mbox{\hyperlink{group___m_o_d_b_u_s___r_e_q_u_e_s_t___m_s_g_ga72f91a70586546171fe9190a4e0e5518}{MB\+\_\+\+REQUEST\+\_\+\+READ\+\_\+\+INPUT\+\_\+\+REGS}} (uint8\+\_\+t slave\+\_\+addr, uint16\+\_\+t start\+\_\+addr, uint16\+\_\+t quantity)
\begin{DoxyCompactList}\small\item\em Сформировать запрос на чтение инпут регистров \end{DoxyCompactList}\item
\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \mbox{\hyperlink{group___m_o_d_b_u_s___r_e_q_u_e_s_t___m_s_g_ga1ac5f38ac244039a63b2714044778ffc}{MB\+\_\+\+REQUEST\+\_\+\+WRITE\+\_\+\+SINGLE\+\_\+\+COIL}} (uint8\+\_\+t slave\+\_\+addr, uint16\+\_\+t coil\+\_\+addr, uint8\+\_\+t value)
\begin{DoxyCompactList}\small\item\em Сформировать запрос на запись одного коила \end{DoxyCompactList}\item
\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \mbox{\hyperlink{group___m_o_d_b_u_s___r_e_q_u_e_s_t___m_s_g_ga0126cfaf44c73d84d521b16c0f6ab7b6}{MB\+\_\+\+REQUEST\+\_\+\+WRITE\+\_\+\+SINGLE\+\_\+\+REG}} (uint8\+\_\+t slave\+\_\+addr, uint16\+\_\+t reg\+\_\+addr, uint16\+\_\+t value)
\begin{DoxyCompactList}\small\item\em Сформировать запрос на запись одного регистра \end{DoxyCompactList}\item
\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \mbox{\hyperlink{group___m_o_d_b_u_s___r_e_q_u_e_s_t___m_s_g_ga92c7c61bc6b3e249350d93d20b530fa3}{MB\+\_\+\+REQUEST\+\_\+\+WRITE\+\_\+\+MULTIPLE\+\_\+\+COILS}} (uint8\+\_\+t slave\+\_\+addr, uint16\+\_\+t start\+\_\+addr, uint16\+\_\+t quantity, uint8\+\_\+t \texorpdfstring{$\ast$}{*}coils\+\_\+data)
\begin{DoxyCompactList}\small\item\em Сформировать запрос на запись нескольких регистров \end{DoxyCompactList}\item
\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \mbox{\hyperlink{group___m_o_d_b_u_s___r_e_q_u_e_s_t___m_s_g_ga9b89a034f1c5ed96572621b2ebe7f6af}{MB\+\_\+\+REQUEST\+\_\+\+WRITE\+\_\+\+MULTIPLE\+\_\+\+REGS}} (uint8\+\_\+t slave\+\_\+addr, uint16\+\_\+t start\+\_\+addr, uint16\+\_\+t quantity, uint16\+\_\+t \texorpdfstring{$\ast$}{*}regs\+\_\+data)
\begin{DoxyCompactList}\small\item\em Сформировать запрос на запись нескольких коилов \end{DoxyCompactList}\item
\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \mbox{\hyperlink{group___m_o_d_b_u_s___r_e_q_u_e_s_t___m_s_g_ga426c984872d854c539fd8c238d63771b}{MB\+\_\+\+REQUEST\+\_\+\+DIAGNOSTIC\+\_\+\+QUERY}} (uint8\+\_\+t slave\+\_\+addr, uint16\+\_\+t sub\+\_\+function, uint16\+\_\+t data)
\item
\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \mbox{\hyperlink{group___m_o_d_b_u_s___r_e_q_u_e_s_t___m_s_g_ga6480ddbb52591379806a4772b1e0314c}{MB\+\_\+\+REQUEST\+\_\+\+RETURN\+\_\+\+QUERY\+\_\+\+DATA}} (uint8\+\_\+t slave\+\_\+addr)
\item
\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \mbox{\hyperlink{group___m_o_d_b_u_s___r_e_q_u_e_s_t___m_s_g_gaac4012ed36456d42a4ab43bafa464c5d}{MB\+\_\+\+REQUEST\+\_\+\+RESTART\+\_\+\+COMMUNICATIONS}} (uint8\+\_\+t slave\+\_\+addr, uint16\+\_\+t data)
\item
\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \mbox{\hyperlink{group___m_o_d_b_u_s___r_e_q_u_e_s_t___m_s_g_ga2273cca5ebb04144c64531fd0c0694ed}{MB\+\_\+\+REQUEST\+\_\+\+RETURN\+\_\+\+DIAGNOSTIC\+\_\+\+REGISTER}} (uint8\+\_\+t slave\+\_\+addr)
\item
\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \mbox{\hyperlink{group___m_o_d_b_u_s___r_e_q_u_e_s_t___m_s_g_gae6530484fa78fb3e02755b300f0c2b02}{MB\+\_\+\+REQUEST\+\_\+\+FORCE\+\_\+\+LISTEN\+\_\+\+ONLY\+\_\+\+MODE}} (uint8\+\_\+t slave\+\_\+addr)
\item
\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \mbox{\hyperlink{group___m_o_d_b_u_s___r_e_q_u_e_s_t___m_s_g_gada53cc333c773842805b95d9a87a65db}{MB\+\_\+\+REQUEST\+\_\+\+CLEAR\+\_\+\+COUNTERS\+\_\+\+AND\+\_\+\+DIAGNOSTIC\+\_\+\+REGISTER}} (uint8\+\_\+t slave\+\_\+addr)
\item
\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \mbox{\hyperlink{group___m_o_d_b_u_s___r_e_q_u_e_s_t___m_s_g_gacb5228130ea1b22b88c19887d92f7be0}{MB\+\_\+\+REQUEST\+\_\+\+RETURN\+\_\+\+BUS\+\_\+\+MESSAGE\+\_\+\+COUNT}} (uint8\+\_\+t slave\+\_\+addr)
\item
\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \mbox{\hyperlink{group___m_o_d_b_u_s___r_e_q_u_e_s_t___m_s_g_gadd99de894b4454ca996f62e7087c0189}{MB\+\_\+\+REQUEST\+\_\+\+RETURN\+\_\+\+BUS\+\_\+\+COMMUNICATION\+\_\+\+ERROR\+\_\+\+COUNT}} (uint8\+\_\+t slave\+\_\+addr)
\item
\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \mbox{\hyperlink{group___m_o_d_b_u_s___r_e_q_u_e_s_t___m_s_g_ga389ab419af02c8c3c5d4aae28fb17101}{MB\+\_\+\+REQUEST\+\_\+\+RETURN\+\_\+\+SLAVE\+\_\+\+EXCEPTION\+\_\+\+ERROR\+\_\+\+COUNT}} (uint8\+\_\+t slave\+\_\+addr)
\item
\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \mbox{\hyperlink{group___m_o_d_b_u_s___r_e_q_u_e_s_t___m_s_g_ga9c40062ec23c64144688aa7828eccd23}{MB\+\_\+\+REQUEST\+\_\+\+RETURN\+\_\+\+SLAVE\+\_\+\+MESSAGE\+\_\+\+COUNT}} (uint8\+\_\+t slave\+\_\+addr)
\item
\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \mbox{\hyperlink{group___m_o_d_b_u_s___r_e_q_u_e_s_t___m_s_g_ga5300643a1bf60cf0a78d594c9abc1b0e}{MB\+\_\+\+REQUEST\+\_\+\+RETURN\+\_\+\+SLAVE\+\_\+\+NO\+\_\+\+RESPONSE\+\_\+\+COUNT}} (uint8\+\_\+t slave\+\_\+addr)
\item
\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \mbox{\hyperlink{group___m_o_d_b_u_s___r_e_q_u_e_s_t___m_s_g_gacb578b9c708617fc0223d462ae3749c0}{MB\+\_\+\+REQUEST\+\_\+\+RETURN\+\_\+\+SLAVE\+\_\+\+NAK\+\_\+\+COUNT}} (uint8\+\_\+t slave\+\_\+addr)
\item
\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \mbox{\hyperlink{group___m_o_d_b_u_s___r_e_q_u_e_s_t___m_s_g_ga72c99bd3d8ee2de2e6748086f66a6955}{MB\+\_\+\+REQUEST\+\_\+\+RETURN\+\_\+\+SLAVE\+\_\+\+BUSY\+\_\+\+COUNT}} (uint8\+\_\+t slave\+\_\+addr)
\item
\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \mbox{\hyperlink{group___m_o_d_b_u_s___r_e_q_u_e_s_t___m_s_g_ga9fa3920579485c7a23927748a7fcf4c0}{MB\+\_\+\+REQUEST\+\_\+\+RETURN\+\_\+\+BUS\+\_\+\+CHARACTER\+\_\+\+OVERRUN\+\_\+\+COUNT}} (uint8\+\_\+t slave\+\_\+addr)
\item
\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \mbox{\hyperlink{group___m_o_d_b_u_s___r_e_q_u_e_s_t___m_s_g_gaaccf0865d45ec20438b06698d7fa1810}{MB\+\_\+\+REQUEST\+\_\+\+READ\+\_\+\+DEVICE\+\_\+\+ID\+\_\+\+BASIC}} (uint8\+\_\+t slave\+\_\+addr)
\item
\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \mbox{\hyperlink{group___m_o_d_b_u_s___r_e_q_u_e_s_t___m_s_g_ga016ad086488ff121aa6354ed6e617255}{MB\+\_\+\+REQUEST\+\_\+\+READ\+\_\+\+DEVICE\+\_\+\+ID\+\_\+\+REGULAR}} (uint8\+\_\+t slave\+\_\+addr)
\item
\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \mbox{\hyperlink{group___m_o_d_b_u_s___r_e_q_u_e_s_t___m_s_g_ga8ace1339daa02649df909e5cd1b9143c}{MB\+\_\+\+REQUEST\+\_\+\+READ\+\_\+\+DEVICE\+\_\+\+ID\+\_\+\+EXTENDED}} (uint8\+\_\+t slave\+\_\+addr)
\item
\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \mbox{\hyperlink{group___m_o_d_b_u_s___r_e_q_u_e_s_t___m_s_g_ga4c00a4432ea240d6f6629a9bead0c5b8}{MB\+\_\+\+REQUEST\+\_\+\+READ\+\_\+\+DEVICE\+\_\+\+ID\+\_\+\+SPECIFIC}} (uint8\+\_\+t slave\+\_\+addr, uint8\+\_\+t object\+\_\+id)
\end{DoxyCompactItemize}
\doxysubsubsubsection{Detailed Description}
API для формирования фрейма-\/запроса в режиме мастер
Примеры использования\+:
\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{comment}{//\ Чтение\ 10\ holding\ registers\ начиная\ с\ адреса\ 0}}
\DoxyCodeLine{\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\_MsgTypeDef}}\ read\_msg\ =\ \mbox{\hyperlink{group___m_o_d_b_u_s___r_e_q_u_e_s_t___m_s_g_ga4a4798a15608f3aac04150115a628f8e}{MB\_REQUEST\_READ\_HOLDING\_REGS}}(1,\ 0,\ 10);}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{comment}{//\ Запись\ одного\ coil}}
\DoxyCodeLine{\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\_MsgTypeDef}}\ write\_coil\_msg\ =\ \mbox{\hyperlink{group___m_o_d_b_u_s___r_e_q_u_e_s_t___m_s_g_ga1ac5f38ac244039a63b2714044778ffc}{MB\_REQUEST\_WRITE\_SINGLE\_COIL}}(1,\ 5,\ 1);}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{comment}{//\ Диагностический\ запрос}}
\DoxyCodeLine{\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\_MsgTypeDef}}\ diag\_msg\ =\ MB\_REQUEST\_RETURN\_BUS\_MESSAGE\_COUNT(1);}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{comment}{//\ Идентификация\ устройства}}
\DoxyCodeLine{\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\_MsgTypeDef}}\ dev\_id\_msg\ =\ MB\_REQUEST\_READ\_DEVICE\_ID\_BASIC(1);}
\end{DoxyCode}
\label{doc-func-members}
\Hypertarget{group___m_o_d_b_u_s___r_e_q_u_e_s_t___m_s_g_doc-func-members}
\doxysubsubsubsection{Function Documentation}
\Hypertarget{group___m_o_d_b_u_s___r_e_q_u_e_s_t___m_s_g_gadb1b59bd6832b017b7ff4f5d694f59aa}\index{API for Master Requests@{API for Master Requests}!MB\_REQUEST\_READ\_COILS@{MB\_REQUEST\_READ\_COILS}}
\index{MB\_REQUEST\_READ\_COILS@{MB\_REQUEST\_READ\_COILS}!API for Master Requests@{API for Master Requests}}
\doxysubsubsubsubsection{\texorpdfstring{MB\_REQUEST\_READ\_COILS()}{MB\_REQUEST\_READ\_COILS()}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___r_e_q_u_e_s_t___m_s_g_gadb1b59bd6832b017b7ff4f5d694f59aa}
\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} MB\+\_\+\+REQUEST\+\_\+\+READ\+\_\+\+COILS (\begin{DoxyParamCaption}\item[{uint8\+\_\+t}]{slave\+\_\+addr}{, }\item[{uint16\+\_\+t}]{start\+\_\+addr}{, }\item[{uint16\+\_\+t}]{quantity}{}\end{DoxyParamCaption})}
Сформировать запрос на чтение коилов
Definition at line \mbox{\hyperlink{modbus__master_8c_source_l00584}{584}} of file \mbox{\hyperlink{modbus__master_8c_source}{modbus\+\_\+master.\+c}}.
\Hypertarget{group___m_o_d_b_u_s___r_e_q_u_e_s_t___m_s_g_ga85028c4de63ca63cb04e332a3fdcd676}\index{API for Master Requests@{API for Master Requests}!MB\_REQUEST\_READ\_DISCRETE\_INPUTS@{MB\_REQUEST\_READ\_DISCRETE\_INPUTS}}
\index{MB\_REQUEST\_READ\_DISCRETE\_INPUTS@{MB\_REQUEST\_READ\_DISCRETE\_INPUTS}!API for Master Requests@{API for Master Requests}}
\doxysubsubsubsubsection{\texorpdfstring{MB\_REQUEST\_READ\_DISCRETE\_INPUTS()}{MB\_REQUEST\_READ\_DISCRETE\_INPUTS()}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___r_e_q_u_e_s_t___m_s_g_ga85028c4de63ca63cb04e332a3fdcd676}
\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} MB\+\_\+\+REQUEST\+\_\+\+READ\+\_\+\+DISCRETE\+\_\+\+INPUTS (\begin{DoxyParamCaption}\item[{uint8\+\_\+t}]{slave\+\_\+addr}{, }\item[{uint16\+\_\+t}]{start\+\_\+addr}{, }\item[{uint16\+\_\+t}]{quantity}{}\end{DoxyParamCaption})}
Сформировать запрос на чтение дискретных регистров
Definition at line \mbox{\hyperlink{modbus__master_8c_source_l00591}{591}} of file \mbox{\hyperlink{modbus__master_8c_source}{modbus\+\_\+master.\+c}}.
\Hypertarget{group___m_o_d_b_u_s___r_e_q_u_e_s_t___m_s_g_ga4a4798a15608f3aac04150115a628f8e}\index{API for Master Requests@{API for Master Requests}!MB\_REQUEST\_READ\_HOLDING\_REGS@{MB\_REQUEST\_READ\_HOLDING\_REGS}}
\index{MB\_REQUEST\_READ\_HOLDING\_REGS@{MB\_REQUEST\_READ\_HOLDING\_REGS}!API for Master Requests@{API for Master Requests}}
\doxysubsubsubsubsection{\texorpdfstring{MB\_REQUEST\_READ\_HOLDING\_REGS()}{MB\_REQUEST\_READ\_HOLDING\_REGS()}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___r_e_q_u_e_s_t___m_s_g_ga4a4798a15608f3aac04150115a628f8e}
\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} MB\+\_\+\+REQUEST\+\_\+\+READ\+\_\+\+HOLDING\+\_\+\+REGS (\begin{DoxyParamCaption}\item[{uint8\+\_\+t}]{slave\+\_\+addr}{, }\item[{uint16\+\_\+t}]{start\+\_\+addr}{, }\item[{uint16\+\_\+t}]{quantity}{}\end{DoxyParamCaption})}
Сформировать запрос на чтение холдинг регистров
Definition at line \mbox{\hyperlink{modbus__master_8c_source_l00598}{598}} of file \mbox{\hyperlink{modbus__master_8c_source}{modbus\+\_\+master.\+c}}.
\Hypertarget{group___m_o_d_b_u_s___r_e_q_u_e_s_t___m_s_g_ga72f91a70586546171fe9190a4e0e5518}\index{API for Master Requests@{API for Master Requests}!MB\_REQUEST\_READ\_INPUT\_REGS@{MB\_REQUEST\_READ\_INPUT\_REGS}}
\index{MB\_REQUEST\_READ\_INPUT\_REGS@{MB\_REQUEST\_READ\_INPUT\_REGS}!API for Master Requests@{API for Master Requests}}
\doxysubsubsubsubsection{\texorpdfstring{MB\_REQUEST\_READ\_INPUT\_REGS()}{MB\_REQUEST\_READ\_INPUT\_REGS()}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___r_e_q_u_e_s_t___m_s_g_ga72f91a70586546171fe9190a4e0e5518}
\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} MB\+\_\+\+REQUEST\+\_\+\+READ\+\_\+\+INPUT\+\_\+\+REGS (\begin{DoxyParamCaption}\item[{uint8\+\_\+t}]{slave\+\_\+addr}{, }\item[{uint16\+\_\+t}]{start\+\_\+addr}{, }\item[{uint16\+\_\+t}]{quantity}{}\end{DoxyParamCaption})}
Сформировать запрос на чтение инпут регистров
Definition at line \mbox{\hyperlink{modbus__master_8c_source_l00605}{605}} of file \mbox{\hyperlink{modbus__master_8c_source}{modbus\+\_\+master.\+c}}.
\Hypertarget{group___m_o_d_b_u_s___r_e_q_u_e_s_t___m_s_g_ga1ac5f38ac244039a63b2714044778ffc}\index{API for Master Requests@{API for Master Requests}!MB\_REQUEST\_WRITE\_SINGLE\_COIL@{MB\_REQUEST\_WRITE\_SINGLE\_COIL}}
\index{MB\_REQUEST\_WRITE\_SINGLE\_COIL@{MB\_REQUEST\_WRITE\_SINGLE\_COIL}!API for Master Requests@{API for Master Requests}}
\doxysubsubsubsubsection{\texorpdfstring{MB\_REQUEST\_WRITE\_SINGLE\_COIL()}{MB\_REQUEST\_WRITE\_SINGLE\_COIL()}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___r_e_q_u_e_s_t___m_s_g_ga1ac5f38ac244039a63b2714044778ffc}
\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} MB\+\_\+\+REQUEST\+\_\+\+WRITE\+\_\+\+SINGLE\+\_\+\+COIL (\begin{DoxyParamCaption}\item[{uint8\+\_\+t}]{slave\+\_\+addr}{, }\item[{uint16\+\_\+t}]{coil\+\_\+addr}{, }\item[{uint8\+\_\+t}]{value}{}\end{DoxyParamCaption})}
Сформировать запрос на запись одного коила
Definition at line \mbox{\hyperlink{modbus__master_8c_source_l00612}{612}} of file \mbox{\hyperlink{modbus__master_8c_source}{modbus\+\_\+master.\+c}}.
\Hypertarget{group___m_o_d_b_u_s___r_e_q_u_e_s_t___m_s_g_ga0126cfaf44c73d84d521b16c0f6ab7b6}\index{API for Master Requests@{API for Master Requests}!MB\_REQUEST\_WRITE\_SINGLE\_REG@{MB\_REQUEST\_WRITE\_SINGLE\_REG}}
\index{MB\_REQUEST\_WRITE\_SINGLE\_REG@{MB\_REQUEST\_WRITE\_SINGLE\_REG}!API for Master Requests@{API for Master Requests}}
\doxysubsubsubsubsection{\texorpdfstring{MB\_REQUEST\_WRITE\_SINGLE\_REG()}{MB\_REQUEST\_WRITE\_SINGLE\_REG()}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___r_e_q_u_e_s_t___m_s_g_ga0126cfaf44c73d84d521b16c0f6ab7b6}
\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} MB\+\_\+\+REQUEST\+\_\+\+WRITE\+\_\+\+SINGLE\+\_\+\+REG (\begin{DoxyParamCaption}\item[{uint8\+\_\+t}]{slave\+\_\+addr}{, }\item[{uint16\+\_\+t}]{reg\+\_\+addr}{, }\item[{uint16\+\_\+t}]{value}{}\end{DoxyParamCaption})}
Сформировать запрос на запись одного регистра
Definition at line \mbox{\hyperlink{modbus__master_8c_source_l00619}{619}} of file \mbox{\hyperlink{modbus__master_8c_source}{modbus\+\_\+master.\+c}}.
\Hypertarget{group___m_o_d_b_u_s___r_e_q_u_e_s_t___m_s_g_ga92c7c61bc6b3e249350d93d20b530fa3}\index{API for Master Requests@{API for Master Requests}!MB\_REQUEST\_WRITE\_MULTIPLE\_COILS@{MB\_REQUEST\_WRITE\_MULTIPLE\_COILS}}
\index{MB\_REQUEST\_WRITE\_MULTIPLE\_COILS@{MB\_REQUEST\_WRITE\_MULTIPLE\_COILS}!API for Master Requests@{API for Master Requests}}
\doxysubsubsubsubsection{\texorpdfstring{MB\_REQUEST\_WRITE\_MULTIPLE\_COILS()}{MB\_REQUEST\_WRITE\_MULTIPLE\_COILS()}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___r_e_q_u_e_s_t___m_s_g_ga92c7c61bc6b3e249350d93d20b530fa3}
\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} MB\+\_\+\+REQUEST\+\_\+\+WRITE\+\_\+\+MULTIPLE\+\_\+\+COILS (\begin{DoxyParamCaption}\item[{uint8\+\_\+t}]{slave\+\_\+addr}{, }\item[{uint16\+\_\+t}]{start\+\_\+addr}{, }\item[{uint16\+\_\+t}]{quantity}{, }\item[{uint8\+\_\+t \texorpdfstring{$\ast$}{*}}]{coils\+\_\+data}{}\end{DoxyParamCaption})}
Сформировать запрос на запись нескольких регистров
Definition at line \mbox{\hyperlink{modbus__master_8c_source_l00626}{626}} of file \mbox{\hyperlink{modbus__master_8c_source}{modbus\+\_\+master.\+c}}.
\Hypertarget{group___m_o_d_b_u_s___r_e_q_u_e_s_t___m_s_g_ga9b89a034f1c5ed96572621b2ebe7f6af}\index{API for Master Requests@{API for Master Requests}!MB\_REQUEST\_WRITE\_MULTIPLE\_REGS@{MB\_REQUEST\_WRITE\_MULTIPLE\_REGS}}
\index{MB\_REQUEST\_WRITE\_MULTIPLE\_REGS@{MB\_REQUEST\_WRITE\_MULTIPLE\_REGS}!API for Master Requests@{API for Master Requests}}
\doxysubsubsubsubsection{\texorpdfstring{MB\_REQUEST\_WRITE\_MULTIPLE\_REGS()}{MB\_REQUEST\_WRITE\_MULTIPLE\_REGS()}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___r_e_q_u_e_s_t___m_s_g_ga9b89a034f1c5ed96572621b2ebe7f6af}
\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} MB\+\_\+\+REQUEST\+\_\+\+WRITE\+\_\+\+MULTIPLE\+\_\+\+REGS (\begin{DoxyParamCaption}\item[{uint8\+\_\+t}]{slave\+\_\+addr}{, }\item[{uint16\+\_\+t}]{start\+\_\+addr}{, }\item[{uint16\+\_\+t}]{quantity}{, }\item[{uint16\+\_\+t \texorpdfstring{$\ast$}{*}}]{regs\+\_\+data}{}\end{DoxyParamCaption})}
Сформировать запрос на запись нескольких коилов
Definition at line \mbox{\hyperlink{modbus__master_8c_source_l00645}{645}} of file \mbox{\hyperlink{modbus__master_8c_source}{modbus\+\_\+master.\+c}}.
\Hypertarget{group___m_o_d_b_u_s___r_e_q_u_e_s_t___m_s_g_ga426c984872d854c539fd8c238d63771b}\index{API for Master Requests@{API for Master Requests}!MB\_REQUEST\_DIAGNOSTIC\_QUERY@{MB\_REQUEST\_DIAGNOSTIC\_QUERY}}
\index{MB\_REQUEST\_DIAGNOSTIC\_QUERY@{MB\_REQUEST\_DIAGNOSTIC\_QUERY}!API for Master Requests@{API for Master Requests}}
\doxysubsubsubsubsection{\texorpdfstring{MB\_REQUEST\_DIAGNOSTIC\_QUERY()}{MB\_REQUEST\_DIAGNOSTIC\_QUERY()}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___r_e_q_u_e_s_t___m_s_g_ga426c984872d854c539fd8c238d63771b}
\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} MB\+\_\+\+REQUEST\+\_\+\+DIAGNOSTIC\+\_\+\+QUERY (\begin{DoxyParamCaption}\item[{uint8\+\_\+t}]{slave\+\_\+addr}{, }\item[{uint16\+\_\+t}]{sub\+\_\+function}{, }\item[{uint16\+\_\+t}]{data}{}\end{DoxyParamCaption})}
Definition at line \mbox{\hyperlink{modbus__master_8c_source_l00660}{660}} of file \mbox{\hyperlink{modbus__master_8c_source}{modbus\+\_\+master.\+c}}.
\Hypertarget{group___m_o_d_b_u_s___r_e_q_u_e_s_t___m_s_g_ga6480ddbb52591379806a4772b1e0314c}\index{API for Master Requests@{API for Master Requests}!MB\_REQUEST\_RETURN\_QUERY\_DATA@{MB\_REQUEST\_RETURN\_QUERY\_DATA}}
\index{MB\_REQUEST\_RETURN\_QUERY\_DATA@{MB\_REQUEST\_RETURN\_QUERY\_DATA}!API for Master Requests@{API for Master Requests}}
\doxysubsubsubsubsection{\texorpdfstring{MB\_REQUEST\_RETURN\_QUERY\_DATA()}{MB\_REQUEST\_RETURN\_QUERY\_DATA()}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___r_e_q_u_e_s_t___m_s_g_ga6480ddbb52591379806a4772b1e0314c}
\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} MB\+\_\+\+REQUEST\+\_\+\+RETURN\+\_\+\+QUERY\+\_\+\+DATA (\begin{DoxyParamCaption}\item[{uint8\+\_\+t}]{slave\+\_\+addr}{}\end{DoxyParamCaption})}
Definition at line \mbox{\hyperlink{modbus__master_8c_source_l00665}{665}} of file \mbox{\hyperlink{modbus__master_8c_source}{modbus\+\_\+master.\+c}}.
\Hypertarget{group___m_o_d_b_u_s___r_e_q_u_e_s_t___m_s_g_gaac4012ed36456d42a4ab43bafa464c5d}\index{API for Master Requests@{API for Master Requests}!MB\_REQUEST\_RESTART\_COMMUNICATIONS@{MB\_REQUEST\_RESTART\_COMMUNICATIONS}}
\index{MB\_REQUEST\_RESTART\_COMMUNICATIONS@{MB\_REQUEST\_RESTART\_COMMUNICATIONS}!API for Master Requests@{API for Master Requests}}
\doxysubsubsubsubsection{\texorpdfstring{MB\_REQUEST\_RESTART\_COMMUNICATIONS()}{MB\_REQUEST\_RESTART\_COMMUNICATIONS()}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___r_e_q_u_e_s_t___m_s_g_gaac4012ed36456d42a4ab43bafa464c5d}
\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} MB\+\_\+\+REQUEST\+\_\+\+RESTART\+\_\+\+COMMUNICATIONS (\begin{DoxyParamCaption}\item[{uint8\+\_\+t}]{slave\+\_\+addr}{, }\item[{uint16\+\_\+t}]{data}{}\end{DoxyParamCaption})}
Definition at line \mbox{\hyperlink{modbus__master_8c_source_l00670}{670}} of file \mbox{\hyperlink{modbus__master_8c_source}{modbus\+\_\+master.\+c}}.
\Hypertarget{group___m_o_d_b_u_s___r_e_q_u_e_s_t___m_s_g_ga2273cca5ebb04144c64531fd0c0694ed}\index{API for Master Requests@{API for Master Requests}!MB\_REQUEST\_RETURN\_DIAGNOSTIC\_REGISTER@{MB\_REQUEST\_RETURN\_DIAGNOSTIC\_REGISTER}}
\index{MB\_REQUEST\_RETURN\_DIAGNOSTIC\_REGISTER@{MB\_REQUEST\_RETURN\_DIAGNOSTIC\_REGISTER}!API for Master Requests@{API for Master Requests}}
\doxysubsubsubsubsection{\texorpdfstring{MB\_REQUEST\_RETURN\_DIAGNOSTIC\_REGISTER()}{MB\_REQUEST\_RETURN\_DIAGNOSTIC\_REGISTER()}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___r_e_q_u_e_s_t___m_s_g_ga2273cca5ebb04144c64531fd0c0694ed}
\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} MB\+\_\+\+REQUEST\+\_\+\+RETURN\+\_\+\+DIAGNOSTIC\+\_\+\+REGISTER (\begin{DoxyParamCaption}\item[{uint8\+\_\+t}]{slave\+\_\+addr}{}\end{DoxyParamCaption})}
Definition at line \mbox{\hyperlink{modbus__master_8c_source_l00675}{675}} of file \mbox{\hyperlink{modbus__master_8c_source}{modbus\+\_\+master.\+c}}.
\Hypertarget{group___m_o_d_b_u_s___r_e_q_u_e_s_t___m_s_g_gae6530484fa78fb3e02755b300f0c2b02}\index{API for Master Requests@{API for Master Requests}!MB\_REQUEST\_FORCE\_LISTEN\_ONLY\_MODE@{MB\_REQUEST\_FORCE\_LISTEN\_ONLY\_MODE}}
\index{MB\_REQUEST\_FORCE\_LISTEN\_ONLY\_MODE@{MB\_REQUEST\_FORCE\_LISTEN\_ONLY\_MODE}!API for Master Requests@{API for Master Requests}}
\doxysubsubsubsubsection{\texorpdfstring{MB\_REQUEST\_FORCE\_LISTEN\_ONLY\_MODE()}{MB\_REQUEST\_FORCE\_LISTEN\_ONLY\_MODE()}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___r_e_q_u_e_s_t___m_s_g_gae6530484fa78fb3e02755b300f0c2b02}
\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} MB\+\_\+\+REQUEST\+\_\+\+FORCE\+\_\+\+LISTEN\+\_\+\+ONLY\+\_\+\+MODE (\begin{DoxyParamCaption}\item[{uint8\+\_\+t}]{slave\+\_\+addr}{}\end{DoxyParamCaption})}
Definition at line \mbox{\hyperlink{modbus__master_8c_source_l00680}{680}} of file \mbox{\hyperlink{modbus__master_8c_source}{modbus\+\_\+master.\+c}}.
\Hypertarget{group___m_o_d_b_u_s___r_e_q_u_e_s_t___m_s_g_gada53cc333c773842805b95d9a87a65db}\index{API for Master Requests@{API for Master Requests}!MB\_REQUEST\_CLEAR\_COUNTERS\_AND\_DIAGNOSTIC\_REGISTER@{MB\_REQUEST\_CLEAR\_COUNTERS\_AND\_DIAGNOSTIC\_REGISTER}}
\index{MB\_REQUEST\_CLEAR\_COUNTERS\_AND\_DIAGNOSTIC\_REGISTER@{MB\_REQUEST\_CLEAR\_COUNTERS\_AND\_DIAGNOSTIC\_REGISTER}!API for Master Requests@{API for Master Requests}}
\doxysubsubsubsubsection{\texorpdfstring{MB\_REQUEST\_CLEAR\_COUNTERS\_AND\_DIAGNOSTIC\_REGISTER()}{MB\_REQUEST\_CLEAR\_COUNTERS\_AND\_DIAGNOSTIC\_REGISTER()}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___r_e_q_u_e_s_t___m_s_g_gada53cc333c773842805b95d9a87a65db}
\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} MB\+\_\+\+REQUEST\+\_\+\+CLEAR\+\_\+\+COUNTERS\+\_\+\+AND\+\_\+\+DIAGNOSTIC\+\_\+\+REGISTER (\begin{DoxyParamCaption}\item[{uint8\+\_\+t}]{slave\+\_\+addr}{}\end{DoxyParamCaption})}
Definition at line \mbox{\hyperlink{modbus__master_8c_source_l00685}{685}} of file \mbox{\hyperlink{modbus__master_8c_source}{modbus\+\_\+master.\+c}}.
\Hypertarget{group___m_o_d_b_u_s___r_e_q_u_e_s_t___m_s_g_gacb5228130ea1b22b88c19887d92f7be0}\index{API for Master Requests@{API for Master Requests}!MB\_REQUEST\_RETURN\_BUS\_MESSAGE\_COUNT@{MB\_REQUEST\_RETURN\_BUS\_MESSAGE\_COUNT}}
\index{MB\_REQUEST\_RETURN\_BUS\_MESSAGE\_COUNT@{MB\_REQUEST\_RETURN\_BUS\_MESSAGE\_COUNT}!API for Master Requests@{API for Master Requests}}
\doxysubsubsubsubsection{\texorpdfstring{MB\_REQUEST\_RETURN\_BUS\_MESSAGE\_COUNT()}{MB\_REQUEST\_RETURN\_BUS\_MESSAGE\_COUNT()}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___r_e_q_u_e_s_t___m_s_g_gacb5228130ea1b22b88c19887d92f7be0}
\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} MB\+\_\+\+REQUEST\+\_\+\+RETURN\+\_\+\+BUS\+\_\+\+MESSAGE\+\_\+\+COUNT (\begin{DoxyParamCaption}\item[{uint8\+\_\+t}]{slave\+\_\+addr}{}\end{DoxyParamCaption})}
Definition at line \mbox{\hyperlink{modbus__master_8c_source_l00690}{690}} of file \mbox{\hyperlink{modbus__master_8c_source}{modbus\+\_\+master.\+c}}.
\Hypertarget{group___m_o_d_b_u_s___r_e_q_u_e_s_t___m_s_g_gadd99de894b4454ca996f62e7087c0189}\index{API for Master Requests@{API for Master Requests}!MB\_REQUEST\_RETURN\_BUS\_COMMUNICATION\_ERROR\_COUNT@{MB\_REQUEST\_RETURN\_BUS\_COMMUNICATION\_ERROR\_COUNT}}
\index{MB\_REQUEST\_RETURN\_BUS\_COMMUNICATION\_ERROR\_COUNT@{MB\_REQUEST\_RETURN\_BUS\_COMMUNICATION\_ERROR\_COUNT}!API for Master Requests@{API for Master Requests}}
\doxysubsubsubsubsection{\texorpdfstring{MB\_REQUEST\_RETURN\_BUS\_COMMUNICATION\_ERROR\_COUNT()}{MB\_REQUEST\_RETURN\_BUS\_COMMUNICATION\_ERROR\_COUNT()}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___r_e_q_u_e_s_t___m_s_g_gadd99de894b4454ca996f62e7087c0189}
\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} MB\+\_\+\+REQUEST\+\_\+\+RETURN\+\_\+\+BUS\+\_\+\+COMMUNICATION\+\_\+\+ERROR\+\_\+\+COUNT (\begin{DoxyParamCaption}\item[{uint8\+\_\+t}]{slave\+\_\+addr}{}\end{DoxyParamCaption})}
Definition at line \mbox{\hyperlink{modbus__master_8c_source_l00695}{695}} of file \mbox{\hyperlink{modbus__master_8c_source}{modbus\+\_\+master.\+c}}.
\Hypertarget{group___m_o_d_b_u_s___r_e_q_u_e_s_t___m_s_g_ga389ab419af02c8c3c5d4aae28fb17101}\index{API for Master Requests@{API for Master Requests}!MB\_REQUEST\_RETURN\_SLAVE\_EXCEPTION\_ERROR\_COUNT@{MB\_REQUEST\_RETURN\_SLAVE\_EXCEPTION\_ERROR\_COUNT}}
\index{MB\_REQUEST\_RETURN\_SLAVE\_EXCEPTION\_ERROR\_COUNT@{MB\_REQUEST\_RETURN\_SLAVE\_EXCEPTION\_ERROR\_COUNT}!API for Master Requests@{API for Master Requests}}
\doxysubsubsubsubsection{\texorpdfstring{MB\_REQUEST\_RETURN\_SLAVE\_EXCEPTION\_ERROR\_COUNT()}{MB\_REQUEST\_RETURN\_SLAVE\_EXCEPTION\_ERROR\_COUNT()}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___r_e_q_u_e_s_t___m_s_g_ga389ab419af02c8c3c5d4aae28fb17101}
\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} MB\+\_\+\+REQUEST\+\_\+\+RETURN\+\_\+\+SLAVE\+\_\+\+EXCEPTION\+\_\+\+ERROR\+\_\+\+COUNT (\begin{DoxyParamCaption}\item[{uint8\+\_\+t}]{slave\+\_\+addr}{}\end{DoxyParamCaption})}
Definition at line \mbox{\hyperlink{modbus__master_8c_source_l00700}{700}} of file \mbox{\hyperlink{modbus__master_8c_source}{modbus\+\_\+master.\+c}}.
\Hypertarget{group___m_o_d_b_u_s___r_e_q_u_e_s_t___m_s_g_ga9c40062ec23c64144688aa7828eccd23}\index{API for Master Requests@{API for Master Requests}!MB\_REQUEST\_RETURN\_SLAVE\_MESSAGE\_COUNT@{MB\_REQUEST\_RETURN\_SLAVE\_MESSAGE\_COUNT}}
\index{MB\_REQUEST\_RETURN\_SLAVE\_MESSAGE\_COUNT@{MB\_REQUEST\_RETURN\_SLAVE\_MESSAGE\_COUNT}!API for Master Requests@{API for Master Requests}}
\doxysubsubsubsubsection{\texorpdfstring{MB\_REQUEST\_RETURN\_SLAVE\_MESSAGE\_COUNT()}{MB\_REQUEST\_RETURN\_SLAVE\_MESSAGE\_COUNT()}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___r_e_q_u_e_s_t___m_s_g_ga9c40062ec23c64144688aa7828eccd23}
\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} MB\+\_\+\+REQUEST\+\_\+\+RETURN\+\_\+\+SLAVE\+\_\+\+MESSAGE\+\_\+\+COUNT (\begin{DoxyParamCaption}\item[{uint8\+\_\+t}]{slave\+\_\+addr}{}\end{DoxyParamCaption})}
Definition at line \mbox{\hyperlink{modbus__master_8c_source_l00705}{705}} of file \mbox{\hyperlink{modbus__master_8c_source}{modbus\+\_\+master.\+c}}.
\Hypertarget{group___m_o_d_b_u_s___r_e_q_u_e_s_t___m_s_g_ga5300643a1bf60cf0a78d594c9abc1b0e}\index{API for Master Requests@{API for Master Requests}!MB\_REQUEST\_RETURN\_SLAVE\_NO\_RESPONSE\_COUNT@{MB\_REQUEST\_RETURN\_SLAVE\_NO\_RESPONSE\_COUNT}}
\index{MB\_REQUEST\_RETURN\_SLAVE\_NO\_RESPONSE\_COUNT@{MB\_REQUEST\_RETURN\_SLAVE\_NO\_RESPONSE\_COUNT}!API for Master Requests@{API for Master Requests}}
\doxysubsubsubsubsection{\texorpdfstring{MB\_REQUEST\_RETURN\_SLAVE\_NO\_RESPONSE\_COUNT()}{MB\_REQUEST\_RETURN\_SLAVE\_NO\_RESPONSE\_COUNT()}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___r_e_q_u_e_s_t___m_s_g_ga5300643a1bf60cf0a78d594c9abc1b0e}
\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} MB\+\_\+\+REQUEST\+\_\+\+RETURN\+\_\+\+SLAVE\+\_\+\+NO\+\_\+\+RESPONSE\+\_\+\+COUNT (\begin{DoxyParamCaption}\item[{uint8\+\_\+t}]{slave\+\_\+addr}{}\end{DoxyParamCaption})}
Definition at line \mbox{\hyperlink{modbus__master_8c_source_l00710}{710}} of file \mbox{\hyperlink{modbus__master_8c_source}{modbus\+\_\+master.\+c}}.
\Hypertarget{group___m_o_d_b_u_s___r_e_q_u_e_s_t___m_s_g_gacb578b9c708617fc0223d462ae3749c0}\index{API for Master Requests@{API for Master Requests}!MB\_REQUEST\_RETURN\_SLAVE\_NAK\_COUNT@{MB\_REQUEST\_RETURN\_SLAVE\_NAK\_COUNT}}
\index{MB\_REQUEST\_RETURN\_SLAVE\_NAK\_COUNT@{MB\_REQUEST\_RETURN\_SLAVE\_NAK\_COUNT}!API for Master Requests@{API for Master Requests}}
\doxysubsubsubsubsection{\texorpdfstring{MB\_REQUEST\_RETURN\_SLAVE\_NAK\_COUNT()}{MB\_REQUEST\_RETURN\_SLAVE\_NAK\_COUNT()}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___r_e_q_u_e_s_t___m_s_g_gacb578b9c708617fc0223d462ae3749c0}
\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} MB\+\_\+\+REQUEST\+\_\+\+RETURN\+\_\+\+SLAVE\+\_\+\+NAK\+\_\+\+COUNT (\begin{DoxyParamCaption}\item[{uint8\+\_\+t}]{slave\+\_\+addr}{}\end{DoxyParamCaption})}
Definition at line \mbox{\hyperlink{modbus__master_8c_source_l00715}{715}} of file \mbox{\hyperlink{modbus__master_8c_source}{modbus\+\_\+master.\+c}}.
\Hypertarget{group___m_o_d_b_u_s___r_e_q_u_e_s_t___m_s_g_ga72c99bd3d8ee2de2e6748086f66a6955}\index{API for Master Requests@{API for Master Requests}!MB\_REQUEST\_RETURN\_SLAVE\_BUSY\_COUNT@{MB\_REQUEST\_RETURN\_SLAVE\_BUSY\_COUNT}}
\index{MB\_REQUEST\_RETURN\_SLAVE\_BUSY\_COUNT@{MB\_REQUEST\_RETURN\_SLAVE\_BUSY\_COUNT}!API for Master Requests@{API for Master Requests}}
\doxysubsubsubsubsection{\texorpdfstring{MB\_REQUEST\_RETURN\_SLAVE\_BUSY\_COUNT()}{MB\_REQUEST\_RETURN\_SLAVE\_BUSY\_COUNT()}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___r_e_q_u_e_s_t___m_s_g_ga72c99bd3d8ee2de2e6748086f66a6955}
\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} MB\+\_\+\+REQUEST\+\_\+\+RETURN\+\_\+\+SLAVE\+\_\+\+BUSY\+\_\+\+COUNT (\begin{DoxyParamCaption}\item[{uint8\+\_\+t}]{slave\+\_\+addr}{}\end{DoxyParamCaption})}
Definition at line \mbox{\hyperlink{modbus__master_8c_source_l00720}{720}} of file \mbox{\hyperlink{modbus__master_8c_source}{modbus\+\_\+master.\+c}}.
\Hypertarget{group___m_o_d_b_u_s___r_e_q_u_e_s_t___m_s_g_ga9fa3920579485c7a23927748a7fcf4c0}\index{API for Master Requests@{API for Master Requests}!MB\_REQUEST\_RETURN\_BUS\_CHARACTER\_OVERRUN\_COUNT@{MB\_REQUEST\_RETURN\_BUS\_CHARACTER\_OVERRUN\_COUNT}}
\index{MB\_REQUEST\_RETURN\_BUS\_CHARACTER\_OVERRUN\_COUNT@{MB\_REQUEST\_RETURN\_BUS\_CHARACTER\_OVERRUN\_COUNT}!API for Master Requests@{API for Master Requests}}
\doxysubsubsubsubsection{\texorpdfstring{MB\_REQUEST\_RETURN\_BUS\_CHARACTER\_OVERRUN\_COUNT()}{MB\_REQUEST\_RETURN\_BUS\_CHARACTER\_OVERRUN\_COUNT()}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___r_e_q_u_e_s_t___m_s_g_ga9fa3920579485c7a23927748a7fcf4c0}
\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} MB\+\_\+\+REQUEST\+\_\+\+RETURN\+\_\+\+BUS\+\_\+\+CHARACTER\+\_\+\+OVERRUN\+\_\+\+COUNT (\begin{DoxyParamCaption}\item[{uint8\+\_\+t}]{slave\+\_\+addr}{}\end{DoxyParamCaption})}
Definition at line \mbox{\hyperlink{modbus__master_8c_source_l00725}{725}} of file \mbox{\hyperlink{modbus__master_8c_source}{modbus\+\_\+master.\+c}}.
\Hypertarget{group___m_o_d_b_u_s___r_e_q_u_e_s_t___m_s_g_gaaccf0865d45ec20438b06698d7fa1810}\index{API for Master Requests@{API for Master Requests}!MB\_REQUEST\_READ\_DEVICE\_ID\_BASIC@{MB\_REQUEST\_READ\_DEVICE\_ID\_BASIC}}
\index{MB\_REQUEST\_READ\_DEVICE\_ID\_BASIC@{MB\_REQUEST\_READ\_DEVICE\_ID\_BASIC}!API for Master Requests@{API for Master Requests}}
\doxysubsubsubsubsection{\texorpdfstring{MB\_REQUEST\_READ\_DEVICE\_ID\_BASIC()}{MB\_REQUEST\_READ\_DEVICE\_ID\_BASIC()}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___r_e_q_u_e_s_t___m_s_g_gaaccf0865d45ec20438b06698d7fa1810}
\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} MB\+\_\+\+REQUEST\+\_\+\+READ\+\_\+\+DEVICE\+\_\+\+ID\+\_\+\+BASIC (\begin{DoxyParamCaption}\item[{uint8\+\_\+t}]{slave\+\_\+addr}{}\end{DoxyParamCaption})}
Definition at line \mbox{\hyperlink{modbus__master_8c_source_l00731}{731}} of file \mbox{\hyperlink{modbus__master_8c_source}{modbus\+\_\+master.\+c}}.
\Hypertarget{group___m_o_d_b_u_s___r_e_q_u_e_s_t___m_s_g_ga016ad086488ff121aa6354ed6e617255}\index{API for Master Requests@{API for Master Requests}!MB\_REQUEST\_READ\_DEVICE\_ID\_REGULAR@{MB\_REQUEST\_READ\_DEVICE\_ID\_REGULAR}}
\index{MB\_REQUEST\_READ\_DEVICE\_ID\_REGULAR@{MB\_REQUEST\_READ\_DEVICE\_ID\_REGULAR}!API for Master Requests@{API for Master Requests}}
\doxysubsubsubsubsection{\texorpdfstring{MB\_REQUEST\_READ\_DEVICE\_ID\_REGULAR()}{MB\_REQUEST\_READ\_DEVICE\_ID\_REGULAR()}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___r_e_q_u_e_s_t___m_s_g_ga016ad086488ff121aa6354ed6e617255}
\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} MB\+\_\+\+REQUEST\+\_\+\+READ\+\_\+\+DEVICE\+\_\+\+ID\+\_\+\+REGULAR (\begin{DoxyParamCaption}\item[{uint8\+\_\+t}]{slave\+\_\+addr}{}\end{DoxyParamCaption})}
Definition at line \mbox{\hyperlink{modbus__master_8c_source_l00737}{737}} of file \mbox{\hyperlink{modbus__master_8c_source}{modbus\+\_\+master.\+c}}.
\Hypertarget{group___m_o_d_b_u_s___r_e_q_u_e_s_t___m_s_g_ga8ace1339daa02649df909e5cd1b9143c}\index{API for Master Requests@{API for Master Requests}!MB\_REQUEST\_READ\_DEVICE\_ID\_EXTENDED@{MB\_REQUEST\_READ\_DEVICE\_ID\_EXTENDED}}
\index{MB\_REQUEST\_READ\_DEVICE\_ID\_EXTENDED@{MB\_REQUEST\_READ\_DEVICE\_ID\_EXTENDED}!API for Master Requests@{API for Master Requests}}
\doxysubsubsubsubsection{\texorpdfstring{MB\_REQUEST\_READ\_DEVICE\_ID\_EXTENDED()}{MB\_REQUEST\_READ\_DEVICE\_ID\_EXTENDED()}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___r_e_q_u_e_s_t___m_s_g_ga8ace1339daa02649df909e5cd1b9143c}
\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} MB\+\_\+\+REQUEST\+\_\+\+READ\+\_\+\+DEVICE\+\_\+\+ID\+\_\+\+EXTENDED (\begin{DoxyParamCaption}\item[{uint8\+\_\+t}]{slave\+\_\+addr}{}\end{DoxyParamCaption})}
Definition at line \mbox{\hyperlink{modbus__master_8c_source_l00743}{743}} of file \mbox{\hyperlink{modbus__master_8c_source}{modbus\+\_\+master.\+c}}.
\Hypertarget{group___m_o_d_b_u_s___r_e_q_u_e_s_t___m_s_g_ga4c00a4432ea240d6f6629a9bead0c5b8}\index{API for Master Requests@{API for Master Requests}!MB\_REQUEST\_READ\_DEVICE\_ID\_SPECIFIC@{MB\_REQUEST\_READ\_DEVICE\_ID\_SPECIFIC}}
\index{MB\_REQUEST\_READ\_DEVICE\_ID\_SPECIFIC@{MB\_REQUEST\_READ\_DEVICE\_ID\_SPECIFIC}!API for Master Requests@{API for Master Requests}}
\doxysubsubsubsubsection{\texorpdfstring{MB\_REQUEST\_READ\_DEVICE\_ID\_SPECIFIC()}{MB\_REQUEST\_READ\_DEVICE\_ID\_SPECIFIC()}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___r_e_q_u_e_s_t___m_s_g_ga4c00a4432ea240d6f6629a9bead0c5b8}
\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} MB\+\_\+\+REQUEST\+\_\+\+READ\+\_\+\+DEVICE\+\_\+\+ID\+\_\+\+SPECIFIC (\begin{DoxyParamCaption}\item[{uint8\+\_\+t}]{slave\+\_\+addr}{, }\item[{uint8\+\_\+t}]{object\+\_\+id}{}\end{DoxyParamCaption})}
Definition at line \mbox{\hyperlink{modbus__master_8c_source_l00749}{749}} of file \mbox{\hyperlink{modbus__master_8c_source}{modbus\+\_\+master.\+c}}.
\input{group___m_o_d_b_u_s___r_e_g_s___a_p_i}
\input{group___m_o_d_b_u_s___r_e_q___c_o_i_l_s___a_p_i}
\input{group___m_o_d_b_u_s___r_e_q___d_e_f_i_d___a_p_i}
\input{group___m_o_d_b_u_s___r_e_q___d_i_a_g___a_p_i}

View File

@@ -0,0 +1 @@
0ee4eba65b08f682d4a08edd37bc268b

View File

@@ -0,0 +1,109 @@
\doxysubsubsubsection{Modbus slave funtions }
\hypertarget{group___m_o_d_b_u_s___s_l_a_v_e}{}\label{group___m_o_d_b_u_s___s_l_a_v_e}\index{Modbus slave funtions@{Modbus slave funtions}}
Функции для работы в режиме Slave.
Collaboration diagram for Modbus slave funtions\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{group___m_o_d_b_u_s___s_l_a_v_e}
\end{center}
\end{figure}
\doxysubsubsubsubsubsection*{Functions}
\begin{DoxyCompactItemize}
\item
\mbox{\hyperlink{group___r_s___t_o_o_l_s_ga727154b368397b4796aa892de12a2289}{RS\+\_\+\+Status\+Type\+Def}} \mbox{\hyperlink{group___m_o_d_b_u_s___s_l_a_v_e_gacb44db7ef6ef32b08f4ffe0178eabee8}{MB\+\_\+\+Slave\+\_\+\+Response}} (\mbox{\hyperlink{struct_r_s___handle_type_def}{RS\+\_\+\+Handle\+Type\+Def}} \texorpdfstring{$\ast$}{*}hmodbus, \mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \texorpdfstring{$\ast$}{*}modbus\+\_\+msg)
\begin{DoxyCompactList}\small\item\em Ответ на сообщение в режиме слейва. \end{DoxyCompactList}\item
\mbox{\hyperlink{group___r_s___t_o_o_l_s_ga727154b368397b4796aa892de12a2289}{RS\+\_\+\+Status\+Type\+Def}} \mbox{\hyperlink{group___m_o_d_b_u_s___s_l_a_v_e_ga1c73cfdcbe7bc6076f62a4ec9c211eee}{MB\+\_\+\+Slave\+\_\+\+Collect\+\_\+\+Message}} (\mbox{\hyperlink{struct_r_s___handle_type_def}{RS\+\_\+\+Handle\+Type\+Def}} \texorpdfstring{$\ast$}{*}hmodbus, \mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \texorpdfstring{$\ast$}{*}modbus\+\_\+msg, uint8\+\_\+t \texorpdfstring{$\ast$}{*}modbus\+\_\+uart\+\_\+buff)
\begin{DoxyCompactList}\small\item\em Сбор сообщения в буфер UART в режиме слейв (фрейм слейва из msg -\/\texorpdfstring{$>$}{>} uart). \end{DoxyCompactList}\item
\mbox{\hyperlink{group___r_s___t_o_o_l_s_ga727154b368397b4796aa892de12a2289}{RS\+\_\+\+Status\+Type\+Def}} \mbox{\hyperlink{group___m_o_d_b_u_s___s_l_a_v_e_gadc281b1044c4ae345d10db6497846cef}{MB\+\_\+\+Slave\+\_\+\+Parse\+\_\+\+Message}} (\mbox{\hyperlink{struct_r_s___handle_type_def}{RS\+\_\+\+Handle\+Type\+Def}} \texorpdfstring{$\ast$}{*}hmodbus, \mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \texorpdfstring{$\ast$}{*}modbus\+\_\+msg, uint8\+\_\+t \texorpdfstring{$\ast$}{*}modbus\+\_\+uart\+\_\+buff)
\begin{DoxyCompactList}\small\item\em Парс сообщения в режиме слейв (фрейм мастера из uart -\/\texorpdfstring{$>$}{>} msg). \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsubsubsection{Detailed Description}
Функции для работы в режиме Slave.
Модуль реализации Modbus в режиме слейв
\label{doc-func-members}
\Hypertarget{group___m_o_d_b_u_s___s_l_a_v_e_doc-func-members}
\doxysubsubsubsubsection{Function Documentation}
\Hypertarget{group___m_o_d_b_u_s___s_l_a_v_e_gacb44db7ef6ef32b08f4ffe0178eabee8}\index{Modbus slave funtions@{Modbus slave funtions}!MB\_Slave\_Response@{MB\_Slave\_Response}}
\index{MB\_Slave\_Response@{MB\_Slave\_Response}!Modbus slave funtions@{Modbus slave funtions}}
\doxysubsubsubsubsubsection{\texorpdfstring{MB\_Slave\_Response()}{MB\_Slave\_Response()}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___s_l_a_v_e_gacb44db7ef6ef32b08f4ffe0178eabee8}
\mbox{\hyperlink{group___r_s___t_o_o_l_s_ga727154b368397b4796aa892de12a2289}{RS\+\_\+\+Status\+Type\+Def}} MB\+\_\+\+Slave\+\_\+\+Response (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{struct_r_s___handle_type_def}{RS\+\_\+\+Handle\+Type\+Def}} \texorpdfstring{$\ast$}{*}}]{hmodbus}{, }\item[{\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \texorpdfstring{$\ast$}{*}}]{modbus\+\_\+msg}{}\end{DoxyParamCaption})}
Ответ на сообщение в режиме слейва.
\begin{DoxyParams}{Parameters}
{\em hmodbus} & Указатель на хендлер RS. \\
\hline
{\em modbus\+\_\+msg} & Указатель на структуру сообщения. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
RS\+\_\+\+RES Статус о результате ответа на комманду.
\end{DoxyReturn}
Definition at line \mbox{\hyperlink{modbus__slave_8c_source_l00024}{24}} of file \mbox{\hyperlink{modbus__slave_8c_source}{modbus\+\_\+slave.\+c}}.
\Hypertarget{group___m_o_d_b_u_s___s_l_a_v_e_ga1c73cfdcbe7bc6076f62a4ec9c211eee}\index{Modbus slave funtions@{Modbus slave funtions}!MB\_Slave\_Collect\_Message@{MB\_Slave\_Collect\_Message}}
\index{MB\_Slave\_Collect\_Message@{MB\_Slave\_Collect\_Message}!Modbus slave funtions@{Modbus slave funtions}}
\doxysubsubsubsubsubsection{\texorpdfstring{MB\_Slave\_Collect\_Message()}{MB\_Slave\_Collect\_Message()}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___s_l_a_v_e_ga1c73cfdcbe7bc6076f62a4ec9c211eee}
\mbox{\hyperlink{group___r_s___t_o_o_l_s_ga727154b368397b4796aa892de12a2289}{RS\+\_\+\+Status\+Type\+Def}} MB\+\_\+\+Slave\+\_\+\+Collect\+\_\+\+Message (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{struct_r_s___handle_type_def}{RS\+\_\+\+Handle\+Type\+Def}} \texorpdfstring{$\ast$}{*}}]{hmodbus}{, }\item[{\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \texorpdfstring{$\ast$}{*}}]{modbus\+\_\+msg}{, }\item[{uint8\+\_\+t \texorpdfstring{$\ast$}{*}}]{modbus\+\_\+uart\+\_\+buff}{}\end{DoxyParamCaption})}
Сбор сообщения в буфер UART в режиме слейв (фрейм слейва из msg -\/\texorpdfstring{$>$}{>} uart).
\begin{DoxyParams}{Parameters}
{\em hmodbus} & Указатель на хендлер RS. \\
\hline
{\em modbus\+\_\+msg} & Указатель на структуру сообщения. \\
\hline
{\em modbus\+\_\+uart\+\_\+buff} & Указатель на буффер UART. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
RS\+\_\+\+RES Статус о результате заполнения буфера.
\end{DoxyReturn}
Definition at line \mbox{\hyperlink{modbus__slave_8c_source_l00167}{167}} of file \mbox{\hyperlink{modbus__slave_8c_source}{modbus\+\_\+slave.\+c}}.
\Hypertarget{group___m_o_d_b_u_s___s_l_a_v_e_gadc281b1044c4ae345d10db6497846cef}\index{Modbus slave funtions@{Modbus slave funtions}!MB\_Slave\_Parse\_Message@{MB\_Slave\_Parse\_Message}}
\index{MB\_Slave\_Parse\_Message@{MB\_Slave\_Parse\_Message}!Modbus slave funtions@{Modbus slave funtions}}
\doxysubsubsubsubsubsection{\texorpdfstring{MB\_Slave\_Parse\_Message()}{MB\_Slave\_Parse\_Message()}}
{\footnotesize\ttfamily \label{group___m_o_d_b_u_s___s_l_a_v_e_gadc281b1044c4ae345d10db6497846cef}
\mbox{\hyperlink{group___r_s___t_o_o_l_s_ga727154b368397b4796aa892de12a2289}{RS\+\_\+\+Status\+Type\+Def}} MB\+\_\+\+Slave\+\_\+\+Parse\+\_\+\+Message (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{struct_r_s___handle_type_def}{RS\+\_\+\+Handle\+Type\+Def}} \texorpdfstring{$\ast$}{*}}]{hmodbus}{, }\item[{\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \texorpdfstring{$\ast$}{*}}]{modbus\+\_\+msg}{, }\item[{uint8\+\_\+t \texorpdfstring{$\ast$}{*}}]{modbus\+\_\+uart\+\_\+buff}{}\end{DoxyParamCaption})}
Парс сообщения в режиме слейв (фрейм мастера из uart -\/\texorpdfstring{$>$}{>} msg).
\begin{DoxyParams}{Parameters}
{\em hmodbus} & Указатель на хендлер RS. \\
\hline
{\em modbus\+\_\+msg} & Указатель на структуру сообщения. \\
\hline
{\em modbus\+\_\+uart\+\_\+buff} & Указатель на буффер UART. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
RS\+\_\+\+RES Статус о результате заполнения структуры.
\end{DoxyReturn}
Заполнение структуры сообщения из буффера UART.
Definition at line \mbox{\hyperlink{modbus__slave_8c_source_l00330}{330}} of file \mbox{\hyperlink{modbus__slave_8c_source}{modbus\+\_\+slave.\+c}}.

View File

@@ -0,0 +1 @@
bb5aa6ba2836354d9a7e8993fb52f61f

Binary file not shown.

View File

@@ -0,0 +1,213 @@
\doxysubsection{Tools for debug RS/\+UART/\+TIM }
\hypertarget{group___r_s___d_e_b_u_g}{}\label{group___r_s___d_e_b_u_g}\index{Tools for debug RS/UART/TIM@{Tools for debug RS/UART/TIM}}
Дефайны для отладки периферии
Collaboration diagram for Tools for debug RS/\+UART/\+TIM\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=272pt]{group___r_s___d_e_b_u_g}
\end{center}
\end{figure}
\doxysubsubsubsection*{Macros}
\begin{DoxyCompactItemize}
\item
\#define \mbox{\hyperlink{group___r_s___d_e_b_u_g_ga00f6ba164717bd919fa6e9b25e1bbc21}{RS\+\_\+\+USER\+\_\+\+VARS\+\_\+\+NUMB}}~0
\begin{DoxyCompactList}\small\item\em Количество переменных в \doxylink{group___r_s___d_e_b_u_g_ga50ccb119acf302969b7fdcb58f2130e4}{Tracker\+Type\+Def}. \end{DoxyCompactList}\item
\#define \mbox{\hyperlink{group___r_s___d_e_b_u_g_ga50ccb119acf302969b7fdcb58f2130e4}{Tracker\+Type\+Def}}(num\+\_\+user\+\_\+vars)
\begin{DoxyCompactList}\small\item\em Тип структуры для счетчиков-\/переменных \end{DoxyCompactList}\item
\#define \mbox{\hyperlink{group___r_s___d_e_b_u_g_ga23de0006aa08984cfeddb6aa5e512fa1}{Tracker\+Cnt\+\_\+\+Ok}}(\+\_\+cntstruct\+\_\+)
\begin{DoxyCompactList}\small\item\em Инкрементировать переменную -\/ успешных событий \end{DoxyCompactList}\item
\#define \mbox{\hyperlink{group___r_s___d_e_b_u_g_ga49af29ab3927cad105c1d2b018a767e9}{Tracker\+Cnt\+\_\+\+Err}}(\+\_\+cntstruct\+\_\+)
\begin{DoxyCompactList}\small\item\em Инкрементировать переменную -\/ ошибок \end{DoxyCompactList}\item
\#define \mbox{\hyperlink{group___r_s___d_e_b_u_g_ga8017fb05a56a1b667244f1f786fa9c57}{Tracker\+Cnt\+\_\+\+Warn}}(\+\_\+cntstruct\+\_\+)
\begin{DoxyCompactList}\small\item\em Инкрементировать переменную -\/ предупреждений \end{DoxyCompactList}\item
\#define \mbox{\hyperlink{group___r_s___d_e_b_u_g_ga30a03e8d8912be85a203c829b581f999}{printf\+\_\+rs}}(...)
\begin{DoxyCompactList}\small\item\em Printf обычных событий RS/\+UART/\+TIM. \end{DoxyCompactList}\item
\#define \mbox{\hyperlink{group___r_s___d_e_b_u_g_ga830a5ed90667bf50ab8c409dcadb2a39}{printf\+\_\+rs\+\_\+err}}(...)
\begin{DoxyCompactList}\small\item\em Printf ошибок RS/\+UART/\+TIM. \end{DoxyCompactList}\item
\#define \mbox{\hyperlink{group___r_s___d_e_b_u_g_gab9d308969f924234bc879a93ffb80473}{RS\+\_\+\+TIM\+\_\+\+Handler\+\_\+\+ENTER}}()
\begin{DoxyCompactList}\small\item\em Действия при заходе в прерывания таймера \end{DoxyCompactList}\item
\#define \mbox{\hyperlink{group___r_s___d_e_b_u_g_gaa026e9bf8672373cfe265f96ea0f6061}{RS\+\_\+\+TIM\+\_\+\+Handler\+\_\+\+EXIT}}()
\begin{DoxyCompactList}\small\item\em Действия при выходе из прерывания таймера \end{DoxyCompactList}\item
\#define \mbox{\hyperlink{group___r_s___d_e_b_u_g_ga8c401e4d5d440001c1d879984107bb79}{RS\+\_\+\+UART\+\_\+\+Handler\+\_\+\+ENTER}}()
\begin{DoxyCompactList}\small\item\em Действия при заходе в прерывания UART. \end{DoxyCompactList}\item
\#define \mbox{\hyperlink{group___r_s___d_e_b_u_g_gade69fd26928788dd6f0278fcd15885ff}{RS\+\_\+\+UART\+\_\+\+Handler\+\_\+\+EXIT}}()
\begin{DoxyCompactList}\small\item\em Действия при выходе из прерывания UART. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsection{Detailed Description}
Дефайны для отладки периферии
\label{doc-define-members}
\Hypertarget{group___r_s___d_e_b_u_g_doc-define-members}
\doxysubsubsection{Macro Definition Documentation}
\Hypertarget{group___r_s___d_e_b_u_g_ga00f6ba164717bd919fa6e9b25e1bbc21}\index{Tools for debug RS/UART/TIM@{Tools for debug RS/UART/TIM}!RS\_USER\_VARS\_NUMB@{RS\_USER\_VARS\_NUMB}}
\index{RS\_USER\_VARS\_NUMB@{RS\_USER\_VARS\_NUMB}!Tools for debug RS/UART/TIM@{Tools for debug RS/UART/TIM}}
\doxysubsubsubsection{\texorpdfstring{RS\_USER\_VARS\_NUMB}{RS\_USER\_VARS\_NUMB}}
{\footnotesize\ttfamily \label{group___r_s___d_e_b_u_g_ga00f6ba164717bd919fa6e9b25e1bbc21}
\#define RS\+\_\+\+USER\+\_\+\+VARS\+\_\+\+NUMB~0}
Количество переменных в \doxylink{group___r_s___d_e_b_u_g_ga50ccb119acf302969b7fdcb58f2130e4}{Tracker\+Type\+Def}.
Definition at line \mbox{\hyperlink{rs__message_8h_source_l00097}{97}} of file \mbox{\hyperlink{rs__message_8h_source}{rs\+\_\+message.\+h}}.
\Hypertarget{group___r_s___d_e_b_u_g_ga50ccb119acf302969b7fdcb58f2130e4}\index{Tools for debug RS/UART/TIM@{Tools for debug RS/UART/TIM}!TrackerTypeDef@{TrackerTypeDef}}
\index{TrackerTypeDef@{TrackerTypeDef}!Tools for debug RS/UART/TIM@{Tools for debug RS/UART/TIM}}
\doxysubsubsubsection{\texorpdfstring{TrackerTypeDef}{TrackerTypeDef}}
{\footnotesize\ttfamily \label{group___r_s___d_e_b_u_g_ga50ccb119acf302969b7fdcb58f2130e4}
\#define Tracker\+Type\+Def(\begin{DoxyParamCaption}\item[{}]{num\+\_\+user\+\_\+vars}{}\end{DoxyParamCaption})}
{\bfseries Value\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{keywordtype}{void}\ *}
\end{DoxyCode}
Тип структуры для счетчиков-\/переменных
\begin{DoxyParams}{Parameters}
{\em num\+\_\+user\+\_\+vars} & Есть возмоность добавления num\+\_\+user\+\_\+vars количества пользовательскиъх переменных \\
\hline
\end{DoxyParams}
Definition at line \mbox{\hyperlink{rs__message_8h_source_l00104}{104}} of file \mbox{\hyperlink{rs__message_8h_source}{rs\+\_\+message.\+h}}.
\Hypertarget{group___r_s___d_e_b_u_g_ga23de0006aa08984cfeddb6aa5e512fa1}\index{Tools for debug RS/UART/TIM@{Tools for debug RS/UART/TIM}!TrackerCnt\_Ok@{TrackerCnt\_Ok}}
\index{TrackerCnt\_Ok@{TrackerCnt\_Ok}!Tools for debug RS/UART/TIM@{Tools for debug RS/UART/TIM}}
\doxysubsubsubsection{\texorpdfstring{TrackerCnt\_Ok}{TrackerCnt\_Ok}}
{\footnotesize\ttfamily \label{group___r_s___d_e_b_u_g_ga23de0006aa08984cfeddb6aa5e512fa1}
\#define Tracker\+Cnt\+\_\+\+Ok(\begin{DoxyParamCaption}\item[{}]{\+\_\+cntstruct\+\_\+}{}\end{DoxyParamCaption})}
Инкрементировать переменную -\/ успешных событий
Definition at line \mbox{\hyperlink{rs__message_8h_source_l00106}{106}} of file \mbox{\hyperlink{rs__message_8h_source}{rs\+\_\+message.\+h}}.
\Hypertarget{group___r_s___d_e_b_u_g_ga49af29ab3927cad105c1d2b018a767e9}\index{Tools for debug RS/UART/TIM@{Tools for debug RS/UART/TIM}!TrackerCnt\_Err@{TrackerCnt\_Err}}
\index{TrackerCnt\_Err@{TrackerCnt\_Err}!Tools for debug RS/UART/TIM@{Tools for debug RS/UART/TIM}}
\doxysubsubsubsection{\texorpdfstring{TrackerCnt\_Err}{TrackerCnt\_Err}}
{\footnotesize\ttfamily \label{group___r_s___d_e_b_u_g_ga49af29ab3927cad105c1d2b018a767e9}
\#define Tracker\+Cnt\+\_\+\+Err(\begin{DoxyParamCaption}\item[{}]{\+\_\+cntstruct\+\_\+}{}\end{DoxyParamCaption})}
Инкрементировать переменную -\/ ошибок
Definition at line \mbox{\hyperlink{rs__message_8h_source_l00108}{108}} of file \mbox{\hyperlink{rs__message_8h_source}{rs\+\_\+message.\+h}}.
\Hypertarget{group___r_s___d_e_b_u_g_ga8017fb05a56a1b667244f1f786fa9c57}\index{Tools for debug RS/UART/TIM@{Tools for debug RS/UART/TIM}!TrackerCnt\_Warn@{TrackerCnt\_Warn}}
\index{TrackerCnt\_Warn@{TrackerCnt\_Warn}!Tools for debug RS/UART/TIM@{Tools for debug RS/UART/TIM}}
\doxysubsubsubsection{\texorpdfstring{TrackerCnt\_Warn}{TrackerCnt\_Warn}}
{\footnotesize\ttfamily \label{group___r_s___d_e_b_u_g_ga8017fb05a56a1b667244f1f786fa9c57}
\#define Tracker\+Cnt\+\_\+\+Warn(\begin{DoxyParamCaption}\item[{}]{\+\_\+cntstruct\+\_\+}{}\end{DoxyParamCaption})}
Инкрементировать переменную -\/ предупреждений
Definition at line \mbox{\hyperlink{rs__message_8h_source_l00110}{110}} of file \mbox{\hyperlink{rs__message_8h_source}{rs\+\_\+message.\+h}}.
\Hypertarget{group___r_s___d_e_b_u_g_ga30a03e8d8912be85a203c829b581f999}\index{Tools for debug RS/UART/TIM@{Tools for debug RS/UART/TIM}!printf\_rs@{printf\_rs}}
\index{printf\_rs@{printf\_rs}!Tools for debug RS/UART/TIM@{Tools for debug RS/UART/TIM}}
\doxysubsubsubsection{\texorpdfstring{printf\_rs}{printf\_rs}}
{\footnotesize\ttfamily \label{group___r_s___d_e_b_u_g_ga30a03e8d8912be85a203c829b581f999}
\#define printf\+\_\+rs(\begin{DoxyParamCaption}\item[{}]{}...{}\end{DoxyParamCaption})}
Printf обычных событий RS/\+UART/\+TIM.
Definition at line \mbox{\hyperlink{rs__message_8h_source_l00116}{116}} of file \mbox{\hyperlink{rs__message_8h_source}{rs\+\_\+message.\+h}}.
\Hypertarget{group___r_s___d_e_b_u_g_ga830a5ed90667bf50ab8c409dcadb2a39}\index{Tools for debug RS/UART/TIM@{Tools for debug RS/UART/TIM}!printf\_rs\_err@{printf\_rs\_err}}
\index{printf\_rs\_err@{printf\_rs\_err}!Tools for debug RS/UART/TIM@{Tools for debug RS/UART/TIM}}
\doxysubsubsubsection{\texorpdfstring{printf\_rs\_err}{printf\_rs\_err}}
{\footnotesize\ttfamily \label{group___r_s___d_e_b_u_g_ga830a5ed90667bf50ab8c409dcadb2a39}
\#define printf\+\_\+rs\+\_\+err(\begin{DoxyParamCaption}\item[{}]{}...{}\end{DoxyParamCaption})}
Printf ошибок RS/\+UART/\+TIM.
Definition at line \mbox{\hyperlink{rs__message_8h_source_l00121}{121}} of file \mbox{\hyperlink{rs__message_8h_source}{rs\+\_\+message.\+h}}.
\Hypertarget{group___r_s___d_e_b_u_g_gab9d308969f924234bc879a93ffb80473}\index{Tools for debug RS/UART/TIM@{Tools for debug RS/UART/TIM}!RS\_TIM\_Handler\_ENTER@{RS\_TIM\_Handler\_ENTER}}
\index{RS\_TIM\_Handler\_ENTER@{RS\_TIM\_Handler\_ENTER}!Tools for debug RS/UART/TIM@{Tools for debug RS/UART/TIM}}
\doxysubsubsubsection{\texorpdfstring{RS\_TIM\_Handler\_ENTER}{RS\_TIM\_Handler\_ENTER}}
{\footnotesize\ttfamily \label{group___r_s___d_e_b_u_g_gab9d308969f924234bc879a93ffb80473}
\#define RS\+\_\+\+TIM\+\_\+\+Handler\+\_\+\+ENTER(\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})}
Действия при заходе в прерывания таймера
Definition at line \mbox{\hyperlink{rs__message_8h_source_l00127}{127}} of file \mbox{\hyperlink{rs__message_8h_source}{rs\+\_\+message.\+h}}.
\Hypertarget{group___r_s___d_e_b_u_g_gaa026e9bf8672373cfe265f96ea0f6061}\index{Tools for debug RS/UART/TIM@{Tools for debug RS/UART/TIM}!RS\_TIM\_Handler\_EXIT@{RS\_TIM\_Handler\_EXIT}}
\index{RS\_TIM\_Handler\_EXIT@{RS\_TIM\_Handler\_EXIT}!Tools for debug RS/UART/TIM@{Tools for debug RS/UART/TIM}}
\doxysubsubsubsection{\texorpdfstring{RS\_TIM\_Handler\_EXIT}{RS\_TIM\_Handler\_EXIT}}
{\footnotesize\ttfamily \label{group___r_s___d_e_b_u_g_gaa026e9bf8672373cfe265f96ea0f6061}
\#define RS\+\_\+\+TIM\+\_\+\+Handler\+\_\+\+EXIT(\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})}
Действия при выходе из прерывания таймера
Definition at line \mbox{\hyperlink{rs__message_8h_source_l00131}{131}} of file \mbox{\hyperlink{rs__message_8h_source}{rs\+\_\+message.\+h}}.
\Hypertarget{group___r_s___d_e_b_u_g_ga8c401e4d5d440001c1d879984107bb79}\index{Tools for debug RS/UART/TIM@{Tools for debug RS/UART/TIM}!RS\_UART\_Handler\_ENTER@{RS\_UART\_Handler\_ENTER}}
\index{RS\_UART\_Handler\_ENTER@{RS\_UART\_Handler\_ENTER}!Tools for debug RS/UART/TIM@{Tools for debug RS/UART/TIM}}
\doxysubsubsubsection{\texorpdfstring{RS\_UART\_Handler\_ENTER}{RS\_UART\_Handler\_ENTER}}
{\footnotesize\ttfamily \label{group___r_s___d_e_b_u_g_ga8c401e4d5d440001c1d879984107bb79}
\#define RS\+\_\+\+UART\+\_\+\+Handler\+\_\+\+ENTER(\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})}
Действия при заходе в прерывания UART.
Definition at line \mbox{\hyperlink{rs__message_8h_source_l00136}{136}} of file \mbox{\hyperlink{rs__message_8h_source}{rs\+\_\+message.\+h}}.
\Hypertarget{group___r_s___d_e_b_u_g_gade69fd26928788dd6f0278fcd15885ff}\index{Tools for debug RS/UART/TIM@{Tools for debug RS/UART/TIM}!RS\_UART\_Handler\_EXIT@{RS\_UART\_Handler\_EXIT}}
\index{RS\_UART\_Handler\_EXIT@{RS\_UART\_Handler\_EXIT}!Tools for debug RS/UART/TIM@{Tools for debug RS/UART/TIM}}
\doxysubsubsubsection{\texorpdfstring{RS\_UART\_Handler\_EXIT}{RS\_UART\_Handler\_EXIT}}
{\footnotesize\ttfamily \label{group___r_s___d_e_b_u_g_gade69fd26928788dd6f0278fcd15885ff}
\#define RS\+\_\+\+UART\+\_\+\+Handler\+\_\+\+EXIT(\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})}
Действия при выходе из прерывания UART.
Definition at line \mbox{\hyperlink{rs__message_8h_source_l00140}{140}} of file \mbox{\hyperlink{rs__message_8h_source}{rs\+\_\+message.\+h}}.

View File

@@ -0,0 +1 @@
9fef5cc1bc73fb1ceecb39bc981559d7

Binary file not shown.

View File

@@ -0,0 +1,634 @@
\doxysection{RS Tools }
\hypertarget{group___r_s___t_o_o_l_s}{}\label{group___r_s___t_o_o_l_s}\index{RS Tools@{RS Tools}}
Всякое для работы по UART/\+RS.
Collaboration diagram for RS Tools\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=272pt]{group___r_s___t_o_o_l_s}
\end{center}
\end{figure}
\doxysubsubsection*{Topics}
\begin{DoxyCompactItemize}
\item
\mbox{\hyperlink{group___r_s___d_e_b_u_g}{Tools for debug RS/\+UART/\+TIM}}
\begin{DoxyCompactList}\small\item\em Дефайны для отладки периферии \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsection*{Classes}
\begin{DoxyCompactItemize}
\item
struct \mbox{\hyperlink{struct_r_s___flags_type_def}{RS\+\_\+\+Flags\+Type\+Def}}
\begin{DoxyCompactList}\small\item\em Struct for flags RS. \end{DoxyCompactList}\item
struct \mbox{\hyperlink{struct_r_s___handle_type_def}{RS\+\_\+\+Handle\+Type\+Def}}
\begin{DoxyCompactList}\small\item\em Handle for RS communication. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsection*{Macros}
\begin{DoxyCompactItemize}
\item
\#define \mbox{\hyperlink{group___r_s___t_o_o_l_s_gae0f359f0af89adf45bac275a3f5ee34d}{RS\+\_\+\+Enable\+Receive}}()
\begin{DoxyCompactList}\small\item\em Функция изменения направления передачи на ПРИЕМ для RS-\/485. \end{DoxyCompactList}\item
\#define \mbox{\hyperlink{group___r_s___t_o_o_l_s_gaeddade966945ed376bb152151b493d6f}{RS\+\_\+\+Enable\+Transmit}}()
\begin{DoxyCompactList}\small\item\em Функция изменения направления передачи на ПЕРЕДАЧУ для RS-\/485. \end{DoxyCompactList}\item
\#define \mbox{\hyperlink{group___r_s___t_o_o_l_s_ga9560ee688d4bcdd90a47c110be4ecf92}{RS\+\_\+\+MASTER\+\_\+\+MODE\+\_\+\+START}}~0x3
\begin{DoxyCompactList}\small\item\em Начало режимов мастера (до него -\/ режим слейв) \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsection*{Enumerations}
\begin{DoxyCompactItemize}
\item
enum \mbox{\hyperlink{group___r_s___t_o_o_l_s_ga727154b368397b4796aa892de12a2289}{RS\+\_\+\+Status\+Type\+Def}} \{ \newline
{\bfseries RS\+\_\+\+OK} = 0x01
, {\bfseries RS\+\_\+\+ERR}
, {\bfseries RS\+\_\+\+ABORTED}
, {\bfseries RS\+\_\+\+BUSY}
, \newline
{\bfseries RS\+\_\+\+SKIP}
, {\bfseries RS\+\_\+\+TIMEOUT}
, {\bfseries RS\+\_\+\+COLLECT\+\_\+\+MSG\+\_\+\+ERR}
, {\bfseries RS\+\_\+\+PARSE\+\_\+\+MSG\+\_\+\+ERR}
\}
\begin{DoxyCompactList}\small\item\em Enums for respond CMD about RS status. \end{DoxyCompactList}\item
enum \mbox{\hyperlink{group___r_s___t_o_o_l_s_ga13e1c056947b06c7dc29b90d22f683a7}{RS\+\_\+\+Mode\+Type\+Def}} \{ \mbox{\hyperlink{group___r_s___t_o_o_l_s_gga13e1c056947b06c7dc29b90d22f683a7aee8cfd8ce9edacc055a195ed454a49dc}{RS\+\_\+\+SLAVE\+\_\+\+ALWAYS\+\_\+\+WAIT}} = 0x01
, \mbox{\hyperlink{group___r_s___t_o_o_l_s_gga13e1c056947b06c7dc29b90d22f683a7ad118e897a520ddc9c77a905684079550}{RS\+\_\+\+RESERVED}} = 0x02
, \mbox{\hyperlink{group___r_s___t_o_o_l_s_gga13e1c056947b06c7dc29b90d22f683a7a15953c59b7f547b318edab14070873c5}{RS\+\_\+\+MASTER\+\_\+\+REQUEST}} = 0x03
\}
\begin{DoxyCompactList}\small\item\em Enums for RS Modes. \end{DoxyCompactList}\item
enum \mbox{\hyperlink{group___r_s___t_o_o_l_s_gab7c55bd8bb15b0eecc8c525019d4a1cc}{RS\+\_\+\+Abort\+Type\+Def}} \{ \mbox{\hyperlink{group___r_s___t_o_o_l_s_ggab7c55bd8bb15b0eecc8c525019d4a1cca95c6ce0fee466ba98e43213d001ecc16}{ABORT\+\_\+\+TX}} = 0x01
, \mbox{\hyperlink{group___r_s___t_o_o_l_s_ggab7c55bd8bb15b0eecc8c525019d4a1ccaf0519a0ddda6fff97dd61ce0f3320df9}{ABORT\+\_\+\+RX}} = 0x02
, \mbox{\hyperlink{group___r_s___t_o_o_l_s_ggab7c55bd8bb15b0eecc8c525019d4a1ccac5554f0ed84242010a53eb518834d8e8}{ABORT\+\_\+\+RX\+\_\+\+TX}} = 0x03
, \mbox{\hyperlink{group___r_s___t_o_o_l_s_ggab7c55bd8bb15b0eecc8c525019d4a1cca5699efe0ab3cdfd4f6ef175ecb809306}{ABORT\+\_\+\+RS}} = 0x04
\}
\begin{DoxyCompactList}\small\item\em Enums for Abort modes. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsection*{Functions}
\begin{DoxyCompactItemize}
\item
\mbox{\hyperlink{group___r_s___t_o_o_l_s_ga727154b368397b4796aa892de12a2289}{RS\+\_\+\+Status\+Type\+Def}} \mbox{\hyperlink{group___r_s___t_o_o_l_s_ga8b7bcc84cb8192a58fe87b662fbd9690}{RS\+\_\+\+Response}} (\mbox{\hyperlink{struct_r_s___handle_type_def}{RS\+\_\+\+Handle\+Type\+Def}} \texorpdfstring{$\ast$}{*}h\+RS, \mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \texorpdfstring{$\ast$}{*}RS\+\_\+msg)
\begin{DoxyCompactList}\small\item\em Пользовательская функция для ответа на запрос по UART. \end{DoxyCompactList}\item
\Hypertarget{group___r_s___t_o_o_l_s_ga686bba5fb887445cc792c2cbdcebb01c}\label{group___r_s___t_o_o_l_s_ga686bba5fb887445cc792c2cbdcebb01c}
\+\_\+\+\_\+weak \mbox{\hyperlink{group___r_s___t_o_o_l_s_ga727154b368397b4796aa892de12a2289}{RS\+\_\+\+Status\+Type\+Def}} {\bfseries RS\+\_\+\+Response\+\_\+\+Callback} (\mbox{\hyperlink{struct_r_s___handle_type_def}{RS\+\_\+\+Handle\+Type\+Def}} \texorpdfstring{$\ast$}{*}h\+RS, \mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \texorpdfstring{$\ast$}{*}RS\+\_\+msg)
\item
\mbox{\hyperlink{group___r_s___t_o_o_l_s_ga727154b368397b4796aa892de12a2289}{RS\+\_\+\+Status\+Type\+Def}} \mbox{\hyperlink{group___r_s___t_o_o_l_s_ga1cd98c55f6f359e3ab93d0f9cf912ab5}{RS\+\_\+\+Collect\+\_\+\+Message}} (\mbox{\hyperlink{struct_r_s___handle_type_def}{RS\+\_\+\+Handle\+Type\+Def}} \texorpdfstring{$\ast$}{*}h\+RS, \mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \texorpdfstring{$\ast$}{*}RS\+\_\+msg, uint8\+\_\+t \texorpdfstring{$\ast$}{*}msg\+\_\+uart\+\_\+buff)
\begin{DoxyCompactList}\small\item\em Пользовательская функция для сбора сообщения в буфер UART. \end{DoxyCompactList}\item
\mbox{\hyperlink{group___r_s___t_o_o_l_s_ga727154b368397b4796aa892de12a2289}{RS\+\_\+\+Status\+Type\+Def}} \mbox{\hyperlink{group___r_s___t_o_o_l_s_ga3500b3fa91d05a94cf8da5cc5ce338f5}{RS\+\_\+\+Parse\+\_\+\+Message}} (\mbox{\hyperlink{struct_r_s___handle_type_def}{RS\+\_\+\+Handle\+Type\+Def}} \texorpdfstring{$\ast$}{*}h\+RS, \mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \texorpdfstring{$\ast$}{*}RS\+\_\+msg, uint8\+\_\+t \texorpdfstring{$\ast$}{*}msg\+\_\+uart\+\_\+buff)
\begin{DoxyCompactList}\small\item\em Пользовательская функция для парса сообщения из буфера UART. \end{DoxyCompactList}\item
\mbox{\hyperlink{group___r_s___t_o_o_l_s_ga727154b368397b4796aa892de12a2289}{RS\+\_\+\+Status\+Type\+Def}} \mbox{\hyperlink{group___r_s___t_o_o_l_s_ga1b59697f4b7fad81f9d5fd9fffebac2f}{RS\+\_\+\+Receive\+\_\+\+IT}} (\mbox{\hyperlink{struct_r_s___handle_type_def}{RS\+\_\+\+Handle\+Type\+Def}} \texorpdfstring{$\ast$}{*}h\+RS, \mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \texorpdfstring{$\ast$}{*}RS\+\_\+msg)
\begin{DoxyCompactList}\small\item\em Начать прием по прерываниям. \end{DoxyCompactList}\item
\mbox{\hyperlink{group___r_s___t_o_o_l_s_ga727154b368397b4796aa892de12a2289}{RS\+\_\+\+Status\+Type\+Def}} \mbox{\hyperlink{group___r_s___t_o_o_l_s_ga2e69a97a8b6e0b5855116d88c0e17cb9}{RS\+\_\+\+Transmit\+\_\+\+IT}} (\mbox{\hyperlink{struct_r_s___handle_type_def}{RS\+\_\+\+Handle\+Type\+Def}} \texorpdfstring{$\ast$}{*}h\+RS, \mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \texorpdfstring{$\ast$}{*}RS\+\_\+msg)
\begin{DoxyCompactList}\small\item\em Начать передачу по прерываниям. \end{DoxyCompactList}\item
\mbox{\hyperlink{group___r_s___t_o_o_l_s_ga727154b368397b4796aa892de12a2289}{RS\+\_\+\+Status\+Type\+Def}} \mbox{\hyperlink{group___r_s___t_o_o_l_s_gaa261bb0d37e7f18f04fb4353aa0f5c45}{RS\+\_\+\+Init}} (\mbox{\hyperlink{struct_r_s___handle_type_def}{RS\+\_\+\+Handle\+Type\+Def}} \texorpdfstring{$\ast$}{*}h\+RS, UART\+\_\+\+Handle\+Type\+Def \texorpdfstring{$\ast$}{*}huart, TIM\+\_\+\+Handle\+Type\+Def \texorpdfstring{$\ast$}{*}htim, uint8\+\_\+t \texorpdfstring{$\ast$}{*}p\+RS\+\_\+\+Buffer\+Ptr)
\begin{DoxyCompactList}\small\item\em Инициалазация структуры \doxylink{struct_r_s___handle_type_def}{RS\+\_\+\+Handle\+Type\+Def}. \end{DoxyCompactList}\item
\mbox{\hyperlink{group___r_s___t_o_o_l_s_ga727154b368397b4796aa892de12a2289}{RS\+\_\+\+Status\+Type\+Def}} \mbox{\hyperlink{group___r_s___t_o_o_l_s_ga1ffe808b3640f253b1783295d6990962}{RS\+\_\+\+Abort}} (\mbox{\hyperlink{struct_r_s___handle_type_def}{RS\+\_\+\+Handle\+Type\+Def}} \texorpdfstring{$\ast$}{*}h\+RS, \mbox{\hyperlink{group___r_s___t_o_o_l_s_gab7c55bd8bb15b0eecc8c525019d4a1cc}{RS\+\_\+\+Abort\+Type\+Def}} Abort\+Mode)
\begin{DoxyCompactList}\small\item\em Отменить прием/передачу RS/\+UART. \end{DoxyCompactList}\item
\mbox{\hyperlink{group___r_s___t_o_o_l_s_ga727154b368397b4796aa892de12a2289}{RS\+\_\+\+Status\+Type\+Def}} \mbox{\hyperlink{group___r_s___t_o_o_l_s_gab43a3b93c85adee5e3c561922d7ea2ef}{RS\+\_\+\+Handle\+\_\+\+Receive\+\_\+\+Start}} (\mbox{\hyperlink{struct_r_s___handle_type_def}{RS\+\_\+\+Handle\+Type\+Def}} \texorpdfstring{$\ast$}{*}h\+RS, \mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \texorpdfstring{$\ast$}{*}RS\+\_\+msg)
\begin{DoxyCompactList}\small\item\em Обработчик для начала приема. \end{DoxyCompactList}\item
\mbox{\hyperlink{group___r_s___t_o_o_l_s_ga727154b368397b4796aa892de12a2289}{RS\+\_\+\+Status\+Type\+Def}} \mbox{\hyperlink{group___r_s___t_o_o_l_s_ga330f6cfcdaab1f239054c0d91be3c5bc}{RS\+\_\+\+Handle\+\_\+\+Transmit\+\_\+\+Start}} (\mbox{\hyperlink{struct_r_s___handle_type_def}{RS\+\_\+\+Handle\+Type\+Def}} \texorpdfstring{$\ast$}{*}h\+RS, \mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \texorpdfstring{$\ast$}{*}RS\+\_\+msg)
\begin{DoxyCompactList}\small\item\em Обработчик для начала передачи. \end{DoxyCompactList}\item
\mbox{\hyperlink{group___r_s___t_o_o_l_s_ga727154b368397b4796aa892de12a2289}{RS\+\_\+\+Status\+Type\+Def}} \mbox{\hyperlink{group___r_s___t_o_o_l_s_ga7180b913ba795c07637680982d7f45ac}{RS\+\_\+\+UART\+\_\+\+Tx\+Cplt\+Callback}} (\mbox{\hyperlink{struct_r_s___handle_type_def}{RS\+\_\+\+Handle\+Type\+Def}} \texorpdfstring{$\ast$}{*}h\+RS)
\begin{DoxyCompactList}\small\item\em UART TX Callback\+: коллбек после окончания передачи. \end{DoxyCompactList}\item
void \mbox{\hyperlink{group___r_s___t_o_o_l_s_gab27567456df0329130c7fe4fc43c6ee1}{RS\+\_\+\+UART\+\_\+\+Handler}} (\mbox{\hyperlink{struct_r_s___handle_type_def}{RS\+\_\+\+Handle\+Type\+Def}} \texorpdfstring{$\ast$}{*}h\+RS)
\begin{DoxyCompactList}\small\item\em Обработчик прерывания UART. \end{DoxyCompactList}\item
void \mbox{\hyperlink{group___r_s___t_o_o_l_s_ga2d356b2a0b4af43460bb2cacb81779ce}{RS\+\_\+\+TIM\+\_\+\+Handler}} (\mbox{\hyperlink{struct_r_s___handle_type_def}{RS\+\_\+\+Handle\+Type\+Def}} \texorpdfstring{$\ast$}{*}h\+RS)
\begin{DoxyCompactList}\small\item\em Обработчик прерывания TIM. \end{DoxyCompactList}\item
\mbox{\hyperlink{group___r_s___t_o_o_l_s_ga727154b368397b4796aa892de12a2289}{RS\+\_\+\+Status\+Type\+Def}} \mbox{\hyperlink{group___r_s___t_o_o_l_s_gac3a7bbc060a4250c160d51f0a0ca6cf8}{RS\+\_\+\+Timeout\+\_\+\+Start}} (\mbox{\hyperlink{struct_r_s___handle_type_def}{RS\+\_\+\+Handle\+Type\+Def}} \texorpdfstring{$\ast$}{*}h\+RS)
\begin{DoxyCompactList}\small\item\em Запуск таймаута приема. \end{DoxyCompactList}\item
\mbox{\hyperlink{group___r_s___t_o_o_l_s_ga727154b368397b4796aa892de12a2289}{RS\+\_\+\+Status\+Type\+Def}} \mbox{\hyperlink{group___r_s___t_o_o_l_s_ga1de0a597d043b64d0a19bc393cc1b3fd}{RS\+\_\+\+Timeout\+\_\+\+Stop}} (\mbox{\hyperlink{struct_r_s___handle_type_def}{RS\+\_\+\+Handle\+Type\+Def}} \texorpdfstring{$\ast$}{*}h\+RS)
\begin{DoxyCompactList}\small\item\em Остановка таймаута приема. \end{DoxyCompactList}\item
\mbox{\hyperlink{group___r_s___t_o_o_l_s_ga727154b368397b4796aa892de12a2289}{RS\+\_\+\+Status\+Type\+Def}} \mbox{\hyperlink{group___r_s___t_o_o_l_s_gad3d2e8fb9c2879e1ddb967cff6124521}{RS\+\_\+\+Timeout\+\_\+\+Update}} (\mbox{\hyperlink{struct_r_s___handle_type_def}{RS\+\_\+\+Handle\+Type\+Def}} \texorpdfstring{$\ast$}{*}h\+RS)
\begin{DoxyCompactList}\small\item\em Обновление (сброс) таймаута приема. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsection*{Variables}
\begin{DoxyCompactItemize}
\item
\mbox{\hyperlink{struct_r_s___handle_type_def}{RS\+\_\+\+Handle\+Type\+Def}} \mbox{\hyperlink{group___r_s___t_o_o_l_s_gadaef5cb7e494d0fd139199f5b6cbeb86}{hmodbus1}}
\begin{DoxyCompactList}\small\item\em Default Handle for Modbus. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection{Detailed Description}
Всякое для работы по UART/\+RS.
Универсальная библиотека для работы с последовательными протоколами (Modbus, Custom) через UART в режиме прерываний с поддержкой таймаутов.\hypertarget{group___r_s___t_o_o_l_s_posibility}{}\doxysubsection{\texorpdfstring{Основные возможности\+:}{Основные возможности\+:}}\label{group___r_s___t_o_o_l_s_posibility}
\begin{DoxyItemize}
\item Прием/передача в прерываниях
\item Обработка IDLE линии для определения конца фрейма
\item Таймауты приема через TIM
\item Гибкая настройка размера сообщений
\end{DoxyItemize}\hypertarget{group___r_s___t_o_o_l_s_usage}{}\doxysubsection{\texorpdfstring{Использование\+:}{Использование\+:}}\label{group___r_s___t_o_o_l_s_usage}
\begin{DoxyEnumerate}
\item Определить структуру сообщения и размеры буфера
\item Реализовать weak-\/функции обработки сообщений
\item Добавить вызовы RS\+\_\+\+UART\+\_\+\+Handler/\+RS\+\_\+\+TIM\+\_\+\+Handler в прерывания
\item Инициализировать через \doxylink{group___r_s___t_o_o_l_s_gaa261bb0d37e7f18f04fb4353aa0f5c45}{RS\+\_\+\+Init()} и запустить прием \doxylink{group___r_s___t_o_o_l_s_ga1b59697f4b7fad81f9d5fd9fffebac2f}{RS\+\_\+\+Receive\+\_\+\+IT()}
\end{DoxyEnumerate}\hypertarget{group___r_s___t_o_o_l_s_features}{}\doxysubsection{\texorpdfstring{Особенности\+:}{Особенности\+:}}\label{group___r_s___t_o_o_l_s_features}
\begin{DoxyItemize}
\item Буфер\+: RS\+\_\+\+Buffer\mbox{[}MSG\+\_\+\+SIZE\+\_\+\+MAX\mbox{]} Общий для приема/передачи
\item Состояния\+: отслеживается через флаги в \doxylink{struct_r_s___handle_type_def}{RS\+\_\+\+Handle\+Type\+Def}
\item Таймауты\+: контролируют максимальное время ожидания фрейма
\end{DoxyItemize}
\label{doc-define-members}
\Hypertarget{group___r_s___t_o_o_l_s_doc-define-members}
\doxysubsection{Macro Definition Documentation}
\Hypertarget{group___r_s___t_o_o_l_s_gae0f359f0af89adf45bac275a3f5ee34d}\index{RS Tools@{RS Tools}!RS\_EnableReceive@{RS\_EnableReceive}}
\index{RS\_EnableReceive@{RS\_EnableReceive}!RS Tools@{RS Tools}}
\doxysubsubsection{\texorpdfstring{RS\_EnableReceive}{RS\_EnableReceive}}
{\footnotesize\ttfamily \label{group___r_s___t_o_o_l_s_gae0f359f0af89adf45bac275a3f5ee34d}
\#define RS\+\_\+\+Enable\+Receive(\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})}
Функция изменения направления передачи на ПРИЕМ для RS-\/485.
Definition at line \mbox{\hyperlink{rs__message_8h_source_l00150}{150}} of file \mbox{\hyperlink{rs__message_8h_source}{rs\+\_\+message.\+h}}.
\Hypertarget{group___r_s___t_o_o_l_s_gaeddade966945ed376bb152151b493d6f}\index{RS Tools@{RS Tools}!RS\_EnableTransmit@{RS\_EnableTransmit}}
\index{RS\_EnableTransmit@{RS\_EnableTransmit}!RS Tools@{RS Tools}}
\doxysubsubsection{\texorpdfstring{RS\_EnableTransmit}{RS\_EnableTransmit}}
{\footnotesize\ttfamily \label{group___r_s___t_o_o_l_s_gaeddade966945ed376bb152151b493d6f}
\#define RS\+\_\+\+Enable\+Transmit(\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})}
Функция изменения направления передачи на ПЕРЕДАЧУ для RS-\/485.
Definition at line \mbox{\hyperlink{rs__message_8h_source_l00153}{153}} of file \mbox{\hyperlink{rs__message_8h_source}{rs\+\_\+message.\+h}}.
\Hypertarget{group___r_s___t_o_o_l_s_ga9560ee688d4bcdd90a47c110be4ecf92}\index{RS Tools@{RS Tools}!RS\_MASTER\_MODE\_START@{RS\_MASTER\_MODE\_START}}
\index{RS\_MASTER\_MODE\_START@{RS\_MASTER\_MODE\_START}!RS Tools@{RS Tools}}
\doxysubsubsection{\texorpdfstring{RS\_MASTER\_MODE\_START}{RS\_MASTER\_MODE\_START}}
{\footnotesize\ttfamily \label{group___r_s___t_o_o_l_s_ga9560ee688d4bcdd90a47c110be4ecf92}
\#define RS\+\_\+\+MASTER\+\_\+\+MODE\+\_\+\+START~0x3}
Начало режимов мастера (до него -\/ режим слейв)
Definition at line \mbox{\hyperlink{rs__message_8h_source_l00181}{181}} of file \mbox{\hyperlink{rs__message_8h_source}{rs\+\_\+message.\+h}}.
\label{doc-enum-members}
\Hypertarget{group___r_s___t_o_o_l_s_doc-enum-members}
\doxysubsection{Enumeration Type Documentation}
\Hypertarget{group___r_s___t_o_o_l_s_ga727154b368397b4796aa892de12a2289}\index{RS Tools@{RS Tools}!RS\_StatusTypeDef@{RS\_StatusTypeDef}}
\index{RS\_StatusTypeDef@{RS\_StatusTypeDef}!RS Tools@{RS Tools}}
\doxysubsubsection{\texorpdfstring{RS\_StatusTypeDef}{RS\_StatusTypeDef}}
{\footnotesize\ttfamily \label{group___r_s___t_o_o_l_s_ga727154b368397b4796aa892de12a2289}
enum \mbox{\hyperlink{group___r_s___t_o_o_l_s_ga727154b368397b4796aa892de12a2289}{RS\+\_\+\+Status\+Type\+Def}}}
Enums for respond CMD about RS status.
Definition at line \mbox{\hyperlink{rs__message_8h_source_l00163}{163}} of file \mbox{\hyperlink{rs__message_8h_source}{rs\+\_\+message.\+h}}.
\Hypertarget{group___r_s___t_o_o_l_s_ga13e1c056947b06c7dc29b90d22f683a7}\index{RS Tools@{RS Tools}!RS\_ModeTypeDef@{RS\_ModeTypeDef}}
\index{RS\_ModeTypeDef@{RS\_ModeTypeDef}!RS Tools@{RS Tools}}
\doxysubsubsection{\texorpdfstring{RS\_ModeTypeDef}{RS\_ModeTypeDef}}
{\footnotesize\ttfamily \label{group___r_s___t_o_o_l_s_ga13e1c056947b06c7dc29b90d22f683a7}
enum \mbox{\hyperlink{group___r_s___t_o_o_l_s_ga13e1c056947b06c7dc29b90d22f683a7}{RS\+\_\+\+Mode\+Type\+Def}}}
Enums for RS Modes.
\begin{DoxyEnumFields}[2]{Enumerator}
\raisebox{\heightof{T}}[0pt][0pt]{\index{RS\_SLAVE\_ALWAYS\_WAIT@{RS\_SLAVE\_ALWAYS\_WAIT}!RS Tools@{RS Tools}}\index{RS Tools@{RS Tools}!RS\_SLAVE\_ALWAYS\_WAIT@{RS\_SLAVE\_ALWAYS\_WAIT}}}\Hypertarget{group___r_s___t_o_o_l_s_gga13e1c056947b06c7dc29b90d22f683a7aee8cfd8ce9edacc055a195ed454a49dc}\label{group___r_s___t_o_o_l_s_gga13e1c056947b06c7dc29b90d22f683a7aee8cfd8ce9edacc055a195ed454a49dc}
RS\+\_\+\+SLAVE\+\_\+\+ALWAYS\+\_\+\+WAIT&Слейв в постоянном ожидании \\
\hline
\raisebox{\heightof{T}}[0pt][0pt]{\index{RS\_RESERVED@{RS\_RESERVED}!RS Tools@{RS Tools}}\index{RS Tools@{RS Tools}!RS\_RESERVED@{RS\_RESERVED}}}\Hypertarget{group___r_s___t_o_o_l_s_gga13e1c056947b06c7dc29b90d22f683a7ad118e897a520ddc9c77a905684079550}\label{group___r_s___t_o_o_l_s_gga13e1c056947b06c7dc29b90d22f683a7ad118e897a520ddc9c77a905684079550}
RS\+\_\+\+RESERVED&резерв \\
\hline
\raisebox{\heightof{T}}[0pt][0pt]{\index{RS\_MASTER\_REQUEST@{RS\_MASTER\_REQUEST}!RS Tools@{RS Tools}}\index{RS Tools@{RS Tools}!RS\_MASTER\_REQUEST@{RS\_MASTER\_REQUEST}}}\Hypertarget{group___r_s___t_o_o_l_s_gga13e1c056947b06c7dc29b90d22f683a7a15953c59b7f547b318edab14070873c5}\label{group___r_s___t_o_o_l_s_gga13e1c056947b06c7dc29b90d22f683a7a15953c59b7f547b318edab14070873c5}
RS\+\_\+\+MASTER\+\_\+\+REQUEST&Мастер с ручным запросом \\
\hline
\end{DoxyEnumFields}
Definition at line \mbox{\hyperlink{rs__message_8h_source_l00183}{183}} of file \mbox{\hyperlink{rs__message_8h_source}{rs\+\_\+message.\+h}}.
\Hypertarget{group___r_s___t_o_o_l_s_gab7c55bd8bb15b0eecc8c525019d4a1cc}\index{RS Tools@{RS Tools}!RS\_AbortTypeDef@{RS\_AbortTypeDef}}
\index{RS\_AbortTypeDef@{RS\_AbortTypeDef}!RS Tools@{RS Tools}}
\doxysubsubsection{\texorpdfstring{RS\_AbortTypeDef}{RS\_AbortTypeDef}}
{\footnotesize\ttfamily \label{group___r_s___t_o_o_l_s_gab7c55bd8bb15b0eecc8c525019d4a1cc}
enum \mbox{\hyperlink{group___r_s___t_o_o_l_s_gab7c55bd8bb15b0eecc8c525019d4a1cc}{RS\+\_\+\+Abort\+Type\+Def}}}
Enums for Abort modes.
\begin{DoxyEnumFields}[2]{Enumerator}
\raisebox{\heightof{T}}[0pt][0pt]{\index{ABORT\_TX@{ABORT\_TX}!RS Tools@{RS Tools}}\index{RS Tools@{RS Tools}!ABORT\_TX@{ABORT\_TX}}}\Hypertarget{group___r_s___t_o_o_l_s_ggab7c55bd8bb15b0eecc8c525019d4a1cca95c6ce0fee466ba98e43213d001ecc16}\label{group___r_s___t_o_o_l_s_ggab7c55bd8bb15b0eecc8c525019d4a1cca95c6ce0fee466ba98e43213d001ecc16}
ABORT\+\_\+\+TX&Отменить передачу \\
\hline
\raisebox{\heightof{T}}[0pt][0pt]{\index{ABORT\_RX@{ABORT\_RX}!RS Tools@{RS Tools}}\index{RS Tools@{RS Tools}!ABORT\_RX@{ABORT\_RX}}}\Hypertarget{group___r_s___t_o_o_l_s_ggab7c55bd8bb15b0eecc8c525019d4a1ccaf0519a0ddda6fff97dd61ce0f3320df9}\label{group___r_s___t_o_o_l_s_ggab7c55bd8bb15b0eecc8c525019d4a1ccaf0519a0ddda6fff97dd61ce0f3320df9}
ABORT\+\_\+\+RX&Отменить прием \\
\hline
\raisebox{\heightof{T}}[0pt][0pt]{\index{ABORT\_RX\_TX@{ABORT\_RX\_TX}!RS Tools@{RS Tools}}\index{RS Tools@{RS Tools}!ABORT\_RX\_TX@{ABORT\_RX\_TX}}}\Hypertarget{group___r_s___t_o_o_l_s_ggab7c55bd8bb15b0eecc8c525019d4a1ccac5554f0ed84242010a53eb518834d8e8}\label{group___r_s___t_o_o_l_s_ggab7c55bd8bb15b0eecc8c525019d4a1ccac5554f0ed84242010a53eb518834d8e8}
ABORT\+\_\+\+RX\+\_\+\+TX&Отменить прием и передачу \\
\hline
\raisebox{\heightof{T}}[0pt][0pt]{\index{ABORT\_RS@{ABORT\_RS}!RS Tools@{RS Tools}}\index{RS Tools@{RS Tools}!ABORT\_RS@{ABORT\_RS}}}\Hypertarget{group___r_s___t_o_o_l_s_ggab7c55bd8bb15b0eecc8c525019d4a1cca5699efe0ab3cdfd4f6ef175ecb809306}\label{group___r_s___t_o_o_l_s_ggab7c55bd8bb15b0eecc8c525019d4a1cca5699efe0ab3cdfd4f6ef175ecb809306}
ABORT\+\_\+\+RS&Отменить любую работу UART в целом \\
\hline
\end{DoxyEnumFields}
Definition at line \mbox{\hyperlink{rs__message_8h_source_l00192}{192}} of file \mbox{\hyperlink{rs__message_8h_source}{rs\+\_\+message.\+h}}.
\label{doc-func-members}
\Hypertarget{group___r_s___t_o_o_l_s_doc-func-members}
\doxysubsection{Function Documentation}
\Hypertarget{group___r_s___t_o_o_l_s_ga8b7bcc84cb8192a58fe87b662fbd9690}\index{RS Tools@{RS Tools}!RS\_Response@{RS\_Response}}
\index{RS\_Response@{RS\_Response}!RS Tools@{RS Tools}}
\doxysubsubsection{\texorpdfstring{RS\_Response()}{RS\_Response()}}
{\footnotesize\ttfamily \label{group___r_s___t_o_o_l_s_ga8b7bcc84cb8192a58fe87b662fbd9690}
\mbox{\hyperlink{group___r_s___t_o_o_l_s_ga727154b368397b4796aa892de12a2289}{RS\+\_\+\+Status\+Type\+Def}} RS\+\_\+\+Response (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{struct_r_s___handle_type_def}{RS\+\_\+\+Handle\+Type\+Def}} \texorpdfstring{$\ast$}{*}}]{h\+RS}{, }\item[{\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \texorpdfstring{$\ast$}{*}}]{RS\+\_\+msg}{}\end{DoxyParamCaption})}
Пользовательская функция для ответа на запрос по UART.
\begin{DoxyParams}{Parameters}
{\em h\+RS} & Указатель на хендлер RS. \\
\hline
{\em RS\+\_\+msg} & Указатель на структуру сообщения. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
RS\+\_\+\+RES Статус о результате ответа на комманду.
\end{DoxyReturn}
Definition at line \mbox{\hyperlink{modbus_8c_source_l00184}{184}} of file \mbox{\hyperlink{modbus_8c_source}{modbus.\+c}}.
\Hypertarget{group___r_s___t_o_o_l_s_ga1cd98c55f6f359e3ab93d0f9cf912ab5}\index{RS Tools@{RS Tools}!RS\_Collect\_Message@{RS\_Collect\_Message}}
\index{RS\_Collect\_Message@{RS\_Collect\_Message}!RS Tools@{RS Tools}}
\doxysubsubsection{\texorpdfstring{RS\_Collect\_Message()}{RS\_Collect\_Message()}}
{\footnotesize\ttfamily \label{group___r_s___t_o_o_l_s_ga1cd98c55f6f359e3ab93d0f9cf912ab5}
\mbox{\hyperlink{group___r_s___t_o_o_l_s_ga727154b368397b4796aa892de12a2289}{RS\+\_\+\+Status\+Type\+Def}} RS\+\_\+\+Collect\+\_\+\+Message (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{struct_r_s___handle_type_def}{RS\+\_\+\+Handle\+Type\+Def}} \texorpdfstring{$\ast$}{*}}]{h\+RS}{, }\item[{\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \texorpdfstring{$\ast$}{*}}]{RS\+\_\+msg}{, }\item[{uint8\+\_\+t \texorpdfstring{$\ast$}{*}}]{msg\+\_\+uart\+\_\+buff}{}\end{DoxyParamCaption})}
Пользовательская функция для сбора сообщения в буфер UART.
\begin{DoxyParams}{Parameters}
{\em h\+RS} & Указатель на хендлер RS. \\
\hline
{\em RS\+\_\+msg} & Указатель на структуру сообщения. \\
\hline
{\em msg\+\_\+uart\+\_\+buff} & Указатель на буффер UART. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
RS\+\_\+\+RES Статус о результате заполнения буфера.
\end{DoxyReturn}
Definition at line \mbox{\hyperlink{modbus_8c_source_l00193}{193}} of file \mbox{\hyperlink{modbus_8c_source}{modbus.\+c}}.
\Hypertarget{group___r_s___t_o_o_l_s_ga3500b3fa91d05a94cf8da5cc5ce338f5}\index{RS Tools@{RS Tools}!RS\_Parse\_Message@{RS\_Parse\_Message}}
\index{RS\_Parse\_Message@{RS\_Parse\_Message}!RS Tools@{RS Tools}}
\doxysubsubsection{\texorpdfstring{RS\_Parse\_Message()}{RS\_Parse\_Message()}}
{\footnotesize\ttfamily \label{group___r_s___t_o_o_l_s_ga3500b3fa91d05a94cf8da5cc5ce338f5}
\mbox{\hyperlink{group___r_s___t_o_o_l_s_ga727154b368397b4796aa892de12a2289}{RS\+\_\+\+Status\+Type\+Def}} RS\+\_\+\+Parse\+\_\+\+Message (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{struct_r_s___handle_type_def}{RS\+\_\+\+Handle\+Type\+Def}} \texorpdfstring{$\ast$}{*}}]{h\+RS}{, }\item[{\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \texorpdfstring{$\ast$}{*}}]{RS\+\_\+msg}{, }\item[{uint8\+\_\+t \texorpdfstring{$\ast$}{*}}]{msg\+\_\+uart\+\_\+buff}{}\end{DoxyParamCaption})}
Пользовательская функция для парса сообщения из буфера UART.
\begin{DoxyParams}{Parameters}
{\em h\+RS} & Указатель на хендлер RS. \\
\hline
{\em RS\+\_\+msg} & Указатель на структуру сообщения. \\
\hline
{\em msg\+\_\+uart\+\_\+buff} & Указатель на буффер UART. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
RS\+\_\+\+RES Статус о результате заполнения структуры.
\end{DoxyReturn}
Definition at line \mbox{\hyperlink{modbus_8c_source_l00205}{205}} of file \mbox{\hyperlink{modbus_8c_source}{modbus.\+c}}.
\Hypertarget{group___r_s___t_o_o_l_s_ga1b59697f4b7fad81f9d5fd9fffebac2f}\index{RS Tools@{RS Tools}!RS\_Receive\_IT@{RS\_Receive\_IT}}
\index{RS\_Receive\_IT@{RS\_Receive\_IT}!RS Tools@{RS Tools}}
\doxysubsubsection{\texorpdfstring{RS\_Receive\_IT()}{RS\_Receive\_IT()}}
{\footnotesize\ttfamily \label{group___r_s___t_o_o_l_s_ga1b59697f4b7fad81f9d5fd9fffebac2f}
\mbox{\hyperlink{group___r_s___t_o_o_l_s_ga727154b368397b4796aa892de12a2289}{RS\+\_\+\+Status\+Type\+Def}} RS\+\_\+\+Receive\+\_\+\+IT (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{struct_r_s___handle_type_def}{RS\+\_\+\+Handle\+Type\+Def}} \texorpdfstring{$\ast$}{*}}]{h\+RS}{, }\item[{\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \texorpdfstring{$\ast$}{*}}]{RS\+\_\+msg}{}\end{DoxyParamCaption})}
Начать прием по прерываниям.
\begin{DoxyParams}{Parameters}
{\em h\+RS} & Указатель на хендлер RS. \\
\hline
{\em RS\+\_\+msg} & Указатель на структуру сообщения. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
RS\+\_\+\+RES Статус о состоянии RS после инициализации приема.
\end{DoxyReturn}
Definition at line \mbox{\hyperlink{rs__message_8c_source_l00043}{43}} of file \mbox{\hyperlink{rs__message_8c_source}{rs\+\_\+message.\+c}}.
\Hypertarget{group___r_s___t_o_o_l_s_ga2e69a97a8b6e0b5855116d88c0e17cb9}\index{RS Tools@{RS Tools}!RS\_Transmit\_IT@{RS\_Transmit\_IT}}
\index{RS\_Transmit\_IT@{RS\_Transmit\_IT}!RS Tools@{RS Tools}}
\doxysubsubsection{\texorpdfstring{RS\_Transmit\_IT()}{RS\_Transmit\_IT()}}
{\footnotesize\ttfamily \label{group___r_s___t_o_o_l_s_ga2e69a97a8b6e0b5855116d88c0e17cb9}
\mbox{\hyperlink{group___r_s___t_o_o_l_s_ga727154b368397b4796aa892de12a2289}{RS\+\_\+\+Status\+Type\+Def}} RS\+\_\+\+Transmit\+\_\+\+IT (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{struct_r_s___handle_type_def}{RS\+\_\+\+Handle\+Type\+Def}} \texorpdfstring{$\ast$}{*}}]{h\+RS}{, }\item[{\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \texorpdfstring{$\ast$}{*}}]{RS\+\_\+msg}{}\end{DoxyParamCaption})}
Начать передачу по прерываниям.
\begin{DoxyParams}{Parameters}
{\em h\+RS} & Указатель на хендлер RS. \\
\hline
{\em RS\+\_\+msg} & Указатель на структуру сообщения. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
RS\+\_\+\+RES Статус о состоянии RS после инициализации передачи.
\end{DoxyReturn}
Definition at line \mbox{\hyperlink{rs__message_8c_source_l00091}{91}} of file \mbox{\hyperlink{rs__message_8c_source}{rs\+\_\+message.\+c}}.
\Hypertarget{group___r_s___t_o_o_l_s_gaa261bb0d37e7f18f04fb4353aa0f5c45}\index{RS Tools@{RS Tools}!RS\_Init@{RS\_Init}}
\index{RS\_Init@{RS\_Init}!RS Tools@{RS Tools}}
\doxysubsubsection{\texorpdfstring{RS\_Init()}{RS\_Init()}}
{\footnotesize\ttfamily \label{group___r_s___t_o_o_l_s_gaa261bb0d37e7f18f04fb4353aa0f5c45}
\mbox{\hyperlink{group___r_s___t_o_o_l_s_ga727154b368397b4796aa892de12a2289}{RS\+\_\+\+Status\+Type\+Def}} RS\+\_\+\+Init (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{struct_r_s___handle_type_def}{RS\+\_\+\+Handle\+Type\+Def}} \texorpdfstring{$\ast$}{*}}]{h\+RS}{, }\item[{UART\+\_\+\+Handle\+Type\+Def \texorpdfstring{$\ast$}{*}}]{huart}{, }\item[{TIM\+\_\+\+Handle\+Type\+Def \texorpdfstring{$\ast$}{*}}]{htim}{, }\item[{uint8\+\_\+t \texorpdfstring{$\ast$}{*}}]{p\+RS\+\_\+\+Buffer\+Ptr}{}\end{DoxyParamCaption})}
Инициалазация структуры \doxylink{struct_r_s___handle_type_def}{RS\+\_\+\+Handle\+Type\+Def}.
\begin{DoxyParams}{Parameters}
{\em h\+RS} & Указатель на хендлер RS. \\
\hline
{\em suart} & Указатель на структуру с настройками UART. \\
\hline
{\em stim} & Указатель на структуру с настройками таймера. \\
\hline
{\em p\+RS\+\_\+\+Buffer\+Ptr} & Указатель на буффер для приема-\/передачи по UART. Если он NULL, то поставиться библиотечный буфер. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
RS\+\_\+\+RES Статус о состоянии RS после инициализации.
\end{DoxyReturn}
Инициализация перефирии и структуры для приема-\/передачи по RS.
Definition at line \mbox{\hyperlink{rs__message_8c_source_l00156}{156}} of file \mbox{\hyperlink{rs__message_8c_source}{rs\+\_\+message.\+c}}.
\Hypertarget{group___r_s___t_o_o_l_s_ga1ffe808b3640f253b1783295d6990962}\index{RS Tools@{RS Tools}!RS\_Abort@{RS\_Abort}}
\index{RS\_Abort@{RS\_Abort}!RS Tools@{RS Tools}}
\doxysubsubsection{\texorpdfstring{RS\_Abort()}{RS\_Abort()}}
{\footnotesize\ttfamily \label{group___r_s___t_o_o_l_s_ga1ffe808b3640f253b1783295d6990962}
\mbox{\hyperlink{group___r_s___t_o_o_l_s_ga727154b368397b4796aa892de12a2289}{RS\+\_\+\+Status\+Type\+Def}} RS\+\_\+\+Abort (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{struct_r_s___handle_type_def}{RS\+\_\+\+Handle\+Type\+Def}} \texorpdfstring{$\ast$}{*}}]{h\+RS}{, }\item[{\mbox{\hyperlink{group___r_s___t_o_o_l_s_gab7c55bd8bb15b0eecc8c525019d4a1cc}{RS\+\_\+\+Abort\+Type\+Def}}}]{Abort\+Mode}{}\end{DoxyParamCaption})}
Отменить прием/передачу RS/\+UART.
\begin{DoxyParams}{Parameters}
{\em h\+RS} & Указатель на хендлер RS. \\
\hline
{\em Abort\+Mode} & Выбор, что надо отменить.
\begin{DoxyItemize}
\item ABORT\+\_\+\+TX\+: Отмена передачи по ЮАРТ, с очищением флагов TX,
\item ABORT\+\_\+\+RX\+: Отмена приема по ЮАРТ, с очищением флагов RX,
\item ABORT\+\_\+\+RX\+\_\+\+TX\+: Отмена приема и передачи по ЮАРТ,
\item ABORT\+\_\+\+RS\+: Отмена приема-\/передачи RS, с очищением всей структуры.
\end{DoxyItemize}\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
RS\+\_\+\+RES Статус о состоянии RS после аборта.
\end{DoxyReturn}
Отмена работы UART в целом или отмена приема/передачи RS. Также очищается хендл h\+RS.
Definition at line \mbox{\hyperlink{rs__message_8c_source_l00193}{193}} of file \mbox{\hyperlink{rs__message_8c_source}{rs\+\_\+message.\+c}}.
\Hypertarget{group___r_s___t_o_o_l_s_gab43a3b93c85adee5e3c561922d7ea2ef}\index{RS Tools@{RS Tools}!RS\_Handle\_Receive\_Start@{RS\_Handle\_Receive\_Start}}
\index{RS\_Handle\_Receive\_Start@{RS\_Handle\_Receive\_Start}!RS Tools@{RS Tools}}
\doxysubsubsection{\texorpdfstring{RS\_Handle\_Receive\_Start()}{RS\_Handle\_Receive\_Start()}}
{\footnotesize\ttfamily \label{group___r_s___t_o_o_l_s_gab43a3b93c85adee5e3c561922d7ea2ef}
\mbox{\hyperlink{group___r_s___t_o_o_l_s_ga727154b368397b4796aa892de12a2289}{RS\+\_\+\+Status\+Type\+Def}} RS\+\_\+\+Handle\+\_\+\+Receive\+\_\+\+Start (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{struct_r_s___handle_type_def}{RS\+\_\+\+Handle\+Type\+Def}} \texorpdfstring{$\ast$}{*}}]{h\+RS}{, }\item[{\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \texorpdfstring{$\ast$}{*}}]{RS\+\_\+msg}{}\end{DoxyParamCaption})}
Обработчик для начала приема.
\begin{DoxyParams}{Parameters}
{\em h\+RS} & Указатель на хендлер RS. \\
\hline
{\em RS\+\_\+msg} & Указатель на структуру сообщения. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
RS\+\_\+\+RES Статус о состоянии RS после инициализации приема или окончания общения.
\end{DoxyReturn}
Определяет начинать прием команды/ответа или нет.
Definition at line \mbox{\hyperlink{rs__message_8c_source_l00237}{237}} of file \mbox{\hyperlink{rs__message_8c_source}{rs\+\_\+message.\+c}}.
\Hypertarget{group___r_s___t_o_o_l_s_ga330f6cfcdaab1f239054c0d91be3c5bc}\index{RS Tools@{RS Tools}!RS\_Handle\_Transmit\_Start@{RS\_Handle\_Transmit\_Start}}
\index{RS\_Handle\_Transmit\_Start@{RS\_Handle\_Transmit\_Start}!RS Tools@{RS Tools}}
\doxysubsubsection{\texorpdfstring{RS\_Handle\_Transmit\_Start()}{RS\_Handle\_Transmit\_Start()}}
{\footnotesize\ttfamily \label{group___r_s___t_o_o_l_s_ga330f6cfcdaab1f239054c0d91be3c5bc}
\mbox{\hyperlink{group___r_s___t_o_o_l_s_ga727154b368397b4796aa892de12a2289}{RS\+\_\+\+Status\+Type\+Def}} RS\+\_\+\+Handle\+\_\+\+Transmit\+\_\+\+Start (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{struct_r_s___handle_type_def}{RS\+\_\+\+Handle\+Type\+Def}} \texorpdfstring{$\ast$}{*}}]{h\+RS}{, }\item[{\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \texorpdfstring{$\ast$}{*}}]{RS\+\_\+msg}{}\end{DoxyParamCaption})}
Обработчик для начала передачи.
\begin{DoxyParams}{Parameters}
{\em h\+RS} & Указатель на хендлер RS. \\
\hline
{\em RS\+\_\+msg} & Указатель на структуру сообщения. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
RS\+\_\+\+RES Статус о состоянии RS после инициализации передачи.
\end{DoxyReturn}
Определяет отвечать ли на команду или нет.
Definition at line \mbox{\hyperlink{rs__message_8c_source_l00269}{269}} of file \mbox{\hyperlink{rs__message_8c_source}{rs\+\_\+message.\+c}}.
\Hypertarget{group___r_s___t_o_o_l_s_ga7180b913ba795c07637680982d7f45ac}\index{RS Tools@{RS Tools}!RS\_UART\_TxCpltCallback@{RS\_UART\_TxCpltCallback}}
\index{RS\_UART\_TxCpltCallback@{RS\_UART\_TxCpltCallback}!RS Tools@{RS Tools}}
\doxysubsubsection{\texorpdfstring{RS\_UART\_TxCpltCallback()}{RS\_UART\_TxCpltCallback()}}
{\footnotesize\ttfamily \label{group___r_s___t_o_o_l_s_ga7180b913ba795c07637680982d7f45ac}
\mbox{\hyperlink{group___r_s___t_o_o_l_s_ga727154b368397b4796aa892de12a2289}{RS\+\_\+\+Status\+Type\+Def}} RS\+\_\+\+UART\+\_\+\+Tx\+Cplt\+Callback (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{struct_r_s___handle_type_def}{RS\+\_\+\+Handle\+Type\+Def}} \texorpdfstring{$\ast$}{*}}]{h\+RS}{}\end{DoxyParamCaption})}
UART TX Callback\+: коллбек после окончания передачи.
\begin{DoxyParams}{Parameters}
{\em h\+RS} & Указатель на хендлер RS. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
RS\+\_\+\+RES Статус о состоянии RS после обработки приема.
\end{DoxyReturn}
Определяет поведение RS после передачи сообщения.
Definition at line \mbox{\hyperlink{rs__message_8c_source_l00300}{300}} of file \mbox{\hyperlink{rs__message_8c_source}{rs\+\_\+message.\+c}}.
\Hypertarget{group___r_s___t_o_o_l_s_gab27567456df0329130c7fe4fc43c6ee1}\index{RS Tools@{RS Tools}!RS\_UART\_Handler@{RS\_UART\_Handler}}
\index{RS\_UART\_Handler@{RS\_UART\_Handler}!RS Tools@{RS Tools}}
\doxysubsubsection{\texorpdfstring{RS\_UART\_Handler()}{RS\_UART\_Handler()}}
{\footnotesize\ttfamily \label{group___r_s___t_o_o_l_s_gab27567456df0329130c7fe4fc43c6ee1}
void RS\+\_\+\+UART\+\_\+\+Handler (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{struct_r_s___handle_type_def}{RS\+\_\+\+Handle\+Type\+Def}} \texorpdfstring{$\ast$}{*}}]{h\+RS}{}\end{DoxyParamCaption})}
Обработчик прерывания UART.
\begin{DoxyParams}{Parameters}
{\em h\+RS} & Указатель на хендлер RS.\\
\hline
\end{DoxyParams}
Обрабатывает ошибки если есть и вызывает RS Коллбеки. Добавить вызов этой функции в UARTx\+\_\+\+IRQHandler() ВМЕСТО HAL\+\_\+\+UART\+\_\+\+IRQHandler().
Definition at line \mbox{\hyperlink{rs__message_8c_source_l00320}{320}} of file \mbox{\hyperlink{rs__message_8c_source}{rs\+\_\+message.\+c}}.
\Hypertarget{group___r_s___t_o_o_l_s_ga2d356b2a0b4af43460bb2cacb81779ce}\index{RS Tools@{RS Tools}!RS\_TIM\_Handler@{RS\_TIM\_Handler}}
\index{RS\_TIM\_Handler@{RS\_TIM\_Handler}!RS Tools@{RS Tools}}
\doxysubsubsection{\texorpdfstring{RS\_TIM\_Handler()}{RS\_TIM\_Handler()}}
{\footnotesize\ttfamily \label{group___r_s___t_o_o_l_s_ga2d356b2a0b4af43460bb2cacb81779ce}
void RS\+\_\+\+TIM\+\_\+\+Handler (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{struct_r_s___handle_type_def}{RS\+\_\+\+Handle\+Type\+Def}} \texorpdfstring{$\ast$}{*}}]{h\+RS}{}\end{DoxyParamCaption})}
Обработчик прерывания TIM.
\begin{DoxyParams}{Parameters}
{\em h\+RS} & Указатель на хендлер RS.\\
\hline
\end{DoxyParams}
Попадание сюда = таймаут и перезапуск RS приема Добавить вызов этой функции в TIMx\+\_\+\+IRQHandler() ВМЕСТО HAL\+\_\+\+TIM\+\_\+\+IRQHandler().
Definition at line \mbox{\hyperlink{rs__message_8c_source_l00433}{433}} of file \mbox{\hyperlink{rs__message_8c_source}{rs\+\_\+message.\+c}}.
\Hypertarget{group___r_s___t_o_o_l_s_gac3a7bbc060a4250c160d51f0a0ca6cf8}\index{RS Tools@{RS Tools}!RS\_Timeout\_Start@{RS\_Timeout\_Start}}
\index{RS\_Timeout\_Start@{RS\_Timeout\_Start}!RS Tools@{RS Tools}}
\doxysubsubsection{\texorpdfstring{RS\_Timeout\_Start()}{RS\_Timeout\_Start()}}
{\footnotesize\ttfamily \label{group___r_s___t_o_o_l_s_gac3a7bbc060a4250c160d51f0a0ca6cf8}
\mbox{\hyperlink{group___r_s___t_o_o_l_s_ga727154b368397b4796aa892de12a2289}{RS\+\_\+\+Status\+Type\+Def}} RS\+\_\+\+Timeout\+\_\+\+Start (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{struct_r_s___handle_type_def}{RS\+\_\+\+Handle\+Type\+Def}} \texorpdfstring{$\ast$}{*}}]{h\+RS}{}\end{DoxyParamCaption})}
Запуск таймаута приема.
\begin{DoxyParams}{Parameters}
{\em h\+RS} & Указатель на хендлер RS. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
RS\+\_\+\+RES Статус операции.
\end{DoxyReturn}
Запускает таймер для отсчета времени ожидания следующего байта.
Definition at line \mbox{\hyperlink{rs__message_8c_source_l00471}{471}} of file \mbox{\hyperlink{rs__message_8c_source}{rs\+\_\+message.\+c}}.
\Hypertarget{group___r_s___t_o_o_l_s_ga1de0a597d043b64d0a19bc393cc1b3fd}\index{RS Tools@{RS Tools}!RS\_Timeout\_Stop@{RS\_Timeout\_Stop}}
\index{RS\_Timeout\_Stop@{RS\_Timeout\_Stop}!RS Tools@{RS Tools}}
\doxysubsubsection{\texorpdfstring{RS\_Timeout\_Stop()}{RS\_Timeout\_Stop()}}
{\footnotesize\ttfamily \label{group___r_s___t_o_o_l_s_ga1de0a597d043b64d0a19bc393cc1b3fd}
\mbox{\hyperlink{group___r_s___t_o_o_l_s_ga727154b368397b4796aa892de12a2289}{RS\+\_\+\+Status\+Type\+Def}} RS\+\_\+\+Timeout\+\_\+\+Stop (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{struct_r_s___handle_type_def}{RS\+\_\+\+Handle\+Type\+Def}} \texorpdfstring{$\ast$}{*}}]{h\+RS}{}\end{DoxyParamCaption})}
Остановка таймаута приема.
\begin{DoxyParams}{Parameters}
{\em h\+RS} & Указатель на хендлер RS. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
RS\+\_\+\+RES Статус операции.
\end{DoxyReturn}
Останавливает таймер ожидания.
Definition at line \mbox{\hyperlink{rs__message_8c_source_l00491}{491}} of file \mbox{\hyperlink{rs__message_8c_source}{rs\+\_\+message.\+c}}.
\Hypertarget{group___r_s___t_o_o_l_s_gad3d2e8fb9c2879e1ddb967cff6124521}\index{RS Tools@{RS Tools}!RS\_Timeout\_Update@{RS\_Timeout\_Update}}
\index{RS\_Timeout\_Update@{RS\_Timeout\_Update}!RS Tools@{RS Tools}}
\doxysubsubsection{\texorpdfstring{RS\_Timeout\_Update()}{RS\_Timeout\_Update()}}
{\footnotesize\ttfamily \label{group___r_s___t_o_o_l_s_gad3d2e8fb9c2879e1ddb967cff6124521}
\mbox{\hyperlink{group___r_s___t_o_o_l_s_ga727154b368397b4796aa892de12a2289}{RS\+\_\+\+Status\+Type\+Def}} RS\+\_\+\+Timeout\+\_\+\+Update (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{struct_r_s___handle_type_def}{RS\+\_\+\+Handle\+Type\+Def}} \texorpdfstring{$\ast$}{*}}]{h\+RS}{}\end{DoxyParamCaption})}
Обновление (сброс) таймаута приема.
\begin{DoxyParams}{Parameters}
{\em h\+RS} & Указатель на хендлер RS. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
RS\+\_\+\+RES Статус операции.
\end{DoxyReturn}
Сбрасывает счетчик таймера в 0.
Definition at line \mbox{\hyperlink{rs__message_8c_source_l00509}{509}} of file \mbox{\hyperlink{rs__message_8c_source}{rs\+\_\+message.\+c}}.
\label{doc-var-members}
\Hypertarget{group___r_s___t_o_o_l_s_doc-var-members}
\doxysubsection{Variable Documentation}
\Hypertarget{group___r_s___t_o_o_l_s_gadaef5cb7e494d0fd139199f5b6cbeb86}\index{RS Tools@{RS Tools}!hmodbus1@{hmodbus1}}
\index{hmodbus1@{hmodbus1}!RS Tools@{RS Tools}}
\doxysubsubsection{\texorpdfstring{hmodbus1}{hmodbus1}}
{\footnotesize\ttfamily \label{group___r_s___t_o_o_l_s_gadaef5cb7e494d0fd139199f5b6cbeb86}
\mbox{\hyperlink{struct_r_s___handle_type_def}{RS\+\_\+\+Handle\+Type\+Def}} hmodbus1\hspace{0.3cm}{\ttfamily [extern]}}
Default Handle for Modbus.
Definition at line \mbox{\hyperlink{modbus_8c_source_l00024}{24}} of file \mbox{\hyperlink{modbus_8c_source}{modbus.\+c}}.
\input{group___r_s___d_e_b_u_g}

View File

@@ -0,0 +1,264 @@
\chapter{Инструкция по подключению релиза библиотеки {\ttfamily STM Modbus} }
\hypertarget{index}{}\label{index}\index{Инструкция по подключению релиза библиотеки $<$tt$>$STM Modbus$<$/tt$>$@{Инструкция по подключению релиза библиотеки $<$tt$>$STM Modbus$<$/tt$>$}}
\label{index_md__e_1_2_8_w_o_r_k_2_s_t_m32_2_diod___test_2diode__tester_2_core_2_modbus_2_r_e_a_d_m_e}%
\Hypertarget{index_md__e_1_2_8_w_o_r_k_2_s_t_m32_2_diod___test_2diode__tester_2_core_2_modbus_2_r_e_a_d_m_e}%
Данная библиотека подключается напрямую из Git, как субмодуль. Позволяя при желании обновлять её напрямую через git.\hypertarget{index_структура-библиотеки}{}\doxysection{\texorpdfstring{Структура библиотеки}{Структура библиотеки}}\label{index_структура-библиотеки}
\texorpdfstring{$\ast$}{*}\+Note\+: Файлы начинающиеся с {\ttfamily \+\_\+\+\_\+} и которых {\bfseries{нет}} в этом дереве являются \texorpdfstring{$\ast$}{*}\texorpdfstring{$\ast$}{*}внутренними/непротестированными/недокументированными\texorpdfstring{$\ast$}{*}\texorpdfstring{$\ast$}{*}\texorpdfstring{$\ast$}{*}
\begin{DoxyCode}{0}
\DoxyCodeLine{Modbus/\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Иерархия\ модулей:}
\DoxyCodeLine{\ \ \ inc/\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ modbus}
\DoxyCodeLine{\ \ \ ├──\ modbus.h\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \#\ Главный\ заголовочный\ файл\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ modbus\_slave}
\DoxyCodeLine{\ \ \ ├──\ modbus\_core.h\ \ \ \ \ \ \ \ \ \ \ \#\ Базовые\ определения\ и\ структуры\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ modbus\_master}
\DoxyCodeLine{\ \ \ ├──\ modbus\_coils.h\ \ \ \ \ \ \ \ \ \ \#\ Работа\ с\ дискретными\ выходами\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ├──\ modbus\_coils}
\DoxyCodeLine{\ \ \ ├──\ modbus\_holdregs.h\ \ \ \ \ \ \ \#\ Работа\ с\ регистрами\ хранения\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ├──\ modbus\_inputregs}
\DoxyCodeLine{\ \ \ ├──\ modbus\_inputregs.h\ \ \ \ \ \ \#\ Работа\ с\ входными\ регистрами\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ├──\ modbus\_inputregs}
\DoxyCodeLine{\ \ \ ├──\ modbus\_devid.h\ \ \ \ \ \ \ \ \ \ \#\ Идентификация\ устройства\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ├──\ modbus\_devid}
\DoxyCodeLine{\ \ \ ├──\ rs\_message.h\ \ \ \ \ \ \ \ \ \ \ \ \#\ Драйвер\ обмена\ по\ RS/UART\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ├──\ modbus\_diag}
\DoxyCodeLine{├──\ src/\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ └──\ rs\_message}
\DoxyCodeLine{\ \ \ ├──\ modbus.c\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \#\ Основная\ логика\ Modbus\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }
\DoxyCodeLine{\ \ \ ├──\ modbus\_slave.c\ \ \ \ \ \ \ \ \ \ \#\ Основная\ логика\ Slave\ Modbus\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ └──\ modbus\_core\ (единое\ ядро)}
\DoxyCodeLine{\ \ \ ├──\ modbus\_master.c\ \ \ \ \ \ \ \ \ \#\ Основная\ логика\ Master\ Modbus\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ├──\ modbus\_config}
\DoxyCodeLine{\ \ \ ├──\ modbus\_coils.c\ \ \ \ \ \ \ \ \ \ \#\ Реализация\ работы\ с\ coils\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ├──\ modbus\_data}
\DoxyCodeLine{\ \ \ ├──\ modbus\_holdregs.c\ \ \ \ \ \ \ \#\ Реализация\ регистров\ хранения\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ └──\ \_\_crc\_algs}
\DoxyCodeLine{\ \ \ ├──\ modbus\_inputregs.c\ \ \ \ \ \ \#\ Реализация\ входных\ регистров\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }
\DoxyCodeLine{\ \ \ ├──\ modbus\_devid.c\ \ \ \ \ \ \ \ \ \ \#\ Реализация\ идентификации\ устройства\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }
\DoxyCodeLine{\ \ \ ├──\ modbus\_data.c\ \ \ \ \ \ \ \ \ \ \ \#\ Функции\ доступа\ к\ данным\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }
\DoxyCodeLine{\ \ \ └──\ rs\_message.c\ \ \ \ \ \ \ \ \ \ \ \ \#\ Реализация\ драйвера\ RS\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }
\DoxyCodeLine{├──\ \_\_modbus\_config.h\ \ \ \ \ \ \ \#\ Конфигурация\ Modbus\ (надо\ заменить)\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }
\DoxyCodeLine{├──\ \_\_modbus\_data.h\ \ \ \ \ \ \ \ \ \#\ Структуры\ данных\ (надо\ заменить)\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }
\DoxyCodeLine{└──\ \_\_modbus\_data.c\ \ \ \ \ \ \ \ \ \#\ Функции\ доступа\ (надо\ заменить)\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }
\end{DoxyCode}
\hypertarget{index_инструкция-по-подключению}{}\doxysection{\texorpdfstring{Инструкция по подключению}{Инструкция по подключению}}\label{index_инструкция-по-подключению}
\hypertarget{index_autotoc_md1-склонируйте-субмодуль-в-ваш-проект}{}\doxysubsection{\texorpdfstring{1. {\bfseries{Склонируйте субмодуль}} в ваш проект\+:}{1. {\bfseries{Склонируйте субмодуль}} в ваш проект\+:}}\label{index_autotoc_md1-склонируйте-субмодуль-в-ваш-проект}
\begin{DoxyCode}{0}
\DoxyCodeLine{git\ submodule\ add\ https://git.arktika.cyou/set506/STM32\_Modbus\ path/to/Modbus}
\DoxyCodeLine{git\ submodule\ update\ -\/-\/init\ -\/-\/recursive}
\end{DoxyCode}
\hypertarget{index_autotoc_md2-скопируйте-файлы-конфигурации-в-отдельную-папку-в-вашем-проекте-вне-субмодуля-и-удалите-__-из-имени-файлов}{}\doxysubsection{\texorpdfstring{2. {\bfseries{Скопируйте файлы конфигурации}} в отдельную папку в вашем проекте (вне субмодуля) и удалите {\ttfamily \+\_\+\+\_\+} из имени файлов\+:}{2. {\bfseries{Скопируйте файлы конфигурации}} в отдельную папку в вашем проекте (вне субмодуля) и удалите {\ttfamily \+\_\+\+\_\+} из имени файлов\+:}}\label{index_autotoc_md2-скопируйте-файлы-конфигурации-в-отдельную-папку-в-вашем-проекте-вне-субмодуля-и-удалите-__-из-имени-файлов}
\begin{DoxyCode}{0}
\DoxyCodeLine{ProjectRoot/}
\DoxyCodeLine{├──\ Configs/}
\DoxyCodeLine{\ \ \ ├──\ modbus\_config.h\ \ \ \ \ \ \ \ \ \ \#\ скопировать\ из\ \_\_modbus\_config.h}
\DoxyCodeLine{\ \ \ ├──\ modbus\_data.h\ \ \ \ \ \ \ \ \ \ \ \ \#\ скопировать\ из\ \_\_modbus\_data.h}
\DoxyCodeLine{\ \ \ └──\ modbus\_data.c\ \ \ \ \ \ \ \ \ \ \ \ \#\ скопировать\ из\ \_\_modbus\_data.c}
\DoxyCodeLine{└──\ Modbus/\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \#\ Субмодуль}
\end{DoxyCode}
\hypertarget{index_autotoc_md3-настройте-конфигурацию-под-ваш-проект}{}\doxysubsection{\texorpdfstring{3. {\bfseries{Настройте конфигурацию}} под ваш проект\+:}{3. {\bfseries{Настройте конфигурацию}} под ваш проект\+:}}\label{index_autotoc_md3-настройте-конфигурацию-под-ваш-проект}
\hypertarget{index_autotoc_md31-настройка-периферии}{}\doxysubsubsection{\texorpdfstring{3.\+1. Настройка периферии}{3.\+1. Настройка периферии}}\label{index_autotoc_md31-настройка-периферии}
\begin{DoxyItemize}
\item {\bfseries{UART}}\+: Настройте в режиме Asynchronous, нужная скорость (9600, 19200, etc), 8N1
\item {\bfseries{TIM}}\+: Настройте таймер для генерации прерываний (например, 1ms tick)
\item {\bfseries{Включите прерывания}} для UART и TIM
\end{DoxyItemize}\hypertarget{index_autotoc_md32-подключение-обработчиков-прерываний}{}\doxysubsubsection{\texorpdfstring{3.\+2. Подключение обработчиков прерываний}{3.\+2. Подключение обработчиков прерываний}}\label{index_autotoc_md32-подключение-обработчиков-прерываний}
Подключите обработчики прерываний {\bfseries{UART}} и {\bfseries{TIM}} в свои IRQ обработчики {\itshape {\bfseries{вместо}}} HAL-\/обработчиков\+:
\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{preprocessor}{\#include\ "{}\mbox{\hyperlink{modbus_8h}{modbus.h}}"{}}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keywordtype}{void}\ USARTx\_IRQHandler(\textcolor{keywordtype}{void})}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ \ \mbox{\hyperlink{group___r_s___t_o_o_l_s_gab27567456df0329130c7fe4fc43c6ee1}{RS\_UART\_Handler}}(\&\mbox{\hyperlink{group___r_s___t_o_o_l_s_gadaef5cb7e494d0fd139199f5b6cbeb86}{hmodbus1}});}
\DoxyCodeLine{\ \ \ \ \textcolor{keywordflow}{return};}
\DoxyCodeLine{\ \ \ \ HAL\_UART\_IRQHandler(\&huart);}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keywordtype}{void}\ TIMx\_IRQHandler(\textcolor{keywordtype}{void})}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ \ \mbox{\hyperlink{group___r_s___t_o_o_l_s_ga2d356b2a0b4af43460bb2cacb81779ce}{RS\_TIM\_Handler}}(\&\mbox{\hyperlink{group___r_s___t_o_o_l_s_gadaef5cb7e494d0fd139199f5b6cbeb86}{hmodbus1}});}
\DoxyCodeLine{\ \ \ \ \textcolor{keywordflow}{return};}
\DoxyCodeLine{\ \ \ \ HAL\_TIM\_IRQHandler(\&htim);}
\DoxyCodeLine{\}}
\end{DoxyCode}
\hypertarget{index_autotoc_md33-в-modbus_configh-укажите-параметры-устройства}{}\doxysubsubsection{\texorpdfstring{3.\+3. В {\ttfamily modbus\+\_\+config.\+h} укажите параметры устройства}{3.\+3. В {\ttfamily modbus\+\_\+config.\+h} укажите параметры устройства}}\label{index_autotoc_md33-в-modbus_configh-укажите-параметры-устройства}
\hypertarget{index_autotoc_md34-инициализация-в-коде}{}\doxysubsubsection{\texorpdfstring{3.\+4. Инициализация в коде}{3.\+4. Инициализация в коде}}\label{index_autotoc_md34-инициализация-в-коде}
Чтобы настроить Slave-\/режим {\ttfamily main()} после инициализации HAL\+:
\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{preprocessor}{\#include\ "{}\mbox{\hyperlink{modbus_8h}{modbus.h}}"{}}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keywordtype}{int}\ main(\textcolor{keywordtype}{void})}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ \ \textcolor{comment}{//\ Инициализация\ HAL}}
\DoxyCodeLine{\ \ \ \ HAL\_Init();}
\DoxyCodeLine{\ \ \ \ SystemClock\_Config();}
\DoxyCodeLine{\ \ \ \ MX\_GPIO\_Init();}
\DoxyCodeLine{\ \ \ \ MX\_USART1\_UART\_Init();}
\DoxyCodeLine{\ \ \ \ MX\_TIM3\_Init();}
\DoxyCodeLine{\ \ \ \ }
\DoxyCodeLine{\ \ \ \ \textcolor{comment}{//\ Инициализация\ Modbus}}
\DoxyCodeLine{\ \ \ \ \mbox{\hyperlink{group___m_o_d_b_u_s___f_u_n_c_t_i_o_n_s_ga9e787c3454aab3293dec6e6795f687f5}{MODBUS\_FirstInit}}(\&\mbox{\hyperlink{group___r_s___t_o_o_l_s_gadaef5cb7e494d0fd139199f5b6cbeb86}{hmodbus1}},\ \&\mbox{\hyperlink{group___m_o_d_b_u_s___c_o_n_f_i_g_s_ga370986118b8227cb6cb33c6b748fbbcb}{mb\_huart}},\ \&\mbox{\hyperlink{group___m_o_d_b_u_s___c_o_n_f_i_g_s_ga6723a1608946a4f86cd7c9c7e614d04e}{mb\_htim}});}
\DoxyCodeLine{\ \ \ \ \mbox{\hyperlink{group___m_o_d_b_u_s___f_u_n_c_t_i_o_n_s_ga460466907693a256487d31f09b16edfe}{MODBUS\_Config}}(\&\mbox{\hyperlink{group___r_s___t_o_o_l_s_gadaef5cb7e494d0fd139199f5b6cbeb86}{hmodbus1}},\ \mbox{\hyperlink{group___m_o_d_b_u_s___c_o_n_f_i_g_s_gab9b18e108b98b225a52c5ccca58e7f2b}{MODBUS\_DEVICE\_ID}},\ \mbox{\hyperlink{group___m_o_d_b_u_s___c_o_n_f_i_g_s_ga66f7c59a25c8cca6d5b0991895c26b69}{MODBUS\_TIMEOUT}},\ \mbox{\hyperlink{group___m_o_d_b_u_s___f_u_n_c_t_i_o_n_s_gac0b3749af91f1007fd0291157b66b305}{MODBUS\_MODE\_SLAVE}});}
\DoxyCodeLine{\ \ \ \ }
\DoxyCodeLine{\ \ \ \ \textcolor{comment}{//\ Запуск\ приема\ Modbus}}
\DoxyCodeLine{\ \ \ \ \mbox{\hyperlink{group___m_o_d_b_u_s___f_u_n_c_t_i_o_n_s_ga9a17402983188566254b7096342ba69e}{MODBUS\_SlaveStart}}(\&\mbox{\hyperlink{group___r_s___t_o_o_l_s_gadaef5cb7e494d0fd139199f5b6cbeb86}{hmodbus1}},\ NULL);}
\DoxyCodeLine{\ \ \ \ }
\DoxyCodeLine{\ \ \ \ \textcolor{keywordflow}{while}\ (1)}
\DoxyCodeLine{\ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{comment}{//\ Основной\ цикл}}
\DoxyCodeLine{\ \ \ \ \}}
\DoxyCodeLine{\}}
\end{DoxyCode}
Чтобы настроить Master-\/режим {\ttfamily main()} после инициализации HAL\+:
\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{preprocessor}{\#include\ "{}\mbox{\hyperlink{modbus_8h}{modbus.h}}"{}}}
\DoxyCodeLine{\textcolor{comment}{//\ Запрос\ на\ 1\ ID,\ считать\ холдинг\ регистры\ с\ 0\ адреса\ 10\ штук}}
\DoxyCodeLine{\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\_MsgTypeDef}}\ read\_hold\_cmd\ =\ \mbox{\hyperlink{group___m_o_d_b_u_s___r_e_q_u_e_s_t___m_s_g_ga4a4798a15608f3aac04150115a628f8e}{MB\_REQUEST\_READ\_HOLDING\_REGS}}(1,\ 0,\ 10);}
\DoxyCodeLine{\textcolor{comment}{//\ коллбек,\ вызовется\ при\ получении\ ответа\ от\ слейва}}
\DoxyCodeLine{read\_hold[10];}
\DoxyCodeLine{\textcolor{keywordtype}{void}\ callback\_func(\mbox{\hyperlink{struct_r_s___handle_type_def}{RS\_HandleTypeDef}}\ *hmodbus,\ \mbox{\hyperlink{struct_r_s___msg_type_def}{RS\_MsgTypeDef}}\ *modbus\_msg)\ }
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ \ \textcolor{comment}{//\ MB\_RespGet\_...\ Чтобы\ достать\ нужные\ данные\ из\ ответа}}
\DoxyCodeLine{\ \ \ \ \textcolor{keywordflow}{if}(hmodbus-\/>\mbox{\hyperlink{struct_r_s___handle_type_def_a8bbcb263ae7a61790b559bcb55cd9aa9}{RS\_STATUS}}\ ==\ RS\_OK)}
\DoxyCodeLine{\ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}(\textcolor{keywordtype}{int}\ addr\ =\ \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}}.Addr;\ addr\ <\ \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}}.Addr\ +\ \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}}.Qnt;\ addr++)}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ uint16\_t\ value;}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}(\mbox{\hyperlink{group___m_o_d_b_u_s___r_e_g_s___a_p_i_ga1f80317087624a23f84224c6f2c1d596}{MB\_RespGet\_RegisterValue}}(\&\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}},\ addr,\ \&value))}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ read\_hold[i]\ =\ value;}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\ \ \ \ \}}
\DoxyCodeLine{\}}
\DoxyCodeLine{\textcolor{keywordtype}{int}\ main(\textcolor{keywordtype}{void})}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ \ \textcolor{comment}{//\ Инициализация\ HAL}}
\DoxyCodeLine{\ \ \ \ HAL\_Init();}
\DoxyCodeLine{\ \ \ \ SystemClock\_Config();}
\DoxyCodeLine{\ \ \ \ MX\_GPIO\_Init();}
\DoxyCodeLine{\ \ \ \ MX\_USART1\_UART\_Init();}
\DoxyCodeLine{\ \ \ \ MX\_TIM3\_Init();}
\DoxyCodeLine{\ \ \ \ }
\DoxyCodeLine{\ \ \ \ \textcolor{comment}{//\ Инициализация\ Modbus}}
\DoxyCodeLine{\ \ \ \ \mbox{\hyperlink{group___m_o_d_b_u_s___f_u_n_c_t_i_o_n_s_ga9e787c3454aab3293dec6e6795f687f5}{MODBUS\_FirstInit}}(\&\mbox{\hyperlink{group___r_s___t_o_o_l_s_gadaef5cb7e494d0fd139199f5b6cbeb86}{hmodbus1}},\ \&\mbox{\hyperlink{group___m_o_d_b_u_s___c_o_n_f_i_g_s_ga370986118b8227cb6cb33c6b748fbbcb}{mb\_huart}},\ \&\mbox{\hyperlink{group___m_o_d_b_u_s___c_o_n_f_i_g_s_ga6723a1608946a4f86cd7c9c7e614d04e}{mb\_htim}});}
\DoxyCodeLine{\ \ \ \ \mbox{\hyperlink{group___m_o_d_b_u_s___f_u_n_c_t_i_o_n_s_ga460466907693a256487d31f09b16edfe}{MODBUS\_Config}}(\&\mbox{\hyperlink{group___r_s___t_o_o_l_s_gadaef5cb7e494d0fd139199f5b6cbeb86}{hmodbus1}},\ 0,\ \mbox{\hyperlink{group___m_o_d_b_u_s___c_o_n_f_i_g_s_ga66f7c59a25c8cca6d5b0991895c26b69}{MODBUS\_TIMEOUT}},\ \mbox{\hyperlink{group___m_o_d_b_u_s___f_u_n_c_t_i_o_n_s_gad91eec9c3350f2705f1bbe1856cb0159}{MODBUS\_MODE\_MASTER}});}
\DoxyCodeLine{\ \ \ \ }
\DoxyCodeLine{\ \ \ \ \textcolor{comment}{//\ Запрос\ по\ Modbus}}
\DoxyCodeLine{\ \ \ \ \mbox{\hyperlink{group___m_o_d_b_u_s___f_u_n_c_t_i_o_n_s_ga19090cabfba2345391e37398125a2f55}{MODBUS\_MasterRequest}}(\&\mbox{\hyperlink{group___r_s___t_o_o_l_s_gadaef5cb7e494d0fd139199f5b6cbeb86}{hmodbus1}},\ \&read\_hold\_cmd,\ \&callback\_func);}
\DoxyCodeLine{}
\DoxyCodeLine{\}}
\end{DoxyCode}
\hypertarget{index_autotoc_md35-настройка-карты-данных}{}\doxysubsubsection{\texorpdfstring{3.\+5. Настройка карты данных}{3.\+5. Настройка карты данных}}\label{index_autotoc_md35-настройка-карты-данных}
В {\ttfamily \doxylink{modbus__data_8h}{modbus\+\_\+data.\+h}} настройте регистры и coils под ваше устройство\+:
{\bfseries{Input Registers (только чтение)}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{keyword}{typedef}\ \textcolor{keyword}{struct}}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ \ uint16\_t\ Temperature;\ \ \ \ \ \ \textcolor{comment}{//\ Адрес\ 0}}
\DoxyCodeLine{\ \ \ \ uint16\_t\ Humidity;\ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ Адрес\ 1\ \ }}
\DoxyCodeLine{\ \ \ \ uint16\_t\ Pressure;\ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ Адрес\ 2}}
\DoxyCodeLine{\ \ \ \ uint16\_t\ Voltage;\ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ Адрес\ 3}}
\DoxyCodeLine{\}\ \mbox{\hyperlink{struct_m_b___data_in_regs_type_def}{MB\_DataInRegsTypeDef}};}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{preprocessor}{\#define\ R\_INPUT\_ADDR\ \ \ \ \ \ \ \ 0\ \ }\textcolor{comment}{//\ Начальный\ адрес\ Input\ регистров}}
\DoxyCodeLine{\textcolor{preprocessor}{\#define\ R\_INPUT\_QNT\ \ \ \ \ \ \ \ \ 4\ \ }\textcolor{comment}{//\ Количество\ Input\ регистров}}
\end{DoxyCode}
{\bfseries{Holding Registers (чтение/запись)}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{keyword}{typedef}\ \textcolor{keyword}{struct}}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ \ uint16\_t\ SetpointTemp;\ \ \ \ \ \textcolor{comment}{//\ Адрес\ 0}}
\DoxyCodeLine{\ \ \ \ uint16\_t\ SetpointHumidity;\ \textcolor{comment}{//\ Адрес\ 1}}
\DoxyCodeLine{\ \ \ \ uint16\_t\ ControlMode;\ \ \ \ \ \ \textcolor{comment}{//\ Адрес\ 2}}
\DoxyCodeLine{\}\ \mbox{\hyperlink{struct_m_b___data_hold_regs_type_def}{MB\_DataHoldRegsTypeDef}};}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{preprocessor}{\#define\ R\_HOLDING\_ADDR\ \ \ \ \ \ 0\ \ }\textcolor{comment}{//\ Начальный\ адрес\ Holding\ регистров\ \ }}
\DoxyCodeLine{\textcolor{preprocessor}{\#define\ R\_HOLDING\_QNT\ \ \ \ \ \ \ 3\ \ }\textcolor{comment}{//\ Количество\ Holding\ регистров}}
\end{DoxyCode}
{\bfseries{Coils (1-\/битные)}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{keyword}{typedef}\ \textcolor{keyword}{struct}}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ \ \textcolor{keywordtype}{unsigned}\ Relay1\ \ \ \ :\ 1;\ \ \ \ \textcolor{comment}{//\ Адрес\ 0}}
\DoxyCodeLine{\ \ \ \ \textcolor{keywordtype}{unsigned}\ Relay2\ \ \ \ :\ 1;\ \ \ \ \textcolor{comment}{//\ Адрес\ 1\ \ }}
\DoxyCodeLine{\ \ \ \ \textcolor{keywordtype}{unsigned}\ Pump\ \ \ \ \ \ :\ 1;\ \ \ \ \textcolor{comment}{//\ Адрес\ 2}}
\DoxyCodeLine{\ \ \ \ \textcolor{keywordtype}{unsigned}\ Heater\ \ \ \ :\ 1;\ \ \ \ \textcolor{comment}{//\ Адрес\ 3}}
\DoxyCodeLine{\ \ \ \ \textcolor{keywordtype}{unsigned}\ reserved\ \ :\ 12;\ \ \ \textcolor{comment}{//\ Резерв\ (выравнивание\ до\ 16\ бит)}}
\DoxyCodeLine{\}\ \mbox{\hyperlink{struct_m_b___data_coils_type_def}{MB\_DataCoilsTypeDef}};}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{preprocessor}{\#define\ C\_COILS\_ADDR\ \ \ \ \ \ \ \ 0\ \ }\textcolor{comment}{//\ Начальный\ адрес\ Coils}}
\DoxyCodeLine{\textcolor{preprocessor}{\#define\ C\_COILS\_QNT\ \ \ \ \ \ \ \ \ 4\ \ }\textcolor{comment}{//\ Количество\ Coils}}
\end{DoxyCode}
\hypertarget{index_autotoc_md36-доступ-к-данным-в-коде}{}\doxysubsubsection{\texorpdfstring{3.\+6. Доступ к данным в коде}{3.\+6. Доступ к данным в коде}}\label{index_autotoc_md36-доступ-к-данным-в-коде}
В режиме слейва есть дефайны для удобного выставления Коилов. На случай если они не упакованы в битовые поля
\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{comment}{//\ Чтение\ входных\ регистров}}
\DoxyCodeLine{uint16\_t\ temp\ =\ MB\_DATA.InRegs.Temperature;}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{comment}{//\ Запись\ в\ регистры\ хранения}}
\DoxyCodeLine{MB\_DATA.HoldRegs.SetpointTemp\ =\ 2500;}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{comment}{//\ Управление\ coils}}
\DoxyCodeLine{\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_ga635a6c4fbce49bd1e6797642b36dae7e}{MB\_Coil\_Set\_Local}}(\&MB\_DATA.Coils,\ 0);\ \ \textcolor{comment}{//\ Включить\ Relay1}}
\DoxyCodeLine{\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_gabc4efb5e2a6aaa021ef5fe6c69476927}{MB\_Coil\_Reset\_Local}}(\&MB\_DATA.Coils,\ 1);\ \textcolor{comment}{//\ Выключить\ Relay2}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{comment}{//\ Чтение\ coil}}
\DoxyCodeLine{\textcolor{keywordflow}{if}\ (\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_ga0f8474120df77dc5f334d60d6a5f6f8f}{MB\_Coil\_Read\_Local}}(\&MB\_DATA.Coils,\ 2))\ \{}
\DoxyCodeLine{\ \ \ \ \textcolor{comment}{//\ Pump\ включен}}
\DoxyCodeLine{\}}
\end{DoxyCode}
В режиме мастера есть функции для получения информации из ответа {\ttfamily MB\+\_\+\+Resp\+Get\+\_\+...()}
\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{comment}{//\ \ Чтение\ регистров:\ Получить\ запрошенные\ регистры}}
\DoxyCodeLine{uint16\_t\ value;}
\DoxyCodeLine{\textcolor{keywordflow}{if}(\mbox{\hyperlink{group___m_o_d_b_u_s___r_e_g_s___a_p_i_ga1f80317087624a23f84224c6f2c1d596}{MB\_RespGet\_RegisterValue}}(\&\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}},\ 105,\ \&reg\_value))}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ \ printf(\textcolor{stringliteral}{"{}Register\ 105\ value:\ \%d\(\backslash\)n"{}},\ reg\_value);}
\DoxyCodeLine{\}}
\DoxyCodeLine{\textcolor{comment}{//\ \ Чтение\ коилов:\ Получить\ запрошенные\ коилы}}
\DoxyCodeLine{\textcolor{keywordtype}{int}\ state;}
\DoxyCodeLine{\textcolor{keywordflow}{if}(\mbox{\hyperlink{group___m_o_d_b_u_s___r_e_q___c_o_i_l_s___a_p_i_ga643a0be1ccd587a6dfe544d9fd5ed018}{MB\_RespGet\_CoilState}}(\&\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}},\ 25,\ \&coil\_state))}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ \ printf(\textcolor{stringliteral}{"{}Coil\ 25\ state:\ \%s\(\backslash\)n"{}},\ coil\_state\ ?\ \textcolor{stringliteral}{"{}ON"{}}\ :\ \textcolor{stringliteral}{"{}OFF"{}});}
\DoxyCodeLine{\}}
\DoxyCodeLine{\textcolor{comment}{//\ \ Чтение\ диагностики:\ Получить\ запрошенныую\ диагностику}}
\DoxyCodeLine{uint16\_t\ counter\_value;}
\DoxyCodeLine{\textcolor{keywordflow}{if}(MB\_RespGet\_DiagnosticResponse(\&\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}},\ \&counter\_value))}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ \ printf(\textcolor{stringliteral}{"{}Counter\ value:\ \%d\(\backslash\)n"{}},\ counter\_value);}
\DoxyCodeLine{\}}
\DoxyCodeLine{\textcolor{comment}{//\ \ Чтение\ идентификаторов:\ Получить\ запрошенные\ идентификаторы}}
\DoxyCodeLine{uint8\_t\ length;}
\DoxyCodeLine{\textcolor{keywordtype}{char}\ vendor\_name[64];}
\DoxyCodeLine{\textcolor{keywordflow}{if}(\mbox{\hyperlink{group___m_o_d_b_u_s___r_e_q___d_e_f_i_d___a_p_i_ga0dc4119c008af34d5997eab339c437be}{MB\_RespGet\_ObjectById}}(\&\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}},\ 0x00,\ vendor\_name,\ \&length))}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ \ printf(\textcolor{stringliteral}{"{}Vendor\ Name:\ \%s\ (length:\ \%d)\(\backslash\)n"{}},\ vendor\_name,\ length);}
\DoxyCodeLine{\}\ \ \ }
\DoxyCodeLine{}
\DoxyCodeLine{uint8\_t\ obj\_id,\ obj\_length;}
\DoxyCodeLine{\textcolor{keywordtype}{char}\ obj\_data[64];}
\DoxyCodeLine{\textcolor{keywordflow}{if}(\mbox{\hyperlink{group___m_o_d_b_u_s___r_e_q___d_e_f_i_d___a_p_i_ga3fc5fc5abfe4f8767ccee5c11ea3d5d5}{MB\_RespGet\_ObjectByIndex}}(\&\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}},\ 0x00,\ \&obj\_id,\ obj\_data,\ \&obj\_length))}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ \ printf(\textcolor{stringliteral}{"{}First\ object\ -\/\ ID:\ 0x\%02X,\ Data:\ \%s\(\backslash\)n"{}},\ obj\_id,\ obj\_data);}
\DoxyCodeLine{\}\ \ \ }
\end{DoxyCode}
\hypertarget{index_autotoc_md5-обновление-библиотеки}{}\doxysubsection{\texorpdfstring{5. {\bfseries{Обновление библиотеки}}\+:}{5. {\bfseries{Обновление библиотеки}}\+:}}\label{index_autotoc_md5-обновление-библиотеки}
После обновления субмодуля из Git, исходные файлы библиотеки будут обновлены, и ваши конфиги вне субмодуля не перезапишутся\+:
\begin{DoxyCode}{0}
\DoxyCodeLine{git\ submodule\ update\ -\/-\/remote}
\end{DoxyCode}

View File

@@ -0,0 +1,459 @@
%%
%% This is file `longtable.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% longtable.dtx (with options: `package')
%%
%% This is a generated file.
%%
%% The source is maintained by the LaTeX Project team and bug
%% reports for it can be opened at http://latex-project.org/bugs.html
%% (but please observe conditions on bug reports sent to that address!)
%%
%% Copyright 1993-2016
%% The LaTeX3 Project and any individual authors listed elsewhere
%% in this file.
%%
%% This file was generated from file(s) of the Standard LaTeX `Tools Bundle'.
%% --------------------------------------------------------------------------
%%
%% It may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3c
%% of this license or (at your option) any later version.
%% The latest version of this license is in
%% http://www.latex-project.org/lppl.txt
%% and version 1.3c or later is part of all distributions of LaTeX
%% version 2005/12/01 or later.
%%
%% This file may only be distributed together with a copy of the LaTeX
%% `Tools Bundle'. You may however distribute the LaTeX `Tools Bundle'
%% without such generated files.
%%
%% The list of all files belonging to the LaTeX `Tools Bundle' is
%% given in the file `manifest.txt'.
%%
%% File: longtable.dtx Copyright (C) 1990-2001 David Carlisle
\NeedsTeXFormat{LaTeX2e}[1995/06/01]
\ProvidesPackage{longtable_doxygen}
[2014/10/28 v4.11 Multi-page Table package (DPC) - frozen version for doxygen]
\def\LT@err{\PackageError{longtable}}
\def\LT@warn{\PackageWarning{longtable}}
\def\LT@final@warn{%
\AtEndDocument{%
\LT@warn{Table \@width s have changed. Rerun LaTeX.\@gobbletwo}}%
\global\let\LT@final@warn\relax}
\DeclareOption{errorshow}{%
\def\LT@warn{\PackageInfo{longtable}}}
\DeclareOption{pausing}{%
\def\LT@warn#1{%
\LT@err{#1}{This is not really an error}}}
\DeclareOption{set}{}
\DeclareOption{final}{}
\ProcessOptions
\newskip\LTleft \LTleft=\fill
\newskip\LTright \LTright=\fill
\newskip\LTpre \LTpre=\bigskipamount
\newskip\LTpost \LTpost=\bigskipamount
\newcount\LTchunksize \LTchunksize=20
\let\c@LTchunksize\LTchunksize
\newdimen\LTcapwidth \LTcapwidth=4in
\newbox\LT@head
\newbox\LT@firsthead
\newbox\LT@foot
\newbox\LT@lastfoot
\newcount\LT@cols
\newcount\LT@rows
\newcounter{LT@tables}
\newcounter{LT@chunks}[LT@tables]
\ifx\c@table\undefined
\newcounter{table}
\def\fnum@table{\tablename~\thetable}
\fi
\ifx\tablename\undefined
\def\tablename{Table}
\fi
\newtoks\LT@p@ftn
\mathchardef\LT@end@pen=30000
\def\longtable{%
\par
\ifx\multicols\@undefined
\else
\ifnum\col@number>\@ne
\@twocolumntrue
\fi
\fi
\if@twocolumn
\LT@err{longtable not in 1-column mode}\@ehc
\fi
\begingroup
\@ifnextchar[\LT@array{\LT@array[x]}}
\def\LT@array[#1]#2{%
\refstepcounter{table}\stepcounter{LT@tables}%
\if l#1%
\LTleft\z@ \LTright\fill
\else\if r#1%
\LTleft\fill \LTright\z@
\else\if c#1%
\LTleft\fill \LTright\fill
\fi\fi\fi
\let\LT@mcol\multicolumn
\let\LT@@tabarray\@tabarray
\let\LT@@hl\hline
\def\@tabarray{%
\let\hline\LT@@hl
\LT@@tabarray}%
\let\\\LT@tabularcr\let\tabularnewline\\%
\def\newpage{\noalign{\break}}%
\def\pagebreak{\noalign{\ifnum`}=0\fi\@testopt{\LT@no@pgbk-}4}%
\def\nopagebreak{\noalign{\ifnum`}=0\fi\@testopt\LT@no@pgbk4}%
\let\hline\LT@hline \let\kill\LT@kill\let\caption\LT@caption
\@tempdima\ht\strutbox
\let\@endpbox\LT@endpbox
\ifx\extrarowheight\@undefined
\let\@acol\@tabacol
\let\@classz\@tabclassz \let\@classiv\@tabclassiv
\def\@startpbox{\vtop\LT@startpbox}%
\let\@@startpbox\@startpbox
\let\@@endpbox\@endpbox
\let\LT@LL@FM@cr\@tabularcr
\else
\advance\@tempdima\extrarowheight
\col@sep\tabcolsep
\let\@startpbox\LT@startpbox\let\LT@LL@FM@cr\@arraycr
\fi
\setbox\@arstrutbox\hbox{\vrule
\@height \arraystretch \@tempdima
\@depth \arraystretch \dp \strutbox
\@width \z@}%
\let\@sharp##\let\protect\relax
\begingroup
\@mkpream{#2}%
\xdef\LT@bchunk{%
\global\advance\c@LT@chunks\@ne
\global\LT@rows\z@\setbox\z@\vbox\bgroup
\LT@setprevdepth
\tabskip\LTleft \noexpand\halign to\hsize\bgroup
\tabskip\z@ \@arstrut \@preamble \tabskip\LTright \cr}%
\endgroup
\expandafter\LT@nofcols\LT@bchunk&\LT@nofcols
\LT@make@row
\m@th\let\par\@empty
\everycr{}\lineskip\z@\baselineskip\z@
\LT@bchunk}
\def\LT@no@pgbk#1[#2]{\penalty #1\@getpen{#2}\ifnum`{=0\fi}}
\def\LT@start{%
\let\LT@start\endgraf
\endgraf\penalty\z@\vskip\LTpre
\dimen@\pagetotal
\advance\dimen@ \ht\ifvoid\LT@firsthead\LT@head\else\LT@firsthead\fi
\advance\dimen@ \dp\ifvoid\LT@firsthead\LT@head\else\LT@firsthead\fi
\advance\dimen@ \ht\LT@foot
\dimen@ii\vfuzz
\vfuzz\maxdimen
\setbox\tw@\copy\z@
\setbox\tw@\vsplit\tw@ to \ht\@arstrutbox
\setbox\tw@\vbox{\unvbox\tw@}%
\vfuzz\dimen@ii
\advance\dimen@ \ht
\ifdim\ht\@arstrutbox>\ht\tw@\@arstrutbox\else\tw@\fi
\advance\dimen@\dp
\ifdim\dp\@arstrutbox>\dp\tw@\@arstrutbox\else\tw@\fi
\advance\dimen@ -\pagegoal
\ifdim \dimen@>\z@\vfil\break\fi
\global\@colroom\@colht
\ifvoid\LT@foot\else
\global\advance\vsize-\ht\LT@foot
\global\advance\@colroom-\ht\LT@foot
\dimen@\pagegoal\advance\dimen@-\ht\LT@foot\pagegoal\dimen@
\maxdepth\z@
\fi
\ifvoid\LT@firsthead\copy\LT@head\else\box\LT@firsthead\fi\nobreak
\output{\LT@output}}
\def\endlongtable{%
\crcr
\noalign{%
\let\LT@entry\LT@entry@chop
\xdef\LT@save@row{\LT@save@row}}%
\LT@echunk
\LT@start
\unvbox\z@
\LT@get@widths
\if@filesw
{\let\LT@entry\LT@entry@write\immediate\write\@auxout{%
\gdef\expandafter\noexpand
\csname LT@\romannumeral\c@LT@tables\endcsname
{\LT@save@row}}}%
\fi
\ifx\LT@save@row\LT@@save@row
\else
\LT@warn{Column \@width s have changed\MessageBreak
in table \thetable}%
\LT@final@warn
\fi
\endgraf\penalty -\LT@end@pen
\ifvoid\LT@foot\else
\global\advance\vsize\ht\LT@foot
\global\advance\@colroom\ht\LT@foot
\dimen@\pagegoal\advance\dimen@\ht\LT@foot\pagegoal\dimen@
\fi
\endgroup
\global\@mparbottom\z@
\endgraf\penalty\z@\addvspace\LTpost
\ifvoid\footins\else\insert\footins{}\fi}
\def\LT@nofcols#1&{%
\futurelet\@let@token\LT@n@fcols}
\def\LT@n@fcols{%
\advance\LT@cols\@ne
\ifx\@let@token\LT@nofcols
\expandafter\@gobble
\else
\expandafter\LT@nofcols
\fi}
\def\LT@tabularcr{%
\relax\iffalse{\fi\ifnum0=`}\fi
\@ifstar
{\def\crcr{\LT@crcr\noalign{\nobreak}}\let\cr\crcr
\LT@t@bularcr}%
{\LT@t@bularcr}}
\let\LT@crcr\crcr
\let\LT@setprevdepth\relax
\def\LT@t@bularcr{%
\global\advance\LT@rows\@ne
\ifnum\LT@rows=\LTchunksize
\gdef\LT@setprevdepth{%
\prevdepth\z@\global
\global\let\LT@setprevdepth\relax}%
\expandafter\LT@xtabularcr
\else
\ifnum0=`{}\fi
\expandafter\LT@LL@FM@cr
\fi}
\def\LT@xtabularcr{%
\@ifnextchar[\LT@argtabularcr\LT@ntabularcr}
\def\LT@ntabularcr{%
\ifnum0=`{}\fi
\LT@echunk
\LT@start
\unvbox\z@
\LT@get@widths
\LT@bchunk}
\def\LT@argtabularcr[#1]{%
\ifnum0=`{}\fi
\ifdim #1>\z@
\unskip\@xargarraycr{#1}%
\else
\@yargarraycr{#1}%
\fi
\LT@echunk
\LT@start
\unvbox\z@
\LT@get@widths
\LT@bchunk}
\def\LT@echunk{%
\crcr\LT@save@row\cr\egroup
\global\setbox\@ne\lastbox
\unskip
\egroup}
\def\LT@entry#1#2{%
\ifhmode\@firstofone{&}\fi\omit
\ifnum#1=\c@LT@chunks
\else
\kern#2\relax
\fi}
\def\LT@entry@chop#1#2{%
\noexpand\LT@entry
{\ifnum#1>\c@LT@chunks
1}{0pt%
\else
#1}{#2%
\fi}}
\def\LT@entry@write{%
\noexpand\LT@entry^^J%
\@spaces}
\def\LT@kill{%
\LT@echunk
\LT@get@widths
\expandafter\LT@rebox\LT@bchunk}
\def\LT@rebox#1\bgroup{%
#1\bgroup
\unvbox\z@
\unskip
\setbox\z@\lastbox}
\def\LT@blank@row{%
\xdef\LT@save@row{\expandafter\LT@build@blank
\romannumeral\number\LT@cols 001 }}
\def\LT@build@blank#1{%
\if#1m%
\noexpand\LT@entry{1}{0pt}%
\expandafter\LT@build@blank
\fi}
\def\LT@make@row{%
\global\expandafter\let\expandafter\LT@save@row
\csname LT@\romannumeral\c@LT@tables\endcsname
\ifx\LT@save@row\relax
\LT@blank@row
\else
{\let\LT@entry\or
\if!%
\ifcase\expandafter\expandafter\expandafter\LT@cols
\expandafter\@gobble\LT@save@row
\or
\else
\relax
\fi
!%
\else
\aftergroup\LT@blank@row
\fi}%
\fi}
\let\setlongtables\relax
\def\LT@get@widths{%
\setbox\tw@\hbox{%
\unhbox\@ne
\let\LT@old@row\LT@save@row
\global\let\LT@save@row\@empty
\count@\LT@cols
\loop
\unskip
\setbox\tw@\lastbox
\ifhbox\tw@
\LT@def@row
\advance\count@\m@ne
\repeat}%
\ifx\LT@@save@row\@undefined
\let\LT@@save@row\LT@save@row
\fi}
\def\LT@def@row{%
\let\LT@entry\or
\edef\@tempa{%
\ifcase\expandafter\count@\LT@old@row
\else
{1}{0pt}%
\fi}%
\let\LT@entry\relax
\xdef\LT@save@row{%
\LT@entry
\expandafter\LT@max@sel\@tempa
\LT@save@row}}
\def\LT@max@sel#1#2{%
{\ifdim#2=\wd\tw@
#1%
\else
\number\c@LT@chunks
\fi}%
{\the\wd\tw@}}
\def\LT@hline{%
\noalign{\ifnum0=`}\fi
\penalty\@M
\futurelet\@let@token\LT@@hline}
\def\LT@@hline{%
\ifx\@let@token\hline
\global\let\@gtempa\@gobble
\gdef\LT@sep{\penalty-\@medpenalty\vskip\doublerulesep}%
\else
\global\let\@gtempa\@empty
\gdef\LT@sep{\penalty-\@lowpenalty\vskip-\arrayrulewidth}%
\fi
\ifnum0=`{\fi}%
\multispan\LT@cols
\unskip\leaders\hrule\@height\arrayrulewidth\hfill\cr
\noalign{\LT@sep}%
\multispan\LT@cols
\unskip\leaders\hrule\@height\arrayrulewidth\hfill\cr
\noalign{\penalty\@M}%
\@gtempa}
\def\LT@caption{%
\noalign\bgroup
\@ifnextchar[{\egroup\LT@c@ption\@firstofone}\LT@capti@n}
\def\LT@c@ption#1[#2]#3{%
\LT@makecaption#1\fnum@table{#3}%
\def\@tempa{#2}%
\ifx\@tempa\@empty\else
{\let\\\space
\addcontentsline{lot}{table}{\protect\numberline{\thetable}{#2}}}%
\fi}
\def\LT@capti@n{%
\@ifstar
{\egroup\LT@c@ption\@gobble[]}%
{\egroup\@xdblarg{\LT@c@ption\@firstofone}}}
\def\LT@makecaption#1#2#3{%
\LT@mcol\LT@cols c{\hbox to\z@{\hss\parbox[t]\LTcapwidth{%
\sbox\@tempboxa{#1{#2: }#3}%
\ifdim\wd\@tempboxa>\hsize
#1{#2: }#3%
\else
\hbox to\hsize{\hfil\box\@tempboxa\hfil}%
\fi
\endgraf\vskip\baselineskip}%
\hss}}}
\def\LT@output{%
\ifnum\outputpenalty <-\@Mi
\ifnum\outputpenalty > -\LT@end@pen
\LT@err{floats and marginpars not allowed in a longtable}\@ehc
\else
\setbox\z@\vbox{\unvbox\@cclv}%
\ifdim \ht\LT@lastfoot>\ht\LT@foot
\dimen@\pagegoal
\advance\dimen@\ht\LT@foot
\advance\dimen@-\ht\LT@lastfoot
\ifdim\dimen@<\ht\z@
\setbox\@cclv\vbox{\unvbox\z@\copy\LT@foot\vss}%
\@makecol
\@outputpage
\global\vsize\@colroom
\setbox\z@\vbox{\box\LT@head}%
\fi
\fi
\unvbox\z@\ifvoid\LT@lastfoot\copy\LT@foot\else\box\LT@lastfoot\fi
\fi
\else
\setbox\@cclv\vbox{\unvbox\@cclv\copy\LT@foot\vss}%
\@makecol
\@outputpage
\global\vsize\@colroom
\copy\LT@head\nobreak
\fi}
\def\LT@end@hd@ft#1{%
\LT@echunk
\ifx\LT@start\endgraf
\LT@err
{Longtable head or foot not at start of table}%
{Increase LTchunksize}%
\fi
\setbox#1\box\z@
\LT@get@widths
\LT@bchunk}
\def\endfirsthead{\LT@end@hd@ft\LT@firsthead}
\def\endhead{\LT@end@hd@ft\LT@head}
\def\endfoot{\LT@end@hd@ft\LT@foot}
\def\endlastfoot{\LT@end@hd@ft\LT@lastfoot}
\def\LT@startpbox#1{%
\bgroup
\let\@footnotetext\LT@p@ftntext
\setlength\hsize{#1}%
\@arrayparboxrestore
\vrule \@height \ht\@arstrutbox \@width \z@}
\def\LT@endpbox{%
\@finalstrut\@arstrutbox
\egroup
\the\LT@p@ftn
\global\LT@p@ftn{}%
\hfil}
%% added \long to prevent:
% LaTeX Warning: Command \LT@p@ftntext has changed.
%
% from the original repository (https://github.com/latex3/latex2e/blob/develop/required/tools/longtable.dtx):
% \changes{v4.15}{2021/03/28}
% {make long for gh/364}
% Inside the `p' column, just save up the footnote text in a token
% register.
\long\def\LT@p@ftntext#1{%
\edef\@tempa{\the\LT@p@ftn\noexpand\footnotetext[\the\c@footnote]}%
\global\LT@p@ftn\expandafter{\@tempa{#1}}}%
\@namedef{ver@longtable.sty}{2014/10/28 v4.11 Multi-page Table package (DPC) - frozen version for doxygen}
\endinput
%%
%% End of file `longtable.sty'.

View File

@@ -0,0 +1,67 @@
pushd %~dp0
if not %errorlevel% == 0 goto :end1
set ORG_LATEX_CMD=%LATEX_CMD%
set ORG_MKIDX_CMD=%MKIDX_CMD%
set ORG_BIBTEX_CMD=%BIBTEX_CMD%
set ORG_LATEX_COUNT=%LATEX_COUNT%
set ORG_MANUAL_FILE=%MANUAL_FILE%
if "X"%LATEX_CMD% == "X" set LATEX_CMD=pdflatex
if "X"%MKIDX_CMD% == "X" set MKIDX_CMD=makeindex
if "X"%BIBTEX_CMD% == "X" set BIBTEX_CMD=bibtex
if "X"%LATEX_COUNT% == "X" set LATEX_COUNT=8
if "X"%MANUAL_FILE% == "X" set MANUAL_FILE=refman
del /s /f *.ps *.dvi *.aux *.toc *.idx *.ind *.ilg *.log *.out *.brf *.blg *.bbl %MANUAL_FILE%.pdf
%LATEX_CMD% %MANUAL_FILE%
@if ERRORLEVEL 1 goto :error
echo ----
%MKIDX_CMD% %MANUAL_FILE%.idx
echo ----
%LATEX_CMD% %MANUAL_FILE%
@if ERRORLEVEL 1 goto :error
setlocal enabledelayedexpansion
set count=%LATEX_COUNT%
:repeat
set content=X
for /F "tokens=*" %%T in ( 'findstr /C:"Rerun LaTeX" %MANUAL_FILE%.log' ) do set content="%%~T"
if !content! == X for /F "tokens=*" %%T in ( 'findstr /C:"Rerun to get cross-references right" %MANUAL_FILE%.log' ) do set content="%%~T"
if !content! == X for /F "tokens=*" %%T in ( 'findstr /C:"Rerun to get bibliographical references right" %MANUAL_FILE%.log' ) do set content="%%~T"
if !content! == X goto :skip
set /a count-=1
if !count! EQU 0 goto :skip
echo ----
%LATEX_CMD% %MANUAL_FILE%
@if ERRORLEVEL 1 goto :error
goto :repeat
:skip
endlocal
%MKIDX_CMD% %MANUAL_FILE%.idx
%LATEX_CMD% %MANUAL_FILE%
@if ERRORLEVEL 1 goto :error
goto :end
:error
@echo ===============
@echo Please consult %MANUAL_FILE%.log to see the error messages
@echo ===============
:end
@REM reset environment
popd
set LATEX_CMD=%ORG_LATEX_CMD%
set ORG_LATEX_CMD=
set MKIDX_CMD=%ORG_MKIDX_CMD%
set ORG_MKIDX_CMD=
set BIBTEX_CMD=%ORG_BIBTEX_CMD%
set ORG_BIBTEX_CMD=
set MANUAL_FILE=%ORG_MANUAL_FILE%
set ORG_MANUAL_FILE=
set LATEX_COUNT=%ORG_LATEX_COUNT%
set ORG_LATEX_COUNT=
:end1

View File

@@ -0,0 +1,264 @@
\chapter{Инструкция по подключению релиза библиотеки {\ttfamily STM Modbus} }
\hypertarget{md__e_1_2_8_w_o_r_k_2_s_t_m32_2_diod___test_2diode__tester_2_core_2_modbus_2_r_e_a_d_m_e}{}\label{md__e_1_2_8_w_o_r_k_2_s_t_m32_2_diod___test_2diode__tester_2_core_2_modbus_2_r_e_a_d_m_e}\index{Инструкция по подключению релиза библиотеки $<$tt$>$STM Modbus$<$/tt$>$@{Инструкция по подключению релиза библиотеки $<$tt$>$STM Modbus$<$/tt$>$}}
\label{md__e_1_2_8_w_o_r_k_2_s_t_m32_2_diod___test_2diode__tester_2_core_2_modbus_2_r_e_a_d_m_e_инструкция-по-подключению-релиза-библиотеки-stm-modbus}%
\Hypertarget{md__e_1_2_8_w_o_r_k_2_s_t_m32_2_diod___test_2diode__tester_2_core_2_modbus_2_r_e_a_d_m_e_инструкция-по-подключению-релиза-библиотеки-stm-modbus}%
Данная библиотека подключается напрямую из Git, как субмодуль. Позволяя при желании обновлять её напрямую через git.\hypertarget{md__e_1_2_8_w_o_r_k_2_s_t_m32_2_diod___test_2diode__tester_2_core_2_modbus_2_r_e_a_d_m_e_структура-библиотеки}{}\doxysection{\texorpdfstring{Структура библиотеки}{Структура библиотеки}}\label{md__e_1_2_8_w_o_r_k_2_s_t_m32_2_diod___test_2diode__tester_2_core_2_modbus_2_r_e_a_d_m_e_структура-библиотеки}
\texorpdfstring{$\ast$}{*}\+Note\+: Файлы начинающиеся с {\ttfamily \+\_\+\+\_\+} и которых {\bfseries{нет}} в этом дереве являются \texorpdfstring{$\ast$}{*}\texorpdfstring{$\ast$}{*}внутренними/непротестированными/недокументированными\texorpdfstring{$\ast$}{*}\texorpdfstring{$\ast$}{*}\texorpdfstring{$\ast$}{*}
\begin{DoxyCode}{0}
\DoxyCodeLine{Modbus/\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Иерархия\ модулей:}
\DoxyCodeLine{\ \ \ inc/\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ modbus}
\DoxyCodeLine{\ \ \ ├──\ modbus.h\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \#\ Главный\ заголовочный\ файл\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ modbus\_slave}
\DoxyCodeLine{\ \ \ ├──\ modbus\_core.h\ \ \ \ \ \ \ \ \ \ \ \#\ Базовые\ определения\ и\ структуры\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ modbus\_master}
\DoxyCodeLine{\ \ \ ├──\ modbus\_coils.h\ \ \ \ \ \ \ \ \ \ \#\ Работа\ с\ дискретными\ выходами\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ├──\ modbus\_coils}
\DoxyCodeLine{\ \ \ ├──\ modbus\_holdregs.h\ \ \ \ \ \ \ \#\ Работа\ с\ регистрами\ хранения\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ├──\ modbus\_inputregs}
\DoxyCodeLine{\ \ \ ├──\ modbus\_inputregs.h\ \ \ \ \ \ \#\ Работа\ с\ входными\ регистрами\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ├──\ modbus\_inputregs}
\DoxyCodeLine{\ \ \ ├──\ modbus\_devid.h\ \ \ \ \ \ \ \ \ \ \#\ Идентификация\ устройства\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ├──\ modbus\_devid}
\DoxyCodeLine{\ \ \ ├──\ rs\_message.h\ \ \ \ \ \ \ \ \ \ \ \ \#\ Драйвер\ обмена\ по\ RS/UART\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ├──\ modbus\_diag}
\DoxyCodeLine{├──\ src/\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ └──\ rs\_message}
\DoxyCodeLine{\ \ \ ├──\ modbus.c\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \#\ Основная\ логика\ Modbus\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }
\DoxyCodeLine{\ \ \ ├──\ modbus\_slave.c\ \ \ \ \ \ \ \ \ \ \#\ Основная\ логика\ Slave\ Modbus\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ └──\ modbus\_core\ (единое\ ядро)}
\DoxyCodeLine{\ \ \ ├──\ modbus\_master.c\ \ \ \ \ \ \ \ \ \#\ Основная\ логика\ Master\ Modbus\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ├──\ modbus\_config}
\DoxyCodeLine{\ \ \ ├──\ modbus\_coils.c\ \ \ \ \ \ \ \ \ \ \#\ Реализация\ работы\ с\ coils\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ├──\ modbus\_data}
\DoxyCodeLine{\ \ \ ├──\ modbus\_holdregs.c\ \ \ \ \ \ \ \#\ Реализация\ регистров\ хранения\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ └──\ \_\_crc\_algs}
\DoxyCodeLine{\ \ \ ├──\ modbus\_inputregs.c\ \ \ \ \ \ \#\ Реализация\ входных\ регистров\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }
\DoxyCodeLine{\ \ \ ├──\ modbus\_devid.c\ \ \ \ \ \ \ \ \ \ \#\ Реализация\ идентификации\ устройства\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }
\DoxyCodeLine{\ \ \ ├──\ modbus\_data.c\ \ \ \ \ \ \ \ \ \ \ \#\ Функции\ доступа\ к\ данным\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }
\DoxyCodeLine{\ \ \ └──\ rs\_message.c\ \ \ \ \ \ \ \ \ \ \ \ \#\ Реализация\ драйвера\ RS\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }
\DoxyCodeLine{├──\ \_\_modbus\_config.h\ \ \ \ \ \ \ \#\ Конфигурация\ Modbus\ (надо\ заменить)\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }
\DoxyCodeLine{├──\ \_\_modbus\_data.h\ \ \ \ \ \ \ \ \ \#\ Структуры\ данных\ (надо\ заменить)\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }
\DoxyCodeLine{└──\ \_\_modbus\_data.c\ \ \ \ \ \ \ \ \ \#\ Функции\ доступа\ (надо\ заменить)\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }
\end{DoxyCode}
\hypertarget{md__e_1_2_8_w_o_r_k_2_s_t_m32_2_diod___test_2diode__tester_2_core_2_modbus_2_r_e_a_d_m_e_инструкция-по-подключению}{}\doxysection{\texorpdfstring{Инструкция по подключению}{Инструкция по подключению}}\label{md__e_1_2_8_w_o_r_k_2_s_t_m32_2_diod___test_2diode__tester_2_core_2_modbus_2_r_e_a_d_m_e_инструкция-по-подключению}
\hypertarget{md__e_1_2_8_w_o_r_k_2_s_t_m32_2_diod___test_2diode__tester_2_core_2_modbus_2_r_e_a_d_m_e_autotoc_md1-склонируйте-субмодуль-в-ваш-проект}{}\doxysubsection{\texorpdfstring{1. {\bfseries{Склонируйте субмодуль}} в ваш проект\+:}{1. {\bfseries{Склонируйте субмодуль}} в ваш проект\+:}}\label{md__e_1_2_8_w_o_r_k_2_s_t_m32_2_diod___test_2diode__tester_2_core_2_modbus_2_r_e_a_d_m_e_autotoc_md1-склонируйте-субмодуль-в-ваш-проект}
\begin{DoxyCode}{0}
\DoxyCodeLine{git\ submodule\ add\ https://git.arktika.cyou/set506/STM32\_Modbus\ path/to/Modbus}
\DoxyCodeLine{git\ submodule\ update\ -\/-\/init\ -\/-\/recursive}
\end{DoxyCode}
\hypertarget{md__e_1_2_8_w_o_r_k_2_s_t_m32_2_diod___test_2diode__tester_2_core_2_modbus_2_r_e_a_d_m_e_autotoc_md2-скопируйте-файлы-конфигурации-в-отдельную-папку-в-вашем-проекте-вне-субмодуля-и-удалите-__-из-имени-файлов}{}\doxysubsection{\texorpdfstring{2. {\bfseries{Скопируйте файлы конфигурации}} в отдельную папку в вашем проекте (вне субмодуля) и удалите {\ttfamily \+\_\+\+\_\+} из имени файлов\+:}{2. {\bfseries{Скопируйте файлы конфигурации}} в отдельную папку в вашем проекте (вне субмодуля) и удалите {\ttfamily \+\_\+\+\_\+} из имени файлов\+:}}\label{md__e_1_2_8_w_o_r_k_2_s_t_m32_2_diod___test_2diode__tester_2_core_2_modbus_2_r_e_a_d_m_e_autotoc_md2-скопируйте-файлы-конфигурации-в-отдельную-папку-в-вашем-проекте-вне-субмодуля-и-удалите-__-из-имени-файлов}
\begin{DoxyCode}{0}
\DoxyCodeLine{ProjectRoot/}
\DoxyCodeLine{├──\ Configs/}
\DoxyCodeLine{\ \ \ ├──\ modbus\_config.h\ \ \ \ \ \ \ \ \ \ \#\ скопировать\ из\ \_\_modbus\_config.h}
\DoxyCodeLine{\ \ \ ├──\ modbus\_data.h\ \ \ \ \ \ \ \ \ \ \ \ \#\ скопировать\ из\ \_\_modbus\_data.h}
\DoxyCodeLine{\ \ \ └──\ modbus\_data.c\ \ \ \ \ \ \ \ \ \ \ \ \#\ скопировать\ из\ \_\_modbus\_data.c}
\DoxyCodeLine{└──\ Modbus/\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \#\ Субмодуль}
\end{DoxyCode}
\hypertarget{md__e_1_2_8_w_o_r_k_2_s_t_m32_2_diod___test_2diode__tester_2_core_2_modbus_2_r_e_a_d_m_e_autotoc_md3-настройте-конфигурацию-под-ваш-проект}{}\doxysubsection{\texorpdfstring{3. {\bfseries{Настройте конфигурацию}} под ваш проект\+:}{3. {\bfseries{Настройте конфигурацию}} под ваш проект\+:}}\label{md__e_1_2_8_w_o_r_k_2_s_t_m32_2_diod___test_2diode__tester_2_core_2_modbus_2_r_e_a_d_m_e_autotoc_md3-настройте-конфигурацию-под-ваш-проект}
\hypertarget{md__e_1_2_8_w_o_r_k_2_s_t_m32_2_diod___test_2diode__tester_2_core_2_modbus_2_r_e_a_d_m_e_autotoc_md31-настройка-периферии}{}\doxysubsubsection{\texorpdfstring{3.\+1. Настройка периферии}{3.\+1. Настройка периферии}}\label{md__e_1_2_8_w_o_r_k_2_s_t_m32_2_diod___test_2diode__tester_2_core_2_modbus_2_r_e_a_d_m_e_autotoc_md31-настройка-периферии}
\begin{DoxyItemize}
\item {\bfseries{UART}}\+: Настройте в режиме Asynchronous, нужная скорость (9600, 19200, etc), 8N1
\item {\bfseries{TIM}}\+: Настройте таймер для генерации прерываний (например, 1ms tick)
\item {\bfseries{Включите прерывания}} для UART и TIM
\end{DoxyItemize}\hypertarget{md__e_1_2_8_w_o_r_k_2_s_t_m32_2_diod___test_2diode__tester_2_core_2_modbus_2_r_e_a_d_m_e_autotoc_md32-подключение-обработчиков-прерываний}{}\doxysubsubsection{\texorpdfstring{3.\+2. Подключение обработчиков прерываний}{3.\+2. Подключение обработчиков прерываний}}\label{md__e_1_2_8_w_o_r_k_2_s_t_m32_2_diod___test_2diode__tester_2_core_2_modbus_2_r_e_a_d_m_e_autotoc_md32-подключение-обработчиков-прерываний}
Подключите обработчики прерываний {\bfseries{UART}} и {\bfseries{TIM}} в свои IRQ обработчики {\itshape {\bfseries{вместо}}} HAL-\/обработчиков\+:
\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{preprocessor}{\#include\ "{}\mbox{\hyperlink{modbus_8h}{modbus.h}}"{}}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keywordtype}{void}\ USARTx\_IRQHandler(\textcolor{keywordtype}{void})}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ \ \mbox{\hyperlink{group___r_s___t_o_o_l_s_gab27567456df0329130c7fe4fc43c6ee1}{RS\_UART\_Handler}}(\&\mbox{\hyperlink{group___r_s___t_o_o_l_s_gadaef5cb7e494d0fd139199f5b6cbeb86}{hmodbus1}});}
\DoxyCodeLine{\ \ \ \ \textcolor{keywordflow}{return};}
\DoxyCodeLine{\ \ \ \ HAL\_UART\_IRQHandler(\&huart);}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keywordtype}{void}\ TIMx\_IRQHandler(\textcolor{keywordtype}{void})}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ \ \mbox{\hyperlink{group___r_s___t_o_o_l_s_ga2d356b2a0b4af43460bb2cacb81779ce}{RS\_TIM\_Handler}}(\&\mbox{\hyperlink{group___r_s___t_o_o_l_s_gadaef5cb7e494d0fd139199f5b6cbeb86}{hmodbus1}});}
\DoxyCodeLine{\ \ \ \ \textcolor{keywordflow}{return};}
\DoxyCodeLine{\ \ \ \ HAL\_TIM\_IRQHandler(\&htim);}
\DoxyCodeLine{\}}
\end{DoxyCode}
\hypertarget{md__e_1_2_8_w_o_r_k_2_s_t_m32_2_diod___test_2diode__tester_2_core_2_modbus_2_r_e_a_d_m_e_autotoc_md33-в-modbus_configh-укажите-параметры-устройства}{}\doxysubsubsection{\texorpdfstring{3.\+3. В {\ttfamily modbus\+\_\+config.\+h} укажите параметры устройства}{3.\+3. В {\ttfamily modbus\+\_\+config.\+h} укажите параметры устройства}}\label{md__e_1_2_8_w_o_r_k_2_s_t_m32_2_diod___test_2diode__tester_2_core_2_modbus_2_r_e_a_d_m_e_autotoc_md33-в-modbus_configh-укажите-параметры-устройства}
\hypertarget{md__e_1_2_8_w_o_r_k_2_s_t_m32_2_diod___test_2diode__tester_2_core_2_modbus_2_r_e_a_d_m_e_autotoc_md34-инициализация-в-коде}{}\doxysubsubsection{\texorpdfstring{3.\+4. Инициализация в коде}{3.\+4. Инициализация в коде}}\label{md__e_1_2_8_w_o_r_k_2_s_t_m32_2_diod___test_2diode__tester_2_core_2_modbus_2_r_e_a_d_m_e_autotoc_md34-инициализация-в-коде}
Чтобы настроить Slave-\/режим {\ttfamily main()} после инициализации HAL\+:
\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{preprocessor}{\#include\ "{}\mbox{\hyperlink{modbus_8h}{modbus.h}}"{}}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keywordtype}{int}\ main(\textcolor{keywordtype}{void})}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ \ \textcolor{comment}{//\ Инициализация\ HAL}}
\DoxyCodeLine{\ \ \ \ HAL\_Init();}
\DoxyCodeLine{\ \ \ \ SystemClock\_Config();}
\DoxyCodeLine{\ \ \ \ MX\_GPIO\_Init();}
\DoxyCodeLine{\ \ \ \ MX\_USART1\_UART\_Init();}
\DoxyCodeLine{\ \ \ \ MX\_TIM3\_Init();}
\DoxyCodeLine{\ \ \ \ }
\DoxyCodeLine{\ \ \ \ \textcolor{comment}{//\ Инициализация\ Modbus}}
\DoxyCodeLine{\ \ \ \ \mbox{\hyperlink{group___m_o_d_b_u_s___f_u_n_c_t_i_o_n_s_ga9e787c3454aab3293dec6e6795f687f5}{MODBUS\_FirstInit}}(\&\mbox{\hyperlink{group___r_s___t_o_o_l_s_gadaef5cb7e494d0fd139199f5b6cbeb86}{hmodbus1}},\ \&\mbox{\hyperlink{group___m_o_d_b_u_s___c_o_n_f_i_g_s_ga370986118b8227cb6cb33c6b748fbbcb}{mb\_huart}},\ \&\mbox{\hyperlink{group___m_o_d_b_u_s___c_o_n_f_i_g_s_ga6723a1608946a4f86cd7c9c7e614d04e}{mb\_htim}});}
\DoxyCodeLine{\ \ \ \ \mbox{\hyperlink{group___m_o_d_b_u_s___f_u_n_c_t_i_o_n_s_ga460466907693a256487d31f09b16edfe}{MODBUS\_Config}}(\&\mbox{\hyperlink{group___r_s___t_o_o_l_s_gadaef5cb7e494d0fd139199f5b6cbeb86}{hmodbus1}},\ \mbox{\hyperlink{group___m_o_d_b_u_s___c_o_n_f_i_g_s_gab9b18e108b98b225a52c5ccca58e7f2b}{MODBUS\_DEVICE\_ID}},\ \mbox{\hyperlink{group___m_o_d_b_u_s___c_o_n_f_i_g_s_ga66f7c59a25c8cca6d5b0991895c26b69}{MODBUS\_TIMEOUT}},\ MODBUS\_MODE\_SLAVE);}
\DoxyCodeLine{\ \ \ \ }
\DoxyCodeLine{\ \ \ \ \textcolor{comment}{//\ Запуск\ приема\ Modbus}}
\DoxyCodeLine{\ \ \ \ \mbox{\hyperlink{group___m_o_d_b_u_s___f_u_n_c_t_i_o_n_s_ga9a17402983188566254b7096342ba69e}{MODBUS\_SlaveStart}}(\&\mbox{\hyperlink{group___r_s___t_o_o_l_s_gadaef5cb7e494d0fd139199f5b6cbeb86}{hmodbus1}},\ NULL);}
\DoxyCodeLine{\ \ \ \ }
\DoxyCodeLine{\ \ \ \ \textcolor{keywordflow}{while}\ (1)}
\DoxyCodeLine{\ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{comment}{//\ Основной\ цикл}}
\DoxyCodeLine{\ \ \ \ \}}
\DoxyCodeLine{\}}
\end{DoxyCode}
Чтобы настроить Master-\/режим {\ttfamily main()} после инициализации HAL\+:
\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{preprocessor}{\#include\ "{}\mbox{\hyperlink{modbus_8h}{modbus.h}}"{}}}
\DoxyCodeLine{\textcolor{comment}{//\ Запрос\ на\ 1\ ID,\ считать\ холдинг\ регистры\ с\ 0\ адреса\ 10\ штук}}
\DoxyCodeLine{\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\_MsgTypeDef}}\ read\_hold\_cmd\ =\ \mbox{\hyperlink{group___m_o_d_b_u_s___r_e_q_u_e_s_t___m_s_g_ga4a4798a15608f3aac04150115a628f8e}{MB\_REQUEST\_READ\_HOLDING\_REGS}}(1,\ 0,\ 10);}
\DoxyCodeLine{\textcolor{comment}{//\ коллбек,\ вызовется\ при\ получении\ ответа\ от\ слейва}}
\DoxyCodeLine{read\_hold[10];}
\DoxyCodeLine{\textcolor{keywordtype}{void}\ callback\_func(\mbox{\hyperlink{struct_r_s___handle_type_def}{RS\_HandleTypeDef}}\ *hmodbus,\ \mbox{\hyperlink{struct_r_s___msg_type_def}{RS\_MsgTypeDef}}\ *modbus\_msg)\ }
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ \ \textcolor{comment}{//\ MB\_RespGet\_...\ Чтобы\ достать\ нужные\ данные\ из\ ответа}}
\DoxyCodeLine{\ \ \ \ \textcolor{keywordflow}{if}(hmodbus-\/>\mbox{\hyperlink{struct_r_s___handle_type_def_a8bbcb263ae7a61790b559bcb55cd9aa9}{RS\_STATUS}}\ ==\ RS\_OK)}
\DoxyCodeLine{\ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}(\textcolor{keywordtype}{int}\ addr\ =\ \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}}.Addr;\ addr\ <\ \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}}.Addr\ +\ \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}}.Qnt;\ addr++)}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ uint16\_t\ value;}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}(\mbox{\hyperlink{group___m_o_d_b_u_s___r_e_g_s___a_p_i_ga1f80317087624a23f84224c6f2c1d596}{MB\_RespGet\_RegisterValue}}(\&\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}},\ addr,\ \&value))}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ read\_hold[i]\ =\ value;}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\ \ \ \ \}}
\DoxyCodeLine{\}}
\DoxyCodeLine{\textcolor{keywordtype}{int}\ main(\textcolor{keywordtype}{void})}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ \ \textcolor{comment}{//\ Инициализация\ HAL}}
\DoxyCodeLine{\ \ \ \ HAL\_Init();}
\DoxyCodeLine{\ \ \ \ SystemClock\_Config();}
\DoxyCodeLine{\ \ \ \ MX\_GPIO\_Init();}
\DoxyCodeLine{\ \ \ \ MX\_USART1\_UART\_Init();}
\DoxyCodeLine{\ \ \ \ MX\_TIM3\_Init();}
\DoxyCodeLine{\ \ \ \ }
\DoxyCodeLine{\ \ \ \ \textcolor{comment}{//\ Инициализация\ Modbus}}
\DoxyCodeLine{\ \ \ \ \mbox{\hyperlink{group___m_o_d_b_u_s___f_u_n_c_t_i_o_n_s_ga9e787c3454aab3293dec6e6795f687f5}{MODBUS\_FirstInit}}(\&\mbox{\hyperlink{group___r_s___t_o_o_l_s_gadaef5cb7e494d0fd139199f5b6cbeb86}{hmodbus1}},\ \&\mbox{\hyperlink{group___m_o_d_b_u_s___c_o_n_f_i_g_s_ga370986118b8227cb6cb33c6b748fbbcb}{mb\_huart}},\ \&\mbox{\hyperlink{group___m_o_d_b_u_s___c_o_n_f_i_g_s_ga6723a1608946a4f86cd7c9c7e614d04e}{mb\_htim}});}
\DoxyCodeLine{\ \ \ \ \mbox{\hyperlink{group___m_o_d_b_u_s___f_u_n_c_t_i_o_n_s_ga460466907693a256487d31f09b16edfe}{MODBUS\_Config}}(\&\mbox{\hyperlink{group___r_s___t_o_o_l_s_gadaef5cb7e494d0fd139199f5b6cbeb86}{hmodbus1}},\ 0,\ \mbox{\hyperlink{group___m_o_d_b_u_s___c_o_n_f_i_g_s_ga66f7c59a25c8cca6d5b0991895c26b69}{MODBUS\_TIMEOUT}},\ MODBUS\_MODE\_MASTER);}
\DoxyCodeLine{\ \ \ \ }
\DoxyCodeLine{\ \ \ \ \textcolor{comment}{//\ Запрос\ по\ Modbus}}
\DoxyCodeLine{\ \ \ \ \mbox{\hyperlink{group___m_o_d_b_u_s___f_u_n_c_t_i_o_n_s_ga19090cabfba2345391e37398125a2f55}{MODBUS\_MasterRequest}}(\&\mbox{\hyperlink{group___r_s___t_o_o_l_s_gadaef5cb7e494d0fd139199f5b6cbeb86}{hmodbus1}},\ \&read\_hold\_cmd,\ \&callback\_func);}
\DoxyCodeLine{}
\DoxyCodeLine{\}}
\end{DoxyCode}
\hypertarget{md__e_1_2_8_w_o_r_k_2_s_t_m32_2_diod___test_2diode__tester_2_core_2_modbus_2_r_e_a_d_m_e_autotoc_md35-настройка-карты-данных}{}\doxysubsubsection{\texorpdfstring{3.\+5. Настройка карты данных}{3.\+5. Настройка карты данных}}\label{md__e_1_2_8_w_o_r_k_2_s_t_m32_2_diod___test_2diode__tester_2_core_2_modbus_2_r_e_a_d_m_e_autotoc_md35-настройка-карты-данных}
В {\ttfamily \doxylink{modbus__data_8h}{modbus\+\_\+data.\+h}} настройте регистры и coils под ваше устройство\+:
{\bfseries{Input Registers (только чтение)}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{keyword}{typedef}\ \textcolor{keyword}{struct}}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ \ uint16\_t\ Temperature;\ \ \ \ \ \ \textcolor{comment}{//\ Адрес\ 0}}
\DoxyCodeLine{\ \ \ \ uint16\_t\ Humidity;\ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ Адрес\ 1\ \ }}
\DoxyCodeLine{\ \ \ \ uint16\_t\ Pressure;\ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ Адрес\ 2}}
\DoxyCodeLine{\ \ \ \ uint16\_t\ Voltage;\ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ Адрес\ 3}}
\DoxyCodeLine{\}\ \mbox{\hyperlink{struct_m_b___data_in_regs_type_def}{MB\_DataInRegsTypeDef}};}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{preprocessor}{\#define\ R\_INPUT\_ADDR\ \ \ \ \ \ \ \ 0\ \ }\textcolor{comment}{//\ Начальный\ адрес\ Input\ регистров}}
\DoxyCodeLine{\textcolor{preprocessor}{\#define\ R\_INPUT\_QNT\ \ \ \ \ \ \ \ \ 4\ \ }\textcolor{comment}{//\ Количество\ Input\ регистров}}
\end{DoxyCode}
{\bfseries{Holding Registers (чтение/запись)}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{keyword}{typedef}\ \textcolor{keyword}{struct}}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ \ uint16\_t\ SetpointTemp;\ \ \ \ \ \textcolor{comment}{//\ Адрес\ 0}}
\DoxyCodeLine{\ \ \ \ uint16\_t\ SetpointHumidity;\ \textcolor{comment}{//\ Адрес\ 1}}
\DoxyCodeLine{\ \ \ \ uint16\_t\ ControlMode;\ \ \ \ \ \ \textcolor{comment}{//\ Адрес\ 2}}
\DoxyCodeLine{\}\ \mbox{\hyperlink{struct_m_b___data_hold_regs_type_def}{MB\_DataHoldRegsTypeDef}};}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{preprocessor}{\#define\ R\_HOLDING\_ADDR\ \ \ \ \ \ 0\ \ }\textcolor{comment}{//\ Начальный\ адрес\ Holding\ регистров\ \ }}
\DoxyCodeLine{\textcolor{preprocessor}{\#define\ R\_HOLDING\_QNT\ \ \ \ \ \ \ 3\ \ }\textcolor{comment}{//\ Количество\ Holding\ регистров}}
\end{DoxyCode}
{\bfseries{Coils (1-\/битные)}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{keyword}{typedef}\ \textcolor{keyword}{struct}}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ \ \textcolor{keywordtype}{unsigned}\ Relay1\ \ \ \ :\ 1;\ \ \ \ \textcolor{comment}{//\ Адрес\ 0}}
\DoxyCodeLine{\ \ \ \ \textcolor{keywordtype}{unsigned}\ Relay2\ \ \ \ :\ 1;\ \ \ \ \textcolor{comment}{//\ Адрес\ 1\ \ }}
\DoxyCodeLine{\ \ \ \ \textcolor{keywordtype}{unsigned}\ Pump\ \ \ \ \ \ :\ 1;\ \ \ \ \textcolor{comment}{//\ Адрес\ 2}}
\DoxyCodeLine{\ \ \ \ \textcolor{keywordtype}{unsigned}\ Heater\ \ \ \ :\ 1;\ \ \ \ \textcolor{comment}{//\ Адрес\ 3}}
\DoxyCodeLine{\ \ \ \ \textcolor{keywordtype}{unsigned}\ reserved\ \ :\ 12;\ \ \ \textcolor{comment}{//\ Резерв\ (выравнивание\ до\ 16\ бит)}}
\DoxyCodeLine{\}\ \mbox{\hyperlink{struct_m_b___data_coils_type_def}{MB\_DataCoilsTypeDef}};}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{preprocessor}{\#define\ C\_COILS\_ADDR\ \ \ \ \ \ \ \ 0\ \ }\textcolor{comment}{//\ Начальный\ адрес\ Coils}}
\DoxyCodeLine{\textcolor{preprocessor}{\#define\ C\_COILS\_QNT\ \ \ \ \ \ \ \ \ 4\ \ }\textcolor{comment}{//\ Количество\ Coils}}
\end{DoxyCode}
\hypertarget{md__e_1_2_8_w_o_r_k_2_s_t_m32_2_diod___test_2diode__tester_2_core_2_modbus_2_r_e_a_d_m_e_autotoc_md36-доступ-к-данным-в-коде}{}\doxysubsubsection{\texorpdfstring{3.\+6. Доступ к данным в коде}{3.\+6. Доступ к данным в коде}}\label{md__e_1_2_8_w_o_r_k_2_s_t_m32_2_diod___test_2diode__tester_2_core_2_modbus_2_r_e_a_d_m_e_autotoc_md36-доступ-к-данным-в-коде}
В режиме слейва есть дефайны для удобного выставления Коилов. На случай если они не упакованы в битовые поля
\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{comment}{//\ Чтение\ входных\ регистров}}
\DoxyCodeLine{uint16\_t\ temp\ =\ MB\_DATA.InRegs.Temperature;}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{comment}{//\ Запись\ в\ регистры\ хранения}}
\DoxyCodeLine{MB\_DATA.HoldRegs.SetpointTemp\ =\ 2500;}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{comment}{//\ Управление\ coils}}
\DoxyCodeLine{\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_ga635a6c4fbce49bd1e6797642b36dae7e}{MB\_Coil\_Set\_Local}}(\&MB\_DATA.Coils,\ 0);\ \ \textcolor{comment}{//\ Включить\ Relay1}}
\DoxyCodeLine{\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_gabc4efb5e2a6aaa021ef5fe6c69476927}{MB\_Coil\_Reset\_Local}}(\&MB\_DATA.Coils,\ 1);\ \textcolor{comment}{//\ Выключить\ Relay2}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{comment}{//\ Чтение\ coil}}
\DoxyCodeLine{\textcolor{keywordflow}{if}\ (\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_ga0f8474120df77dc5f334d60d6a5f6f8f}{MB\_Coil\_Read\_Local}}(\&MB\_DATA.Coils,\ 2))\ \{}
\DoxyCodeLine{\ \ \ \ \textcolor{comment}{//\ Pump\ включен}}
\DoxyCodeLine{\}}
\end{DoxyCode}
В режиме мастера есть функции для получения информации из ответа {\ttfamily MB\+\_\+\+Resp\+Get\+\_\+...()}
\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{comment}{//\ \ Чтение\ регистров:\ Получить\ запрошенные\ регистры}}
\DoxyCodeLine{uint16\_t\ value;}
\DoxyCodeLine{\textcolor{keywordflow}{if}(\mbox{\hyperlink{group___m_o_d_b_u_s___r_e_g_s___a_p_i_ga1f80317087624a23f84224c6f2c1d596}{MB\_RespGet\_RegisterValue}}(\&\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}},\ 105,\ \&reg\_value))}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ \ printf(\textcolor{stringliteral}{"{}Register\ 105\ value:\ \%d\(\backslash\)n"{}},\ reg\_value);}
\DoxyCodeLine{\}}
\DoxyCodeLine{\textcolor{comment}{//\ \ Чтение\ коилов:\ Получить\ запрошенные\ коилы}}
\DoxyCodeLine{\textcolor{keywordtype}{int}\ state;}
\DoxyCodeLine{\textcolor{keywordflow}{if}(\mbox{\hyperlink{group___m_o_d_b_u_s___r_e_q___c_o_i_l_s___a_p_i_ga643a0be1ccd587a6dfe544d9fd5ed018}{MB\_RespGet\_CoilState}}(\&\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}},\ 25,\ \&coil\_state))}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ \ printf(\textcolor{stringliteral}{"{}Coil\ 25\ state:\ \%s\(\backslash\)n"{}},\ coil\_state\ ?\ \textcolor{stringliteral}{"{}ON"{}}\ :\ \textcolor{stringliteral}{"{}OFF"{}});}
\DoxyCodeLine{\}}
\DoxyCodeLine{\textcolor{comment}{//\ \ Чтение\ диагностики:\ Получить\ запрошенныую\ диагностику}}
\DoxyCodeLine{uint16\_t\ counter\_value;}
\DoxyCodeLine{\textcolor{keywordflow}{if}(MB\_RespGet\_DiagnosticResponse(\&\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}},\ \&counter\_value))}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ \ printf(\textcolor{stringliteral}{"{}Counter\ value:\ \%d\(\backslash\)n"{}},\ counter\_value);}
\DoxyCodeLine{\}}
\DoxyCodeLine{\textcolor{comment}{//\ \ Чтение\ идентификаторов:\ Получить\ запрошенные\ идентификаторы}}
\DoxyCodeLine{uint8\_t\ length;}
\DoxyCodeLine{\textcolor{keywordtype}{char}\ vendor\_name[64];}
\DoxyCodeLine{\textcolor{keywordflow}{if}(\mbox{\hyperlink{group___m_o_d_b_u_s___r_e_q___d_e_f_i_d___a_p_i_ga0dc4119c008af34d5997eab339c437be}{MB\_RespGet\_ObjectById}}(\&\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}},\ 0x00,\ vendor\_name,\ \&length))}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ \ printf(\textcolor{stringliteral}{"{}Vendor\ Name:\ \%s\ (length:\ \%d)\(\backslash\)n"{}},\ vendor\_name,\ length);}
\DoxyCodeLine{\}\ \ \ }
\DoxyCodeLine{}
\DoxyCodeLine{uint8\_t\ obj\_id,\ obj\_length;}
\DoxyCodeLine{\textcolor{keywordtype}{char}\ obj\_data[64];}
\DoxyCodeLine{\textcolor{keywordflow}{if}(\mbox{\hyperlink{group___m_o_d_b_u_s___r_e_q___d_e_f_i_d___a_p_i_ga3fc5fc5abfe4f8767ccee5c11ea3d5d5}{MB\_RespGet\_ObjectByIndex}}(\&\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}},\ 0x00,\ \&obj\_id,\ obj\_data,\ \&obj\_length))}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ \ printf(\textcolor{stringliteral}{"{}First\ object\ -\/\ ID:\ 0x\%02X,\ Data:\ \%s\(\backslash\)n"{}},\ obj\_id,\ obj\_data);}
\DoxyCodeLine{\}\ \ \ }
\end{DoxyCode}
\hypertarget{md__e_1_2_8_w_o_r_k_2_s_t_m32_2_diod___test_2diode__tester_2_core_2_modbus_2_r_e_a_d_m_e_autotoc_md5-обновление-библиотеки}{}\doxysubsection{\texorpdfstring{5. {\bfseries{Обновление библиотеки}}\+:}{5. {\bfseries{Обновление библиотеки}}\+:}}\label{md__e_1_2_8_w_o_r_k_2_s_t_m32_2_diod___test_2diode__tester_2_core_2_modbus_2_r_e_a_d_m_e_autotoc_md5-обновление-библиотеки}
После обновления субмодуля из Git, исходные файлы библиотеки будут обновлены, и ваши конфиги вне субмодуля не перезапишутся\+:
\begin{DoxyCode}{0}
\DoxyCodeLine{git\ submodule\ update\ -\/-\/remote}
\end{DoxyCode}

View File

@@ -0,0 +1,108 @@
\doxysection{E\+:/.WORK/\+STM32/\+Diod\+\_\+\+Test/diode\+\_\+tester/\+Core/\+Modbus/\+Src/modbus.c File Reference}
\hypertarget{modbus_8c}{}\label{modbus_8c}\index{E:/.WORK/STM32/Diod\_Test/diode\_tester/Core/Modbus/Src/modbus.c@{E:/.WORK/STM32/Diod\_Test/diode\_tester/Core/Modbus/Src/modbus.c}}
Модуль для реализации MODBUS.
{\ttfamily \#include "{}modbus.\+h"{}}\newline
Include dependency graph for modbus.\+c\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{modbus_8c__incl}
\end{center}
\end{figure}
\doxysubsubsection*{Functions}
\begin{DoxyCompactItemize}
\item
static void \mbox{\hyperlink{modbus_8c_ae7c4bdaeae2e9deb8422ae0a0fc64cb4}{MB\+\_\+\+Default\+Callback}} (\mbox{\hyperlink{struct_r_s___handle_type_def}{RS\+\_\+\+Handle\+Type\+Def}} \texorpdfstring{$\ast$}{*}hmodbus, \mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \texorpdfstring{$\ast$}{*}modbus\+\_\+msg)
\begin{DoxyCompactList}\small\item\em Coils \& Registers. \end{DoxyCompactList}\item
HAL\+\_\+\+Status\+Type\+Def \mbox{\hyperlink{group___m_o_d_b_u_s___f_u_n_c_t_i_o_n_s_ga9e787c3454aab3293dec6e6795f687f5}{MODBUS\+\_\+\+First\+Init}} (\mbox{\hyperlink{struct_r_s___handle_type_def}{RS\+\_\+\+Handle\+Type\+Def}} \texorpdfstring{$\ast$}{*}hmodbus, UART\+\_\+\+Handle\+Type\+Def \texorpdfstring{$\ast$}{*}huart, TIM\+\_\+\+Handle\+Type\+Def \texorpdfstring{$\ast$}{*}htim)
\begin{DoxyCompactList}\small\item\em Инициализация периферии модбас. \end{DoxyCompactList}\item
HAL\+\_\+\+Status\+Type\+Def \mbox{\hyperlink{group___m_o_d_b_u_s___f_u_n_c_t_i_o_n_s_ga460466907693a256487d31f09b16edfe}{MODBUS\+\_\+\+Config}} (\mbox{\hyperlink{struct_r_s___handle_type_def}{RS\+\_\+\+Handle\+Type\+Def}} \texorpdfstring{$\ast$}{*}hmodbus, uint8\+\_\+t ID, uint16\+\_\+t Timeout, uint8\+\_\+t master)
\begin{DoxyCompactList}\small\item\em Программная конфигурация модбас. \end{DoxyCompactList}\item
HAL\+\_\+\+Status\+Type\+Def \mbox{\hyperlink{group___m_o_d_b_u_s___f_u_n_c_t_i_o_n_s_ga9a17402983188566254b7096342ba69e}{MODBUS\+\_\+\+Slave\+Start}} (\mbox{\hyperlink{struct_r_s___handle_type_def}{RS\+\_\+\+Handle\+Type\+Def}} \texorpdfstring{$\ast$}{*}hmodbus, \mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \texorpdfstring{$\ast$}{*}modbus\+\_\+msg)
\begin{DoxyCompactList}\small\item\em Запуск слейв модбас. \end{DoxyCompactList}\item
HAL\+\_\+\+Status\+Type\+Def \mbox{\hyperlink{group___m_o_d_b_u_s___f_u_n_c_t_i_o_n_s_ga19090cabfba2345391e37398125a2f55}{MODBUS\+\_\+\+Master\+Request}} (\mbox{\hyperlink{struct_r_s___handle_type_def}{RS\+\_\+\+Handle\+Type\+Def}} \texorpdfstring{$\ast$}{*}hmodbus, \mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \texorpdfstring{$\ast$}{*}modbus\+\_\+msg, void(\texorpdfstring{$\ast$}{*}p\+Clbk)(\mbox{\hyperlink{struct_r_s___handle_type_def}{RS\+\_\+\+Handle\+Type\+Def}} \texorpdfstring{$\ast$}{*}, \mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \texorpdfstring{$\ast$}{*}))
\begin{DoxyCompactList}\small\item\em Реквест мастера модбас. \end{DoxyCompactList}\item
\mbox{\hyperlink{group___r_s___t_o_o_l_s_ga727154b368397b4796aa892de12a2289}{RS\+\_\+\+Status\+Type\+Def}} \mbox{\hyperlink{group___r_s___t_o_o_l_s_ga8b7bcc84cb8192a58fe87b662fbd9690}{RS\+\_\+\+Response}} (\mbox{\hyperlink{struct_r_s___handle_type_def}{RS\+\_\+\+Handle\+Type\+Def}} \texorpdfstring{$\ast$}{*}hmodbus, \mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \texorpdfstring{$\ast$}{*}modbus\+\_\+msg)
\item
\mbox{\hyperlink{group___r_s___t_o_o_l_s_ga727154b368397b4796aa892de12a2289}{RS\+\_\+\+Status\+Type\+Def}} \mbox{\hyperlink{group___r_s___t_o_o_l_s_ga1cd98c55f6f359e3ab93d0f9cf912ab5}{RS\+\_\+\+Collect\+\_\+\+Message}} (\mbox{\hyperlink{struct_r_s___handle_type_def}{RS\+\_\+\+Handle\+Type\+Def}} \texorpdfstring{$\ast$}{*}hmodbus, \mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \texorpdfstring{$\ast$}{*}modbus\+\_\+msg, uint8\+\_\+t \texorpdfstring{$\ast$}{*}modbus\+\_\+uart\+\_\+buff)
\item
\mbox{\hyperlink{group___r_s___t_o_o_l_s_ga727154b368397b4796aa892de12a2289}{RS\+\_\+\+Status\+Type\+Def}} \mbox{\hyperlink{group___r_s___t_o_o_l_s_ga3500b3fa91d05a94cf8da5cc5ce338f5}{RS\+\_\+\+Parse\+\_\+\+Message}} (\mbox{\hyperlink{struct_r_s___handle_type_def}{RS\+\_\+\+Handle\+Type\+Def}} \texorpdfstring{$\ast$}{*}hmodbus, \mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \texorpdfstring{$\ast$}{*}modbus\+\_\+msg, uint8\+\_\+t \texorpdfstring{$\ast$}{*}modbus\+\_\+uart\+\_\+buff)
\end{DoxyCompactItemize}
\doxysubsubsection*{Variables}
\begin{DoxyCompactItemize}
\item
\mbox{\hyperlink{struct_r_s___handle_type_def}{RS\+\_\+\+Handle\+Type\+Def}} \mbox{\hyperlink{group___r_s___t_o_o_l_s_gadaef5cb7e494d0fd139199f5b6cbeb86}{hmodbus1}}
\begin{DoxyCompactList}\small\item\em Default Handle for Modbus. \end{DoxyCompactList}\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}\item
\mbox{\hyperlink{struct_m_b___data_structure_type_def}{MB\+\_\+\+Data\+Structure\+Type\+Def}} \mbox{\hyperlink{modbus_8c_a4eb1dbed7cecbafeb1980809fbda7de7}{MB\+\_\+\+DATA}} = \{0\}
\end{DoxyCompactItemize}
\doxysubsection{Detailed Description}
Модуль для реализации MODBUS.
Файл содержит реализацию функций работы с Modbus.\hypertarget{modbus_8c_mbapi}{}\doxysubsection{\texorpdfstring{Функции и макросы}{Функции и макросы}}\label{modbus_8c_mbapi}
\hypertarget{modbus_8c_инициализация}{}\doxysubsubsubsection{\texorpdfstring{Инициализация\+:}{Инициализация\+:}}\label{modbus_8c_инициализация}
\begin{DoxyItemize}
\item \doxylink{group___m_o_d_b_u_s___f_u_n_c_t_i_o_n_s_ga9e787c3454aab3293dec6e6795f687f5}{MODBUS\+\_\+\+First\+Init()} — Инициализация Modbus (подключение UART, TIM)
\item \doxylink{group___m_o_d_b_u_s___f_u_n_c_t_i_o_n_s_ga460466907693a256487d31f09b16edfe}{MODBUS\+\_\+\+Config()} — Конфигурацмя Modbus (ID, Timeout).
\item \doxylink{group___m_o_d_b_u_s___f_u_n_c_t_i_o_n_s_ga9a17402983188566254b7096342ba69e}{MODBUS\+\_\+\+Slave\+Start()} — Запуск Modbus как Slave.
\item \doxylink{group___m_o_d_b_u_s___f_u_n_c_t_i_o_n_s_ga19090cabfba2345391e37398125a2f55}{MODBUS\+\_\+\+Master\+Request()} — Отправить запрос в MODBUS как Master.
\end{DoxyItemize}\hypertarget{modbus_8c_функции-для-работы-с-rs-uart}{}\doxysubsubsubsection{\texorpdfstring{Функции для работы с RS (UART)\+:}{Функции для работы с RS (UART)\+:}}\label{modbus_8c_функции-для-работы-с-rs-uart}
\begin{DoxyItemize}
\item RS\+\_\+\+Parse\+\_\+\+Message() / RS\+\_\+\+Collect\+\_\+\+Message() — Парсинг и сборка сообщения.
\item RS\+\_\+\+Response() — Отправка ответа.
\end{DoxyItemize}
Definition in file \mbox{\hyperlink{modbus_8c_source}{modbus.\+c}}.
\label{doc-func-members}
\Hypertarget{modbus_8c_doc-func-members}
\doxysubsection{Function Documentation}
\Hypertarget{modbus_8c_ae7c4bdaeae2e9deb8422ae0a0fc64cb4}\index{modbus.c@{modbus.c}!MB\_DefaultCallback@{MB\_DefaultCallback}}
\index{MB\_DefaultCallback@{MB\_DefaultCallback}!modbus.c@{modbus.c}}
\doxysubsubsection{\texorpdfstring{MB\_DefaultCallback()}{MB\_DefaultCallback()}}
{\footnotesize\ttfamily \label{modbus_8c_ae7c4bdaeae2e9deb8422ae0a0fc64cb4}
void MB\+\_\+\+Default\+Callback (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{struct_r_s___handle_type_def}{RS\+\_\+\+Handle\+Type\+Def}} \texorpdfstring{$\ast$}{*}}]{hmodbus}{, }\item[{\mbox{\hyperlink{struct_r_s___msg_type_def}{RS\+\_\+\+Msg\+Type\+Def}} \texorpdfstring{$\ast$}{*}}]{modbus\+\_\+msg}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}
Coils \& Registers.
Дефолтный коллбек для мастера.
\begin{DoxyParams}{Parameters}
{\em hmodbus} & Указатель на хендлер RS \\
\hline
{\em modbus\+\_\+msg} & Указатель на структуру сообщения\\
\hline
\end{DoxyParams}
В этот коллбек попадут все запросы, с NULL-\/коллбеком
Definition at line \mbox{\hyperlink{modbus_8c_source_l00176}{176}} of file \mbox{\hyperlink{modbus_8c_source}{modbus.\+c}}.
\label{doc-var-members}
\Hypertarget{modbus_8c_doc-var-members}
\doxysubsection{Variable Documentation}
\Hypertarget{modbus_8c_a4eb1dbed7cecbafeb1980809fbda7de7}\index{modbus.c@{modbus.c}!MB\_DATA@{MB\_DATA}}
\index{MB\_DATA@{MB\_DATA}!modbus.c@{modbus.c}}
\doxysubsubsection{\texorpdfstring{MB\_DATA}{MB\_DATA}}
{\footnotesize\ttfamily \label{modbus_8c_a4eb1dbed7cecbafeb1980809fbda7de7}
\mbox{\hyperlink{struct_m_b___data_structure_type_def}{MB\+\_\+\+Data\+Structure\+Type\+Def}} MB\+\_\+\+DATA = \{0\}}
Definition at line \mbox{\hyperlink{modbus_8c_source_l00028}{28}} of file \mbox{\hyperlink{modbus_8c_source}{modbus.\+c}}.

Some files were not shown because too many files have changed in this diff Show More