{"id":356535,"date":"2024-05-20T23:31:42","date_gmt":"2024-05-20T23:31:42","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=356535"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2024-05-20T23:31:42","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=356535","title":{"rendered":"<span>\u0421\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0440\u0430\u0437\u0431\u043e\u0440 CSV \u0441\u0442\u0440\u043e\u0447\u0435\u043a<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>#GNSS #CSV #NMEA #URL #IP #MAC<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c90\/828\/596\/c908285962af4f4bdf22df645b27b089.png\" width=\"1039\" height=\"456\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c90\/828\/596\/c908285962af4f4bdf22df645b27b089.png\"\/><\/figure>\n<p>\u0412 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u0432 \u0447\u0430\u0441\u0442\u043e \u043d\u0430\u0434\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u044c \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0440\u0430\u0437\u0431\u043e\u0440 (\u043f\u0430\u0440\u0441\u0438\u043d\u0433) CSV \u0441\u0442\u0440\u043e\u0447\u0435\u043a. CSV \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u044b \u0437\u0430\u043f\u044f\u0442\u043e\u0439 (\u0438\u043b\u0438 \u043b\u044e\u0431\u044b\u043c \u0434\u0440\u0443\u0433\u0438\u043c \u043e\u0434\u0438\u043d\u043e\u0447\u043d\u044b\u043c \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u043c: ; | \/). <\/p>\n<p>1&#8212;CSV \u0441\u0442\u0440\u043e\u0447\u043a\u0438 \u043c\u043e\u0436\u043d\u043e, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u043e\u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0442\u044c \u0432 NMEA \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0435 \u043e\u0442 \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 GNSS \u043f\u0440\u0438\u0435\u043c\u043d\u0438\u043a\u043e\u0432. \u0412\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 NMEA \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430 <\/p>\n<pre><code class=\"bash\">$GNGGA,102030.000,5546.95900,N,03740.69200,E,1,08,2.0,142.0,M,0.0,M,,* $GNGLL,5546.95900,N,03740.69200,E,102030.000,A,A* $GNGSA,A,3,10,16,18,20,26,27,,,,,,,4.8,2.0,4.3,1* $GNGSA,A,3,19,  ,  ,  ,  ,  ,,,,,,,4.8,2.0,4.3,4* $GNGSA,A,3,82,  ,  ,  ,  ,  ,,,,,,,4.8,2.0,4.3,2* $GPGSV,3,1,12,07,08,343,,08,07,304,,10,28,195,42,13,20,054,,0* $GPGSV,3,2,12,15,27,087,,16,47,262,39,18,66,082,23,20,58,174,23,0* $GPGSV,3,3,12,21,75,089,23,26,33,222,31,27,38,298,40,29,15,127,,0* $BDGSV,1,1,01,19,29,174,28,0* $GLGSV,3,1,09,74,08,001,34,66,55,096,,82,69,318,21,73,25,326,,0* $GLGSV,3,2,09,80,20,258,,65,18,025,,83,21,292,,81,51,092,,0* $GLGSV,3,3,09,67,26,161,,0* $GNRMC,102030.000,A,5546.95900,N,03740.69200,E,0.12,49.75,200220,,,A,V* $GNVTG,49.75,T,,M,0.12,N,0.22,K,A* $GNZDA,102030.000,20,02,2020,00,00* $GPTXT,01,01,01,ANTENNA OK* $GNDHV,102030.000,0.03,0.000,0.000,0.000,0.00,,,,,M* $GNGST,102030.000,6.9,,,,5.6,9.2,10.1* $GPTXT,01,01,02,MS=7,7,061A8200,33,0,00000000,20,2,00028000*<\/code><\/pre>\n<p>\u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u043e\u0436\u043d\u043e \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e CSV \u044d\u0442\u043e \u043a\u043e\u0441\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b \u0434\u043b\u044f \u043f\u0440\u0438\u0435\u043c\u0430 \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u0432 \u0441\u043e \u0441\u043f\u0443\u0442\u043d\u0438\u043a\u043e\u0432!<\/p>\n<p>2&#8212; \u041f\u043e\u0442\u043e\u043c, \u043b\u044e\u0431\u043e\u0439 URL (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u044d\u0442\u043e\u0442 <a href=\"https:\/\/habr.com\/ru\/articles\/765066\/\" rel=\"noopener noreferrer nofollow\">https:\/\/habr.com\/ru\/articles\/765066\/<\/a>) \u044d\u0442\u043e, \u0432 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438, \u0442\u0430 \u0436\u0435 \u0441\u0430\u043c\u0430\u044f \u043f\u0440\u0435\u0441\u043b\u043e\u0432\u0443\u0442\u0430\u044f CSV \u0441\u0442\u0440\u043e\u0447\u043a\u0430, \u0433\u0434\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044c \u044d\u0442\u043e \/.<\/p>\n<p>3&#8212; \u0422\u0430\u043a\u0436\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 CSV \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0412\u0430\u043c \u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u0447\u043a\u043e\u0439 \u0432 UART-CLI \u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0438 \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0432\u0430\u0442\u044c \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043d\u0430 \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u0440\u0430\u0437\u0443 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e shell \u043a\u043e\u043c\u0430\u043d\u0434. <\/p>\n<p>4&#8212;\u041f\u0440\u043e\u0448\u0438\u0432\u043a\u0430 \u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u0442\u043e \u043b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430 SD \u043a\u0430\u0440\u0442\u0443 \u043f\u043e SPI \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 CSV \u0444\u043e\u0440\u043c\u0430\u0442\u0435 \u043a\u0430\u043a \u0432 \u0444\u0430\u0439\u043b \u043d\u0430 FatFS. \u041f\u043e\u0442\u043e\u043c \u044d\u0442\u043e\u0442 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0439 *.csv \u0444\u0430\u0439\u043b\u0438\u043a \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043a\u0440\u044b\u0442\u044c \u043d\u0430 LapTop(\u0435) \u043b\u044e\u0431\u044b\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u043e\u043c \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u044b\u0445 \u0442\u0430\u0431\u043b\u0438\u0446.<\/p>\n<p>5&#8212;IP \u0430\u0434\u0440\u0435\u0441, MAC \u0430\u0434\u0440\u0435\u0441 &#8212; \u044d\u0442\u043e \u0442\u043e\u0436\u0435 CSV \u0441\u0442\u0440\u043e\u0447\u043a\u0438. \u0422\u043e\u043b\u044c\u043a\u043e \u0441 \u0441\u043e \u0441\u0432\u043e\u0438\u043c\u0438 \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044f\u043c\u0438: \u0442\u043e\u0447\u043a\u0430 \u0434\u043b\u044f IP \u0438 \u0434\u0432\u043e\u0435\u0442\u043e\u0447\u0438\u0435 \u0434\u043b\u044f MAC.<\/p>\n<p><strong>\u041f\u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0437\u0430\u0434\u0430\u0447\u0438<\/strong><\/p>\n<p>\u0414\u0430\u043d\u0430 \u0441\u0442\u0440\u043e\u043a\u0430, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 <strong>&#171;aaa,bbbb,cccc,,eeeee,fffff&#187;<\/strong>. \u0422\u0430\u043a\u0436\u0435 \u0434\u0430\u043d \u0438\u043d\u0434\u0435\u043a\u0441 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0432 \u0432\u0438\u0434\u0435 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0446\u0435\u043b\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0447\u0438\u0441\u043b\u043e <strong>\u0434\u0432\u0430<\/strong>. \u0412\u0435\u0440\u043d\u0443\u0442\u044c \u043f\u043e\u0434\u0441\u0442\u0440\u043e\u043a\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0438\u043d\u0434\u0435\u043a\u0441\u0443. \u041e\u0442\u0441\u0447\u0435\u0442 \u043d\u0430\u0447\u0438\u0442\u0430\u0442\u044c \u043e\u0442 \u043d\u0443\u043b\u044f. \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u044d\u0442\u043e <strong>&#171;\u0441\u0441\u0441\u0441&#187;<\/strong>. <\/p>\n<p>\u0412\u043e\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445 \u0441\u043b\u0443\u0447\u0430\u0435\u0432. \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044f \u0441\u043b\u0443\u0436\u0438\u0442 \u0437\u0430\u043f\u044f\u0442\u0430\u044f.<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td data-colwidth=\"62\" width=\"62\">\n<p align=\"center\"><strong># \u0442\u0435\u0441\u0442\u0430<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"216\" width=\"216\">\n<p align=\"center\"><strong>\u0421\u0442\u0440\u043e\u043a\u0430<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"82\" width=\"82\">\n<p align=\"center\"><strong>\u0438\u043d\u0434\u0435\u043a\u0441<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"99\" width=\"99\">\n<p align=\"center\"><strong>\u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"center\"><strong>\u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044c<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"center\"><strong>\u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"62\" width=\"62\">\n<p align=\"center\">1<\/p>\n<\/td>\n<td data-colwidth=\"216\" width=\"216\">\n<p align=\"center\">&#171;aaa,bbbb,cccc,,eeeee,fffff&#187;<\/p>\n<\/td>\n<td data-colwidth=\"82\" width=\"82\">\n<p align=\"center\">5<\/p>\n<\/td>\n<td data-colwidth=\"99\" width=\"99\">\n<p align=\"center\">&#171;fffff&#187;<\/p>\n<\/td>\n<td>\n<p align=\"center\">&#8216;,&#8217;<\/p>\n<\/td>\n<td>\n<p align=\"center\">6<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"62\" width=\"62\">\n<p align=\"center\">2<\/p>\n<\/td>\n<td data-colwidth=\"216\" width=\"216\">\n<p align=\"center\">&#171;aaa,bbbb,cccc,,eeeee,fffff&#187;<\/p>\n<\/td>\n<td data-colwidth=\"82\" width=\"82\">\n<p align=\"center\">0<\/p>\n<\/td>\n<td data-colwidth=\"99\" width=\"99\">\n<p align=\"center\">&#171;aaa&#187;<\/p>\n<\/td>\n<td>\n<p align=\"center\">&#8216;,&#8217;<\/p>\n<\/td>\n<td>\n<p align=\"center\">6<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"62\" width=\"62\">\n<p align=\"center\">3<\/p>\n<\/td>\n<td data-colwidth=\"216\" width=\"216\">\n<p align=\"center\">&#171;aaa,bbbb,cccc,,eeeee,fffff&#187;<\/p>\n<\/td>\n<td data-colwidth=\"82\" width=\"82\">\n<p align=\"center\">1<\/p>\n<\/td>\n<td data-colwidth=\"99\" width=\"99\">\n<p align=\"center\">&#171;bbbb&#187;<\/p>\n<\/td>\n<td>\n<p align=\"center\">&#8216;,&#8217;<\/p>\n<\/td>\n<td>\n<p align=\"center\">6<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"62\" width=\"62\">\n<p align=\"center\">8<\/p>\n<\/td>\n<td data-colwidth=\"216\" width=\"216\">\n<p align=\"center\">&#171;asd ghh dff&#187;<\/p>\n<\/td>\n<td data-colwidth=\"82\" width=\"82\">\n<p align=\"center\">1<\/p>\n<\/td>\n<td data-colwidth=\"99\" width=\"99\">\n<p align=\"center\">&#171;ghh &#171;<\/p>\n<\/td>\n<td>\n<p align=\"center\">&#8216; &#8216;<\/p>\n<\/td>\n<td>\n<p align=\"center\">3<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"62\" width=\"62\">\n<p align=\"center\">4<\/p>\n<\/td>\n<td data-colwidth=\"216\" width=\"216\">\n<p align=\"center\">&#171;aaa,bbbb,cccc,,eeeee,fffff&#187;<\/p>\n<\/td>\n<td data-colwidth=\"82\" width=\"82\">\n<p align=\"center\">3<\/p>\n<\/td>\n<td data-colwidth=\"99\" width=\"99\">\n<p align=\"center\">&#171;&#187;<\/p>\n<\/td>\n<td>\n<p align=\"center\">&#8216;,&#8217;<\/p>\n<\/td>\n<td>\n<p align=\"center\">6<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"62\" width=\"62\">\n<p align=\"center\">8<\/p>\n<\/td>\n<td data-colwidth=\"216\" width=\"216\">\n<p align=\"center\">file.bin<\/p>\n<\/td>\n<td data-colwidth=\"82\" width=\"82\">\n<p align=\"center\">0<\/p>\n<\/td>\n<td data-colwidth=\"99\" width=\"99\">\n<p align=\"center\">&#171;file&#187;<\/p>\n<\/td>\n<td>\n<p align=\"center\">&#8216;.&#8217;<\/p>\n<\/td>\n<td>\n<p align=\"center\">2<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"62\" width=\"62\">\n<p align=\"center\">5<\/p>\n<\/td>\n<td data-colwidth=\"216\" width=\"216\">\n<p align=\"center\">&#171;,&#187;<\/p>\n<\/td>\n<td data-colwidth=\"82\" width=\"82\">\n<p align=\"center\">0<\/p>\n<\/td>\n<td data-colwidth=\"99\" width=\"99\">\n<p align=\"center\">&#171;&#187;<\/p>\n<\/td>\n<td>\n<p align=\"center\">&#8216;,&#8217;<\/p>\n<\/td>\n<td>\n<p align=\"center\">2<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"62\" width=\"62\">\n<p align=\"center\">7<\/p>\n<\/td>\n<td data-colwidth=\"216\" width=\"216\">\n<p align=\"center\">&#171;192.168.3.36&#187;<\/p>\n<\/td>\n<td data-colwidth=\"82\" width=\"82\">\n<p align=\"center\">0<\/p>\n<\/td>\n<td data-colwidth=\"99\" width=\"99\">\n<p align=\"center\">&#171;192&#187;<\/p>\n<\/td>\n<td>\n<p align=\"center\">&#8216;.&#8217;<\/p>\n<\/td>\n<td>\n<p align=\"center\">4<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"62\" width=\"62\">\n<p align=\"center\">6<\/p>\n<\/td>\n<td data-colwidth=\"216\" width=\"216\">\n<p align=\"center\">&#171;aaa,bbb,ccc,,eee,fff&#187;<\/p>\n<\/td>\n<td data-colwidth=\"82\" width=\"82\">\n<p align=\"center\">6<\/p>\n<\/td>\n<td data-colwidth=\"99\" width=\"99\">\n<p align=\"center\">Error<\/p>\n<\/td>\n<td>\n<p align=\"center\">&#8216;,&#8217;<\/p>\n<\/td>\n<td>\n<p align=\"center\">6<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u041f\u0440\u0438 \u044d\u0442\u043e\u043c API \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u0430\u043a\u043e\u0439<\/p>\n<pre><code class=\"cpp\">bool csv_parse_text(const char* const text,                     char separator,                      uint32_t index,                      char* const sub_str,                     uint32_t sub_str_size);<\/code><\/pre>\n<p>\u0433\u0434\u0435 <\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td data-colwidth=\"111\" width=\"111\">\n<p align=\"left\"><strong># \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"122\" width=\"122\">\n<p align=\"left\"><strong>\u0438\u043c\u044f<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"120\" width=\"120\">\n<p align=\"left\"><strong>\u0442\u0438\u043f \u0434\u0430\u043d\u043d\u044b\u0445<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>\u041f\u043e\u044f\u0441\u043d\u0435\u043d\u0438\u0435<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"111\" width=\"111\">\n<p align=\"left\">1<\/p>\n<\/td>\n<td data-colwidth=\"122\" width=\"122\">\n<p align=\"left\">text<\/p>\n<\/td>\n<td data-colwidth=\"120\" width=\"120\">\n<p align=\"left\">char*<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0412\u0445\u043e\u0434\u043d\u0430\u044f CSV \u0441\u0442\u0440\u043e\u043a\u0430<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"111\" width=\"111\">\n<p align=\"left\">2<\/p>\n<\/td>\n<td data-colwidth=\"122\" width=\"122\">\n<p align=\"left\">separator<\/p>\n<\/td>\n<td data-colwidth=\"120\" width=\"120\">\n<p align=\"left\">char<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0441\u0438\u043c\u0432\u043e\u043b \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044f<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"111\" width=\"111\">\n<p align=\"left\">3<\/p>\n<\/td>\n<td data-colwidth=\"122\" width=\"122\">\n<p align=\"left\">index<\/p>\n<\/td>\n<td data-colwidth=\"120\" width=\"120\">\n<p align=\"left\">uint32_t<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0438\u043d\u0434\u0435\u043a\u0441 \u043a\u043e\u043b\u043e\u043d\u043a\u0438 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043d\u0430\u0434\u043e \u0438\u0437\u0432\u043b\u0435\u0447\u044c<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"111\" width=\"111\">\n<p align=\"left\">4<\/p>\n<\/td>\n<td data-colwidth=\"122\" width=\"122\">\n<p align=\"left\">sub_str<\/p>\n<\/td>\n<td data-colwidth=\"120\" width=\"120\">\n<p align=\"left\">char*<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u043d\u0430\u044f \u043f\u043e\u0434\u0441\u0442\u0440\u043e\u043a\u0430<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"111\" width=\"111\">\n<p align=\"left\">5<\/p>\n<\/td>\n<td data-colwidth=\"122\" width=\"122\">\n<p align=\"left\">sub_str_size<\/p>\n<\/td>\n<td data-colwidth=\"120\" width=\"120\">\n<p align=\"left\">uint32_t<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0440\u0430\u0437\u043c\u0435\u0440 \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043c\u0430\u0441\u0441\u0438\u0432\u0430<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"111\" width=\"111\">\n<p align=\"left\">&#8212;<\/p>\n<\/td>\n<td data-colwidth=\"122\" width=\"122\">\n<p align=\"left\">error<\/p>\n<\/td>\n<td data-colwidth=\"120\" width=\"120\">\n<p align=\"left\">bool<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u043a\u0430\u043a\u043e\u0439-\u043b\u0438\u0431\u043e \u043e\u0448\u0438\u0431\u043a\u0438 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0432\u044b\u0445\u043e\u0434 \u0437\u0430 \u043f\u0440\u0435\u0434\u0435\u043b\u044b \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u0439 \u0434\u043b\u044f sub_str \u043f\u0430\u043c\u044f\u0442\u0438 \u0438\u043b\u0438 \u043d\u0435\u0432\u0435\u0440\u043d\u043e\u043c \u0438\u043d\u0434\u0435\u043a\u0441\u0435) \u0432\u0435\u0440\u043d\u0443\u0442\u044c false.<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044f <strong>csv_parse_text()<\/strong> \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u0430 \u043c\u0435\u043d\u044f\u0442\u044c \u0438\u0441\u0445\u043e\u0434\u043d\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 text. \u0421\u0442\u0440\u043e\u043a\u0430 text \u0432\u043e\u043e\u0431\u0449\u0435 \u043c\u043e\u0436\u0435\u0442 \u043b\u0435\u0436\u0430\u0442\u044c \u0432 NOR-Flash \u043f\u0430\u043c\u044f\u0442\u0438. <\/p>\n<p>\u042d\u0442\u043e\u0442 \u043a\u043e\u0434 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u043d \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043d\u0430 \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0435. \u0422\u043e \u0435\u0441\u0442\u044c \u043d\u0438\u043a\u0430\u043a\u043e\u0433\u043e \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043f\u0430\u043c\u044f\u0442\u0438 \u0430 \u044f\u0437\u044b\u043a \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0421\u0438. \u0418 \u043a\u0440\u0430\u0439\u043d\u0435 \u0436\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043e\u0434 \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043e\u043c ISO26262-6. \u0412\u043e\u0442, \u043f\u043e\u0436\u0430\u043b\u0443\u0439, \u0438 \u0432\u0441\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u043a \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u043c\u0443 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0443 CSV decoder(\u0430).<\/p>\n<p>\u0414\u043b\u044f \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430 \u0442\u0443\u0442 \u0432\u0441\u0451 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e. \u041e\u0434\u043d\u0430\u043a\u043e \u043a\u0430\u043a \u0437\u0430\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043d\u0443\u044e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u0432\u044b\u0434\u0435\u043b\u044f\u0442\u044c \u043f\u043e\u0434\u0441\u0442\u0440\u043e\u043a\u0438 \u0438\u0437 CSV \u0441\u0442\u0440\u043e\u0447\u0435\u043a?<\/p>\n<p><strong>\u041a\u0430\u043a \u0436\u0435 \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0442\u044c \u0442\u0435\u043a\u0441\u0442 \u0438\u0437 CSV \u0441\u0442\u0440\u043e\u0447\u0435\u043a?<\/strong><\/p>\n<p>\u041c\u043e\u0436\u043d\u043e \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e \u0421SV \u044d\u0442\u043e \u0441\u0432\u043e\u0435\u043e\u0431\u0440\u0430\u0437\u043d\u044b\u0439 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b \u0434\u043b\u044f \u0443\u043f\u0430\u043a\u043e\u0432\u043a\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0432 \u043f\u0430\u043a\u0435\u0442. \u041a\u0430\u043a \u044d\u0442\u043e \u043e\u0431\u044b\u0447\u043d\u043e \u0438 \u0431\u044b\u0432\u0430\u0435\u0442 \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0432\u0441\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u0440\u0435\u0448\u0430\u044e\u0442\u0441\u044f \u0437\u043e\u043b\u043e\u0442\u044b\u043c \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u043c: \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u043c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u043e\u043c. \u041d\u0430\u0434\u043e \u0441\u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0439 \u0430\u0432\u0442\u043e\u043c\u0430\u0442.<\/p>\n<p><strong>\u0424\u0430\u0437\u0430 1. \u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0432\u0445\u043e\u0434\u044b \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0433\u043e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0430<\/strong><\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td data-colwidth=\"114\" width=\"114\">\n<p align=\"left\"><strong>\u2116 \u0432\u0445\u043e\u0434\u0430<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"172\" width=\"172\">\n<p align=\"left\"><strong>\u041f\u043e\u044f\u0441\u043d\u0435\u043d\u0438\u0435<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>\u0422\u043e\u043a\u0435\u043d<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"114\" width=\"114\">\n<p align=\"left\">1<\/p>\n<\/td>\n<td data-colwidth=\"172\" width=\"172\">\n<p align=\"left\">\u0421\u0438\u043c\u0432\u043e\u043b<\/p>\n<\/td>\n<td>\n<p align=\"left\">NOT_SEP<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"114\" width=\"114\">\n<p align=\"left\">2<\/p>\n<\/td>\n<td data-colwidth=\"172\" width=\"172\">\n<p align=\"left\">\u0420\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044c<\/p>\n<\/td>\n<td>\n<p align=\"left\">Sep<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"114\" width=\"114\">\n<p align=\"left\">3<\/p>\n<\/td>\n<td data-colwidth=\"172\" width=\"172\">\n<p align=\"left\">\u041a\u043e\u043d\u0435\u0446 \u0441\u0442\u0440\u043e\u043a\u0438<\/p>\n<\/td>\n<td>\n<p align=\"left\">End<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p><strong>\u0424\u0430\u0437\u0430 2. \u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0433\u043e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0430.<\/strong><\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td data-colwidth=\"131\" width=\"131\">\n<p align=\"left\"><strong>\u2116 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>\u041f\u043e\u044f\u0441\u043d\u0435\u043d\u0438\u0435<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>\u0422\u043e\u043a\u0435\u043d<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"131\" width=\"131\">\n<p align=\"left\">1<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041a\u043e\u043d\u0435\u0447\u043d\u044b\u0439 \u0430\u0432\u0442\u043e\u043c\u0430\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e\u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d<\/p>\n<\/td>\n<td>\n<p align=\"left\">INIT<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"131\" width=\"131\">\n<p align=\"left\">2<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041d\u0430\u043a\u0430\u043f\u043b\u0438\u0432\u0430\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u044f\u0447\u0435\u0439\u043a\u0443<\/p>\n<\/td>\n<td>\n<p align=\"left\">ACCUMULATE<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"131\" width=\"131\">\n<p align=\"left\">3<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044c<\/p>\n<\/td>\n<td>\n<p align=\"left\">SEP<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"131\" width=\"131\">\n<p align=\"left\">4<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0420\u0430\u0431\u043e\u0442\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0430<\/p>\n<\/td>\n<td>\n<p align=\"left\">END<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p><strong>\u0424\u0430\u0437\u0430 3. \u041d\u0430\u0440\u0438\u0441\u043e\u0432\u0430\u0442\u044c \u0433\u0440\u0430\u0444 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u043e\u0432 \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f\u043c\u0438<\/strong><\/p>\n<p>\u0412\u0437\u0430\u0438\u043c\u043e\u0441\u0432\u044f\u0437\u044c \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f\u043c\u0438 \u0438 \u0432\u0445\u043e\u0434\u043d\u044b\u043c\u0438 \u0432\u043e\u0437\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f\u043c\u0438 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0433\u0440\u0430\u0444 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0433\u043e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0430. \u042d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043f\u043b\u0430\u043d\u0430\u0440\u043d\u044b\u0439 \u0433\u0440\u0430\u0444.<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/887\/64d\/3f4\/88764d3f47c1871544e46196b1db06b9.png\" width=\"473\" height=\"477\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/887\/64d\/3f4\/88764d3f47c1871544e46196b1db06b9.png\"\/><\/figure>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0432\u0441\u0451 \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u0447\u0430\u0442\u044c \u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043e\u0434.<\/p>\n<p><strong>\u0424\u0430\u0437\u0430 4. \u041d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u044b\u0439 \u043a\u043e\u0434 \u0434\u043b\u044f \u043f\u0430\u0440\u0441\u0435\u0440\u0430 CSV \u0441\u0442\u0440\u043e\u0447\u0435\u043a<\/strong><\/p>\n<p>\u0423 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u0435\u0441\u0442\u044c \u0441\u0432\u043e\u0438 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b. \u0412\u043e\u0442 \u043e\u043d\u0438 \u0434\u043b\u044f \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 CSV.<\/p>\n<pre><code class=\"cpp\">#ifndef CSV_CONST_H #define CSV_CONST_H   #ifndef HAS_CSV #error \"+HAS_CSV\" #endif  typedef enum {     CSV_STATE_INIT = 1,     CSV_STATE_ACCUMULATE = 2,     CSV_STATE_SEP = 3,     CSV_STATE_END = 4,      CSV_STATE_UNDEF = 0, } CsvState_t;  typedef enum {     CSV_INPUT_NOT_SEP = 1,     CSV_INPUT_SEP = 2,     CSV_INPUT_END = 3,      CSV_INPUT_UNDEF = 0, } CsvInput_t;  #endif \/*CSV_CONST_H*\/ <\/code><\/pre>\n<p>\u0423 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u0435\u0441\u0442\u044c \u0441\u0432\u043e\u0438 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0442\u0438\u043f\u044b \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<pre><code class=\"cpp\">#ifndef CSV_TYPEES_H #define CSV_TYPEES_H  #ifdef __cplusplus extern \"C\" { #endif  #include &lt;stdbool.h> #include &lt;stdint.h>  #ifndef HAS_CSV #error \"+HAS_CSV\" #endif  #include \"csv_const.h\"  typedef struct {     char* out_buff; \/*result array*\/     char prev_char;     char separator;     bool init_done;     bool fetch_done;     char symbol;     uint32_t out_size;     uint32_t i;\/*char index*\/     int32_t fetch_index; \/*starts from 0; -1 if fetch is not needed*\/     uint32_t cnt; \/*total number of cells*\/     uint32_t position; \/*starts from 0*\/     CsvState_t state;     CsvInput_t input; } CsvFsm_t;  #ifdef __cplusplus } #endif  #endif \/* CSV_TYPEES_H *\/ <\/code><\/pre>\n<p>\u0410 \u044d\u0442\u043e API \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 CSV. \u0422\u0443\u0442 \u043e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u044d\u0442\u043e <strong>csv_parse_text()<\/strong><\/p>\n<pre><code class=\"cpp\">#ifndef CSV_H #define CSV_H  #ifdef __cplusplus extern \"C\" { #endif  #include &lt;stdbool.h> #include &lt;stdint.h>  #include \"csv_types.h\"  uint32_t csv_cnt(const char* const text,                  char separator); bool csv_parse_text(const char* const in_text,                      char separator,                      uint32_t index,                      char* const text,                     uint32_t size);    #ifdef __cplusplus } #endif  #endif \/* CSV_H *\/ <\/code><\/pre>\n<p>\u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0433\u043e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0430 \u0440\u0430\u0437\u0431\u043e\u0440\u0430 CSV<\/p>\n<pre><code class=\"cpp\"> static bool csv_init(CsvFsm_t* Node, char separator, int32_t fetch_index, char* const out_text, uint32_t size) {     bool res = false;     LOG_DEBUG(CSV, \"Init: Separator:%c\", separator);     if(Node) {         Node->separator = separator;         Node->init_done = true;         Node->fetch_done = false;         Node->prev_char = 0x00;         Node->state = CSV_STATE_INIT;         Node->input = CSV_INPUT_UNDEF;         Node->cnt = 0;         Node->position = 0;         Node->i = 0;         Node->out_buff = out_text;         Node->out_size = size;         Node->fetch_index = fetch_index;         LOG_DEBUG(CSV, \"ValMaxSize:%u byte FetchIndex: %d\",size, fetch_index);          res = true;     }     return res; }   uint32_t csv_cnt(const char* const text, char separator) {     bool res = false;     size_t len = strlen(text);     LOG_DEBUG(CSV, \"Text:[%s] Size:%u byte Separator:%c\", text, len, separator);      CsvFsm_t Node;     csv_init(&amp;Node, separator, -1, NULL, 0);     uint32_t i = 0;     for(i = 0; i &lt; len; i++) {         Node.input = CSV_INPUT_UNDEF;         res = csv_cnt_proc(&amp;Node, text[i]);     }     Node.input = CSV_INPUT_END;     res = csv_cnt_proc(&amp;Node, 0x00);      return Node.cnt; }  <\/code><\/pre>\n<p>\u0412\u0441\u044e \u0440\u0430\u0431\u043e\u0442\u0443 \u0434\u0435\u043b\u0430\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u044f <strong>csv_parse_text()<\/strong><\/p>\n<pre><code class=\"cpp\">bool csv_parse_text(const char* const in_text, char separator, uint32_t index,         char* const out_text, uint32_t size) {     bool res = false;     if(in_text &amp;&amp; out_text) {         size_t len = strlen(in_text);         LOG_DEBUG(CSV, \"InText:[%s] Size:%u Sep:%c Index:%u\", in_text, len, separator, index);          CsvFsm_t Item={0};         csv_init(&amp;Item, separator, index, out_text, size);         uint32_t i = 0;         for(i = 0; i &lt; len; i++) {             Item.input = CSV_INPUT_UNDEF;             res = csv_cnt_proc(&amp;Item, in_text[i]);         }         Item.input = CSV_INPUT_END;         res = csv_cnt_proc(&amp;Item, 0x00);          res = false;         if(Item.fetch_done ) {             if(0==Item.error_cnt){                 res = true;             }         }      }     return res; } <\/code><\/pre>\n<p>\u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0441\u0430\u043c\u0438 \u0448\u0435\u0441\u0442\u0435\u0440\u043d\u0438 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0433\u043e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0430  \u043f\u0440\u043e\u043a\u0440\u0443\u0447\u0438\u0432\u0430\u0435\u0442  \u0444\u0443\u043d\u043a\u0446\u0438\u044f <strong>csv_cnt_proc()<\/strong><\/p>\n<pre><code class=\"cpp\">static CsvInput_t csv_symbol_2_input(CsvFsm_t* CsvFsm,                                      char symbol) {     if(symbol == CsvFsm->separator) {         CsvFsm->input = CSV_INPUT_SEP;     } else {         CsvFsm->input = CSV_INPUT_NOT_SEP;     }     return CsvFsm->input; }  static bool csv_add_letter(CsvFsm_t* const Node, uint32_t index, char letter, bool last_char){     bool res = true;     if(Node->position==Node->fetch_index){         \/\/Node->i = index;         if(index&lt;Node->out_size){             Node->out_buff[index] = letter ;\/\/Node->symbol;             res = true;             if(last_char){                 Node->fetch_done = last_char;                 LOG_PROTECTED(CSV, \"CSV[%u]=[%s]\",Node->position, Node->out_buff);             }         }else{             Node->error_cnt++;             res = false;         }     }     return res; }   static bool csv_cnt_proc(CsvFsm_t* Node, char symbol) {     bool res = false;     if(Node) {         Node->symbol = symbol;         if(CSV_INPUT_UNDEF == Node->input) {             csv_symbol_2_input(Node, symbol);         }          CsvNodeDiag(Node);          switch(Node->state) {         case CSV_STATE_INIT:             res = csv_cnt_init_proc(Node);             break;          case CSV_STATE_ACCUMULATE:             res = csv_cnt_acc_proc(Node);             break;          case CSV_STATE_SEP:             res = csv_cnt_sep_proc(Node);             break;          case CSV_STATE_END:             res = csv_cnt_end_proc(Node);             break;         default:             break;         }         Node->prev_char = symbol;     }     return res; } <\/code><\/pre>\n<p>\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0432\u0445\u043e\u0434\u043e\u0432 \u0434\u043b\u044f \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u0441\u043b\u0435 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438<\/p>\n<pre><code class=\"cpp\">static bool csv_cnt_init_proc(CsvFsm_t* Node) {     bool res = false;     \/\/LOG_DEBUG(CSV, \"ProcInit %c Input:%s\", Node->symbol, CsvInput2Str(Node->input));     if(Node) {         switch(Node->input) {         case CSV_INPUT_NOT_SEP: {             Node->cnt++;             Node->i = 0;             res=csv_add_letter(Node, 0,   Node->symbol, false);             Node->state = CSV_STATE_ACCUMULATE;         } break;         case CSV_INPUT_SEP: {             Node->i = 0;             res=csv_add_letter(Node, 0,   0, true);             Node->cnt++;             Node->position++;             Node->state = CSV_STATE_SEP;         } break;         case CSV_INPUT_END: {             Node->state = CSV_STATE_END;             Node->i = 0;             res=csv_add_letter(Node, 0,   0, true);             Node->cnt++;         } break;         default:             break;         }     }     return res; } <\/code><\/pre>\n<p>\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0430\u043a\u043a\u0443\u043c\u0443\u043b\u044f\u0442\u043e\u0440\u0430<\/p>\n<pre><code class=\"cpp\">static bool csv_cnt_acc_proc(CsvFsm_t* Node) {     bool res = false;     \/\/LOG_DEBUG(CSV, \"ProcAcc %c Input:%s\", Node->symbol, CsvInput2Str(Node->input));     if(Node) {         switch(Node->input) {         case CSV_INPUT_NOT_SEP: {             \/*SaveChar*\/             Node->state = CSV_STATE_ACCUMULATE;             Node->i++;             res = csv_add_letter(Node,   Node->i,Node->symbol, false);         } break;         case CSV_INPUT_SEP: {             Node->i++;             res = csv_add_letter(Node,   Node->i,0, true);             Node->i = 0;             Node->position++;             Node->state = CSV_STATE_SEP;         } break;         case CSV_INPUT_END: {             Node->i++;             res = csv_add_letter(Node,   Node->i, 0x00, true);             Node->state = CSV_STATE_END;         } break;         default:             res = false;             break;         }     }     return res; } <\/code><\/pre>\n<p>\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0438\u0437 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f, \u043a\u043e\u0433\u0434\u0430 \u0443\u0436\u0435 \u0431\u044b\u043b \u043f\u0440\u0438\u043d\u044f\u0442 \u043a\u0430\u043a\u043e\u0439-\u043b\u0438\u0431\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044c<\/p>\n<pre><code class=\"cpp\">static bool csv_cnt_sep_proc(CsvFsm_t* Node) {     bool res = false;     \/\/LOG_DEBUG(CSV, \"ProcSep %c Input:%s\", Node->symbol, CsvInput2Str(Node->input));     if(Node) {         switch(Node->input) {         case CSV_INPUT_NOT_SEP: {             Node->cnt++;             res=csv_add_letter(Node, 0,Node->symbol, false);             Node->state = CSV_STATE_ACCUMULATE;         } break;         case CSV_INPUT_SEP: {             res=csv_add_letter(Node, 0,0, true);             Node->position++;             Node->state = CSV_STATE_SEP;             Node->cnt++;         } break;         case CSV_INPUT_END: {             res=csv_add_letter(Node, 0,0, false);             Node->state = CSV_STATE_END;             Node->cnt++;         } break;         default:             break;         }     }     return res; } <\/code><\/pre>\n<p>\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0434\u043b\u044f \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0441\u0442\u0440\u043e\u043a\u0438<\/p>\n<pre><code class=\"cpp\"> static bool csv_cnt_end_proc(CsvFsm_t* Node) {     bool res = false;     LOG_DEBUG(CSV, \"ProcEnd %c Input:%s\", Node->symbol, CsvInput2Str(Node->input));     if(Node) {         switch(Node->input) {         case CSV_INPUT_NOT_SEP: {             res = false;             Node->i = 0;             Node->out_buff[0] = 0x00;             Node->state = CSV_STATE_END;         } break;         case CSV_INPUT_SEP: {             res = false;             Node->i = 0;             Node->out_buff[0] = 0x00;             Node->state = CSV_STATE_END;         } break;         case CSV_INPUT_END: {             res = false;             Node->i = 0;             Node->out_buff[0] = 0x00;             Node->state = CSV_STATE_END;         } break;         default:             break;         }     }     return res; } <\/code><\/pre>\n<p><strong>\u0424\u0430\u0437\u0430 5. \u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/strong><\/p>\n<p>\u041a\u0430\u0436\u0434\u044b\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u044b\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u043d\u0430\u0434\u043e \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c. \u0412\u043e\u0442 \u043d\u0430\u0431\u043e\u0440 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445 \u0441\u043b\u0443\u0447\u0430\u0435\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u043e\u0442\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c.<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td data-colwidth=\"416\" width=\"416\">\n<p align=\"left\"><strong>CSV \u0441\u0442\u0440\u043e\u0447\u043a\u0430<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"82\" width=\"82\">\n<p align=\"left\"><strong>\u0438\u043d\u0434\u0435\u043a\u0441<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>\u043e\u0436\u0438\u0434\u0430\u0435\u043c\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"416\" width=\"416\">\n<p align=\"left\">&#171;3975,   1.667,  27.50, 21:20:36, 7\/8\/2023, 1520045092&#187;<\/p>\n<\/td>\n<td data-colwidth=\"82\" width=\"82\">\n<p align=\"left\">5<\/p>\n<\/td>\n<td>\n<p align=\"left\">1520045092<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"416\" width=\"416\">\n<p align=\"left\">&#171;4452,0.000,17.00, 00:00:18, 14\/7\/2023, 1517894674&#187;<\/p>\n<\/td>\n<td data-colwidth=\"82\" width=\"82\">\n<p align=\"left\">1<\/p>\n<\/td>\n<td>\n<p align=\"left\">0.000<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"416\" width=\"416\">\n<p align=\"left\">&#171;ll wm8731 debug;ll i2c debug;tsr 127&#187;<\/p>\n<\/td>\n<td data-colwidth=\"82\" width=\"82\">\n<p align=\"left\">0<\/p>\n<\/td>\n<td>\n<p align=\"left\">ll wm8731 debug<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"416\" width=\"416\">\n<p align=\"left\">&#171;&#187;<\/p>\n<\/td>\n<td data-colwidth=\"82\" width=\"82\">\n<p align=\"left\">0<\/p>\n<\/td>\n<td>\n<p align=\"left\">&#171;&#187;<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"416\" width=\"416\">\n<p align=\"left\">&#171;aa;bb;cc&#187;<\/p>\n<\/td>\n<td data-colwidth=\"82\" width=\"82\">\n<p align=\"left\">3<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041e\u0448\u0438\u0431\u043a\u0430<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u0421\u0431\u043e\u0440\u043a\u0430 \u0438 \u043f\u0440\u043e\u0433\u043e\u043d \u044d\u0442\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u0447\u0435\u0440\u0435\u0437 \u043c\u043e\u0434\u0443\u043b\u044c\u043d\u044b\u0435 \u0442\u0435\u0441\u0442\u044b \u043d\u0430 PC \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0438, \u0447\u0442\u043e \u0432\u0441\u0451 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442!<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/3af\/212\/40e\/3af21240ea36ca19b5467329dd831147.png\" width=\"573\" height=\"343\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/3af\/212\/40e\/3af21240ea36ca19b5467329dd831147.png\"\/><\/figure>\n<p><strong>\u0414\u043e\u0441\u0442\u043e\u0438\u043d\u0441\u0442\u0432\u0430 CVS \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430 \u0438 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0430\u0440\u0441\u0435\u0440\u0430 \u0432 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438<\/strong><\/p>\n<p>1&#8212;\u041f\u0440\u043e\u0441\u0442\u043e\u0442\u0430 \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0443.<\/p>\n<p>2&#8212;\u0427\u0435\u043b\u043e\u0432\u0435\u043a\u043e-\u0447\u0438\u0442\u0430\u0435\u043c\u043e\u0441\u0442\u044c CVS \u0441\u0442\u0440\u043e\u0447\u0435\u043a.<\/p>\n<p>3&#8212;\u0421\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c \u0441 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430\u043c\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u044b\u0445 \u0442\u0430\u0431\u043b\u0438\u0446. \u0422\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0439 CSV \u0444\u0430\u0439\u043b \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0432 Google SpreadSheets \u0438\u043b\u0438 Excel.<\/p>\n<p>4&#8212;\u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u044d\u0442\u043e\u043c\u0443 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u043c\u0443 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0443, \u0421SV \u0441\u0442\u0440\u043e\u043a\u0438 \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c \u0432 \u043f\u043e\u0442\u043e\u043a\u043e\u0432\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435.<\/p>\n<p>5&#8212;\u0412 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0438 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043d\u0443\u0436\u0434\u0430 \u0432 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u0438 \u043f\u0430\u043c\u044f\u0442\u0438, \u0447\u0442\u043e \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0432\u0430\u0436\u043d\u043e \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u0432.  <\/p>\n<p>6&#8212;\u0412 \u043a\u0430\u0436\u0434\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0442\u043e\u043b\u044c\u043a\u043e 1 return. \u042d\u0442\u043e \u043a\u0430\u043a \u0440\u0430\u0437 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0443 ISO26262. \u0417\u043d\u0430\u0447\u0438\u0442 \u044d\u0442\u043e\u0442 \u043a\u043e\u0434 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u0430\u0432\u0442\u043e\u043c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u0439 \u043f\u0440\u043e\u043c\u044b\u0448\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u0438.<\/p>\n<p><strong>\u041d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u0438 CSV<\/strong><\/p>\n<p>2&#8212;\u0412 \u0432\u044b\u0434\u0435\u043b\u044f\u0435\u043c\u043e\u043c CSV \u0442\u0435\u043a\u0441\u0442\u0435 \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0441\u0430\u043c\u043e\u0433\u043e \u0441\u0438\u043c\u0432\u043e\u043b\u0430 \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044f, \u043a\u0430\u043a \u0434\u0430\u043d\u043d\u044b\u0445. \u0418\u043d\u0430\u0447\u0435 \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0439 \u0430\u0432\u0442\u043e\u043c\u0430\u0442 \u0437\u0430\u043a\u043b\u0438\u043d\u0438\u0442. \u041d\u043e \u0432 95% \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u044d\u0442\u043e \u0438 \u043d\u0435 \u043d\u0443\u0436\u043d\u043e! \u0418 \u043f\u043e\u0442\u043e\u043c, \u0432\u0441\u0435\u0433\u0434\u0430 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0434\u043e\u0431\u0440\u0430\u0442\u044c \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044c \u0434\u043b\u044f \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u0441\u043b\u0443\u0447\u0430\u044f (\/,;.|\\`*).<\/p>\n<p><strong>\u0412\u044b\u0432\u043e\u0434`<\/strong><\/p>\n<p>\u041a\u0430\u043a \u0432\u0438\u0434\u0438\u0442\u0435, \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u043f\u0430\u0440\u0441\u0435\u0440 CSV \u0441\u0442\u0440\u043e\u0447\u0435\u043a \u043d\u0435 \u0442\u0430\u043a\u0430\u044f \u0443\u0436 \u0438 \u0442\u0440\u0438\u0432\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430. \u041d\u0430\u0434\u043e \u0441\u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0439 \u0430\u0432\u0442\u043e\u043c\u0430\u0442 \u043d\u0430 4 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f, \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0442\u0435\u0441\u0442\u043e\u0432. <\/p>\n<p>\u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0434\u0430\u0436\u0435 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0442\u0435\u043a\u0441\u0442\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043d\u0430 \u0421 \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0434\u043b\u044f \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u043a\u043e\u0434\u0430. \u041c\u043e\u0440\u0430\u043b\u044c \u044d\u0442\u043e\u0433\u043e \u0442\u0435\u0441\u0442\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043f\u0440\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u0438 \u043b\u044e\u0431\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u043d\u0435\u043b\u044c\u0437\u044f \u0441\u0440\u0430\u0437\u0443 \u043a\u0438\u0434\u0430\u0442\u044c\u0441\u044f \u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043e\u0434. \u041d\u0430\u0434\u043e \u0441\u043f\u0435\u0440\u0432\u0430 \u043d\u0430\u0440\u0438\u0441\u043e\u0432\u0430\u0442\u044c \u0441\u0445\u0435\u043c\u0443 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0433\u043e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0430.<\/p>\n<blockquote>\n<p> \u0418\u0441\u0445\u043e\u0434\u043d\u0438\u043a \u044d\u0442\u043e \u043d\u0435 \u043a\u043e\u0434, \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a \u044d\u0442\u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f.<\/p>\n<\/blockquote>\n<p>\u0412\u043e\u0442 \u0412\u044b \u0438 \u043d\u0430\u0443\u0447\u0438\u043b\u0438\u0441\u044c \u0432\u044b\u0434\u0435\u043b\u044f\u0442\u044c \u043f\u043e\u0434\u0441\u0442\u0440\u043e\u043a\u0438 \u0438\u0437 \u0441\u0442\u0440\u043e\u043a. \u0414\u0430\u043b\u0435\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0432\u0430\u043d\u0438\u0435 \u0447\u0438\u0441\u043b\u0430 \u0438\u0437 \u0441\u0442\u0440\u043e\u043a\u0438. \u041f\u0440\u043e \u044d\u0442\u043e \u0443 \u043c\u0435\u043d\u044f \u0435\u0441\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0442\u0435\u043a\u0441\u0442: <\/p>\n<p>\u0420\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0432\u0430\u043d\u0438\u0435 \u0412\u0435\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u0427\u0438\u0441\u043b\u0430 \u0438\u0437 \u0421\u0442\u0440\u043e\u0447\u043a\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/757122\/\" rel=\"noopener noreferrer nofollow\">https:\/\/habr.com\/ru\/articles\/757122\/<\/a><\/p>\n<p>\u041d\u0430\u0434\u0435\u044e\u0441\u044c, \u0447\u0442\u043e \u044d\u0442\u043e\u0442 \u0442\u0435\u043a\u0441\u0442 \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0434\u0440\u0443\u0433\u0438\u043c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u0430\u043c \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u0432 \u0440\u0435\u0448\u0430\u0442\u044c \u043f\u043e\u0432\u0441\u0435\u0434\u043d\u0435\u0432\u043d\u044b\u0435 \u0437\u0430\u0434\u0430\u0447\u0438.<\/p>\n<p><em>\u042f \u0431\u044b\u043b \u0431\u044b \u043f\u0440\u0438\u0437\u043d\u0430\u0442\u0435\u043b\u0435\u043d \u0437\u0430 \u043d\u0430\u0431\u043e\u0440 \u0442\u0435\u0441\u0442-case(\u043e\u0432) \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430.<\/em><\/p>\n<p><strong>C\u043b\u043e\u0432\u0430\u0440\u044c<\/strong><\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td data-colwidth=\"130\" width=\"130\">\n<p align=\"left\"><strong>\u0410\u043a\u0440\u043e\u043d\u0438\u043c<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>\u0420\u0430\u0441\u0448\u0438\u0444\u0440\u043e\u0432\u043a\u0430<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"130\" width=\"130\">\n<p align=\"left\">CSV<\/p>\n<\/td>\n<td>\n<p align=\"left\">Comma-separated values<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"130\" width=\"130\">\n<p align=\"left\">URL<\/p>\n<\/td>\n<td>\n<p align=\"left\">Uniform Resource Locator<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"130\" width=\"130\">\n<p align=\"left\">GNSS<\/p>\n<\/td>\n<td>\n<p align=\"left\">Global Navigation Satellite System<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"130\" width=\"130\">\n<p align=\"left\">API  <\/p>\n<\/td>\n<td>\n<p align=\"left\">application programming interface<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"130\" width=\"130\">\n<p align=\"left\">NMEA<\/p>\n<\/td>\n<td>\n<p align=\"left\">National Marine Electronics Association<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p><strong>Links, C\u0441\u044b\u043b\u043a\u0438<\/strong><\/p>\n<p><a href=\"https:\/\/habr.com\/ru\/articles\/757122\/\" rel=\"noopener noreferrer nofollow\">\u0420\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0432\u0430\u043d\u0438\u0435 \u0412\u0435\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u0427\u0438\u0441\u043b\u0430 \u0438\u0437 \u0421\u0442\u0440\u043e\u0447\u043a\u0438 <\/a><\/p>\n<p>ISO 26262-6 \u0440\u0430\u0437\u0431\u043e\u0440 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 (\u0438\u043b\u0438 \u043a\u0430\u043a \u043f\u0438\u0441\u0430\u0442\u044c \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u0439 \u0441\u043e\u0444\u0442) <a href=\"https:\/\/habr.com\/ru\/articles\/757216\/\" rel=\"noopener noreferrer nofollow\">https:\/\/habr.com\/ru\/articles\/757216\/<\/a><\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><\/p>\n<div class=\"tm-article-poll-container\"><!--[--><\/p>\n<div class=\"tm-article-poll tm-article-poll_variant-bordered\">\n<div class=\"tm-notice tm-notice_positive tm-article-poll__notice\"><!----><\/p>\n<div class=\"tm-notice__inner\"><!----><\/p>\n<div class=\"tm-notice__content\" data-test-id=\"notice-content\"><!--[--><span>\u0422\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043c\u043e\u0433\u0443\u0442 \u0443\u0447\u0430\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0432 \u043e\u043f\u0440\u043e\u0441\u0435. <a rel=\"nofollow\" href=\"\/kek\/v1\/auth\/habrahabr\/?back=\/ru\/articles\/765066\/&#038;hl=ru\">\u0412\u043e\u0439\u0434\u0438\u0442\u0435<\/a>, \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430.<\/span><!--]--><\/div>\n<\/div>\n<\/div>\n<p><!--[--><\/p>\n<div class=\"tm-article-poll__header\">\u0412\u0430\u043c \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u043b\u043e\u0441\u044c \u0434\u0435\u043b\u0430\u0442\u044c \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0440\u0430\u0437\u0431\u043e\u0440 CSV \u0441\u0442\u0440\u043e\u0447\u0435\u043a?<\/div>\n<div class=\"tm-article-poll__answers\"><!--[--><\/p>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent tm-article-poll__answer-percent_winning\">81.4% <\/span><span class=\"tm-article-poll__answer-label\">\u0434\u0430<\/span><span class=\"tm-article-poll__answer-votes\">35<\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress tm-article-poll__answer-progress_winning\" style=\"width: 81.4%\"><\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent\">18.6% <\/span><span class=\"tm-article-poll__answer-label\">\u043d\u0435\u0442<\/span><span class=\"tm-article-poll__answer-votes\">8<\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress\" style=\"width: 18.6%\"><\/div>\n<\/div>\n<\/div>\n<p><!--]--><\/div>\n<div class=\"tm-article-poll__stats\"> \u041f\u0440\u043e\u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043b\u0438 43 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.    \u0412\u043e\u0437\u0434\u0435\u0440\u0436\u0430\u0432\u0448\u0438\u0445\u0441\u044f \u043d\u0435\u0442. <\/div>\n<p><!--]--><\/div>\n<div class=\"tm-article-poll tm-article-poll_variant-bordered\">\n<div class=\"tm-notice tm-notice_positive tm-article-poll__notice\"><!----><\/p>\n<div class=\"tm-notice__inner\"><!----><\/p>\n<div class=\"tm-notice__content\" data-test-id=\"notice-content\"><!--[--><span>\u0422\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043c\u043e\u0433\u0443\u0442 \u0443\u0447\u0430\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0432 \u043e\u043f\u0440\u043e\u0441\u0435. <a rel=\"nofollow\" href=\"\/kek\/v1\/auth\/habrahabr\/?back=\/ru\/articles\/765066\/&#038;hl=ru\">\u0412\u043e\u0439\u0434\u0438\u0442\u0435<\/a>, \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430.<\/span><!--]--><\/div>\n<\/div>\n<\/div>\n<p><!--[--><\/p>\n<div class=\"tm-article-poll__header\">\u0412\u044b \u0434\u0435\u043b\u0430\u043b\u0438 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0440\u0430\u0437\u0431\u043e\u0440 NMEA \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430?<\/div>\n<div class=\"tm-article-poll__answers\"><!--[--><\/p>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent\">20.93% <\/span><span class=\"tm-article-poll__answer-label\">\u0434\u0430<\/span><span class=\"tm-article-poll__answer-votes\">9<\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress\" style=\"width: 20.93%\"><\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent tm-article-poll__answer-percent_winning\">79.07% <\/span><span class=\"tm-article-poll__answer-label\">\u043d\u0435\u0442<\/span><span class=\"tm-article-poll__answer-votes\">34<\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress tm-article-poll__answer-progress_winning\" style=\"width: 79.07%\"><\/div>\n<\/div>\n<\/div>\n<p><!--]--><\/div>\n<div class=\"tm-article-poll__stats\"> \u041f\u0440\u043e\u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043b\u0438 43 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.    \u0412\u043e\u0437\u0434\u0435\u0440\u0436\u0430\u043b\u0441\u044f 1 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c. <\/div>\n<p><!--]--><\/div>\n<p><!--]--><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/765066\/\"> https:\/\/habr.com\/ru\/articles\/765066\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>#GNSS #CSV #NMEA #URL #IP #MAC<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u0412 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u0432 \u0447\u0430\u0441\u0442\u043e \u043d\u0430\u0434\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u044c \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0440\u0430\u0437\u0431\u043e\u0440 (\u043f\u0430\u0440\u0441\u0438\u043d\u0433) CSV \u0441\u0442\u0440\u043e\u0447\u0435\u043a. CSV \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u044b \u0437\u0430\u043f\u044f\u0442\u043e\u0439 (\u0438\u043b\u0438 \u043b\u044e\u0431\u044b\u043c \u0434\u0440\u0443\u0433\u0438\u043c \u043e\u0434\u0438\u043d\u043e\u0447\u043d\u044b\u043c \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u043c: ; | \/). <\/p>\n<p>1&#8212;CSV \u0441\u0442\u0440\u043e\u0447\u043a\u0438 \u043c\u043e\u0436\u043d\u043e, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u043e\u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0442\u044c \u0432 NMEA \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0435 \u043e\u0442 \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 GNSS \u043f\u0440\u0438\u0435\u043c\u043d\u0438\u043a\u043e\u0432. \u0412\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 NMEA \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430 <\/p>\n<pre><code class=\"bash\">$GNGGA,102030.000,5546.95900,N,03740.69200,E,1,08,2.0,142.0,M,0.0,M,,* $GNGLL,5546.95900,N,03740.69200,E,102030.000,A,A* $GNGSA,A,3,10,16,18,20,26,27,,,,,,,4.8,2.0,4.3,1* $GNGSA,A,3,19,  ,  ,  ,  ,  ,,,,,,,4.8,2.0,4.3,4* $GNGSA,A,3,82,  ,  ,  ,  ,  ,,,,,,,4.8,2.0,4.3,2* $GPGSV,3,1,12,07,08,343,,08,07,304,,10,28,195,42,13,20,054,,0* $GPGSV,3,2,12,15,27,087,,16,47,262,39,18,66,082,23,20,58,174,23,0* $GPGSV,3,3,12,21,75,089,23,26,33,222,31,27,38,298,40,29,15,127,,0* $BDGSV,1,1,01,19,29,174,28,0* $GLGSV,3,1,09,74,08,001,34,66,55,096,,82,69,318,21,73,25,326,,0* $GLGSV,3,2,09,80,20,258,,65,18,025,,83,21,292,,81,51,092,,0* $GLGSV,3,3,09,67,26,161,,0* $GNRMC,102030.000,A,5546.95900,N,03740.69200,E,0.12,49.75,200220,,,A,V* $GNVTG,49.75,T,,M,0.12,N,0.22,K,A* $GNZDA,102030.000,20,02,2020,00,00* $GPTXT,01,01,01,ANTENNA OK* $GNDHV,102030.000,0.03,0.000,0.000,0.000,0.00,,,,,M* $GNGST,102030.000,6.9,,,,5.6,9.2,10.1* $GPTXT,01,01,02,MS=7,7,061A8200,33,0,00000000,20,2,00028000*<\/code><\/pre>\n<p>\u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u043e\u0436\u043d\u043e \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e CSV \u044d\u0442\u043e \u043a\u043e\u0441\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b \u0434\u043b\u044f \u043f\u0440\u0438\u0435\u043c\u0430 \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u0432 \u0441\u043e \u0441\u043f\u0443\u0442\u043d\u0438\u043a\u043e\u0432!<\/p>\n<p>2&#8212; \u041f\u043e\u0442\u043e\u043c, \u043b\u044e\u0431\u043e\u0439 URL (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u044d\u0442\u043e\u0442 <a href=\"https:\/\/habr.com\/ru\/articles\/765066\/\" rel=\"noopener noreferrer nofollow\">https:\/\/habr.com\/ru\/articles\/765066\/<\/a>) \u044d\u0442\u043e, \u0432 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438, \u0442\u0430 \u0436\u0435 \u0441\u0430\u043c\u0430\u044f \u043f\u0440\u0435\u0441\u043b\u043e\u0432\u0443\u0442\u0430\u044f CSV \u0441\u0442\u0440\u043e\u0447\u043a\u0430, \u0433\u0434\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044c \u044d\u0442\u043e \/.<\/p>\n<p>3&#8212; \u0422\u0430\u043a\u0436\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 CSV \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0412\u0430\u043c \u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u0447\u043a\u043e\u0439 \u0432 UART-CLI \u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0438 \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0432\u0430\u0442\u044c \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043d\u0430 \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u0440\u0430\u0437\u0443 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e shell \u043a\u043e\u043c\u0430\u043d\u0434. <\/p>\n<p>4&#8212;\u041f\u0440\u043e\u0448\u0438\u0432\u043a\u0430 \u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u0442\u043e \u043b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430 SD \u043a\u0430\u0440\u0442\u0443 \u043f\u043e SPI \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 CSV \u0444\u043e\u0440\u043c\u0430\u0442\u0435 \u043a\u0430\u043a \u0432 \u0444\u0430\u0439\u043b \u043d\u0430 FatFS. \u041f\u043e\u0442\u043e\u043c \u044d\u0442\u043e\u0442 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0439 *.csv \u0444\u0430\u0439\u043b\u0438\u043a \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043a\u0440\u044b\u0442\u044c \u043d\u0430 LapTop(\u0435) \u043b\u044e\u0431\u044b\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u043e\u043c \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u044b\u0445 \u0442\u0430\u0431\u043b\u0438\u0446.<\/p>\n<p>5&#8212;IP \u0430\u0434\u0440\u0435\u0441, MAC \u0430\u0434\u0440\u0435\u0441 &#8212; \u044d\u0442\u043e \u0442\u043e\u0436\u0435 CSV \u0441\u0442\u0440\u043e\u0447\u043a\u0438. \u0422\u043e\u043b\u044c\u043a\u043e \u0441 \u0441\u043e \u0441\u0432\u043e\u0438\u043c\u0438 \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044f\u043c\u0438: \u0442\u043e\u0447\u043a\u0430 \u0434\u043b\u044f IP \u0438 \u0434\u0432\u043e\u0435\u0442\u043e\u0447\u0438\u0435 \u0434\u043b\u044f MAC.<\/p>\n<p><strong>\u041f\u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0437\u0430\u0434\u0430\u0447\u0438<\/strong><\/p>\n<p>\u0414\u0430\u043d\u0430 \u0441\u0442\u0440\u043e\u043a\u0430, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 <strong>&#171;aaa,bbbb,cccc,,eeeee,fffff&#187;<\/strong>. \u0422\u0430\u043a\u0436\u0435 \u0434\u0430\u043d \u0438\u043d\u0434\u0435\u043a\u0441 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0432 \u0432\u0438\u0434\u0435 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0446\u0435\u043b\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0447\u0438\u0441\u043b\u043e <strong>\u0434\u0432\u0430<\/strong>. \u0412\u0435\u0440\u043d\u0443\u0442\u044c \u043f\u043e\u0434\u0441\u0442\u0440\u043e\u043a\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0438\u043d\u0434\u0435\u043a\u0441\u0443. \u041e\u0442\u0441\u0447\u0435\u0442 \u043d\u0430\u0447\u0438\u0442\u0430\u0442\u044c \u043e\u0442 \u043d\u0443\u043b\u044f. \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u044d\u0442\u043e <strong>&#171;\u0441\u0441\u0441\u0441&#187;<\/strong>. <\/p>\n<p>\u0412\u043e\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445 \u0441\u043b\u0443\u0447\u0430\u0435\u0432. \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044f \u0441\u043b\u0443\u0436\u0438\u0442 \u0437\u0430\u043f\u044f\u0442\u0430\u044f.<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td data-colwidth=\"62\" width=\"62\">\n<p align=\"center\"><strong># \u0442\u0435\u0441\u0442\u0430<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"216\" width=\"216\">\n<p align=\"center\"><strong>\u0421\u0442\u0440\u043e\u043a\u0430<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"82\" width=\"82\">\n<p align=\"center\"><strong>\u0438\u043d\u0434\u0435\u043a\u0441<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"99\" width=\"99\">\n<p align=\"center\"><strong>\u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"center\"><strong>\u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044c<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"center\"><strong>\u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"62\" width=\"62\">\n<p align=\"center\">1<\/p>\n<\/td>\n<td data-colwidth=\"216\" width=\"216\">\n<p align=\"center\">&#171;aaa,bbbb,cccc,,eeeee,fffff&#187;<\/p>\n<\/td>\n<td data-colwidth=\"82\" width=\"82\">\n<p align=\"center\">5<\/p>\n<\/td>\n<td data-colwidth=\"99\" width=\"99\">\n<p align=\"center\">&#171;fffff&#187;<\/p>\n<\/td>\n<td>\n<p align=\"center\">&#8216;,&#8217;<\/p>\n<\/td>\n<td>\n<p align=\"center\">6<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"62\" width=\"62\">\n<p align=\"center\">2<\/p>\n<\/td>\n<td data-colwidth=\"216\" width=\"216\">\n<p align=\"center\">&#171;aaa,bbbb,cccc,,eeeee,fffff&#187;<\/p>\n<\/td>\n<td data-colwidth=\"82\" width=\"82\">\n<p align=\"center\">0<\/p>\n<\/td>\n<td data-colwidth=\"99\" width=\"99\">\n<p align=\"center\">&#171;aaa&#187;<\/p>\n<\/td>\n<td>\n<p align=\"center\">&#8216;,&#8217;<\/p>\n<\/td>\n<td>\n<p align=\"center\">6<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"62\" width=\"62\">\n<p align=\"center\">3<\/p>\n<\/td>\n<td data-colwidth=\"216\" width=\"216\">\n<p align=\"center\">&#171;aaa,bbbb,cccc,,eeeee,fffff&#187;<\/p>\n<\/td>\n<td data-colwidth=\"82\" width=\"82\">\n<p align=\"center\">1<\/p>\n<\/td>\n<td data-colwidth=\"99\" width=\"99\">\n<p align=\"center\">&#171;bbbb&#187;<\/p>\n<\/td>\n<td>\n<p align=\"center\">&#8216;,&#8217;<\/p>\n<\/td>\n<td>\n<p align=\"center\">6<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"62\" width=\"62\">\n<p align=\"center\">8<\/p>\n<\/td>\n<td data-colwidth=\"216\" width=\"216\">\n<p align=\"center\">&#171;asd ghh dff&#187;<\/p>\n<\/td>\n<td data-colwidth=\"82\" width=\"82\">\n<p align=\"center\">1<\/p>\n<\/td>\n<td data-colwidth=\"99\" width=\"99\">\n<p align=\"center\">&#171;ghh &#171;<\/p>\n<\/td>\n<td>\n<p align=\"center\">&#8216; &#8216;<\/p>\n<\/td>\n<td>\n<p align=\"center\">3<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"62\" width=\"62\">\n<p align=\"center\">4<\/p>\n<\/td>\n<td data-colwidth=\"216\" width=\"216\">\n<p align=\"center\">&#171;aaa,bbbb,cccc,,eeeee,fffff&#187;<\/p>\n<\/td>\n<td data-colwidth=\"82\" width=\"82\">\n<p align=\"center\">3<\/p>\n<\/td>\n<td data-colwidth=\"99\" width=\"99\">\n<p align=\"center\">&#171;&#187;<\/p>\n<\/td>\n<td>\n<p align=\"center\">&#8216;,&#8217;<\/p>\n<\/td>\n<td>\n<p align=\"center\">6<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"62\" width=\"62\">\n<p align=\"center\">8<\/p>\n<\/td>\n<td data-colwidth=\"216\" width=\"216\">\n<p align=\"center\">file.bin<\/p>\n<\/td>\n<td data-colwidth=\"82\" width=\"82\">\n<p align=\"center\">0<\/p>\n<\/td>\n<td data-colwidth=\"99\" width=\"99\">\n<p align=\"center\">&#171;file&#187;<\/p>\n<\/td>\n<td>\n<p align=\"center\">&#8216;.&#8217;<\/p>\n<\/td>\n<td>\n<p align=\"center\">2<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"62\" width=\"62\">\n<p align=\"center\">5<\/p>\n<\/td>\n<td data-colwidth=\"216\" width=\"216\">\n<p align=\"center\">&#171;,&#187;<\/p>\n<\/td>\n<td data-colwidth=\"82\" width=\"82\">\n<p align=\"center\">0<\/p>\n<\/td>\n<td data-colwidth=\"99\" width=\"99\">\n<p align=\"center\">&#171;&#187;<\/p>\n<\/td>\n<td>\n<p align=\"center\">&#8216;,&#8217;<\/p>\n<\/td>\n<td>\n<p align=\"center\">2<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"62\" width=\"62\">\n<p align=\"center\">7<\/p>\n<\/td>\n<td data-colwidth=\"216\" width=\"216\">\n<p align=\"center\">&#171;192.168.3.36&#187;<\/p>\n<\/td>\n<td data-colwidth=\"82\" width=\"82\">\n<p align=\"center\">0<\/p>\n<\/td>\n<td data-colwidth=\"99\" width=\"99\">\n<p align=\"center\">&#171;192&#187;<\/p>\n<\/td>\n<td>\n<p align=\"center\">&#8216;.&#8217;<\/p>\n<\/td>\n<td>\n<p align=\"center\">4<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"62\" width=\"62\">\n<p align=\"center\">6<\/p>\n<\/td>\n<td data-colwidth=\"216\" width=\"216\">\n<p align=\"center\">&#171;aaa,bbb,ccc,,eee,fff&#187;<\/p>\n<\/td>\n<td data-colwidth=\"82\" width=\"82\">\n<p align=\"center\">6<\/p>\n<\/td>\n<td data-colwidth=\"99\" width=\"99\">\n<p align=\"center\">Error<\/p>\n<\/td>\n<td>\n<p align=\"center\">&#8216;,&#8217;<\/p>\n<\/td>\n<td>\n<p align=\"center\">6<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u041f\u0440\u0438 \u044d\u0442\u043e\u043c API \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u0430\u043a\u043e\u0439<\/p>\n<pre><code class=\"cpp\">bool csv_parse_text(const char* const text,                     char separator,                      uint32_t index,                      char* const sub_str,                     uint32_t sub_str_size);<\/code><\/pre>\n<p>\u0433\u0434\u0435 <\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td data-colwidth=\"111\" width=\"111\">\n<p align=\"left\"><strong># \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"122\" width=\"122\">\n<p align=\"left\"><strong>\u0438\u043c\u044f<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"120\" width=\"120\">\n<p align=\"left\"><strong>\u0442\u0438\u043f \u0434\u0430\u043d\u043d\u044b\u0445<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>\u041f\u043e\u044f\u0441\u043d\u0435\u043d\u0438\u0435<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"111\" width=\"111\">\n<p align=\"left\">1<\/p>\n<\/td>\n<td data-colwidth=\"122\" width=\"122\">\n<p align=\"left\">text<\/p>\n<\/td>\n<td data-colwidth=\"120\" width=\"120\">\n<p align=\"left\">char*<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0412\u0445\u043e\u0434\u043d\u0430\u044f CSV \u0441\u0442\u0440\u043e\u043a\u0430<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"111\" width=\"111\">\n<p align=\"left\">2<\/p>\n<\/td>\n<td data-colwidth=\"122\" width=\"122\">\n<p align=\"left\">separator<\/p>\n<\/td>\n<td data-colwidth=\"120\" width=\"120\">\n<p align=\"left\">char<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0441\u0438\u043c\u0432\u043e\u043b \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044f<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"111\" width=\"111\">\n<p align=\"left\">3<\/p>\n<\/td>\n<td data-colwidth=\"122\" width=\"122\">\n<p align=\"left\">index<\/p>\n<\/td>\n<td data-colwidth=\"120\" width=\"120\">\n<p align=\"left\">uint32_t<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0438\u043d\u0434\u0435\u043a\u0441 \u043a\u043e\u043b\u043e\u043d\u043a\u0438 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043d\u0430\u0434\u043e \u0438\u0437\u0432\u043b\u0435\u0447\u044c<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"111\" width=\"111\">\n<p align=\"left\">4<\/p>\n<\/td>\n<td data-colwidth=\"122\" width=\"122\">\n<p align=\"left\">sub_str<\/p>\n<\/td>\n<td data-colwidth=\"120\" width=\"120\">\n<p align=\"left\">char*<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u043d\u0430\u044f \u043f\u043e\u0434\u0441\u0442\u0440\u043e\u043a\u0430<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"111\" width=\"111\">\n<p align=\"left\">5<\/p>\n<\/td>\n<td data-colwidth=\"122\" width=\"122\">\n<p align=\"left\">sub_str_size<\/p>\n<\/td>\n<td data-colwidth=\"120\" width=\"120\">\n<p align=\"left\">uint32_t<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0440\u0430\u0437\u043c\u0435\u0440 \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043c\u0430\u0441\u0441\u0438\u0432\u0430<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"111\" width=\"111\">\n<p align=\"left\">&#8212;<\/p>\n<\/td>\n<td data-colwidth=\"122\" width=\"122\">\n<p align=\"left\">error<\/p>\n<\/td>\n<td data-colwidth=\"120\" width=\"120\">\n<p align=\"left\">bool<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u043a\u0430\u043a\u043e\u0439-\u043b\u0438\u0431\u043e \u043e\u0448\u0438\u0431\u043a\u0438 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0432\u044b\u0445\u043e\u0434 \u0437\u0430 \u043f\u0440\u0435\u0434\u0435\u043b\u044b \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u0439 \u0434\u043b\u044f sub_str \u043f\u0430\u043c\u044f\u0442\u0438 \u0438\u043b\u0438 \u043d\u0435\u0432\u0435\u0440\u043d\u043e\u043c \u0438\u043d\u0434\u0435\u043a\u0441\u0435) \u0432\u0435\u0440\u043d\u0443\u0442\u044c false.<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044f <strong>csv_parse_text()<\/strong> \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u0430 \u043c\u0435\u043d\u044f\u0442\u044c \u0438\u0441\u0445\u043e\u0434\u043d\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 text. \u0421\u0442\u0440\u043e\u043a\u0430 text \u0432\u043e\u043e\u0431\u0449\u0435 \u043c\u043e\u0436\u0435\u0442 \u043b\u0435\u0436\u0430\u0442\u044c \u0432 NOR-Flash \u043f\u0430\u043c\u044f\u0442\u0438. <\/p>\n<p>\u042d\u0442\u043e\u0442 \u043a\u043e\u0434 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u043d \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043d\u0430 \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0435. \u0422\u043e \u0435\u0441\u0442\u044c \u043d\u0438\u043a\u0430\u043a\u043e\u0433\u043e \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043f\u0430\u043c\u044f\u0442\u0438 \u0430 \u044f\u0437\u044b\u043a \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0421\u0438. \u0418 \u043a\u0440\u0430\u0439\u043d\u0435 \u0436\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043e\u0434 \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043e\u043c ISO26262-6. \u0412\u043e\u0442, \u043f\u043e\u0436\u0430\u043b\u0443\u0439, \u0438 \u0432\u0441\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u043a \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u043c\u0443 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0443 CSV decoder(\u0430).<\/p>\n<p>\u0414\u043b\u044f \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430 \u0442\u0443\u0442 \u0432\u0441\u0451 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e. \u041e\u0434\u043d\u0430\u043a\u043e \u043a\u0430\u043a \u0437\u0430\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043d\u0443\u044e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u0432\u044b\u0434\u0435\u043b\u044f\u0442\u044c \u043f\u043e\u0434\u0441\u0442\u0440\u043e\u043a\u0438 \u0438\u0437 CSV \u0441\u0442\u0440\u043e\u0447\u0435\u043a?<\/p>\n<p><strong>\u041a\u0430\u043a \u0436\u0435 \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0442\u044c \u0442\u0435\u043a\u0441\u0442 \u0438\u0437 CSV \u0441\u0442\u0440\u043e\u0447\u0435\u043a?<\/strong><\/p>\n<p>\u041c\u043e\u0436\u043d\u043e \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e \u0421SV \u044d\u0442\u043e \u0441\u0432\u043e\u0435\u043e\u0431\u0440\u0430\u0437\u043d\u044b\u0439 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b \u0434\u043b\u044f \u0443\u043f\u0430\u043a\u043e\u0432\u043a\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0432 \u043f\u0430\u043a\u0435\u0442. \u041a\u0430\u043a \u044d\u0442\u043e \u043e\u0431\u044b\u0447\u043d\u043e \u0438 \u0431\u044b\u0432\u0430\u0435\u0442 \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0432\u0441\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u0440\u0435\u0448\u0430\u044e\u0442\u0441\u044f \u0437\u043e\u043b\u043e\u0442\u044b\u043c \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u043c: \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u043c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u043e\u043c. \u041d\u0430\u0434\u043e \u0441\u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0439 \u0430\u0432\u0442\u043e\u043c\u0430\u0442.<\/p>\n<p><strong>\u0424\u0430\u0437\u0430 1. \u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0432\u0445\u043e\u0434\u044b \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0433\u043e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0430<\/strong><\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td data-colwidth=\"114\" width=\"114\">\n<p align=\"left\"><strong>\u2116 \u0432\u0445\u043e\u0434\u0430<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"172\" width=\"172\">\n<p align=\"left\"><strong>\u041f\u043e\u044f\u0441\u043d\u0435\u043d\u0438\u0435<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>\u0422\u043e\u043a\u0435\u043d<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"114\" width=\"114\">\n<p align=\"left\">1<\/p>\n<\/td>\n<td data-colwidth=\"172\" width=\"172\">\n<p align=\"left\">\u0421\u0438\u043c\u0432\u043e\u043b<\/p>\n<\/td>\n<td>\n<p align=\"left\">NOT_SEP<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"114\" width=\"114\">\n<p align=\"left\">2<\/p>\n<\/td>\n<td data-colwidth=\"172\" width=\"172\">\n<p align=\"left\">\u0420\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044c<\/p>\n<\/td>\n<td>\n<p align=\"left\">Sep<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"114\" width=\"114\">\n<p align=\"left\">3<\/p>\n<\/td>\n<td data-colwidth=\"172\" width=\"172\">\n<p align=\"left\">\u041a\u043e\u043d\u0435\u0446 \u0441\u0442\u0440\u043e\u043a\u0438<\/p>\n<\/td>\n<td>\n<p align=\"left\">End<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p><strong>\u0424\u0430\u0437\u0430 2. \u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0433\u043e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0430.<\/strong><\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td data-colwidth=\"131\" width=\"131\">\n<p align=\"left\"><strong>\u2116 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>\u041f\u043e\u044f\u0441\u043d\u0435\u043d\u0438\u0435<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>\u0422\u043e\u043a\u0435\u043d<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"131\" width=\"131\">\n<p align=\"left\">1<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041a\u043e\u043d\u0435\u0447\u043d\u044b\u0439 \u0430\u0432\u0442\u043e\u043c\u0430\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e\u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d<\/p>\n<\/td>\n<td>\n<p align=\"left\">INIT<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"131\" width=\"131\">\n<p align=\"left\">2<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041d\u0430\u043a\u0430\u043f\u043b\u0438\u0432\u0430\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u044f\u0447\u0435\u0439\u043a\u0443<\/p>\n<\/td>\n<td>\n<p align=\"left\">ACCUMULATE<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"131\" width=\"131\">\n<p align=\"left\">3<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044c<\/p>\n<\/td>\n<td>\n<p align=\"left\">SEP<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"131\" width=\"131\">\n<p align=\"left\">4<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0420\u0430\u0431\u043e\u0442\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0430<\/p>\n<\/td>\n<td>\n<p align=\"left\">END<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p><strong>\u0424\u0430\u0437\u0430 3. \u041d\u0430\u0440\u0438\u0441\u043e\u0432\u0430\u0442\u044c \u0433\u0440\u0430\u0444 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u043e\u0432 \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f\u043c\u0438<\/strong><\/p>\n<p>\u0412\u0437\u0430\u0438\u043c\u043e\u0441\u0432\u044f\u0437\u044c \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f\u043c\u0438 \u0438 \u0432\u0445\u043e\u0434\u043d\u044b\u043c\u0438 \u0432\u043e\u0437\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f\u043c\u0438 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0433\u0440\u0430\u0444 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0433\u043e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0430. \u042d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043f\u043b\u0430\u043d\u0430\u0440\u043d\u044b\u0439 \u0433\u0440\u0430\u0444.<\/p>\n<figure class=\"\"><\/figure>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0432\u0441\u0451 \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u0447\u0430\u0442\u044c \u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043e\u0434.<\/p>\n<p><strong>\u0424\u0430\u0437\u0430 4. \u041d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u044b\u0439 \u043a\u043e\u0434 \u0434\u043b\u044f \u043f\u0430\u0440\u0441\u0435\u0440\u0430 CSV \u0441\u0442\u0440\u043e\u0447\u0435\u043a<\/strong><\/p>\n<p>\u0423 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u0435\u0441\u0442\u044c \u0441\u0432\u043e\u0438 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b. \u0412\u043e\u0442 \u043e\u043d\u0438 \u0434\u043b\u044f \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 CSV.<\/p>\n<pre><code class=\"cpp\">#ifndef CSV_CONST_H #define CSV_CONST_H   #ifndef HAS_CSV #error \"+HAS_CSV\" #endif  typedef enum {     CSV_STATE_INIT = 1,     CSV_STATE_ACCUMULATE = 2,     CSV_STATE_SEP = 3,     CSV_STATE_END = 4,      CSV_STATE_UNDEF = 0, } CsvState_t;  typedef enum {     CSV_INPUT_NOT_SEP = 1,     CSV_INPUT_SEP = 2,     CSV_INPUT_END = 3,      CSV_INPUT_UNDEF = 0, } CsvInput_t;  #endif \/*CSV_CONST_H*\/ <\/code><\/pre>\n<p>\u0423 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u0435\u0441\u0442\u044c \u0441\u0432\u043e\u0438 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0442\u0438\u043f\u044b \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<pre><code class=\"cpp\">#ifndef CSV_TYPEES_H #define CSV_TYPEES_H  #ifdef __cplusplus extern \"C\" { #endif  #include &lt;stdbool.h> #include &lt;stdint.h>  #ifndef HAS_CSV #error \"+HAS_CSV\" #endif  #include \"csv_const.h\"  typedef struct {     char* out_buff; \/*result array*\/     char prev_char;     char separator;     bool init_done;     bool fetch_done;     char symbol;     uint32_t out_size;     uint32_t i;\/*char index*\/     int32_t fetch_index; \/*starts from 0; -1 if fetch is not needed*\/     uint32_t cnt; \/*total number of cells*\/     uint32_t position; \/*starts from 0*\/     CsvState_t state;     CsvInput_t input; } CsvFsm_t;  #ifdef __cplusplus } #endif  #endif \/* CSV_TYPEES_H *\/ <\/code><\/pre>\n<p>\u0410 \u044d\u0442\u043e API \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 CSV. \u0422\u0443\u0442 \u043e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u044d\u0442\u043e <strong>csv_parse_text()<\/strong><\/p>\n<pre><code class=\"cpp\">#ifndef CSV_H #define CSV_H  #ifdef __cplusplus extern \"C\" { #endif  #include &lt;stdbool.h> #include &lt;stdint.h>  #include \"csv_types.h\"  uint32_t csv_cnt(const char* const text,                  char separator); bool csv_parse_text(const char* const in_text,                      char separator,                      uint32_t index,                      char* const text,                     uint32_t size);    #ifdef __cplusplus } #endif  #endif \/* CSV_H *\/ <\/code><\/pre>\n<p>\u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0433\u043e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0430 \u0440\u0430\u0437\u0431\u043e\u0440\u0430 CSV<\/p>\n<pre><code class=\"cpp\"> static bool csv_init(CsvFsm_t* Node, char separator, int32_t fetch_index, char* const out_text, uint32_t size) {     bool res = false;     LOG_DEBUG(CSV, \"Init: Separator:%c\", separator);     if(Node) {         Node->separator = separator;         Node->init_done = true;         Node->fetch_done = false;         Node->prev_char = 0x00;         Node->state = CSV_STATE_INIT;         Node->input = CSV_INPUT_UNDEF;         Node->cnt = 0;         Node->position = 0;         Node->i = 0;         Node->out_buff = out_text;         Node->out_size = size;         Node->fetch_index = fetch_index;         LOG_DEBUG(CSV, \"ValMaxSize:%u byte FetchIndex: %d\",size, fetch_index);          res = true;     }     return res; }   uint32_t csv_cnt(const char* const text, char separator) {     bool res = false;     size_t len = strlen(text);     LOG_DEBUG(CSV, \"Text:[%s] Size:%u byte Separator:%c\", text, len, separator);      CsvFsm_t Node;     csv_init(&amp;Node, separator, -1, NULL, 0);     uint32_t i = 0;     for(i = 0; i &lt; len; i++) {         Node.input = CSV_INPUT_UNDEF;         res = csv_cnt_proc(&amp;Node, text[i]);     }     Node.input = CSV_INPUT_END;     res = csv_cnt_proc(&amp;Node, 0x00);      return Node.cnt; }  <\/code><\/pre>\n<p>\u0412\u0441\u044e \u0440\u0430\u0431\u043e\u0442\u0443 \u0434\u0435\u043b\u0430\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u044f <strong>csv_parse_text()<\/strong><\/p>\n<pre><code class=\"cpp\">bool csv_parse_text(const char* const in_text, char separator, uint32_t index,         char* const out_text, uint32_t size) {     bool res = false;     if(in_text &amp;&amp; out_text) {         size_t len = strlen(in_text);         LOG_DEBUG(CSV, \"InText:[%s] Size:%u Sep:%c Index:%u\", in_text, len, separator, index);          CsvFsm_t Item={0};         csv_init(&amp;Item, separator, index, out_text, size);         uint32_t i = 0;         for(i = 0; i &lt; len; i++) {             Item.input = CSV_INPUT_UNDEF;             res = csv_cnt_proc(&amp;Item, in_text[i]);         }         Item.input = CSV_INPUT_END;         res = csv_cnt_proc(&amp;Item, 0x00);          res = false;         if(Item.fetch_done ) {             if(0==Item.error_cnt){                 res = true;             }         }      }     return res; } <\/code><\/pre>\n<p>\u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0441\u0430\u043c\u0438 \u0448\u0435\u0441\u0442\u0435\u0440\u043d\u0438 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0433\u043e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0430  \u043f\u0440\u043e\u043a\u0440\u0443\u0447\u0438\u0432\u0430\u0435\u0442  \u0444\u0443\u043d\u043a\u0446\u0438\u044f <strong>csv_cnt_proc()<\/strong><\/p>\n<pre><code class=\"cpp\">static CsvInput_t csv_symbol_2_input(CsvFsm_t* CsvFsm,                                      char symbol) {     if(symbol == CsvFsm->separator) {         CsvFsm->input = CSV_INPUT_SEP;     } else {         CsvFsm->input = CSV_INPUT_NOT_SEP;     }     return CsvFsm->input; }  static bool csv_add_letter(CsvFsm_t* const Node, uint32_t index, char letter, bool last_char){     bool res = true;     if(Node->position==Node->fetch_index){         \/\/Node->i = index;         if(index&lt;Node->out_size){             Node->out_buff[index] = letter ;\/\/Node->symbol;             res = true;             if(last_char){                 Node->fetch_done = last_char;                 LOG_PROTECTED(CSV, \"CSV[%u]=[%s]\",Node->position, Node->out_buff);             }         }else{             Node->error_cnt++;             res = false;         }     }     return res; }   static bool csv_cnt_proc(CsvFsm_t* Node, char symbol) {     bool res = false;     if(Node) {         Node->symbol = symbol;         if(CSV_INPUT_UNDEF == Node->input) {             csv_symbol_2_input(Node, symbol);         }          CsvNodeDiag(Node);          switch(Node->state) {         case CSV_STATE_INIT:             res = csv_cnt_init_proc(Node);             break;          case CSV_STATE_ACCUMULATE:             res = csv_cnt_acc_proc(Node);             break;          case <\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-356535","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/356535","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=356535"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/356535\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=356535"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=356535"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=356535"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}