summaryrefslogtreecommitdiffstats
path: root/PICA_msgproc.h
diff options
context:
space:
mode:
authorAnton <anton@picapica>2018-07-20 02:17:54 +0400
committerAnton <anton@picapica>2018-07-20 02:17:54 +0400
commitfd9f68b50ef480f84bda3910e6e2a064eeaaee51 (patch)
tree359a34cd150eb332ffab2c8eb597231330d4f956 /PICA_msgproc.h
parent5ddb7da72261dc916128f5a3f5865d1cdb16a0f1 (diff)
downloadpica-pica-fd9f68b50ef480f84bda3910e6e2a064eeaaee51.tar.gz
pica-pica-fd9f68b50ef480f84bda3910e6e2a064eeaaee51.zip
comments
Diffstat (limited to 'PICA_msgproc.h')
-rw-r--r--PICA_msgproc.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/PICA_msgproc.h b/PICA_msgproc.h
index 4382d2a..551d3de 100644
--- a/PICA_msgproc.h
+++ b/PICA_msgproc.h
@@ -15,8 +15,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
-// структуры и функции для обработки сообщений протокола
-//
+
#ifndef PICA_MSGPROC_H
#define PICA_MSGPROC_H
@@ -28,9 +27,12 @@
struct PICA_msginfo
{
unsigned int msgid;
- unsigned int fixedsz;//фиксированный или переменный размер
- unsigned int sz;//фиксированный размер всего пакета либо кол-во байт, определяющих размер хвостовой части пакета
- unsigned int (*msgprocfn)(unsigned char*, unsigned int, void*); //функция-обработчик данного типа сообщений
+ /* PICA_MSG_FIXED_SIZE if message has fixed size, PICA_MSG_VAR_SIZE in case of variable size */
+ unsigned int fixedsz;
+ /* Size of the whole message in case of fixed-size message or number of octets that store size of the message */
+ unsigned int sz;
+ /* Pointer to message handler */
+ unsigned int (*msgprocfn)(unsigned char*, unsigned int, void*);
};
unsigned int PICA_msggetsize(unsigned char *buf, unsigned int nb, struct PICA_msginfo *msgs, unsigned int nmsg);