From 8bb0c01942ba70515c9f2e89ef6547660d7d7d00 Mon Sep 17 00:00:00 2001 From: Ake Hedman Date: Fri, 1 Nov 2024 12:24:02 +0100 Subject: [PATCH] Added new level II classes --- database | Bin 1503232 -> 1507328 bytes .../database/vscp-hashtypeevents.sqlite3 | Bin 1503232 -> 1507328 bytes src/vscp/common/mdf.cpp | 6 +++--- src/vscp/common/vscp-class.h | 2 +- src/vscp/common/vscp-hashclass.h | 2 +- src/vscp/common/vscp-hashtype.h | 4 +++- src/vscp/common/vscp-type.h | 4 +++- src/vscp/common/vscphelper.cpp | 2 +- 8 files changed, 12 insertions(+), 8 deletions(-) diff --git a/database b/database index 558121b779228e5e4c3a4c8c6cbcc010f570125c..87b0bc90b5414d2038c2d21e2a6b2a6e16663155 100644 GIT binary patch delta 3790 zcmc&$eNa@_73aPO58f_3d{;qHBhOD%5J6BxMMT`-f(QtL2q??$!mi*hSyqs!fxC#G z@jVg~k7mYGUfz(N1ULbn<2LM^iI)qOGQBlhmI3o-yXHPXFk1 zhV$Fych0%@+;h)4cZaXH3=g-CO-m?=izB^HX{Ds(C+$BhO>)TB;*eQ*F?kIY1o_%U zwf6PIN67-C71{YlHDZ>r6mgz04RNlaAkNYI5ohb$5NGL|5ohWRh?>3;F;nMWGxW-f znU&YmQa($-4V2WE_%{5dSG2U4giKlq-t%*C8(3KN+!LqziG$NDg9t zY#(A?tPF8+j3VZ;M#M!d3o)k~A$yg;S4h3XacSxuJi$k)Pu0rlq%ctw1i}d85#%ek zxk2y6)a)g$^CKbep7hEZ1h*SueK|tKDuhRuA-M7p*3CyKpNFt^ zCPLYCgf&wTN+-vq#F5o1el6i!uNt{$9K2@`6ahsY8P>iCg^Ju<7A=ca5=nbs+ZyCraJR`Yt8x3 zYhfI<>uZXq-}({DNbObWDumu{y-$18I6CKTzAz`fR@0><9aN zVyZULz0sb*)=+DxA%M~1pGWKWM1meXOt{lJNng|x@_8aYtq0@k(cEq=;_nLf zMg0-{;_=xDxp$kS3~3#^F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v3514B<_5m?XlbCb~!x;B+(Y|9Eh; z(4Uh{@TdiwVk0!Rq8JCCv|>}lLSGv_NjAX0+9)IIVWb_!bztwH({c=-!p&Ozz?kC9 zs5B^cY0(hZiLZ4nTmD zr({;#{KkI9u0?RMiX~csw9^PU^dF(dk*S4q)!6;U013GJ9o<@(q4EG5nIeT#Ttq>pa1 z74UwkOo}&`+4pBDO7zp*@O2-)!`(35Pv_)(K7xnk#hE$S3GJdo+XdGL@FnI!#vnaI zcEWE4>3Nb1^@r({j28!fc5h6KS+OafUX^pWR>jJr;c6#-;SyiRVL{7=tRb8z3my*P zMB90aoApGQWhHx+VY`;e#eC*kZHnrc;t{kA=sQZ!$?4q7^(IBY%Ml#&)?cJKF-qH} z|74g(6FJRr$8*BW%9$6^GjW}k3eQLAH93Wwc@z1o3{#JoRMrwf+X^2a!)?6I=AxgRSD2uc!t-hDl@j>i z9qg52o?`Thv8;eQQh~#&8MmZyRvPMPn4?3`iu81qpOuBY#Ldr2!%V=la$$ys5Ynly zJWHpD%x?xU-`nBqAnh=Go<5e_xRuLVWNwAP(F=5tw8D!E^kdQjzrIL+ zN1EZvEd4tk_-BEBN*ZB!j{ZgetPhoneObjCount())) { fout << "," << std::endl; fout << "\"telephone\": [" << std::endl; - int i = 0; + size_t i = 0; while (i < cnt) { CMDF_Item *pitem = pManufacturer->getPhoneObj(i); if (nullptr != pitem) { @@ -2571,7 +2571,7 @@ CMDF::save_json(const std::string &path) if ((cnt = pManufacturer->getFaxObjCount())) { fout << "," << std::endl; fout << "\"fax\": [" << std::endl; - int i = 0; + size_t i = 0; while (i < cnt) { CMDF_Item *pitem = pManufacturer->getFaxObj(i); if (nullptr != pitem) { @@ -2594,7 +2594,7 @@ CMDF::save_json(const std::string &path) if ((cnt = pManufacturer->getEmailObjCount())) { fout << "," << std::endl; fout << "\"email\": [" << std::endl; - int i = 0; + size_t i = 0; while (i < cnt) { CMDF_Item *pitem = pManufacturer->getEmailObj(i); if (nullptr != pitem) { diff --git a/src/vscp/common/vscp-class.h b/src/vscp/common/vscp-class.h index f64cce113..755bd76fb 100644 --- a/src/vscp/common/vscp-class.h +++ b/src/vscp/common/vscp-class.h @@ -47,7 +47,7 @@ !!!!!!!!!!!!!!!!!!!! W A R N I N G !!!!!!!!!!!!!!!!!!!! This file is auto-generated see https://github.com/grodansparadis/vscp-classes - Generated: 2024-08-23 16:27:25.870870 + Generated: 2024-11-01 12:00:41.110852 */ #ifndef VSCP_CLASS_H diff --git a/src/vscp/common/vscp-hashclass.h b/src/vscp/common/vscp-hashclass.h index d82c6921a..088767853 100644 --- a/src/vscp/common/vscp-hashclass.h +++ b/src/vscp/common/vscp-hashclass.h @@ -2,7 +2,7 @@ !!!!!!!!!!!!!!!!!!!! W A R N I N G !!!!!!!!!!!!!!!!!!!! This file is auto-generated see https://github.com/grodansparadis/vscp-classes - Generated: 2024-08-23 16:27:26.833436 + Generated: 2024-11-01 12:00:42.106112 */ m_hashClass[ 0 ] = _("CLASS1_PROTOCOL"); diff --git a/src/vscp/common/vscp-hashtype.h b/src/vscp/common/vscp-hashtype.h index d651a13f8..abc3340dc 100644 --- a/src/vscp/common/vscp-hashtype.h +++ b/src/vscp/common/vscp-hashtype.h @@ -2,7 +2,7 @@ !!!!!!!!!!!!!!!!!!!! W A R N I N G !!!!!!!!!!!!!!!!!!!! This file is auto-generated see https://github.com/grodansparadis/vscp-classes - Generated: 2024-08-23 16:27:27.315130 + Generated: 2024-11-01 12:00:42.593785 */ @@ -2120,6 +2120,8 @@ m_hashType[ MAKE_CLASSTYPE_LONG(1024,34) ] = _("VSCP2_TYPE_PROTOCOL_GET_MATRIX_INFO_RESPONSE"); m_hashType[ MAKE_CLASSTYPE_LONG(1024,36) ] = _("VSCP2_TYPE_PROTOCOL_GET_EMBEDDED_MDF_RESPONSE"); m_hashType[ MAKE_CLASSTYPE_LONG(1024,41) ] = _("VSCP2_TYPE_PROTOCOL_GET_EVENT_INTEREST_RESPONSE"); + m_hashType[ MAKE_CLASSTYPE_LONG(1024,43) ] = _("VSCP2_TYPE_PROTOCOL_READ_REGISTER_DIRECT"); + m_hashType[ MAKE_CLASSTYPE_LONG(1024,44) ] = _("VSCP2_TYPE_PROTOCOL_READ_REGISTER_DIRECT"); // CLASS2.CONTROL = 1025 - Level II Control m_hashType[ MAKE_CLASSTYPE_LONG(1025,0) ] = _("VSCP2_TYPE_CONTROL_GENERAL"); diff --git a/src/vscp/common/vscp-type.h b/src/vscp/common/vscp-type.h index 45d408e19..a24f6e15a 100644 --- a/src/vscp/common/vscp-type.h +++ b/src/vscp/common/vscp-type.h @@ -48,7 +48,7 @@ !!!!!!!!!!!!!!!!!!!! W A R N I N G !!!!!!!!!!!!!!!!!!!! This file is auto-generated see https://github.com/grodansparadis/vscp-classes - Generated: 2024-08-23 16:27:26.321269 + Generated: 2024-11-01 12:00:41.598489 */ #ifndef VSCP_TYPE_H @@ -919,6 +919,8 @@ #define VSCP2_TYPE_PROTOCOL_GET_MATRIX_INFO_RESPONSE 34 /* Level II get DM info response */ #define VSCP2_TYPE_PROTOCOL_GET_EMBEDDED_MDF_RESPONSE 36 /* Level II get embedded MDF response */ #define VSCP2_TYPE_PROTOCOL_GET_EVENT_INTEREST_RESPONSE 41 /* Level II events of interest response */ +#define VSCP2_TYPE_PROTOCOL_READ_REGISTER_DIRECT 43 /* Read a Level II register from the 32-bit register space direct */ +#define VSCP2_TYPE_PROTOCOL_READ_REGISTER_DIRECT 44 /* Write a Level II register to the 32-bit register space direct */ /* CLASS2.CONTROL = 1025 - Level II Control */ #define VSCP2_TYPE_CONTROL_GENERAL 0 /* General event */ diff --git a/src/vscp/common/vscphelper.cpp b/src/vscp/common/vscphelper.cpp index 639edfa5e..7a820db91 100644 --- a/src/vscp/common/vscphelper.cpp +++ b/src/vscp/common/vscphelper.cpp @@ -7324,7 +7324,7 @@ readHexChar(char input) size_t vscp_hexStr2ByteArray(uint8_t *array, size_t size, const char *hexstr) { - int cnt = 0; + size_t cnt = 0; const char *phex = hexstr; while (*(phex + 2 * cnt) && *(phex + 2 * cnt + 1) && (cnt < size)) {