From 4c56ede49b6ffe8e62d874647cf06b2e48107a2d Mon Sep 17 00:00:00 2001 From: Pankaj Garg Date: Fri, 29 Jan 2021 11:56:18 -0800 Subject: [PATCH 01/24] Clear PASESession state before initializing it (#4567) --- src/transport/PASESession.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/transport/PASESession.cpp b/src/transport/PASESession.cpp index fed0664eea8e42..133bd4384f05b3 100644 --- a/src/transport/PASESession.cpp +++ b/src/transport/PASESession.cpp @@ -175,6 +175,9 @@ CHIP_ERROR PASESession::Init(Optional myNodeId, uint16_t myKeyId, uint32 VerifyOrExit(delegate != nullptr, err = CHIP_ERROR_INVALID_ARGUMENT); + // Reset any state maintained by PASESession object (in case it's being reused for pairing) + Clear(); + err = mCommissioningHash.Begin(); SuccessOrExit(err); From a83086a0d018047c6063f225ef60513cfef81cb0 Mon Sep 17 00:00:00 2001 From: Pankaj Garg Date: Fri, 29 Jan 2021 18:28:47 -0800 Subject: [PATCH 02/24] Fix sporadic CI failure in crypto test for nrf platform (#4582) * Fix sporadic CI failure in crypto test for nrf platform --- src/crypto/CHIPCryptoPAL.h | 1 + src/transport/PASESession.cpp | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/crypto/CHIPCryptoPAL.h b/src/crypto/CHIPCryptoPAL.h index 4d36017fab44eb..e50c2951d6c49f 100644 --- a/src/crypto/CHIPCryptoPAL.h +++ b/src/crypto/CHIPCryptoPAL.h @@ -461,6 +461,7 @@ class Spake2p * @param context The spake2p session will bootstrap from this hash context. * If the provided context pointer is null, the spake2p session will bootstrap * from a blank hash context. + * Note: calling this function will nullptr doesn't free the object state. * * @return Returns a CHIP_ERROR on error, CHIP_NO_ERROR otherwise **/ diff --git a/src/transport/PASESession.cpp b/src/transport/PASESession.cpp index 133bd4384f05b3..7a397385b72c4d 100644 --- a/src/transport/PASESession.cpp +++ b/src/transport/PASESession.cpp @@ -65,8 +65,11 @@ void PASESession::Clear() memset(&mWS[0][0], 0, sizeof(mWS)); memset(&mKe[0], 0, sizeof(mKe)); mNextExpectedMsg = Protocols::SecureChannel::MsgType::PASE_Spake2pError; - mSpake2p.Init(nullptr); + + // Note: we don't need to explicitly clear the state of mSpake2p object. + // Clearing the following state takes care of it. mCommissioningHash.Clear(); + mIterationCount = 0; mSaltLength = 0; if (mSalt != nullptr) From 1073ccf6eb08193601e218121e6759378d7fa48b Mon Sep 17 00:00:00 2001 From: Kamil Kasperczyk <66371704+kkasperczyk-no@users.noreply.github.com> Date: Mon, 1 Feb 2021 17:35:59 +0100 Subject: [PATCH 03/24] [nrfconnect] Updated samples docs and user guides. (#4559) After some code changes documentation is out of date. * In samples docs added reference to the nrfconnect_android_commissioning.md * Updated nrfconnect_android_commissioning.md to the current CHIP Tool UI version. --- .../nrfconnect_android_commissioning.md | 132 +++++++++++++----- docs/images/CHIPTool_device_commissioned.JPG | Bin 0 -> 17436 bytes examples/lighting-app/nrfconnect/README.md | 9 ++ examples/lock-app/nrfconnect/README.md | 9 ++ 4 files changed, 115 insertions(+), 35 deletions(-) create mode 100644 docs/images/CHIPTool_device_commissioned.JPG diff --git a/docs/guides/nrfconnect_android_commissioning.md b/docs/guides/nrfconnect_android_commissioning.md index a19cd0d8864e31..4dbe00c95bcf26 100644 --- a/docs/guides/nrfconnect_android_commissioning.md +++ b/docs/guides/nrfconnect_android_commissioning.md @@ -7,6 +7,26 @@ commission a Nordic Semiconductor nRF52840 DK running onto a CHIP-enabled Thread network. The instructions are also valid for [nRF Connect Lighting Example Application](../../examples/lighting-app/nrfconnect/README.md). +
+ +- [Overview](#overview) +- [Requirements](#requirements) +- [Building and programming OpenThread RCP firmware](#building-rcp-firmware) +- [Configuring PC as Thread Border Router](#configuring-pc) + - [Forming Thread network](#forming-thread-network) + - [Configuring Wi-Fi hotspot](#configuring-hotspot) +- [Building and programming nRF Connect Lock Example Application](#building-example) +- [Building and installing Android CHIPTool](#building-chiptool) +- [Preparing accessory device](#preparing-accessory) +- [Commissioning accessory device](#commissioning-accessory) +- [Sending CHIP commands](#sending-chip-commands) + +
+ + + +## Overview + The commissioning process is composed of the following main stages: - CHIPTool discovers a CHIP accessory device over Bluetooth LE. @@ -51,6 +71,10 @@ applications: +--------------------+ ``` +
+ + + ## Requirements You need the following hardware and software to build a Thread Border Router: @@ -71,10 +95,14 @@ You need the following hardware and software to build a Thread Border Router: While this page references Ubuntu 20.04, all the procedures can be completed using other popular operating systems. -## Building and flashing OpenThread RCP firmware +
+ + + +## Building and programming OpenThread RCP firmware OpenThread RCP firmware is required to allow the PC to communicate with Thread -devices. Run the commands mentioned in the following steps to build and flash +devices. Run the commands mentioned in the following steps to build and program the RCP firmware onto an nRF52840 DK: 1. Download and install the @@ -105,32 +133,37 @@ the RCP firmware onto an nRF52840 DK: $ arm-none-eabi-objcopy -O ihex output/nrf52840/bin/ot-rcp output/nrf52840/bin/ot-rcp.hex -8. Flash the RCP firmware: +8. Program the RCP firmware: $ nrfjprog --chiperase --program output/nrf52840/bin/ot-rcp.hex --reset -9. Disable the Mass Storage feature on the device, so that it - [does not interfere](https://github.com/openthread/openthread/blob/master/examples/platforms/nrf528xx/nrf52840/README.md#mass-storage-device-known-issue) - with core RCP functionalities. +9. Disable the Mass Storage feature on the device: $ JLinkExe J-Link>MSDDisable Probe configured successfully. J-Link>exit - The setting remains valid even if you flash another firmware onto the - device. + This is required, so that the feature + [does not interfere](https://github.com/openthread/openthread/blob/master/examples/platforms/nrf528xx/nrf52840/README.md#mass-storage-device-known-issue) + with core RCP functionalities. The setting remains valid even if you program + another firmware onto the device. 10. Power-cycle the device to apply the changes. +
+ + + ## Configuring PC as Thread Border Router -To make your PC work as a Thread Border Router, you need to complete the -following tasks: +To make your PC work as a Thread Border Router, complete the following tasks: + +1. Form a Thread network using the OpenThread RCP device and configure IPv6 + packet routing to the network. +2. Configure a Wi-Fi hotspot using a spare Wi-Fi card on your PC. -- Form a Thread network using the OpenThread RCP device and configure IPv6 - packet routing to the network. -- Configure a Wi-Fi hotspot using a spare Wi-Fi card on your PC. + ### Forming Thread network @@ -141,16 +174,17 @@ To form a Thread network, complete the following steps: $ docker network create --ipv6 --subnet 2001:db8:1::/64 -o com.docker.network.bridge.name=otbr0 otbr -2. Start the OTBR container using the command below with _rcp-dk_ in the last - line replaced with the device node name of the nRF52840 DK that is running - the RCP firmware (for example, _/dev/ttyACM0_): +2. Start the OTBR container using the following command. In the last line, + provide the device node name of the nRF52840 kit that is running the RCP + firmware before `:/dev/radio` (in this case, the name is _/dev/ttyACM0_): $ docker run -it --rm --privileged --network otbr -p 8080:80 \ --sysctl "net.ipv6.conf.all.disable_ipv6=0 net.ipv4.conf.all.forwarding=1 net.ipv6.conf.all.forwarding=1" \ - --volume rcp-dk:/dev/ttyACM0 openthread/otbr --radio-url spinel+hdlc+uart:///dev/ttyACM0 + --volume /dev/ttyACM0:/dev/radio openthread/otbr --radio-url spinel+hdlc+uart:///dev/radio 3. Open the `http://localhost:8080/` address in a web browser. -4. Click **Form** on the left menu. The network forming creator window appears. +4. Click **Form** in the menu to the left. The network forming creator window + appears. 5. Make sure that the On-Mesh Prefix is set to `fd11:22::`. This value is used later to configure the IPv6 packet routing. 6. Click the **Form** button at the bottom of the window to form a new Thread @@ -168,6 +202,8 @@ To form a Thread network, complete the following steps: $ sudo ip -6 route add fd11:22::/64 dev otbr0 via 2001:db8:1::2 + + ### Configuring Wi-Fi hotspot To configure a Wi-Fi hotspot using a spare Wi-Fi card on your PC, complete the @@ -228,11 +264,19 @@ command: > example, you can use > [isc-dhcp-server](https://help.ubuntu.com/community/isc-dhcp-server). -## Building and flashing nRF Connect Lock Example Application +
+ + + +## Building and programming nRF Connect Lock Example Application See [nRF Connect Lock Example Application README](../../examples/lock-app/nrfconnect/README.md) -to learn how to build and flash the example onto an nRF52840 DK. +to learn how to build and program the example onto an nRF52840 DK. + +
+ + ## Building and installing Android CHIPTool @@ -262,6 +306,10 @@ After building, install the application by completing the following steps: CHIPTool is now ready to be used for commissioning. +
+ + + ## Preparing accessory device To prepare the accessory device for commissioning, complete the following steps: @@ -280,6 +328,10 @@ To prepare the accessory device for commissioning, complete the following steps: 4. Open the URL in a web browser to have the commissioning QR code generated. 5. Push **Button 4** on the device to start Bluetooth LE advertising. +
+ + + ## Commissioning accessory device To commission the accessory device onto the Thread network created in the @@ -290,26 +342,36 @@ following steps: 2. Connect the smartphone to the Wi-Fi Hotspot created in the [Configuring Wi-Fi hotspot](#Configuring-a-Wi-Fi-hotspot) section. 3. Open the CHIPTool application on your smartphone. -4. Tap the **SCAN QR CODE** button and scan the commissioning QR code. -5. Tap the **Rendezvous over BLE** button to initiate the commissioning - procedure. You will see a few pop-up messages appear as the commissioning - progresses. Eventually, the network settings screen appears. -6. In the new screen, open the **THREAD** tab. -7. Tap the **Save Network** button to send a Thread provisioning message to the +4. Tap the **PROVISION CHIP DEVICE WITH THREAD** button and scan the + commissioning QR code. Several notifications will appear, informing you of + commissioning progress with scanning, connection, and pairing. At the end of + this process, the Thread network settings screen appears. +5. In the Thread network settings screen, use the default settings and tap the + **SAVE NETWORK** button to send a Thread provisioning message to the accessory device. You will see the "Network provisioning completed" message when the accessory device successfully joins the Thread network. +
+ + + ## Sending CHIP commands -Once the device is commissioned, check the connection with the following -commands: +Once the device is commissioned, the following screen appears: -1. Go back to the main application screen. -2. Tap the **LIGHT ON/OFF CLUSTER** button. -3. Verify that the text box on the next screen contains the IPv6 address of the - accessory device. -4. Tap either the **ON** or the **OFF** button to lock or unlock the door, - respectively. The **LED 2** on the device turns on or off based on the - changes of the lock state. +![CHIPTool device control screen](../../docs/images/CHIPTool_device_commissioned.jpg) + +This means that the provisioning is completed successfully and you are connected +to the device. Check the connection with the following steps: + +1. Verify that the text box on the screen is not empty and contains the IPv6 + address of the accessory device. +2. Tap the following buttons to change the lock state: + + - **ON** and **OFF** buttons lock and unlock the door, respectively. + - **TOGGLE** changes the lock state to the opposite. + +The **LED 2** on the device turns on or off based on the changes of the lock +state. diff --git a/docs/images/CHIPTool_device_commissioned.JPG b/docs/images/CHIPTool_device_commissioned.JPG new file mode 100644 index 0000000000000000000000000000000000000000..dbe10d5d2c6de44c666d8919b1322664789090e9 GIT binary patch literal 17436 zcmeHM2Ut_twmzX4ic+LW4T1<#rFSAKARr=wB1MoAARt6~Krnz5rGpBJH0dfu=^%oD z6k(9wL8>(AHMHa%9LK@A_kC~X-Ff$W?|YnlJK5))wO9Gq+AC}Cjqkw^15|3ts>%Qa z0s+wA2f&X|r75A2767230q_CquHXk5xfWQF)2M8P>upa?s00B6F%?>aF_yKl61-x?y?=1n; zx8B}91sT%H$?3L?kdU3Dpouxk6d`DavK2y`+!hiRJS_ys!O^!(%xn-&?4}4yq@6tX z!rKaNcBHvHx30LxX^q?G5LUw^M8L#cR9L`VRMcEjTv$rPLfDk!yLfZ6AJT6-JKXvv+uTeDaSLIKuyb+* z(GV8m5c*Z=f2&LdIdd}^GY5o;6UyON@!AOce+{!+NQFNZlX60P;DIlG?SLXcFOrgy z$_ee4{*7p#_1~#MCxX2nE(b@l{~N9YA%6+v1Go<0`b!A>CE|nVI)LjhA@G-o52EY; z7+k-XjR-riR&)i6LVQ1P4uBF9A0j4#9wI(O0)>*0QImr;1{obC)nV#mbWDuL=#DWk zvvD71X60gKIL0B!!NqfmkDrf;T}V`jSA?6Fk9Us=1WH0eMoLCYPEO0qa*T!dFJJig z05u6j1d>b$;Q$DzA%xTr{09IAZl@802Y7pDc;7Dw0U;6bAt(tc897K$Km`y$2nh*@ z2#JY_z|%X3C-@#9q9#6iTv+iCjg|?N!=6^eJK{MB=h-)vbXQszPl%d2_>hv(GaO@N z;yTIAbBb3?TtZSxTISq&C1sThs%qLgSFh<_*V8vMM_5=|A*~&qoLyYeZtnMd{rm&& zKM0I`_~>y|^pmGCNy#axY3Ug+UgqZI7Zes1my}jjf2gUgtN+;0*51+C)!ozEH!?al z{$*lvYIwPzOuApF&=AC~>WE^5#&0wN+pBIur75CT`Q5mFNo9~VA! zR8b3RVo$>%;!Q$(Hsbl4N>WbID~oid4y|PLC&Wg$miA2hX4#)J%;&#l*$=~hx2q30 zOb7v;M@S98f#p7)qzV@WU!J5u;NR1{yS!vyp$Mm$?Cv2l(ABzkNX3a)1m;G;y{0qtyKWcY#cG&CUgp@Z#&*o6?t`&jjmRu2@-31;Wgrx%fw%T7=bnFhwaGRG78W_ZuwT(|!IEHmP zIk%VHa7@lj?PAWeJHZ)AXeQpPvRDqqK9}@6vg0E)SB3}RRv%^0nZZJ=Y|2kA{$iw1 zR+LZ`-sn*Dg=x4!(PAj1XV)ex0C!1$1y?z=tzpC48^zsw@?qHg`25@}!_us69LHll zgTmkyN^-QQdS@BTGv}**Y~g8rLlTPm4a?)VF%s!B@rT-Js*^u3QRJfXd+e@|SGCTe z&rwO5Rp<{b$|7wRwT)z!e_4n332*uk`Zv!nh1JpB%fuF)D_p!$=U>K+u%~6n<1f-S zEYvFuKSMZ^RCIO8Sy$q_u@TVTtl)p4s##i47< z8d_|2Na9|sr#sWwnkRkzj4ITRyQDK|c|(?jgtu4j<{iil<7zyxc~U_R59C~^c%~C$ z`=vVo2Ng_D6!u^Ksv~^EP+7t0Ogf=_0O87WQ(;=ZPl9&W9+^JOHCnzjm)ato$|#R& zS#isnD11_FPgBD_6PiMe)mcI6`xO)y7v~lS(zL1E_uKi}J2xj#c220eN&SPpvNL(f zN!1|1!wp`K_+^(FR$hLl?OMZ7?WlCE!l~_|)tur^7Db#6=Z!tZ_SoUm$wx6h8#E5x z`LRyzH_H6K%F0VfF)tj^>)+vTmpdQA-8Y|;QgmChG2gBhxpvmZ?{Zm!gWCN3F!a233e`4cw!lW7cK`jGj!qp32sIF;Wt{NjJEV?uo;t zI4Eztv0Kn7eb;rOW1dC4BhT%Z%G>0Y(sf;h(REu}*q54AK~L~NzIjjsQto+3F=2X( zuDBACU!GA=Pf6UymwP&X46n2DjH9R7E%~(rmmzIge)XG%&5628?MoARL`bT}X zs!oO(vaR_kA>_oF0@buMpJ8NgaUXlvn)ec0q}Sza)E5Kx-G9KN_hDsy{lD~WNb9@8S(C?80;m0?&d%_5cTY5^3it%_ygH_(L<{^)4e|yLkc8cbPf@z! zfx98F#rxQMIIj)N##DC?+u1ELIloo9&5f;o1DvPOyLi`bnAsQ}z@GO|!~YBMVYzw$uCin>T5_A_bj|Uc7 zb6$fA(e91G0|qvj=G2YXTVt~xnE%oUT1-|!#bn!dkEi{*0{kbX!}ghDGfR2glX%Z? zcvs)h%CzUKLh&{Xh6ncPtg_D-@pWi;xlb542KLn!wYgfp4m0!&3&R8ZbWYx9%Qj)X zv7*Y}khQ|1oh{=#l-UY(b$H-+*js-x#nXEa%)K$+T@Y~KfuZCB4;;*ae>Dr~eoJpZ zr4d!|FR>;TqC|W7-_;02c~4m$*Et-isbIm~8*pnQ2Y$pa|J3N(@ zIhTSK5*+q-GmAC>8tz%{ke{$DFw~^t_7_-v2US^YKcY6rhMMg;0i5v~ek*yA<_zom z2qtAEXTjou#AVTTv6+>GLo*C9MPVK`oCb~QH{2xdA5WNAj#VC0@U?_~PHr*nbXo{* zN}qA>{FKIgex>=D-&M!cFy2t$eIlh=QZYO*s`UM0eAbKWHjX_8deifxG!#Dz!JQc3GdHVMlY@I*0LtU)%j<>7_5y_= ztl69Vqv6SA*27wPfw8Pd78z1dm{ge}W{Z=S_)tPjqPrM$vsmsbt*=K1^gp`Yxg~z6Xy6zne>6-;-iok8^uqj`=WdKz zI_7yS5JQ-^irDHkwRS(%zwfOTZCHB&Rey2u9@Gk=0NN$yiPi=gS|$KIIo^(hXH+4j}sky&Yf3XWE=tUZ75FKCTn7 z!URlDH91O@pO#7Ron3p!e6hG}`+OsLKLOpSY=eU1ZX1P7IM&gNg}UGUrAT_+%}lLlyj=fc~Dae`(PL?E>AzEX74I?&&j*(jES7N zE8F8XY=U05`6B8;ziNAWe)$_p)@S3wu>j?hdsCO>YXBE%wgTFXYwP`YTjlKSq>P2D z#dX?Aij;q#<^iE9%Ab-Q2FK zT2TVI>RXCwCX-_&Qq$dmz*=x1-={Kz5lu?0Yjsgy*+PbFZF*w}3bqj`T*bpU|A8#o zE!|p1CBTDWgjAf_FZx=kNyepI)-P8NXM2}=Cqz&25O!2HtMN7GZyRIJEASwdf}Bwt6(SGYdF=yNnf}yDdsKnHU(IrifBgl{VcI= zcN*rf$K`+z(JtLI(?v1HJ?4?0Igk4&Jw$V6&tA_CPFgZf$GT)!Y-?+Rb!b0kd#hqhWj!qcTq76afsHjxt=H-D6O{tZ)k0L& zD4IsT9<_{!7ZzqkiG*1O?WjXx!+f%DGb~JO(req4SP&_r!r=@r6gpFPUzq&PB5Y0r zj>Fi3mFx^22m$PksXUCG&1}=BOU)Tt;5}XlLr2$K zbI&MeROb^;Z}^CST@00WVR?wvO*@xWsgOe-A3pGatAIhB^X&OMsl6&2Jc> z{s{(BIgB<%?$N&agXdHOuJ}}GC~99`PU5>AHT>F?A?LD;OQtbJR_4$#vF$mwMx7f{ z)7o|G&uTnm7qq?KM$~1C8YS$er;ovG3+ujl$=V$~?RE=3_i_&oH}0Ica`<{gxKBOeuZ*t5EiI*`$wYB2KMb6 zpdiTm9mx*(2rJf--1-_rtK@p@;u9kNw&QO7NY3I)M(fXAWtaM(58k{&I!HX_Dn31A z@E&1u^3wQCX~JV1pfmSR6_9a#WmzFyZ%^fq+pno?{K}h&XYyfj?zlWsFQKKCno=~v6*Ntk8olDKb}rWt z9Ghcu4II+G!+lYI=;1b8lK?aOdH%4D}A@b;3KDGGSXugxz)Mjf7oACkSvPij!y|=cIN&G z^M?>$?)PtZwi%*S9QI_IsME@S_h9l#pBM)TbgRY%eup#IF=l$!Hr+T>KdbQ^yLUdH zlb#xDs_&-@%@?c!)NjXhC2TpS0ZLM zjti4-7Z>gqWfz_(Pa$oFy|SZNSn7iZs@-?9GK=h|Hk!CT+zx5}B8On~S_q}!dxh(0 z#{-k=LpWRxw)JPu995IJqYHsdck|Nw4bz^b^k^`~kJ7-N@~7Ut3XLSl(O+fC02Mn- z-hWd*)p#it*YWyCZazbw@v@>X3iczC|JS`_O7)gvC>;MSMHK8?R}fw4tCT$yLmTex zrRS)H2Q2kKyffh&?_Y^sCPvMEg>S9};IOoqgXaf0?2CuwOL;-4z&E1D9iIl2IW&OCLthzXi`OXx$ zuNMIRA1Cy}Wq{QfzNU(i$v>nMwpry!>{9{$oAiHiK=#*j@#=B(eaL~b z&=L#zO)<#bK%PW`pBi8El0~YUnWJ6d!+gc?NZPdtFPXsq41m9k*lQ1NPe)G^*};ak z+{S$R+0%UPUSvE;zqeZzGse5^m(m(>sd!)z-ryzo`0mu!l{TS4n3_Jola_zq7wT-d z`mq+-u@@(hHZ(Wx>_ad$!ginNq6}4hFyp7-yY_gX*Ux43kC6m9XNU*F=_Yp_P+yEJ zjh<#>>d97cC6dcIq96*S?>`RfV5|ag?&-U$JOpYypWL<15YuWKoxg~>St7+K^>H;3 zy0=@dn}T-4DSg%4pj;83Ses^J!2=QQ?Yq@GO#rg>4?F6*jALQg?E*YtUlHfxT#FvU zDa>I8P?Kj^-qG%H?}#`-RNL_0xw1)2lR6^#XxbVhVn761oJh)(rX=Q=Hf65IAk`2X z=n1%#lYq+GHt)KC#wj^<{(^x!axUkT?46fKN=Jrq)vLm8gQnKZUmF(j<&7mU9J{)f z?aLAz_=!ooMl8Xi6#YC>Q#hH7f^>X%jWLTC;A@iuPkA`j(zgRPV^-W(!zeKI?~u3= zoQ0Rz)E`c(`GS|~c0BvQ>_7DBt<0DlI9p&Y74woSi4;b;YlRl{E+rhY&%9ZlNHq+{ z-j&Ky%ks2{?!p;F24}Lex+hckUOwc}6@lz4c<@GxB)04d$LdYmaQj)6uX=ClT*O#S zjV0tKRK0J;#?r()Zn|F^ERXq$j+TrTa6DmsO)lf|)0x|{Z6N}O;#`pv68%vTL1q!< zUR>>_R!&n|h34$rLEi0cS=wfrg5rvwT8L%5WQ_^&K)u8y?k#3EsnmMHgAxz0_a|&E z;DOx0=?ow#kmpDHkvHPLPXVyV*PRbb72rsCwoN!N5o4|w0n2Rk?_2Gm~GH`ur zh*>we@y?!&6uu<(--$#EFZw`HWh)@*p;!r+MlQBZfa$F1q!q;GC!ct9|C%=7VA>Fa zr0*-@zHJg4T86^M=DT-man8Nn`;rFWu&Na!x~F)u7?8i$WzF%%1LMq&c;E&eSl7BC z?x+CWpBcU-#viHgva<3K+RH>R6EFwGQ-e!-jzl!3vJj!&dWOo=zZ-{E!2=$F z3e`4vK#mg+lq+c}0gCI)#+xIs-DRHbBRM;ZVYp2?d0GgI%VJe;p!ivIL$J=Hy#)4i zBWYk&D<)zik)MJ6D^j36wwOs@%tn3ktVG316?}VKXZ6q7@RZu@a>jEVC*Vr!KPX46 z!d0eCg$OYWedcei#zR2)yNW8m34Ae?NU{%yeXyk`d9nY71nuvj#RmfBx9dnaPUsMg z`yESf{dRvkrWh+QGLJS8PJS|A(CrYvMm0h1q z-(1f*yDeU~vkTiE*U~4W$>rm!yIN;Lr~mTP`tn^wDQ|jjHhdB+&cGnfGsHBv?uDx9 z9j<@=0x(E==@~PIyBoF_!{6CnCjL{z&EItR6U2)k=WoQr--$8b^dtD8AMrjl_K3e( z_Z#uA#vBmucgmkZgNHNnv`6p7r_&L^I{DvHosOi0%f|hqGqg_?>nTd;#A(U2f*+@3 q-_M%6nIDG8S3SDLUZbu=OJtgqMQ0Aq1j3)H&ixhW|G_>S-}@i9+{v2& literal 0 HcmV?d00001 diff --git a/examples/lighting-app/nrfconnect/README.md b/examples/lighting-app/nrfconnect/README.md index cc5711c1a3c262..9961a7f281fc2e 100644 --- a/examples/lighting-app/nrfconnect/README.md +++ b/examples/lighting-app/nrfconnect/README.md @@ -29,6 +29,7 @@ into an existing CHIP network and can be controlled by this network. - [Configuring the example](#configuring-the-example) - [Flashing and debugging](#flashing-and-debugging) - [Testing the example](#testing-the-example) + - [Testing using CHIPTool](#testing-using-chiptool)
@@ -356,3 +357,11 @@ directory: Check the [CLI tutorial](../../../docs/guides/nrfconnect_examples_cli.md) to learn how to use command-line interface of the application. + +### Testing using CHIPTool + +Read the +[Android commissioning guide](../../../docs/guides/nrfconnect_android_commissioning.md) +to see how to use [CHIPTool](../../../src/android/CHIPTool/README.md) for +Android smartphones to commission and control the application within a +CHIP-enabled Thread network. diff --git a/examples/lock-app/nrfconnect/README.md b/examples/lock-app/nrfconnect/README.md index ab63c0f7473649..463152946ca3fd 100644 --- a/examples/lock-app/nrfconnect/README.md +++ b/examples/lock-app/nrfconnect/README.md @@ -26,6 +26,7 @@ into an existing CHIP network and can be controlled by this network. - [Configuring the example](#configuring-the-example) - [Flashing and debugging](#flashing-and-debugging) - [Testing the example](#testing-the-example) + - [Testing using CHIPTool](#testing-using-chiptool)
@@ -347,3 +348,11 @@ directory: Check the [CLI tutorial](../../../docs/guides/nrfconnect_examples_cli.md) to learn how to use command-line interface of the application. + +### Testing using CHIPTool + +Read the +[Android commissioning guide](../../../docs/guides/nrfconnect_android_commissioning.md) +to see how to use [CHIPTool](../../../src/android/CHIPTool/README.md) for +Android smartphones to commission and control the application within a +CHIP-enabled Thread network. From 9bfbf410d4eea9b813cad008dcc9e574441c7d6a Mon Sep 17 00:00:00 2001 From: Pankaj Garg Date: Mon, 1 Feb 2021 13:13:30 -0800 Subject: [PATCH 04/24] Open BLE advertisement only for the duration of pairing (#4568) * Open BLE advertisement only for the duration of pairing * fix Android build issue * add device layer checks * Add delegate to start/stop advertisement --- src/app/server/Server.cpp | 11 +++++++++- src/controller/CHIPDeviceController.cpp | 2 ++ src/controller/CHIPDeviceController.h | 23 ++++++++++++++++++++ src/transport/RendezvousParameters.h | 29 +++++++++++++++++++++++++ src/transport/RendezvousSession.cpp | 7 ++++++ 5 files changed, 71 insertions(+), 1 deletion(-) diff --git a/src/app/server/Server.cpp b/src/app/server/Server.cpp index 17df8c2a66bfef..9510ceed882747 100644 --- a/src/app/server/Server.cpp +++ b/src/app/server/Server.cpp @@ -61,6 +61,13 @@ bool isRendezvousBypassed() return rendezvousMode == RendezvousInformationFlags::kNone; } +class ServerRendezvousAdvertisementDelegate : public RendezvousAdvertisementDelegate +{ +public: + CHIP_ERROR StartAdvertisement() const override { return chip::DeviceLayer::ConnectivityMgr().SetBLEAdvertisingEnabled(true); } + CHIP_ERROR StopAdvertisement() const override { return chip::DeviceLayer::ConnectivityMgr().SetBLEAdvertisingEnabled(false); } +}; + class ServerCallback : public SecureSessionMgrDelegate { public: @@ -177,6 +184,7 @@ SecureSessionMgr gSessions; ServerCallback gCallbacks; SecurePairingUsingTestSecret gTestPairing; RendezvousServer gRendezvousServer; +ServerRendezvousAdvertisementDelegate gRendezvousAdvDelegate; } // namespace @@ -234,7 +242,8 @@ void InitServer(AppDelegate * delegate) #if CONFIG_NETWORK_LAYER_BLE params.SetSetupPINCode(pinCode) .SetBleLayer(DeviceLayer::ConnectivityMgr().GetBleLayer()) - .SetPeerAddress(Transport::PeerAddress::BLE()); + .SetPeerAddress(Transport::PeerAddress::BLE()) + .SetAdvertisementDelegate(&gRendezvousAdvDelegate); #else params.SetSetupPINCode(pinCode); #endif // CONFIG_NETWORK_LAYER_BLE diff --git a/src/controller/CHIPDeviceController.cpp b/src/controller/CHIPDeviceController.cpp index f63ba5ff5263e0..6136c47c8000f1 100644 --- a/src/controller/CHIPDeviceController.cpp +++ b/src/controller/CHIPDeviceController.cpp @@ -557,6 +557,8 @@ CHIP_ERROR DeviceCommissioner::PairDevice(NodeId remoteDeviceId, RendezvousParam VerifyOrExit(mState == State::Initialized, err = CHIP_ERROR_INCORRECT_STATE); VerifyOrExit(mDeviceBeingPaired == kNumMaxActiveDevices, err = CHIP_ERROR_INCORRECT_STATE); + params.SetAdvertisementDelegate(&mRendezvousAdvDelegate); + // TODO: We need to specify the peer address for BLE transport in bindings. if (params.GetPeerAddress().GetTransportType() == Transport::Type::kBle || params.GetPeerAddress().GetTransportType() == Transport::Type::kUndefined) diff --git a/src/controller/CHIPDeviceController.h b/src/controller/CHIPDeviceController.h index ed2e798b889892..ae73d1a0c8075f 100644 --- a/src/controller/CHIPDeviceController.h +++ b/src/controller/CHIPDeviceController.h @@ -216,6 +216,27 @@ class DLL_EXPORT DeviceController : public SecureSessionMgrDelegate, public Pers System::Layer * mSystemLayer; }; +/** + * @brief + * The commissioner applications doesn't advertise itself as an available device for rendezvous + * process. This delegate class provides no-op functions for the advertisement delegate. + */ +class DeviceCommissionerRendezvousAdvertisementDelegate : public RendezvousAdvertisementDelegate +{ +public: + /** + * @brief + * Starts advertisement of the device for rendezvous availability. + */ + CHIP_ERROR StartAdvertisement() const override { return CHIP_NO_ERROR; } + + /** + * @brief + * Stops advertisement of the device for rendezvous availability. + */ + CHIP_ERROR StopAdvertisement() const override { return CHIP_NO_ERROR; } +}; + /** * @brief * The commissioner applications can use this class to pair new/unpaired CHIP devices. The application is @@ -314,6 +335,8 @@ class DLL_EXPORT DeviceCommissioner : public DeviceController, public Rendezvous persist the device list */ bool mPairedDevicesUpdated; + DeviceCommissionerRendezvousAdvertisementDelegate mRendezvousAdvDelegate; + void PersistDeviceList(); }; diff --git a/src/transport/RendezvousParameters.h b/src/transport/RendezvousParameters.h index fbf6ef9355989f..d4c279a54cf916 100644 --- a/src/transport/RendezvousParameters.h +++ b/src/transport/RendezvousParameters.h @@ -30,6 +30,24 @@ namespace chip { // The largest supported value for Rendezvous discriminators const uint16_t kMaxRendezvousDiscriminatorValue = 0xFFF; +class DLL_EXPORT RendezvousAdvertisementDelegate +{ +public: + /** + * @brief + * Starts advertisement of the device for rendezvous availability. + */ + virtual CHIP_ERROR StartAdvertisement() const { return CHIP_ERROR_NOT_IMPLEMENTED; } + + /** + * @brief + * Stops advertisement of the device for rendezvous availability. + */ + virtual CHIP_ERROR StopAdvertisement() const { return CHIP_ERROR_NOT_IMPLEMENTED; } + + virtual ~RendezvousAdvertisementDelegate() {} +}; + class RendezvousParameters { public: @@ -77,6 +95,14 @@ class RendezvousParameters return *this; } + const RendezvousAdvertisementDelegate * GetAdvertisementDelegate() const { return mAdvDelegate; } + + RendezvousParameters & SetAdvertisementDelegate(RendezvousAdvertisementDelegate * delegate) + { + mAdvDelegate = delegate; + return *this; + } + #if CONFIG_NETWORK_LAYER_BLE bool HasBleLayer() const { return mBleLayer != nullptr; } Ble::BleLayer * GetBleLayer() const { return mBleLayer; } @@ -104,6 +130,9 @@ class RendezvousParameters uint32_t mSetupPINCode = 0; ///< the target peripheral setup PIN Code uint16_t mDiscriminator = UINT16_MAX; ///< the target peripheral discriminator + RendezvousAdvertisementDelegate mDefaultAdvDelegate; + RendezvousAdvertisementDelegate * mAdvDelegate = &mDefaultAdvDelegate; + #if CONFIG_NETWORK_LAYER_BLE Ble::BleLayer * mBleLayer = nullptr; BLE_CONNECTION_OBJECT mConnectionObject = 0; diff --git a/src/transport/RendezvousSession.cpp b/src/transport/RendezvousSession.cpp index 889c6a0d9dea2a..5189b49fcc9080 100644 --- a/src/transport/RendezvousSession.cpp +++ b/src/transport/RendezvousSession.cpp @@ -58,6 +58,7 @@ CHIP_ERROR RendezvousSession::Init(const RendezvousParameters & params, Transpor if (params.GetPeerAddress().GetTransportType() == Transport::Type::kBle) #if CONFIG_NETWORK_LAYER_BLE { + ReturnErrorOnFailure(mParams.GetAdvertisementDelegate()->StartAdvertisement()); Transport::BLE * transport = chip::Platform::New(); mTransport = transport; @@ -267,6 +268,12 @@ void RendezvousSession::UpdateState(RendezvousSession::State newState, CHIP_ERRO { ReleasePairingSessionHandle(); } + + if (newState == State::kInit) + { + // Disable BLE advertisement + mParams.GetAdvertisementDelegate()->StopAdvertisement(); + } } void RendezvousSession::OnRendezvousMessageReceived(const PacketHeader & packetHeader, const PeerAddress & peerAddress, From 2bf3e7c77004c7a19fda3cd18c26ea5508df3437 Mon Sep 17 00:00:00 2001 From: Kevin Schoedel <67607049+kpschoedel@users.noreply.github.com> Date: Mon, 1 Feb 2021 16:45:51 -0500 Subject: [PATCH 05/24] Convenience class for BufBound backed by a PacketBuffer. (#4555) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Convenience class for BufBound backed by a PacketBuffer. #### Problem Several places use similar code to safely write to a packet buffer. Encapsulating this encourages this safety method by making it easier, and reduces opportunity for mistakes in the steps involved. #### Summary of Changes - Added a `PacketBufBound` class that can never yield a truncated buffer. - Converted existing uses of the `BufBound`+`PacketBuffer` combination. * Fix incorrectly-updated copyright dates * Review * Review 2 — The Commenting --- src/app/encoder.cpp | 15 ++-- .../templates/chip/encoder-src.zapt | 16 ++--- src/lib/support/BufBound.h | 10 ++- src/protocols/bdx/tests/TestBdxMessages.cpp | 11 ++- src/system/SystemPacketBuffer.cpp | 25 +++++++ src/system/SystemPacketBuffer.h | 71 +++++++++++++++++-- src/system/tests/TestSystemPacketBuffer.cpp | 30 ++++++++ src/transport/NetworkProvisioning.cpp | 47 +++++------- src/transport/PASESession.cpp | 36 ++++------ 9 files changed, 179 insertions(+), 82 deletions(-) diff --git a/src/app/encoder.cpp b/src/app/encoder.cpp index 4e1e6ab7e85888..9cd16c76ff87fa 100644 --- a/src/app/encoder.cpp +++ b/src/app/encoder.cpp @@ -76,28 +76,23 @@ uint16_t encodeApsFrame(uint8_t * buffer, uint16_t buf_length, EmberApsFrame * a #define COMMAND_HEADER(name, clusterId) \ const char * kName = name; \ \ - PacketBufferHandle payload = PacketBufferHandle::New(kMaxBufferSize); \ - if (payload.IsNull()) \ + PacketBufBound buf(kMaxBufferSize); \ + if (buf.IsNull()) \ { \ ChipLogError(Zcl, "Could not allocate packet buffer while trying to encode %s command", kName); \ - return payload; \ + return PacketBufferHandle(); \ } \ \ - BufBound buf = BufBound(payload->Start(), kMaxBufferSize); \ if (doEncodeApsFrame(buf, clusterId, kSourceEndpoint, destinationEndpoint, 0, 0, 0, 0, false)) \ { #define COMMAND_FOOTER() \ } \ - uint16_t result = buf.Fit() && CanCastTo(buf.Needed()) ? static_cast(buf.Needed()) : 0; \ - if (result == 0) \ + if (!buf.Fit()) \ { \ ChipLogError(Zcl, "Command %s can't fit in the allocated buffer", kName); \ - return PacketBufferHandle(); \ } \ - \ - payload->SetDataLength(result); \ - return payload; + return buf.Finalize(); /*----------------------------------------------------------------------------*\ | Cluster Name | ID | diff --git a/src/app/zap-templates/templates/chip/encoder-src.zapt b/src/app/zap-templates/templates/chip/encoder-src.zapt index cbd44ae22a0f19..9aa0aa76039abe 100644 --- a/src/app/zap-templates/templates/chip/encoder-src.zapt +++ b/src/app/zap-templates/templates/chip/encoder-src.zapt @@ -60,28 +60,24 @@ uint16_t encodeApsFrame(uint8_t * buffer, uint16_t buf_length, EmberApsFrame * a #define COMMAND_HEADER(name, clusterId) \ const char * kName = name; \ \ - PacketBufferHandle payload = PacketBufferHandle::New(kMaxBufferSize); \ - if (payload.IsNull()) \ + PacketBufBound buf(kMaxBufferSize); \ + if (buf.IsNull()) \ { \ ChipLogError(Zcl, "Could not allocate packet buffer while trying to encode %s command", kName); \ - return payload; \ + return PacketBufferHandle(); \ } \ \ - BufBound buf = BufBound(payload->Start(), kMaxBufferSize); \ if (doEncodeApsFrame(buf, clusterId, kSourceEndpoint, destinationEndpoint, 0, 0, 0, 0, false)) \ { #define COMMAND_FOOTER() \ } \ - uint16_t result = buf.Fit() && CanCastTo(buf.Needed()) ? static_cast(buf.Needed()) : 0; \ - if (result == 0) \ + if (!buf.Fit()) \ { \ ChipLogError(Zcl, "Command %s can't fit in the allocated buffer", kName); \ - return PacketBufferHandle(); \ } \ - \ - payload->SetDataLength(result); \ - return payload; + return buf.Finalize(); + {{> clusters_header}} diff --git a/src/lib/support/BufBound.h b/src/lib/support/BufBound.h index 2262a74da4e12c..1e78e8d44cbb86 100644 --- a/src/lib/support/BufBound.h +++ b/src/lib/support/BufBound.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2020-2021 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -155,6 +155,14 @@ class BufBound * @brief Size of the buffer */ size_t Size() const { return mSize; } + +protected: + void Reset(uint8_t * buf, size_t len) + { + mBuf = buf; + mSize = len; + mNeeded = 0; + } }; } // namespace chip diff --git a/src/protocols/bdx/tests/TestBdxMessages.cpp b/src/protocols/bdx/tests/TestBdxMessages.cpp index 06c64ea607e046..3c0f37cc3c7dbf 100644 --- a/src/protocols/bdx/tests/TestBdxMessages.cpp +++ b/src/protocols/bdx/tests/TestBdxMessages.cpp @@ -2,7 +2,6 @@ #include -#include #include #include @@ -20,15 +19,15 @@ void TestHelperWrittenAndParsedMatch(nlTestSuite * inSuite, void * inContext, Ms { CHIP_ERROR err = CHIP_NO_ERROR; - size_t msgSize = testMsg.MessageSize(); - System::PacketBufferHandle msgBuf = System::PacketBufferHandle::New(static_cast(msgSize)); - NL_TEST_ASSERT(inSuite, !msgBuf.IsNull()); + size_t msgSize = testMsg.MessageSize(); + System::PacketBufBound bbuf(msgSize); + NL_TEST_ASSERT(inSuite, !bbuf.IsNull()); - BufBound bbuf(msgBuf->Start(), msgBuf->AvailableDataLength()); testMsg.WriteToBuffer(bbuf); NL_TEST_ASSERT(inSuite, bbuf.Fit()); - msgBuf->SetDataLength(static_cast(bbuf.Needed())); + System::PacketBufferHandle msgBuf = bbuf.Finalize(); + NL_TEST_ASSERT(inSuite, !msgBuf.IsNull()); System::PacketBufferHandle rcvBuf = System::PacketBufferHandle::NewWithData(msgBuf->Start(), msgSize); NL_TEST_ASSERT(inSuite, !rcvBuf.IsNull()); diff --git a/src/system/SystemPacketBuffer.cpp b/src/system/SystemPacketBuffer.cpp index f3b629a703eece..5b8e428aea9da5 100644 --- a/src/system/SystemPacketBuffer.cpp +++ b/src/system/SystemPacketBuffer.cpp @@ -586,5 +586,30 @@ void PacketBufferHandle::RightSizeForMemoryAlloc() #endif +PacketBufBound::PacketBufBound(size_t aAvailableSize, uint16_t aReservedSize) : BufBound(nullptr, 0) +{ + mPacket = PacketBufferHandle::New(aAvailableSize, aReservedSize); + if (!mPacket.IsNull()) + { + Reset(mPacket->Start(), aAvailableSize); + } +} + +PacketBufferHandle PacketBufBound::Finalize() +{ + if (!mPacket.IsNull() && Fit()) + { + // Since mPacket was successfully allocated to hold the maximum length, + // we know that the actual length fits in a uint16_t. + mPacket->SetDataLength(static_cast(Needed())); + } + else + { + mPacket = nullptr; + } + Reset(nullptr, 0); + return std::move(mPacket); +} + } // namespace System } // namespace chip diff --git a/src/system/SystemPacketBuffer.h b/src/system/SystemPacketBuffer.h index 644588c1b524b7..92764a9a506a45 100644 --- a/src/system/SystemPacketBuffer.h +++ b/src/system/SystemPacketBuffer.h @@ -29,6 +29,7 @@ #include // Include dependent headers +#include #include #include #include @@ -446,7 +447,7 @@ class DLL_EXPORT PacketBufferHandle PacketBuffer * operator->() const { return mBuffer; } /** - * Test whether this PacketBufferHandle is empty, or owns a PacketBuffer. + * Test whether this PacketBufferHandle is empty, or conversely owns a PacketBuffer. * * @return \c true if this PacketBufferHandle is empty; return \c false if it owns a PacketBuffer. */ @@ -542,14 +543,20 @@ class DLL_EXPORT PacketBufferHandle /** * Allocates a packet buffer. * + * A packet buffer is conceptually divided into two parts: + * @li Space reserved for network protocol headers. The size of this space normally defaults to a value determined + * by the network layer configuration, but can be given explicity by \c aReservedSize for special cases. + * @li Space for application data. The minimum size of this space is given by \c aAvailableSize, and then \c Start() + * provides a pointer to the start of this space. + * * Fails and returns \c nullptr if no memory is available, or if the size requested is too large. * When the sum of \a aAvailableSize and \a aReservedSize is no greater than \c kMaxPacketBufferSizeWithoutReserve, * that is guaranteed not to be too large. * * On success, it is guaranteed that \c AvailableDataSize() is no less than \a aAvailableSize. * - * @param[in] aAvailableSize Minimim number of octets to allocate after the cursor. - * @param[in] aReservedSize Minimum number of octets to reserve behind the cursor. + * @param[in] aAvailableSize Minimim number of octets to for application data (at `Start()`). + * @param[in] aReservedSize Number of octets to reserve for protocol headers (before `Start()`). * * @return On success, a PacketBufferHandle to the allocated buffer. On fail, \c nullptr. */ @@ -560,8 +567,8 @@ class DLL_EXPORT PacketBufferHandle * * @param[in] aData Initial buffer contents. * @param[in] aDataSize Size of initial buffer contents. - * @param[in] aAdditionalSize Size of additional buffer space after the initial contents. - * @param[in] aReservedSize Number of octets to reserve behind the cursor. + * @param[in] aAdditionalSize Size of additional application data space after the initial contents. + * @param[in] aReservedSize Number of octets to reserve for protocol headers. * * @return On success, a PacketBufferHandle to the allocated buffer. On fail, \c nullptr. */ @@ -632,6 +639,60 @@ inline PacketBufferHandle PacketBuffer::Last() return PacketBufferHandle::Hold(p); } +/** + * BufBound backed by packet buffer. + * + * Typical use: + * @code + * PacketBufBound buf(maximumLength); + * if (buf.IsNull()) { return CHIP_ERROR_NO_MEMORY; } + * buf.Put(...); + * ... + * PacketBufferHandle handle = buf.Finalize(); + * if (buf.IsNull()) { return CHIP_ERROR_BUFFER_TOO_SMALL; } + * // valid data + * @endcode + */ +class PacketBufBound : public BufBound +{ +public: + /** + * Constructs a BufBound that writes into a newly allocated packet buffer. + * + * If no memory is available, or if the size requested is too large, then \c IsNull() will be true. + * Otherwise, it is guaranteed that the BufBound length is \a aAvailableSize. (The underlying packet + * buffer may be larger.) + * + * @param[in] aAvailableSize Length bound of the BufBound. + * @param[in] aReservedSize Reserved packet buffer space for protocol headers; see \c PacketBufferHandle::New(). + */ + PacketBufBound(size_t aAvailableSize, uint16_t aReservedSize = CHIP_SYSTEM_CONFIG_HEADER_RESERVE_SIZE); + + /** + * Test whether this PacketBufBound is null, or conversely owns a PacketBuffer. + * + * @retval true The PacketBufBound is null; it does not own a PacketBuffer. This implies either that + * construction failed, or that \c Finalize() has previously been called to release the buffer. + * @retval false The PacketBufBound owns a PacketBuffer, which can be written using BufBound \c Put() methods, + * and (assuming no overflow) obtained by calling \c Finalize(). + */ + bool IsNull() const { return mPacket.IsNull(); } + + /** + * Obtain the backing packet buffer, if it is valid. + * + * If construction succeeded, \c Finalize() has not already been called, and \c BufBound::Fit() is true, the caller + * takes ownership of a buffer containing the desired data. Otherwise, the returned handle tests null, and any + * underlying storage has been released. + * + * @return A packet buffer handle. + */ + PacketBufferHandle Finalize(); + +private: + PacketBufferHandle mPacket; +}; + } // namespace System } // namespace chip diff --git a/src/system/tests/TestSystemPacketBuffer.cpp b/src/system/tests/TestSystemPacketBuffer.cpp index 757b5c7b1d78ea..08f0f3b79d4b25 100644 --- a/src/system/tests/TestSystemPacketBuffer.cpp +++ b/src/system/tests/TestSystemPacketBuffer.cpp @@ -53,6 +53,7 @@ #endif // (LWIP_VERSION_MAJOR >= 2 && LWIP_VERSION_MINOR >= 1) #endif // CHIP_SYSTEM_CONFIG_USE_LWIP +using ::chip::System::PacketBufBound; using ::chip::System::PacketBuffer; using ::chip::System::PacketBufferHandle; @@ -118,6 +119,7 @@ class PacketBufferTest static void CheckHandleHold(nlTestSuite * inSuite, void * inContext); static void CheckHandleAdvance(nlTestSuite * inSuite, void * inContext); static void CheckHandleRightSize(nlTestSuite * inSuite, void * inContext); + static void CheckPacketBufBound(nlTestSuite * inSuite, void * inContext); static void CheckBuildFreeList(nlTestSuite * inSuite, void * inContext); static void PrintHandle(const char * tag, const PacketBuffer * buffer) @@ -1700,6 +1702,33 @@ void PacketBufferTest::CheckHandleRightSize(nlTestSuite * inSuite, void * inCont #endif // !((CHIP_SYSTEM_CONFIG_USE_LWIP && LWIP_PBUF_FROM_CUSTOM_POOLS) || (CHIP_SYSTEM_CONFIG_PACKETBUFFER_MAXALLOC == 0)) } +void PacketBufferTest::CheckPacketBufBound(nlTestSuite * inSuite, void * inContext) +{ + struct TestContext * const theContext = static_cast(inContext); + PacketBufferTest * const test = theContext->test; + NL_TEST_ASSERT(inSuite, test->mContext == theContext); + + const char kPayload[] = "Hello, world!"; + + PacketBufBound yay(sizeof(kPayload)); + PacketBufBound nay(sizeof(kPayload) - 2); + NL_TEST_ASSERT(inSuite, !yay.IsNull()); + NL_TEST_ASSERT(inSuite, !nay.IsNull()); + + yay.Put(kPayload); + nay.Put(kPayload); + NL_TEST_ASSERT(inSuite, yay.Fit()); + NL_TEST_ASSERT(inSuite, !nay.Fit()); + + PacketBufferHandle yayBuffer = yay.Finalize(); + PacketBufferHandle nayBuffer = nay.Finalize(); + NL_TEST_ASSERT(inSuite, yay.IsNull()); + NL_TEST_ASSERT(inSuite, nay.IsNull()); + NL_TEST_ASSERT(inSuite, !yayBuffer.IsNull()); + NL_TEST_ASSERT(inSuite, nayBuffer.IsNull()); + NL_TEST_ASSERT(inSuite, memcmp(yayBuffer->Start(), kPayload, sizeof kPayload) == 0); +} + /** * Test Suite. It lists all the test functions. */ @@ -1737,6 +1766,7 @@ const nlTest sTests[] = NL_TEST_DEF("PacketBuffer::HandleHold", PacketBufferTest::CheckHandleHold), NL_TEST_DEF("PacketBuffer::HandleAdvance", PacketBufferTest::CheckHandleAdvance), NL_TEST_DEF("PacketBuffer::HandleRightSize", PacketBufferTest::CheckHandleRightSize), + NL_TEST_DEF("PacketBuffer::PacketBufBound", PacketBufferTest::CheckPacketBufBound), NL_TEST_SENTINEL() }; diff --git a/src/transport/NetworkProvisioning.cpp b/src/transport/NetworkProvisioning.cpp index 84c183f6498054..47c8ab3fbcda21 100644 --- a/src/transport/NetworkProvisioning.cpp +++ b/src/transport/NetworkProvisioning.cpp @@ -193,21 +193,17 @@ CHIP_ERROR NetworkProvisioning::SendNetworkCredentials(const char * ssid, const const size_t bufferSize = EncodedStringSize(ssid) + EncodedStringSize(passwd); VerifyOrExit(CanCastTo(bufferSize), err = CHIP_ERROR_INVALID_ARGUMENT); { - System::PacketBufferHandle buffer = System::PacketBufferHandle::New(bufferSize); - BufBound bbuf(buffer->Start(), buffer->AvailableDataLength()); + System::PacketBufBound bbuf(bufferSize); ChipLogProgress(NetworkProvisioning, "Sending Network Creds. Delegate %p\n", mDelegate); VerifyOrExit(mDelegate != nullptr, err = CHIP_ERROR_INCORRECT_STATE); - VerifyOrExit(!buffer.IsNull(), err = CHIP_ERROR_NO_MEMORY); + VerifyOrExit(!bbuf.IsNull(), err = CHIP_ERROR_NO_MEMORY); SuccessOrExit(EncodeString(ssid, bbuf)); SuccessOrExit(EncodeString(passwd, bbuf)); VerifyOrExit(bbuf.Fit(), err = CHIP_ERROR_BUFFER_TOO_SMALL); - VerifyOrExit(CanCastTo(bbuf.Needed()), err = CHIP_ERROR_INVALID_ARGUMENT); - buffer->SetDataLength(static_cast(bbuf.Needed())); - err = mDelegate->SendSecureMessage(Protocols::kProtocol_NetworkProvisioning, - NetworkProvisioning::MsgTypes::kWiFiAssociationRequest, std::move(buffer)); + NetworkProvisioning::MsgTypes::kWiFiAssociationRequest, bbuf.Finalize()); SuccessOrExit(err); } @@ -231,31 +227,26 @@ CHIP_ERROR NetworkProvisioning::SendThreadCredentials(const DeviceLayer::Interna 4; // threadData.ThreadChannel, threadData.FieldPresent.ThreadExtendedPANId, // threadData.FieldPresent.ThreadMeshPrefix, threadData.FieldPresent.ThreadPSKc /* clang-format on */ - System::PacketBufferHandle buffer = System::PacketBufferHandle::New(credentialSize); + System::PacketBufBound bbuf(credentialSize); ChipLogProgress(NetworkProvisioning, "Sending Thread Credentials"); VerifyOrExit(mDelegate != nullptr, err = CHIP_ERROR_INCORRECT_STATE); - VerifyOrExit(!buffer.IsNull(), err = CHIP_ERROR_NO_MEMORY); + VerifyOrExit(!bbuf.IsNull(), err = CHIP_ERROR_NO_MEMORY); + + bbuf.Put(threadData.ThreadNetworkName, sizeof(threadData.ThreadNetworkName)); + bbuf.Put(threadData.ThreadExtendedPANId, sizeof(threadData.ThreadExtendedPANId)); + bbuf.Put(threadData.ThreadMeshPrefix, sizeof(threadData.ThreadMeshPrefix)); + bbuf.Put(threadData.ThreadMasterKey, sizeof(threadData.ThreadMasterKey)); + bbuf.Put(threadData.ThreadPSKc, sizeof(threadData.ThreadPSKc)); + bbuf.Put16(threadData.ThreadPANId); + bbuf.Put(threadData.ThreadChannel); + bbuf.Put(static_cast(threadData.FieldPresent.ThreadExtendedPANId)); + bbuf.Put(static_cast(threadData.FieldPresent.ThreadMeshPrefix)); + bbuf.Put(static_cast(threadData.FieldPresent.ThreadPSKc)); - { - BufBound bbuf(buffer->Start(), buffer->AvailableDataLength()); - bbuf.Put(threadData.ThreadNetworkName, sizeof(threadData.ThreadNetworkName)); - bbuf.Put(threadData.ThreadExtendedPANId, sizeof(threadData.ThreadExtendedPANId)); - bbuf.Put(threadData.ThreadMeshPrefix, sizeof(threadData.ThreadMeshPrefix)); - bbuf.Put(threadData.ThreadMasterKey, sizeof(threadData.ThreadMasterKey)); - bbuf.Put(threadData.ThreadPSKc, sizeof(threadData.ThreadPSKc)); - bbuf.Put16(threadData.ThreadPANId); - bbuf.Put(threadData.ThreadChannel); - bbuf.Put(static_cast(threadData.FieldPresent.ThreadExtendedPANId)); - bbuf.Put(static_cast(threadData.FieldPresent.ThreadMeshPrefix)); - bbuf.Put(static_cast(threadData.FieldPresent.ThreadPSKc)); - - VerifyOrExit(bbuf.Fit(), err = CHIP_ERROR_BUFFER_TOO_SMALL); - buffer->SetDataLength(static_cast(bbuf.Needed())); - - err = mDelegate->SendSecureMessage(Protocols::kProtocol_NetworkProvisioning, - NetworkProvisioning::MsgTypes::kThreadAssociationRequest, std::move(buffer)); - } + VerifyOrExit(bbuf.Fit(), err = CHIP_ERROR_BUFFER_TOO_SMALL); + err = mDelegate->SendSecureMessage(Protocols::kProtocol_NetworkProvisioning, + NetworkProvisioning::MsgTypes::kThreadAssociationRequest, bbuf.Finalize()); exit: if (CHIP_NO_ERROR != err) diff --git a/src/transport/PASESession.cpp b/src/transport/PASESession.cpp index 7a397385b72c4d..4e4dbe080de81c 100644 --- a/src/transport/PASESession.cpp +++ b/src/transport/PASESession.cpp @@ -535,8 +535,6 @@ CHIP_ERROR PASESession::HandleMsg1_and_SendMsg2(const PacketHeader & header, con const uint8_t * buf = msg->Start(); size_t buf_len = msg->DataLength(); - System::PacketBufferHandle resp; - ChipLogDetail(Ble, "Received spake2p msg1"); VerifyOrExit(buf != nullptr, err = CHIP_ERROR_MESSAGE_INCOMPLETE); @@ -563,22 +561,19 @@ CHIP_ERROR PASESession::HandleMsg1_and_SendMsg2(const PacketHeader & header, con VerifyOrExit(CanCastTo(Y_len + verifier_len), err = CHIP_ERROR_INVALID_MESSAGE_LENGTH); data_len = static_cast(Y_len + verifier_len); - resp = System::PacketBufferHandle::New(data_len); - VerifyOrExit(!resp.IsNull(), err = CHIP_SYSTEM_ERROR_NO_MEMORY); - { - BufBound bbuf(resp->Start(), data_len); + System::PacketBufBound bbuf(data_len); + VerifyOrExit(!bbuf.IsNull(), err = CHIP_SYSTEM_ERROR_NO_MEMORY); bbuf.Put(&Y[0], Y_len); bbuf.Put(verifier, verifier_len); VerifyOrExit(bbuf.Fit(), err = CHIP_ERROR_NO_MEMORY); - } - resp->SetDataLength(data_len); - mNextExpectedMsg = Protocols::SecureChannel::MsgType::PASE_Spake2p3; + mNextExpectedMsg = Protocols::SecureChannel::MsgType::PASE_Spake2p3; - // Call delegate to send the Msg2 to peer - err = AttachHeaderAndSend(Protocols::SecureChannel::MsgType::PASE_Spake2p2, std::move(resp)); - SuccessOrExit(err); + // Call delegate to send the Msg2 to peer + err = AttachHeaderAndSend(Protocols::SecureChannel::MsgType::PASE_Spake2p2, bbuf.Finalize()); + SuccessOrExit(err); + } ChipLogDetail(Ble, "Sent spake2p msg2"); @@ -622,20 +617,17 @@ CHIP_ERROR PASESession::HandleMsg2_and_SendMsg3(const PacketHeader & header, con mConnectionState.SetPeerNodeId(header.GetSourceNodeId().Value()); } - resp = System::PacketBufferHandle::New(verifier_len); - VerifyOrExit(!resp.IsNull(), err = CHIP_SYSTEM_ERROR_NO_MEMORY); - { - BufBound bbuf(resp->Start(), verifier_len); + System::PacketBufBound bbuf(verifier_len); + VerifyOrExit(!bbuf.IsNull(), err = CHIP_SYSTEM_ERROR_NO_MEMORY); + bbuf.Put(verifier, verifier_len); VerifyOrExit(bbuf.Fit(), err = CHIP_ERROR_NO_MEMORY); - } - resp->SetDataLength(verifier_len); - - // Call delegate to send the Msg3 to peer - err = AttachHeaderAndSend(Protocols::SecureChannel::MsgType::PASE_Spake2p3, std::move(resp)); - SuccessOrExit(err); + // Call delegate to send the Msg3 to peer + err = AttachHeaderAndSend(Protocols::SecureChannel::MsgType::PASE_Spake2p3, bbuf.Finalize()); + SuccessOrExit(err); + } ChipLogDetail(Ble, "Sent spake2p msg3"); From 991c1ec19ea3c79f3c7988a39e5e119784758f21 Mon Sep 17 00:00:00 2001 From: sujaygkulkarni-nxp <77627602+sujaygkulkarni-nxp@users.noreply.github.com> Date: Tue, 2 Feb 2021 23:21:04 +0530 Subject: [PATCH 06/24] Bugfix/spake2p calc tt value fix (#4444) * * Fix - Calculation of TT value in spake2p protocol * Added context length in calculation of TT * Removed pbkdf2 param request/response from calculation of TT * reverting the changes * * Added context length to calculation of TT * Reverted test vectors * Modified Spake2p::Init to accepts context and context_len. * added context length to computation of TT in SecurePairingSession.cpp * crash fix * Restyled by clang-format * build fix * reverting examples/bridge-app/linux/build * reverting link files * reverting submodule commits * moving buffer to PASESession * Calculating context as SHA256("Const String" || PBKDFParamRequest || PBKDFParamResponse) * Restyled by clang-format Co-authored-by: Restyled.io --- src/crypto/CHIPCryptoPAL.cpp | 20 +++---- src/crypto/CHIPCryptoPAL.h | 14 ++--- src/crypto/tests/CHIPCryptoPALTest.cpp | 26 +++------ src/crypto/tests/SPAKE2P_RFC_test_vectors.h | 64 ++++++++++----------- src/transport/PASESession.cpp | 12 +++- 5 files changed, 65 insertions(+), 71 deletions(-) diff --git a/src/crypto/CHIPCryptoPAL.cpp b/src/crypto/CHIPCryptoPAL.cpp index 07f6156439e3ae..a6b6085a515f8d 100644 --- a/src/crypto/CHIPCryptoPAL.cpp +++ b/src/crypto/CHIPCryptoPAL.cpp @@ -82,12 +82,12 @@ Spake2p::Spake2p(size_t _fe_size, size_t _point_size, size_t _hash_size) tempbn = nullptr; } -CHIP_ERROR Spake2p::Init(const Hash_SHA256_stream * context) +CHIP_ERROR Spake2p::Init(const uint8_t * context, size_t context_len) { CHIP_ERROR error = CHIP_ERROR_INTERNAL; state = CHIP_SPAKE2P_STATE::PREINIT; - error = InitImpl(context); + error = InitImpl(); VerifyOrExit(error == CHIP_NO_ERROR, error = CHIP_ERROR_INTERNAL); error = PointLoad(spake2p_M_p256, sizeof(spake2p_M_p256), M); @@ -96,6 +96,9 @@ CHIP_ERROR Spake2p::Init(const Hash_SHA256_stream * context) error = PointLoad(spake2p_N_p256, sizeof(spake2p_N_p256), N); VerifyOrExit(error == CHIP_NO_ERROR, error = CHIP_ERROR_INTERNAL); + error = InternalHash(context, context_len); + VerifyOrExit(error == CHIP_NO_ERROR, error = CHIP_ERROR_INTERNAL); + state = CHIP_SPAKE2P_STATE::INIT; error = CHIP_NO_ERROR; exit: @@ -384,19 +387,12 @@ CHIP_ERROR Spake2p::GetKeys(uint8_t * out, size_t * out_len) return error; } -CHIP_ERROR Spake2p_P256_SHA256_HKDF_HMAC::InitImpl(const Hash_SHA256_stream * context) +CHIP_ERROR Spake2p_P256_SHA256_HKDF_HMAC::InitImpl() { CHIP_ERROR error = CHIP_ERROR_INTERNAL; - if (context != nullptr) - { - sha256_hash_ctx = (*context); - } - else - { - error = sha256_hash_ctx.Begin(); - VerifyOrExit(error == CHIP_NO_ERROR, error = CHIP_ERROR_INTERNAL); - } + error = sha256_hash_ctx.Begin(); + VerifyOrExit(error == CHIP_NO_ERROR, error = CHIP_ERROR_INTERNAL); error = InitInternal(); VerifyOrExit(error == CHIP_NO_ERROR, error = CHIP_ERROR_INTERNAL); diff --git a/src/crypto/CHIPCryptoPAL.h b/src/crypto/CHIPCryptoPAL.h index e50c2951d6c49f..776b182c9517e9 100644 --- a/src/crypto/CHIPCryptoPAL.h +++ b/src/crypto/CHIPCryptoPAL.h @@ -458,14 +458,14 @@ class Spake2p /** * @brief Initialize Spake2+ with some context specific information. * - * @param context The spake2p session will bootstrap from this hash context. - * If the provided context pointer is null, the spake2p session will bootstrap - * from a blank hash context. - * Note: calling this function will nullptr doesn't free the object state. + * @param context The context is arbitrary but should include information about the + * protocol being run, contain the transcript for negotiation, include + * the PKBDF parameters, etc. + * @param context_len The length of the context. * * @return Returns a CHIP_ERROR on error, CHIP_NO_ERROR otherwise **/ - CHIP_ERROR Init(const Hash_SHA256_stream * context); + CHIP_ERROR Init(const uint8_t * context, size_t context_len); /** * @brief Start the Spake2+ process as a verifier (i.e. an accessory being provisioned). @@ -718,7 +718,7 @@ class Spake2p * * @return Returns a CHIP_ERROR on error, CHIP_NO_ERROR otherwise **/ - virtual CHIP_ERROR InitImpl(const Hash_SHA256_stream * context) = 0; + virtual CHIP_ERROR InitImpl() = 0; /** * @brief Hash in_len bytes of in into the internal hash context. @@ -830,7 +830,7 @@ class Spake2p_P256_SHA256_HKDF_HMAC : public Spake2p CHIP_ERROR ComputeL(uint8_t * Lout, size_t * L_len, const uint8_t * w1in, size_t w1in_len) override; protected: - CHIP_ERROR InitImpl(const Hash_SHA256_stream * context) override; + CHIP_ERROR InitImpl() override; CHIP_ERROR Hash(const uint8_t * in, size_t in_len) override; CHIP_ERROR HashFinalize(uint8_t * out) override; CHIP_ERROR KDF(const uint8_t * secret, size_t secret_length, const uint8_t * salt, size_t salt_length, const uint8_t * info, diff --git a/src/crypto/tests/CHIPCryptoPALTest.cpp b/src/crypto/tests/CHIPCryptoPALTest.cpp index 576cfb033d5aef..0c27c6531a5a3b 100644 --- a/src/crypto/tests/CHIPCryptoPALTest.cpp +++ b/src/crypto/tests/CHIPCryptoPALTest.cpp @@ -989,7 +989,7 @@ static void TestSPAKE2P_spake2p_FEMul(nlTestSuite * inSuite, void * inContext) const struct spake2p_fe_mul_tv * vector = fe_mul_tvs[vectorIndex]; Spake2p_P256_SHA256_HKDF_HMAC spake2p; - CHIP_ERROR err = spake2p.Init(nullptr); + CHIP_ERROR err = spake2p.Init(nullptr, 0); NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); err = spake2p.FELoad(vector->fe1, vector->fe1_len, spake2p.w0); @@ -1022,7 +1022,7 @@ static void TestSPAKE2P_spake2p_FELoadWrite(nlTestSuite * inSuite, void * inCont const struct spake2p_fe_rw_tv * vector = fe_rw_tvs[vectorIndex]; Spake2p_P256_SHA256_HKDF_HMAC spake2p; - CHIP_ERROR err = spake2p.Init(nullptr); + CHIP_ERROR err = spake2p.Init(nullptr, 0); NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); err = spake2p.FELoad(vector->fe_in, vector->fe_in_len, spake2p.w0); @@ -1049,7 +1049,7 @@ static void TestSPAKE2P_spake2p_Mac(nlTestSuite * inSuite, void * inContext) const struct spake2p_hmac_tv * vector = hmac_tvs[vectorIndex]; Spake2p_P256_SHA256_HKDF_HMAC spake2p; - CHIP_ERROR err = spake2p.Init(nullptr); + CHIP_ERROR err = spake2p.Init(nullptr, 0); NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); err = spake2p.Mac(vector->key, vector->key_len, vector->input, vector->input_len, mac); @@ -1079,7 +1079,7 @@ static void TestSPAKE2P_spake2p_PointMul(nlTestSuite * inSuite, void * inContext const struct spake2p_point_mul_tv * vector = point_mul_tvs[vectorIndex]; Spake2p_P256_SHA256_HKDF_HMAC spake2p; - CHIP_ERROR err = spake2p.Init(nullptr); + CHIP_ERROR err = spake2p.Init(nullptr, 0); NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); err = spake2p.PointLoad(vector->point, vector->point_len, spake2p.L); @@ -1115,7 +1115,7 @@ static void TestSPAKE2P_spake2p_PointMulAdd(nlTestSuite * inSuite, void * inCont const struct spake2p_point_muladd_tv * vector = point_muladd_tvs[vectorIndex]; Spake2p_P256_SHA256_HKDF_HMAC spake2p; - CHIP_ERROR err = spake2p.Init(nullptr); + CHIP_ERROR err = spake2p.Init(nullptr, 0); NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); err = spake2p.PointLoad(vector->point1, vector->point1_len, spake2p.X); @@ -1157,7 +1157,7 @@ static void TestSPAKE2P_spake2p_PointLoadWrite(nlTestSuite * inSuite, void * inC const struct spake2p_point_rw_tv * vector = point_rw_tvs[vectorIndex]; Spake2p_P256_SHA256_HKDF_HMAC spake2p; - CHIP_ERROR err = spake2p.Init(nullptr); + CHIP_ERROR err = spake2p.Init(nullptr, 0); NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); err = spake2p.PointLoad(vector->point, vector->point_len, spake2p.L); @@ -1183,7 +1183,7 @@ static void TestSPAKE2P_spake2p_PointIsValid(nlTestSuite * inSuite, void * inCon const struct spake2p_point_valid_tv * vector = point_valid_tvs[vectorIndex]; Spake2p_P256_SHA256_HKDF_HMAC spake2p; - CHIP_ERROR err = spake2p.Init(nullptr); + CHIP_ERROR err = spake2p.Init(nullptr, 0); NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); err = spake2p.PointLoad(vector->point, vector->point_len, spake2p.L); @@ -1255,16 +1255,8 @@ static void TestSPAKE2P_RFC(nlTestSuite * inSuite, void * inContext) Test_Spake2p_P256_SHA256_HKDF_HMAC Verifier; Test_Spake2p_P256_SHA256_HKDF_HMAC Prover; - Hash_SHA256_stream hashContext; - - error = hashContext.Begin(); - NL_TEST_ASSERT(inSuite, error == CHIP_NO_ERROR); - - error = hashContext.AddData(vector->context, vector->context_len); - NL_TEST_ASSERT(inSuite, error == CHIP_NO_ERROR); - // First start the prover - error = Prover.Init(&hashContext); + error = Prover.Init(vector->context, vector->context_len); NL_TEST_ASSERT(inSuite, error == CHIP_NO_ERROR); error = Prover.BeginProver(vector->prover_identity, vector->prover_identity_len, vector->verifier_identity, @@ -1283,7 +1275,7 @@ static void TestSPAKE2P_RFC(nlTestSuite * inSuite, void * inContext) NL_TEST_ASSERT(inSuite, memcmp(X, vector->X, vector->X_len) == 0); // Start up the verifier - error = Verifier.Init(&hashContext); + error = Verifier.Init(vector->context, vector->context_len); NL_TEST_ASSERT(inSuite, error == CHIP_NO_ERROR); // First pre-compute L (accessories with dynamic setup codes will do this) diff --git a/src/crypto/tests/SPAKE2P_RFC_test_vectors.h b/src/crypto/tests/SPAKE2P_RFC_test_vectors.h index 40d31a43da0c45..20a77596a7a874 100644 --- a/src/crypto/tests/SPAKE2P_RFC_test_vectors.h +++ b/src/crypto/tests/SPAKE2P_RFC_test_vectors.h @@ -104,18 +104,18 @@ static const uint8_t chiptest_e4836c3b50dd_V_9[] = { 0x04, 0x67, 0x18, 0x98, 0 0x28, 0x53, 0xa4, 0x07, 0x12, 0x51, 0xa3, 0x9f, 0xbe, 0x8c, 0xfc, 0x39, 0xbc }; static const uint8_t chiptest_e4836c3b50dd_Ka_10[] = { 0xf9, 0xca, 0xb9, 0xad, 0xcc, 0x0e, 0xd8, 0xe5, 0xa4, 0xdb, 0x11, 0xa8, 0x50, 0x59, 0x14, 0xb2 }; -static const uint8_t chiptest_e4836c3b50dd_Ke_11[] = { 0x19, 0x29, 0x9c, 0x25, 0x57, 0x7d, 0xef, 0x6a, - 0xca, 0x4f, 0x21, 0x98, 0xd8, 0xb9, 0x18, 0x5c }; +static const uint8_t chiptest_e4836c3b50dd_Ke_11[] = { 0x80, 0x1d, 0xb2, 0x97, 0x65, 0x48, 0x16, 0xeb, + 0x4f, 0x02, 0x86, 0x81, 0x29, 0xb9, 0xdc, 0x89 }; static const uint8_t chiptest_e4836c3b50dd_KcA_12[] = { 0x0d, 0x24, 0x8d, 0x7d, 0x19, 0x23, 0x4f, 0x14, 0x86, 0xb2, 0xef, 0xba, 0x51, 0x79, 0xc5, 0x2d }; static const uint8_t chiptest_e4836c3b50dd_KcB_13[] = { 0x55, 0x62, 0x91, 0xdf, 0x26, 0xd7, 0x05, 0xa2, 0xca, 0xed, 0xd6, 0x47, 0x4d, 0xd0, 0x07, 0x9b }; -static const uint8_t chiptest_e4836c3b50dd_MAC_KcA_14[] = { 0xe0, 0x2d, 0x9e, 0x25, 0x6b, 0xe6, 0xc4, 0xa9, 0x34, 0x6f, 0x0d, - 0x76, 0x67, 0xae, 0xcd, 0x61, 0xaf, 0x7c, 0x63, 0xfe, 0xfb, 0xb4, - 0xf7, 0x1b, 0x84, 0xd4, 0x01, 0x15, 0x9f, 0xaa, 0xbe, 0xce }; -static const uint8_t chiptest_e4836c3b50dd_MAC_KcB_15[] = { 0xf7, 0xae, 0x1b, 0xeb, 0x80, 0xd5, 0x74, 0x33, 0x12, 0x88, 0x6b, - 0x0d, 0xcb, 0xce, 0x62, 0x02, 0x23, 0x4a, 0x20, 0xa6, 0x11, 0x9e, - 0x95, 0x31, 0x0a, 0xad, 0xaf, 0x32, 0x3a, 0x2a, 0xcd, 0x39 }; +static const uint8_t chiptest_e4836c3b50dd_MAC_KcA_14[] = { 0xd4, 0x37, 0x6f, 0x2d, 0xa9, 0xc7, 0x22, 0x26, 0xdd, 0x15, 0x1b, + 0x77, 0xc2, 0x91, 0x90, 0x71, 0x15, 0x5f, 0xc2, 0x2a, 0x20, 0x68, + 0xd9, 0x0b, 0x5f, 0xaa, 0x6c, 0x78, 0xc1, 0x1e, 0x77, 0xdd }; +static const uint8_t chiptest_e4836c3b50dd_MAC_KcB_15[] = { 0x06, 0x60, 0xa6, 0x80, 0x66, 0x3e, 0x8c, 0x56, 0x95, 0x95, 0x6f, + 0xb2, 0x2d, 0xff, 0x29, 0x8b, 0x1d, 0x07, 0xa5, 0x26, 0xcf, 0x3c, + 0xc5, 0x91, 0xad, 0xfe, 0xcd, 0x1f, 0x6e, 0xf6, 0xe0, 0x2e }; static const struct spake2p_rfc_tv chiptest_e4836c3b50dd_test_vector_16 = { .context = reinterpret_cast("SPAKE2+-P256-SHA256-HKDF draft-01"), .context_len = 33, @@ -198,18 +198,18 @@ static const uint8_t chiptest_e4836c3b50dd_V_25[] = { }; static const uint8_t chiptest_e4836c3b50dd_Ka_26[] = { 0xe2, 0xcb, 0xee, 0x3a, 0xe1, 0x9a, 0x4d, 0xbe, 0x9f, 0x14, 0x6b, 0xe6, 0xbe, 0xe9, 0xbf, 0xa1 }; -static const uint8_t chiptest_e4836c3b50dd_Ke_27[] = { 0x65, 0x2a, 0x19, 0x95, 0x9d, 0x48, 0xc9, 0xcc, - 0x1b, 0x87, 0x6e, 0x2f, 0x2a, 0x3c, 0xe4, 0x38 }; +static const uint8_t chiptest_e4836c3b50dd_Ke_27[] = { 0x69, 0x89, 0xd8, 0xf9, 0x17, 0x7e, 0xf7, 0xdf, + 0x67, 0xda, 0x43, 0x79, 0x87, 0xf0, 0x72, 0x55 }; static const uint8_t chiptest_e4836c3b50dd_KcA_28[] = { 0x2f, 0x9e, 0x0b, 0xb6, 0x69, 0xd2, 0xc2, 0x26, 0x45, 0xbc, 0xe3, 0x4d, 0xa0, 0x4a, 0xc1, 0x6a }; static const uint8_t chiptest_e4836c3b50dd_KcB_29[] = { 0xeb, 0x7a, 0x35, 0x16, 0x87, 0x59, 0xdd, 0x8e, 0x9c, 0xe4, 0x4e, 0x4d, 0xc5, 0x12, 0x77, 0xce }; -static const uint8_t chiptest_e4836c3b50dd_MAC_KcA_30[] = { 0xfa, 0xda, 0x17, 0xfa, 0xeb, 0x1a, 0xb8, 0x7d, 0x1d, 0x56, 0xef, - 0xea, 0x91, 0xac, 0x5b, 0x04, 0xb6, 0x92, 0x6c, 0xe7, 0x8d, 0x1d, - 0x2f, 0x6d, 0x2e, 0xd9, 0xc2, 0x3f, 0x4c, 0xc8, 0xcc, 0x3b }; -static const uint8_t chiptest_e4836c3b50dd_MAC_KcB_31[] = { 0xe4, 0x26, 0x7d, 0x40, 0x78, 0xa4, 0xef, 0x9c, 0xd2, 0xf6, 0xef, - 0xc7, 0x6d, 0x65, 0xb4, 0x9f, 0xb8, 0xd7, 0x80, 0xb0, 0x0a, 0x45, - 0xb8, 0x92, 0x0b, 0xc5, 0xe1, 0xe8, 0x0e, 0x97, 0x02, 0xe4 }; +static const uint8_t chiptest_e4836c3b50dd_MAC_KcA_30[] = { 0xe1, 0xb9, 0x25, 0x88, 0x07, 0xba, 0x47, 0x50, 0xda, 0xe1, 0xd7, + 0xf3, 0xc3, 0xc2, 0x94, 0xf1, 0x3d, 0xc4, 0xfa, 0x60, 0xcd, 0xe3, + 0x46, 0xd5, 0xde, 0x7d, 0x20, 0x0e, 0x2f, 0x8f, 0xd3, 0xfc }; +static const uint8_t chiptest_e4836c3b50dd_MAC_KcB_31[] = { 0xb9, 0xc3, 0x9d, 0xfa, 0x49, 0xc4, 0x77, 0x57, 0xde, 0x77, 0x8d, + 0x9b, 0xed, 0xea, 0xca, 0x24, 0x48, 0xb9, 0x05, 0xbe, 0x19, 0xa4, + 0x3b, 0x94, 0xee, 0x24, 0xb7, 0x70, 0x20, 0x81, 0x35, 0xe3 }; static const struct spake2p_rfc_tv chiptest_e4836c3b50dd_test_vector_32 = { .context = reinterpret_cast("SPAKE2+-P256-SHA256-HKDF draft-01"), .context_len = 33, @@ -292,18 +292,18 @@ static const uint8_t chiptest_e4836c3b50dd_V_41[] = { }; static const uint8_t chiptest_e4836c3b50dd_Ka_42[] = { 0xec, 0x8d, 0x19, 0xb8, 0x07, 0xff, 0xb1, 0xd1, 0xee, 0xa8, 0x1a, 0x93, 0xba, 0x35, 0xcd, 0xfe }; -static const uint8_t chiptest_e4836c3b50dd_Ke_43[] = { 0x26, 0xed, 0x24, 0xeb, 0x31, 0xb0, 0x7b, 0x28, - 0x6a, 0x3d, 0x5f, 0xe6, 0x26, 0x37, 0xf1, 0xa7 }; +static const uint8_t chiptest_e4836c3b50dd_Ke_43[] = { 0x2e, 0xa4, 0x0e, 0x4b, 0xad, 0xfa, 0x54, 0x52, + 0xb5, 0x74, 0x4d, 0xc5, 0x98, 0x3e, 0x99, 0xba }; static const uint8_t chiptest_e4836c3b50dd_KcA_44[] = { 0x66, 0xde, 0x53, 0x4d, 0x9b, 0xf1, 0xe4, 0x4e, 0x96, 0xa5, 0x3a, 0x4b, 0x48, 0xd6, 0xb3, 0x53 }; static const uint8_t chiptest_e4836c3b50dd_KcB_45[] = { 0x49, 0x45, 0xc3, 0x8b, 0xb4, 0x76, 0xcb, 0x0f, 0x34, 0x7f, 0x32, 0x22, 0xbe, 0x9b, 0x64, 0xa2 }; -static const uint8_t chiptest_e4836c3b50dd_MAC_KcA_46[] = { 0x3e, 0x65, 0xa5, 0x4e, 0x88, 0x94, 0xe6, 0x8d, 0x10, 0x0e, 0x91, - 0xf5, 0xe8, 0x55, 0xd0, 0x1b, 0x9c, 0x6c, 0x33, 0xb4, 0x27, 0x2f, - 0x5b, 0xa2, 0x2a, 0x1d, 0x09, 0x85, 0x76, 0x6e, 0x3d, 0x2c }; -static const uint8_t chiptest_e4836c3b50dd_MAC_KcB_47[] = { 0xef, 0x57, 0xce, 0x5a, 0x96, 0x62, 0x06, 0x59, 0x10, 0x49, 0xfd, - 0xde, 0x1c, 0x35, 0x09, 0xa5, 0xcb, 0x6c, 0x4d, 0xa8, 0x00, 0x01, - 0x55, 0x5c, 0xcb, 0x13, 0xb5, 0x88, 0x08, 0x41, 0xd7, 0xb0 }; +static const uint8_t chiptest_e4836c3b50dd_MAC_KcA_46[] = { 0xe5, 0x64, 0xc9, 0x3b, 0x30, 0x15, 0xef, 0xb9, 0x46, 0xdc, 0x16, + 0xd6, 0x42, 0xbb, 0xe7, 0xd1, 0xc8, 0xda, 0x5b, 0xe1, 0x64, 0xed, + 0x9f, 0xc3, 0xba, 0xe4, 0xe0, 0xff, 0x86, 0xe1, 0xbd, 0x3c }; +static const uint8_t chiptest_e4836c3b50dd_MAC_KcB_47[] = { 0x07, 0x2a, 0x94, 0xd9, 0xa5, 0x4e, 0xdc, 0x20, 0x1d, 0x88, 0x91, + 0x53, 0x4c, 0x23, 0x17, 0xca, 0xdf, 0x3e, 0xa3, 0x79, 0x28, 0x27, + 0xf4, 0x79, 0xe8, 0x73, 0xf9, 0x3e, 0x90, 0xf2, 0x15, 0x52 }; static const struct spake2p_rfc_tv chiptest_e4836c3b50dd_test_vector_48 = { .context = reinterpret_cast("SPAKE2+-P256-SHA256-HKDF draft-01"), .context_len = 33, @@ -386,18 +386,18 @@ static const uint8_t chiptest_e4836c3b50dd_V_57[] = { }; static const uint8_t chiptest_e4836c3b50dd_Ka_58[] = { 0x59, 0x29, 0xa3, 0xce, 0x98, 0x22, 0xc8, 0x14, 0x01, 0xbf, 0x0f, 0x76, 0x4f, 0x69, 0xaf, 0x08 }; -static const uint8_t chiptest_e4836c3b50dd_Ke_59[] = { 0x02, 0xe6, 0x6a, 0xfc, 0x73, 0x1e, 0x20, 0x74, - 0x46, 0xcf, 0x30, 0x31, 0xb2, 0x22, 0xd9, 0x79 }; +static const uint8_t chiptest_e4836c3b50dd_Ke_59[] = { 0xea, 0x32, 0x76, 0xd6, 0x83, 0x34, 0x57, 0x60, + 0x97, 0xe0, 0x4b, 0x19, 0xee, 0x5a, 0x3a, 0x8b }; static const uint8_t chiptest_e4836c3b50dd_KcA_60[] = { 0x7f, 0x84, 0xb9, 0x39, 0xd6, 0x00, 0x11, 0x72, 0x56, 0xb0, 0xc8, 0xa6, 0xd4, 0x0c, 0xf1, 0x81 }; static const uint8_t chiptest_e4836c3b50dd_KcB_61[] = { 0xf7, 0xd7, 0x54, 0x7c, 0xed, 0x93, 0xf6, 0x81, 0xe8, 0xdf, 0x4c, 0x25, 0x8c, 0x45, 0x16, 0xfd }; -static const uint8_t chiptest_e4836c3b50dd_MAC_KcA_62[] = { 0x3e, 0x1b, 0xab, 0x1b, 0x88, 0xa9, 0x55, 0x87, 0x91, 0x2c, 0x2d, - 0x4a, 0xcb, 0xde, 0xaa, 0x5f, 0xcf, 0xe9, 0xda, 0xf1, 0x89, 0x3e, - 0xbe, 0xb5, 0x2d, 0x07, 0xe9, 0xf8, 0xe5, 0x4b, 0x85, 0x3d }; -static const uint8_t chiptest_e4836c3b50dd_MAC_KcB_63[] = { 0xaf, 0x83, 0xd2, 0xd0, 0x03, 0xf9, 0x42, 0x5c, 0x6a, 0x5c, 0xe1, - 0x52, 0x46, 0x10, 0x74, 0x5e, 0xb6, 0xb9, 0x4f, 0x0e, 0x62, 0xc4, - 0xf4, 0x2a, 0x4b, 0x16, 0x39, 0xd8, 0x34, 0x74, 0x0b, 0x67 }; +static const uint8_t chiptest_e4836c3b50dd_MAC_KcA_62[] = { 0x71, 0xd9, 0x41, 0x27, 0x79, 0xb6, 0xc4, 0x5a, 0x2c, 0x61, 0x5c, + 0x9d, 0xf3, 0xf1, 0xfd, 0x93, 0xdc, 0x0a, 0xaf, 0x63, 0x10, 0x4d, + 0xa8, 0xec, 0xe4, 0xaa, 0x1b, 0x5a, 0x3a, 0x41, 0x5f, 0xea }; +static const uint8_t chiptest_e4836c3b50dd_MAC_KcB_63[] = { 0x09, 0x5d, 0xc0, 0x40, 0x03, 0x55, 0xcc, 0x23, 0x3f, 0xde, 0x74, + 0x37, 0x81, 0x18, 0x15, 0xb3, 0xc1, 0x52, 0x4a, 0xae, 0x80, 0xfd, + 0x4e, 0x68, 0x10, 0xcf, 0x53, 0x1c, 0xf1, 0x1d, 0x20, 0xe3 }; static const struct spake2p_rfc_tv chiptest_e4836c3b50dd_test_vector_64 = { .context = reinterpret_cast("SPAKE2+-P256-SHA256-HKDF draft-01"), .context_len = 33, diff --git a/src/transport/PASESession.cpp b/src/transport/PASESession.cpp index 4e4dbe080de81c..38fbad41ade0d6 100644 --- a/src/transport/PASESession.cpp +++ b/src/transport/PASESession.cpp @@ -45,7 +45,7 @@ namespace chip { using namespace Crypto; -const char * kSpake2pContext = "SPAKE2+ Commissioning"; +const char * kSpake2pContext = "CHIP PAKE V1 Commissioning"; const char * kSpake2pI2RSessionInfo = "Commissioning I2R Key"; const char * kSpake2pR2ISessionInfo = "Commissioning R2I Key"; @@ -198,7 +198,10 @@ CHIP_ERROR PASESession::Init(Optional myNodeId, uint16_t myKeyId, uint32 CHIP_ERROR PASESession::SetupSpake2p(uint32_t pbkdf2IterCount, const uint8_t * salt, size_t saltLen) { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; + uint8_t context[32] = { + 0, + }; VerifyOrExit(salt != nullptr, err = CHIP_ERROR_INVALID_ARGUMENT); VerifyOrExit(saltLen > 0, err = CHIP_ERROR_INVALID_ARGUMENT); @@ -207,7 +210,10 @@ CHIP_ERROR PASESession::SetupSpake2p(uint32_t pbkdf2IterCount, const uint8_t * s sizeof(mWS), &mWS[0][0]); SuccessOrExit(err); - err = mSpake2p.Init(&mCommissioningHash); + err = mCommissioningHash.Finish(context); + SuccessOrExit(err); + + err = mSpake2p.Init(context, sizeof(context)); SuccessOrExit(err); exit: From c342fada2d341b661731dce10b56ef4a8f2d8aa4 Mon Sep 17 00:00:00 2001 From: Kamil Kasperczyk <66371704+kkasperczyk-no@users.noreply.github.com> Date: Tue, 2 Feb 2021 18:52:17 +0100 Subject: [PATCH 07/24] Align NFC URI format in Android CHIP Tool and nrfconnect firmware to the iOS. (#4498) There is a discussion on the CHIP-Specifications/connectedhomeip-spec#415 about need of replacing spaces with _ in the NFC URI, but it is not fixed yet. Currently iOS CHIP Tool is expecting _ characters, while other Android and nrfconnect platforms are still using spaces. * Added replacing _ with spaces in NFC payload for the Android CHIP Tool * Added replacing spaces with _ in NFC payload for nrfconnect samples --- examples/lighting-app/nrfconnect/main/AppTask.cpp | 5 +++++ examples/lock-app/nrfconnect/main/AppTask.cpp | 5 +++++ .../main/java/com/google/chip/chiptool/CHIPToolActivity.kt | 3 ++- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/examples/lighting-app/nrfconnect/main/AppTask.cpp b/examples/lighting-app/nrfconnect/main/AppTask.cpp index 320bedee55cde1..0b021d215b59ce 100644 --- a/examples/lighting-app/nrfconnect/main/AppTask.cpp +++ b/examples/lighting-app/nrfconnect/main/AppTask.cpp @@ -47,6 +47,8 @@ #include #include +#include + LOG_MODULE_DECLARE(app); namespace { @@ -442,6 +444,9 @@ int AppTask::StartNFCTag() int result = GetQRCode(QRCode, chip::RendezvousInformationFlags::kBLE); VerifyOrExit(!result, ChipLogError(AppServer, "Getting QR code payload failed")); + // TODO: Issue #4504 - Remove replacing spaces with _ after problem described in #415 will be fixed. + std::replace(QRCode.begin(), QRCode.end(), ' ', '_'); + result = sNFC.StartTagEmulation(QRCode.c_str(), QRCode.size()); VerifyOrExit(result >= 0, ChipLogError(AppServer, "Starting NFC Tag emulation failed")); diff --git a/examples/lock-app/nrfconnect/main/AppTask.cpp b/examples/lock-app/nrfconnect/main/AppTask.cpp index 8013a83c6d911e..298595b7d867db 100644 --- a/examples/lock-app/nrfconnect/main/AppTask.cpp +++ b/examples/lock-app/nrfconnect/main/AppTask.cpp @@ -42,6 +42,8 @@ #include #include +#include + #define FACTORY_RESET_TRIGGER_TIMEOUT 3000 #define FACTORY_RESET_CANCEL_WINDOW_TIMEOUT 3000 #define APP_EVENT_QUEUE_SIZE 10 @@ -444,6 +446,9 @@ int AppTask::StartNFCTag() int result = GetQRCode(QRCode, chip::RendezvousInformationFlags::kBLE); VerifyOrExit(!result, ChipLogError(AppServer, "Getting QR code payload failed")); + // TODO: Issue #4504 - Remove replacing spaces with _ after problem described in #415 will be fixed. + std::replace(QRCode.begin(), QRCode.end(), ' ', '_'); + result = sNFC.StartTagEmulation(QRCode.c_str(), QRCode.size()); VerifyOrExit(result >= 0, ChipLogError(AppServer, "Starting NFC Tag emulation failed")); diff --git a/src/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/CHIPToolActivity.kt b/src/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/CHIPToolActivity.kt index 6a0e8e37d09522..ed2eac69e58b3b 100644 --- a/src/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/CHIPToolActivity.kt +++ b/src/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/CHIPToolActivity.kt @@ -145,7 +145,8 @@ class CHIPToolActivity : val uri = records[0].toUri() if (!uri?.scheme.equals("ch", true)) return - val setupPayload = SetupPayloadParser().parseQrCode(uri.toString().toUpperCase()) + // TODO: Issue #4504 - Remove replacing _ with spaces after problem described in #415 will be fixed. + val setupPayload = SetupPayloadParser().parseQrCode(uri.toString().toUpperCase().replace('_', ' ')) val deviceInfo = CHIPDeviceInfo( setupPayload.version, setupPayload.vendorId, From af01f9365e045f9350e7970e7c0428759926695a Mon Sep 17 00:00:00 2001 From: Vivien Nicolas Date: Tue, 2 Feb 2021 18:58:46 +0100 Subject: [PATCH 08/24] Fix some conversion warnings when compiling some src/app files into examples/all-clusters-app with -Wconversion (#4605) ### Problem While trying to compile the `src/app` code into `examples/all-clusters-app/` with `-Wconversion` enabled, it complains about some conversions errors. For the record, those are: * error: implicit conversion changes signedness: 'int' to 'uint32_t' (aka 'unsigned int') [-Werror,-Wsign-conversion] * error: operand of ? changes signedness: 'int' to 'unsigned int' [-Werror,-Wsign-conversion] * error: conversion from 'long unsigned int' to 'uint32_t' {aka 'unsigned int'} may change value [-Werror=conversion] * error: conversion from 'int' to 'uint16_t' {aka 'short unsigned int'} may change value [-Werror=conversion] --- .../all-clusters-common/BUILD.gn | 2 + .../gen/call-command-handler.cpp | 628 +++++++++--------- .../all-clusters-common/gen/callback-stub.cpp | 4 +- .../all-clusters-common/gen/callback.h | 4 +- .../gen/call-command-handler.cpp | 86 +-- .../bridge-common/gen/callback-stub.cpp | 4 +- .../bridge-app/bridge-common/gen/callback.h | 4 +- .../gen/call-command-handler.cpp | 70 +- .../lighting-common/gen/callback-stub.cpp | 4 +- .../lighting-common/gen/callback.h | 4 +- .../lock-common/gen/callback-stub.cpp | 4 +- examples/lock-app/lock-common/gen/callback.h | 4 +- .../esp32/main/gen/callback-stub.cpp | 4 +- .../esp32/main/gen/callback.h | 4 +- src/app/reporting/reporting.cpp | 16 +- src/app/util/af-event.cpp | 6 +- src/app/util/client-api.cpp | 2 +- src/app/util/message.cpp | 6 +- .../zap-templates/common/ChipTypesHelper.js | 7 + .../command_handler_cluster_commands.zapt | 10 +- .../templates/app/callback-stub-src.zapt | 5 +- .../zap-templates/templates/app/callback.zapt | 4 +- src/app/zap-templates/templates/app/helper.js | 1 + 23 files changed, 453 insertions(+), 430 deletions(-) diff --git a/examples/all-clusters-app/all-clusters-common/BUILD.gn b/examples/all-clusters-app/all-clusters-common/BUILD.gn index 16d62bf5ccc183..8988b02d4d2aa2 100644 --- a/examples/all-clusters-app/all-clusters-common/BUILD.gn +++ b/examples/all-clusters-app/all-clusters-common/BUILD.gn @@ -62,6 +62,8 @@ source_set("all-clusters-common") { "gen/callback-stub.cpp", ] + cflags = [ "-Wconversion" ] + deps = [ "${chip_root}/src/lib" ] public_configs = [ ":includes" ] diff --git a/examples/all-clusters-app/all-clusters-common/gen/call-command-handler.cpp b/examples/all-clusters-app/all-clusters-common/gen/call-command-handler.cpp index f3947941ce13ea..773c0d65af1010 100644 --- a/examples/all-clusters-app/all-clusters-common/gen/call-command-handler.cpp +++ b/examples/all-clusters-app/all-clusters-common/gen/call-command-handler.cpp @@ -180,7 +180,7 @@ EmberAfStatus emberAfBarrierControlClusterServerCommandParse(EmberAfClusterComma switch (cmd->commandId) { case ZCL_BARRIER_CONTROL_GO_TO_PERCENT_COMMAND_ID: { - uint32_t payloadOffset = cmd->payloadStartIndex; + uint16_t payloadOffset = cmd->payloadStartIndex; uint8_t percentOpen; if (cmd->bufLen < payloadOffset + 1) @@ -240,7 +240,7 @@ EmberAfStatus emberAfBindingClusterServerCommandParse(EmberAfClusterCommand * cm switch (cmd->commandId) { case ZCL_BIND_COMMAND_ID: { - uint32_t payloadOffset = cmd->payloadStartIndex; + uint16_t payloadOffset = cmd->payloadStartIndex; chip::NodeId nodeId; chip::GroupId groupId; chip::EndpointId endpointId; @@ -250,20 +250,20 @@ EmberAfStatus emberAfBindingClusterServerCommandParse(EmberAfClusterCommand * cm { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - nodeId = emberAfGetInt64u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 8; + nodeId = emberAfGetInt64u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 8); if (cmd->bufLen < payloadOffset + 2) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - groupId = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 2; + groupId = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 2); if (cmd->bufLen < payloadOffset + 1) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - endpointId = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + endpointId = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 2) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; @@ -274,7 +274,7 @@ EmberAfStatus emberAfBindingClusterServerCommandParse(EmberAfClusterCommand * cm break; } case ZCL_UNBIND_COMMAND_ID: { - uint32_t payloadOffset = cmd->payloadStartIndex; + uint16_t payloadOffset = cmd->payloadStartIndex; chip::NodeId nodeId; chip::GroupId groupId; chip::EndpointId endpointId; @@ -284,20 +284,20 @@ EmberAfStatus emberAfBindingClusterServerCommandParse(EmberAfClusterCommand * cm { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - nodeId = emberAfGetInt64u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 8; + nodeId = emberAfGetInt64u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 8); if (cmd->bufLen < payloadOffset + 2) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - groupId = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 2; + groupId = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 2); if (cmd->bufLen < payloadOffset + 1) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - endpointId = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + endpointId = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 2) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; @@ -324,7 +324,7 @@ EmberAfStatus emberAfColorControlClusterServerCommandParse(EmberAfClusterCommand switch (cmd->commandId) { case ZCL_MOVE_COLOR_COMMAND_ID: { - uint32_t payloadOffset = cmd->payloadStartIndex; + uint16_t payloadOffset = cmd->payloadStartIndex; int16_t rateX; int16_t rateY; uint8_t optionsMask; @@ -334,20 +334,20 @@ EmberAfStatus emberAfColorControlClusterServerCommandParse(EmberAfClusterCommand { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - rateX = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 2; + rateX = static_cast(emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen)); + payloadOffset = static_cast(payloadOffset + 2); if (cmd->bufLen < payloadOffset + 2) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - rateY = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 2; + rateY = static_cast(emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen)); + payloadOffset = static_cast(payloadOffset + 2); if (cmd->bufLen < payloadOffset + 1) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - optionsMask = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + optionsMask = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 1) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; @@ -358,7 +358,7 @@ EmberAfStatus emberAfColorControlClusterServerCommandParse(EmberAfClusterCommand break; } case ZCL_MOVE_COLOR_TEMPERATURE_COMMAND_ID: { - uint32_t payloadOffset = cmd->payloadStartIndex; + uint16_t payloadOffset = cmd->payloadStartIndex; uint8_t moveMode; uint16_t rate; uint16_t colorTemperatureMinimum; @@ -370,32 +370,32 @@ EmberAfStatus emberAfColorControlClusterServerCommandParse(EmberAfClusterCommand { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - moveMode = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + moveMode = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 2) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - rate = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 2; + rate = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 2); if (cmd->bufLen < payloadOffset + 2) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } colorTemperatureMinimum = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 2; + payloadOffset = static_cast(payloadOffset + 2); if (cmd->bufLen < payloadOffset + 2) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } colorTemperatureMaximum = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 2; + payloadOffset = static_cast(payloadOffset + 2); if (cmd->bufLen < payloadOffset + 1) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - optionsMask = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + optionsMask = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 1) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; @@ -407,7 +407,7 @@ EmberAfStatus emberAfColorControlClusterServerCommandParse(EmberAfClusterCommand break; } case ZCL_MOVE_HUE_COMMAND_ID: { - uint32_t payloadOffset = cmd->payloadStartIndex; + uint16_t payloadOffset = cmd->payloadStartIndex; uint8_t moveMode; uint8_t rate; uint8_t optionsMask; @@ -417,20 +417,20 @@ EmberAfStatus emberAfColorControlClusterServerCommandParse(EmberAfClusterCommand { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - moveMode = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + moveMode = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 1) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - rate = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + rate = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 1) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - optionsMask = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + optionsMask = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 1) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; @@ -441,7 +441,7 @@ EmberAfStatus emberAfColorControlClusterServerCommandParse(EmberAfClusterCommand break; } case ZCL_MOVE_SATURATION_COMMAND_ID: { - uint32_t payloadOffset = cmd->payloadStartIndex; + uint16_t payloadOffset = cmd->payloadStartIndex; uint8_t moveMode; uint8_t rate; uint8_t optionsMask; @@ -451,20 +451,20 @@ EmberAfStatus emberAfColorControlClusterServerCommandParse(EmberAfClusterCommand { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - moveMode = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + moveMode = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 1) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - rate = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + rate = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 1) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - optionsMask = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + optionsMask = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 1) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; @@ -475,7 +475,7 @@ EmberAfStatus emberAfColorControlClusterServerCommandParse(EmberAfClusterCommand break; } case ZCL_MOVE_TO_COLOR_COMMAND_ID: { - uint32_t payloadOffset = cmd->payloadStartIndex; + uint16_t payloadOffset = cmd->payloadStartIndex; uint16_t colorX; uint16_t colorY; uint16_t transitionTime; @@ -486,26 +486,26 @@ EmberAfStatus emberAfColorControlClusterServerCommandParse(EmberAfClusterCommand { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - colorX = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 2; + colorX = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 2); if (cmd->bufLen < payloadOffset + 2) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - colorY = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 2; + colorY = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 2); if (cmd->bufLen < payloadOffset + 2) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } transitionTime = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 2; + payloadOffset = static_cast(payloadOffset + 2); if (cmd->bufLen < payloadOffset + 1) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - optionsMask = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + optionsMask = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 1) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; @@ -517,7 +517,7 @@ EmberAfStatus emberAfColorControlClusterServerCommandParse(EmberAfClusterCommand break; } case ZCL_MOVE_TO_COLOR_TEMPERATURE_COMMAND_ID: { - uint32_t payloadOffset = cmd->payloadStartIndex; + uint16_t payloadOffset = cmd->payloadStartIndex; uint16_t colorTemperature; uint16_t transitionTime; uint8_t optionsMask; @@ -528,19 +528,19 @@ EmberAfStatus emberAfColorControlClusterServerCommandParse(EmberAfClusterCommand return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } colorTemperature = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 2; + payloadOffset = static_cast(payloadOffset + 2); if (cmd->bufLen < payloadOffset + 2) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } transitionTime = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 2; + payloadOffset = static_cast(payloadOffset + 2); if (cmd->bufLen < payloadOffset + 1) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - optionsMask = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + optionsMask = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 1) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; @@ -552,7 +552,7 @@ EmberAfStatus emberAfColorControlClusterServerCommandParse(EmberAfClusterCommand break; } case ZCL_MOVE_TO_HUE_COMMAND_ID: { - uint32_t payloadOffset = cmd->payloadStartIndex; + uint16_t payloadOffset = cmd->payloadStartIndex; uint8_t hue; uint8_t direction; uint16_t transitionTime; @@ -563,26 +563,26 @@ EmberAfStatus emberAfColorControlClusterServerCommandParse(EmberAfClusterCommand { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - hue = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + hue = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 1) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - direction = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + direction = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 2) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } transitionTime = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 2; + payloadOffset = static_cast(payloadOffset + 2); if (cmd->bufLen < payloadOffset + 1) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - optionsMask = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + optionsMask = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 1) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; @@ -593,7 +593,7 @@ EmberAfStatus emberAfColorControlClusterServerCommandParse(EmberAfClusterCommand break; } case ZCL_MOVE_TO_HUE_AND_SATURATION_COMMAND_ID: { - uint32_t payloadOffset = cmd->payloadStartIndex; + uint16_t payloadOffset = cmd->payloadStartIndex; uint8_t hue; uint8_t saturation; uint16_t transitionTime; @@ -604,26 +604,26 @@ EmberAfStatus emberAfColorControlClusterServerCommandParse(EmberAfClusterCommand { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - hue = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + hue = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 1) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - saturation = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + saturation = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 2) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } transitionTime = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 2; + payloadOffset = static_cast(payloadOffset + 2); if (cmd->bufLen < payloadOffset + 1) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - optionsMask = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + optionsMask = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 1) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; @@ -635,7 +635,7 @@ EmberAfStatus emberAfColorControlClusterServerCommandParse(EmberAfClusterCommand break; } case ZCL_MOVE_TO_SATURATION_COMMAND_ID: { - uint32_t payloadOffset = cmd->payloadStartIndex; + uint16_t payloadOffset = cmd->payloadStartIndex; uint8_t saturation; uint16_t transitionTime; uint8_t optionsMask; @@ -645,20 +645,20 @@ EmberAfStatus emberAfColorControlClusterServerCommandParse(EmberAfClusterCommand { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - saturation = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + saturation = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 2) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } transitionTime = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 2; + payloadOffset = static_cast(payloadOffset + 2); if (cmd->bufLen < payloadOffset + 1) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - optionsMask = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + optionsMask = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 1) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; @@ -670,7 +670,7 @@ EmberAfStatus emberAfColorControlClusterServerCommandParse(EmberAfClusterCommand break; } case ZCL_STEP_COLOR_COMMAND_ID: { - uint32_t payloadOffset = cmd->payloadStartIndex; + uint16_t payloadOffset = cmd->payloadStartIndex; int16_t stepX; int16_t stepY; uint16_t transitionTime; @@ -681,26 +681,26 @@ EmberAfStatus emberAfColorControlClusterServerCommandParse(EmberAfClusterCommand { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - stepX = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 2; + stepX = static_cast(emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen)); + payloadOffset = static_cast(payloadOffset + 2); if (cmd->bufLen < payloadOffset + 2) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - stepY = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 2; + stepY = static_cast(emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen)); + payloadOffset = static_cast(payloadOffset + 2); if (cmd->bufLen < payloadOffset + 2) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } transitionTime = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 2; + payloadOffset = static_cast(payloadOffset + 2); if (cmd->bufLen < payloadOffset + 1) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - optionsMask = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + optionsMask = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 1) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; @@ -711,7 +711,7 @@ EmberAfStatus emberAfColorControlClusterServerCommandParse(EmberAfClusterCommand break; } case ZCL_STEP_COLOR_TEMPERATURE_COMMAND_ID: { - uint32_t payloadOffset = cmd->payloadStartIndex; + uint16_t payloadOffset = cmd->payloadStartIndex; uint8_t stepMode; uint16_t stepSize; uint16_t transitionTime; @@ -724,38 +724,38 @@ EmberAfStatus emberAfColorControlClusterServerCommandParse(EmberAfClusterCommand { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - stepMode = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + stepMode = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 2) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - stepSize = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 2; + stepSize = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 2); if (cmd->bufLen < payloadOffset + 2) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } transitionTime = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 2; + payloadOffset = static_cast(payloadOffset + 2); if (cmd->bufLen < payloadOffset + 2) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } colorTemperatureMinimum = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 2; + payloadOffset = static_cast(payloadOffset + 2); if (cmd->bufLen < payloadOffset + 2) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } colorTemperatureMaximum = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 2; + payloadOffset = static_cast(payloadOffset + 2); if (cmd->bufLen < payloadOffset + 1) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - optionsMask = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + optionsMask = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 1) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; @@ -767,7 +767,7 @@ EmberAfStatus emberAfColorControlClusterServerCommandParse(EmberAfClusterCommand break; } case ZCL_STEP_HUE_COMMAND_ID: { - uint32_t payloadOffset = cmd->payloadStartIndex; + uint16_t payloadOffset = cmd->payloadStartIndex; uint8_t stepMode; uint8_t stepSize; uint8_t transitionTime; @@ -778,26 +778,26 @@ EmberAfStatus emberAfColorControlClusterServerCommandParse(EmberAfClusterCommand { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - stepMode = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + stepMode = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 1) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - stepSize = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + stepSize = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 1) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } transitionTime = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 1) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - optionsMask = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + optionsMask = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 1) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; @@ -809,7 +809,7 @@ EmberAfStatus emberAfColorControlClusterServerCommandParse(EmberAfClusterCommand break; } case ZCL_STEP_SATURATION_COMMAND_ID: { - uint32_t payloadOffset = cmd->payloadStartIndex; + uint16_t payloadOffset = cmd->payloadStartIndex; uint8_t stepMode; uint8_t stepSize; uint8_t transitionTime; @@ -820,26 +820,26 @@ EmberAfStatus emberAfColorControlClusterServerCommandParse(EmberAfClusterCommand { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - stepMode = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + stepMode = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 1) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - stepSize = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + stepSize = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 1) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } transitionTime = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 1) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - optionsMask = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + optionsMask = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 1) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; @@ -851,7 +851,7 @@ EmberAfStatus emberAfColorControlClusterServerCommandParse(EmberAfClusterCommand break; } case ZCL_STOP_MOVE_STEP_COMMAND_ID: { - uint32_t payloadOffset = cmd->payloadStartIndex; + uint16_t payloadOffset = cmd->payloadStartIndex; uint8_t optionsMask; uint8_t optionsOverride; @@ -859,8 +859,8 @@ EmberAfStatus emberAfColorControlClusterServerCommandParse(EmberAfClusterCommand { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - optionsMask = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + optionsMask = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 1) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; @@ -887,7 +887,7 @@ EmberAfStatus emberAfDoorLockClusterClientCommandParse(EmberAfClusterCommand * c switch (cmd->commandId) { case ZCL_LOCK_DOOR_RESPONSE_COMMAND_ID: { - uint32_t payloadOffset = cmd->payloadStartIndex; + uint16_t payloadOffset = cmd->payloadStartIndex; uint8_t status; if (cmd->bufLen < payloadOffset + 1) @@ -900,7 +900,7 @@ EmberAfStatus emberAfDoorLockClusterClientCommandParse(EmberAfClusterCommand * c break; } case ZCL_UNLOCK_DOOR_RESPONSE_COMMAND_ID: { - uint32_t payloadOffset = cmd->payloadStartIndex; + uint16_t payloadOffset = cmd->payloadStartIndex; uint8_t status; if (cmd->bufLen < payloadOffset + 1) @@ -937,7 +937,7 @@ EmberAfStatus emberAfDoorLockClusterServerCommandParse(EmberAfClusterCommand * c break; } case ZCL_CLEAR_HOLIDAY_SCHEDULE_COMMAND_ID: { - uint32_t payloadOffset = cmd->payloadStartIndex; + uint16_t payloadOffset = cmd->payloadStartIndex; uint8_t scheduleId; if (cmd->bufLen < payloadOffset + 1) @@ -950,7 +950,7 @@ EmberAfStatus emberAfDoorLockClusterServerCommandParse(EmberAfClusterCommand * c break; } case ZCL_CLEAR_PIN_COMMAND_ID: { - uint32_t payloadOffset = cmd->payloadStartIndex; + uint16_t payloadOffset = cmd->payloadStartIndex; uint16_t userId; if (cmd->bufLen < payloadOffset + 2) @@ -963,7 +963,7 @@ EmberAfStatus emberAfDoorLockClusterServerCommandParse(EmberAfClusterCommand * c break; } case ZCL_CLEAR_RFID_COMMAND_ID: { - uint32_t payloadOffset = cmd->payloadStartIndex; + uint16_t payloadOffset = cmd->payloadStartIndex; uint16_t userId; if (cmd->bufLen < payloadOffset + 2) @@ -976,7 +976,7 @@ EmberAfStatus emberAfDoorLockClusterServerCommandParse(EmberAfClusterCommand * c break; } case ZCL_CLEAR_WEEKDAY_SCHEDULE_COMMAND_ID: { - uint32_t payloadOffset = cmd->payloadStartIndex; + uint16_t payloadOffset = cmd->payloadStartIndex; uint8_t scheduleId; uint16_t userId; @@ -984,8 +984,8 @@ EmberAfStatus emberAfDoorLockClusterServerCommandParse(EmberAfClusterCommand * c { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - scheduleId = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + scheduleId = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 2) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; @@ -996,7 +996,7 @@ EmberAfStatus emberAfDoorLockClusterServerCommandParse(EmberAfClusterCommand * c break; } case ZCL_CLEAR_YEARDAY_SCHEDULE_COMMAND_ID: { - uint32_t payloadOffset = cmd->payloadStartIndex; + uint16_t payloadOffset = cmd->payloadStartIndex; uint8_t scheduleId; uint16_t userId; @@ -1004,8 +1004,8 @@ EmberAfStatus emberAfDoorLockClusterServerCommandParse(EmberAfClusterCommand * c { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - scheduleId = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + scheduleId = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 2) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; @@ -1016,7 +1016,7 @@ EmberAfStatus emberAfDoorLockClusterServerCommandParse(EmberAfClusterCommand * c break; } case ZCL_GET_HOLIDAY_SCHEDULE_COMMAND_ID: { - uint32_t payloadOffset = cmd->payloadStartIndex; + uint16_t payloadOffset = cmd->payloadStartIndex; uint8_t scheduleId; if (cmd->bufLen < payloadOffset + 1) @@ -1029,7 +1029,7 @@ EmberAfStatus emberAfDoorLockClusterServerCommandParse(EmberAfClusterCommand * c break; } case ZCL_GET_LOG_RECORD_COMMAND_ID: { - uint32_t payloadOffset = cmd->payloadStartIndex; + uint16_t payloadOffset = cmd->payloadStartIndex; uint16_t logIndex; if (cmd->bufLen < payloadOffset + 2) @@ -1042,7 +1042,7 @@ EmberAfStatus emberAfDoorLockClusterServerCommandParse(EmberAfClusterCommand * c break; } case ZCL_GET_PIN_COMMAND_ID: { - uint32_t payloadOffset = cmd->payloadStartIndex; + uint16_t payloadOffset = cmd->payloadStartIndex; uint16_t userId; if (cmd->bufLen < payloadOffset + 2) @@ -1055,7 +1055,7 @@ EmberAfStatus emberAfDoorLockClusterServerCommandParse(EmberAfClusterCommand * c break; } case ZCL_GET_RFID_COMMAND_ID: { - uint32_t payloadOffset = cmd->payloadStartIndex; + uint16_t payloadOffset = cmd->payloadStartIndex; uint16_t userId; if (cmd->bufLen < payloadOffset + 2) @@ -1068,7 +1068,7 @@ EmberAfStatus emberAfDoorLockClusterServerCommandParse(EmberAfClusterCommand * c break; } case ZCL_GET_USER_TYPE_COMMAND_ID: { - uint32_t payloadOffset = cmd->payloadStartIndex; + uint16_t payloadOffset = cmd->payloadStartIndex; uint16_t userId; if (cmd->bufLen < payloadOffset + 2) @@ -1081,7 +1081,7 @@ EmberAfStatus emberAfDoorLockClusterServerCommandParse(EmberAfClusterCommand * c break; } case ZCL_GET_WEEKDAY_SCHEDULE_COMMAND_ID: { - uint32_t payloadOffset = cmd->payloadStartIndex; + uint16_t payloadOffset = cmd->payloadStartIndex; uint8_t scheduleId; uint16_t userId; @@ -1089,8 +1089,8 @@ EmberAfStatus emberAfDoorLockClusterServerCommandParse(EmberAfClusterCommand * c { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - scheduleId = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + scheduleId = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 2) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; @@ -1101,7 +1101,7 @@ EmberAfStatus emberAfDoorLockClusterServerCommandParse(EmberAfClusterCommand * c break; } case ZCL_GET_YEARDAY_SCHEDULE_COMMAND_ID: { - uint32_t payloadOffset = cmd->payloadStartIndex; + uint16_t payloadOffset = cmd->payloadStartIndex; uint8_t scheduleId; uint16_t userId; @@ -1109,8 +1109,8 @@ EmberAfStatus emberAfDoorLockClusterServerCommandParse(EmberAfClusterCommand * c { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - scheduleId = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + scheduleId = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 2) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; @@ -1121,7 +1121,7 @@ EmberAfStatus emberAfDoorLockClusterServerCommandParse(EmberAfClusterCommand * c break; } case ZCL_LOCK_DOOR_COMMAND_ID: { - uint32_t payloadOffset = cmd->payloadStartIndex; + uint16_t payloadOffset = cmd->payloadStartIndex; uint8_t * PIN; if (cmd->bufLen < payloadOffset + 1u) @@ -1134,7 +1134,7 @@ EmberAfStatus emberAfDoorLockClusterServerCommandParse(EmberAfClusterCommand * c break; } case ZCL_SET_HOLIDAY_SCHEDULE_COMMAND_ID: { - uint32_t payloadOffset = cmd->payloadStartIndex; + uint16_t payloadOffset = cmd->payloadStartIndex; uint8_t scheduleId; uint32_t localStartTime; uint32_t localEndTime; @@ -1144,20 +1144,20 @@ EmberAfStatus emberAfDoorLockClusterServerCommandParse(EmberAfClusterCommand * c { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - scheduleId = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + scheduleId = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 4) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } localStartTime = emberAfGetInt32u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 4; + payloadOffset = static_cast(payloadOffset + 4); if (cmd->bufLen < payloadOffset + 4) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - localEndTime = emberAfGetInt32u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 4; + localEndTime = emberAfGetInt32u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 4); if (cmd->bufLen < payloadOffset + 1) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; @@ -1169,7 +1169,7 @@ EmberAfStatus emberAfDoorLockClusterServerCommandParse(EmberAfClusterCommand * c break; } case ZCL_SET_PIN_COMMAND_ID: { - uint32_t payloadOffset = cmd->payloadStartIndex; + uint16_t payloadOffset = cmd->payloadStartIndex; uint16_t userId; uint8_t userStatus; uint8_t userType; @@ -1179,20 +1179,20 @@ EmberAfStatus emberAfDoorLockClusterServerCommandParse(EmberAfClusterCommand * c { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - userId = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 2; + userId = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 2); if (cmd->bufLen < payloadOffset + 1) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - userStatus = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + userStatus = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 1) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - userType = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + userType = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 1u) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; @@ -1203,7 +1203,7 @@ EmberAfStatus emberAfDoorLockClusterServerCommandParse(EmberAfClusterCommand * c break; } case ZCL_SET_RFID_COMMAND_ID: { - uint32_t payloadOffset = cmd->payloadStartIndex; + uint16_t payloadOffset = cmd->payloadStartIndex; uint16_t userId; uint8_t userStatus; uint8_t userType; @@ -1213,20 +1213,20 @@ EmberAfStatus emberAfDoorLockClusterServerCommandParse(EmberAfClusterCommand * c { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - userId = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 2; + userId = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 2); if (cmd->bufLen < payloadOffset + 1) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - userStatus = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + userStatus = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 1) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - userType = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + userType = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 1u) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; @@ -1237,7 +1237,7 @@ EmberAfStatus emberAfDoorLockClusterServerCommandParse(EmberAfClusterCommand * c break; } case ZCL_SET_USER_TYPE_COMMAND_ID: { - uint32_t payloadOffset = cmd->payloadStartIndex; + uint16_t payloadOffset = cmd->payloadStartIndex; uint16_t userId; uint8_t userType; @@ -1245,8 +1245,8 @@ EmberAfStatus emberAfDoorLockClusterServerCommandParse(EmberAfClusterCommand * c { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - userId = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 2; + userId = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 2); if (cmd->bufLen < payloadOffset + 1) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; @@ -1257,7 +1257,7 @@ EmberAfStatus emberAfDoorLockClusterServerCommandParse(EmberAfClusterCommand * c break; } case ZCL_SET_WEEKDAY_SCHEDULE_COMMAND_ID: { - uint32_t payloadOffset = cmd->payloadStartIndex; + uint16_t payloadOffset = cmd->payloadStartIndex; uint8_t scheduleId; uint16_t userId; uint8_t daysMask; @@ -1270,38 +1270,38 @@ EmberAfStatus emberAfDoorLockClusterServerCommandParse(EmberAfClusterCommand * c { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - scheduleId = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + scheduleId = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 2) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - userId = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 2; + userId = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 2); if (cmd->bufLen < payloadOffset + 1) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - daysMask = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + daysMask = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 1) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - startHour = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + startHour = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 1) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - startMinute = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + startMinute = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 1) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - endHour = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + endHour = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 1) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; @@ -1313,7 +1313,7 @@ EmberAfStatus emberAfDoorLockClusterServerCommandParse(EmberAfClusterCommand * c break; } case ZCL_SET_YEARDAY_SCHEDULE_COMMAND_ID: { - uint32_t payloadOffset = cmd->payloadStartIndex; + uint16_t payloadOffset = cmd->payloadStartIndex; uint8_t scheduleId; uint16_t userId; uint32_t localStartTime; @@ -1323,20 +1323,20 @@ EmberAfStatus emberAfDoorLockClusterServerCommandParse(EmberAfClusterCommand * c { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - scheduleId = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + scheduleId = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 2) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - userId = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 2; + userId = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 2); if (cmd->bufLen < payloadOffset + 4) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } localStartTime = emberAfGetInt32u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 4; + payloadOffset = static_cast(payloadOffset + 4); if (cmd->bufLen < payloadOffset + 4) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; @@ -1347,7 +1347,7 @@ EmberAfStatus emberAfDoorLockClusterServerCommandParse(EmberAfClusterCommand * c break; } case ZCL_UNLOCK_DOOR_COMMAND_ID: { - uint32_t payloadOffset = cmd->payloadStartIndex; + uint16_t payloadOffset = cmd->payloadStartIndex; uint8_t * PIN; if (cmd->bufLen < payloadOffset + 1u) @@ -1360,7 +1360,7 @@ EmberAfStatus emberAfDoorLockClusterServerCommandParse(EmberAfClusterCommand * c break; } case ZCL_UNLOCK_WITH_TIMEOUT_COMMAND_ID: { - uint32_t payloadOffset = cmd->payloadStartIndex; + uint16_t payloadOffset = cmd->payloadStartIndex; uint16_t timeoutInSeconds; uint8_t * pin; @@ -1369,7 +1369,7 @@ EmberAfStatus emberAfDoorLockClusterServerCommandParse(EmberAfClusterCommand * c return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } timeoutInSeconds = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 2; + payloadOffset = static_cast(payloadOffset + 2); if (cmd->bufLen < payloadOffset + 1u) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; @@ -1396,7 +1396,7 @@ EmberAfStatus emberAfGroupsClusterClientCommandParse(EmberAfClusterCommand * cmd switch (cmd->commandId) { case ZCL_ADD_GROUP_RESPONSE_COMMAND_ID: { - uint32_t payloadOffset = cmd->payloadStartIndex; + uint16_t payloadOffset = cmd->payloadStartIndex; uint8_t status; uint16_t groupId; @@ -1404,8 +1404,8 @@ EmberAfStatus emberAfGroupsClusterClientCommandParse(EmberAfClusterCommand * cmd { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - status = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + status = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 2) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; @@ -1416,7 +1416,7 @@ EmberAfStatus emberAfGroupsClusterClientCommandParse(EmberAfClusterCommand * cmd break; } case ZCL_GET_GROUP_MEMBERSHIP_RESPONSE_COMMAND_ID: { - uint32_t payloadOffset = cmd->payloadStartIndex; + uint16_t payloadOffset = cmd->payloadStartIndex; uint8_t capacity; uint8_t groupCount; /* TYPE WARNING: array array defaults to */ uint8_t * groupList; @@ -1425,21 +1425,21 @@ EmberAfStatus emberAfGroupsClusterClientCommandParse(EmberAfClusterCommand * cmd { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - capacity = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + capacity = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 1) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - groupCount = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; - groupList = cmd->buffer + payloadOffset; + groupCount = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); + groupList = cmd->buffer + payloadOffset; wasHandled = emberAfGroupsClusterGetGroupMembershipResponseCallback(capacity, groupCount, groupList); break; } case ZCL_REMOVE_GROUP_RESPONSE_COMMAND_ID: { - uint32_t payloadOffset = cmd->payloadStartIndex; + uint16_t payloadOffset = cmd->payloadStartIndex; uint8_t status; uint16_t groupId; @@ -1447,8 +1447,8 @@ EmberAfStatus emberAfGroupsClusterClientCommandParse(EmberAfClusterCommand * cmd { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - status = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + status = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 2) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; @@ -1459,7 +1459,7 @@ EmberAfStatus emberAfGroupsClusterClientCommandParse(EmberAfClusterCommand * cmd break; } case ZCL_VIEW_GROUP_RESPONSE_COMMAND_ID: { - uint32_t payloadOffset = cmd->payloadStartIndex; + uint16_t payloadOffset = cmd->payloadStartIndex; uint8_t status; uint16_t groupId; uint8_t * groupName; @@ -1468,14 +1468,14 @@ EmberAfStatus emberAfGroupsClusterClientCommandParse(EmberAfClusterCommand * cmd { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - status = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + status = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 2) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - groupId = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 2; + groupId = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 2); if (cmd->bufLen < payloadOffset + 1u) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; @@ -1502,7 +1502,7 @@ EmberAfStatus emberAfGroupsClusterServerCommandParse(EmberAfClusterCommand * cmd switch (cmd->commandId) { case ZCL_ADD_GROUP_COMMAND_ID: { - uint32_t payloadOffset = cmd->payloadStartIndex; + uint16_t payloadOffset = cmd->payloadStartIndex; uint16_t groupId; uint8_t * groupName; @@ -1510,8 +1510,8 @@ EmberAfStatus emberAfGroupsClusterServerCommandParse(EmberAfClusterCommand * cmd { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - groupId = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 2; + groupId = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 2); if (cmd->bufLen < payloadOffset + 1u) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; @@ -1522,7 +1522,7 @@ EmberAfStatus emberAfGroupsClusterServerCommandParse(EmberAfClusterCommand * cmd break; } case ZCL_ADD_GROUP_IF_IDENTIFYING_COMMAND_ID: { - uint32_t payloadOffset = cmd->payloadStartIndex; + uint16_t payloadOffset = cmd->payloadStartIndex; uint16_t groupId; uint8_t * groupName; @@ -1530,8 +1530,8 @@ EmberAfStatus emberAfGroupsClusterServerCommandParse(EmberAfClusterCommand * cmd { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - groupId = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 2; + groupId = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 2); if (cmd->bufLen < payloadOffset + 1u) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; @@ -1542,7 +1542,7 @@ EmberAfStatus emberAfGroupsClusterServerCommandParse(EmberAfClusterCommand * cmd break; } case ZCL_GET_GROUP_MEMBERSHIP_COMMAND_ID: { - uint32_t payloadOffset = cmd->payloadStartIndex; + uint16_t payloadOffset = cmd->payloadStartIndex; uint8_t groupCount; /* TYPE WARNING: array array defaults to */ uint8_t * groupList; @@ -1550,9 +1550,9 @@ EmberAfStatus emberAfGroupsClusterServerCommandParse(EmberAfClusterCommand * cmd { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - groupCount = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; - groupList = cmd->buffer + payloadOffset; + groupCount = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); + groupList = cmd->buffer + payloadOffset; wasHandled = emberAfGroupsClusterGetGroupMembershipCallback(groupCount, groupList); break; @@ -1562,7 +1562,7 @@ EmberAfStatus emberAfGroupsClusterServerCommandParse(EmberAfClusterCommand * cmd break; } case ZCL_REMOVE_GROUP_COMMAND_ID: { - uint32_t payloadOffset = cmd->payloadStartIndex; + uint16_t payloadOffset = cmd->payloadStartIndex; uint16_t groupId; if (cmd->bufLen < payloadOffset + 2) @@ -1575,7 +1575,7 @@ EmberAfStatus emberAfGroupsClusterServerCommandParse(EmberAfClusterCommand * cmd break; } case ZCL_VIEW_GROUP_COMMAND_ID: { - uint32_t payloadOffset = cmd->payloadStartIndex; + uint16_t payloadOffset = cmd->payloadStartIndex; uint16_t groupId; if (cmd->bufLen < payloadOffset + 2) @@ -1604,7 +1604,7 @@ EmberAfStatus emberAfIasZoneClusterServerCommandParse(EmberAfClusterCommand * cm switch (cmd->commandId) { case ZCL_ZONE_ENROLL_RESPONSE_COMMAND_ID: { - uint32_t payloadOffset = cmd->payloadStartIndex; + uint16_t payloadOffset = cmd->payloadStartIndex; uint8_t enrollResponseCode; uint8_t zoneId; @@ -1613,7 +1613,7 @@ EmberAfStatus emberAfIasZoneClusterServerCommandParse(EmberAfClusterCommand * cm return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } enrollResponseCode = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 1) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; @@ -1640,7 +1640,7 @@ EmberAfStatus emberAfIdentifyClusterClientCommandParse(EmberAfClusterCommand * c switch (cmd->commandId) { case ZCL_IDENTIFY_QUERY_RESPONSE_COMMAND_ID: { - uint32_t payloadOffset = cmd->payloadStartIndex; + uint16_t payloadOffset = cmd->payloadStartIndex; uint16_t timeout; if (cmd->bufLen < payloadOffset + 2) @@ -1669,7 +1669,7 @@ EmberAfStatus emberAfIdentifyClusterServerCommandParse(EmberAfClusterCommand * c switch (cmd->commandId) { case ZCL_IDENTIFY_COMMAND_ID: { - uint32_t payloadOffset = cmd->payloadStartIndex; + uint16_t payloadOffset = cmd->payloadStartIndex; uint16_t identifyTime; if (cmd->bufLen < payloadOffset + 2) @@ -1702,7 +1702,7 @@ EmberAfStatus emberAfLevelControlClusterServerCommandParse(EmberAfClusterCommand switch (cmd->commandId) { case ZCL_MOVE_COMMAND_ID: { - uint32_t payloadOffset = cmd->payloadStartIndex; + uint16_t payloadOffset = cmd->payloadStartIndex; uint8_t moveMode; uint8_t rate; uint8_t optionMask; @@ -1712,20 +1712,20 @@ EmberAfStatus emberAfLevelControlClusterServerCommandParse(EmberAfClusterCommand { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - moveMode = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + moveMode = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 1) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - rate = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + rate = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 1) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - optionMask = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + optionMask = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 1) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; @@ -1736,7 +1736,7 @@ EmberAfStatus emberAfLevelControlClusterServerCommandParse(EmberAfClusterCommand break; } case ZCL_MOVE_TO_LEVEL_COMMAND_ID: { - uint32_t payloadOffset = cmd->payloadStartIndex; + uint16_t payloadOffset = cmd->payloadStartIndex; uint8_t level; uint16_t transitionTime; uint8_t optionMask; @@ -1746,20 +1746,20 @@ EmberAfStatus emberAfLevelControlClusterServerCommandParse(EmberAfClusterCommand { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - level = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + level = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 2) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } transitionTime = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 2; + payloadOffset = static_cast(payloadOffset + 2); if (cmd->bufLen < payloadOffset + 1) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - optionMask = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + optionMask = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 1) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; @@ -1770,7 +1770,7 @@ EmberAfStatus emberAfLevelControlClusterServerCommandParse(EmberAfClusterCommand break; } case ZCL_MOVE_TO_LEVEL_WITH_ON_OFF_COMMAND_ID: { - uint32_t payloadOffset = cmd->payloadStartIndex; + uint16_t payloadOffset = cmd->payloadStartIndex; uint8_t level; uint16_t transitionTime; @@ -1778,8 +1778,8 @@ EmberAfStatus emberAfLevelControlClusterServerCommandParse(EmberAfClusterCommand { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - level = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + level = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 2) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; @@ -1790,7 +1790,7 @@ EmberAfStatus emberAfLevelControlClusterServerCommandParse(EmberAfClusterCommand break; } case ZCL_MOVE_WITH_ON_OFF_COMMAND_ID: { - uint32_t payloadOffset = cmd->payloadStartIndex; + uint16_t payloadOffset = cmd->payloadStartIndex; uint8_t moveMode; uint8_t rate; @@ -1798,8 +1798,8 @@ EmberAfStatus emberAfLevelControlClusterServerCommandParse(EmberAfClusterCommand { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - moveMode = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + moveMode = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 1) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; @@ -1810,7 +1810,7 @@ EmberAfStatus emberAfLevelControlClusterServerCommandParse(EmberAfClusterCommand break; } case ZCL_STEP_COMMAND_ID: { - uint32_t payloadOffset = cmd->payloadStartIndex; + uint16_t payloadOffset = cmd->payloadStartIndex; uint8_t stepMode; uint8_t stepSize; uint16_t transitionTime; @@ -1821,26 +1821,26 @@ EmberAfStatus emberAfLevelControlClusterServerCommandParse(EmberAfClusterCommand { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - stepMode = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + stepMode = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 1) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - stepSize = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + stepSize = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 2) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } transitionTime = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 2; + payloadOffset = static_cast(payloadOffset + 2); if (cmd->bufLen < payloadOffset + 1) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - optionMask = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + optionMask = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 1) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; @@ -1851,7 +1851,7 @@ EmberAfStatus emberAfLevelControlClusterServerCommandParse(EmberAfClusterCommand break; } case ZCL_STEP_WITH_ON_OFF_COMMAND_ID: { - uint32_t payloadOffset = cmd->payloadStartIndex; + uint16_t payloadOffset = cmd->payloadStartIndex; uint8_t stepMode; uint8_t stepSize; uint16_t transitionTime; @@ -1860,14 +1860,14 @@ EmberAfStatus emberAfLevelControlClusterServerCommandParse(EmberAfClusterCommand { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - stepMode = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + stepMode = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 1) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - stepSize = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + stepSize = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 2) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; @@ -1878,7 +1878,7 @@ EmberAfStatus emberAfLevelControlClusterServerCommandParse(EmberAfClusterCommand break; } case ZCL_STOP_COMMAND_ID: { - uint32_t payloadOffset = cmd->payloadStartIndex; + uint16_t payloadOffset = cmd->payloadStartIndex; uint8_t optionMask; uint8_t optionOverride; @@ -1886,8 +1886,8 @@ EmberAfStatus emberAfLevelControlClusterServerCommandParse(EmberAfClusterCommand { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - optionMask = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + optionMask = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 1) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; @@ -1946,7 +1946,7 @@ EmberAfStatus emberAfScenesClusterClientCommandParse(EmberAfClusterCommand * cmd switch (cmd->commandId) { case ZCL_ADD_SCENE_RESPONSE_COMMAND_ID: { - uint32_t payloadOffset = cmd->payloadStartIndex; + uint16_t payloadOffset = cmd->payloadStartIndex; uint8_t status; uint16_t groupId; uint8_t sceneId; @@ -1955,14 +1955,14 @@ EmberAfStatus emberAfScenesClusterClientCommandParse(EmberAfClusterCommand * cmd { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - status = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + status = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 2) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - groupId = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 2; + groupId = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 2); if (cmd->bufLen < payloadOffset + 1) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; @@ -1973,7 +1973,7 @@ EmberAfStatus emberAfScenesClusterClientCommandParse(EmberAfClusterCommand * cmd break; } case ZCL_GET_SCENE_MEMBERSHIP_RESPONSE_COMMAND_ID: { - uint32_t payloadOffset = cmd->payloadStartIndex; + uint16_t payloadOffset = cmd->payloadStartIndex; uint8_t status; uint8_t capacity; uint16_t groupId; @@ -1984,28 +1984,28 @@ EmberAfStatus emberAfScenesClusterClientCommandParse(EmberAfClusterCommand * cmd { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - status = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + status = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 1) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - capacity = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + capacity = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 2) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - groupId = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 2; + groupId = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 2); if (status == 0) { if (cmd->bufLen < payloadOffset + 1) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - sceneCount = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + sceneCount = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); } else { @@ -2024,7 +2024,7 @@ EmberAfStatus emberAfScenesClusterClientCommandParse(EmberAfClusterCommand * cmd break; } case ZCL_REMOVE_ALL_SCENES_RESPONSE_COMMAND_ID: { - uint32_t payloadOffset = cmd->payloadStartIndex; + uint16_t payloadOffset = cmd->payloadStartIndex; uint8_t status; uint16_t groupId; @@ -2032,8 +2032,8 @@ EmberAfStatus emberAfScenesClusterClientCommandParse(EmberAfClusterCommand * cmd { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - status = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + status = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 2) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; @@ -2044,7 +2044,7 @@ EmberAfStatus emberAfScenesClusterClientCommandParse(EmberAfClusterCommand * cmd break; } case ZCL_REMOVE_SCENE_RESPONSE_COMMAND_ID: { - uint32_t payloadOffset = cmd->payloadStartIndex; + uint16_t payloadOffset = cmd->payloadStartIndex; uint8_t status; uint16_t groupId; uint8_t sceneId; @@ -2053,14 +2053,14 @@ EmberAfStatus emberAfScenesClusterClientCommandParse(EmberAfClusterCommand * cmd { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - status = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + status = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 2) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - groupId = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 2; + groupId = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 2); if (cmd->bufLen < payloadOffset + 1) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; @@ -2071,7 +2071,7 @@ EmberAfStatus emberAfScenesClusterClientCommandParse(EmberAfClusterCommand * cmd break; } case ZCL_STORE_SCENE_RESPONSE_COMMAND_ID: { - uint32_t payloadOffset = cmd->payloadStartIndex; + uint16_t payloadOffset = cmd->payloadStartIndex; uint8_t status; uint16_t groupId; uint8_t sceneId; @@ -2080,14 +2080,14 @@ EmberAfStatus emberAfScenesClusterClientCommandParse(EmberAfClusterCommand * cmd { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - status = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + status = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 2) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - groupId = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 2; + groupId = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 2); if (cmd->bufLen < payloadOffset + 1) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; @@ -2098,7 +2098,7 @@ EmberAfStatus emberAfScenesClusterClientCommandParse(EmberAfClusterCommand * cmd break; } case ZCL_VIEW_SCENE_RESPONSE_COMMAND_ID: { - uint32_t payloadOffset = cmd->payloadStartIndex; + uint16_t payloadOffset = cmd->payloadStartIndex; uint8_t status; uint16_t groupId; uint8_t sceneId; @@ -2110,20 +2110,20 @@ EmberAfStatus emberAfScenesClusterClientCommandParse(EmberAfClusterCommand * cmd { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - status = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + status = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 2) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - groupId = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 2; + groupId = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 2); if (cmd->bufLen < payloadOffset + 1) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - sceneId = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + sceneId = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (status == 0) { if (cmd->bufLen < payloadOffset + 2) @@ -2131,7 +2131,7 @@ EmberAfStatus emberAfScenesClusterClientCommandParse(EmberAfClusterCommand * cmd return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } transitionTime = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 2; + payloadOffset = static_cast(payloadOffset + 2); } else { @@ -2143,8 +2143,8 @@ EmberAfStatus emberAfScenesClusterClientCommandParse(EmberAfClusterCommand * cmd { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - sceneName = emberAfGetString(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += emberAfStringLength(sceneName) + 1u; + sceneName = emberAfGetString(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + emberAfStringLength(sceneName) + 1u); } else { @@ -2180,7 +2180,7 @@ EmberAfStatus emberAfScenesClusterServerCommandParse(EmberAfClusterCommand * cmd switch (cmd->commandId) { case ZCL_ADD_SCENE_COMMAND_ID: { - uint32_t payloadOffset = cmd->payloadStartIndex; + uint16_t payloadOffset = cmd->payloadStartIndex; uint16_t groupId; uint8_t sceneId; uint16_t transitionTime; @@ -2191,33 +2191,33 @@ EmberAfStatus emberAfScenesClusterServerCommandParse(EmberAfClusterCommand * cmd { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - groupId = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 2; + groupId = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 2); if (cmd->bufLen < payloadOffset + 1) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - sceneId = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + sceneId = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 2) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } transitionTime = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 2; + payloadOffset = static_cast(payloadOffset + 2); if (cmd->bufLen < payloadOffset + 1u) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - sceneName = emberAfGetString(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += emberAfStringLength(sceneName) + 1u; + sceneName = emberAfGetString(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + emberAfStringLength(sceneName) + 1u); extensionFieldSets = cmd->buffer + payloadOffset; wasHandled = emberAfScenesClusterAddSceneCallback(groupId, sceneId, transitionTime, sceneName, extensionFieldSets); break; } case ZCL_GET_SCENE_MEMBERSHIP_COMMAND_ID: { - uint32_t payloadOffset = cmd->payloadStartIndex; + uint16_t payloadOffset = cmd->payloadStartIndex; uint16_t groupId; if (cmd->bufLen < payloadOffset + 2) @@ -2230,7 +2230,7 @@ EmberAfStatus emberAfScenesClusterServerCommandParse(EmberAfClusterCommand * cmd break; } case ZCL_RECALL_SCENE_COMMAND_ID: { - uint32_t payloadOffset = cmd->payloadStartIndex; + uint16_t payloadOffset = cmd->payloadStartIndex; uint16_t groupId; uint8_t sceneId; uint16_t transitionTime; @@ -2239,14 +2239,14 @@ EmberAfStatus emberAfScenesClusterServerCommandParse(EmberAfClusterCommand * cmd { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - groupId = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 2; + groupId = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 2); if (cmd->bufLen < payloadOffset + 1) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - sceneId = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + sceneId = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 2) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; @@ -2257,7 +2257,7 @@ EmberAfStatus emberAfScenesClusterServerCommandParse(EmberAfClusterCommand * cmd break; } case ZCL_REMOVE_ALL_SCENES_COMMAND_ID: { - uint32_t payloadOffset = cmd->payloadStartIndex; + uint16_t payloadOffset = cmd->payloadStartIndex; uint16_t groupId; if (cmd->bufLen < payloadOffset + 2) @@ -2270,7 +2270,7 @@ EmberAfStatus emberAfScenesClusterServerCommandParse(EmberAfClusterCommand * cmd break; } case ZCL_REMOVE_SCENE_COMMAND_ID: { - uint32_t payloadOffset = cmd->payloadStartIndex; + uint16_t payloadOffset = cmd->payloadStartIndex; uint16_t groupId; uint8_t sceneId; @@ -2278,8 +2278,8 @@ EmberAfStatus emberAfScenesClusterServerCommandParse(EmberAfClusterCommand * cmd { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - groupId = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 2; + groupId = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 2); if (cmd->bufLen < payloadOffset + 1) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; @@ -2290,7 +2290,7 @@ EmberAfStatus emberAfScenesClusterServerCommandParse(EmberAfClusterCommand * cmd break; } case ZCL_STORE_SCENE_COMMAND_ID: { - uint32_t payloadOffset = cmd->payloadStartIndex; + uint16_t payloadOffset = cmd->payloadStartIndex; uint16_t groupId; uint8_t sceneId; @@ -2298,8 +2298,8 @@ EmberAfStatus emberAfScenesClusterServerCommandParse(EmberAfClusterCommand * cmd { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - groupId = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 2; + groupId = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 2); if (cmd->bufLen < payloadOffset + 1) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; @@ -2310,7 +2310,7 @@ EmberAfStatus emberAfScenesClusterServerCommandParse(EmberAfClusterCommand * cmd break; } case ZCL_VIEW_SCENE_COMMAND_ID: { - uint32_t payloadOffset = cmd->payloadStartIndex; + uint16_t payloadOffset = cmd->payloadStartIndex; uint16_t groupId; uint8_t sceneId; @@ -2318,8 +2318,8 @@ EmberAfStatus emberAfScenesClusterServerCommandParse(EmberAfClusterCommand * cmd { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - groupId = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 2; + groupId = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 2); if (cmd->bufLen < payloadOffset + 1) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; diff --git a/examples/all-clusters-app/all-clusters-common/gen/callback-stub.cpp b/examples/all-clusters-app/all-clusters-common/gen/callback-stub.cpp index 69d496a19af455..aa44eae4e45cd1 100644 --- a/examples/all-clusters-app/all-clusters-common/gen/callback-stub.cpp +++ b/examples/all-clusters-app/all-clusters-common/gen/callback-stub.cpp @@ -374,7 +374,7 @@ bool emberAfPreMessageSendCallback(EmberAfMessageStruct * messageStruct, EmberSt * @param message Ver.: always * @param status Ver.: always */ -bool emberAfMessageSentCallback(EmberOutgoingMessageType type, uint16_t indexOrDestination, EmberApsFrame * apsFrame, +bool emberAfMessageSentCallback(EmberOutgoingMessageType type, uint64_t indexOrDestination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status) { return false; @@ -591,7 +591,7 @@ bool emberAfGetEndpointInfoCallback(EndpointId endpoint, uint8_t * returnNetwork * * @param destination The node id of the destination Ver.: always */ -uint8_t emberAfGetSourceRouteOverheadCallback(EmberNodeId destination) +uint8_t emberAfGetSourceRouteOverheadCallback(chip::NodeId destination) { return 0; } diff --git a/examples/all-clusters-app/all-clusters-common/gen/callback.h b/examples/all-clusters-app/all-clusters-common/gen/callback.h index 59bcc061e46bb5..38f6f6c16de667 100644 --- a/examples/all-clusters-app/all-clusters-common/gen/callback.h +++ b/examples/all-clusters-app/all-clusters-common/gen/callback.h @@ -2615,7 +2615,7 @@ bool emberAfPreMessageSendCallback(EmberAfMessageStruct * messageStruct, EmberSt * @param message Ver.: always * @param status Ver.: always */ -bool emberAfMessageSentCallback(EmberOutgoingMessageType type, uint16_t indexOrDestination, EmberApsFrame * apsFrame, +bool emberAfMessageSentCallback(EmberOutgoingMessageType type, uint64_t indexOrDestination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Pre Attribute Change @@ -2824,7 +2824,7 @@ bool emberAfGetEndpointInfoCallback(chip::EndpointId endpoint, uint8_t * returnN * * @param destination The node id of the destination Ver.: always */ -uint8_t emberAfGetSourceRouteOverheadCallback(EmberNodeId destination); +uint8_t emberAfGetSourceRouteOverheadCallback(chip::NodeId destination); /** @brief Registration Abort * diff --git a/examples/bridge-app/bridge-common/gen/call-command-handler.cpp b/examples/bridge-app/bridge-common/gen/call-command-handler.cpp index 8ce75bb1189a4a..4fe1fc6f96f2dd 100644 --- a/examples/bridge-app/bridge-common/gen/call-command-handler.cpp +++ b/examples/bridge-app/bridge-common/gen/call-command-handler.cpp @@ -93,7 +93,7 @@ EmberAfStatus emberAfLevelControlClusterServerCommandParse(EmberAfClusterCommand switch (cmd->commandId) { case ZCL_MOVE_COMMAND_ID: { - uint32_t payloadOffset = cmd->payloadStartIndex; + uint16_t payloadOffset = cmd->payloadStartIndex; uint8_t moveMode; uint8_t rate; uint8_t optionMask; @@ -103,20 +103,20 @@ EmberAfStatus emberAfLevelControlClusterServerCommandParse(EmberAfClusterCommand { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - moveMode = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + moveMode = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 1) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - rate = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + rate = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 1) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - optionMask = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + optionMask = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 1) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; @@ -127,7 +127,7 @@ EmberAfStatus emberAfLevelControlClusterServerCommandParse(EmberAfClusterCommand break; } case ZCL_MOVE_TO_LEVEL_COMMAND_ID: { - uint32_t payloadOffset = cmd->payloadStartIndex; + uint16_t payloadOffset = cmd->payloadStartIndex; uint8_t level; uint16_t transitionTime; uint8_t optionMask; @@ -137,20 +137,20 @@ EmberAfStatus emberAfLevelControlClusterServerCommandParse(EmberAfClusterCommand { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - level = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + level = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 2) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } transitionTime = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 2; + payloadOffset = static_cast(payloadOffset + 2); if (cmd->bufLen < payloadOffset + 1) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - optionMask = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + optionMask = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 1) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; @@ -161,7 +161,7 @@ EmberAfStatus emberAfLevelControlClusterServerCommandParse(EmberAfClusterCommand break; } case ZCL_MOVE_TO_LEVEL_WITH_ON_OFF_COMMAND_ID: { - uint32_t payloadOffset = cmd->payloadStartIndex; + uint16_t payloadOffset = cmd->payloadStartIndex; uint8_t level; uint16_t transitionTime; @@ -169,8 +169,8 @@ EmberAfStatus emberAfLevelControlClusterServerCommandParse(EmberAfClusterCommand { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - level = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + level = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 2) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; @@ -181,7 +181,7 @@ EmberAfStatus emberAfLevelControlClusterServerCommandParse(EmberAfClusterCommand break; } case ZCL_MOVE_WITH_ON_OFF_COMMAND_ID: { - uint32_t payloadOffset = cmd->payloadStartIndex; + uint16_t payloadOffset = cmd->payloadStartIndex; uint8_t moveMode; uint8_t rate; @@ -189,8 +189,8 @@ EmberAfStatus emberAfLevelControlClusterServerCommandParse(EmberAfClusterCommand { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - moveMode = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + moveMode = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 1) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; @@ -201,7 +201,7 @@ EmberAfStatus emberAfLevelControlClusterServerCommandParse(EmberAfClusterCommand break; } case ZCL_STEP_COMMAND_ID: { - uint32_t payloadOffset = cmd->payloadStartIndex; + uint16_t payloadOffset = cmd->payloadStartIndex; uint8_t stepMode; uint8_t stepSize; uint16_t transitionTime; @@ -212,26 +212,26 @@ EmberAfStatus emberAfLevelControlClusterServerCommandParse(EmberAfClusterCommand { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - stepMode = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + stepMode = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 1) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - stepSize = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + stepSize = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 2) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } transitionTime = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 2; + payloadOffset = static_cast(payloadOffset + 2); if (cmd->bufLen < payloadOffset + 1) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - optionMask = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + optionMask = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 1) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; @@ -242,7 +242,7 @@ EmberAfStatus emberAfLevelControlClusterServerCommandParse(EmberAfClusterCommand break; } case ZCL_STEP_WITH_ON_OFF_COMMAND_ID: { - uint32_t payloadOffset = cmd->payloadStartIndex; + uint16_t payloadOffset = cmd->payloadStartIndex; uint8_t stepMode; uint8_t stepSize; uint16_t transitionTime; @@ -251,14 +251,14 @@ EmberAfStatus emberAfLevelControlClusterServerCommandParse(EmberAfClusterCommand { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - stepMode = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + stepMode = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 1) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - stepSize = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + stepSize = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 2) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; @@ -269,7 +269,7 @@ EmberAfStatus emberAfLevelControlClusterServerCommandParse(EmberAfClusterCommand break; } case ZCL_STOP_COMMAND_ID: { - uint32_t payloadOffset = cmd->payloadStartIndex; + uint16_t payloadOffset = cmd->payloadStartIndex; uint8_t optionMask; uint8_t optionOverride; @@ -277,8 +277,8 @@ EmberAfStatus emberAfLevelControlClusterServerCommandParse(EmberAfClusterCommand { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - optionMask = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + optionMask = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 1) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; @@ -313,7 +313,7 @@ EmberAfStatus emberAfOnOffClusterServerCommandParse(EmberAfClusterCommand * cmd) break; } case ZCL_OFF_WITH_EFFECT_COMMAND_ID: { - uint32_t payloadOffset = cmd->payloadStartIndex; + uint16_t payloadOffset = cmd->payloadStartIndex; uint8_t effectId; uint8_t effectVariant; @@ -321,8 +321,8 @@ EmberAfStatus emberAfOnOffClusterServerCommandParse(EmberAfClusterCommand * cmd) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - effectId = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + effectId = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 1) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; @@ -341,7 +341,7 @@ EmberAfStatus emberAfOnOffClusterServerCommandParse(EmberAfClusterCommand * cmd) break; } case ZCL_ON_WITH_TIMED_OFF_COMMAND_ID: { - uint32_t payloadOffset = cmd->payloadStartIndex; + uint16_t payloadOffset = cmd->payloadStartIndex; uint8_t onOffControl; uint16_t onTime; uint16_t offWaitTime; @@ -350,14 +350,14 @@ EmberAfStatus emberAfOnOffClusterServerCommandParse(EmberAfClusterCommand * cmd) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - onOffControl = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + onOffControl = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 2) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - onTime = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 2; + onTime = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 2); if (cmd->bufLen < payloadOffset + 2) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; diff --git a/examples/bridge-app/bridge-common/gen/callback-stub.cpp b/examples/bridge-app/bridge-common/gen/callback-stub.cpp index 978a5d23d3179f..49aa1e73d7a8e2 100644 --- a/examples/bridge-app/bridge-common/gen/callback-stub.cpp +++ b/examples/bridge-app/bridge-common/gen/callback-stub.cpp @@ -294,7 +294,7 @@ bool emberAfPreMessageSendCallback(EmberAfMessageStruct * messageStruct, EmberSt * @param message Ver.: always * @param status Ver.: always */ -bool emberAfMessageSentCallback(EmberOutgoingMessageType type, uint16_t indexOrDestination, EmberApsFrame * apsFrame, +bool emberAfMessageSentCallback(EmberOutgoingMessageType type, uint64_t indexOrDestination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status) { return false; @@ -529,7 +529,7 @@ bool emberAfGetEndpointInfoCallback(EndpointId endpoint, uint8_t * returnNetwork * * @param destination The node id of the destination Ver.: always */ -uint8_t emberAfGetSourceRouteOverheadCallback(EmberNodeId destination) +uint8_t emberAfGetSourceRouteOverheadCallback(chip::NodeId destination) { return 0; } diff --git a/examples/bridge-app/bridge-common/gen/callback.h b/examples/bridge-app/bridge-common/gen/callback.h index bfbafdc793af0f..661d681d4f1f81 100644 --- a/examples/bridge-app/bridge-common/gen/callback.h +++ b/examples/bridge-app/bridge-common/gen/callback.h @@ -525,7 +525,7 @@ bool emberAfPreMessageSendCallback(EmberAfMessageStruct * messageStruct, EmberSt * @param message Ver.: always * @param status Ver.: always */ -bool emberAfMessageSentCallback(EmberOutgoingMessageType type, uint16_t indexOrDestination, EmberApsFrame * apsFrame, +bool emberAfMessageSentCallback(EmberOutgoingMessageType type, uint64_t indexOrDestination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Pre Attribute Change @@ -734,7 +734,7 @@ bool emberAfGetEndpointInfoCallback(chip::EndpointId endpoint, uint8_t * returnN * * @param destination The node id of the destination Ver.: always */ -uint8_t emberAfGetSourceRouteOverheadCallback(EmberNodeId destination); +uint8_t emberAfGetSourceRouteOverheadCallback(chip::NodeId destination); /** @brief Registration Abort * diff --git a/examples/lighting-app/lighting-common/gen/call-command-handler.cpp b/examples/lighting-app/lighting-common/gen/call-command-handler.cpp index bd01c5d98cbfc0..77d3e9816e3636 100644 --- a/examples/lighting-app/lighting-common/gen/call-command-handler.cpp +++ b/examples/lighting-app/lighting-common/gen/call-command-handler.cpp @@ -93,7 +93,7 @@ EmberAfStatus emberAfLevelControlClusterServerCommandParse(EmberAfClusterCommand switch (cmd->commandId) { case ZCL_MOVE_COMMAND_ID: { - uint32_t payloadOffset = cmd->payloadStartIndex; + uint16_t payloadOffset = cmd->payloadStartIndex; uint8_t moveMode; uint8_t rate; uint8_t optionMask; @@ -103,20 +103,20 @@ EmberAfStatus emberAfLevelControlClusterServerCommandParse(EmberAfClusterCommand { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - moveMode = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + moveMode = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 1) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - rate = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + rate = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 1) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - optionMask = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + optionMask = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 1) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; @@ -127,7 +127,7 @@ EmberAfStatus emberAfLevelControlClusterServerCommandParse(EmberAfClusterCommand break; } case ZCL_MOVE_TO_LEVEL_COMMAND_ID: { - uint32_t payloadOffset = cmd->payloadStartIndex; + uint16_t payloadOffset = cmd->payloadStartIndex; uint8_t level; uint16_t transitionTime; uint8_t optionMask; @@ -137,20 +137,20 @@ EmberAfStatus emberAfLevelControlClusterServerCommandParse(EmberAfClusterCommand { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - level = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + level = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 2) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } transitionTime = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 2; + payloadOffset = static_cast(payloadOffset + 2); if (cmd->bufLen < payloadOffset + 1) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - optionMask = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + optionMask = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 1) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; @@ -161,7 +161,7 @@ EmberAfStatus emberAfLevelControlClusterServerCommandParse(EmberAfClusterCommand break; } case ZCL_MOVE_TO_LEVEL_WITH_ON_OFF_COMMAND_ID: { - uint32_t payloadOffset = cmd->payloadStartIndex; + uint16_t payloadOffset = cmd->payloadStartIndex; uint8_t level; uint16_t transitionTime; @@ -169,8 +169,8 @@ EmberAfStatus emberAfLevelControlClusterServerCommandParse(EmberAfClusterCommand { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - level = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + level = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 2) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; @@ -181,7 +181,7 @@ EmberAfStatus emberAfLevelControlClusterServerCommandParse(EmberAfClusterCommand break; } case ZCL_MOVE_WITH_ON_OFF_COMMAND_ID: { - uint32_t payloadOffset = cmd->payloadStartIndex; + uint16_t payloadOffset = cmd->payloadStartIndex; uint8_t moveMode; uint8_t rate; @@ -189,8 +189,8 @@ EmberAfStatus emberAfLevelControlClusterServerCommandParse(EmberAfClusterCommand { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - moveMode = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + moveMode = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 1) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; @@ -201,7 +201,7 @@ EmberAfStatus emberAfLevelControlClusterServerCommandParse(EmberAfClusterCommand break; } case ZCL_STEP_COMMAND_ID: { - uint32_t payloadOffset = cmd->payloadStartIndex; + uint16_t payloadOffset = cmd->payloadStartIndex; uint8_t stepMode; uint8_t stepSize; uint16_t transitionTime; @@ -212,26 +212,26 @@ EmberAfStatus emberAfLevelControlClusterServerCommandParse(EmberAfClusterCommand { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - stepMode = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + stepMode = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 1) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - stepSize = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + stepSize = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 2) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } transitionTime = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 2; + payloadOffset = static_cast(payloadOffset + 2); if (cmd->bufLen < payloadOffset + 1) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - optionMask = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + optionMask = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 1) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; @@ -242,7 +242,7 @@ EmberAfStatus emberAfLevelControlClusterServerCommandParse(EmberAfClusterCommand break; } case ZCL_STEP_WITH_ON_OFF_COMMAND_ID: { - uint32_t payloadOffset = cmd->payloadStartIndex; + uint16_t payloadOffset = cmd->payloadStartIndex; uint8_t stepMode; uint8_t stepSize; uint16_t transitionTime; @@ -251,14 +251,14 @@ EmberAfStatus emberAfLevelControlClusterServerCommandParse(EmberAfClusterCommand { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - stepMode = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + stepMode = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 1) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - stepSize = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + stepSize = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 2) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; @@ -269,7 +269,7 @@ EmberAfStatus emberAfLevelControlClusterServerCommandParse(EmberAfClusterCommand break; } case ZCL_STOP_COMMAND_ID: { - uint32_t payloadOffset = cmd->payloadStartIndex; + uint16_t payloadOffset = cmd->payloadStartIndex; uint8_t optionMask; uint8_t optionOverride; @@ -277,8 +277,8 @@ EmberAfStatus emberAfLevelControlClusterServerCommandParse(EmberAfClusterCommand { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - optionMask = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset += 1; + optionMask = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); if (cmd->bufLen < payloadOffset + 1) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; diff --git a/examples/lighting-app/lighting-common/gen/callback-stub.cpp b/examples/lighting-app/lighting-common/gen/callback-stub.cpp index 2fdef872d8c4c4..ffed3e7b75e537 100644 --- a/examples/lighting-app/lighting-common/gen/callback-stub.cpp +++ b/examples/lighting-app/lighting-common/gen/callback-stub.cpp @@ -289,7 +289,7 @@ bool emberAfPreMessageSendCallback(EmberAfMessageStruct * messageStruct, EmberSt * @param message Ver.: always * @param status Ver.: always */ -bool emberAfMessageSentCallback(EmberOutgoingMessageType type, uint16_t indexOrDestination, EmberApsFrame * apsFrame, +bool emberAfMessageSentCallback(EmberOutgoingMessageType type, uint64_t indexOrDestination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status) { return false; @@ -506,7 +506,7 @@ bool emberAfGetEndpointInfoCallback(EndpointId endpoint, uint8_t * returnNetwork * * @param destination The node id of the destination Ver.: always */ -uint8_t emberAfGetSourceRouteOverheadCallback(EmberNodeId destination) +uint8_t emberAfGetSourceRouteOverheadCallback(chip::NodeId destination) { return 0; } diff --git a/examples/lighting-app/lighting-common/gen/callback.h b/examples/lighting-app/lighting-common/gen/callback.h index d9a7391fb52899..cce8d918437b70 100644 --- a/examples/lighting-app/lighting-common/gen/callback.h +++ b/examples/lighting-app/lighting-common/gen/callback.h @@ -502,7 +502,7 @@ bool emberAfPreMessageSendCallback(EmberAfMessageStruct * messageStruct, EmberSt * @param message Ver.: always * @param status Ver.: always */ -bool emberAfMessageSentCallback(EmberOutgoingMessageType type, uint16_t indexOrDestination, EmberApsFrame * apsFrame, +bool emberAfMessageSentCallback(EmberOutgoingMessageType type, uint64_t indexOrDestination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Pre Attribute Change @@ -711,7 +711,7 @@ bool emberAfGetEndpointInfoCallback(chip::EndpointId endpoint, uint8_t * returnN * * @param destination The node id of the destination Ver.: always */ -uint8_t emberAfGetSourceRouteOverheadCallback(EmberNodeId destination); +uint8_t emberAfGetSourceRouteOverheadCallback(chip::NodeId destination); /** @brief Registration Abort * diff --git a/examples/lock-app/lock-common/gen/callback-stub.cpp b/examples/lock-app/lock-common/gen/callback-stub.cpp index 38608e2ee7d29b..498fdb3a0a8ca0 100644 --- a/examples/lock-app/lock-common/gen/callback-stub.cpp +++ b/examples/lock-app/lock-common/gen/callback-stub.cpp @@ -280,7 +280,7 @@ bool emberAfPreMessageSendCallback(EmberAfMessageStruct * messageStruct, EmberSt * @param message Ver.: always * @param status Ver.: always */ -bool emberAfMessageSentCallback(EmberOutgoingMessageType type, uint16_t indexOrDestination, EmberApsFrame * apsFrame, +bool emberAfMessageSentCallback(EmberOutgoingMessageType type, uint64_t indexOrDestination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status) { return false; @@ -497,7 +497,7 @@ bool emberAfGetEndpointInfoCallback(EndpointId endpoint, uint8_t * returnNetwork * * @param destination The node id of the destination Ver.: always */ -uint8_t emberAfGetSourceRouteOverheadCallback(EmberNodeId destination) +uint8_t emberAfGetSourceRouteOverheadCallback(chip::NodeId destination) { return 0; } diff --git a/examples/lock-app/lock-common/gen/callback.h b/examples/lock-app/lock-common/gen/callback.h index 3bc4bcaacaf8a2..70bfe97f92ee63 100644 --- a/examples/lock-app/lock-common/gen/callback.h +++ b/examples/lock-app/lock-common/gen/callback.h @@ -352,7 +352,7 @@ bool emberAfPreMessageSendCallback(EmberAfMessageStruct * messageStruct, EmberSt * @param message Ver.: always * @param status Ver.: always */ -bool emberAfMessageSentCallback(EmberOutgoingMessageType type, uint16_t indexOrDestination, EmberApsFrame * apsFrame, +bool emberAfMessageSentCallback(EmberOutgoingMessageType type, uint64_t indexOrDestination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Pre Attribute Change @@ -561,7 +561,7 @@ bool emberAfGetEndpointInfoCallback(chip::EndpointId endpoint, uint8_t * returnN * * @param destination The node id of the destination Ver.: always */ -uint8_t emberAfGetSourceRouteOverheadCallback(EmberNodeId destination); +uint8_t emberAfGetSourceRouteOverheadCallback(chip::NodeId destination); /** @brief Registration Abort * diff --git a/examples/temperature-measurement-app/esp32/main/gen/callback-stub.cpp b/examples/temperature-measurement-app/esp32/main/gen/callback-stub.cpp index ac3b13aacbb381..0f1ad5993166ec 100644 --- a/examples/temperature-measurement-app/esp32/main/gen/callback-stub.cpp +++ b/examples/temperature-measurement-app/esp32/main/gen/callback-stub.cpp @@ -294,7 +294,7 @@ bool emberAfPreMessageSendCallback(EmberAfMessageStruct * messageStruct, EmberSt * @param message Ver.: always * @param status Ver.: always */ -bool emberAfMessageSentCallback(EmberOutgoingMessageType type, uint16_t indexOrDestination, EmberApsFrame * apsFrame, +bool emberAfMessageSentCallback(EmberOutgoingMessageType type, uint64_t indexOrDestination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status) { return false; @@ -511,7 +511,7 @@ bool emberAfGetEndpointInfoCallback(EndpointId endpoint, uint8_t * returnNetwork * * @param destination The node id of the destination Ver.: always */ -uint8_t emberAfGetSourceRouteOverheadCallback(EmberNodeId destination) +uint8_t emberAfGetSourceRouteOverheadCallback(chip::NodeId destination) { return 0; } diff --git a/examples/temperature-measurement-app/esp32/main/gen/callback.h b/examples/temperature-measurement-app/esp32/main/gen/callback.h index 7829b19e66d717..df4a40d85d979f 100644 --- a/examples/temperature-measurement-app/esp32/main/gen/callback.h +++ b/examples/temperature-measurement-app/esp32/main/gen/callback.h @@ -419,7 +419,7 @@ bool emberAfPreMessageSendCallback(EmberAfMessageStruct * messageStruct, EmberSt * @param message Ver.: always * @param status Ver.: always */ -bool emberAfMessageSentCallback(EmberOutgoingMessageType type, uint16_t indexOrDestination, EmberApsFrame * apsFrame, +bool emberAfMessageSentCallback(EmberOutgoingMessageType type, uint64_t indexOrDestination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Pre Attribute Change @@ -628,7 +628,7 @@ bool emberAfGetEndpointInfoCallback(chip::EndpointId endpoint, uint8_t * returnN * * @param destination The node id of the destination Ver.: always */ -uint8_t emberAfGetSourceRouteOverheadCallback(EmberNodeId destination); +uint8_t emberAfGetSourceRouteOverheadCallback(chip::NodeId destination); /** @brief Registration Abort * diff --git a/src/app/reporting/reporting.cpp b/src/app/reporting/reporting.cpp index 4d2e5dbefedca5..7f6c775246cf52 100644 --- a/src/app/reporting/reporting.cpp +++ b/src/app/reporting/reporting.cpp @@ -45,6 +45,7 @@ #include #include #include +#include #include #include "gen/attribute-type.h" @@ -239,7 +240,7 @@ void emberAfPluginReportingTickEventHandler(void) // find size of current report dataSize = emberAfAttributeValueSize(dataType, readData); - reportSize = sizeof(entry.attributeId) + sizeof(dataType) + dataSize; + reportSize = static_cast(sizeof(entry.attributeId) + sizeof(dataType) + dataSize); // If we have already started a report for a different attribute or // destination, or if the current entry is too big for current report, send it and create a new one. @@ -443,8 +444,17 @@ bool emberAfConfigureReportingCommandCallback(const EmberAfClusterCommand * cmd) if (emberAfGetAttributeAnalogOrDiscreteType(dataType) == EMBER_AF_DATA_TYPE_ANALOG) { - uint8_t dataSize = emberAfGetDataSize(dataType); - reportableChange = emberAfGetInt(cmd->buffer, bufIndex, cmd->bufLen, dataSize); + uint8_t dataSize = emberAfGetDataSize(dataType); + uint64_t currentChange = emberAfGetInt(cmd->buffer, bufIndex, cmd->bufLen, dataSize); + if (chip::CanCastTo(currentChange)) + { + reportableChange = static_cast(emberAfGetInt(cmd->buffer, bufIndex, cmd->bufLen, dataSize)); + } + else + { + status = EMBER_ZCL_STATUS_INVALID_DATA_TYPE; + break; + } emberAfReportingPrint(" change:"); emberAfReportingPrintBuffer(cmd->buffer + bufIndex, dataSize, false); diff --git a/src/app/util/af-event.cpp b/src/app/util/af-event.cpp index 64d2ba5237ce34..31a4f1dc6d3237 100644 --- a/src/app/util/af-event.cpp +++ b/src/app/util/af-event.cpp @@ -196,7 +196,7 @@ EmberStatus emberAfEventControlSetDelayMinutes(EmberEventControl * control, uint { if (delayM <= EMBER_MAX_EVENT_CONTROL_DELAY_MINUTES) { - return emberEventControlSetDelayMS(control, delayM << 16); + return emberEventControlSetDelayMS(control, static_cast(delayM) << 16); } else { @@ -308,11 +308,11 @@ uint32_t emAfGetMSFromTimerDurationAndUnit(uint16_t duration, EmberEventUnits un } else if (units == EMBER_EVENT_QS_TIME) { - ms = QS_TO_MS(duration); + ms = QS_TO_MS(static_cast(duration)); } else if (units == EMBER_EVENT_MINUTE_TIME) { - ms = MIN_TO_MS(duration); + ms = MIN_TO_MS(static_cast(duration)); } else if (units == EMBER_EVENT_ZERO_DELAY) { diff --git a/src/app/util/client-api.cpp b/src/app/util/client-api.cpp index 0321437754ae5c..c5cefb840aeb33 100644 --- a/src/app/util/client-api.cpp +++ b/src/app/util/client-api.cpp @@ -186,7 +186,7 @@ static uint16_t vFillBuffer(uint8_t * buffer, uint16_t bufferLen, uint8_t frameC emberAfDebugPrintln("ERR: Unknown format '%c'", cmd); return 0; } - value = (uint32_t)(valueLen <= 2 ? va_arg(argPointer, int) : va_arg(argPointer, uint32_t)); + value = valueLen <= 2 ? static_cast(va_arg(argPointer, int)) : va_arg(argPointer, uint32_t); } // The destination buffer must be at least as large as the running total diff --git a/src/app/util/message.cpp b/src/app/util/message.cpp index 8ad9a9b46fd0af..f1efcad12bbec3 100644 --- a/src/app/util/message.cpp +++ b/src/app/util/message.cpp @@ -209,17 +209,17 @@ uint64_t emberAfGetInt64u(const uint8_t * message, uint16_t currentIndex, uint16 uint32_t emberAfGetInt32u(const uint8_t * message, uint16_t currentIndex, uint16_t msgLen) { - return emberAfGetInt(message, currentIndex, msgLen, 4); + return static_cast(emberAfGetInt(message, currentIndex, msgLen, 4)); } uint32_t emberAfGetInt24u(const uint8_t * message, uint16_t currentIndex, uint16_t msgLen) { - return emberAfGetInt(message, currentIndex, msgLen, 3); + return static_cast(emberAfGetInt(message, currentIndex, msgLen, 3)); } uint16_t emberAfGetInt16u(const uint8_t * message, uint16_t currentIndex, uint16_t msgLen) { - return (uint16_t) emberAfGetInt(message, currentIndex, msgLen, 2); + return static_cast(emberAfGetInt(message, currentIndex, msgLen, 2)); } uint8_t * emberAfGetString(uint8_t * message, uint16_t currentIndex, uint16_t msgLen) diff --git a/src/app/zap-templates/common/ChipTypesHelper.js b/src/app/zap-templates/common/ChipTypesHelper.js index 1647eca92b1df4..fdeaf09226b772 100644 --- a/src/app/zap-templates/common/ChipTypesHelper.js +++ b/src/app/zap-templates/common/ChipTypesHelper.js @@ -33,7 +33,14 @@ function asBasicType(type) } } +const signedTypes = [ 'INT8S', 'INT16S', 'INT32S', 'INT64S' ]; +function isSigned(type) +{ + return signedTypes.includes(type); +} + // // Module exports // exports.asBasicType = asBasicType; +exports.isSigned = isSigned; diff --git a/src/app/zap-templates/partials/command_handler_cluster_commands.zapt b/src/app/zap-templates/partials/command_handler_cluster_commands.zapt index 2a1e9ec91f92e2..bc27d5e2731d96 100644 --- a/src/app/zap-templates/partials/command_handler_cluster_commands.zapt +++ b/src/app/zap-templates/partials/command_handler_cluster_commands.zapt @@ -1,5 +1,5 @@ {{#if (zcl_command_arguments_count this.id)}} -uint32_t payloadOffset = cmd->payloadStartIndex; +uint16_t payloadOffset = cmd->payloadStartIndex; {{#zcl_command_arguments}} {{asUnderlyingZclType type}} {{asSymbol label}}; {{/zcl_command_arguments}} @@ -16,12 +16,16 @@ if ({{presentIf}}) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } + {{#if (isSigned type)}} + {{asSymbol label}} = static_cast<{{asUnderlyingZclType type}}>(emberAfGet{{asReadType type}}(cmd->buffer, payloadOffset, cmd->bufLen)); + {{else}} {{asSymbol label}} = emberAfGet{{asReadType type}}(cmd->buffer, payloadOffset, cmd->bufLen); + {{/if}} {{#unless (isLastElement index count)}} {{#if (isString type)}} - payloadOffset += emberAf{{asReadType type}}Length({{asSymbol label}}) + {{asReadTypeLength type}}; + payloadOffset = static_cast(payloadOffset + emberAf{{asReadType type}}Length({{asSymbol label}}) + {{asReadTypeLength type}}); {{else}} - payloadOffset += {{asReadTypeLength type}}; + payloadOffset = static_cast(payloadOffset + {{asReadTypeLength type}}); {{/if}} {{/unless}} {{/if}} diff --git a/src/app/zap-templates/templates/app/callback-stub-src.zapt b/src/app/zap-templates/templates/app/callback-stub-src.zapt index 16bb4498ae8ed6..6f9ebfe807900e 100644 --- a/src/app/zap-templates/templates/app/callback-stub-src.zapt +++ b/src/app/zap-templates/templates/app/callback-stub-src.zapt @@ -285,7 +285,7 @@ bool __attribute__((weak)) emberAfPreMessageSendCallback( * @param status Ver.: always */ bool __attribute__((weak)) emberAfMessageSentCallback( - EmberOutgoingMessageType type, uint16_t indexOrDestination, + EmberOutgoingMessageType type, uint64_t indexOrDestination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status) { @@ -533,8 +533,7 @@ bool __attribute__((weak)) emberAfGetEndpointInfoCallback( * * @param destination The node id of the destination Ver.: always */ -uint8_t __attribute__((weak)) emberAfGetSourceRouteOverheadCallback( - EmberNodeId destination) +uint8_t __attribute__((weak)) emberAfGetSourceRouteOverheadCallback(chip::NodeId destination) { return 0; } diff --git a/src/app/zap-templates/templates/app/callback.zapt b/src/app/zap-templates/templates/app/callback.zapt index bd0bd8b2539c13..b7088857a6485a 100644 --- a/src/app/zap-templates/templates/app/callback.zapt +++ b/src/app/zap-templates/templates/app/callback.zapt @@ -346,7 +346,7 @@ bool emberAfPreMessageSendCallback(EmberAfMessageStruct * messageStruct, EmberSt * @param message Ver.: always * @param status Ver.: always */ -bool emberAfMessageSentCallback(EmberOutgoingMessageType type, uint16_t indexOrDestination, EmberApsFrame * apsFrame, +bool emberAfMessageSentCallback(EmberOutgoingMessageType type, uint64_t indexOrDestination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Pre Attribute Change @@ -554,7 +554,7 @@ bool emberAfGetEndpointInfoCallback(chip::EndpointId endpoint, uint8_t * returnN * * @param destination The node id of the destination Ver.: always */ -uint8_t emberAfGetSourceRouteOverheadCallback(EmberNodeId destination); +uint8_t emberAfGetSourceRouteOverheadCallback(chip::NodeId destination); /** @brief Registration Abort * diff --git a/src/app/zap-templates/templates/app/helper.js b/src/app/zap-templates/templates/app/helper.js index e95c6359375627..1361b26dde2c12 100644 --- a/src/app/zap-templates/templates/app/helper.js +++ b/src/app/zap-templates/templates/app/helper.js @@ -324,3 +324,4 @@ exports.asChipUnderlyingType = asChipUnderlyingType; exports.user_cluster_has_enabled_manufacturer_command = user_cluster_has_enabled_manufacturer_command; exports.chip_endpoint_generated_functions = chip_endpoint_generated_functions exports.chip_endpoint_cluster_list = chip_endpoint_cluster_list +exports.isSigned = ChipTypesHelper.isSigned; From 32bfa2c46839411f512e323a2f95028d639a8ac2 Mon Sep 17 00:00:00 2001 From: Vivien Nicolas Date: Tue, 2 Feb 2021 18:59:40 +0100 Subject: [PATCH 09/24] Update chip-tool listening port to be 'CHIP_PORT + 1' instead of CHIP_PORT (#4590) #### Problem `chip-tool` is sometimes used to connect to a local accessory server running on the same machine. In this case the accessory server and chip-tool conflicts because both listens to port `11097` (`CHIP_TOOL`). It is easy to workaround this by adding a `ListenPort=11098` to `/tmp/chip_tool_config.ini` but it requires an extra step that is not necessary. #### Summary of changes * Listen on port `CHIP_PORT + 1` by default instead of `CHIP_PORT` --- examples/chip-tool/config/PersistentStorage.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/examples/chip-tool/config/PersistentStorage.cpp b/examples/chip-tool/config/PersistentStorage.cpp index f909f3b44cbcc5..ea6c41d97f5475 100644 --- a/examples/chip-tool/config/PersistentStorage.cpp +++ b/examples/chip-tool/config/PersistentStorage.cpp @@ -119,8 +119,10 @@ CHIP_ERROR PersistentStorage::CommitConfig() uint16_t PersistentStorage::GetListenPort() { - CHIP_ERROR err = CHIP_NO_ERROR; - uint16_t chipListenPort = CHIP_PORT; + CHIP_ERROR err = CHIP_NO_ERROR; + // By default chip-tool listens on CHIP_PORT + 1. This is done in order to avoid + // having 2 servers listening on CHIP_PORT when one runs an accessory server locally. + uint16_t chipListenPort = CHIP_PORT + 1; char value[6]; uint16_t size = static_cast(sizeof(value)); From fda8e09224a14b3c0fbe7087f41a6f697b0b61f0 Mon Sep 17 00:00:00 2001 From: Yufeng Wang <44623591+yufengwangca@users.noreply.github.com> Date: Tue, 2 Feb 2021 10:01:22 -0800 Subject: [PATCH 10/24] Use enum class to define protocols message type for strong typing (#4593) * Use enum class to define protocols message type for strong typing * Apply suggestions from code review Co-authored-by: Boris Zbarsky --- src/app/BUILD.gn | 1 - src/app/Command.h | 1 - src/app/CommandHandler.cpp | 8 +-- src/app/CommandHandler.h | 2 +- src/app/CommandSender.cpp | 9 ++- src/app/CommandSender.h | 4 +- src/app/InteractionModelEngine.cpp | 25 ++++--- src/app/InteractionModelEngine.h | 14 ++-- src/app/MessageDef/MessageDef.h | 58 ---------------- src/app/clusters/on-off-server/on-off-im.cpp | 1 - src/app/im-handler.h | 1 - src/app/tests/TestMessageDef.cpp | 1 - .../templates/chip/im-handler-h.zapt | 1 - src/messaging/ExchangeContext.cpp | 2 +- src/messaging/ExchangeDelegate.h | 5 +- src/messaging/ExchangeMgr.cpp | 9 +-- src/messaging/ExchangeMgr.h | 30 +++++++-- src/messaging/tests/TestExchangeMgr.cpp | 16 ++--- .../tests/TestReliableMessageProtocol.cpp | 4 +- src/protocols/echo/Echo.h | 20 ++++-- src/protocols/echo/EchoClient.cpp | 8 +-- src/protocols/echo/EchoServer.cpp | 11 ++- src/protocols/interaction_model/Constants.h | 67 +++++++++++++++++++ src/transport/tests/TestSecureSessionMgr.cpp | 4 +- 24 files changed, 167 insertions(+), 135 deletions(-) delete mode 100644 src/app/MessageDef/MessageDef.h create mode 100644 src/protocols/interaction_model/Constants.h diff --git a/src/app/BUILD.gn b/src/app/BUILD.gn index f3b878df523cd7..b51c707f1749b8 100644 --- a/src/app/BUILD.gn +++ b/src/app/BUILD.gn @@ -70,7 +70,6 @@ static_library("app") { "MessageDef/ListBuilder.h", "MessageDef/ListParser.cpp", "MessageDef/ListParser.h", - "MessageDef/MessageDef.h", "MessageDef/MessageDefHelper.h", "MessageDef/Parser.cpp", "MessageDef/Parser.h", diff --git a/src/app/Command.h b/src/app/Command.h index de444818758ba2..3785a1ac9dd840 100644 --- a/src/app/Command.h +++ b/src/app/Command.h @@ -41,7 +41,6 @@ #include #include #include -#include namespace chip { namespace app { diff --git a/src/app/CommandHandler.cpp b/src/app/CommandHandler.cpp index 62df35cb0a5524..d49a1c309cec69 100644 --- a/src/app/CommandHandler.cpp +++ b/src/app/CommandHandler.cpp @@ -29,8 +29,8 @@ namespace chip { namespace app { -void CommandHandler::OnMessageReceived(Messaging::ExchangeContext * ec, const PacketHeader & packetHeader, uint32_t protocolId, - uint8_t msgType, System::PacketBufferHandle payload) +void CommandHandler::OnMessageReceived(Messaging::ExchangeContext * ec, const PacketHeader & packetHeader, + const PayloadHeader & payloadHeader, System::PacketBufferHandle payload) { CHIP_ERROR err = CHIP_NO_ERROR; System::PacketBufferHandle response; @@ -57,8 +57,8 @@ CHIP_ERROR CommandHandler::SendCommandResponse() SuccessOrExit(err); VerifyOrExit(mpExchangeCtx != NULL, err = CHIP_ERROR_INCORRECT_STATE); - err = mpExchangeCtx->SendMessage(Protocols::kProtocol_InteractionModel, kMsgType_InvokeCommandResponse, - std::move(mCommandMessageBuf), Messaging::SendFlags(Messaging::SendMessageFlags::kNone)); + err = mpExchangeCtx->SendMessage(Protocols::InteractionModel::MsgType::InvokeCommandResponse, std::move(mCommandMessageBuf), + Messaging::SendFlags(Messaging::SendMessageFlags::kNone)); SuccessOrExit(err); MoveToState(kState_Sending); diff --git a/src/app/CommandHandler.h b/src/app/CommandHandler.h index 4c77bbcf2994ff..e55ecdba7d6bff 100644 --- a/src/app/CommandHandler.h +++ b/src/app/CommandHandler.h @@ -47,7 +47,7 @@ class DLL_EXPORT CommandHandler : public Command { public: CHIP_ERROR SendCommandResponse(); - void OnMessageReceived(Messaging::ExchangeContext * ec, const PacketHeader & packetHeader, uint32_t protocolId, uint8_t msgType, + void OnMessageReceived(Messaging::ExchangeContext * ec, const PacketHeader & packetHeader, const PayloadHeader & payloadHeader, System::PacketBufferHandle payload); private: diff --git a/src/app/CommandSender.cpp b/src/app/CommandSender.cpp index 530af7e569f91b..40eeea725db94a 100644 --- a/src/app/CommandSender.cpp +++ b/src/app/CommandSender.cpp @@ -45,8 +45,7 @@ CHIP_ERROR CommandSender::SendCommandRequest(NodeId aNodeId) VerifyOrExit(mpExchangeCtx != nullptr, err = CHIP_ERROR_NO_MEMORY); mpExchangeCtx->SetResponseTimeout(CHIP_INVOKE_COMMAND_RSP_TIMEOUT); - err = mpExchangeCtx->SendMessage(Protocols::kProtocol_InteractionModel, kMsgType_InvokeCommandRequest, - std::move(mCommandMessageBuf), + err = mpExchangeCtx->SendMessage(Protocols::InteractionModel::MsgType::InvokeCommandRequest, std::move(mCommandMessageBuf), Messaging::SendFlags(Messaging::SendMessageFlags::kExpectResponse)); SuccessOrExit(err); MoveToState(kState_Sending); @@ -61,8 +60,8 @@ CHIP_ERROR CommandSender::SendCommandRequest(NodeId aNodeId) return err; } -void CommandSender::OnMessageReceived(Messaging::ExchangeContext * apEc, const PacketHeader & aPacketHeader, uint32_t aProtocolId, - uint8_t aMsgType, System::PacketBufferHandle aPayload) +void CommandSender::OnMessageReceived(Messaging::ExchangeContext * apEc, const PacketHeader & aPacketHeader, + const PayloadHeader & aPayloadHeader, System::PacketBufferHandle aPayload) { CHIP_ERROR err = CHIP_NO_ERROR; // Assert that the exchange context matches the client's current context. @@ -74,7 +73,7 @@ void CommandSender::OnMessageReceived(Messaging::ExchangeContext * apEc, const P // Verify that the message is an Invoke Command Response. // If not, close the exchange and free the payload. - if (aProtocolId != Protocols::kProtocol_InteractionModel || aMsgType != kMsgType_InvokeCommandResponse) + if (!aPayloadHeader.HasMessageType(Protocols::InteractionModel::MsgType::InvokeCommandResponse)) { apEc->Close(); mpExchangeCtx = nullptr; diff --git a/src/app/CommandSender.h b/src/app/CommandSender.h index e8d5b4272745d3..06a7654499b066 100644 --- a/src/app/CommandSender.h +++ b/src/app/CommandSender.h @@ -52,8 +52,8 @@ class DLL_EXPORT DLL_EXPORT CommandSender : public Command, public Messaging::Ex public: CHIP_ERROR SendCommandRequest(NodeId aNodeId); - void OnMessageReceived(Messaging::ExchangeContext * apEc, const PacketHeader & aPacketHeader, uint32_t aProtocolId, - uint8_t aMsgType, System::PacketBufferHandle aPayload) override; + void OnMessageReceived(Messaging::ExchangeContext * apEc, const PacketHeader & aPacketHeader, + const PayloadHeader & aPayloadHeader, System::PacketBufferHandle aPayload) override; void OnResponseTimeout(Messaging::ExchangeContext * apEc) override; private: diff --git a/src/app/InteractionModelEngine.cpp b/src/app/InteractionModelEngine.cpp index 090d8df19345a9..134b3f9d926713 100644 --- a/src/app/InteractionModelEngine.cpp +++ b/src/app/InteractionModelEngine.cpp @@ -63,7 +63,7 @@ CHIP_ERROR InteractionModelEngine::Init(Messaging::ExchangeManager * apExchangeM mpExchangeMgr = apExchangeMgr; - err = mpExchangeMgr->RegisterUnsolicitedMessageHandler(Protocols::kProtocol_InteractionModel, this); + err = mpExchangeMgr->RegisterUnsolicitedMessageHandlerForProtocol(Protocols::kProtocol_InteractionModel, this); SuccessOrExit(err); exit: @@ -105,11 +105,11 @@ CHIP_ERROR InteractionModelEngine::NewCommandSender(CommandSender ** const apCom } void InteractionModelEngine::OnUnknownMsgType(Messaging::ExchangeContext * apEc, const PacketHeader & aPacketHeader, - uint32_t aProtocolId, uint8_t aMsgType, System::PacketBufferHandle aPayload) + const PayloadHeader & aPayloadHeader, System::PacketBufferHandle aPayload) { CHIP_ERROR err = CHIP_NO_ERROR; - ChipLogDetail(DataManagement, "Msg type %d not supported", (int) aMsgType); + ChipLogDetail(DataManagement, "Msg type %d not supported", aPayloadHeader.GetMessageType()); // Todo: Add status report // err = SendStatusReport(ec, kChipProfile_Common, kStatus_UnsupportedMessage); @@ -128,7 +128,7 @@ void InteractionModelEngine::OnUnknownMsgType(Messaging::ExchangeContext * apEc, } void InteractionModelEngine::OnInvokeCommandRequest(Messaging::ExchangeContext * apEc, const PacketHeader & aPacketHeader, - uint32_t aProtocolId, uint8_t aMsgType, System::PacketBufferHandle aPayload) + const PayloadHeader & aPayloadHeader, System::PacketBufferHandle aPayload) { CHIP_ERROR err = CHIP_NO_ERROR; CommandHandler * commandServer = nullptr; @@ -158,7 +158,7 @@ void InteractionModelEngine::OnInvokeCommandRequest(Messaging::ExchangeContext * commandServer = &mCommandHandlerObjs[i]; err = commandServer->Init(mpExchangeMgr); SuccessOrExit(err); - commandServer->OnMessageReceived(apEc, aPacketHeader, aProtocolId, aMsgType, std::move(aPayload)); + commandServer->OnMessageReceived(apEc, aPacketHeader, aPayloadHeader, std::move(aPayload)); apEc = nullptr; break; } @@ -175,16 +175,15 @@ void InteractionModelEngine::OnInvokeCommandRequest(Messaging::ExchangeContext * } void InteractionModelEngine::OnMessageReceived(Messaging::ExchangeContext * apEc, const PacketHeader & aPacketHeader, - uint32_t aProtocolId, uint8_t aMsgType, System::PacketBufferHandle aPayload) + const PayloadHeader & aPayloadHeader, System::PacketBufferHandle aPayload) { - switch (aMsgType) + if (aPayloadHeader.HasMessageType(Protocols::InteractionModel::MsgType::InvokeCommandRequest)) { - case kMsgType_InvokeCommandRequest: - OnInvokeCommandRequest(apEc, aPacketHeader, aProtocolId, aMsgType, std::move(aPayload)); - break; - default: - OnUnknownMsgType(apEc, aPacketHeader, aProtocolId, aMsgType, std::move(aPayload)); - break; + OnInvokeCommandRequest(apEc, aPacketHeader, aPayloadHeader, std::move(aPayload)); + } + else + { + OnUnknownMsgType(apEc, aPacketHeader, aPayloadHeader, std::move(aPayload)); } } diff --git a/src/app/InteractionModelEngine.h b/src/app/InteractionModelEngine.h index 60ba6172b9b13a..10d1bd0cb23800 100644 --- a/src/app/InteractionModelEngine.h +++ b/src/app/InteractionModelEngine.h @@ -28,13 +28,13 @@ #ifndef _CHIP_INTERACTION_MODEL_ENGINE_H #define _CHIP_INTERACTION_MODEL_ENGINE_H -#include #include #include #include #include #include #include +#include #include #include #include @@ -149,12 +149,12 @@ class InteractionModelEngine : public Messaging::ExchangeDelegate CHIP_ERROR NewCommandSender(CommandSender ** const apComandSender); private: - void OnUnknownMsgType(Messaging::ExchangeContext * apEc, const PacketHeader & aPacketHeader, uint32_t aProtocolId, - uint8_t aMsgType, System::PacketBufferHandle aPayload); - void OnInvokeCommandRequest(Messaging::ExchangeContext * apEc, const PacketHeader & aPacketHeader, uint32_t aProtocolId, - uint8_t aMsgType, System::PacketBufferHandle aPayload); - void OnMessageReceived(Messaging::ExchangeContext * apEc, const PacketHeader & aPacketHeader, uint32_t aProtocolId, - uint8_t aMsgType, System::PacketBufferHandle aPayload); + void OnUnknownMsgType(Messaging::ExchangeContext * apEc, const PacketHeader & aPacketHeader, + const PayloadHeader & aPayloadHeader, System::PacketBufferHandle aPayload); + void OnInvokeCommandRequest(Messaging::ExchangeContext * apEc, const PacketHeader & aPacketHeader, + const PayloadHeader & aPayloadHeader, System::PacketBufferHandle aPayload); + void OnMessageReceived(Messaging::ExchangeContext * apEc, const PacketHeader & aPacketHeader, + const PayloadHeader & aPayloadHeader, System::PacketBufferHandle aPayload); void OnResponseTimeout(Messaging::ExchangeContext * ec); struct HandlerKey diff --git a/src/app/MessageDef/MessageDef.h b/src/app/MessageDef/MessageDef.h deleted file mode 100644 index 74d65dbc4ecde1..00000000000000 --- a/src/app/MessageDef/MessageDef.h +++ /dev/null @@ -1,58 +0,0 @@ -/** - * - * Copyright (c) 2020 Project CHIP Authors - * Copyright (c) 2016-2017 Nest Labs, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * @file - * This file defines messages in CHIP interaction model - * - */ - -#pragma once - -#ifndef _CHIP_INTERACTION_MODEL_MESSAGE_DEF_H -#define _CHIP_INTERACTION_MODEL_MESSAGE_DEF_H - -#include -#include -#include -#include -#include - -namespace chip { -namespace app { -/** - * @brief - * The CHIP interaction model message types. - * - * These values are called out in CHIP Interaction Model: Encoding Specification - * - */ -enum -{ - kMsgType_SubscribeRequest = 0x01, - kMsgType_ReadRequest = 0x02, - kMsgType_ReportData = 0x03, - kMsgType_WriteRequest = 0x04, - kMsgType_WriteResponse = 0x05, - kMsgType_InvokeCommandRequest = 0x06, - kMsgType_InvokeCommandResponse = 0x07, -}; - -}; // namespace app -}; // namespace chip - -#endif // _CHIP_INTERACTION_MODEL_MESSAGE_DEF_H diff --git a/src/app/clusters/on-off-server/on-off-im.cpp b/src/app/clusters/on-off-server/on-off-im.cpp index 50bdf865c7020e..27d1fdaaa7a9c3 100644 --- a/src/app/clusters/on-off-server/on-off-im.cpp +++ b/src/app/clusters/on-off-server/on-off-im.cpp @@ -22,7 +22,6 @@ #include #include -#include #include #include diff --git a/src/app/im-handler.h b/src/app/im-handler.h index 83719ae69a147d..745872225d3624 100644 --- a/src/app/im-handler.h +++ b/src/app/im-handler.h @@ -23,7 +23,6 @@ #include #include #include -#include #include namespace chip { diff --git a/src/app/tests/TestMessageDef.cpp b/src/app/tests/TestMessageDef.cpp index 000f8a627dcf32..2425351174aa74 100644 --- a/src/app/tests/TestMessageDef.cpp +++ b/src/app/tests/TestMessageDef.cpp @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include diff --git a/src/app/zap-templates/templates/chip/im-handler-h.zapt b/src/app/zap-templates/templates/chip/im-handler-h.zapt index 46bf896aa3d9f4..56d3e50b3f04fa 100644 --- a/src/app/zap-templates/templates/chip/im-handler-h.zapt +++ b/src/app/zap-templates/templates/chip/im-handler-h.zapt @@ -6,7 +6,6 @@ #include #include #include -#include #include namespace chip { diff --git a/src/messaging/ExchangeContext.cpp b/src/messaging/ExchangeContext.cpp index 0b710eac7049c3..45dc247202a0a9 100644 --- a/src/messaging/ExchangeContext.cpp +++ b/src/messaging/ExchangeContext.cpp @@ -411,7 +411,7 @@ CHIP_ERROR ExchangeContext::HandleMessage(const PacketHeader & packetHeader, con if (mDelegate != nullptr) { - mDelegate->OnMessageReceived(this, packetHeader, protocolId, messageType, std::move(msgBuf)); + mDelegate->OnMessageReceived(this, packetHeader, payloadHeader, std::move(msgBuf)); } else { diff --git a/src/messaging/ExchangeDelegate.h b/src/messaging/ExchangeDelegate.h index a223883ff2b446..04bc4c5f3d8e4a 100644 --- a/src/messaging/ExchangeDelegate.h +++ b/src/messaging/ExchangeDelegate.h @@ -49,11 +49,10 @@ class DLL_EXPORT ExchangeDelegate * * @param[in] ec A pointer to the ExchangeContext object. * @param[in] packetHeader A reference to the PacketHeader object. - * @param[in] protocolId The protocol identifier of the received message. - * @param[in] msgType The message type of the corresponding protocol. + * @param[in] payloadHeader A reference to the PayloadHeader object. * @param[in] payload A handle to the PacketBuffer object holding the message payload. */ - virtual void OnMessageReceived(ExchangeContext * ec, const PacketHeader & packetHeader, uint32_t protocolId, uint8_t msgType, + virtual void OnMessageReceived(ExchangeContext * ec, const PacketHeader & packetHeader, const PayloadHeader & payloadHeader, System::PacketBufferHandle payload) = 0; /** diff --git a/src/messaging/ExchangeMgr.cpp b/src/messaging/ExchangeMgr.cpp index 67cd1556d97b07..91c0202f4d25fc 100644 --- a/src/messaging/ExchangeMgr.cpp +++ b/src/messaging/ExchangeMgr.cpp @@ -107,22 +107,23 @@ ExchangeContext * ExchangeManager::NewContext(SecureSessionHandle session, Excha return AllocContext(mNextExchangeId++, session, true, delegate); } -CHIP_ERROR ExchangeManager::RegisterUnsolicitedMessageHandler(uint32_t protocolId, ExchangeDelegate * delegate) +CHIP_ERROR ExchangeManager::RegisterUnsolicitedMessageHandlerForProtocol(uint32_t protocolId, ExchangeDelegate * delegate) { return RegisterUMH(protocolId, kAnyMessageType, delegate); } -CHIP_ERROR ExchangeManager::RegisterUnsolicitedMessageHandler(uint32_t protocolId, uint8_t msgType, ExchangeDelegate * delegate) +CHIP_ERROR ExchangeManager::RegisterUnsolicitedMessageHandlerForType(uint32_t protocolId, uint8_t msgType, + ExchangeDelegate * delegate) { return RegisterUMH(protocolId, static_cast(msgType), delegate); } -CHIP_ERROR ExchangeManager::UnregisterUnsolicitedMessageHandler(uint32_t protocolId) +CHIP_ERROR ExchangeManager::UnregisterUnsolicitedMessageHandlerForProtocol(uint32_t protocolId) { return UnregisterUMH(protocolId, kAnyMessageType); } -CHIP_ERROR ExchangeManager::UnregisterUnsolicitedMessageHandler(uint32_t protocolId, uint8_t msgType) +CHIP_ERROR ExchangeManager::UnregisterUnsolicitedMessageHandlerForType(uint32_t protocolId, uint8_t msgType) { return UnregisterUMH(protocolId, static_cast(msgType)); } diff --git a/src/messaging/ExchangeMgr.h b/src/messaging/ExchangeMgr.h index 8b42d034e90ed9..b20f6069dc7c0b 100644 --- a/src/messaging/ExchangeMgr.h +++ b/src/messaging/ExchangeMgr.h @@ -107,7 +107,7 @@ class DLL_EXPORT ExchangeManager : public SecureSessionMgrDelegate * is full and a new one cannot be allocated. * @retval #CHIP_NO_ERROR On success. */ - CHIP_ERROR RegisterUnsolicitedMessageHandler(uint32_t protocolId, ExchangeDelegate * delegate); + CHIP_ERROR RegisterUnsolicitedMessageHandlerForProtocol(uint32_t protocolId, ExchangeDelegate * delegate); /** * Register an unsolicited message handler for a given protocol identifier and message type. @@ -122,7 +122,18 @@ class DLL_EXPORT ExchangeManager : public SecureSessionMgrDelegate * is full and a new one cannot be allocated. * @retval #CHIP_NO_ERROR On success. */ - CHIP_ERROR RegisterUnsolicitedMessageHandler(uint32_t protocolId, uint8_t msgType, ExchangeDelegate * delegate); + CHIP_ERROR RegisterUnsolicitedMessageHandlerForType(uint32_t protocolId, uint8_t msgType, ExchangeDelegate * delegate); + + /** + * A strongly-message-typed version of RegisterUnsolicitedMessageHandlerForType. + */ + template ::value>> + CHIP_ERROR RegisterUnsolicitedMessageHandlerForType(MessageType msgType, ExchangeDelegate * delegate) + { + static_assert(std::is_same, uint8_t>::value, "Enum is wrong size; cast is not safe"); + return RegisterUnsolicitedMessageHandlerForType(Protocols::MessageTypeTraits::ProtocolId, + static_cast(msgType), delegate); + } /** * Unregister an unsolicited message handler for a given protocol identifier. @@ -133,7 +144,7 @@ class DLL_EXPORT ExchangeManager : public SecureSessionMgrDelegate * is not found. * @retval #CHIP_NO_ERROR On success. */ - CHIP_ERROR UnregisterUnsolicitedMessageHandler(uint32_t protocolId); + CHIP_ERROR UnregisterUnsolicitedMessageHandlerForProtocol(uint32_t protocolId); /** * Unregister an unsolicited message handler for a given protocol identifier and message type. @@ -146,7 +157,18 @@ class DLL_EXPORT ExchangeManager : public SecureSessionMgrDelegate * is not found. * @retval #CHIP_NO_ERROR On success. */ - CHIP_ERROR UnregisterUnsolicitedMessageHandler(uint32_t protocolId, uint8_t msgType); + CHIP_ERROR UnregisterUnsolicitedMessageHandlerForType(uint32_t protocolId, uint8_t msgType); + + /** + * A strongly-message-typed version of UnregisterUnsolicitedMessageHandlerForType. + */ + template ::value>> + CHIP_ERROR UnregisterUnsolicitedMessageHandlerForType(MessageType msgType) + { + static_assert(std::is_same, uint8_t>::value, "Enum is wrong size; cast is not safe"); + return UnregisterUnsolicitedMessageHandlerForType(Protocols::MessageTypeTraits::ProtocolId, + static_cast(msgType)); + } void IncrementContextsInUse(); void DecrementContextsInUse(); diff --git a/src/messaging/tests/TestExchangeMgr.cpp b/src/messaging/tests/TestExchangeMgr.cpp index 0a3396f3d6602f..9d40ff84de9392 100644 --- a/src/messaging/tests/TestExchangeMgr.cpp +++ b/src/messaging/tests/TestExchangeMgr.cpp @@ -70,7 +70,7 @@ TransportMgr gTransportMgr; class MockAppDelegate : public ExchangeDelegate { public: - void OnMessageReceived(ExchangeContext * ec, const PacketHeader & packetHeader, uint32_t protocolId, uint8_t msgType, + void OnMessageReceived(ExchangeContext * ec, const PacketHeader & packetHeader, const PayloadHeader & payloadHeader, System::PacketBufferHandle buffer) override { IsOnMessageReceivedCalled = true; @@ -110,22 +110,22 @@ void CheckUmhRegistrationTest(nlTestSuite * inSuite, void * inContext) CHIP_ERROR err; MockAppDelegate mockAppDelegate; - err = ctx.GetExchangeManager().RegisterUnsolicitedMessageHandler(0x0001, &mockAppDelegate); + err = ctx.GetExchangeManager().RegisterUnsolicitedMessageHandlerForProtocol(0x0001, &mockAppDelegate); NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); - err = ctx.GetExchangeManager().RegisterUnsolicitedMessageHandler(0x0002, 0x0001, &mockAppDelegate); + err = ctx.GetExchangeManager().RegisterUnsolicitedMessageHandlerForType(0x0002, 0x0001, &mockAppDelegate); NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); - err = ctx.GetExchangeManager().UnregisterUnsolicitedMessageHandler(0x0001); + err = ctx.GetExchangeManager().UnregisterUnsolicitedMessageHandlerForProtocol(0x0001); NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); - err = ctx.GetExchangeManager().UnregisterUnsolicitedMessageHandler(0x0002); + err = ctx.GetExchangeManager().UnregisterUnsolicitedMessageHandlerForProtocol(0x0002); NL_TEST_ASSERT(inSuite, err != CHIP_NO_ERROR); - err = ctx.GetExchangeManager().UnregisterUnsolicitedMessageHandler(0x0002, 0x0001); + err = ctx.GetExchangeManager().UnregisterUnsolicitedMessageHandlerForType(0x0002, 0x0001); NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); - err = ctx.GetExchangeManager().UnregisterUnsolicitedMessageHandler(0x0002, 0x0002); + err = ctx.GetExchangeManager().UnregisterUnsolicitedMessageHandlerForType(0x0002, 0x0002); NL_TEST_ASSERT(inSuite, err != CHIP_NO_ERROR); } @@ -141,7 +141,7 @@ void CheckExchangeMessages(nlTestSuite * inSuite, void * inContext) // create unsolicited exchange MockAppDelegate mockUnsolicitedAppDelegate; - err = ctx.GetExchangeManager().RegisterUnsolicitedMessageHandler(0x0001, 0x0001, &mockUnsolicitedAppDelegate); + err = ctx.GetExchangeManager().RegisterUnsolicitedMessageHandlerForType(0x0001, 0x0001, &mockUnsolicitedAppDelegate); NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); // send a malicious packet diff --git a/src/messaging/tests/TestReliableMessageProtocol.cpp b/src/messaging/tests/TestReliableMessageProtocol.cpp index 711cd6f8d16002..cfd40c53502879 100644 --- a/src/messaging/tests/TestReliableMessageProtocol.cpp +++ b/src/messaging/tests/TestReliableMessageProtocol.cpp @@ -90,7 +90,7 @@ TransportMgr gTransportMgr; class MockAppDelegate : public ExchangeDelegate { public: - void OnMessageReceived(ExchangeContext * ec, const PacketHeader & packetHeader, uint32_t protocolId, uint8_t msgType, + void OnMessageReceived(ExchangeContext * ec, const PacketHeader & packetHeader, const PayloadHeader & payloadHeader, System::PacketBufferHandle buffer) override { IsOnMessageReceivedCalled = true; @@ -205,7 +205,7 @@ void CheckResendMessage(nlTestSuite * inSuite, void * inContext) gSendMessageCount = 0; - err = exchange->SendMessage(kProtocol_Echo, Echo::kEchoMessageType_EchoRequest, std::move(buffer), + err = exchange->SendMessage(Echo::MsgType::EchoRequest, std::move(buffer), Messaging::SendFlags(Messaging::SendMessageFlags::kNone)); NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); diff --git a/src/protocols/echo/Echo.h b/src/protocols/echo/Echo.h index adb6480a43bcdd..cbf0abb6a7627c 100644 --- a/src/protocols/echo/Echo.h +++ b/src/protocols/echo/Echo.h @@ -38,10 +38,13 @@ namespace chip { namespace Protocols { namespace Echo { -enum +/** + * Echo Protocol Message Types + */ +enum class MsgType : uint8_t { - kEchoMessageType_EchoRequest = 1, - kEchoMessageType_EchoResponse = 2 + EchoRequest = 0x01, + EchoResponse = 0x02 }; using EchoFunct = void (*)(Messaging::ExchangeContext * ec, System::PacketBufferHandle payload); @@ -99,7 +102,7 @@ class DLL_EXPORT EchoClient : public Messaging::ExchangeDelegate EchoFunct OnEchoResponseReceived = nullptr; SecureSessionHandle mSecureSession; - void OnMessageReceived(Messaging::ExchangeContext * ec, const PacketHeader & packetHeader, uint32_t protocolId, uint8_t msgType, + void OnMessageReceived(Messaging::ExchangeContext * ec, const PacketHeader & packetHeader, const PayloadHeader & payloadHeader, System::PacketBufferHandle payload) override; void OnResponseTimeout(Messaging::ExchangeContext * ec) override; }; @@ -141,11 +144,18 @@ class DLL_EXPORT EchoServer : public Messaging::ExchangeDelegate Messaging::ExchangeManager * mExchangeMgr = nullptr; EchoFunct OnEchoRequestReceived = nullptr; - void OnMessageReceived(Messaging::ExchangeContext * ec, const PacketHeader & packetHeader, uint32_t protocolId, uint8_t msgType, + void OnMessageReceived(Messaging::ExchangeContext * ec, const PacketHeader & packetHeader, const PayloadHeader & payloadHeader, System::PacketBufferHandle payload) override; void OnResponseTimeout(Messaging::ExchangeContext * ec) override {} }; } // namespace Echo + +template <> +struct MessageTypeTraits +{ + static constexpr uint16_t ProtocolId = chip::Protocols::kProtocol_Echo; +}; + } // namespace Protocols } // namespace chip diff --git a/src/protocols/echo/EchoClient.cpp b/src/protocols/echo/EchoClient.cpp index 204fbcb31f7bf7..70a9405bcb6bb1 100644 --- a/src/protocols/echo/EchoClient.cpp +++ b/src/protocols/echo/EchoClient.cpp @@ -72,7 +72,7 @@ CHIP_ERROR EchoClient::SendEchoRequest(System::PacketBufferHandle && payload) } // Send an Echo Request message. Discard the exchange context if the send fails. - err = mExchangeCtx->SendMessage(kProtocol_Echo, kEchoMessageType_EchoRequest, std::move(payload), + err = mExchangeCtx->SendMessage(MsgType::EchoRequest, std::move(payload), Messaging::SendFlags(Messaging::SendMessageFlags::kNone)); if (err != CHIP_NO_ERROR) @@ -84,8 +84,8 @@ CHIP_ERROR EchoClient::SendEchoRequest(System::PacketBufferHandle && payload) return err; } -void EchoClient::OnMessageReceived(Messaging::ExchangeContext * ec, const PacketHeader & packetHeader, uint32_t protocolId, - uint8_t msgType, System::PacketBufferHandle payload) +void EchoClient::OnMessageReceived(Messaging::ExchangeContext * ec, const PacketHeader & packetHeader, + const PayloadHeader & payloadHeader, System::PacketBufferHandle payload) { // Assert that the exchange context matches the client's current context. // This should never fail because even if SendEchoRequest is called @@ -95,7 +95,7 @@ void EchoClient::OnMessageReceived(Messaging::ExchangeContext * ec, const Packet // Verify that the message is an Echo Response. // If not, close the exchange and free the payload. - if (protocolId != kProtocol_Echo || msgType != kEchoMessageType_EchoResponse) + if (!payloadHeader.HasMessageType(MsgType::EchoResponse)) { ec->Close(); mExchangeCtx = nullptr; diff --git a/src/protocols/echo/EchoServer.cpp b/src/protocols/echo/EchoServer.cpp index 877a9afff55e47..8da8e78440f687 100644 --- a/src/protocols/echo/EchoServer.cpp +++ b/src/protocols/echo/EchoServer.cpp @@ -39,7 +39,7 @@ CHIP_ERROR EchoServer::Init(Messaging::ExchangeManager * exchangeMgr) OnEchoRequestReceived = nullptr; // Register to receive unsolicited Echo Request messages from the exchange manager. - mExchangeMgr->RegisterUnsolicitedMessageHandler(kProtocol_Echo, kEchoMessageType_EchoRequest, this); + mExchangeMgr->RegisterUnsolicitedMessageHandlerForType(MsgType::EchoRequest, this); return CHIP_NO_ERROR; } @@ -48,13 +48,13 @@ void EchoServer::Shutdown() { if (mExchangeMgr != nullptr) { - mExchangeMgr->UnregisterUnsolicitedMessageHandler(kProtocol_Echo, kEchoMessageType_EchoRequest); + mExchangeMgr->UnregisterUnsolicitedMessageHandlerForType(MsgType::EchoRequest); mExchangeMgr = nullptr; } } -void EchoServer::OnMessageReceived(Messaging::ExchangeContext * ec, const PacketHeader & packetHeader, uint32_t protocolId, - uint8_t msgType, System::PacketBufferHandle payload) +void EchoServer::OnMessageReceived(Messaging::ExchangeContext * ec, const PacketHeader & packetHeader, + const PayloadHeader & payloadHeader, System::PacketBufferHandle payload) { System::PacketBufferHandle response; @@ -79,8 +79,7 @@ void EchoServer::OnMessageReceived(Messaging::ExchangeContext * ec, const Packet response->EnsureReservedSize(CHIP_SYSTEM_CONFIG_HEADER_RESERVE_SIZE); // Send an Echo Response back to the sender. - ec->SendMessage(kProtocol_Echo, kEchoMessageType_EchoResponse, std::move(response), - Messaging::SendFlags(Messaging::SendMessageFlags::kNone)); + ec->SendMessage(MsgType::EchoResponse, std::move(response), Messaging::SendFlags(Messaging::SendMessageFlags::kNone)); // Discard the exchange context. ec->Close(); diff --git a/src/protocols/interaction_model/Constants.h b/src/protocols/interaction_model/Constants.h new file mode 100644 index 00000000000000..8dd6e27b09d090 --- /dev/null +++ b/src/protocols/interaction_model/Constants.h @@ -0,0 +1,67 @@ +/* + * + * Copyright (c) 2021 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * The defines constants for the CHIP Interaction Model Protocol, present in + * every CHIP device. + * + */ + +#pragma once + +#include + +/** + * @namespace chip::Protocols::InteractionModel + * + * @brief + * This namespace includes all interfaces within CHIP for the + * CHIP InteractionModel protocol. + * + * The interfaces define message types. + */ + +namespace chip { +namespace Protocols { +namespace InteractionModel { + +/** + * SecureChannel Protocol Message Types + */ +enum class MsgType : uint8_t +{ + SubscribeRequest = 0x01, + ReadRequest = 0x02, + ReportData = 0x03, + WriteRequest = 0x04, + WriteResponse = 0x05, + InvokeCommandRequest = 0x06, + InvokeCommandResponse = 0x07, +}; + +} // namespace InteractionModel + +template <> +struct MessageTypeTraits +{ + static constexpr uint16_t ProtocolId = chip::Protocols::kProtocol_InteractionModel; +}; + +} // namespace Protocols +} // namespace chip diff --git a/src/transport/tests/TestSecureSessionMgr.cpp b/src/transport/tests/TestSecureSessionMgr.cpp index ce279d3345dfc7..ca669189affb28 100644 --- a/src/transport/tests/TestSecureSessionMgr.cpp +++ b/src/transport/tests/TestSecureSessionMgr.cpp @@ -243,7 +243,7 @@ void SendEncryptedPacketTest(nlTestSuite * inSuite, void * inContext) payloadHeader.SetExchangeID(0); // Set the protocol ID and message type for this header. - payloadHeader.SetMessageType(chip::Protocols::kProtocol_Echo, chip::Protocols::Echo::kEchoMessageType_EchoRequest); + payloadHeader.SetMessageType(chip::Protocols::Echo::MsgType::EchoRequest); payloadHeader.SetInitiator(true); @@ -309,7 +309,7 @@ void SendBadEncryptedPacketTest(nlTestSuite * inSuite, void * inContext) payloadHeader.SetExchangeID(0); // Set the protocol ID and message type for this header. - payloadHeader.SetMessageType(chip::Protocols::kProtocol_Echo, chip::Protocols::Echo::kEchoMessageType_EchoRequest); + payloadHeader.SetMessageType(chip::Protocols::Echo::MsgType::EchoRequest); payloadHeader.SetInitiator(true); From 1e463791b5080a3cffcece939d1431bb62cb170e Mon Sep 17 00:00:00 2001 From: Yufeng Wang <44623591+yufengwangca@users.noreply.github.com> Date: Tue, 2 Feb 2021 10:02:57 -0800 Subject: [PATCH 11/24] Fix Interaction Model end-to-end testing failure (#4596) --- src/app/CommandSender.cpp | 3 ++- src/app/tests/integration/chip_im_initiator.cpp | 5 +++-- src/app/tests/integration/chip_im_responder.cpp | 3 ++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/app/CommandSender.cpp b/src/app/CommandSender.cpp index 40eeea725db94a..5569cf41913b1d 100644 --- a/src/app/CommandSender.cpp +++ b/src/app/CommandSender.cpp @@ -41,7 +41,8 @@ CHIP_ERROR CommandSender::SendCommandRequest(NodeId aNodeId) // Create a new exchange context. // TODO: temprary create a SecureSessionHandle from node id, will be fix in PR 3602 - mpExchangeCtx = mpExchangeMgr->NewContext({ aNodeId, Transport::kAnyKeyId }, this); + // TODO: Hard code keyID to 0 to unblock IM end-to-end test. Complete solution is tracked in issue:4451 + mpExchangeCtx = mpExchangeMgr->NewContext({ aNodeId, 0 }, this); VerifyOrExit(mpExchangeCtx != nullptr, err = CHIP_ERROR_NO_MEMORY); mpExchangeCtx->SetResponseTimeout(CHIP_INVOKE_COMMAND_RSP_TIMEOUT); diff --git a/src/app/tests/integration/chip_im_initiator.cpp b/src/app/tests/integration/chip_im_initiator.cpp index 3f9dfc2b308db6..b3facc8c5f679a 100644 --- a/src/app/tests/integration/chip_im_initiator.cpp +++ b/src/app/tests/integration/chip_im_initiator.cpp @@ -224,7 +224,8 @@ int main(int argc, char * argv[]) // Connection has been established. Now send the CommandRequests. for (unsigned int i = 0; i < kMaxCommandCount; i++) { - if (SendCommandRequest() != CHIP_NO_ERROR) + err = SendCommandRequest(); + if (err != CHIP_NO_ERROR) { printf("Send request failed: %s\n", chip::ErrorStr(err)); break; @@ -252,7 +253,7 @@ int main(int argc, char * argv[]) ShutdownChip(); exit: - if (err != CHIP_NO_ERROR) + if ((err != CHIP_NO_ERROR) || (gCommandRespCount != kMaxCommandCount)) { printf("ChipCommandSender failed: %s\n", chip::ErrorStr(err)); exit(EXIT_FAILURE); diff --git a/src/app/tests/integration/chip_im_responder.cpp b/src/app/tests/integration/chip_im_responder.cpp index 672c0e0c07e542..125c2959f570bb 100644 --- a/src/app/tests/integration/chip_im_responder.cpp +++ b/src/app/tests/integration/chip_im_responder.cpp @@ -44,7 +44,8 @@ namespace { // The CommandHandler object chip::TransportMgr gTransportManager; chip::SecureSessionMgr gSessionManager; -chip::SecurePairingUsingTestSecret gTestPairing; +chip::SecurePairingUsingTestSecret gTestPairing(chip::Optional::Value(chip::kUndefinedNodeId), + static_cast(0), static_cast(0)); // Callback handler when a CHIP EchoRequest is received. void HandleCommandRequestReceived(chip::TLV::TLVReader & aReader, chip::app::Command * apCommandObj) From 6b3293e97062732f087732152ad6222eb4d281a9 Mon Sep 17 00:00:00 2001 From: Michael Spang Date: Tue, 2 Feb 2021 13:05:01 -0500 Subject: [PATCH 12/24] Put the commang line args last in gn_build.sh (#4594) This lets the command line args override the defaults, since the last assignment wins. --- gn_build.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/gn_build.sh b/gn_build.sh index 00f25932ba0796..e456f895ce7d38 100755 --- a/gn_build.sh +++ b/gn_build.sh @@ -73,6 +73,7 @@ echo gn args "$CHIP_ROOT/out/custom" echo ninja -C "$CHIP_ROOT/out/custom" extra_args="" +user_args="" for arg; do case $arg in @@ -80,7 +81,7 @@ for arg; do qpg6100_enabled=1 ;; esac - extra_args+=" $arg" + user_args+=" $arg" done # Android SDK setup @@ -136,8 +137,8 @@ echo _chip_banner "Build: GN configure" -gn --root="$CHIP_ROOT" gen --check --fail-on-unused-args "$CHIP_ROOT/out/debug" --args='target_os="all"'"$extra_args" -gn --root="$CHIP_ROOT" gen --check --fail-on-unused-args "$CHIP_ROOT/out/release" --args='target_os="all" is_debug=false'"$extra_args" +gn --root="$CHIP_ROOT" gen --check --fail-on-unused-args "$CHIP_ROOT/out/debug" --args='target_os="all"'"$extra_args$user_args" +gn --root="$CHIP_ROOT" gen --check --fail-on-unused-args "$CHIP_ROOT/out/release" --args='target_os="all" is_debug=false'"$extra_arg$user_args" _chip_banner "Build: Ninja build" From 13621f037875a50cf4296393b2006b3df522afca Mon Sep 17 00:00:00 2001 From: Pankaj Garg Date: Tue, 2 Feb 2021 10:05:16 -0800 Subject: [PATCH 13/24] Release transport once rendezvous process is complete (#4595) --- src/transport/RendezvousSession.cpp | 39 ++++++++++++++++++++--------- 1 file changed, 27 insertions(+), 12 deletions(-) diff --git a/src/transport/RendezvousSession.cpp b/src/transport/RendezvousSession.cpp index 5189b49fcc9080..fbd46dbff1af61 100644 --- a/src/transport/RendezvousSession.cpp +++ b/src/transport/RendezvousSession.cpp @@ -76,7 +76,7 @@ CHIP_ERROR RendezvousSession::Init(const RendezvousParameters & params, Transpor } mNetworkProvision.Init(this); - // TODO: We should assmue mTransportMgr not null for IP rendezvous. + // TODO: We should assume mTransportMgr not null for IP rendezvous. if (mTransportMgr != nullptr) { mTransportMgr->SetRendezvousSession(this); @@ -258,22 +258,37 @@ void RendezvousSession::UpdateState(RendezvousSession::State newState, CHIP_ERRO } mCurrentState = newState; - if (newState == State::kRendezvousComplete && mDelegate != nullptr) + switch (mCurrentState) { - mDelegate->OnRendezvousComplete(); - } + case State::kRendezvousComplete: + if (mDelegate != nullptr) + { + mDelegate->OnRendezvousComplete(); + } + break; - // Release the previous session handle if new state is init, or pairing just started - if (newState == State::kInit || newState == State::kSecurePairing) - { + case State::kSecurePairing: + // Release the previous session handle ReleasePairingSessionHandle(); - } + break; - if (newState == State::kInit) - { - // Disable BLE advertisement + case State::kInit: + // Release the previous session handle + ReleasePairingSessionHandle(); + + // Disable rendezvous advertisement mParams.GetAdvertisementDelegate()->StopAdvertisement(); - } + if (mTransport) + { + // Free the transport + chip::Platform::Delete(mTransport); + mTransport = nullptr; + } + break; + + default: + break; + }; } void RendezvousSession::OnRendezvousMessageReceived(const PacketHeader & packetHeader, const PeerAddress & peerAddress, From 6891810bc9fb025a1c93ac2bb0ae1127ed705236 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Tue, 2 Feb 2021 13:05:31 -0500 Subject: [PATCH 14/24] Add a script to install required packages on raspberry pi. (#4587) * Add a setup script for Raspberry Pi. - Add a package-install script to be able to compile on raspberry pi - add requirement on pygobject for python (and include in raspberry pi) - remove the empty 'install_packages' script in the setup root dir * Add protobuf-compiler to required rpi packages * More requirements for the python side of the build on rpi * Restyle fixes --- scripts/setup/install_packages.sh | 20 -------- .../raspberry_pi/setup_ubuntu_20_04_lts.sh | 46 +++++++++++++++++++ 2 files changed, 46 insertions(+), 20 deletions(-) delete mode 100755 scripts/setup/install_packages.sh create mode 100755 scripts/setup/raspberry_pi/setup_ubuntu_20_04_lts.sh diff --git a/scripts/setup/install_packages.sh b/scripts/setup/install_packages.sh deleted file mode 100755 index ed4195821f7418..00000000000000 --- a/scripts/setup/install_packages.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env bash - -# -# Copyright (c) 2020 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -set -x -env diff --git a/scripts/setup/raspberry_pi/setup_ubuntu_20_04_lts.sh b/scripts/setup/raspberry_pi/setup_ubuntu_20_04_lts.sh new file mode 100755 index 00000000000000..37335880227828 --- /dev/null +++ b/scripts/setup/raspberry_pi/setup_ubuntu_20_04_lts.sh @@ -0,0 +1,46 @@ +#!/usr/bin/env bash + +# +# Copyright (c) 2021 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Installs required packages and configuration for Raspberry Pi to be able +# to build CHIP and run example/integration applications +# +# See docs/BUILDING.md for more details + +set -ex + +sudo apt-get install -fy \ + g++ \ + gcc \ + git \ + libavahi-client-dev \ + libcairo2-dev \ + libdbus-1-dev \ + libgirepository1.0-dev \ + libglib2.0-dev \ + libssl-dev \ + ninja-build \ + pi-bluetooth \ + pkg-config \ + protobuf-compiler \ + python \ + python3-dev \ + python3-venv \ + unzip && + true + +echo "You must REBOOT after pi-bluetooth has been installed" From 6e13df10c9fc03f32aab7144aad8f35da19af3bb Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Tue, 2 Feb 2021 13:05:37 -0500 Subject: [PATCH 15/24] Add flashing bundles (tar.xz files) to releases (#4569) * Convert asset upload to be backed based on a file list. ESP32 works, still need EFR32 * Add flash bundle support for efr32 * Restyle fixes * Add ref to efr32 build as well * Use runtime_deps to auto-generate the flash bundle for "flashable_executable" builds * Fix typo in comment text * Fix moved newline in script * Restyle fixes --- .github/workflows/release_artifacts.yaml | 30 ++++++----- build/toolchain/flashable_executable.gni | 8 ++- examples/all-clusters-app/esp32/Makefile | 16 +++++- scripts/helpers/upload_release_asset.py | 64 +++++++++++++++++++++--- 4 files changed, 95 insertions(+), 23 deletions(-) diff --git a/.github/workflows/release_artifacts.yaml b/.github/workflows/release_artifacts.yaml index 06bd57321140d8..7c42c6ddc97128 100644 --- a/.github/workflows/release_artifacts.yaml +++ b/.github/workflows/release_artifacts.yaml @@ -25,7 +25,7 @@ jobs: esp32: name: ESP32 env: - BUILD_TYPE: esp32 + BUILD_DIRECTORY: examples/all-clusters-app/esp32/build runs-on: ubuntu-latest container: @@ -36,6 +36,7 @@ jobs: uses: actions/checkout@v2 with: submodules: true + ref: "{{ github.event.inputs.releaseTag }}" - name: Build run: scripts/examples/esp_echo_app.sh @@ -45,14 +46,15 @@ jobs: --github-repository project-chip/connectedhomeip \ --github-api-token "${{ secrets.GITHUB_TOKEN }}" \ --release-tag "${{ github.event.inputs.releaseTag }}" \ - --asset-path examples/all-clusters-app/esp32/build/m5stack-chip-all-clusters-app.elf \ - --asset-name esp32-m5stack-chip-all-clusters-app.elf + --bundle-files $BUILD_DIRECTORY/chip-all-clusters-app.flashbundle.txt \ + --working-directory $BUILD_DIRECTORY \ + --bundle-name esp32-chip-all-clusters-app + efr32: name: EFR32 env: EFR32_BOARD: BRD4161A - BUILD_TYPE: gn_efr32 - BUILD_VERSION: 0.2.14 + BUILD_DIRECTORY: out/lock_app_debug/BRD4161A runs-on: ubuntu-latest @@ -63,15 +65,17 @@ jobs: uses: actions/checkout@v2 with: submodules: true - - name: Build example EFR32 Lock App for BRD4161A + ref: "{{ github.event.inputs.releaseTag }}" + - name: Build example EFR32 Lock App run: - scripts/examples/gn_efr32_example.sh examples/lock-app/efr32/ out/lock_app_debug BRD4161A + scripts/examples/gn_efr32_example.sh examples/lock-app/efr32/ out/lock_app_debug $EFR32_BOARD - name: Upload artifact run: | - scripts/helpers/upload_release_asset.py \ - --github-repository project-chip/connectedhomeip \ - --github-api-token "${{ secrets.GITHUB_TOKEN }}" \ - --release-tag "${{ github.event.inputs.releaseTag }}" \ - --asset-path out/lock_app_debug/BRD4161A/chip-efr32-lock-example.s37 \ - --asset-name efr32-BRD4161A-lock-example.s37 + scripts/helpers/upload_release_asset.py \ + --github-repository project-chip/connectedhomeip \ + --github-api-token "${{ secrets.GITHUB_TOKEN }}" \ + --release-tag "${{ github.event.inputs.releaseTag }}" \ + --bundle-files $BUILD_DIRECTORY/lock_app.flashbundle.txt \ + --working-directory $BUILD_DIRECTORY \ + --bundle-name efr32-$EFR32_BOARD-chip-lock-example diff --git a/build/toolchain/flashable_executable.gni b/build/toolchain/flashable_executable.gni index 37e9d0b0062687..afd155547a12a3 100644 --- a/build/toolchain/flashable_executable.gni +++ b/build/toolchain/flashable_executable.gni @@ -95,7 +95,13 @@ template("flashable_executable") { final_target = executable_target } group(target_name) { - deps = [ ":$final_target" ] + data_deps = [ ":$final_target" ] + + if (defined(invoker.data_deps)) { + data_deps += invoker.data_deps + } + + write_runtime_deps = "${root_out_dir}/${target_name}.flashbundle.txt" } if (defined(invoker.objcopy_image_name)) { diff --git a/examples/all-clusters-app/esp32/Makefile b/examples/all-clusters-app/esp32/Makefile index 932134ecd45bbd..1ad5b8414db99d 100644 --- a/examples/all-clusters-app/esp32/Makefile +++ b/examples/all-clusters-app/esp32/Makefile @@ -36,6 +36,12 @@ include $(IDF_PATH)/make/project.mk FLASHING_SCRIPT=$(BUILD_DIR_BASE)/$(PROJECT_NAME).flash.py +# Describes what files are required to be bundled in a package for self-contained +# flashing support +# +# NOTE: ESP32 still depends on $IDF_PATH being set +FLASHING_BUNDLE=$(BUILD_DIR_BASE)/$(PROJECT_NAME).flashbundle.txt + $(FLASHING_SCRIPT): $(APP_BIN) $(BOOTLOADER_BIN) $(PARTITION_TABLE_BIN) $(PROJECT_PATH)/sdkconfig @third_party/connectedhomeip/scripts/flashing/gen_flashing_script.py esp32 \ --output $(BUILD_DIR_BASE)/$(PROJECT_NAME).flash.py \ @@ -47,7 +53,15 @@ $(FLASHING_SCRIPT): $(APP_BIN) $(BOOTLOADER_BIN) $(PARTITION_TABLE_BIN) $(PROJEC --use-parttool $(IDF_PATH)/components/partition_table/parttool.py \ --use-sdkconfig $(PROJECT_PATH)/sdkconfig -flashing_script: $(FLASHING_SCRIPT) $(BUILD_DIR_BASE)/esp32_firmware_utils.py $(BUILD_DIR_BASE)/firmware_utils.py +$(FLASHING_BUNDLE): + echo "$(subst $(BUILD_DIR_BASE)/,,$(FLASHING_SCRIPT))" >$@ + echo "esp32_firmware_utils.py" >> $@ + echo "firmware_utils.py" >>$@ + echo "$(subst $(BUILD_DIR_BASE)/,,$(APP_BIN))" >>$@ + echo "$(subst $(BUILD_DIR_BASE)/,,$(BOOTLOADER_BIN))" >>$@ + echo "$(subst $(BUILD_DIR_BASE)/,,$(PARTITION_TABLE_BIN))" >>$@ + +flashing_script: $(FLASHING_SCRIPT) $(BUILD_DIR_BASE)/esp32_firmware_utils.py $(BUILD_DIR_BASE)/firmware_utils.py $(FLASHING_BUNDLE) @echo To flash $(subst $(CURDIR)/,,$(APP_BIN)), run $(subst $(CURDIR)/,,$(FLASHING_SCRIPT)) $(BUILD_DIR_BASE)/esp32_firmware_utils.py: third_party/connectedhomeip/scripts/flashing/esp32_firmware_utils.py diff --git a/scripts/helpers/upload_release_asset.py b/scripts/helpers/upload_release_asset.py index 990191f8891b76..2188e905f29762 100755 --- a/scripts/helpers/upload_release_asset.py +++ b/scripts/helpers/upload_release_asset.py @@ -19,11 +19,44 @@ import argparse import coloredlogs import logging +import tarfile import github +import os + + +class BundleBuilder: + + def __init__(self, outputName, outputPrefix, workingDirectory): + self.outputName = outputName + '.tar.xz' + self.outputPrefix = outputPrefix + self.workingDirectory = workingDirectory + + logging.info('Creating bundle "%s":', self.outputName) + + self.output = tarfile.open(self.outputName, 'w:xz') + + def appendFile(self, name): + """Appends the specified file in the working directory to the bundle.""" + logging.info(' Appending %s to the bundle', name) + + current_directory = os.path.realpath(os.curdir) + try: + os.chdir(self.workingDirectory) + self.output.add(name, os.path.join(self.outputPrefix, name)) + finally: + os.chdir(current_directory) + + def close(self): + """Closes the bundle and returns the file name of the bundle.""" + logging.info(' Bundle creation complete.') + self.output.close() + return self.outputName + def main(): """Main task if executed standalone.""" - parser = argparse.ArgumentParser(description='Fetch master build artifacts.') + parser = argparse.ArgumentParser( + description='Uploads an asset bundle file to a github release .') parser.add_argument( '--github-api-token', type=str, @@ -33,9 +66,15 @@ def main(): parser.add_argument( '--release-tag', type=str, help='Release tag to upload asset to') parser.add_argument( - '--asset-path', type=str, help='What asset to upload') + '--bundle-files', + type=str, + help='A file containing what assets to include') + parser.add_argument( + '--working-directory', + type=str, + help='What directory to use as the current directory for uploading') parser.add_argument( - '--asset-name', type=str, help='How to name the asset when uploading') + '--bundle-name', type=str, help='Prefix to use in the archive file') parser.add_argument( '--log-level', default=logging.INFO, @@ -53,19 +92,28 @@ def main(): logging.error('Required arguments missing: github api token is required') return + bundle = BundleBuilder(args.bundle_name, args.bundle_name, + args.working_directory) + + with open(args.bundle_files, 'rt') as bundleInputs: + for fileName in bundleInputs.readlines(): + bundle.appendFile(fileName.strip()) + + assetPath = bundle.close() + api = github.Github(args.github_api_token) repo = api.get_repo(args.github_repository) logging.info('Connected to github repository') release = repo.get_release(args.release_tag) - logging.info('Release "%s" found. Uploading asset' % release.title) + logging.info('Release "%s" found.' % args.release_tag) - logging.info('Uploading %s as %s' % (args.asset_path, args.asset_name)) - release.upload_asset(args.asset_path, name = args.asset_name) + logging.info('Uploading %s', assetPath) + release.upload_asset(assetPath) logging.info('Asset upload complete') - + if __name__ == '__main__': # execute only if run as a script - main() \ No newline at end of file + main() From 79964fc2f330b5b7925721b1a1b6e79e13f5c185 Mon Sep 17 00:00:00 2001 From: Pankaj Garg Date: Tue, 2 Feb 2021 10:05:56 -0800 Subject: [PATCH 16/24] Send current IP address during network provisioning (#4591) --- src/transport/NetworkProvisioning.cpp | 35 +++++++++++++++++++++++++++ src/transport/NetworkProvisioning.h | 8 ++++++ 2 files changed, 43 insertions(+) diff --git a/src/transport/NetworkProvisioning.cpp b/src/transport/NetworkProvisioning.cpp index 47c8ab3fbcda21..63a7dd154ec6f5 100644 --- a/src/transport/NetworkProvisioning.cpp +++ b/src/transport/NetworkProvisioning.cpp @@ -34,6 +34,15 @@ namespace chip { +#ifdef IFNAMSIZ +constexpr uint16_t kMaxInterfaceName = IFNAMSIZ; +#else +constexpr uint16_t kMaxInterfaceName = 32; +#endif + +constexpr char kAPInterfaceNamePrefix[] = "ap"; +constexpr char kLoobackInterfaceNamePrefix[] = "lo"; + void NetworkProvisioning::Init(NetworkProvisioningDelegate * delegate) { mDelegate = delegate; @@ -81,6 +90,12 @@ CHIP_ERROR NetworkProvisioning::HandleNetworkProvisioningMessage(uint8_t msgType #if defined(CHIP_DEVICE_LAYER_TARGET) DeviceLayer::DeviceNetworkProvisioningDelegateImpl deviceDelegate; err = deviceDelegate.ProvisionWiFi(SSID, passwd); + SuccessOrExit(err); + + if (DeviceLayer::ConnectivityMgr().IsWiFiStationConnected()) + { + err = SendCurrentIPv4Address(); + } #endif #endif } @@ -187,6 +202,26 @@ CHIP_ERROR NetworkProvisioning::SendIPAddress(const Inet::IPAddress & addr) return err; } +CHIP_ERROR NetworkProvisioning::SendCurrentIPv4Address() +{ + for (chip::Inet::InterfaceAddressIterator it; it.HasCurrent(); it.Next()) + { + char ifName[kMaxInterfaceName]; + if (it.IsUp() && CHIP_NO_ERROR == it.GetInterfaceName(ifName, sizeof(ifName)) && + memcmp(ifName, kAPInterfaceNamePrefix, sizeof(kAPInterfaceNamePrefix) - 1) && + memcmp(ifName, kLoobackInterfaceNamePrefix, sizeof(kLoobackInterfaceNamePrefix) - 1)) + { + chip::Inet::IPAddress addr = it.GetAddress(); + if (addr.IsIPv4()) + { + return SendIPAddress(addr); + } + } + } + + return CHIP_NO_ERROR; +} + CHIP_ERROR NetworkProvisioning::SendNetworkCredentials(const char * ssid, const char * passwd) { CHIP_ERROR err = CHIP_NO_ERROR; diff --git a/src/transport/NetworkProvisioning.h b/src/transport/NetworkProvisioning.h index 96c3e7f76b7241..2325a7bf771683 100644 --- a/src/transport/NetworkProvisioning.h +++ b/src/transport/NetworkProvisioning.h @@ -113,6 +113,14 @@ class DLL_EXPORT NetworkProvisioning */ CHIP_ERROR SendIPAddress(const Inet::IPAddress & addr); + /** + * @brief + * The device can use this function to send its current IP address to + * commissioner. This would generally be called during network + * provisioning of the device, when the device already has an IP address. + */ + CHIP_ERROR SendCurrentIPv4Address(); + static size_t EncodedStringSize(const char * str); static CHIP_ERROR EncodeString(const char * str, BufBound & bbuf); static CHIP_ERROR DecodeString(const uint8_t * input, size_t input_len, BufBound & bbuf, size_t & consumed); From 160556fdabe3069990b8530e7864473a0ab0ec94 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Tue, 2 Feb 2021 16:35:41 -0500 Subject: [PATCH 17/24] Add missing $ for github checkout for release actions (#4617) --- .github/workflows/release_artifacts.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release_artifacts.yaml b/.github/workflows/release_artifacts.yaml index 7c42c6ddc97128..bfc1d5d0c2ebe8 100644 --- a/.github/workflows/release_artifacts.yaml +++ b/.github/workflows/release_artifacts.yaml @@ -36,7 +36,7 @@ jobs: uses: actions/checkout@v2 with: submodules: true - ref: "{{ github.event.inputs.releaseTag }}" + ref: "${{ github.event.inputs.releaseTag }}" - name: Build run: scripts/examples/esp_echo_app.sh @@ -65,7 +65,7 @@ jobs: uses: actions/checkout@v2 with: submodules: true - ref: "{{ github.event.inputs.releaseTag }}" + ref: "${{ github.event.inputs.releaseTag }}" - name: Build example EFR32 Lock App run: scripts/examples/gn_efr32_example.sh examples/lock-app/efr32/ out/lock_app_debug $EFR32_BOARD From 02b31c012ddab38f6df682c882ad0d573c351f6e Mon Sep 17 00:00:00 2001 From: Yufeng Wang <44623591+yufengwangca@users.noreply.github.com> Date: Tue, 2 Feb 2021 15:15:54 -0800 Subject: [PATCH 18/24] Rename ReliableMessageManager to ReliableMessageMgr (#4574) --- src/messaging/BUILD.gn | 4 +- src/messaging/ExchangeContext.cpp | 2 +- src/messaging/ExchangeMgr.h | 6 +- src/messaging/ReliableMessageContext.cpp | 4 +- src/messaging/ReliableMessageContext.h | 8 +- ...sageManager.cpp => ReliableMessageMgr.cpp} | 85 +++++++++---------- ...eMessageManager.h => ReliableMessageMgr.h} | 6 +- .../tests/TestReliableMessageProtocol.cpp | 22 ++--- 8 files changed, 68 insertions(+), 69 deletions(-) rename src/messaging/{ReliableMessageManager.cpp => ReliableMessageMgr.cpp} (80%) rename src/messaging/{ReliableMessageManager.h => ReliableMessageMgr.h} (96%) diff --git a/src/messaging/BUILD.gn b/src/messaging/BUILD.gn index 5f741843770894..e94e4873061f34 100644 --- a/src/messaging/BUILD.gn +++ b/src/messaging/BUILD.gn @@ -28,8 +28,8 @@ static_library("messaging") { "Flags.h", "ReliableMessageContext.cpp", "ReliableMessageContext.h", - "ReliableMessageManager.cpp", - "ReliableMessageManager.h", + "ReliableMessageMgr.cpp", + "ReliableMessageMgr.h", "ReliableMessageProtocolConfig.h", ] diff --git a/src/messaging/ExchangeContext.cpp b/src/messaging/ExchangeContext.cpp index 45dc247202a0a9..5ad4ab09117927 100644 --- a/src/messaging/ExchangeContext.cpp +++ b/src/messaging/ExchangeContext.cpp @@ -141,7 +141,7 @@ CHIP_ERROR ExchangeContext::SendMessage(uint16_t protocolId, uint8_t msgType, Pa // Send the message. if (payloadHeader.IsNeedsAck()) { - ReliableMessageManager::RetransTableEntry * entry = nullptr; + ReliableMessageMgr::RetransTableEntry * entry = nullptr; // Add to Table for subsequent sending err = mExchangeMgr->GetReliableMessageMgr()->AddToRetransTable(&mReliableMessageContext, &entry); diff --git a/src/messaging/ExchangeMgr.h b/src/messaging/ExchangeMgr.h index b20f6069dc7c0b..4b17d7b81f5088 100644 --- a/src/messaging/ExchangeMgr.h +++ b/src/messaging/ExchangeMgr.h @@ -27,7 +27,7 @@ #include #include -#include +#include #include #include @@ -175,7 +175,7 @@ class DLL_EXPORT ExchangeManager : public SecureSessionMgrDelegate SecureSessionMgr * GetSessionMgr() const { return mSessionMgr; } - ReliableMessageManager * GetReliableMessageMgr() { return &mReliableMessageMgr; }; + ReliableMessageMgr * GetReliableMessageMgr() { return &mReliableMessageMgr; }; size_t GetContextsInUse() const { return mContextsInUse; } @@ -196,7 +196,7 @@ class DLL_EXPORT ExchangeManager : public SecureSessionMgrDelegate uint16_t mNextExchangeId; State mState; SecureSessionMgr * mSessionMgr; - ReliableMessageManager mReliableMessageMgr; + ReliableMessageMgr mReliableMessageMgr; std::array mContextPool; size_t mContextsInUse; diff --git a/src/messaging/ReliableMessageContext.cpp b/src/messaging/ReliableMessageContext.cpp index 717f145aec2374..7bd4dbfb7260e2 100644 --- a/src/messaging/ReliableMessageContext.cpp +++ b/src/messaging/ReliableMessageContext.cpp @@ -29,7 +29,7 @@ #include #include #include -#include +#include #include #include #include @@ -42,7 +42,7 @@ ReliableMessageContext::ReliableMessageContext() : mPendingPeerAckId(0) {} -void ReliableMessageContext::Init(ReliableMessageManager * manager, ExchangeContext * exchange) +void ReliableMessageContext::Init(ReliableMessageMgr * manager, ExchangeContext * exchange) { mManager = manager; mExchange = exchange; diff --git a/src/messaging/ReliableMessageContext.h b/src/messaging/ReliableMessageContext.h index fb6df5718ea2ca..5b793a2dc59484 100644 --- a/src/messaging/ReliableMessageContext.h +++ b/src/messaging/ReliableMessageContext.h @@ -42,7 +42,7 @@ class ChipMessageInfo; class ExchangeContext; enum class MessageFlagValues : uint32_t; class ReliableMessageContext; -class ReliableMessageManager; +class ReliableMessageMgr; class ReliableMessageDelegate { @@ -59,7 +59,7 @@ class ReliableMessageContext public: ReliableMessageContext(); - void Init(ReliableMessageManager * manager, ExchangeContext * exchange); + void Init(ReliableMessageMgr * manager, ExchangeContext * exchange); void SetConfig(ReliableMessageProtocolConfig config) { mConfig = config; } void SetDelegate(ReliableMessageDelegate * delegate) { mDelegate = delegate; } @@ -111,10 +111,10 @@ class ReliableMessageContext CHIP_ERROR HandleNeedsAck(uint32_t MessageId, BitFlags Flags); private: - friend class ReliableMessageManager; + friend class ReliableMessageMgr; friend class ExchangeContext; - ReliableMessageManager * mManager; + ReliableMessageMgr * mManager; ExchangeContext * mExchange; ReliableMessageDelegate * mDelegate; ReliableMessageProtocolConfig mConfig; diff --git a/src/messaging/ReliableMessageManager.cpp b/src/messaging/ReliableMessageMgr.cpp similarity index 80% rename from src/messaging/ReliableMessageManager.cpp rename to src/messaging/ReliableMessageMgr.cpp index 2c8304559dd6a5..005974e0e4a17b 100644 --- a/src/messaging/ReliableMessageManager.cpp +++ b/src/messaging/ReliableMessageMgr.cpp @@ -23,7 +23,7 @@ #include -#include +#include #include #include @@ -36,16 +36,16 @@ namespace chip { namespace Messaging { -ReliableMessageManager::RetransTableEntry::RetransTableEntry() : rc(nullptr), nextRetransTimeTick(0), sendCount(0) {} +ReliableMessageMgr::RetransTableEntry::RetransTableEntry() : rc(nullptr), nextRetransTimeTick(0), sendCount(0) {} -ReliableMessageManager::ReliableMessageManager(std::array & contextPool) : +ReliableMessageMgr::ReliableMessageMgr(std::array & contextPool) : mContextPool(contextPool), mSystemLayer(nullptr), mSessionMgr(nullptr), mCurrentTimerExpiry(0), mTimerIntervalShift(CHIP_CONFIG_RMP_TIMER_DEFAULT_PERIOD_SHIFT) {} -ReliableMessageManager::~ReliableMessageManager() {} +ReliableMessageMgr::~ReliableMessageMgr() {} -void ReliableMessageManager::Init(chip::System::Layer * systemLayer, SecureSessionMgr * sessionMgr) +void ReliableMessageMgr::Init(chip::System::Layer * systemLayer, SecureSessionMgr * sessionMgr) { mSystemLayer = systemLayer; mSessionMgr = sessionMgr; @@ -54,7 +54,7 @@ void ReliableMessageManager::Init(chip::System::Layer * systemLayer, SecureSessi mCurrentTimerExpiry = 0; } -void ReliableMessageManager::Shutdown() +void ReliableMessageMgr::Shutdown() { mSystemLayer = nullptr; mSessionMgr = nullptr; @@ -75,7 +75,7 @@ void ReliableMessageManager::Shutdown() * * @return Tick count for the time period. */ -uint64_t ReliableMessageManager::GetTickCounterFromTimePeriod(uint64_t period) +uint64_t ReliableMessageMgr::GetTickCounterFromTimePeriod(uint64_t period) { return (period >> mTimerIntervalShift); } @@ -87,13 +87,13 @@ uint64_t ReliableMessageManager::GetTickCounterFromTimePeriod(uint64_t period) * * @return Tick count of the difference between the given time and the stored time. */ -uint64_t ReliableMessageManager::GetTickCounterFromTimeDelta(uint64_t newTime) +uint64_t ReliableMessageMgr::GetTickCounterFromTimeDelta(uint64_t newTime) { return GetTickCounterFromTimePeriod(newTime - mTimeStampBase); } #if defined(RMP_TICKLESS_DEBUG) -void ReliableMessageManager::TicklessDebugDumpRetransTable(const char * log) +void ReliableMessageMgr::TicklessDebugDumpRetransTable(const char * log) { ChipLogProgress(ExchangeManager, log); @@ -107,7 +107,7 @@ void ReliableMessageManager::TicklessDebugDumpRetransTable(const char * log) } } #else -void ReliableMessageManager::TicklessDebugDumpRetransTable(const char * log) +void ReliableMessageMgr::TicklessDebugDumpRetransTable(const char * log) { return; } @@ -118,10 +118,10 @@ void ReliableMessageManager::TicklessDebugDumpRetransTable(const char * log) * action needs to be triggered by ReliableMessageProtocol time facilities, * execute that action. */ -void ReliableMessageManager::ExecuteActions() +void ReliableMessageMgr::ExecuteActions() { #if defined(RMP_TICKLESS_DEBUG) - ChipLogProgress(ExchangeManager, "ReliableMessageManager::ExecuteActions"); + ChipLogProgress(ExchangeManager, "ReliableMessageMgr::ExecuteActions"); #endif ExecuteForAllContext([](ReliableMessageContext * rc) { @@ -130,7 +130,7 @@ void ReliableMessageManager::ExecuteActions() if (0 == rc->mNextAckTimeTick) { #if defined(RMP_TICKLESS_DEBUG) - ChipLogProgress(ExchangeManager, "ReliableMessageManager::ExecuteActions sending ACK"); + ChipLogProgress(ExchangeManager, "ReliableMessageMgr::ExecuteActions sending ACK"); #endif // Send the Ack in a SecureChannel::StandaloneAck message rc->SendStandaloneAckMessage(); @@ -139,7 +139,7 @@ void ReliableMessageManager::ExecuteActions() } }); - TicklessDebugDumpRetransTable("ReliableMessageManager::ExecuteActions Dumping mRetransTable entries before processing"); + TicklessDebugDumpRetransTable("ReliableMessageMgr::ExecuteActions Dumping mRetransTable entries before processing"); // Retransmit / cancel anything in the retrans table whose retrans timeout // has expired @@ -182,7 +182,7 @@ void ReliableMessageManager::ExecuteActions() rc->mDelegate->OnSendError(err); } - TicklessDebugDumpRetransTable("ReliableMessageManager::ExecuteActions Dumping mRetransTable entries after processing"); + TicklessDebugDumpRetransTable("ReliableMessageMgr::ExecuteActions Dumping mRetransTable entries after processing"); } static void TickProceed(uint16_t & time, uint64_t ticks) @@ -206,7 +206,7 @@ static void TickProceed(uint16_t & time, uint64_t ticks) * ReliableMessageProtocol timer tick expiry. * */ -void ReliableMessageManager::ExpireTicks() +void ReliableMessageMgr::ExpireTicks() { uint64_t now = System::Timer::GetCurrentEpoch(); @@ -217,7 +217,7 @@ void ReliableMessageManager::ExpireTicks() uint64_t deltaTicks = GetTickCounterFromTimeDelta(now); #if defined(RMP_TICKLESS_DEBUG) - ChipLogProgress(ExchangeManager, "ReliableMessageManager::ExpireTicks at %" PRIu64 ", %" PRIu64 ", %u", now, mTimeStampBase, + ChipLogProgress(ExchangeManager, "ReliableMessageMgr::ExpireTicks at %" PRIu64 ", %" PRIu64 ", %u", now, mTimeStampBase, deltaTicks); #endif @@ -227,8 +227,7 @@ void ReliableMessageManager::ExpireTicks() // Decrement counter of Ack timestamp by the elapsed timer ticks TickProceed(rc->mNextAckTimeTick, deltaTicks); #if defined(RMP_TICKLESS_DEBUG) - ChipLogProgress(ExchangeManager, "ReliableMessageManager::ExpireTicks set mNextAckTimeTick to %u", - rc->mNextAckTimeTick); + ChipLogProgress(ExchangeManager, "ReliableMessageMgr::ExpireTicks set mNextAckTimeTick to %u", rc->mNextAckTimeTick); #endif } }); @@ -241,7 +240,7 @@ void ReliableMessageManager::ExpireTicks() // Decrement Retransmit timeout by elapsed timeticks TickProceed(mRetransTable[i].nextRetransTimeTick, deltaTicks); #if defined(RMP_TICKLESS_DEBUG) - ChipLogProgress(ExchangeManager, "ReliableMessageManager::ExpireTicks set nextRetransTimeTick to %u", + ChipLogProgress(ExchangeManager, "ReliableMessageMgr::ExpireTicks set nextRetransTimeTick to %u", mRetransTable[i].nextRetransTimeTick); #endif } // rc entry is allocated @@ -251,7 +250,7 @@ void ReliableMessageManager::ExpireTicks() mTimeStampBase += (deltaTicks << mTimerIntervalShift); #if defined(RMP_TICKLESS_DEBUG) - ChipLogProgress(ExchangeManager, "ReliableMessageManager::ExpireTicks mTimeStampBase to %" PRIu64, mTimeStampBase); + ChipLogProgress(ExchangeManager, "ReliableMessageMgr::ExpireTicks mTimeStampBase to %" PRIu64, mTimeStampBase); #endif } @@ -259,14 +258,14 @@ void ReliableMessageManager::ExpireTicks() * Handle physical wakeup of system due to ReliableMessageProtocol wakeup. * */ -void ReliableMessageManager::Timeout(System::Layer * aSystemLayer, void * aAppState, System::Error aError) +void ReliableMessageMgr::Timeout(System::Layer * aSystemLayer, void * aAppState, System::Error aError) { - ReliableMessageManager * manager = reinterpret_cast(aAppState); + ReliableMessageMgr * manager = reinterpret_cast(aAppState); VerifyOrDie((aSystemLayer != nullptr) && (manager != nullptr)); #if defined(RMP_TICKLESS_DEBUG) - ChipLogProgress(ExchangeManager, "ReliableMessageManager::Timeout\n"); + ChipLogProgress(ExchangeManager, "ReliableMessageMgr::Timeout\n"); #endif // Make sure all tick counts are sync'd to the current time @@ -291,7 +290,7 @@ void ReliableMessageManager::Timeout(System::Layer * aSystemLayer, void * aAppSt * @retval #CHIP_NO_ERROR On success. * */ -CHIP_ERROR ReliableMessageManager::AddToRetransTable(ReliableMessageContext * rc, RetransTableEntry ** rEntry) +CHIP_ERROR ReliableMessageMgr::AddToRetransTable(ReliableMessageContext * rc, RetransTableEntry ** rEntry) { bool added = false; CHIP_ERROR err = CHIP_NO_ERROR; @@ -329,7 +328,7 @@ CHIP_ERROR ReliableMessageManager::AddToRetransTable(ReliableMessageContext * rc return err; } -void ReliableMessageManager::StartRetransmision(RetransTableEntry * entry) +void ReliableMessageMgr::StartRetransmision(RetransTableEntry * entry) { VerifyOrDie(entry != nullptr && entry->rc != nullptr); @@ -340,7 +339,7 @@ void ReliableMessageManager::StartRetransmision(RetransTableEntry * entry) StartTimer(); } -void ReliableMessageManager::PauseRetransmision(ReliableMessageContext * rc, uint32_t PauseTimeMillis) +void ReliableMessageMgr::PauseRetransmision(ReliableMessageContext * rc, uint32_t PauseTimeMillis) { for (int i = 0; i < CHIP_CONFIG_RMP_RETRANS_TABLE_SIZE; i++) { @@ -353,7 +352,7 @@ void ReliableMessageManager::PauseRetransmision(ReliableMessageContext * rc, uin } } -void ReliableMessageManager::ResumeRetransmision(ReliableMessageContext * rc) +void ReliableMessageMgr::ResumeRetransmision(ReliableMessageContext * rc) { for (int i = 0; i < CHIP_CONFIG_RMP_RETRANS_TABLE_SIZE; i++) { @@ -365,7 +364,7 @@ void ReliableMessageManager::ResumeRetransmision(ReliableMessageContext * rc) } } -bool ReliableMessageManager::CheckAndRemRetransTable(ReliableMessageContext * rc, uint32_t ackMsgId) +bool ReliableMessageMgr::CheckAndRemRetransTable(ReliableMessageContext * rc, uint32_t ackMsgId) { for (int i = 0; i < CHIP_CONFIG_RMP_RETRANS_TABLE_SIZE; i++) { @@ -392,7 +391,7 @@ bool ReliableMessageManager::CheckAndRemRetransTable(ReliableMessageContext * rc * @return #CHIP_NO_ERROR On success, else corresponding CHIP_ERROR returned from SendMessage. * */ -CHIP_ERROR ReliableMessageManager::SendFromRetransTable(RetransTableEntry * entry) +CHIP_ERROR ReliableMessageMgr::SendFromRetransTable(RetransTableEntry * entry) { CHIP_ERROR err = CHIP_NO_ERROR; ReliableMessageContext * rc = entry->rc; @@ -430,7 +429,7 @@ CHIP_ERROR ReliableMessageManager::SendFromRetransTable(RetransTableEntry * entr * @param[in] rc A pointer to the ExchangeContext object. * */ -void ReliableMessageManager::ClearRetransTable(ReliableMessageContext * rc) +void ReliableMessageMgr::ClearRetransTable(ReliableMessageContext * rc) { for (int i = 0; i < CHIP_CONFIG_RMP_RETRANS_TABLE_SIZE; i++) { @@ -448,7 +447,7 @@ void ReliableMessageManager::ClearRetransTable(ReliableMessageContext * rc) * @param[in] rEntry A reference to the RetransTableEntry object. * */ -void ReliableMessageManager::ClearRetransTable(RetransTableEntry & rEntry) +void ReliableMessageMgr::ClearRetransTable(RetransTableEntry & rEntry) { if (rEntry.rc) { @@ -476,7 +475,7 @@ void ReliableMessageManager::ClearRetransTable(RetransTableEntry & rEntry) * @param[in] err The error for failing table entries. * */ -void ReliableMessageManager::FailRetransTableEntries(ReliableMessageContext * rc, CHIP_ERROR err) +void ReliableMessageMgr::FailRetransTableEntries(ReliableMessageContext * rc, CHIP_ERROR err) { for (int i = 0; i < CHIP_CONFIG_RMP_RETRANS_TABLE_SIZE; i++) { @@ -497,7 +496,7 @@ void ReliableMessageManager::FailRetransTableEntries(ReliableMessageContext * rc * need to physically wake the CPU to perform an action. Set a timer to go off * when we next need to wake the system. */ -void ReliableMessageManager::StartTimer() +void ReliableMessageMgr::StartTimer() { CHIP_ERROR res = CHIP_NO_ERROR; uint64_t nextWakeTimeTick = UINT64_MAX; @@ -511,7 +510,7 @@ void ReliableMessageManager::StartTimer() nextWakeTimeTick = rc->mNextAckTimeTick; foundWake = true; #if defined(RMP_TICKLESS_DEBUG) - ChipLogProgress(ExchangeManager, "ReliableMessageManager::StartTimer next ACK time %u", nextWakeTimeTick); + ChipLogProgress(ExchangeManager, "ReliableMessageMgr::StartTimer next ACK time %u", nextWakeTimeTick); #endif } }); @@ -527,7 +526,7 @@ void ReliableMessageManager::StartTimer() nextWakeTimeTick = mRetransTable[i].nextRetransTimeTick; foundWake = true; #if defined(RMP_TICKLESS_DEBUG) - ChipLogProgress(ExchangeManager, "ReliableMessageManager::StartTimer RetransTime %u", nextWakeTimeTick); + ChipLogProgress(ExchangeManager, "ReliableMessageMgr::StartTimer RetransTime %u", nextWakeTimeTick); #endif } } @@ -539,7 +538,7 @@ void ReliableMessageManager::StartTimer() System::Timer::Epoch timerExpiryEpoch = (nextWakeTimeTick << mTimerIntervalShift) + mTimeStampBase; #if defined(RMP_TICKLESS_DEBUG) - ChipLogProgress(ExchangeManager, "ReliableMessageManager::StartTimer wake at %" PRIu64 " ms (%" PRIu64 " %" PRIu64 ")", + ChipLogProgress(ExchangeManager, "ReliableMessageMgr::StartTimer wake at %" PRIu64 " ms (%" PRIu64 " %" PRIu64 ")", timerExpiryEpoch, nextWakeTimeTick, mTimeStampBase); #endif if (timerExpiryEpoch != mCurrentTimerExpiry) @@ -550,18 +549,18 @@ void ReliableMessageManager::StartTimer() uint64_t timerArmValue = (timerExpiryEpoch > now) ? timerExpiryEpoch - now : 0; #if defined(RMP_TICKLESS_DEBUG) - ChipLogProgress(ExchangeManager, "ReliableMessageManager::StartTimer set timer for %" PRIu64, timerArmValue); + ChipLogProgress(ExchangeManager, "ReliableMessageMgr::StartTimer set timer for %" PRIu64, timerArmValue); #endif StopTimer(); res = mSystemLayer->StartTimer((uint32_t) timerArmValue, Timeout, this); - VerifyOrDieWithMsg(res == CHIP_NO_ERROR, ExchangeManager, "Cannot start ReliableMessageManager::Timeout\n"); + VerifyOrDieWithMsg(res == CHIP_NO_ERROR, ExchangeManager, "Cannot start ReliableMessageMgr::Timeout\n"); mCurrentTimerExpiry = timerExpiryEpoch; #if defined(RMP_TICKLESS_DEBUG) } else { - ChipLogProgress(ExchangeManager, "ReliableMessageManager::StartTimer timer already set for %" PRIu64, timerExpiryEpoch); + ChipLogProgress(ExchangeManager, "ReliableMessageMgr::StartTimer timer already set for %" PRIu64, timerExpiryEpoch); #endif } } @@ -574,15 +573,15 @@ void ReliableMessageManager::StartTimer() StopTimer(); } - TicklessDebugDumpRetransTable("ReliableMessageManager::StartTimer Dumping mRetransTable entries after setting wakeup times"); + TicklessDebugDumpRetransTable("ReliableMessageMgr::StartTimer Dumping mRetransTable entries after setting wakeup times"); } -void ReliableMessageManager::StopTimer() +void ReliableMessageMgr::StopTimer() { mSystemLayer->CancelTimer(Timeout, this); } -int ReliableMessageManager::TestGetCountRetransTable() +int ReliableMessageMgr::TestGetCountRetransTable() { int count = 0; for (int i = 0; i < CHIP_CONFIG_RMP_RETRANS_TABLE_SIZE; i++) diff --git a/src/messaging/ReliableMessageManager.h b/src/messaging/ReliableMessageMgr.h similarity index 96% rename from src/messaging/ReliableMessageManager.h rename to src/messaging/ReliableMessageMgr.h index 3f42cddfa72665..cfb7c2e6833271 100644 --- a/src/messaging/ReliableMessageManager.h +++ b/src/messaging/ReliableMessageMgr.h @@ -42,7 +42,7 @@ namespace Messaging { enum class SendMessageFlags : uint16_t; class ReliableMessageContext; -class ReliableMessageManager +class ReliableMessageMgr { public: /** @@ -66,8 +66,8 @@ class ReliableMessageManager }; public: - ReliableMessageManager(std::array & contextPool); - ~ReliableMessageManager(); + ReliableMessageMgr(std::array & contextPool); + ~ReliableMessageMgr(); void Init(chip::System::Layer * systemLayer, SecureSessionMgr * sessionMgr); void Shutdown(); diff --git a/src/messaging/tests/TestReliableMessageProtocol.cpp b/src/messaging/tests/TestReliableMessageProtocol.cpp index cfd40c53502879..06ef7e1743aeff 100644 --- a/src/messaging/tests/TestReliableMessageProtocol.cpp +++ b/src/messaging/tests/TestReliableMessageProtocol.cpp @@ -26,7 +26,7 @@ #include #include -#include +#include #include #include #include @@ -133,12 +133,12 @@ void CheckAddClearRetrans(nlTestSuite * inSuite, void * inContext) ExchangeContext * exchange = ctx.NewExchangeToPeer(&mockAppDelegate); NL_TEST_ASSERT(inSuite, exchange != nullptr); - ReliableMessageManager * rm = ctx.GetExchangeManager().GetReliableMessageMgr(); + ReliableMessageMgr * rm = ctx.GetExchangeManager().GetReliableMessageMgr(); ReliableMessageContext * rc = exchange->GetReliableMessageContext(); NL_TEST_ASSERT(inSuite, rm != nullptr); NL_TEST_ASSERT(inSuite, rc != nullptr); - ReliableMessageManager::RetransTableEntry * entry; + ReliableMessageMgr::RetransTableEntry * entry; rm->AddToRetransTable(rc, &entry); NL_TEST_ASSERT(inSuite, rm->TestGetCountRetransTable() == 1); @@ -156,12 +156,12 @@ void CheckFailRetrans(nlTestSuite * inSuite, void * inContext) ExchangeContext * exchange = ctx.NewExchangeToPeer(&mockAppDelegate); NL_TEST_ASSERT(inSuite, exchange != nullptr); - ReliableMessageManager * rm = ctx.GetExchangeManager().GetReliableMessageMgr(); + ReliableMessageMgr * rm = ctx.GetExchangeManager().GetReliableMessageMgr(); ReliableMessageContext * rc = exchange->GetReliableMessageContext(); NL_TEST_ASSERT(inSuite, rm != nullptr); NL_TEST_ASSERT(inSuite, rc != nullptr); - ReliableMessageManager::RetransTableEntry * entry; + ReliableMessageMgr::RetransTableEntry * entry; ReliableMessageDelegateObject delegate; rc->SetDelegate(&delegate); rm->AddToRetransTable(rc, &entry); @@ -191,7 +191,7 @@ void CheckResendMessage(nlTestSuite * inSuite, void * inContext) ExchangeContext * exchange = ctx.NewExchangeToPeer(&mockSender); NL_TEST_ASSERT(inSuite, exchange != nullptr); - ReliableMessageManager * rm = ctx.GetExchangeManager().GetReliableMessageMgr(); + ReliableMessageMgr * rm = ctx.GetExchangeManager().GetReliableMessageMgr(); ReliableMessageContext * rc = exchange->GetReliableMessageContext(); NL_TEST_ASSERT(inSuite, rm != nullptr); NL_TEST_ASSERT(inSuite, rc != nullptr); @@ -211,12 +211,12 @@ void CheckResendMessage(nlTestSuite * inSuite, void * inContext) // 1 tick is 64 ms, sleep 65 ms to trigger first re-transmit test_os_sleep_ms(65); - ReliableMessageManager::Timeout(&ctx.GetSystemLayer(), rm, CHIP_SYSTEM_NO_ERROR); + ReliableMessageMgr::Timeout(&ctx.GetSystemLayer(), rm, CHIP_SYSTEM_NO_ERROR); NL_TEST_ASSERT(inSuite, gSendMessageCount == 2); // sleep another 65 ms to trigger second re-transmit test_os_sleep_ms(65); - ReliableMessageManager::Timeout(&ctx.GetSystemLayer(), rm, CHIP_SYSTEM_NO_ERROR); + ReliableMessageMgr::Timeout(&ctx.GetSystemLayer(), rm, CHIP_SYSTEM_NO_ERROR); NL_TEST_ASSERT(inSuite, gSendMessageCount == 3); } @@ -228,9 +228,9 @@ void CheckResendMessage(nlTestSuite * inSuite, void * inContext) // clang-format off const nlTest sTests[] = { - NL_TEST_DEF("Test ReliableMessageManager::CheckAddClearRetrans", CheckAddClearRetrans), - NL_TEST_DEF("Test ReliableMessageManager::CheckFailRetrans", CheckFailRetrans), - NL_TEST_DEF("Test ReliableMessageManager::CheckResendMessage", CheckResendMessage), + NL_TEST_DEF("Test ReliableMessageMgr::CheckAddClearRetrans", CheckAddClearRetrans), + NL_TEST_DEF("Test ReliableMessageMgr::CheckFailRetrans", CheckFailRetrans), + NL_TEST_DEF("Test ReliableMessageMgr::CheckResendMessage", CheckResendMessage), NL_TEST_SENTINEL() }; From 7ac6eb48f91fd599e6292370451fe24fb39bdf55 Mon Sep 17 00:00:00 2001 From: jepenven-silabs <67962328+jepenven-silabs@users.noreply.github.com> Date: Tue, 2 Feb 2021 20:54:29 -0500 Subject: [PATCH 19/24] Add Silabs ZCL8 XML implementation (#4613) * Add Silabs ZCL8 XML implementation - Add silabs implementation of af-gen-event and af-tokens. Not yet compatible with CHIP (TODO issue #3637) * Restyled by clang-format * Restyled by prettier-json * Restyled by prettier-markdown Co-authored-by: Restyled.io --- .../bridge-app/bridge-common/bridge-app.zap | 2 +- src/app/zap-templates/README.md | 4 +- .../templates/app/af-gen-event.zapt | 85 + .../templates/app/gen-tokens.zapt | 146 + .../zcl/data-model/silabs/LICENSE.txt | 202 + .../zcl/data-model/silabs/README.md | 13 + .../zcl/data-model/silabs/ami-devices.xml | 822 +++ .../zcl/data-model/silabs/ami.xml | 5810 +++++++++++++++++ .../zcl/data-model/silabs/cba-devices.xml | 138 + .../zcl/data-model/silabs/cba.xml | 66 + .../zcl/data-model/silabs/chip.xml | 174 + .../zcl/data-model/silabs/general-thread.xml | 970 +++ .../zcl/data-model/silabs/general.xml | 981 +++ .../data-model/silabs/green-power-devices.xml | 106 + .../zcl/data-model/silabs/green-power.xml | 730 +++ .../zcl/data-model/silabs/ha-devices.xml | 1031 +++ .../zcl/data-model/silabs/ha-thread.xml | 2462 +++++++ .../zcl/data-model/silabs/ha.xml | 2537 +++++++ .../zcl/data-model/silabs/hc-devices.xml | 545 ++ .../zcl/data-model/silabs/hc.xml | 71 + .../zcl/data-model/silabs/lo-devices.xml | 1725 +++++ .../zcl/data-model/silabs/ota-dotdot.xml | 149 + .../zcl/data-model/silabs/ota.xml | 152 + .../zcl/data-model/silabs/profiles.xml | 30 + .../zcl/data-model/silabs/relay-control.xml | 45 + .../data-model/silabs/sample-extensions.xml | 156 + .../silabs/schema/zcl-validation.js | 30 + .../zcl/data-model/silabs/schema/zcl.xsd | 436 ++ .../zcl/data-model/silabs/silabs.xml | 168 + .../zcl/data-model/silabs/sleeping-mesh.xml | 94 + .../zcl/data-model/silabs/ta-devices.xml | 414 ++ .../zcl/data-model/silabs/ta.xml | 886 +++ .../zcl/data-model/silabs/types.xml | 1069 +++ .../data-model/silabs/wwah-silabs-devices.xml | 38 + .../zcl/data-model/silabs/wwah-silabs.xml | 352 + .../zcl/data-model/silabs/z3-nfr.xml | 49 + .../zcl/data-model/silabs/zcl-test.properties | 44 + .../zcl/data-model/silabs/zcl.json | 46 + .../zcl/data-model/silabs/zll-devices.xml | 1241 ++++ .../zcl/data-model/silabs/zll-thread.xml | 511 ++ .../zcl/data-model/silabs/zll.xml | 517 ++ src/app/zap-templates/zcl/zcl.json | 2 +- 42 files changed, 25045 insertions(+), 4 deletions(-) create mode 100644 src/app/zap-templates/templates/app/af-gen-event.zapt create mode 100644 src/app/zap-templates/templates/app/gen-tokens.zapt create mode 100644 src/app/zap-templates/zcl/data-model/silabs/LICENSE.txt create mode 100644 src/app/zap-templates/zcl/data-model/silabs/README.md create mode 100644 src/app/zap-templates/zcl/data-model/silabs/ami-devices.xml create mode 100644 src/app/zap-templates/zcl/data-model/silabs/ami.xml create mode 100644 src/app/zap-templates/zcl/data-model/silabs/cba-devices.xml create mode 100644 src/app/zap-templates/zcl/data-model/silabs/cba.xml create mode 100644 src/app/zap-templates/zcl/data-model/silabs/chip.xml create mode 100644 src/app/zap-templates/zcl/data-model/silabs/general-thread.xml create mode 100644 src/app/zap-templates/zcl/data-model/silabs/general.xml create mode 100644 src/app/zap-templates/zcl/data-model/silabs/green-power-devices.xml create mode 100644 src/app/zap-templates/zcl/data-model/silabs/green-power.xml create mode 100644 src/app/zap-templates/zcl/data-model/silabs/ha-devices.xml create mode 100644 src/app/zap-templates/zcl/data-model/silabs/ha-thread.xml create mode 100644 src/app/zap-templates/zcl/data-model/silabs/ha.xml create mode 100644 src/app/zap-templates/zcl/data-model/silabs/hc-devices.xml create mode 100644 src/app/zap-templates/zcl/data-model/silabs/hc.xml create mode 100644 src/app/zap-templates/zcl/data-model/silabs/lo-devices.xml create mode 100644 src/app/zap-templates/zcl/data-model/silabs/ota-dotdot.xml create mode 100644 src/app/zap-templates/zcl/data-model/silabs/ota.xml create mode 100644 src/app/zap-templates/zcl/data-model/silabs/profiles.xml create mode 100644 src/app/zap-templates/zcl/data-model/silabs/relay-control.xml create mode 100644 src/app/zap-templates/zcl/data-model/silabs/sample-extensions.xml create mode 100644 src/app/zap-templates/zcl/data-model/silabs/schema/zcl-validation.js create mode 100644 src/app/zap-templates/zcl/data-model/silabs/schema/zcl.xsd create mode 100644 src/app/zap-templates/zcl/data-model/silabs/silabs.xml create mode 100644 src/app/zap-templates/zcl/data-model/silabs/sleeping-mesh.xml create mode 100644 src/app/zap-templates/zcl/data-model/silabs/ta-devices.xml create mode 100644 src/app/zap-templates/zcl/data-model/silabs/ta.xml create mode 100644 src/app/zap-templates/zcl/data-model/silabs/types.xml create mode 100644 src/app/zap-templates/zcl/data-model/silabs/wwah-silabs-devices.xml create mode 100644 src/app/zap-templates/zcl/data-model/silabs/wwah-silabs.xml create mode 100644 src/app/zap-templates/zcl/data-model/silabs/z3-nfr.xml create mode 100644 src/app/zap-templates/zcl/data-model/silabs/zcl-test.properties create mode 100644 src/app/zap-templates/zcl/data-model/silabs/zcl.json create mode 100644 src/app/zap-templates/zcl/data-model/silabs/zll-devices.xml create mode 100644 src/app/zap-templates/zcl/data-model/silabs/zll-thread.xml create mode 100644 src/app/zap-templates/zcl/data-model/silabs/zll.xml diff --git a/examples/bridge-app/bridge-common/bridge-app.zap b/examples/bridge-app/bridge-common/bridge-app.zap index 67457280948a13..10a7ec46406224 100644 --- a/examples/bridge-app/bridge-common/bridge-app.zap +++ b/examples/bridge-app/bridge-common/bridge-app.zap @@ -19,7 +19,7 @@ "package": [ { "pathRelativity": "relativeToZap", - "path": "../../../../third_party/zap/repo/zcl-builtin/silabs/zcl.json", + "path": "../../../../src/app/zap-templates/zcl/data-model/silabs/zcl.json", "version": "ZCL Test Data", "type": "zcl-properties" }, diff --git a/src/app/zap-templates/README.md b/src/app/zap-templates/README.md index 4b7450d673ff69..f726d02e97ab70 100644 --- a/src/app/zap-templates/README.md +++ b/src/app/zap-templates/README.md @@ -19,8 +19,8 @@ Generate files in headless mode ``` cd ./third_party/zap/repo/ -node src-script/zap-generate.js -z ./zcl-builtin/silabs/zcl.json -g ../../../src/app/zap-templates/app-templates.json -i -o -node src-script/zap-generate.js -z ./zcl-builtin/silabs/zcl.json -g ../../../src/app/zap-templates/chip-templates.json -i -o ../../../ +node src-script/zap-generate.js -z ../../../../src/app/zap-templates/zcl/zcl.json -g ../../../src/app/zap-templates/app-templates.json -i -o +node src-script/zap-generate.js -z ../../../../src/app/zap-templates/zcl/zcl.json -g ../../../src/app/zap-templates/chip-templates.json -i -o ../../../ ``` For more information please see the documentation under `docs/` in diff --git a/src/app/zap-templates/templates/app/af-gen-event.zapt b/src/app/zap-templates/templates/app/af-gen-event.zapt new file mode 100644 index 00000000000000..d3adf42a93b39a --- /dev/null +++ b/src/app/zap-templates/templates/app/af-gen-event.zapt @@ -0,0 +1,85 @@ +{{> header}} + +// #TODO : This template wasn't tested in any way with CHIP +// Might need a zap submodule update and / or other fixes to make it work. +// ISSUE : #3637 + + +#pragma once + +#define EMBER_AF_GENERATED_UC_EVENTS_DEF \ +{{#user_endpoint_types}} + {{#user_clusters}} + {{#if (is_enabled enabled)}} + {{#template_options category="tick_events"}} + {{#if (is_lowercase_equal (concatenate ../name ../side) optionLabel)~}} + sl_zigbee_event_t {{optionCode}}Event{{endpoint_type_identifier ../../endpointTypeId}}; \ + {{/if}} + {{/template_options}} + {{/if}} + {{/user_clusters}} +{{/user_endpoint_types}} +{{#all_user_clusters}} + {{#template_options category="generic_events"}} + {{#if (is_lowercase_equal (concatenate ../name ../side) optionLabel)~}} + sl_zigbee_event_t {{optionCode}}EndpointEvents[{{user_endpoint_count_by_cluster ../id ../side}}]; \ + {{/if}} + {{/template_options}} +{{/all_user_clusters}} + + +#define EMBER_AF_GENERATED_UC_EVENTS_INIT \ +{{#all_user_clusters}} + {{#if (is_enabled enabled)}} + {{#template_options category="tick_events"}} + {{#if (is_lowercase_equal (concatenate ../name ../side) optionLabel)~}} + extern void {{optionCode}}(uint8_t enpoint); \ + {{/if}} + {{/template_options}} + {{/if}} +{{/all_user_clusters}} +{{#user_endpoint_types}} + {{#user_clusters}} + {{#if (is_enabled enabled)}} + {{#template_options category="tick_events"}} + {{#if (is_lowercase_equal (concatenate ../name ../side) optionLabel)~}} + sl_zigbee_endpoint_event_init(&{{optionCode}}Event{{endpoint_type_identifier ../../endpointTypeId}}, {{optionCode}}, {{endpoint_type_identifier ../../endpointTypeId}}); \ + {{/if}} + {{/template_options}} + {{/if}} + {{/user_clusters}} +{{/user_endpoint_types}} +{{#all_user_clusters}} + {{#if (is_enabled enabled)}} + {{#template_options category="generic_events"}} + {{#if (is_lowercase_equal (concatenate ../name ../side) optionLabel)~}} + extern void {{optionCode}}EndpointEventHandler(uint8_t enpoint); \ + {{/if}} + {{/template_options}} + {{/if}} +{{/all_user_clusters}} +{{#user_endpoint_types}} + {{#user_clusters}} + {{#if (is_enabled enabled)}} + {{#template_options category="generic_events"}} + {{#if (is_lowercase_equal (concatenate ../name ../side) optionLabel)~}} + sl_zigbee_endpoint_event_init(&{{optionCode}}EndpointEvents[{{endpoint_type_identifier ../../endpointTypeId}}], {{optionCode}}EndpointEventHandler, {{endpoint_type_identifier ../../endpointTypeId}}); \ + {{/if}} + {{/template_options}} + {{/if}} + {{/user_clusters}} +{{/user_endpoint_types}} + +// sl_zigbee_event_context_t structs used to populate the sli_zigbee_app_event_context table +#define EMBER_AF_GENERATED_UC_EVENT_CONTEXT \ +{{#user_endpoint_types}} + {{#user_clusters}} + {{#if (is_enabled enabled)}} + {{#template_options category="tick_events"}} + {{#if (is_lowercase_equal (concatenate ../name ../side) optionLabel)~}} + { {{endpoint_type_identifier ../../endpointTypeId}}, {{asHex ../code}}, {{#if (is_client ../side)}}true{{else}}false{{/if}}, EMBER_AF_LONG_POLL, EMBER_AF_OK_TO_SLEEP, &{{optionCode}}Event{{endpoint_type_identifier ../../endpointTypeId}} }, \ + {{/if}} + {{/template_options}} + {{/if}} + {{/user_clusters}} +{{/user_endpoint_types}} diff --git a/src/app/zap-templates/templates/app/gen-tokens.zapt b/src/app/zap-templates/templates/app/gen-tokens.zapt new file mode 100644 index 00000000000000..ea8af7789ca34d --- /dev/null +++ b/src/app/zap-templates/templates/app/gen-tokens.zapt @@ -0,0 +1,146 @@ +{{> header}} + +// #TODO : This template wasn't tested in any way with CHIP +// Might need a zap submodule update and / or other fixes to make it work. +// ISSUE : #3637 + + +#pragma once + +{{#endpoint_config}} +{{#tokens_context}} + +{{#each singletons}} +// Creator for attribute: {{name}}, singleton +#define CREATOR_{{define}}_SINGLETON {{asHex ../token_id 4}} +#define NVM3KEY_{{define}}_SINGLETON (NVM3KEY_DOMAIN_ZIGBEE | {{asHex ../token_id 4}}) +{{token_next ..}} +{{/each}} +{{#each endpoints}} +{{#each nonSingletons}} +// Creator for attribute: {{name}}, endpoint: {{../id}} +#define CREATOR_{{define}}_{{../id}} {{asHex ../../token_id 4}} +#define NVM3KEY_{{define}}_{{../id}} (NVM3KEY_DOMAIN_ZIGBEE | {{asHex ../../token_id 4}}) +{{token_next ../..}} +{{/each}} +{{/each}} + +// Types for the tokens +#ifdef DEFINETYPES +{{#each singletons}} +{{#if maxLength}} +typedef uint8_t tokType_{{tokenType}}[{{maxLength}}]; +{{else}} +typedef {{as_underlying_type type}} tokType_{{tokenType}}; +{{/if}} +{{/each}} +{{#each nonSingletons}} +{{#if maxLength}} +typedef uint8_t tokType_{{tokenType}}[{{maxLength}}]; +{{else}} +typedef {{as_underlying_type type}} tokType_{{tokenType}}; +{{/if}} +{{/each}} +#endif // DEFINETYPES + + +#ifdef DEFINETOKENS +{{#each singletons}} +{{#if longDefault}} +DEFINE_BASIC_TOKEN({{define}}_SINGLETON, tokType_{{tokenType}}, { {{longDefault}} }) +{{else}} +{{#if defaultValue}} +DEFINE_BASIC_TOKEN({{define}}_SINGLETON, tokType_{{tokenType}}, {{defaultValue}}) +{{else}} +DEFINE_BASIC_TOKEN({{define}}_SINGLETON, tokType_{{tokenType}}, 0) +{{/if}} +{{/if}} +{{/each}} +{{#each endpoints}} +{{#each nonSingletons}} +{{#if longDefault}} +DEFINE_BASIC_TOKEN({{define}}_{{../id}}, tokType_{{tokenType}}, { {{longDefault}} }) +{{else}} +{{#if defaultValue}} +DEFINE_BASIC_TOKEN({{define}}_{{../id}}, tokType_{{tokenType}}, {{defaultValue}}) +{{else}} +DEFINE_BASIC_TOKEN({{define}}_{{../id}}, tokType_{{tokenType}}, 0) +{{/if}} +{{/if}} +{{/each}} +{{/each}} +#endif // DEFINETOKENS + + +// Macro snippet that loads all the attributes from tokens +#define GENERATED_TOKEN_LOADER(endpoint) do {\ +{{#if hasAttributes}} + uint8_t ptr[{{maxSize}}]; \ +{{/if}} +{{#if hasNonSingletons}} + uint8_t curNetwork = emberGetCurrentNetwork(); \ + uint8_t epNetwork; \ +{{/if}} +{{#each singletons}} + halCommonGetToken((tokType_{{tokenType}} *)ptr, TOKEN_{{define}}_SINGLETON); \ +{{#if serverSide}} + emberAfWriteServerAttribute(1, ZCL_{{as_delimited_macro cluster.name}}_CLUSTER_ID, ZCL_{{define}}_ATTRIBUTE_ID, (uint8_t*)ptr, ZCL_{{as_delimited_macro type}}_ATTRIBUTE_TYPE); \ +{{/if}} + {{#unless serverSide}} + emberAfWriteClientAttribute(1, ZCL_{{as_delimited_macro cluster.name}}_CLUSTER_ID, ZCL_{{define}}_ATTRIBUTE_ID, (uint8_t*)ptr, ZCL_{{as_delimited_macro type}}_ATTRIBUTE_TYPE); \ +{{/unless}} +{{/each}} +{{#each endpoints}} +{{#if hasNonSingletons}} + epNetwork = emberAfNetworkIndexFromEndpoint({{id}}); \ + if({{id}} == (endpoint) || (EMBER_BROADCAST_ENDPOINT == (endpoint) && epNetwork == curNetwork)) { \ +{{#each nonSingletons}} + halCommonGetToken((tokType_{{tokenType}} *)ptr, TOKEN_{{define}}_{{../id}}); \ +{{#if serverSide}} + emberAfWriteServerAttribute(1, ZCL_{{as_delimited_macro cluster.name}}_CLUSTER_ID, ZCL_{{define}}_ATTRIBUTE_ID, (uint8_t*)ptr, ZCL_{{as_delimited_macro type}}_ATTRIBUTE_TYPE); \ +{{/if}} +{{#unless serverSide}} + emberAfWriteClientAttribute(1, ZCL_{{as_delimited_macro cluster.name}}_CLUSTER_ID, ZCL_{{define}}_ATTRIBUTE_ID, (uint8_t*)ptr, ZCL_{{as_delimited_macro type}}_ATTRIBUTE_TYPE); \ +{{/unless}} +{{/each}} + } \ +{{/if}} +{{/each}} +} while(false) + + +// Macro snippet that saves the attribute to token +#define GENERATED_TOKEN_SAVER do { \ + uint8_t allZeroData[{{maxSize}}]; \ + MEMSET(allZeroData, 0, {{maxSize}}); \ + if ( data == NULL ) { data = allZeroData; } \ +{{#each clusters}} +{{#if hasSingletons}} + if ( {{hexCode}} == clusterId ) { \ +{{#each singletons}} + if ( {{hexCode}} == metadata->attributeId && 0x0000 == emberAfGetMfgCode(metadata) && !emberAfAttributeIsClient(metadata) ) { \ + halCommonSetToken(TOKEN_{{define}}_SINGLETON, data); } \ +{{/each}} + } \ +{{/if}} +{{/each}} +{{#each endpoints}} +{{#if hasNonSingletons}} + if ( {{id}} == endpoint ) { \ +{{#each clusters}} +{{#if hasNonSingletons}} + if ( {{hexCode}} == clusterId ) { \ +{{#each nonSingletons}} + if ( {{hexCode}} == metadata->attributeId && 0x0000 == emberAfGetMfgCode(metadata) && {{#if serverSide}}!{{/if}}emberAfAttributeIsClient(metadata) ) \ + halCommonSetToken(TOKEN_{{define}}_{{../../id}}, data); \ +{{/each}} + } \ +{{/if}} +{{/each}} + } \ +{{/if}} +{{/each}} +} while(false) + +{{/tokens_context}} +{{/endpoint_config}} diff --git a/src/app/zap-templates/zcl/data-model/silabs/LICENSE.txt b/src/app/zap-templates/zcl/data-model/silabs/LICENSE.txt new file mode 100644 index 00000000000000..d645695673349e --- /dev/null +++ b/src/app/zap-templates/zcl/data-model/silabs/LICENSE.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/src/app/zap-templates/zcl/data-model/silabs/README.md b/src/app/zap-templates/zcl/data-model/silabs/README.md new file mode 100644 index 00000000000000..497dd1b609b003 --- /dev/null +++ b/src/app/zap-templates/zcl/data-model/silabs/README.md @@ -0,0 +1,13 @@ +# ZCL Meta Repository + +This repository contains the test meta-files that describe the ZCL application +layer. + +**IMPORTANT**: these files are NOT the root repository of the ZCL XML files. It +is ONLY a test snapshot so that the zap application has ability to run in a +standalone mode. + +## License + +The contents of this repository are licensed using the +[Apache 2.0 license](LICENSE.txt) diff --git a/src/app/zap-templates/zcl/data-model/silabs/ami-devices.xml b/src/app/zap-templates/zcl/data-model/silabs/ami-devices.xml new file mode 100644 index 00000000000000..e901edbde042b7 --- /dev/null +++ b/src/app/zap-templates/zcl/data-model/silabs/ami-devices.xml @@ -0,0 +1,822 @@ + + + + + SE-rangeextender + SE + SE Range Extender + Router + 0x0109 + 0x0008 + + Basic + Key Establishment + Power Configuration + Alarms + Commissioning + Identify + Over the Air Bootloading + Tunneling + Generic Tunnel + Keep-Alive + + + + SE-ESP + SE + SE Energy Service Interface + Coordinator + 0x0109 + 0x0500 + + Basic + Key Establishment + Power Configuration + Alarms + Commissioning + Identify + Over the Air Bootloading + Tunneling + Generic Tunnel + Messaging + Price + Demand Response and Load Control + Time + Simple Metering + Keep-Alive + + + + SE-Meter + SE + SE Metering Device + Coordinator + 0x0109 + 0x0501 + + Basic + Key Establishment + Power Configuration + Alarms + Commissioning + Identify + Over the Air Bootloading + Tunneling + Generic Tunnel + Simple Metering + Time + Price + Messaging + Keep-Alive + + + + SE-Meter-Mirror + SE + SE Metering Mirror Device + Coordinator + 0x0109 + 0x0501 + + Basic + Key Establishment + Power Configuration + Alarms + Commissioning + Identify + Over the Air Bootloading + Tunneling + Generic Tunnel + Simple Metering + Time + Price + Messaging + Keep-Alive + + + + SE-IPD + SE + SE In-Premises Display + Router + 0x0109 + 0x0502 + + Basic + Key Establishment + Power Configuration + Alarms + Commissioning + Identify + Over the Air Bootloading + Tunneling + Generic Tunnel + Demand Response and Load Control + Time + Price + Simple Metering + Messaging + Keep-Alive + + + + SE-PCT + SE + SE Programmable Communicating Thermostat (PCT) + Router + 0x0109 + 0x0503 + + Basic + Key Establishment + Power Configuration + Alarms + Commissioning + Identify + Over the Air Bootloading + Tunneling + Generic Tunnel + Demand Response and Load Control + Time + Price + Simple Metering + Messaging + Keep-Alive + + + + SE-LC + SE + SE Load Control Device + Router + 0x0109 + 0x0504 + + Basic + Key Establishment + Power Configuration + Alarms + Commissioning + Identify + Over the Air Bootloading + Tunneling + Generic Tunnel + Demand Response and Load Control + Time + Price + Keep-Alive + + + + SE-SA + SE + SE Smart Appliance + Router + 0x0109 + 0x0505 + + Basic + Key Establishment + Power Configuration + Alarms + Commissioning + Identify + Over the Air Bootloading + Tunneling + Generic Tunnel + Price + Time + Demand Response and Load Control + Messaging + Keep-Alive + + + + SE-pt + SE + SE Prepayment Terminal + Router + 0x0109 + 0x0506 + + Basic + Key Establishment + Power Configuration + Alarms + Commissioning + Identify + Over the Air Bootloading + Tunneling + Generic Tunnel + Price + Time + Prepayment + Demand Response and Load Control + Simple Metering + Messaging + Calendar + Device Management + Events + Keep-Alive + + + + SE1.2-rangeextender + SE + SE 1.2 Range Extender + Router + 0x0109 + 0x0008 + + Basic + Key Establishment + Power Configuration + Commissioning + Identify + Events + Over the Air Bootloading + + + + SE1.2-ESP + SE + SE 1.2 Energy Service Interface + Coordinator + 0x0109 + 0x0500 + + Basic + Key Establishment + Power Configuration + Commissioning + Identify + Events + Over the Air Bootloading + Messaging + Price + Demand Response and Load Control + Time + Calendar + Simple Metering + Prepayment + Device Management + Alarms + MDU Pairing + Energy Management + Tunneling + Keep-Alive + + + + SE1.2-Meter + SE + SE 1.2 Metering Device + Router + 0x0109 + 0x0501 + + Basic + Key Establishment + Power Configuration + Commissioning + Identify + Events + Over the Air Bootloading + Simple Metering + Time + Prepayment + Price + Calendar + Messaging + Device Management + MDU Pairing + Alarms + Tunneling + Keep-Alive + + + + SE1.2-Meter-Mirror + SE + SE 1.2 Metering Mirror Device + Router + 0x0109 + 0x0501 + + Basic + Key Establishment + Power Configuration + Commissioning + Identify + Events + Over the Air Bootloading + Simple Metering + Time + Prepayment + Price + Calendar + Messaging + Device Management + MDU Pairing + Alarms + Tunneling + Keep-Alive + + + + SE1.2-In-Home-Display + SE + SE 1.2 In-Home Display + Router + 0x0109 + 0x0502 + + Basic + Key Establishment + Power Configuration + Commissioning + Identify + Events + Over the Air Bootloading + Demand Response and Load Control + Time + Prepayment + Price + Calendar + Simple Metering + Messaging + Device Management + MDU Pairing + Energy Management + Alarms + Tunneling + Keep-Alive + + + + SE1.2-PCT + SE + SE 1.2 Programmable Communicating Thermostat (PCT) + Router + 0x0109 + 0x0503 + + Basic + Key Establishment + Power Configuration + Commissioning + Identify + Events + Over the Air Bootloading + Demand Response and Load Control + Time + Prepayment + Price + Calendar + Simple Metering + Messaging + Device Management + MDU Pairing + Energy Management + Alarms + Tunneling + Keep-Alive + + + + SE1.2-LC + SE + SE 1.2 Load Control Device + Router + 0x0109 + 0x0504 + + Basic + Key Establishment + Power Configuration + Commissioning + Identify + Events + Over the Air Bootloading + Demand Response and Load Control + Time + Price + Calendar + Device Management + MDU Pairing + Energy Management + Alarms + Tunneling + Keep-Alive + + + + SE1.2-SA + SE + SE 1.2 Smart Appliance + Router + 0x0109 + 0x0505 + + Basic + Key Establishment + Power Configuration + Commissioning + Identify + Events + Over the Air Bootloading + Price + Time + Demand Response and Load Control + Messaging + Calendar + Device Management + MDU Pairing + Energy Management + Alarms + Tunneling + Keep-Alive + + + + SE1.2-pt + SE + SE 1.2 Prepayment Terminal + Router + 0x0109 + 0x0506 + + Basic + Key Establishment + Power Configuration + Commissioning + Identify + Events + Over the Air Bootloading + Tunneling + Price + Time + Prepayment + Demand Response and Load Control + Calendar + Simple Metering + Messaging + Device Management + MDU Pairing + Energy Management + Alarms + Tunneling + Keep-Alive + + + + SE1.2-physical + SE + SE 1.2 Physical Device + Router + 0x0109 + 0x0507 + + Basic + Key Establishment + Power Configuration + Commissioning + Identify + Events + Over the Air Bootloading + Keep-Alive + + + + SE1.2-rcd + SE + SE 1.2 Remote Communications Device + Router + 0x0109 + 0x0508 + + Basic + Key Establishment + Power Configuration + Commissioning + Identify + Events + Over the Air Bootloading + Tunneling + Time + Keep-Alive + + + + SE1.4-rangeextender + SE + SE 1.4 Range Extender + Router + 0x0109 + 0x0008 + + Basic + Key Establishment + Power Configuration + Commissioning + Identify + Events + Over the Air Bootloading + Sub-GHz + + + + SE1.4-ESP + SE + SE 1.4 Energy Service Interface + Coordinator + 0x0109 + 0x0500 + + Basic + Key Establishment + Power Configuration + Commissioning + Identify + Events + Over the Air Bootloading + Messaging + Price + Demand Response and Load Control + Time + Calendar + Simple Metering + Prepayment + Device Management + Alarms + MDU Pairing + Energy Management + Tunneling + Keep-Alive + Sub-GHz + + + + SE1.4-Meter + SE + SE 1.4 Metering Device + Router + 0x0109 + 0x0501 + + Basic + Key Establishment + Power Configuration + Commissioning + Identify + Events + Over the Air Bootloading + Simple Metering + Time + Prepayment + Price + Calendar + Messaging + Device Management + MDU Pairing + Alarms + Tunneling + Keep-Alive + Sub-GHz + + + + SE1.4-Meter-Mirror + SE + SE 1.4 Metering Mirror Device + Router + 0x0109 + 0x0501 + + Basic + Key Establishment + Power Configuration + Commissioning + Identify + Events + Over the Air Bootloading + Simple Metering + Time + Prepayment + Price + Calendar + Messaging + Device Management + MDU Pairing + Alarms + Tunneling + Keep-Alive + Sub-GHz + + + + SE1.4-In-Home-Display + SE + SE 1.4 In-Home Display + Router + 0x0109 + 0x0502 + + Basic + Key Establishment + Power Configuration + Commissioning + Identify + Events + Over the Air Bootloading + Demand Response and Load Control + Time + Prepayment + Price + Calendar + Simple Metering + Messaging + Device Management + MDU Pairing + Energy Management + Alarms + Tunneling + Keep-Alive + Sub-GHz + + + + SE1.4-PCT + SE + SE 1.4 Programmable Communicating Thermostat (PCT) + Router + 0x0109 + 0x0503 + + Basic + Key Establishment + Power Configuration + Commissioning + Identify + Events + Over the Air Bootloading + Demand Response and Load Control + Time + Prepayment + Price + Calendar + Simple Metering + Messaging + Device Management + MDU Pairing + Energy Management + Alarms + Tunneling + Keep-Alive + Sub-GHz + + + + SE1.4-LC + SE + SE 1.4 Load Control Device + Router + 0x0109 + 0x0504 + + Basic + Key Establishment + Power Configuration + Commissioning + Identify + Events + Over the Air Bootloading + Demand Response and Load Control + Time + Price + Calendar + Device Management + MDU Pairing + Energy Management + Alarms + Tunneling + Keep-Alive + Sub-GHz + + + + SE1.4-SA + SE + SE 1.4 Smart Appliance + Router + 0x0109 + 0x0505 + + Basic + Key Establishment + Power Configuration + Commissioning + Identify + Events + Over the Air Bootloading + Price + Time + Demand Response and Load Control + Messaging + Calendar + Device Management + MDU Pairing + Energy Management + Alarms + Tunneling + Keep-Alive + Sub-GHz + + + + SE1.4-pt + SE + SE 1.4 Prepayment Terminal + Router + 0x0109 + 0x0506 + + Basic + Key Establishment + Power Configuration + Commissioning + Identify + Events + Over the Air Bootloading + Tunneling + Price + Time + Prepayment + Demand Response and Load Control + Calendar + Simple Metering + Messaging + Device Management + MDU Pairing + Energy Management + Alarms + Tunneling + Keep-Alive + Sub-GHz + + + + SE1.4-physical + SE + SE 1.4 Physical Device + Router + 0x0109 + 0x0507 + + Basic + Key Establishment + Power Configuration + Commissioning + Identify + Events + Over the Air Bootloading + Keep-Alive + Sub-GHz + + + + SE1.4-rcd + SE + SE 1.4 Remote Communications Device + Router + 0x0109 + 0x0508 + + Basic + Key Establishment + Power Configuration + Commissioning + Identify + Events + Over the Air Bootloading + Tunneling + Time + Keep-Alive + Sub-GHz + + + diff --git a/src/app/zap-templates/zcl/data-model/silabs/ami.xml b/src/app/zap-templates/zcl/data-model/silabs/ami.xml new file mode 100644 index 00000000000000..525f417c698484 --- /dev/null +++ b/src/app/zap-templates/zcl/data-model/silabs/ami.xml @@ -0,0 +1,5810 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Price + SE + The Price Cluster provides the mechanism for communicating Gas, Energy, or Water pricing information within the premises. + 0x0700 + PRICE_CLUSTER + true + true + + + + tier 1 price label + tier 2 price label + tier 3 price label + tier 4 price label + tier 5 price label + tier 6 price label + tier 7 price label + tier 8 price label + tier 9 price label + tier 10 price label + tier 11 price label + tier 12 price label + tier 13 price label + tier 14 price label + tier 15 price label + tier 16 price label + tier 17 price label + tier 18 price label + tier 19 price label + tier 20 price label + tier 21 price label + tier 22 price label + tier 23 price label + tier 24 price label + tier 25 price label + tier 26 price label + tier 27 price label + tier 28 price label + tier 29 price label + tier 30 price label + tier 31 price label + tier 32 price label + tier 33 price label + tier 34 price label + tier 35 price label + tier 36 price label + tier 37 price label + tier 38 price label + tier 39 price label + tier 40 price label + tier 41 price label + tier 42 price label + tier 43 price label + tier 44 price label + tier 45 price label + tier 46 price label + tier 47 price label + tier 48 price label + + block 1 threshold + block 2 threshold + block 3 threshold + block 4 threshold + block 5 threshold + block 6 threshold + block 7 threshold + block 8 threshold + block 9 threshold + block 10 threshold + block 11 threshold + block 12 threshold + block 13 threshold + block 14 threshold + block 15 threshold + block threshold count + tier 1 block 1 threshold + tier 1 block 2 threshold + tier 1 block 3 threshold + tier 1 block 4 threshold + tier 1 block 5 threshold + tier 1 block 6 threshold + tier 1 block 7 threshold + tier 1 block 8 threshold + tier 1 block 9 threshold + tier 1 block 10 threshold + tier 1 block 11 threshold + tier 1 block 12 threshold + tier 1 block 13 threshold + tier 1 block 14 threshold + tier 1 block 15 threshold + tier 1 block threshold count + tier 2 block 1 threshold + tier 2 block 2 threshold + tier 2 block 3 threshold + tier 2 block 4 threshold + tier 2 block 5 threshold + tier 2 block 6 threshold + tier 2 block 7 threshold + tier 2 block 8 threshold + tier 2 block 9 threshold + tier 2 block 10 threshold + tier 2 block 11 threshold + tier 2 block 12 threshold + tier 2 block 13 threshold + tier 2 block 14 threshold + tier 2 block 15 threshold + tier 2 block threshold count + tier 3 block 1 threshold + tier 3 block 2 threshold + tier 3 block 3 threshold + tier 3 block 4 threshold + tier 3 block 5 threshold + tier 3 block 6 threshold + tier 3 block 7 threshold + tier 3 block 8 threshold + tier 3 block 9 threshold + tier 3 block 10 threshold + tier 3 block 11 threshold + tier 3 block 12 threshold + tier 3 block 13 threshold + tier 3 block 14 threshold + tier 3 block 15 threshold + tier 3 block threshold count + tier 4 block 1 threshold + tier 4 block 2 threshold + tier 4 block 3 threshold + tier 4 block 4 threshold + tier 4 block 5 threshold + tier 4 block 6 threshold + tier 4 block 7 threshold + tier 4 block 8 threshold + tier 4 block 9 threshold + tier 4 block 10 threshold + tier 4 block 11 threshold + tier 4 block 12 threshold + tier 4 block 13 threshold + tier 4 block 14 threshold + tier 4 block 15 threshold + tier 4 block threshold count + tier 5 block 1 threshold + tier 5 block 2 threshold + tier 5 block 3 threshold + tier 5 block 4 threshold + tier 5 block 5 threshold + tier 5 block 6 threshold + tier 5 block 7 threshold + tier 5 block 8 threshold + tier 5 block 9 threshold + tier 5 block 10 threshold + tier 5 block 11 threshold + tier 5 block 12 threshold + tier 5 block 13 threshold + tier 5 block 14 threshold + tier 5 block 15 threshold + tier 5 block threshold count + tier 6 block 1 threshold + tier 6 block 2 threshold + tier 6 block 3 threshold + tier 6 block 4 threshold + tier 6 block 5 threshold + tier 6 block 6 threshold + tier 6 block 7 threshold + tier 6 block 8 threshold + tier 6 block 9 threshold + tier 6 block 10 threshold + tier 6 block 11 threshold + tier 6 block 12 threshold + tier 6 block 13 threshold + tier 6 block 14 threshold + tier 6 block 15 threshold + tier 6 block threshold count + tier 7 block 1 threshold + tier 7 block 2 threshold + tier 7 block 3 threshold + tier 7 block 4 threshold + tier 7 block 5 threshold + tier 7 block 6 threshold + tier 7 block 7 threshold + tier 7 block 8 threshold + tier 7 block 9 threshold + tier 7 block 10 threshold + tier 7 block 11 threshold + tier 7 block 12 threshold + tier 7 block 13 threshold + tier 7 block 14 threshold + tier 7 block 15 threshold + tier 7 block threshold count + tier 8 block 1 threshold + tier 8 block 2 threshold + tier 8 block 3 threshold + tier 8 block 4 threshold + tier 8 block 5 threshold + tier 8 block 6 threshold + tier 8 block 7 threshold + tier 8 block 8 threshold + tier 8 block 9 threshold + tier 8 block 10 threshold + tier 8 block 11 threshold + tier 8 block 12 threshold + tier 8 block 13 threshold + tier 8 block 14 threshold + tier 8 block 15 threshold + tier 8 block threshold count + tier 9 block 1 threshold + tier 9 block 2 threshold + tier 9 block 3 threshold + tier 9 block 4 threshold + tier 9 block 5 threshold + tier 9 block 6 threshold + tier 9 block 7 threshold + tier 9 block 8 threshold + tier 9 block 9 threshold + tier 9 block 10 threshold + tier 9 block 11 threshold + tier 9 block 12 threshold + tier 9 block 13 threshold + tier 9 block 14 threshold + tier 9 block 15 threshold + tier 9 block threshold count + tier 10 block 1 threshold + tier 10 block 2 threshold + tier 10 block 3 threshold + tier 10 block 4 threshold + tier 10 block 5 threshold + tier 10 block 6 threshold + tier 10 block 7 threshold + tier 10 block 8 threshold + tier 10 block 9 threshold + tier 10 block 10 threshold + tier 10 block 11 threshold + tier 10 block 12 threshold + tier 10 block 13 threshold + tier 10 block 14 threshold + tier 10 block 15 threshold + tier 10 block threshold count + tier 11 block 1 threshold + tier 11 block 2 threshold + tier 11 block 3 threshold + tier 11 block 4 threshold + tier 11 block 5 threshold + tier 11 block 6 threshold + tier 11 block 7 threshold + tier 11 block 8 threshold + tier 11 block 9 threshold + tier 11 block 10 threshold + tier 11 block 11 threshold + tier 11 block 12 threshold + tier 11 block 13 threshold + tier 11 block 14 threshold + tier 11 block 15 threshold + tier 11 block threshold count + tier 12 block 1 threshold + tier 12 block 2 threshold + tier 12 block 3 threshold + tier 12 block 4 threshold + tier 12 block 5 threshold + tier 12 block 6 threshold + tier 12 block 7 threshold + tier 12 block 8 threshold + tier 12 block 9 threshold + tier 12 block 10 threshold + tier 12 block 11 threshold + tier 12 block 12 threshold + tier 12 block 13 threshold + tier 12 block 14 threshold + tier 12 block 15 threshold + tier 12 block threshold count + tier 13 block 1 threshold + tier 13 block 2 threshold + tier 13 block 3 threshold + tier 13 block 4 threshold + tier 13 block 5 threshold + tier 13 block 6 threshold + tier 13 block 7 threshold + tier 13 block 8 threshold + tier 13 block 9 threshold + tier 13 block 10 threshold + tier 13 block 11 threshold + tier 13 block 12 threshold + tier 13 block 13 threshold + tier 13 block 14 threshold + tier 13 block 15 threshold + tier 13 block threshold count + tier 14 block 1 threshold + tier 14 block 2 threshold + tier 14 block 3 threshold + tier 14 block 4 threshold + tier 14 block 5 threshold + tier 14 block 6 threshold + tier 14 block 7 threshold + tier 14 block 8 threshold + tier 14 block 9 threshold + tier 14 block 10 threshold + tier 14 block 11 threshold + tier 14 block 12 threshold + tier 14 block 13 threshold + tier 14 block 14 threshold + tier 14 block 15 threshold + tier 14 block threshold count + tier 15 block 1 threshold + tier 15 block 2 threshold + tier 15 block 3 threshold + tier 15 block 4 threshold + tier 15 block 5 threshold + tier 15 block 6 threshold + tier 15 block 7 threshold + tier 15 block 8 threshold + tier 15 block 9 threshold + tier 15 block 10 threshold + tier 15 block 11 threshold + tier 15 block 12 threshold + tier 15 block 13 threshold + tier 15 block 14 threshold + tier 15 block 15 threshold + tier 15 block threshold count + + start of block period + block period duration (minutes) + threshold multiplier + threshold divisor + block period duration type + + commodity type + standing charge + conversion factor + conversion factor trailing digit + calorific value + calorific value unit + calorific value trailing digit + + no tier block 1 price + no tier block 2 price + no tier block 3 price + no tier block 4 price + no tier block 5 price + no tier block 6 price + no tier block 7 price + no tier block 8 price + no tier block 9 price + no tier block 10 price + no tier block 11 price + no tier block 12 price + no tier block 13 price + no tier block 14 price + no tier block 15 price + no tier block 16 price + tier 1 block 1 price + tier 1 block 2 price + tier 1 block 3 price + tier 1 block 4 price + tier 1 block 5 price + tier 1 block 6 price + tier 1 block 7 price + tier 1 block 8 price + tier 1 block 9 price + tier 1 block 10 price + tier 1 block 11 price + tier 1 block 12 price + tier 1 block 13 price + tier 1 block 14 price + tier 1 block 15 price + tier 1 block 16 price + tier 2 block 1 price + tier 2 block 2 price + tier 2 block 3 price + tier 2 block 4 price + tier 2 block 5 price + tier 2 block 6 price + tier 2 block 7 price + tier 2 block 8 price + tier 2 block 9 price + tier 2 block 10 price + tier 2 block 11 price + tier 2 block 12 price + tier 2 block 13 price + tier 2 block 14 price + tier 2 block 15 price + tier 2 block 16 price + tier 3 block 1 price + tier 3 block 2 price + tier 3 block 3 price + tier 3 block 4 price + tier 3 block 5 price + tier 3 block 6 price + tier 3 block 7 price + tier 3 block 8 price + tier 3 block 9 price + tier 3 block 10 price + tier 3 block 11 price + tier 3 block 12 price + tier 3 block 13 price + tier 3 block 14 price + tier 3 block 15 price + tier 3 block 16 price + tier 4 block 1 price + tier 4 block 2 price + tier 4 block 3 price + tier 4 block 4 price + tier 4 block 5 price + tier 4 block 6 price + tier 4 block 7 price + tier 4 block 8 price + tier 4 block 9 price + tier 4 block 10 price + tier 4 block 11 price + tier 4 block 12 price + tier 4 block 13 price + tier 4 block 14 price + tier 4 block 15 price + tier 4 block 16 price + tier 5 block 1 price + tier 5 block 2 price + tier 5 block 3 price + tier 5 block 4 price + tier 5 block 5 price + tier 5 block 6 price + tier 5 block 7 price + tier 5 block 8 price + tier 5 block 9 price + tier 5 block 10 price + tier 5 block 11 price + tier 5 block 12 price + tier 5 block 13 price + tier 5 block 14 price + tier 5 block 15 price + tier 5 block 16 price + tier 6 block 1 price + tier 6 block 2 price + tier 6 block 3 price + tier 6 block 4 price + tier 6 block 5 price + tier 6 block 6 price + tier 6 block 7 price + tier 6 block 8 price + tier 6 block 9 price + tier 6 block 10 price + tier 6 block 11 price + tier 6 block 12 price + tier 6 block 13 price + tier 6 block 14 price + tier 6 block 15 price + tier 6 block 16 price + tier 7 block 1 price + tier 7 block 2 price + tier 7 block 3 price + tier 7 block 4 price + tier 7 block 5 price + tier 7 block 6 price + tier 7 block 7 price + tier 7 block 8 price + tier 7 block 9 price + tier 7 block 10 price + tier 7 block 11 price + tier 7 block 12 price + tier 7 block 13 price + tier 7 block 14 price + tier 7 block 15 price + tier 7 block 16 price + tier 8 block 1 price + tier 8 block 2 price + tier 8 block 3 price + tier 8 block 4 price + tier 8 block 5 price + tier 8 block 6 price + tier 8 block 7 price + tier 8 block 8 price + tier 8 block 9 price + tier 8 block 10 price + tier 8 block 11 price + tier 8 block 12 price + tier 8 block 13 price + tier 8 block 14 price + tier 8 block 15 price + tier 8 block 16 price + tier 9 block 1 price + tier 9 block 2 price + tier 9 block 3 price + tier 9 block 4 price + tier 9 block 5 price + tier 9 block 6 price + tier 9 block 7 price + tier 9 block 8 price + tier 9 block 9 price + tier 9 block 10 price + tier 9 block 11 price + tier 9 block 12 price + tier 9 block 13 price + tier 9 block 14 price + tier 9 block 15 price + tier 9 block 16 price + tier 10 block 1 price + tier 10 block 2 price + tier 10 block 3 price + tier 10 block 4 price + tier 10 block 5 price + tier 10 block 6 price + tier 10 block 7 price + tier 10 block 8 price + tier 10 block 9 price + tier 10 block 10 price + tier 10 block 11 price + tier 10 block 12 price + tier 10 block 13 price + tier 10 block 14 price + tier 10 block 15 price + tier 10 block 16 price + tier 11 block 1 price + tier 11 block 2 price + tier 11 block 3 price + tier 11 block 4 price + tier 11 block 5 price + tier 11 block 6 price + tier 11 block 7 price + tier 11 block 8 price + tier 11 block 9 price + tier 11 block 10 price + tier 11 block 11 price + tier 11 block 12 price + tier 11 block 13 price + tier 11 block 14 price + tier 11 block 15 price + tier 11 block 16 price + tier 12 block 1 price + tier 12 block 2 price + tier 12 block 3 price + tier 12 block 4 price + tier 12 block 5 price + tier 12 block 6 price + tier 12 block 7 price + tier 12 block 8 price + tier 12 block 9 price + tier 12 block 10 price + tier 12 block 11 price + tier 12 block 12 price + tier 12 block 13 price + tier 12 block 14 price + tier 12 block 15 price + tier 12 block 16 price + tier 13 block 1 price + tier 13 block 2 price + tier 13 block 3 price + tier 13 block 4 price + tier 13 block 5 price + tier 13 block 6 price + tier 13 block 7 price + tier 13 block 8 price + tier 13 block 9 price + tier 13 block 10 price + tier 13 block 11 price + tier 13 block 12 price + tier 13 block 13 price + tier 13 block 14 price + tier 13 block 15 price + tier 13 block 16 price + tier 14 block 1 price + tier 14 block 2 price + tier 14 block 3 price + tier 14 block 4 price + tier 14 block 5 price + tier 14 block 6 price + tier 14 block 7 price + tier 14 block 8 price + tier 14 block 9 price + tier 14 block 10 price + tier 14 block 11 price + tier 14 block 12 price + tier 14 block 13 price + tier 14 block 14 price + tier 14 block 15 price + tier 14 block 16 price + tier 15 block 1 price + tier 15 block 2 price + tier 15 block 3 price + tier 15 block 4 price + tier 15 block 5 price + tier 15 block 6 price + tier 15 block 7 price + tier 15 block 8 price + tier 15 block 9 price + tier 15 block 10 price + tier 15 block 11 price + tier 15 block 12 price + tier 15 block 13 price + tier 15 block 14 price + tier 15 block 15 price + tier 15 block 16 price + + price tier 16 + price tier 17 + price tier 18 + price tier 19 + price tier 20 + price tier 21 + price tier 22 + price tier 23 + price tier 24 + price tier 25 + price tier 26 + price tier 27 + price tier 28 + price tier 29 + price tier 30 + price tier 31 + price tier 32 + price tier 33 + price tier 34 + price tier 35 + price tier 36 + price tier 37 + price tier 38 + price tier 39 + price tier 40 + price tier 41 + price tier 42 + price tier 43 + price tier 44 + price tier 45 + price tier 46 + price tier 47 + price tier 48 + CPP1 Price + CPP2 Price + + tariff label + number of price tiers in use + number of block thresholds in use + tier block mode + unit of measure + currency + price trailing digit + tariff resolution period + CO2 + CO2 unit + CO2 trailing digit + + current billing period start + current billing period duration + last billing period start + last billing period duration + last billing period consolidated bill + + credit payment due date + credit payment status + credit payment over due amount + payment discount + payment discount period + credit payment 1 + credit payment date 1 + credit payment ref 1 + credit payment 2 + credit payment date 2 + credit payment ref 2 + credit payment 3 + credit payment date 3 + credit payment ref 3 + credit payment 4 + credit payment date 4 + credit payment ref 4 + credit payment 5 + credit payment date 5 + credit payment ref 5 + + rx tier 1 price label + rx tier 2 price label + rx tier 3 price label + rx tier 4 price label + rx tier 5 price label + rx tier 6 price label + rx tier 7 price label + rx tier 8 price label + rx tier 9 price label + rx tier 10 price label + rx tier 11 price label + rx tier 12 price label + rx tier 13 price label + rx tier 14 price label + rx tier 15 price label + rx tier 16 price label + rx tier 17 price label + rx tier 18 price label + rx tier 19 price label + rx tier 20 price label + rx tier 21 price label + rx tier 22 price label + rx tier 23 price label + rx tier 24 price label + rx tier 25 price label + rx tier 26 price label + rx tier 27 price label + rx tier 28 price label + rx tier 29 price label + rx tier 30 price label + rx tier 31 price label + rx tier 32 price label + rx tier 33 price label + rx tier 34 price label + rx tier 35 price label + rx tier 36 price label + rx tier 37 price label + rx tier 38 price label + rx tier 39 price label + rx tier 40 price label + rx tier 41 price label + rx tier 42 price label + rx tier 43 price label + rx tier 44 price label + rx tier 45 price label + rx tier 46 price label + rx tier 47 price label + rx tier 48 price label + + rx block 1 threshold + rx block 2 threshold + rx block 3 threshold + rx block 4 threshold + rx block 5 threshold + rx block 6 threshold + rx block 7 threshold + rx block 8 threshold + rx block 9 threshold + rx block 10 threshold + rx block 11 threshold + rx block 12 threshold + rx block 13 threshold + rx block 14 threshold + rx block 15 threshold + + rx start of block period + rx block period duration + rx threshold multiplier + rx threshold divisor + + rx no tier block 1 price + rx no tier block 2 price + rx no tier block 3 price + rx no tier block 4 price + rx no tier block 5 price + rx no tier block 6 price + rx no tier block 7 price + rx no tier block 8 price + rx no tier block 9 price + rx no tier block 10 price + rx no tier block 11 price + rx no tier block 12 price + rx no tier block 13 price + rx no tier block 14 price + rx no tier block 15 price + rx no tier block 16 price + rx tier 1 block 1 price + rx tier 1 block 2 price + rx tier 1 block 3 price + rx tier 1 block 4 price + rx tier 1 block 5 price + rx tier 1 block 6 price + rx tier 1 block 7 price + rx tier 1 block 8 price + rx tier 1 block 9 price + rx tier 1 block 10 price + rx tier 1 block 11 price + rx tier 1 block 12 price + rx tier 1 block 13 price + rx tier 1 block 14 price + rx tier 1 block 15 price + rx tier 1 block 16 price + rx tier 2 block 1 price + rx tier 2 block 2 price + rx tier 2 block 3 price + rx tier 2 block 4 price + rx tier 2 block 5 price + rx tier 2 block 6 price + rx tier 2 block 7 price + rx tier 2 block 8 price + rx tier 2 block 9 price + rx tier 2 block 10 price + rx tier 2 block 11 price + rx tier 2 block 12 price + rx tier 2 block 13 price + rx tier 2 block 14 price + rx tier 2 block 15 price + rx tier 2 block 16 price + rx tier 3 block 1 price + rx tier 3 block 2 price + rx tier 3 block 3 price + rx tier 3 block 4 price + rx tier 3 block 5 price + rx tier 3 block 6 price + rx tier 3 block 7 price + rx tier 3 block 8 price + rx tier 3 block 9 price + rx tier 3 block 10 price + rx tier 3 block 11 price + rx tier 3 block 12 price + rx tier 3 block 13 price + rx tier 3 block 14 price + rx tier 3 block 15 price + rx tier 3 block 16 price + rx tier 4 block 1 price + rx tier 4 block 2 price + rx tier 4 block 3 price + rx tier 4 block 4 price + rx tier 4 block 5 price + rx tier 4 block 6 price + rx tier 4 block 7 price + rx tier 4 block 8 price + rx tier 4 block 9 price + rx tier 4 block 10 price + rx tier 4 block 11 price + rx tier 4 block 12 price + rx tier 4 block 13 price + rx tier 4 block 14 price + rx tier 4 block 15 price + rx tier 4 block 16 price + rx tier 5 block 1 price + rx tier 5 block 2 price + rx tier 5 block 3 price + rx tier 5 block 4 price + rx tier 5 block 5 price + rx tier 5 block 6 price + rx tier 5 block 7 price + rx tier 5 block 8 price + rx tier 5 block 9 price + rx tier 5 block 10 price + rx tier 5 block 11 price + rx tier 5 block 12 price + rx tier 5 block 13 price + rx tier 5 block 14 price + rx tier 5 block 15 price + rx tier 5 block 16 price + rx tier 6 block 1 price + rx tier 6 block 2 price + rx tier 6 block 3 price + rx tier 6 block 4 price + rx tier 6 block 5 price + rx tier 6 block 6 price + rx tier 6 block 7 price + rx tier 6 block 8 price + rx tier 6 block 9 price + rx tier 6 block 10 price + rx tier 6 block 11 price + rx tier 6 block 12 price + rx tier 6 block 13 price + rx tier 6 block 14 price + rx tier 6 block 15 price + rx tier 6 block 16 price + rx tier 7 block 1 price + rx tier 7 block 2 price + rx tier 7 block 3 price + rx tier 7 block 4 price + rx tier 7 block 5 price + rx tier 7 block 6 price + rx tier 7 block 7 price + rx tier 7 block 8 price + rx tier 7 block 9 price + rx tier 7 block 10 price + rx tier 7 block 11 price + rx tier 7 block 12 price + rx tier 7 block 13 price + rx tier 7 block 14 price + rx tier 7 block 15 price + rx tier 7 block 16 price + rx tier 8 block 1 price + rx tier 8 block 2 price + rx tier 8 block 3 price + rx tier 8 block 4 price + rx tier 8 block 5 price + rx tier 8 block 6 price + rx tier 8 block 7 price + rx tier 8 block 8 price + rx tier 8 block 9 price + rx tier 8 block 10 price + rx tier 8 block 11 price + rx tier 8 block 12 price + rx tier 8 block 13 price + rx tier 8 block 14 price + rx tier 8 block 15 price + rx tier 8 block 16 price + rx tier 9 block 1 price + rx tier 9 block 2 price + rx tier 9 block 3 price + rx tier 9 block 4 price + rx tier 9 block 5 price + rx tier 9 block 6 price + rx tier 9 block 7 price + rx tier 9 block 8 price + rx tier 9 block 9 price + rx tier 9 block 10 price + rx tier 9 block 11 price + rx tier 9 block 12 price + rx tier 9 block 13 price + rx tier 9 block 14 price + rx tier 9 block 15 price + rx tier 9 block 16 price + rx tier 10 block 1 price + rx tier 10 block 2 price + rx tier 10 block 3 price + rx tier 10 block 4 price + rx tier 10 block 5 price + rx tier 10 block 6 price + rx tier 10 block 7 price + rx tier 10 block 8 price + rx tier 10 block 9 price + rx tier 10 block 10 price + rx tier 10 block 11 price + rx tier 10 block 12 price + rx tier 10 block 13 price + rx tier 10 block 14 price + rx tier 10 block 15 price + rx tier 10 block 16 price + rx tier 11 block 1 price + rx tier 11 block 2 price + rx tier 11 block 3 price + rx tier 11 block 4 price + rx tier 11 block 5 price + rx tier 11 block 6 price + rx tier 11 block 7 price + rx tier 11 block 8 price + rx tier 11 block 9 price + rx tier 11 block 10 price + rx tier 11 block 11 price + rx tier 11 block 12 price + rx tier 11 block 13 price + rx tier 11 block 14 price + rx tier 11 block 15 price + rx tier 11 block 16 price + rx tier 12 block 1 price + rx tier 12 block 2 price + rx tier 12 block 3 price + rx tier 12 block 4 price + rx tier 12 block 5 price + rx tier 12 block 6 price + rx tier 12 block 7 price + rx tier 12 block 8 price + rx tier 12 block 9 price + rx tier 12 block 10 price + rx tier 12 block 11 price + rx tier 12 block 12 price + rx tier 12 block 13 price + rx tier 12 block 14 price + rx tier 12 block 15 price + rx tier 12 block 16 price + rx tier 13 block 1 price + rx tier 13 block 2 price + rx tier 13 block 3 price + rx tier 13 block 4 price + rx tier 13 block 5 price + rx tier 13 block 6 price + rx tier 13 block 7 price + rx tier 13 block 8 price + rx tier 13 block 9 price + rx tier 13 block 10 price + rx tier 13 block 11 price + rx tier 13 block 12 price + rx tier 13 block 13 price + rx tier 13 block 14 price + rx tier 13 block 15 price + rx tier 13 block 16 price + rx tier 14 block 1 price + rx tier 14 block 2 price + rx tier 14 block 3 price + rx tier 14 block 4 price + rx tier 14 block 5 price + rx tier 14 block 6 price + rx tier 14 block 7 price + rx tier 14 block 8 price + rx tier 14 block 9 price + rx tier 14 block 10 price + rx tier 14 block 11 price + rx tier 14 block 12 price + rx tier 14 block 13 price + rx tier 14 block 14 price + rx tier 14 block 15 price + rx tier 14 block 16 price + rx tier 15 block 1 price + rx tier 15 block 2 price + rx tier 15 block 3 price + rx tier 15 block 4 price + rx tier 15 block 5 price + rx tier 15 block 6 price + rx tier 15 block 7 price + rx tier 15 block 8 price + rx tier 15 block 9 price + rx tier 15 block 10 price + rx tier 15 block 11 price + rx tier 15 block 12 price + rx tier 15 block 13 price + rx tier 15 block 14 price + rx tier 15 block 15 price + rx tier 15 block 16 price + + rx price tier 16 + rx price tier 17 + rx price tier 18 + rx price tier 19 + rx price tier 20 + rx price tier 21 + rx price tier 22 + rx price tier 23 + rx price tier 24 + rx price tier 25 + rx price tier 26 + rx price tier 27 + rx price tier 28 + rx price tier 29 + rx price tier 30 + rx price tier 31 + rx price tier 32 + rx price tier 33 + rx price tier 34 + rx price tier 35 + rx price tier 36 + rx price tier 37 + rx price tier 38 + rx price tier 39 + rx price tier 40 + rx price tier 41 + rx price tier 42 + rx price tier 43 + rx price tier 44 + rx price tier 45 + rx price tier 46 + rx price tier 47 + rx price tier 48 + + rx tariff label + rx number of price tiers in use + rx number of block thresholds in use + rx tier block mode + rx tariff resolution period + rx CO2 + rx CO2 unit + rx CO2 trailing digit + + rx current billing period start + rx current billing period duration + rx last billing period start + rx last billing period duration + rx last billing period consolidated bill + + price increase randomize minutes + price decrease randomize minutes + commodity type + + + + The PublishPrice command is generated in response to receiving a Get Current Price command, in response to a Get Scheduled Prices command, and when an update to the pricing information is available from the commodity provider, either before or when a TOU price becomes active. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The PublishBlockPeriod command is generated in response to receiving a GetBlockPeriod(s) command or when an update to the block tariff schedule is available from the commodity provider. + + + + + + + + + + + + + + The PublishConversionFactor command is sent in response to a GetConversionFactor command or if a new Conversion factor is available. + + + + + + + + + The PublishCalorificValue command is sent in response to a GetCalorificValue command or if a new calorific value is available. + + + + + + + + + + The PublishTariffInformation command is sent in response to a GetTariffInformation command or if new tariff information is available (including price matrix and block thresholds). + + + + + + + + + + + + + + + + + + + + PublishPriceMatrix command is used to publish the Block Price Information Set (up to 15 tiers x 15 blocks) and the Extended Price Information Set (up to 48 tiers). The PublishPriceMatrix command is sent in response to a GetPriceMatrix command. + + + + + + + + + + + + + The PublishBlockThreshold command is sent in response to a GetBlockThreshold command. + + + + + + + + + + + + + The PublishCO2Value command is sent in response to a GetCO2Value command or if a new CO2 conversion factor is available. + + + + + + + + + + + + The PublishTierLabels command is generated in response to receiving a GetTierLabels command or when there is a tier label change. + + + + + + + + + + + + The PublishBillingPeriod command is generated in response to receiving a GetBillingPeriod(s) command or when an update to the Billing schedule is available from the commodity Supplier. + + + + + + + + + + + The PublishConsolidatedBill command is used to make consolidated billing information of previous billing periods available to other end devices. This command is issued in response to a GetConsolidatedBill command or if new billing information is available. + + + + + + + + + + + + + + The PublishCPPEvent command is sent from an ESI to its price clients to notify them of a Critical Peak Pricing event. + + + + + + + + + + + + The PublishCreditPayment command is used to update the credit payment information is available. + + + + + + + + + + + + + The PublishCurrencyConversion command is sent in response to a GetCurrencyConversion command or when a new currency becomes available. + + + + + + + + + + + + + The CancelTariff command indicates that all data associated with a particular tariff instance should be discarded. + + + + + + + + + The GetCurrentPrice command initiates a PublishPrice command for the current time. + + + + + + The GetScheduledPrices command initiates a PublishPrice command for available price events. + + + + + + + The PriceAcknowledgement command described provides the ability to acknowledge a previously sent PublishPrice command. + + + + + + + + + The GetBlockPeriods command initiates a PublishBlockPeriod command for the currently scheduled block periods. + + + + + + + + The GetConversionFactor command initiates a PublishConversionFactor command for the scheduled conversion factor updates. + + + + + + + + The GetCalorificValue command initiates a PublishCalorificValue command for the scheduled conversion factor updates. + + + + + + + + The GetTariffInformation command initiates a PublishTariffInformation command for the scheduled tariff updates. + + + + + + + + + The GetPriceMatrix command initiates a PublishPriceMatrix command for the scheduled Price Matrix updates. + + + + + + The GetBlockThresholds command initiates a PublishBlockThreshold command for the scheduled Block Threshold updates. + + + + + + The GetCO2Value command initiates a PublishCO2Value command for the scheduled CO2 conversion factor updates. + + + + + + + + + The GetTierLabels command allows a client to retrieve the tier labels associated with a given tariff; this command initiates a PublishTierLabels command from the server. + + + + + + The GetBillingPeriod command initiates one or more PublishBillingPeriod commands for the currently scheduled billing periods. + + + + + + + + + The GetConsolidatedBill command initiates one or more PublishConsolidatedBill commands with the requested billing information. + + + + + + + + + The CPPEventResponse command is sent from a Client (IHD) to the ESI to notify it of a Critical Peak Pricing event authorization. + + + + + + + The GetCreditPayment command initiates PublishCreditPayment commands for the requested credit payment information. + + + + + + + The GetCurrencyConversionCommand command initiates a PublishCurrencyConversion command for the currency conversion factor updates. A server shall be capable of storing both the old and the new currencies. + + + + + The GetTariffCancellation command initiates the return of the last CancelTariff command held on the associated server. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Demand Response and Load Control + SE + This cluster provides an interface to the functionality of Smart Energy Demand Response and Load Control. Devices targeted by this cluster include thermostats and devices that support load control. + 0x0701 + DEMAND_RESPONSE_LOAD_CONTROL_CLUSTER + true + true + + + + utility enrollment group + start randomization minutes + duration randomization minutes + device class value + + + + Command description for LoadControlEvent + + + + + + + + + + + + + + + + + + Command description for CancelLoadControlEvent + + + + + + + + + + Command description for CancelAllLoadControlEvents + + + + + + + Command description for ReportEventStatus + + + + + + + + + + + + + + + + Command description for GetScheduledEvents + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Simple Metering + SE + The Metering Cluster provides a mechanism to retrieve usage information from Electric, Gas, Water, and potentially Thermal metering devices. + 0x0702 + SIMPLE_METERING_CLUSTER + true + true + + + + current summation delivered + current summation received + current max demand delivered + current max demand received + dft summation + daily freeze time + power factor + reading snapshot time + current max demand delivered time + current max demand received time + default update period + fast poll update period + current block period consumption delivered + daily consumption target + current block + profile interval period + interval read reporting period + preset reading time + volume per report + flow restriction + supply status + current inlet energy carrier summation + current outlet energy carrier summation + inlet temperature + outlet temperature + control temperature + current inlet energy carrier demand + current outlet energy carrier demand + previous block period consumption delivered + current block period consumption received + current block received + dft summation received + active register tier delivered + active register tier received + last block switch time + + current tier 1 summation delivered + current tier 1 summation received + current tier 2 summation delivered + current tier 2 summation received + current tier 3 summation delivered + current tier 3 summation received + current tier 4 summation delivered + current tier 4 summation received + current tier 5 summation delivered + current tier 5 summation received + current tier 6 summation delivered + current tier 6 summation received + current tier 7 summation delivered + current tier 7 summation received + current tier 8 summation delivered + current tier 8 summation received + current tier 9 summation delivered + current tier 9 summation received + current tier 10 summation delivered + current tier 10 summation received + current tier 11 summation delivered + current tier 11 summation received + current tier 12 summation delivered + current tier 12 summation received + current tier 13 summation delivered + current tier 13 summation received + current tier 14 summation delivered + current tier 14 summation received + current tier 15 summation delivered + current tier 15 summation received + current tier 16 summation delivered + current tier 16 summation received + current tier 17 summation delivered + current tier 17 summation received + current tier 18 summation delivered + current tier 18 summation received + current tier 19 summation delivered + current tier 19 summation received + current tier 20 summation delivered + current tier 20 summation received + current tier 21 summation delivered + current tier 21 summation received + current tier 22 summation delivered + current tier 22 summation received + current tier 23 summation delivered + current tier 23 summation received + current tier 24 summation delivered + current tier 24 summation received + current tier 25 summation delivered + current tier 25 summation received + current tier 26 summation delivered + current tier 26 summation received + current tier 27 summation delivered + current tier 27 summation received + current tier 28 summation delivered + current tier 28 summation received + current tier 29 summation delivered + current tier 29 summation received + current tier 30 summation delivered + current tier 30 summation received + current tier 31 summation delivered + current tier 31 summation received + current tier 32 summation delivered + current tier 32 summation received + current tier 33 summation delivered + current tier 33 summation received + current tier 34 summation delivered + current tier 34 summation received + current tier 35 summation delivered + current tier 35 summation received + current tier 36 summation delivered + current tier 36 summation received + current tier 37 summation delivered + current tier 37 summation received + current tier 38 summation delivered + current tier 38 summation received + current tier 39 summation delivered + current tier 39 summation received + current tier 40 summation delivered + current tier 40 summation received + current tier 41 summation delivered + current tier 41 summation received + current tier 42 summation delivered + current tier 42 summation received + current tier 43 summation delivered + current tier 43 summation received + current tier 44 summation delivered + current tier 44 summation received + current tier 45 summation delivered + current tier 45 summation received + current tier 46 summation delivered + current tier 46 summation received + current tier 47 summation delivered + current tier 47 summation received + current tier 48 summation delivered + current tier 48 summation received + CPP1 Summation Delivered + CPP2 Summation Delivered + + status + remaining battery life + hours in operation + hours in fault + extended status + remaining battery life in days + current meter id + ambient consumption indicator + + unit of measure + multiplier + divisor + summation formatting + demand formatting + historical consumption formatting + metering device type + site id + meter serial number + energy carrier unit of measure + energy carrier summation formatting + energy carrier demand formatting + temperature unit of measure + temperature formatting + module serial number + operating tariff label delivered + operating tariff label received + customer id number + alternative unit of measure + alternative demand formatting + alternative consumption formatting + + instantaneous demand + current day consumption delivered + current day consumption received + previous day consumption delivered + previous day consumption received + current partial profile interval start time delivered + current partial profile interval start time received + current partial profile interval value delivered + current partial profile interval value received + current day max pressure + current day min pressure + previous day max pressure + previous day min pressure + current day max demand + previous day max demand + current month max demand + current year max demand + current day max energy carrier demand + previous day max energy carrier demand + current month max energy carrier demand + current month min energy carrier demand + current year max energy carrier demand + current year min energy carrier demand + previous day 2 consumption delivered + previous day 2 consumption received + previous day 3 consumption delivered + previous day 3 consumption received + previous day 4 consumption delivered + previous day 4 consumption received + previous day 5 consumption delivered + previous day 5 consumption received + previous day 6 consumption delivered + previous day 6 consumption received + previous day 7 consumption delivered + previous day 7 consumption received + previous day 8 consumption delivered + previous day 8 consumption received + current week consumption delivered + current week consumption received + previous week consumption delivered + previous week consumption received + previous week 2 consumption delivered + previous week 2 consumption received + previous week 3 consumption delivered + previous week 3 consumption received + previous week 4 consumption delivered + previous week 4 consumption received + previous week 5 consumption delivered + previous week 5 consumption received + current month consumption delivered + current month consumption received + previous month consumption delivered + previous month consumption received + previous month 2 consumption delivered + previous month 2 consumption received + previous month 3 consumption delivered + previous month 3 consumption received + previous month 4 consumption delivered + previous month 4 consumption received + previous month 5 consumption delivered + previous month 5 consumption received + previous month 6 consumption delivered + previous month 6 consumption received + previous month 7 consumption delivered + previous month 7 consumption received + previous month 8 consumption delivered + previous month 8 consumption received + previous month 9 consumption delivered + previous month 9 consumption received + previous month 10 consumption delivered + previous month 10 consumption received + previous month 11 consumption delivered + previous month 11 consumption received + previous month 12 consumption delivered + previous month 12 consumption received + previous month 13 consumption delivered + previous month 13 consumption received + historical freeze time + current day max demand delivered + current day max demand delivered time + current day max demand received + current day max demand received time + previous day max demand delivered + previous day max demand delivered time + previous day max demand received + previous day max demand received time + + max number of periods delivered + + current demand delivered + demand limit + demand integration period + number of demand subintervals + demand limit arm duration in minutes + load limit supply state + load limit counter + supply tamper state + supply depletion state + supply uncontrolled flow state + + current no tier block 1 summation delivered + current no tier block 2 summation delivered + current no tier block 3 summation delivered + current no tier block 4 summation delivered + current no tier block 5 summation delivered + current no tier block 6 summation delivered + current no tier block 7 summation delivered + current no tier block 8 summation delivered + current no tier block 9 summation delivered + current no tier block 10 summation delivered + current no tier block 11 summation delivered + current no tier block 12 summation delivered + current no tier block 13 summation delivered + current no tier block 14 summation delivered + current no tier block 15 summation delivered + current no tier block 16 summation delivered + current tier 1 block 1 summation delivered + current tier 1 block 2 summation delivered + current tier 1 block 3 summation delivered + current tier 1 block 4 summation delivered + current tier 1 block 5 summation delivered + current tier 1 block 6 summation delivered + current tier 1 block 7 summation delivered + current tier 1 block 8 summation delivered + current tier 1 block 9 summation delivered + current tier 1 block 10 summation delivered + current tier 1 block 11 summation delivered + current tier 1 block 12 summation delivered + current tier 1 block 13 summation delivered + current tier 1 block 14 summation delivered + current tier 1 block 15 summation delivered + current tier 1 block 16 summation delivered + current tier 2 block 1 summation delivered + current tier 2 block 2 summation delivered + current tier 2 block 3 summation delivered + current tier 2 block 4 summation delivered + current tier 2 block 5 summation delivered + current tier 2 block 6 summation delivered + current tier 2 block 7 summation delivered + current tier 2 block 8 summation delivered + current tier 2 block 9 summation delivered + current tier 2 block 10 summation delivered + current tier 2 block 11 summation delivered + current tier 2 block 12 summation delivered + current tier 2 block 13 summation delivered + current tier 2 block 14 summation delivered + current tier 2 block 15 summation delivered + current tier 2 block 16 summation delivered + current tier 3 block 1 summation delivered + current tier 3 block 2 summation delivered + current tier 3 block 3 summation delivered + current tier 3 block 4 summation delivered + current tier 3 block 5 summation delivered + current tier 3 block 6 summation delivered + current tier 3 block 7 summation delivered + current tier 3 block 8 summation delivered + current tier 3 block 9 summation delivered + current tier 3 block 10 summation delivered + current tier 3 block 11 summation delivered + current tier 3 block 12 summation delivered + current tier 3 block 13 summation delivered + current tier 3 block 14 summation delivered + current tier 3 block 15 summation delivered + current tier 3 block 16 summation delivered + current tier 4 block 1 summation delivered + current tier 4 block 2 summation delivered + current tier 4 block 3 summation delivered + current tier 4 block 4 summation delivered + current tier 4 block 5 summation delivered + current tier 4 block 6 summation delivered + current tier 4 block 7 summation delivered + current tier 4 block 8 summation delivered + current tier 4 block 9 summation delivered + current tier 4 block 10 summation delivered + current tier 4 block 11 summation delivered + current tier 4 block 12 summation delivered + current tier 4 block 13 summation delivered + current tier 4 block 14 summation delivered + current tier 4 block 15 summation delivered + current tier 4 block 16 summation delivered + current tier 5 block 1 summation delivered + current tier 5 block 2 summation delivered + current tier 5 block 3 summation delivered + current tier 5 block 4 summation delivered + current tier 5 block 5 summation delivered + current tier 5 block 6 summation delivered + current tier 5 block 7 summation delivered + current tier 5 block 8 summation delivered + current tier 5 block 9 summation delivered + current tier 5 block 10 summation delivered + current tier 5 block 11 summation delivered + current tier 5 block 12 summation delivered + current tier 5 block 13 summation delivered + current tier 5 block 14 summation delivered + current tier 5 block 15 summation delivered + current tier 5 block 16 summation delivered + current tier 6 block 1 summation delivered + current tier 6 block 2 summation delivered + current tier 6 block 3 summation delivered + current tier 6 block 4 summation delivered + current tier 6 block 5 summation delivered + current tier 6 block 6 summation delivered + current tier 6 block 7 summation delivered + current tier 6 block 8 summation delivered + current tier 6 block 9 summation delivered + current tier 6 block 10 summation delivered + current tier 6 block 11 summation delivered + current tier 6 block 12 summation delivered + current tier 6 block 13 summation delivered + current tier 6 block 14 summation delivered + current tier 6 block 15 summation delivered + current tier 6 block 16 summation delivered + current tier 7 block 1 summation delivered + current tier 7 block 2 summation delivered + current tier 7 block 3 summation delivered + current tier 7 block 4 summation delivered + current tier 7 block 5 summation delivered + current tier 7 block 6 summation delivered + current tier 7 block 7 summation delivered + current tier 7 block 8 summation delivered + current tier 7 block 9 summation delivered + current tier 7 block 10 summation delivered + current tier 7 block 11 summation delivered + current tier 7 block 12 summation delivered + current tier 7 block 13 summation delivered + current tier 7 block 14 summation delivered + current tier 7 block 15 summation delivered + current tier 7 block 16 summation delivered + current tier 8 block 1 summation delivered + current tier 8 block 2 summation delivered + current tier 8 block 3 summation delivered + current tier 8 block 4 summation delivered + current tier 8 block 5 summation delivered + current tier 8 block 6 summation delivered + current tier 8 block 7 summation delivered + current tier 8 block 8 summation delivered + current tier 8 block 9 summation delivered + current tier 8 block 10 summation delivered + current tier 8 block 11 summation delivered + current tier 8 block 12 summation delivered + current tier 8 block 13 summation delivered + current tier 8 block 14 summation delivered + current tier 8 block 15 summation delivered + current tier 8 block 16 summation delivered + current tier 9 block 1 summation delivered + current tier 9 block 2 summation delivered + current tier 9 block 3 summation delivered + current tier 9 block 4 summation delivered + current tier 9 block 5 summation delivered + current tier 9 block 6 summation delivered + current tier 9 block 7 summation delivered + current tier 9 block 8 summation delivered + current tier 9 block 9 summation delivered + current tier 9 block 10 summation delivered + current tier 9 block 11 summation delivered + current tier 9 block 12 summation delivered + current tier 9 block 13 summation delivered + current tier 9 block 14 summation delivered + current tier 9 block 15 summation delivered + current tier 9 block 16 summation delivered + current tier 10 block 1 summation delivered + current tier 10 block 2 summation delivered + current tier 10 block 3 summation delivered + current tier 10 block 4 summation delivered + current tier 10 block 5 summation delivered + current tier 10 block 6 summation delivered + current tier 10 block 7 summation delivered + current tier 10 block 8 summation delivered + current tier 10 block 9 summation delivered + current tier 10 block 10 summation delivered + current tier 10 block 11 summation delivered + current tier 10 block 12 summation delivered + current tier 10 block 13 summation delivered + current tier 10 block 14 summation delivered + current tier 10 block 15 summation delivered + current tier 10 block 16 summation delivered + current tier 11 block 1 summation delivered + current tier 11 block 2 summation delivered + current tier 11 block 3 summation delivered + current tier 11 block 4 summation delivered + current tier 11 block 5 summation delivered + current tier 11 block 6 summation delivered + current tier 11 block 7 summation delivered + current tier 11 block 8 summation delivered + current tier 11 block 9 summation delivered + current tier 11 block 10 summation delivered + current tier 11 block 11 summation delivered + current tier 11 block 12 summation delivered + current tier 11 block 13 summation delivered + current tier 11 block 14 summation delivered + current tier 11 block 15 summation delivered + current tier 11 block 16 summation delivered + current tier 12 block 1 summation delivered + current tier 12 block 2 summation delivered + current tier 12 block 3 summation delivered + current tier 12 block 4 summation delivered + current tier 12 block 5 summation delivered + current tier 12 block 6 summation delivered + current tier 12 block 7 summation delivered + current tier 12 block 8 summation delivered + current tier 12 block 9 summation delivered + current tier 12 block 10 summation delivered + current tier 12 block 11 summation delivered + current tier 12 block 12 summation delivered + current tier 12 block 13 summation delivered + current tier 12 block 14 summation delivered + current tier 12 block 15 summation delivered + current tier 12 block 16 summation delivered + current tier 13 block 1 summation delivered + current tier 13 block 2 summation delivered + current tier 13 block 3 summation delivered + current tier 13 block 4 summation delivered + current tier 13 block 5 summation delivered + current tier 13 block 6 summation delivered + current tier 13 block 7 summation delivered + current tier 13 block 8 summation delivered + current tier 13 block 9 summation delivered + current tier 13 block 10 summation delivered + current tier 13 block 11 summation delivered + current tier 13 block 12 summation delivered + current tier 13 block 13 summation delivered + current tier 13 block 14 summation delivered + current tier 13 block 15 summation delivered + current tier 13 block 16 summation delivered + current tier 14 block 1 summation delivered + current tier 14 block 2 summation delivered + current tier 14 block 3 summation delivered + current tier 14 block 4 summation delivered + current tier 14 block 5 summation delivered + current tier 14 block 6 summation delivered + current tier 14 block 7 summation delivered + current tier 14 block 8 summation delivered + current tier 14 block 9 summation delivered + current tier 14 block 10 summation delivered + current tier 14 block 11 summation delivered + current tier 14 block 12 summation delivered + current tier 14 block 13 summation delivered + current tier 14 block 14 summation delivered + current tier 14 block 15 summation delivered + current tier 14 block 16 summation delivered + current tier 15 block 1 summation delivered + current tier 15 block 2 summation delivered + current tier 15 block 3 summation delivered + current tier 15 block 4 summation delivered + current tier 15 block 5 summation delivered + current tier 15 block 6 summation delivered + current tier 15 block 7 summation delivered + current tier 15 block 8 summation delivered + current tier 15 block 9 summation delivered + current tier 15 block 10 summation delivered + current tier 15 block 11 summation delivered + current tier 15 block 12 summation delivered + current tier 15 block 13 summation delivered + current tier 15 block 14 summation delivered + current tier 15 block 15 summation delivered + current tier 15 block 16 summation delivered + + generic alarm mask + electricity alarm mask + generic flow/pressure alarm mask + water specific alarm mask + heat and cooling specific alarm mask + gas specific alarm mask + extended generic alarm mask + manufacture alarm mask + + current no tier block 1 summation received + current no tier block 2 summation received + current no tier block 3 summation received + current no tier block 4 summation received + current no tier block 5 summation received + current no tier block 6 summation received + current no tier block 7 summation received + current no tier block 8 summation received + current no tier block 9 summation received + current no tier block 10 summation received + current no tier block 11 summation received + current no tier block 12 summation received + current no tier block 13 summation received + current no tier block 14 summation received + current no tier block 15 summation received + current no tier block 16 summation received + current tier 1 block 1 summation received + current tier 1 block 2 summation received + current tier 1 block 3 summation received + current tier 1 block 4 summation received + current tier 1 block 5 summation received + current tier 1 block 6 summation received + current tier 1 block 7 summation received + current tier 1 block 8 summation received + current tier 1 block 9 summation received + current tier 1 block 10 summation received + current tier 1 block 11 summation received + current tier 1 block 12 summation received + current tier 1 block 13 summation received + current tier 1 block 14 summation received + current tier 1 block 15 summation received + current tier 1 block 16 summation received + current tier 2 block 1 summation received + current tier 2 block 2 summation received + current tier 2 block 3 summation received + current tier 2 block 4 summation received + current tier 2 block 5 summation received + current tier 2 block 6 summation received + current tier 2 block 7 summation received + current tier 2 block 8 summation received + current tier 2 block 9 summation received + current tier 2 block 10 summation received + current tier 2 block 11 summation received + current tier 2 block 12 summation received + current tier 2 block 13 summation received + current tier 2 block 14 summation received + current tier 2 block 15 summation received + current tier 2 block 16 summation received + current tier 3 block 1 summation received + current tier 3 block 2 summation received + current tier 3 block 3 summation received + current tier 3 block 4 summation received + current tier 3 block 5 summation received + current tier 3 block 6 summation received + current tier 3 block 7 summation received + current tier 3 block 8 summation received + current tier 3 block 9 summation received + current tier 3 block 10 summation received + current tier 3 block 11 summation received + current tier 3 block 12 summation received + current tier 3 block 13 summation received + current tier 3 block 14 summation received + current tier 3 block 15 summation received + current tier 3 block 16 summation received + current tier 4 block 1 summation received + current tier 4 block 2 summation received + current tier 4 block 3 summation received + current tier 4 block 4 summation received + current tier 4 block 5 summation received + current tier 4 block 6 summation received + current tier 4 block 7 summation received + current tier 4 block 8 summation received + current tier 4 block 9 summation received + current tier 4 block 10 summation received + current tier 4 block 11 summation received + current tier 4 block 12 summation received + current tier 4 block 13 summation received + current tier 4 block 14 summation received + current tier 4 block 15 summation received + current tier 4 block 16 summation received + current tier 5 block 1 summation received + current tier 5 block 2 summation received + current tier 5 block 3 summation received + current tier 5 block 4 summation received + current tier 5 block 5 summation received + current tier 5 block 6 summation received + current tier 5 block 7 summation received + current tier 5 block 8 summation received + current tier 5 block 9 summation received + current tier 5 block 10 summation received + current tier 5 block 11 summation received + current tier 5 block 12 summation received + current tier 5 block 13 summation received + current tier 5 block 14 summation received + current tier 5 block 15 summation received + current tier 5 block 16 summation received + current tier 6 block 1 summation received + current tier 6 block 2 summation received + current tier 6 block 3 summation received + current tier 6 block 4 summation received + current tier 6 block 5 summation received + current tier 6 block 6 summation received + current tier 6 block 7 summation received + current tier 6 block 8 summation received + current tier 6 block 9 summation received + current tier 6 block 10 summation received + current tier 6 block 11 summation received + current tier 6 block 12 summation received + current tier 6 block 13 summation received + current tier 6 block 14 summation received + current tier 6 block 15 summation received + current tier 6 block 16 summation received + current tier 7 block 1 summation received + current tier 7 block 2 summation received + current tier 7 block 3 summation received + current tier 7 block 4 summation received + current tier 7 block 5 summation received + current tier 7 block 6 summation received + current tier 7 block 7 summation received + current tier 7 block 8 summation received + current tier 7 block 9 summation received + current tier 7 block 10 summation received + current tier 7 block 11 summation received + current tier 7 block 12 summation received + current tier 7 block 13 summation received + current tier 7 block 14 summation received + current tier 7 block 15 summation received + current tier 7 block 16 summation received + current tier 8 block 1 summation received + current tier 8 block 2 summation received + current tier 8 block 3 summation received + current tier 8 block 4 summation received + current tier 8 block 5 summation received + current tier 8 block 6 summation received + current tier 8 block 7 summation received + current tier 8 block 8 summation received + current tier 8 block 9 summation received + current tier 8 block 10 summation received + current tier 8 block 11 summation received + current tier 8 block 12 summation received + current tier 8 block 13 summation received + current tier 8 block 14 summation received + current tier 8 block 15 summation received + current tier 8 block 16 summation received + current tier 9 block 1 summation received + current tier 9 block 2 summation received + current tier 9 block 3 summation received + current tier 9 block 4 summation received + current tier 9 block 5 summation received + current tier 9 block 6 summation received + current tier 9 block 7 summation received + current tier 9 block 8 summation received + current tier 9 block 9 summation received + current tier 9 block 10 summation received + current tier 9 block 11 summation received + current tier 9 block 12 summation received + current tier 9 block 13 summation received + current tier 9 block 14 summation received + current tier 9 block 15 summation received + current tier 9 block 16 summation received + current tier 10 block 1 summation received + current tier 10 block 2 summation received + current tier 10 block 3 summation received + current tier 10 block 4 summation received + current tier 10 block 5 summation received + current tier 10 block 6 summation received + current tier 10 block 7 summation received + current tier 10 block 8 summation received + current tier 10 block 9 summation received + current tier 10 block 10 summation received + current tier 10 block 11 summation received + current tier 10 block 12 summation received + current tier 10 block 13 summation received + current tier 10 block 14 summation received + current tier 10 block 15 summation received + current tier 10 block 16 summation received + current tier 11 block 1 summation received + current tier 11 block 2 summation received + current tier 11 block 3 summation received + current tier 11 block 4 summation received + current tier 11 block 5 summation received + current tier 11 block 6 summation received + current tier 11 block 7 summation received + current tier 11 block 8 summation received + current tier 11 block 9 summation received + current tier 11 block 10 summation received + current tier 11 block 11 summation received + current tier 11 block 12 summation received + current tier 11 block 13 summation received + current tier 11 block 14 summation received + current tier 11 block 15 summation received + current tier 11 block 16 summation received + current tier 12 block 1 summation received + current tier 12 block 2 summation received + current tier 12 block 3 summation received + current tier 12 block 4 summation received + current tier 12 block 5 summation received + current tier 12 block 6 summation received + current tier 12 block 7 summation received + current tier 12 block 8 summation received + current tier 12 block 9 summation received + current tier 12 block 10 summation received + current tier 12 block 11 summation received + current tier 12 block 12 summation received + current tier 12 block 13 summation received + current tier 12 block 14 summation received + current tier 12 block 15 summation received + current tier 12 block 16 summation received + current tier 13 block 1 summation received + current tier 13 block 2 summation received + current tier 13 block 3 summation received + current tier 13 block 4 summation received + current tier 13 block 5 summation received + current tier 13 block 6 summation received + current tier 13 block 7 summation received + current tier 13 block 8 summation received + current tier 13 block 9 summation received + current tier 13 block 10 summation received + current tier 13 block 11 summation received + current tier 13 block 12 summation received + current tier 13 block 13 summation received + current tier 13 block 14 summation received + current tier 13 block 15 summation received + current tier 13 block 16 summation received + current tier 14 block 1 summation received + current tier 14 block 2 summation received + current tier 14 block 3 summation received + current tier 14 block 4 summation received + current tier 14 block 5 summation received + current tier 14 block 6 summation received + current tier 14 block 7 summation received + current tier 14 block 8 summation received + current tier 14 block 9 summation received + current tier 14 block 10 summation received + current tier 14 block 11 summation received + current tier 14 block 12 summation received + current tier 14 block 13 summation received + current tier 14 block 14 summation received + current tier 14 block 15 summation received + current tier 14 block 16 summation received + current tier 15 block 1 summation received + current tier 15 block 2 summation received + current tier 15 block 3 summation received + current tier 15 block 4 summation received + current tier 15 block 5 summation received + current tier 15 block 6 summation received + current tier 15 block 7 summation received + current tier 15 block 8 summation received + current tier 15 block 9 summation received + current tier 15 block 10 summation received + current tier 15 block 11 summation received + current tier 15 block 12 summation received + current tier 15 block 13 summation received + current tier 15 block 14 summation received + current tier 15 block 15 summation received + current tier 15 block 16 summation received + + bill to date delivered + bill to date time stamp delivered + projected bill delivered + projected bill time stamp delivered + bill delivered trailing digit + bill to date received + bill to date time stamp received + projected bill received + projected bill time stamp received + bill received trailing digit + + proposed change supply implementation time + proposed change supply status + uncontrolled flow threshold + uncontrolled flow threshold unit of measure + uncontrolled flow threshold multiplier + uncontrolled flow threshold divisor + flow stabilization period + flow measurement period + + alternative instantaneous demand + current day alternative consumption delivered + current day alternative consumption received + previous day alternative consumption delivered + previous day alternative consumption received + current alternative partial profile interval start time delivered + current alternative partial profile interval start time received + current alternative partial profile interval value delivered + current alternative partial profile interval value received + current alternative day max pressure + current alternative day min pressure + previous day alternative max pressure + previous day alternative min pressure + current alternative day max demand + previous day alternative max demand + current alternative month max demand + current alternative year max demand + previous day 2 alternative consumption delivered + previous day 2 alternative consumption received + previous day 3 alternative consumption delivered + previous day 3 alternative consumption received + previous day 4 alternative consumption delivered + previous day 4 alternative consumption received + previous day 5 alternative consumption delivered + previous day 5 alternative consumption received + previous day 6 alternative consumption delivered + previous day 6 alternative consumption received + previous day 7 alternative consumption delivered + previous day 7 alternative consumption received + previous day 8 alternative consumption delivered + previous day 8 alternative consumption received + current week alternative consumption delivered + current week alternative consumption received + previous week alternative consumption delivered + previous week alternative consumption received + previous week 2 alternative consumption delivered + previous week 2 alternative consumption received + previous week 3 alternative consumption delivered + previous week 3 alternative consumption received + previous week 4 alternative consumption delivered + previous week 4 alternative consumption received + previous week 5 alternative consumption delivered + previous week 5 alternative consumption received + current month alternative consumption delivered + current month alternative consumption received + previous month alternative consumption delivered + previous month alternative consumption received + previous month 2 alternative consumption delivered + previous month 2 alternative consumption received + previous month 3 alternative consumption delivered + previous month 3 alternative consumption received + previous month 4 alternative consumption delivered + previous month 4 alternative consumption received + previous month 5 alternative consumption delivered + previous month 5 alternative consumption received + previous month 6 alternative consumption delivered + previous month 6 alternative consumption received + previous month 7 alternative consumption delivered + previous month 7 alternative consumption received + previous month 8 alternative consumption delivered + previous month 8 alternative consumption received + previous month 9 alternative consumption delivered + previous month 9 alternative consumption received + previous month 10 alternative consumption delivered + previous month 10 alternative consumption received + previous month 11 alternative consumption delivered + previous month 11 alternative consumption received + previous month 12 alternative consumption delivered + previous month 12 alternative consumption received + previous month 13 alternative consumption delivered + previous month 13 alternative consumption received + current day alternative max demand delivered + current day alternative max demand delivered time + current day alternative max demand received + current day alternative max demand received time + previous day alternative max demand delivered + previous day alternative max demand delivered time + previous day alternative max demand received + previous day alternative max demand received time + + current active summation q1 + current active summation q2 + current active summation q3 + current active summation q4 + current reactive summation q1 + current reactive summation q2 + current reactive summation q3 + current reactive summation q4 + + + functional notification flags + notification flags 2 + notification flags 3 + notification flags 4 + notification flags 5 + notification flags 6 + notification flags 7 + notification flags 8 + + + + This command is generated when the Client command GetProfile is received. + + + + + + + + + + This command is used to request the ESI to mirror Metering Device data. + + + + + This command is used to request the ESI to remove its mirror of Metering Device data. + + + + + This command is generated when the client command Request Fast Poll Mode is received. + + + + + + + This command is generated in response to a ScheduleSnapshot command, and is sent to confirm whether the requested snapshot schedule has been set up. + + + + + + + This command is generated in response to a TakeSnapshot command, and is sent to confirm whether the requested snapshot has been accepted and successfully taken. + + + + + + + This command is generated in response to a GetSnapshot command. It is used to return a single snapshot to the client. + + + + + + + + + + + + + This command is used to send the requested sample data to the client. It is generated in response to a GetSampledData command. + + + + + + + + + + + ConfigureMirror is sent to the mirror once the mirror has been created. The command deals with the operational configuration of the Mirror. + + + + + + + + + The ConfigureNotificationScheme is sent to the mirror once the mirror has been created. The command deals with the operational configuration of the Mirror and the device that reports to the mirror. No default schemes are allowed to be overwritten. + + + + + + + + The ConfigureNotificationFlags command is used to set the commands relating to the bit value for each NotificationFlags attribute that the scheme is proposing to use. + + + + + + + + + + + + The GetNotifiedMessage command is used only when a BOMD is being mirrored. This command provides a method for the BOMD to notify the Mirror message queue that it wants to receive commands that the Mirror has queued. The Notification flags set within the command shall inform the mirror of the commands that the BOMD is requesting. + + + + + + + + This command is transmitted by a Metering Device in response to a ChangeSupply command. + + + + + + + + + This command is transmitted by a Metering Device in response to a StartSampling command. + + + + + + + The GetProfile command is generated when a client device wishes to retrieve a list of captured Energy, Gas or water consumption for profiling purposes. + + + + + + + + The Request Mirror Response Command allows the ESI to inform a sleepy Metering Device it has the ability to store and mirror its data. + + + + + + The Mirror Removed Command allows the ESI to inform a sleepy Metering Device mirroring support has been removed or halted. + + + + + + The Request Fast Poll Mode command is generated when the metering client wishes to receive near real-time updates of InstantaneousDemand. + + + + + + + This command is used to set up a schedule of when the device shall create snapshot data. + + + + + + + + + This command is used to instruct the cluster server to take a single snapshot. + + + + + + This command is used to request snapshot data from the cluster server. + + + + + + + + + The sampling mechanism allows a set of samples of the specified type of data to be taken, commencing at the stipulated start time. This mechanism may run concurrently with the capturing of profile data, and may refer the same parameters, albeit possibly at a different sampling rate. + + + + + + + + + + This command is used to request sampled data from the server. Note that it is the responsibility of the client to ensure that it does not request more samples than can be held in a single command payload. + + + + + + + + + This command is sent in response to the ReportAttribute command when the MirrorReporting attribute is set. + + + + + + + The ResetLoadLimitCounter command shall cause the LoadLimitCounter attribute to be reset. + + + + + + + This command is sent from the Head-end or ESI to the Metering Device to instruct it to change the status of the valve or load switch, i.e. the supply. + + + + + + + + + + + This command is a simplified version of the ChangeSupply command, intended to be sent from an IHD to a meter as the consequence of a user action on the IHD. Its purpose is to provide a local disconnection/reconnection button on the IHD in addition to the one on the meter. + + + + + + This command is used to specify the required status of the supply following the occurance of certain events on the meter. + + + + + + + + + + This command is used to update the 'Uncontrolled Flow Rate' configuration data used by flow meters. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Messaging + SE + This cluster provides an interface for passing text messages between SE devices. + 0x0703 + MESSAGING_CLUSTER + true + true + + + + + + + Command description for DisplayMessage + + + + + + + + + + + The CancelMessage command provides the ability to cancel the sending or acceptance of previously sent messages. + + + + + + + The DisplayProtected Message command is for use with messages that are protected by a password or PIN. + + + + + + + + + + + The CancelAllMessages command indicates to a client device that it should cancel all display messages currently held by it. + + + + + + + Command description for GetLastMessage + + + + + The Message Confirmation command provides an indication that a Utility Customer has acknowledged and/or accepted the contents of a previously sent message. Enhanced Message Confirmation commands shall contain an answer of 'NO', 'YES' and/or a message confirmation string. + + + + + + + + + This command initiates the return of the first (and maybe only) Cancel All Messages command held on the associated server, and which has an implementation time equal to or later than the value indicated in the payload. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Tunneling + SE + The tunneling cluster provides an interface for tunneling protocols. + 0x0704 + TUNNELING_CLUSTER + true + true + + + close tunnel timeout + + + + + RequestTunnel is the client command used to setup a tunnel association with the server. The request payload specifies the protocol identifier for the requested tunnel, a manufacturer code in case of proprietary protocols and the use of flow control for streaming protocols. + + + + + + + + + Client command used to close the tunnel with the server. The parameter in the payload specifies the tunnel identifier of the tunnel that has to be closed. The server leaves the tunnel open and the assigned resources allocated until the client sends the CloseTunnel command or the CloseTunnelTimeout fires. + + + + + + Command that indicates (if received) that the client has sent data to the server. The data itself is contained within the payload. + + + + + + + This command is generated by the receiver of a TransferData command if the tunnel status indicates that something is wrong. There are two three cases in which TransferDataError is sent: (1) The TransferData received contains a TunnelID that does not match to any of the active tunnels of the receiving device. This could happen if a (sleeping) device sends a TransferData command to a tunnel that has been closed by the server after the CloseTunnelTimeout. (2) The TransferData received contains a proper TunnelID of an active tunnel, but the device sending the data does not match to it. (3) The TransferData received contains more data than indicated by the MaximumIncomingTransferSize of the receiving device. + + + + + + + Command sent in response to each TransferData command in case - and only in case - flow control has been requested by the client in the TunnelRequest command and is supported by both tunnel endpoints. The response payload indicates the number of octets that may still be received by the receiver. + + + + + + + The ReadyData command is generated - after a receiver had to stop the dataflow using the AckTransferData(0) command - to indicate that the device is now ready to continue receiving data. The parameter NumberOfOctetsLeft gives a hint on how much space is left for the next data transfer. The ReadyData command is only issued if flow control is enabled. + + + + + + + Get Supported Tunnel Protocols is the client command used to determine the Tunnel protocols supported on another device. + + + + + + + RequestTunnelResponse is sent by the server in response to a RequestTunnel command previously received from the client. The response contains the status of the RequestTunnel command and a tunnel identifier corresponding to the tunnel that has been set-up in the server in case of success. + + + + + + + + Command that transfers data from server to the client. The data itself has to be placed within the payload. + + + + + + + This command is generated by the receiver of a TransferData command if the tunnel status indicates that something is wrong. There are two three cases in which TransferDataError is sent: (1) The TransferData received contains a TunnelID that does not match to any of the active tunnels of the receiving device. This could happen if a (sleeping) device sends a TransferData command to a tunnel that has been closed by the server after the CloseTunnelTimeout. (2) The TransferData received contains a proper TunnelID of an active tunnel, but the device sending the data does not match to it. (3) The TransferData received contains more data than indicated by the MaximumIncomingTransferSize of the receiving device. + + + + + + + Command sent in response to each TransferData command in case - and only in case - flow control has been requested by the client in the TunnelRequest command and is supported by both tunnel endpoints. The response payload indicates the number of octets that may still be received by the receiver. + + + + + + + The ReadyData command is generated - after a receiver had to stop the dataflow using the AckTransferData(0) command - to indicate that the device is now ready to continue receiving data. The parameter NumberOfOctetsLeft gives a hint on how much space is left for the next data transfer. The ReadyData command is only issued if flow control is enabled. + + + + + + + Supported Tunnel Protocol Response is sent in response to a Get Supported Tunnel Protocols command previously received. The response contains a list of Tunnel protocols supported by the device; the payload of the response should be capable of holding up to 16 protocols. + + + + + + + + + TunnelClosureNotification is sent by the server to indicate that a tunnel has been closed due to expiration of a CloseTunnelTimeout. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Prepayment + SE + The Prepayment Cluster provides the facility to pass messages relating to prepayment between devices on the HAN. + 0x0705 + PREPAYMENT_CLUSTER + true + true + + + payment control configuration + credit remaining + emergency credit remaining + credit status + credit remaining timestamp + accumulated debt + overall debt cap + emergency credit limit allowance + emergency credit threshold + total credit added + max credit limit + max credit per top up + friendly credit warning + low credit warning level + IHD low credit warning level + Interrupt Suspend Time + remaining friendly credit time + next friendly credit period + cut off value + token carrier id + + top up date/time #1 + top up amount #1 + top up originating device #1 + top up code #1 + top up date/time #2 + top up amount #2 + top up originating device #2 + top up code #2 + top up date/time #3 + top up amount #3 + top up originating device #3 + top up code #3 + top up date/time #4 + top up amount #4 + top up originating device #4 + top up code #4 + top up date/time #5 + top up amount #5 + top up originating device #5 + top up code #5 + + + debt label 1 + debt amount 1 + debt recovery method 1 + debt recovery start time 1 + debt recovery collection time 1 + debt recovery frequency 1 + debt recovery amount 1 + debt recovery top up percentage 1 + debt label 2 + debt amount 2 + debt recovery method 2 + debt recovery start time 2 + debt recovery collection time 2 + debt recovery frequency 2 + debt recovery amount 2 + debt recovery top up percentage 2 + debt label 3 + debt amount 3 + debt recovery method 3 + debt recovery start time 3 + debt recovery collection time 3 + debt recovery frequency 3 + debt recovery amount 3 + debt recovery top up percentage 3 + + + + prepayment alarm status + prepay generic alarm mask + prepay switch alarm mask + prepay event alarm mask + + historical cost consumption formatting + consumption unit of measurement + currency scaling factor + currency + current day cost consumption delivered + current day cost consumption received + previous day cost consumption delivered + previous day cost consumption received + previous day 2 cost consumption delivered + previous day 2 cost consumption received + previous day 3 cost consumption delivered + previous day 3 cost consumption received + previous day 4 cost consumption delivered + previous day 4 cost consumption received + previous day 5 cost consumption delivered + previous day 5 cost consumption received + previous day 6 cost consumption delivered + previous day 6 cost consumption received + previous day 7 cost consumption delivered + previous day 7 cost consumption received + previous day 8 cost consumption delivered + previous day 8 cost consumption received + current week cost consumption delivered + current week cost consumption received + previous week cost consumption delivered + previous week cost consumption received + previous week 2 cost consumption delivered + previous week 2 cost consumption received + previous week 3 cost consumption delivered + previous week 3 cost consumption received + previous week 4 cost consumption delivered + previous week 4 cost consumption received + previous week 5 cost consumption delivered + previous week 5 cost consumption received + current month cost consumption delivered + current month cost consumption received + previous month cost consumption delivered + previous month cost consumption received + previous month 2 cost consumption delivered + previous month 2 cost consumption received + previous month 3 cost consumption delivered + previous month 3 cost consumption received + previous month 4 cost consumption delivered + previous month 4 cost consumption received + previous month 5 cost consumption delivered + previous month 5 cost consumption received + previous month 6 cost consumption delivered + previous month 6 cost consumption received + previous month 7 cost consumption delivered + previous month 7 cost consumption received + previous month 8 cost consumption delivered + previous month 8 cost consumption received + previous month 9 cost consumption delivered + previous month 9 cost consumption received + previous month 10 cost consumption delivered + previous month 10 cost consumption received + previous month 11 cost consumption delivered + previous month 11 cost consumption received + previous month 12 cost consumption delivered + previous month 12 cost consumption received + previous month 13 cost consumption delivered + previous month 13 cost consumption received + historical freeze time + + + + + This command is sent to the Metering Device to activate the use of any Emergency Credit available on the Metering Device. + + + + + + + + + The ChangeDebt command is send to the Metering Device to change the fuel or Non fuel debt values. + + + + + + + + + + + + + + + This command is a method to set up the parameters for the emergency credit. + + + + + + + + + The ConsumerTopUp command is used by the IPD and the ESI as a method of applying credit top up values to the prepayment meter. + + + + + + + The CreditAdjustment command is sent to update the accounting base for the Prepayment meter. + + + + + + + + + This command is sent to a Metering Device to instruct it to change its mode of operation. i.e. from Credit to Prepayment. + + + + + + + + + + This command is used to request the cluster server for snapshot data. + + + + + + + + + This command is sent to the Metering Device to retrieve the log of Top Up codes received by the meter. + + + + + + + This command is sent from client to a Prepayment server to set the warning level for low credit. + + + + + + This command is used to request the contents of the repayment log. + + + + + + + + This command is sent from a client to the Prepayment server to set the maximum credit level allowed in the meter. + + + + + + + + + + This command is sent from a client to the Prepayment server to set the overall debt cap allowed in the meter. + + + + + + + + + This command is generated in response to a GetPrepaySnapshot command. It is used to return a single snapshot to the client. + + + + + + + + + + + + + This command is send in response to the ChangePaymentMode Command. + + + + + + + + + This command is send in response to the ConsumerTopUp Command. + + + + + + + + + This command is used to send the Top Up Code Log entries to the client. + + + + + + + + This command is used to send the contents of the Repayment Log. + + + + + + + + + + + + + + + + + + + + + + + + + + + Energy Management + SE + This cluster provides attributes and commands to assist applications in creating resource monitoring protocols. + 0x0706 + ENERGY_MANAGEMENT_CLUSTER + true + true + + Load Control State + Current Event ID + Current Event Status + Conformance Level + Minimum Off Time + Minimum On Time + Minimum Cycle Period + + + + + This command is reused from the DRLC cluster. This command is generated in response to the Manage Event command. + + + + + + + + + + + + + + + The Manage Event command allows a remote device (such as an IHD or web portal) to change the behavior of a DRLC cluster client when responding to a DRLC Load Control Event. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Calendar + SE + This cluster provides attributes and commands to assist applications in developing time and date based protocol. + 0x0707 + CALENDAR_CLUSTER + true + true + + Auxiliary Switch 1 Label + Auxiliary Switch 2 Label + Auxiliary Switch 3 Label + Auxiliary Switch 4 Label + Auxiliary Switch 5 Label + Auxiliary Switch 6 Label + Auxiliary Switch 7 Label + Auxiliary Switch 8 Label + + + + The PublishCalendar command is published in response to a GetCalendar command or if new calendar information is available. + + + + + + + + + + + + + + + The PublishDayProfile command is published in response to a GetDayProfile command. + + + + + + + + + + + + + + The PublishWeekProfile command is published in response to a GetWeekProfile command. + + + + + + + + + + + + + + + + The PublishSeasons command is published in response to a GetSeason command. + + + + + + + + + + + The PublishSpecialDays command is published in response to a GetSpecialDays command or if a calendar update is available. + + + + + + + + + + + + + + The CancelCalendar command indicates that all data associated with a particular calendar instance should be discarded. + + + + + + + + + This command initiates PublishCalendar command(s) for scheduled Calendar updates. + + + + + + + + + + This command initiates one or more PublishDayProfile commands for the referenced Calendar. + + + + + + + + + This command initiates one or more PublishWeekProfile commands for the referenced Calendar. + + + + + + + + + This command initiates one or more PublishSeasons commands for the referenced Calendar. + + + + + + + This command initiates one or more PublishSpecialDays commands for the scheduled Special Day Table updates. + + + + + + + + + + This command initiates the return of the last CancelCalendar command held on the associated server. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Device Management + SE + This cluster provides attributes and commands to support device-cognisant application layer protocols. + 0x0708 + DEVICE_MANAGEMENT_CLUSTER + true + true + + + provider id (server) + provider name + provider contact details + proposed provider id + proposed provider name + proposed provider change date time + proposed provider change control + received provider id (server) + received provider name + received provider contact details + received proposed provider id + received proposed provider name + received proposed provider change date time + received proposed provider change control + + change of tenancy update date time + proposed tenancy change control + + wan status + + low medium threshold + medium high threshold + + + provider id (client) + received provider id (client) + + tou tariff activation + block tariff activated + block tou tariff activated + single tariff rate activated + asynchronous billing occurred + synchronous billing occurred + tariff not supported + price cluster not found + currency change passive activated + currency change passive updated + price matrix passive activated + price matrix passive updated + tariff change passive activated + tariff change passive updated + publish price received + publish price actioned + publish price cancelled + publish price rejected + publish tariff information received + publish tariff information actioned + publish tariff information cancelled + publish tariff information rejected + publish price matrix received + publish price matrix actioned + publish price matrix cancelled + publish price matrix rejected + publish block thresholds received + publish block thresholds actioned + publish block thresholds cancelled + publish block thresholds rejected + publish calorific value received + publish calorific value actioned + publish calorific value cancelled + publish calorific value rejected + publish conversion factor received + publish conversion factor actioned + publish conversion factor cancelled + publish conversion factor rejected + publish co2 value received + publish co2 value actioned + publish co2 value cancelled + publish co2 value rejected + publish cpp event received + publish cpp event actioned + publish cpp event cancelled + publish cpp event rejected + publish tier labels received + publish tier labels actioned + publish tier labels cancelled + publish tier labels rejected + publish billing period received + publish billing period actioned + publish billing period cancelled + publish billing period rejected + publish consolidated bill received + publish consolidated bill actioned + publish consolidated bill cancelled + publish consolidated bill rejected + publish block period received + publish block period actioned + publish block period cancelled + publish block period rejected + publish credit payment info received + publish credit payment info actioned + publish credit payment info cancelled + publish credit payment info rejected + publish conversion factor received + publish conversion factor actioned + publish conversion factor cancelled + publish conversion factor rejected + + check meter + low battery + tamper detect + supply status + supply quality + leak detect + service disconnect + + reverse flow general + meter cover removed + meter cover closed + strong magnetic field + no strong magnetic field + battery failure + program memory error + ram error + nv memory error + low voltage L1 + high voltage L1 + low voltage L2 + high voltage L2 + low voltage L3 + high voltage L3 + over current L1 + over current L2 + over current L3 + frequency too low L1 + frequency too high L1 + frequency too low L2 + frequency too high L2 + frequency too low L3 + frequency too high L3 + ground fault + electric tamper detect + incorrect polarity + current no voltage + under voltage + over voltage + normal voltage + pf below threshold + pf above threshold + terminal cover removed + terminal cover closed + burst detect + pressure too low + pressure too high + flow sensor communication error + flow sensor measurement fault + flow sensor reverse flow + flow sensor air detect + pipe empty + inlet temperature sensor fault + outlet temperature sensor fault + reverse flow + tilt tamper + battery cover removed + battery cover closed + excess flow + tilt tamper enabled + measurement system error + watchdog error + supply disconnect failure + supply connect failure + measurement software changed + dst enabled + dst disabled + clock adj backward + clock adj forward + clock invalid + communication error han + communication ok han + meter fraud attempt + power loss + unusual han traffic + unexpected clock change + comms using unauthenticated component + + metering error reg clear + metering alarm reg clear + unexpected hw reset + unexpected program execution + limit threshold exceeded + limit threshold ok + limit threshold changed + maximum demand exceeded + profile cleared + load profile cleared + battery warn + wrong signature + no signature + signature not valid + unauthorise action from HAN + fast polling start + fast polling end + meter reporting interval changed + disconnect to load limit + meter supply status register changed + meter alarm status register changed + extended meter alarm status register changed + data access via local port + configure mirror success + configure mirror failure + configure notification flag scheme success + configure notification flag scheme failure + configure notification flags success + configure notification flags failure + stay awake request han + stay awake request wan + manufacturer specific a + manufacturer specific b + manufacturer specific c + manufacturer specific d + manufacturer specific e + manufacturer specific f + manufacturer specific g + manufacturer specific h + manufacturer specific i + get profile command received + get profile command actioned + get profile command cancelled + get profile command rejected + request mirror response command received + request mirror response command actioned + request mirror response command cancelled + request mirror response command rejected + mirror removed command received + mirror removed command actioned + mirror removed command cancelled + mirror removed command rejected + get snapshot command received + get snapshot command actioned + get snapshot command cancelled + get snapshot command rejected + take snapshot command received + take snapshot command actioned + take snapshot command cancelled + take snapshot command rejected + mirror report attribute response command received + mirror report attribute response command actioned + mirror report attribute response command cancelled + mirror report attribute response command rejected + schedule snapshot command received + schedule snapshot command actioned + schedule snapshot command cancelled + schedule snapshot command rejected + start sampling command received + start sampling command actioned + start sampling command cancelled + start sampling command rejected + get sampled data command received + get sampled data command actioned + get sampled data command cancelled + get sampled data command rejected + supply on + supply armed + supply off + disconnected due to tamper detected + manual disconnect + manual connect + remote disconnection + remote connect + local disconnection + local connect + change supply received + change supply actioned + change supply cancelled + change supply rejected + local change supply received + local change supply actioned + local change supply cancelled + local change supply rejected + publish uncontrolled flow threshold received + publish uncontrolled flow threshold actioned + publish uncontrolled flow threshold cancelled + publish uncontrolled flow threshold rejected + + message confirmation sent + display message received + display message actioned + display message cancelled + display message rejected + cancel message received + cancel message actioned + cancel message cancelled + cancel message rejected + + low credit + no credit + credit exhausted + emergency credit enabled + emergency credit exhausted + IHD low credit warning + physical attack on the prepay meter + electronic attack on the prepay meter + discount applied + credit adjustment + credit adjust fail + debt adjustment + debt adjust fail + mode change + topup code error + topup already used + topup code invalid + topup accepted via remote + topup accepted via manual entry + friendly credit in use + friendly credit end warning + friendly credit period end + + prepay error reg clear + prepay alarm reg clear + prepay cluster not found + topup value too large + mode credit 2 prepay + mode prepay 2 credit + mode default + select available emergency credit received + select available emergency credit actioned + select available emergency credit cancelled + select available emergency credit rejected + change debt received + change debt actioned + change debt cancelled + change debt rejected + emergency credit setup received + emergency credit setup actioned + emergency credit setup cancelled + emergency credit setup rejected + consumer topup received + consumer topup actioned + consumer topup cancelled + consumer topup rejected + credit adjustment received + credit adjustment actioned + credit adjustment cancelled + credit adjustment rejected + change payment mode received + change payment mode actioned + change payment mode cancelled + change payment mode rejected + get prepay snapshot received + get prepay snapshot actioned + get prepay snapshot cancelled + get prepay snapshot rejected + get topup log received + get topup log actioned + get topup log cancelled + get topup log rejected + set low credit warning level received + set low credit warning level actioned + set low credit warning level cancelled + set low credit warning level rejected + get debt repay log received + get debt repay log actioned + get debt repay log cancelled + get debt repay log rejected + set maximum credit limit received + set maximum credit limit actioned + set maximum credit limit cancelled + set maximum credit limit rejected + set overall debt cap received + set overall debt cap actioned + set overall debt cap cancelled + set overall debt cap rejected + + calendar cluster not found + calendar change passive activated + calendar change passive updated + publish calendar received + publish calendar actioned + publish calendar cancelled + publish calendar rejected + publish day profile received + publish day profile actioned + publish day profile cancelled + publish day profile rejected + publish week profile received + publish week profile actioned + publish week profile cancelled + publish week profile rejected + publish seasons received + publish seasons actioned + publish seasons cancelled + publish seasons rejected + publish special days received + publish special days actioned + publish special days cancelled + publish special days rejected + + password 1 change + password 2 change + password 3 change + password 4 change + event log cleared + zigbee aps timeout + zigbee ieee transmission failure over threshold + zigbee ieee frame check sequence threshold + error certificate + error signature + error program storage + publish cot received + publish cot actioned + publish cot cancelled + publish cot rejected + publish cos received + publish cos actioned + publish cos cancelled + publish cos rejected + change password received + change password actioned + change password cancelled + change password rejected + set event configuration received + set event configuration actioned + set event configuration cancelled + set event configuration rejected + update site id received + update site id actioned + update site id cancelled + update site id rejected + update cin received + update cin actioned + update cin cancelled + update cin rejected + + tunneling cluster not found + unsupported protocol + unsupported protocol + request tunnel command received + request tunnel command rejected + request tunnel command generated + close tunnel command received + close tunnel command rejected + close tunnel command generated + transfer data command received + transfer data command rejected + transfer data command generated + transfer data error command received + transfer data error command rejected + transfer data error command generated + ack transfer data command received + ack transfer data command rejected + ack transfer data command generated + ready data command received + ready data command rejected + ready data command generated + get supported tunnel protocols command received + get supported tunnel protocols command rejected + get supported tunnel protocols command generated + + firmware ready for activation + firmware activated + firmware activation failure + patch ready for activation + patch activated + patch failure + image notify command received + image notify command rejected + query next image request generated + query next image response received + query next image response rejected + image block request generated + image page request generated + image block response received + image block response rejected + upgrade end request generated + upgrade end response received + upgrade end response rejected + query specific file request generated + query specific file response received + query specific file response rejected + + + + This command is used to request the ESI to respond with information regarding any available change of tenancy. + + + + + This command is used to request the ESI to respond with information regarding any available change of supplier. + + + + + This command is used to request the current password from the server. + + + + + + This command is used to request the ESI to respond with information regarding any pending change of Site ID. + + + + + This command is sent in response to a GetEventConfiguration command. + + + + + + + + This command is used to request the ESI to respond with information regarding any pending change of Customer ID Number. + + + + + + This command is used to change the tenancy of a meter. + + + + + + + + + + This command is used to change the Supplier (energy supplier) that is supplying the meter (s). + + + + + + + + + + + + + This command is used to send the current password to the client. + + + + + + + + + + This command is used to set the siteID. + + + + + + + + + This command provides a method to set the event configuration attributes, held in a client device. + + + + + + + + + + This command allows the server to request details of event configurations. + + + + + + This command is used to set the CustomerIDNumber attribute held in the Metering cluster. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Events + SE + This cluster provides an interface on which applications can use event-based protocols. + 0x0709 + EVENTS_CLUSTER + true + true + + + + + + The GetEventLog command allows a client to request events from a server's event logs. One or more PublishEventLog commands are returned on receipt of this command. + + + + + + + + + + + The ClearEventLogRequest command requests that an Events server device clear the specified event log(s). + + + + + + + The PublishEvent command is generated upon an event trigger from within the reporting device and, if supported, the associated Event Configuration attribute in the Device Management cluster. + + + + + + + + + + This command is generated on receipt of a GetEventLog command. The command returns the most recent event first and up to the number of events requested. + + + + + + + + + + This command is generated on receipt of a Clear Event Log Request command. + + + + + + + MDU Pairing + SE + This cluster seeks to assist in the commissioning of networks that include multi-dwelling units (MDUs). + 0x070A + MDU_PAIRING_CLUSTER + true + true + + + + + + The Pairing Response command provides a device joining a MDU network with a list of the devices that will constitute the 'virtual HAN' for the household in which the joining device is to operate. + + + + + + + + + + + The Pairing Request command allows a device joining a MDU network to determine the devices that will constitute the 'virtual HAN' for the household in which it is to operate. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Sub-GHz + SE + Used by the Smart Energy profile for duty cycle monitoring and frequency agility. + 0x070B + SUB_GHZ_CLUSTER + true + true + + sub-GHz channel change (server) + sub-GHz page 28 channel mask (server) + sub-GHz page 29 channel mask (server) + sub-GHz page 30 channel mask (server) + sub-GHz page 31 channel mask (server) + + + + + The server sends it to temporarily suspend ZCL messages from clients it identifies as causing too much traffic. + + + + + + + The client sends it to determine the current status of its ZCL communications from the server. + + + + + + + + + + + + + + + + + + + Key Establishment + General + Key Establishment cluster + 0x0800 + KEY_ESTABLISHMENT_CLUSTER + true + true + + + key establishment suite (server) + + key establishment suite (client) + + + + Command description for InitiateKeyEstablishmentRequest + + + + + + + + + Command description for EphemeralDataRequest + + + + + + Command description for ConfirmKeyDataRequest + + + + + + + Command description for TerminateKeyEstablishment + + + + + + + + + Command description for InitiateKeyEstablishmentResponse + + + + + + + + + Command description for EphemeralDataResponse + + + + + + Command description for ConfirmKeyDataResponse + + + + + + Keep-Alive + + SE + This cluster supports the commands and attributes directed to the network Trust Center in order to determine whether communication with the Trust Center is still available. + 0x0025 + KEEPALIVE_CLUSTER + true + true + + + Keep-Alive Base + Keep-Alive Jitter + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/app/zap-templates/zcl/data-model/silabs/cba-devices.xml b/src/app/zap-templates/zcl/data-model/silabs/cba-devices.xml new file mode 100644 index 00000000000000..d6a4ca30caa3ef --- /dev/null +++ b/src/app/zap-templates/zcl/data-model/silabs/cba-devices.xml @@ -0,0 +1,138 @@ + + + + + BACnet Tunneled Device + CBA + CBA BACnet Tunneled Device + Coordinator + 0x0105 + 0x000a + + Basic + Identify + Groups + Commissioning + Power Configuration + Device Temperature Configuration + Time + Generic Tunnel + BACnet Protocol Tunnel + + + + CBA-onofflight + CBA + CBA On/Off Light + Coordinator + 0x109 + 0x0100 + + Basic + Identify + Power Configuration + Device Temperature Configuration + Alarms + Time + Groups + On/off + Scenes + Occupancy Sensing + Commissioning + + + + CBA-onofflightswitch + CBA + CBA On/Off Light Switch + Coordinator + 0x105 + 0x0103 + + Basic + Identify + Power Configuration + Device Temperature Configuration + Alarms + Time + On/Off Switch Configuration + On/off + Scenes + Groups + Commissioning + + + + CBA-tstat + CBA + CBA Thermostat + Sleepy End Device + 0x105 + 0x0301 + + Basic + Identify + Power Configuration + Device Temperature Configuration + Alarms + Time + Thermostat + Scenes + Groups + Thermostat User Interface Configuration + Fan control + Temperature measurement + Occupancy Sensing + Relative Humidity Measurement + Commissioning + + + + CBA-tempsensor + CBA + CBA Temperature Sensor + Sleepy End Device + 0x105 + 0x0302 + + Basic + Identify + Power Configuration + Device Temperature Configuration + Alarms + Time + Temperature measurement + Groups + Commissioning + + + + CBA-config + CBA + CBA Config Tool + Coordinator + 0x0105 + 0x0005 + + Basic + Identify + Groups + Scenes + Commissioning + + + diff --git a/src/app/zap-templates/zcl/data-model/silabs/cba.xml b/src/app/zap-templates/zcl/data-model/silabs/cba.xml new file mode 100644 index 00000000000000..68ecced30d69d7 --- /dev/null +++ b/src/app/zap-templates/zcl/data-model/silabs/cba.xml @@ -0,0 +1,66 @@ + + + + + + Generic Tunnel + CBA + The minimum common commands and attributes required to tunnel any protocol. + 0x0600 + GENERIC_TUNNEL_CLUSTER + true + true + maximum incoming transfer size + maximum outgoing transfer size + protocol address + + + This command is generated when an application wishes to find the ZigBee address (node, endpoint) of the Generic Tunnel server cluster with a given ProtocolAddress attribute. The command is typically multicast to a group of inter-communicating Generic Tunnel clusters + + + + + + This command is generated upon receipt of a Match Protocol Address command to indicate that the Protocol Address was successfully matched. + + + + + + + This command is typically sent upon startup, and whenever the ProtocolAddress attribute changes. It is typically multicast to a group of inter-communicating Generic Tunnel clusters. + + + + + + BACnet Protocol Tunnel + CBA + Commands and attributes required to tunnel the BACnet protocol. + 0x0601 + BACNET_PROTOCOL_TUNNEL_CLUSTER + true + true + + + This command is generated when a BACnet network layer wishes to transfer a BACnet NPDU across a ZigBee tunnel to another BACnet network layer. + + + + + + diff --git a/src/app/zap-templates/zcl/data-model/silabs/chip.xml b/src/app/zap-templates/zcl/data-model/silabs/chip.xml new file mode 100644 index 00000000000000..033043f7b06330 --- /dev/null +++ b/src/app/zap-templates/zcl/data-model/silabs/chip.xml @@ -0,0 +1,174 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Network Provisioning + CHIP + TODO + 0x9999 + NWPROV_CLUSTER + true + true + + TODO + + + + + + TODO + + + + + + + TODO + + + + + + + TODO + + + + + TODO + + + + + + + TODO + + + + + TODO + + + + + + TODO + + + + + TODO + + + + + + TODO + + + + + TODO + + + + + + TODO + + + + + TODO + + + + + + TODO + + + + + TODO + + + + + + TODO + + + + + TODO + + + + + + TODO + + + + + TODO + + + + diff --git a/src/app/zap-templates/zcl/data-model/silabs/general-thread.xml b/src/app/zap-templates/zcl/data-model/silabs/general-thread.xml new file mode 100644 index 00000000000000..2c38e35ef404fb --- /dev/null +++ b/src/app/zap-templates/zcl/data-model/silabs/general-thread.xml @@ -0,0 +1,970 @@ + + + + + + + + + + + + + + + Command description for ReadAttributes + + + + + + Command description for ReadAttributesResponse + + + + + + Command description for WriteAttributes + + + + + + Command description for WriteAttributesUndivided + + + + + + Command description for WriteAttributesResponse + + + + + + Command description for WriteAttributesNoResponse + + + + + + Command description for ConfigureReporting + + + + + + Command description for ConfigureReportingResponse + + + + + + Command description for ReadReportingConfiguration + + + + + + Command description for ReadReportingConfigurationResponse + + + + + + Command description for ReportAttributes + + + + + + Command description for DefaultResponse + + + + + + + Command description for DiscoverAttributes + + + + + + + Command description for DiscoverAttributesResponse + + + + + + + Command description for ReadAttributesStructured + + + + + + Command description for WriteAttributesStructured + + + + + + Command description for WriteAttributesStructuredResponse + + + + + This command may be used to discover all commands processed (received) by this cluster, including optional or manufacturer specific commands. + + + + + The discover commands received response command is sent in response to a discover commands received command, and is used to discover which commands a particular cluster can process. + + + + + This command may be used to discover all commands which may be generated (sent) by the cluster, including optional or manufacturer specific commands. + + + + + The discover client commands response command is sent in response to a discover client commands command, and is used to discover which commands a particular cluster supports. + + + + + This command is similar to the discover attributes command, but also includes a field to indicate whether the attribute is readable, writeable or reportable. + + + + + This command is sent in response to a discover attribute extended command and is used to determine if attributes are readable, writable or reportable. + + + + cluster revision + reporting status + cluster revision + reporting status + + + Basic + General + Attributes for determining basic information about a device, setting user device information such as location, and enabling a device. + 0x0000 + BASIC_CLUSTER + true + true + ZCL version + + application version + stack version + hardware version + manufacturer name + model identifier + date code + power source + generic device class + generic device type + product code + product url + location description + physical environment + device enabled + alarm mask + disable local config + + Command that resets all attribute values to factory default. + + + + Power Configuration + General + Attributes for determining more detailed information about a device's power source(s), and for configuring under/over voltage alarms. + 0x0001 + POWER_CONFIG_CLUSTER + true + true + mains voltage + mains frequency + mains alarm mask + mains voltage min threshold + mains voltage max threshold + mains voltage dwell trip + battery voltage + battery percentage remaining + battery manufacturer + battery size + battery ahr rating + battery quantity + battery rated voltage + battery alarm mask + battery voltage min threshold + battery voltage threshold 1 + battery voltage threshold 2 + battery voltage threshold 3 + battery percentage min threshold + battery percentage threshold 1 + battery percentage threshold 2 + battery percentage threshold 3 + battery alarm state + battery 2 voltage + battery 2 percentage remaining + battery 2 manufacturer + battery 2 size + battery 2 ahr rating + battery 2 quantity + battery 2 rated voltage + battery 2 alarm mask + battery 2 voltage min threshold + battery 2 voltage threshold 1 + battery 2 voltage threshold 2 + battery 2 voltage threshold 3 + battery 2 percentage min threshold + battery 2 percentage threshold 1 + battery 2 percentage threshold 2 + battery 2 percentage threshold 3 + battery 2 alarm state + battery 3 voltage + battery 3 percentage remaining + battery 3 manufacturer + battery 3 size + battery 3 ahr rating + battery 3 quantity + battery 3 rated voltage + battery 3 alarm mask + battery 3 voltage min threshold + battery 3 voltage threshold 1 + battery 3 voltage threshold 2 + battery 3 voltage threshold 3 + battery 3 percentage min threshold + battery 3 percentage threshold 1 + battery 3 percentage threshold 2 + battery 3 percentage threshold 3 + battery 3 alarm state + + + Device Temperature Configuration + General + Attributes for determining information about a device's internal temperature, and for configuring under/over temperature alarms. + 0x0002 + DEVICE_TEMP_CLUSTER + true + true + current temperature + min temp experienced + max temp experienced + over temp total dwell + device temp alarm mask + low temp threshold + high temp threshold + low temp dwell trip point + high temp dwell trip point + + + Identify + General + Attributes and commands for putting a device into Identification mode (e.g. flashing a light). + 0x0003 + IDENTIFY_CLUSTER + true + true + identify time + commission state + + + Command description for Identify + + + + + + Command description for IdentifyQuery + + + + + Invoke EZMode on an Identify Server + + + + + + Update Commission State on the server device. + + + + + + + Command description for IdentifyQueryResponse + + + + + + Groups + General + Attributes and commands for group configuration and manipulation. + 0x0004 + GROUPS_CLUSTER + true + true + name support + + + + Command description for AddGroup + + + + + + + + + + Command description for ViewGroup + + + + + + Command description for GetGroupMembership + + + + + + + Command description for RemoveGroup + + + + + + Command description for RemoveAllGroups + + + + + Command description for AddGroupIfIdentifying + + + + + + + + + + Command description for AddGroupResponse + + + + + + + Command description for ViewGroupResponse + + + + + + + + + + + Command description for GetGroupMembershipResponse + + + + + + + + Command description for RemoveGroupResponse + + + + + + + Scenes + General + Attributes and commands for scene configuration and manipulation. + 0x0005 + SCENES_CLUSTER + true + true + scene count + current scene + current group + scene valid + name support + + last configured by + + + Add a scene to the scene table. Extension field sets are supported, and are inputed as arrays of the form [[cluster ID] [length] [value0...n] ...] + + + + + + + + + + Command description for ViewScene + + + + + + + Command description for RemoveScene + + + + + + + Command description for RemoveAllScenes + + + + + + Command description for StoreScene + + + + + + + Command description for RecallScene + + + + + + + + Command description for GetSceneMembership + + + + + + Command description for AddSceneResponse + + + + + + + + Command description for ViewSceneResponse + + + + + + + + + + + Command description for RemoveSceneResponse + + + + + + + + Command description for RemoveAllScenesResponse + + + + + + + Command description for StoreSceneResponse + + + + + + + + Command description for GetSceneMembershipResponse + + + + + + + + + + On/off + General + Attributes and commands for switching devices between 'On' and 'Off' states. + 0x0006 + ON_OFF_CLUSTER + true + true + on/off + start up on off + + + Command description for Off + + + + + Command description for On + + + + + Command description for Toggle + + + + + On/off Switch Configuration + General + Attributes and commands for configuring On/Off switching devices. + 0x0007 + ON_OFF_SWITCH_CONFIG_CLUSTER + true + true + switch type + switch actions + + + Level Control + General + Attributes and commands for controlling devices that can be set to a level between fully 'On' and fully 'Off.' + 0x0008 + LEVEL_CONTROL_CLUSTER + true + true + current level + remaining time + + on off transition time + on level + on transition time + off transition time + default move rate + options + start up current level + + + Command description for MoveToLevel + + + + + + + Command description for Move + + + + + + + Command description for Step + + + + + + + + Command description for Stop + + + + + Command description for MoveToLevelWithOnOff + + + + + + + Command description for MoveWithOnOff + + + + + + + Command description for StepWithOnOff + + + + + + + + Command description for StopWithOnOff + + + + + Alarms + General + Attributes and commands for sending notifications and configuring alarm functionality. + 0x0009 + ALARM_CLUSTER + true + true + alarm count + + + Command description for ResetAlarm + + + + + + + Command description for ResetAllAlarms + + + + + Command description for GetAlarm + + + + + Command description for ResetAlarmLog + + + + + Command description for Alarm + + + + + + + Command description for GetAlarmResponse + + + + + + + + + Time + General + Attributes and commands that provide a basic interface to a real-time clock. + 0x000A + TIME_CLUSTER + true + true + time + time status + time zone + dst start + dst end + dst shift + standard time + local time + last set time + valid until time + + + RSSI Location + General + Attributes and commands that provide a means for exchanging location information and channel parameters among devices. + 0x000B + RSSI_LOCATION_CLUSTER + true + true + location type + location method + location age + quality measure + number of devices + coordinate 1 + coordinate 2 + coordinate 3 + power + path loss exponent + reporting period + calculation period + number rssi measurements + + + Command description for SetAbsoluteLocation + + + + + + + + + + Command description for SetDeviceConfiguration + + + + + + + + + + Command description for GetDeviceConfiguration + + + + + + Command description for GetLocationData + + + + + + + + Command description for RssiResponse + + + + + + + + + + + Command description for SendPings + + + + + + + + Command description for AnchorNodeAnnounce + + + + + + + + + Command description for DeviceConfigurationResponse + + + + + + + + + + + Command description for LocationDataResponse + + + + + + + + + + + + + + + Command description for LocationDataNotification + + + + + + + + + + + + + + Command description for CompactLocationDataNotification + + + + + + + + + + + Command description for RssiPing + + + + + + Command description for RssiRequest + + + + + Command description for ReportRssiMeasurements + + + + + + + + Command description for RequestOwnLocation + + + + + + Binary Input (Basic) + General + An interface for reading the value of a binary measurement and accessing various characteristics of that measurement. + 0x000F + BINARY_INPUT_BASIC_CLUSTER + true + true + active text + description + inactive text + out of service + polarity + present value + reliability + status flags + application type + + + Commissioning + General + Attributes and commands for commissioning and managing a ZigBee device. + 0x0015 + COMMISSIONING_CLUSTER + true + true + short address + extended pan id + pan id + channel mask + protocol version + stack profile + startup control + trust center address + trust center master key + network key + use insecure join + preconfigured link key + network key sequence number + network key type + network manager address + scan attempts + time between scans + rejoin interval + max rejoin interval + indirect poll rate + parent retry threshold + concentrator flag + concentrator radius + concentrator discovery time + + + Command description for RestartDevice + + + + + + + + Command description for SaveStartupParameters + + + + + + + Command description for RestoreStartupParameters + + + + + + + Command description for ResetStartupParameters + + + + + + + Command description for RestartDeviceResponse + + + + + + Command description for SaveStartupParametersResponse + + + + + + Command description for RestoreStartupParametersResponse + + + + + + Command description for ResetStartupParametersResponse + + + + + diff --git a/src/app/zap-templates/zcl/data-model/silabs/general.xml b/src/app/zap-templates/zcl/data-model/silabs/general.xml new file mode 100644 index 00000000000000..367ac8a5bde356 --- /dev/null +++ b/src/app/zap-templates/zcl/data-model/silabs/general.xml @@ -0,0 +1,981 @@ + + + + + + + + + + + + + + + + + + Command description for ReadAttributes + + + + + + Command description for ReadAttributesResponse + + + + + + Command description for WriteAttributes + + + + + + Command description for WriteAttributesUndivided + + + + + + Command description for WriteAttributesResponse + + + + + + Command description for WriteAttributesNoResponse + + + + + + Command description for ConfigureReporting + + + + + + Command description for ConfigureReportingResponse + + + + + + Command description for ReadReportingConfiguration + + + + + + Command description for ReadReportingConfigurationResponse + + + + + + Command description for ReportAttributes + + + + + + Command description for DefaultResponse + + + + + + + Command description for DiscoverAttributes + + + + + + + Command description for DiscoverAttributesResponse + + + + + + + Command description for ReadAttributesStructured + + + + + + Command description for WriteAttributesStructured + + + + + + Command description for WriteAttributesStructuredResponse + + + + + This command may be used to discover all commands processed (received) by this cluster, including optional or manufacturer specific commands. + + + + + The discover commands received response command is sent in response to a discover commands received command, and is used to discover which commands a particular cluster can process. + + + + + This command may be used to discover all commands which may be generated (sent) by the cluster, including optional or manufacturer specific commands. + + + + + The discover client commands response command is sent in response to a discover client commands command, and is used to discover which commands a particular cluster supports. + + + + + This command is similar to the discover attributes command, but also includes a field to indicate whether the attribute is readable, writeable or reportable. + + + + + This command is sent in response to a discover attribute extended command and is used to determine if attributes are readable, writable or reportable. + + + + cluster revision + reporting status + cluster revision + reporting status + + + Basic + General + Attributes for determining basic information about a device, setting user device information such as location, and enabling a device. + 0x0000 + BASIC_CLUSTER + true + true + + ZCL version + + application version + stack version + hardware version + manufacturer name + model identifier + date code + power source + generic device class + generic device type + product code + product url + location description + physical environment + device enabled + alarm mask + disable local config + + Command that resets all attribute values to factory default. + + + + Power Configuration + General + Attributes for determining more detailed information about a device's power source(s), and for configuring under/over voltage alarms. + 0x0001 + POWER_CONFIG_CLUSTER + true + true + + mains voltage + mains frequency + mains alarm mask + mains voltage min threshold + mains voltage max threshold + mains voltage dwell trip + battery voltage + battery percentage remaining + battery manufacturer + battery size + battery ahr rating + battery quantity + battery rated voltage + battery alarm mask + battery voltage min threshold + battery voltage threshold 1 + battery voltage threshold 2 + battery voltage threshold 3 + battery percentage min threshold + battery percentage threshold 1 + battery percentage threshold 2 + battery percentage threshold 3 + battery alarm state + battery 2 voltage + battery 2 percentage remaining + battery 2 manufacturer + battery 2 size + battery 2 ahr rating + battery 2 quantity + battery 2 rated voltage + battery 2 alarm mask + battery 2 voltage min threshold + battery 2 voltage threshold 1 + battery 2 voltage threshold 2 + battery 2 voltage threshold 3 + battery 2 percentage min threshold + battery 2 percentage threshold 1 + battery 2 percentage threshold 2 + battery 2 percentage threshold 3 + battery 2 alarm state + battery 3 voltage + battery 3 percentage remaining + battery 3 manufacturer + battery 3 size + battery 3 ahr rating + battery 3 quantity + battery 3 rated voltage + battery 3 alarm mask + battery 3 voltage min threshold + battery 3 voltage threshold 1 + battery 3 voltage threshold 2 + battery 3 voltage threshold 3 + battery 3 percentage min threshold + battery 3 percentage threshold 1 + battery 3 percentage threshold 2 + battery 3 percentage threshold 3 + battery 3 alarm state + + + Device Temperature Configuration + General + Attributes for determining information about a device's internal temperature, and for configuring under/over temperature alarms. + 0x0002 + DEVICE_TEMP_CLUSTER + true + true + current temperature + min temp experienced + max temp experienced + over temp total dwell + device temp alarm mask + low temp threshold + high temp threshold + low temp dwell trip point + high temp dwell trip point + + + Identify + General + Attributes and commands for putting a device into Identification mode (e.g. flashing a light). + 0x0003 + IDENTIFY_CLUSTER + true + true + + identify time + commission state + + + Command description for Identify + + + + + + Command description for IdentifyQuery + + + + + Invoke EZMode on an Identify Server + + + + + + Update Commission State on the server device. + + + + + + + Command description for IdentifyQueryResponse + + + + + + Groups + General + Attributes and commands for group configuration and manipulation. + 0x0004 + GROUPS_CLUSTER + true + true + + name support + + + + Command description for AddGroup + + + + + + + Command description for ViewGroup + + + + + + Command description for GetGroupMembership + + + + + + + Command description for RemoveGroup + + + + + + Command description for RemoveAllGroups + + + + + Command description for AddGroupIfIdentifying + + + + + + + Command description for AddGroupResponse + + + + + + + Command description for ViewGroupResponse + + + + + + + + Command description for GetGroupMembershipResponse + + + + + + + + Command description for RemoveGroupResponse + + + + + + + Scenes + General + Attributes and commands for scene configuration and manipulation. + 0x0005 + SCENES_CLUSTER + true + true + + scene count + current scene + current group + scene valid + name support + + last configured by + + + Add a scene to the scene table. Extension field sets are supported, and are inputed as arrays of the form [[cluster ID] [length] [value0...n] ...] + + + + + + + + + + Command description for ViewScene + + + + + + + Command description for RemoveScene + + + + + + + Command description for RemoveAllScenes + + + + + + Command description for StoreScene + + + + + + + Command description for RecallScene + + + + + + + + Command description for GetSceneMembership + + + + + + Command description for AddSceneResponse + + + + + + + + Command description for ViewSceneResponse + + + + + + + + + + + Command description for RemoveSceneResponse + + + + + + + + Command description for RemoveAllScenesResponse + + + + + + + Command description for StoreSceneResponse + + + + + + + + Command description for GetSceneMembershipResponse + + + + + + + + + + On/off + General + Attributes and commands for switching devices between 'On' and 'Off' states. + 0x0006 + ON_OFF_CLUSTER + true + true + + on/off + start up on off + + + Command description for Off + + + + + Command description for On + + + + + Command description for Toggle + + + + + On/off Switch Configuration + General + Attributes and commands for configuring On/Off switching devices. + 0x0007 + ON_OFF_SWITCH_CONFIG_CLUSTER + true + true + switch type + switch actions + + + Level Control + General + Attributes and commands for controlling devices that can be set to a level between fully 'On' and fully 'Off.' + 0x0008 + LEVEL_CONTROL_CLUSTER + true + true + + current level + remaining time + + on off transition time + on level + on transition time + off transition time + default move rate + options + start up current level + + + Command description for MoveToLevel + + + + + + + + + Command description for Move + + + + + + + + + Command description for Step + + + + + + + + + + Command description for Stop + + + + + + + Command description for MoveToLevelWithOnOff + + + + + + + Command description for MoveWithOnOff + + + + + + + Command description for StepWithOnOff + + + + + + + + Command description for StopWithOnOff + + + + + Alarms + General + Attributes and commands for sending notifications and configuring alarm functionality. + 0x0009 + ALARM_CLUSTER + true + true + alarm count + + + Command description for ResetAlarm + + + + + + + Command description for ResetAllAlarms + + + + + Command description for GetAlarm + + + + + Command description for ResetAlarmLog + + + + + Command description for Alarm + + + + + + + Command description for GetAlarmResponse + + + + + + + + + Time + General + Attributes and commands that provide a basic interface to a real-time clock. + 0x000A + TIME_CLUSTER + true + true + + time + time status + time zone + dst start + dst end + dst shift + standard time + local time + last set time + valid until time + + + RSSI Location + General + Attributes and commands that provide a means for exchanging location information and channel parameters among devices. + 0x000B + RSSI_LOCATION_CLUSTER + true + true + location type + location method + location age + quality measure + number of devices + coordinate 1 + coordinate 2 + coordinate 3 + power + path loss exponent + reporting period + calculation period + number rssi measurements + + + Command description for SetAbsoluteLocation + + + + + + + + + + Command description for SetDeviceConfiguration + + + + + + + + + + Command description for GetDeviceConfiguration + + + + + + Command description for GetLocationData + + + + + + + + Command description for RssiResponse + + + + + + + + + + + Command description for SendPings + + + + + + + + Command description for AnchorNodeAnnounce + + + + + + + + + Command description for DeviceConfigurationResponse + + + + + + + + + + + Command description for LocationDataResponse + + + + + + + + + + + + + + + Command description for LocationDataNotification + + + + + + + + + + + + + + Command description for CompactLocationDataNotification + + + + + + + + + + + Command description for RssiPing + + + + + + Command description for RssiRequest + + + + + Command description for ReportRssiMeasurements + + + + + + + + Command description for RequestOwnLocation + + + + + + Binary Input (Basic) + General + An interface for reading the value of a binary measurement and accessing various characteristics of that measurement. + 0x000F + BINARY_INPUT_BASIC_CLUSTER + true + true + active text + description + inactive text + out of service + polarity + present value + reliability + status flags + application type + + + Commissioning + General + Attributes and commands for commissioning and managing a ZigBee device. + 0x0015 + COMMISSIONING_CLUSTER + true + true + + short address + extended pan id + pan id + channel mask + protocol version + stack profile + startup control + trust center address + trust center master key + network key + use insecure join + preconfigured link key + network key sequence number + network key type + network manager address + scan attempts + time between scans + rejoin interval + max rejoin interval + indirect poll rate + parent retry threshold + concentrator flag + concentrator radius + concentrator discovery time + + + Command description for RestartDevice + + + + + + + + Command description for SaveStartupParameters + + + + + + + Command description for RestoreStartupParameters + + + + + + + Command description for ResetStartupParameters + + + + + + + Command description for RestartDeviceResponse + + + + + + Command description for SaveStartupParametersResponse + + + + + + Command description for RestoreStartupParametersResponse + + + + + + Command description for ResetStartupParametersResponse + + + + + diff --git a/src/app/zap-templates/zcl/data-model/silabs/green-power-devices.xml b/src/app/zap-templates/zcl/data-model/silabs/green-power-devices.xml new file mode 100644 index 00000000000000..f0abc9af866cc3 --- /dev/null +++ b/src/app/zap-templates/zcl/data-model/silabs/green-power-devices.xml @@ -0,0 +1,106 @@ + + + + + GP-proxy + GP + GP Proxy + Router + 0xA1E0 + 0x0060 + + + + + + GP-proxy-basic + GP + GP Proxy Basic + Router + 0xA1E0 + 0x0061 + + + + + + GP-target-plus + GP + GP Target+ + Router + 0xA1E0 + 0x0062 + + + + + + GP-target + GP + GP Target + Router + 0xA1E0 + 0x0063 + + + + + + GP-commissioning-tool + GP + GP Commissioning Tool + Router + 0xA1E0 + 0x0064 + + + + + + GP-combo + GP + GP Combo + Router + 0xA1E0 + 0x0065 + + + + + + GP-combo-basic + GP + GP Combo Basic + Router + 0xA1E0 + 0x0066 + + + + + + GP-test-device + GP + GP Test Device + Router + 0xA1E0 + 0x0066 + + + + + diff --git a/src/app/zap-templates/zcl/data-model/silabs/green-power.xml b/src/app/zap-templates/zcl/data-model/silabs/green-power.xml new file mode 100644 index 00000000000000..376824a46bdefc --- /dev/null +++ b/src/app/zap-templates/zcl/data-model/silabs/green-power.xml @@ -0,0 +1,730 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Green Power + GP + The Green Power cluster defines the format of the commands exchanged when handling GPDs. + 0x0021 + GREEN_POWER_CLUSTER + true + true + + gps max sink table entries + sink table + gps communication mode + gps commissioning exit mode + gps commissioning window + gps security level + gps functionality + gps active functionality + + gp shared security key type + gp shared security key + gp link key + + gpp max proxy table entries + proxy table + gpp notification retry number + gpp notification retry timer + gpp max search counter + gpp blocked gpd id + gpp functionality + gpp active functionality + + gp shared security key type + gp shared security key + gp link key + + + + From GPP to GPS to tunnel GP frame. + + + + + + + + + + + + + + From GPP to GPSs in entire network to get pairing indication related to GPD for Proxy Table update. + + + + + + + + + From GPP to neighbor GPPs to indicate GP Notification sent in unicast mode. + + + + + + + + + + + + From GPP to GPS to tunnel GPD commissioning data. + + + + + + + + + + + + + + + To enable commissioning mode of the sink, over the air + + + + + + + + + To configure GPD Command Translation Table. + + + + + + + + + + To provide GPD Command Translation Table content. + + + + + + To configure Sink Table. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + To read out selected Sink Table Entries, by index or by GPD ID. + + + + + + + + + + To reply with read-out Proxy Table entries, by index or by GPD ID. + + + + + + + + + + + From GPS to GPP to acknowledge GP Notification received in unicast mode. + + + + + + + + + + From GPS to the entire network to (de)register for tunneling service, or for removing GPD from the network. + + + + + + + + + + + + + + + + + From GPS to GPPs in the whole network to indicate commissioning mode. + + + + + + + + From GPS to selected GPP, to provide data to be transmitted to Rx-capable GPD. + + + + + + + + + + + + + To provide GPD Command Translation Table content. + + + + + + + + + + + To selected Proxy Table entries, by index or by GPD ID. + + + + + + + + + + + To request selected Proxy Table entries, by index or by GPD ID. + + + + + + + + + diff --git a/src/app/zap-templates/zcl/data-model/silabs/ha-devices.xml b/src/app/zap-templates/zcl/data-model/silabs/ha-devices.xml new file mode 100644 index 00000000000000..addde11f5ce619 --- /dev/null +++ b/src/app/zap-templates/zcl/data-model/silabs/ha-devices.xml @@ -0,0 +1,1031 @@ + + + + + HA-onoff + HA + HA On/Off Switch + Coordinator + 0x0104 + 0x0000 + + Basic + Identify + Power Configuration + Device Temperature Configuration + Alarms + On/off + Scenes + Groups + On/Off Switch Configuration + Poll Control + Electrical Measurement + Time + Over the Air Bootloading + Partition + + + + HA-levelcontrol + HA + HA Level Control Switch + Coordinator + 0x0104 + 0x0001 + + Basic + Identify + Power Configuration + Device Temperature Configuration + Alarms + On/off + Level control + On/Off Switch Configuration + Scenes + Groups + Poll Control + Electrical Measurement + Time + Over the Air Bootloading + Partition + + + + HA-onnoffoutput + HA + HA On/Off Output + Coordinator + 0x0104 + 0x0002 + + Basic + Identify + Power Configuration + Device Temperature Configuration + Alarms + On/off + Scenes + Groups + Poll Control + Electrical Measurement + Time + Over the Air Bootloading + Partition + + + + HA-levelcontrollableoutput + HA + HA Level Controllable Output + Coordinator + 0x0104 + 0x0003 + + Basic + Identify + Power Configuration + Device Temperature Configuration + Alarms + On/off + Level control + Scenes + Groups + Poll Control + Electrical Measurement + Time + Over the Air Bootloading + Partition + + + + HA-sceneselector + HA + HA Scene Selector + Coordinator + 0x0104 + 0x0004 + + Basic + Identify + Power Configuration + Device Temperature Configuration + Alarms + Scenes + Groups + Poll Control + Electrical Measurement + Time + Over the Air Bootloading + Partition + + + + HA-configurationtool + HA + HA Configuration Tool + Coordinator + 0x0104 + 0x0005 + + Basic + Identify + Power Configuration + Device Temperature Configuration + Alarms + Groups + Scenes + Illuminance Level Sensing + Temperature Measurement + Pressure Measurement + Flow Measurement + Occupancy Sensing + Pump Configuration and Control + Shade Configuration + Thermostat User Interface Configuration + Poll Control + Electrical Measurement + Time + Over the Air Bootloading + Partition + + + + HA-remote + HA + HA Remote Control + Sleepy End Device + 0x0104 + 0x0006 + + Basic + Identify + Power Configuration + Device Temperature Configuration + Alarms + Simple Metering + On/off + Level control + Groups + Scenes + Color control + Pump Configuration and Control + Shade Configuration + On/Off Switch Configuration + Temperature Measurement + Illuminance Level Sensing + Illuminance Measurement + Window Covering + Door Lock + Thermostat + Poll Control + Electrical Measurement + Time + Over the Air Bootloading + Partition + + + + HA-combinedinterface + HA + HA Combined Interface + Coordinator + 0x0104 + 0x0007 + + Basic + Identify + Power Configuration + Device Temperature Configuration + Alarms + Color control + Pump Configuration and Control + Shade Configuration + On/Off Switch Configuration + Temperature Measurement + Illuminance Level Sensing + Illuminance Measurement + Thermostat User Interface Configuration + Level control + Groups + Scenes + Window Covering + Door Lock + Thermostat + On/off + Poll Control + Electrical Measurement + Time + Over the Air Bootloading + Partition + + + + HA-rangeextender + HA + HA Range Extender + Router + 0x0104 + 0x0008 + + Basic + Identify + Power Configuration + Device Temperature Configuration + Alarms + Poll Control + Electrical Measurement + Time + Over the Air Bootloading + Partition + + + + HA-mpo + HA + HA Mains Power Outlet + Coordinator + 0x0104 + 0x0009 + + Basic + Identify + Power Configuration + Device Temperature Configuration + Alarms + On/off + Scenes + Groups + Poll Control + Electrical Measurement + Time + Over the Air Bootloading + Partition + + + + HA-doorlock + HA + HA Door Lock + Coordinator + 0x0104 + 0x000A + + Basic + Identify + Power Configuration + Device Temperature Configuration + Alarms + Door Lock + Scenes + Groups + Poll Control + Electrical Measurement + Time + Over the Air Bootloading + Partition + + + + HA-doorlockcontroller + HA + HA Door Lock Controller + Coordinator + 0x0104 + 0x000B + + Basic + Identify + Power Configuration + Device Temperature Configuration + Alarms + Door Lock + Time + Scenes + Groups + Poll Control + Electrical Measurement + Time + Over the Air Bootloading + Partition + + + + HA-simplesensor + HA + HA Simple Sensor + Coordinator + 0x0104 + 0x000C + + Basic + Identify + Power Configuration + Device Temperature Configuration + Alarms + Binary Input (Basic) + Poll Control + Electrical Measurement + Time + Over the Air Bootloading + Partition + + + + HA-onofflight + HA + HA On/Off Light + Coordinator + 0x0104 + 0x0100 + + Basic + Identify + Power Configuration + Device Temperature Configuration + Alarms + On/off + Scenes + Groups + Occupancy Sensing + Poll Control + Electrical Measurement + Time + Over the Air Bootloading + Partition + + + + HA-light + HA + HA Dimmable Light + Coordinator + 0x0104 + 0x0101 + + Basic + Identify + Power Configuration + Device Temperature Configuration + Alarms + On/off + Level control + Scenes + Groups + Occupancy Sensing + Poll Control + Electrical Measurement + Time + Over the Air Bootloading + Partition + + + + HA-colordimmablelight + HA + HA Color Dimmable Light + Coordinator + 0x0104 + 0x0102 + + Basic + Identify + Power Configuration + Device Temperature Configuration + Alarms + On/off + Level control + Color control + Scenes + Groups + Occupancy Sensing + Poll Control + Electrical Measurement + Time + Over the Air Bootloading + Partition + + + + HA-onofflightswitch + HA + HA On/Off Light Switch + Coordinator + 0x0104 + 0x0103 + + Basic + Identify + Power Configuration + Device Temperature Configuration + Alarms + On/off + Scenes + Groups + On/Off Switch Configuration + Poll Control + Electrical Measurement + Time + Over the Air Bootloading + Partition + + + + HA-switch + HA + HA Dimmer Switch + Sleepy End Device + 0x0104 + 0x0104 + + Basic + Identify + Power Configuration + Device Temperature Configuration + Alarms + On/off + Level control + Scenes + On/Off Switch Configuration + Groups + Poll Control + Electrical Measurement + Time + Over the Air Bootloading + Partition + + + + HA-colordimmerswitch + HA + HA Color Dimmer Switch + Coordinator + 0x0104 + 0x0105 + + Basic + Identify + Power Configuration + Device Temperature Configuration + Alarms + On/off + Level control + Color control + On/Off Switch Configuration + Scenes + Groups + Poll Control + Electrical Measurement + Time + Over the Air Bootloading + Partition + + + + HA-lightsensor + HA + HA Light Sensor + Coordinator + 0x0104 + 0x0106 + + Basic + Identify + Power Configuration + Device Temperature Configuration + Alarms + Illuminance measurement + Groups + Poll Control + Electrical Measurement + Time + Over the Air Bootloading + Partition + + + + HA-occupancysensor + HA + HA Occupancy Sensor + Coordinator + 0x0104 + 0x0107 + + Basic + Identify + Power Configuration + Device Temperature Configuration + Alarms + Occupancy Sensing + Groups + Poll Control + Electrical Measurement + Time + Over the Air Bootloading + Partition + + + + HA-shade + HA + HA Shade + Coordinator + 0x0104 + 0x0200 + + Basic + Identify + Power Configuration + Device Temperature Configuration + Alarms + Shade configuration + On/off + Level control + Scenes + Groups + Poll Control + Electrical Measurement + Time + Over the Air Bootloading + Partition + + + + HA-shadecontroller + HA + HA Shade Controller + Coordinator + 0x0104 + 0x0201 + + Basic + Identify + Power Configuration + Device Temperature Configuration + Alarms + On/off + Level control + Shade configuration + Scenes + Groups + Poll Control + Electrical Measurement + Time + Over the Air Bootloading + Partition + + + + HA-windowcovering + HA + HA Window Covering + Coordinator + 0x0104 + 0x0202 + + Basic + Identify + Power Configuration + Device Temperature Configuration + Alarms + Window Covering + Scenes + Groups + Poll Control + Electrical Measurement + Time + Over the Air Bootloading + Partition + + + + HA-windowcoveringcontroller + HA + HA Window Covering Controller + Coordinator + 0x0104 + 0x0203 + + Basic + Identify + Power Configuration + Device Temperature Configuration + Alarms + Window Covering + Scenes + Groups + Poll Control + Electrical Measurement + Time + Over the Air Bootloading + Partition + + + + HA-heatcool + HA + HA Heating Cooling Unit + Coordinator + 0x0104 + 0x0300 + + Basic + Identify + Power Configuration + Device Temperature Configuration + Alarms + On/off + Thermostat + Fan control + Level control + Groups + Poll Control + Electrical Measurement + Time + Over the Air Bootloading + Partition + + + + HA-tstat + HA + HA Thermostat + Sleepy End Device + 0x0104 + 0x0301 + + Basic + Identify + Power Configuration + Device Temperature Configuration + Alarms + Thermostat + Scenes + Groups + Thermostat User Interface Configuration + Fan control + Temperature measurement + Occupancy Sensing + Relative Humidity Measurement + Poll Control + Electrical Measurement + Time + Over the Air Bootloading + Partition + + + + HA-tempsensor + HA + HA Temperature Sensor + Sleepy End Device + 0x0104 + 0x0302 + + Basic + Identify + Power Configuration + Device Temperature Configuration + Alarms + Temperature measurement + Groups + Poll Control + Electrical Measurement + Time + Over the Air Bootloading + Partition + + + + HA-pump + HA + HA Pump + Coordinator + 0x0104 + 0x0303 + + Basic + Identify + Power Configuration + Device Temperature Configuration + Alarms + Pump Configuration and Control + On/off + Scenes + Groups + Level control + Pressure measurement + Temperature measurement + Flow measurement + Poll Control + Electrical Measurement + Time + Over the Air Bootloading + Partition + + + + HA-pumpcontroller + HA + HA Pump Controller + Coordinator + 0x0104 + 0x0304 + + Basic + Identify + Power Configuration + Device Temperature Configuration + Alarms + Pump Configuration and Control + On/off + Scenes + Groups + Pressure measurement + Temperature measurement + Flow measurement + Level control + Poll Control + Electrical Measurement + Time + Over the Air Bootloading + Partition + + + + HA-pressuresensor + HA + HA Pressure Sensor + Coordinator + 0x0104 + 0x0305 + + Basic + Identify + Power Configuration + Device Temperature Configuration + Alarms + Pressure measurement + Groups + Poll Control + Electrical Measurement + Time + Over the Air Bootloading + Partition + + + + HA-flowsensor + HA + HA Flow Sensor + Coordinator + 0x0104 + 0x0306 + + Basic + Identify + Power Configuration + Device Temperature Configuration + Alarms + Flow measurement + Groups + Poll Control + Electrical Measurement + Time + Over the Air Bootloading + Partition + + + + HA-ias400 + HA + HA IAS Control and Indication Equipment + Coordinator + 0x0104 + 0x0400 + + Basic + Identify + Power Configuration + Device Temperature Configuration + Alarms + IAS ACE + IAS WD + IAS Zone + Scenes + Groups + Poll Control + Electrical Measurement + Time + Over the Air Bootloading + Partition + + + + HA-ias401 + HA + HA IAS Ancillary Control Equipment + Coordinator + 0x0104 + 0x0401 + + Basic + Identify + Power Configuration + Device Temperature Configuration + Alarms + IAS Zone + IAS ACE + Poll Control + Electrical Measurement + Time + Over the Air Bootloading + Partition + + + + HA-ias402 + HA + HA IAS Zone + Coordinator + 0x0104 + 0x0402 + + Basic + Identify + Power Configuration + Device Temperature Configuration + Alarms + IAS Zone + Poll Control + Electrical Measurement + Time + Over the Air Bootloading + Partition + + + + HA-ias403 + HA + HA IAS Warning Device + Coordinator + 0x0104 + 0x0403 + + Basic + Identify + Power Configuration + Device Temperature Configuration + Alarms + IAS WD + IAS Zone + Scenes + Groups + Poll Control + Electrical Measurement + Time + Over the Air Bootloading + Partition + + + + HA-consumptionawarenessdevice + HA + HA Consumption Awareness Device + Coordinator + 0x0104 + 0x000D + + Basic + Identify + Power Configuration + Device Temperature Configuration + Alarms + Poll Control + Electrical Measurement + Time + Simple Metering + Over the Air Bootloading + Partition + + + + HA-homegatewayems + HA + HA Home Gateway / Energy Management System + Coordinator + 0x0104 + 0x0050 + + Basic + Identify + Power Configuration + Device Temperature Configuration + Alarms + Poll Control + Electrical Measurement + Time + Simple Metering + Meter Identification + Power Profile + Appliance Statistics + Appliance Control + Appliance Identification + Appliance Events and Alert + Price + Over the Air Bootloading + Partition + + + + HA-smartplug + HA + HA Smart Plug + Coordinator + 0x0104 + 0x0051 + + Basic + Identify + On/off + Power Configuration + Device Temperature Configuration + Alarms + Poll Control + Electrical Measurement + Simple Metering + Time + Demand Response and Load Control + Price + Time + Over the Air Bootloading + Partition + + + + HA-whitegoods + HA + HA White Goods + Coordinator + 0x0104 + 0x0052 + + Basic + Identify + Power Configuration + Device Temperature Configuration + Alarms + Poll Control + Electrical Measurement + Time + Meter Identification + Price + Time + Power Profile + Appliance Statistics + Appliance Control + Appliance Identification + Appliance Events and Alert + Simple Metering + Over the Air Bootloading + Partition + + + + HA-meterinterface + HA + HA Meter Interface + Coordinator + 0x0104 + 0x0053 + + Basic + Identify + Power Configuration + Device Temperature Configuration + Alarms + Simple Metering + Meter Identification + Poll Control + Electrical Measurement + Time + Messaging + Price + Over the Air Bootloading + Partition + + + diff --git a/src/app/zap-templates/zcl/data-model/silabs/ha-thread.xml b/src/app/zap-templates/zcl/data-model/silabs/ha-thread.xml new file mode 100644 index 00000000000000..d82ec09896cc7b --- /dev/null +++ b/src/app/zap-templates/zcl/data-model/silabs/ha-thread.xml @@ -0,0 +1,2462 @@ + + + + + + + + + + + + + + Shade Configuration + Closures + Attributes and commands for configuring a shade. + 0x0100 + SHADE_CONFIG_CLUSTER + true + true + physical closed limit + + motor step size + + status + + closed limit + + mode + + + + Pump Configuration and Control + HVAC + An interface for configuring and controlling pumps. + 0x0200 + PUMP_CONFIG_CONTROL_CLUSTER + true + true + max pressure + max speed + max flow + min const pressure + max const pressure + min comp pressure + max comp pressure + min const speed + max const speed + min const flow + max const flow + min const temp + max const temp + pump status + effective operation mode + effective control mode + capacity + speed + lifetime running hours + power + lifetime energy consumed + operation mode + control mode + alarm mask + + + + Thermostat + HVAC + An interface for configuring and controlling the functionality of a thermostat. + 0x0201 + THERMOSTAT_CLUSTER + true + true + local temperature + outdoor temperature + occupancy + + abs min heat setpoint limit + abs max heat setpoint limit + abs min cool setpoint limit + abs max cool setpoint limit + pi cooling demand + pi heating demand + HVAC system type configuration + local temperature calibration + occupied cooling setpoint + occupied heating setpoint + unoccupied cooling setpoint + unoccupied heating setpoint + min heat setpoint limit + max heat setpoint limit + min cool setpoint limit + max cool setpoint limit + min setpoint dead band + remote sensing + control sequence of operation + system mode + alarm mask + + thermostat running mode + start of week + number of weekly transitions + number of daily transitions + temperature setpoint hold + temperature setpoint hold duration + thermostat programming operation mode + hvac relay state + setpoint change source + setpoint change amount + setpoint change source timestamp + ac type + ac capacity + ac refrigerant type + ac compressor + ac error code + ac louver position + ac coil temperature + ac capacity format + + + Command description for SetpointRaiseLower + + + + + + + Command description for SetWeeklySchedule + + + + + + + + + Command description for GetWeeklySchedule + + + + + + + The Clear Weekly Schedule command is used to clear the weekly schedule. + + + + + The Get Relay Status Log command is used to query the thermostat internal relay status log. + + + + + The Current Weekly Schedule Command is sent from the server in response to the Get Weekly Schedule Command. + + + + + + + + + This command is sent from the thermostat cluster server in response to the Get Relay Status Log. + + + + + + + + + + + Fan Control + HVAC + An interface for controlling a fan in a heating/cooling system. + 0x0202 + FAN_CONTROL_CLUSTER + true + true + fan mode + + fan mode sequence + + + + Dehumidification Control + HVAC + An interface for controlling dehumidification. + 0x0203 + DEHUMID_CONTROL_CLUSTER + true + true + relative humidity + dehumidification cooling + RH dehumidification setpoint + relative humidity mode + dehumidification lockout + dehumidification hysteresis + dehumidification max cool + relative humidity display + + + Thermostat User Interface Configuration + HVAC + An interface for configuring the user interface of a thermostat (which may be remote from the thermostat). + 0x0204 + THERMOSTAT_UI_CONFIG_CLUSTER + true + true + temperature display mode + keypad lockout + schedule programming visibility + + + Color Control + Lighting + Attributes and commands for controlling the color properties of a color-capable light. + 0x0300 + COLOR_CONTROL_CLUSTER + true + true + current hue + + current saturation + + remaining time + + current x + + current y + + drift compensation + + compensation text + + color temperature + + color mode + + color control options + + number of primaries + + primary 1 x + + primary 1 y + + primary 1 intensity + + primary 2 x + + primary 2 y + + primary 2 intensity + + primary 3 x + + primary 3 y + + primary 3 intensity + + primary 4 x + + primary 4 y + + primary 4 intensity + + primary 5 x + + primary 5 y + + primary 5 intensity + + primary 6 x + + primary 6 y + + primary 6 intensity + + white point x + + white point y + + color point r x + + color point r y + + color point r intensity + + color point g x + + color point g y + + color point g intensity + + color point b x + + color point b y + + color point b intensity + + couple color temp to level min-mireds + start up color temperature mireds + + + Move to specified hue. + + + + + + + + Move hue up or down at specified rate. + + + + + + + Step hue up or down by specified size at specified rate. + + + + + + + + Move to specified saturation. + + + + + + + Move saturation up or down at specified rate. + + + + + + + Step saturation up or down by specified size at specified rate. + + + + + + + + Move to hue and saturation. + + + + + + + + Move to specified color. + + + + + + + + Moves the color. + + + + + + + Steps the lighting to a specific color. + + + + + + + + Moves the lighting to a specific color temperature. + + + + + + + Ballast Configuration + Lighting + Attributes and commands for configuring a lighting ballast. + 0x0301 + BALLAST_CONFIGURATION_CLUSTER + true + true + physical min level + physical max level + ballast status + min level + max level + power on level + power on fade time + intrinsic ballast factor + ballast factor adjustment + lamp quality + lamp type + lamp manufacturer + lamp rated hours + lamp burn hours + lamp alarm mode + lamp burn hours trip point + + + Illuminance Measurement + Measurement & Sensing + Attributes and commands for configuring the measurement of illuminance, and reporting illuminance measurements. + 0x0400 + ILLUM_MEASUREMENT_CLUSTER + true + true + measured value + + min measured value + + max measured value + + tolerance + + light sensor type + + + + Illuminance Level Sensing + Measurement & Sensing + Attributes and commands for configuring the sensing of illuminance levels, and reporting whether illuminance is above, below, or on target. + 0x0401 + ILLUM_LEVEL_SENSING_CLUSTER + true + true + level status + light sensor type + + illuminance level target + + + Temperature Measurement + Measurement & Sensing + Attributes and commands for configuring the measurement of temperature, and reporting temperature measurements. + 0x0402 + TEMP_MEASUREMENT_CLUSTER + true + true + measured value + + min measured value + + max measured value + + tolerance + + + + Pressure Measurement + Measurement & Sensing + Attributes and commands for configuring the measurement of pressure, and reporting pressure measurements. + 0x0403 + PRESSURE_MEASUREMENT_CLUSTER + true + true + measured value + + min measured value + + max measured value + + tolerance + + scaled value + min scaled value + max scaled value + scaled tolerance + scale + + + Flow Measurement + Measurement & Sensing + Attributes and commands for configuring the measurement of flow, and reporting flow rates. + 0x0404 + FLOW_MEASUREMENT_CLUSTER + true + true + measured value + + min measured value + + max measured value + + tolerance + + + + Relative Humidity Measurement + Measurement & Sensing + Attributes and commands for configuring the measurement of relative humidity, and reporting relative humidity measurements. + 0x0405 + RELATIVE_HUMIDITY_MEASUREMENT_CLUSTER + true + true + measured value + + min measured value + + max measured value + + tolerance + + + + Occupancy Sensing + Measurement & Sensing + Attributes and commands for configuring occupancy sensing, and reporting occupancy status. + 0x0406 + OCCUPANCY_SENSING_CLUSTER + true + true + occupancy + occupancy sensor type + PIR occupied to unoccupied delay + PIR unoccupied to occupied delay + PIR unoccupied to occupied threshold + ultrasonic occupied to unoccupied delay + ultrasonic unoccupied to occupied delay + ultrasonic unoccupied to occupied threshold + + + Carbon Monoxide Concentration Measurement + Measurement & Sensing + Attributes and commands for configuring the measurement of carbon monoxide concentration and reporting concentration measurements. + 0x040C + CARBON_MONOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER + true + true + measured value + + min measured value + + max measured value + + tolerance + + + + Carbon Dioxide Concentration Measurement + Measurement & Sensing + Attributes and commands for configuring the carbon diaoxide concentration and reporting concentration measurements. + 0x040D + CARBON_DIOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER + true + true + measured value + + min measured value + + max measured value + + tolerance + + + + Ethylene Concentration Measurement + Measurement & Sensing + Attributes and commands for configuring the Ethylene concentration and reporting concentration measurements. + 0x040E + ETHYLENE_CONCENTRATION_MEASUREMENT_CLUSTER + true + true + measured value + + min measured value + + max measured value + + tolerance + + + + Ethylene Oxide Concentration Measurement + Measurement & Sensing + Attributes and commands for configuring the Ethylene Oxide concentration and reporting concentration measurements. + 0x040F + ETHYLENE_OXIDE_CONCENTRATION_MEASUREMENT_CLUSTER + true + true + measured value + + min measured value + + max measured value + + tolerance + + + + Hydrogen Concentration Measurement + Measurement & Sensing + Attributes and commands for configuring the Hydrogen concentration and reporting concentration measurements. + 0x0410 + HYDROGEN_CONCENTRATION_MEASUREMENT_CLUSTER + true + true + measured value + + min measured value + + max measured value + + tolerance + + + + Hydrogen Sulphide Concentration Measurement + Measurement & Sensing + Attributes and commands for configuring the Hydrogen Sulphide concentration and reporting concentration measurements. + 0x0411 + HYDROGEN_SULPHIDE_CONCENTRATION_MEASUREMENT_CLUSTER + true + true + measured value + + min measured value + + max measured value + + tolerance + + + + Nitric Oxide Concentration Measurement + Measurement & Sensing + Attributes and commands for configuring the Nitric Oxide concentration and reporting concentration measurements. + 0x0412 + NITRIC_OXIDE_CONCENTRATION_MEASUREMENT_CLUSTER + true + true + measured value + + min measured value + + max measured value + + tolerance + + + + Nitrogen Dioxide Concentration Measurement + Measurement & Sensing + Attributes and commands for configuring the Nitrogen Dioxide concentration and reporting concentration measurements. + 0x0413 + NITROGEN_DIOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER + true + true + measured value + + min measured value + + max measured value + + tolerance + + + + Oxygen Concentration Measurement + Measurement & Sensing + Attributes and commands for configuring the Oxygen concentration and reporting concentration measurements. + 0x0414 + OXYGEN_CONCENTRATION_MEASUREMENT_CLUSTER + true + true + measured value + + min measured value + + max measured value + + tolerance + + + + Ozone Concentration Measurement + Measurement & Sensing + Attributes and commands for configuring the Ozone concentration and reporting concentration measurements. + 0x0415 + OZONE_CONCENTRATION_MEASUREMENT_CLUSTER + true + true + measured value + + min measured value + + max measured value + + tolerance + + + + Sulfur Dioxide Concentration Measurement + Measurement & Sensing + Attributes and commands for configuring the Sulphur Dioxide concentration and reporting concentration measurements. + 0x0416 + SULFUR_DIOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER + true + true + measured value + + min measured value + + max measured value + + tolerance + + + + Dissolved Oxygen Concentration Measurement + Measurement & Sensing + Attributes and commands for configuring the Dissolved Oxygen concentration and reporting concentration measurements. + 0x0417 + DISSOLVED_OXYGEN_CONCENTRATION_MEASUREMENT_CLUSTER + true + true + measured value + + min measured value + + max measured value + + tolerance + + + + Bromate Concentration Measurement + Measurement & Sensing + Attributes and commands for configuring the Bromate concentration, and reporting concentration measurements. + 0x0418 + BROMATE_CONCENTRATION_MEASUREMENT_CLUSTER + true + true + measured value + + min measured value + + max measured value + + tolerance + + + + Chloramines Concentration Measurement + Measurement & Sensing + Attributes and commands for configuring the Chloramines concentration and reporting concentration measurements. + 0x0419 + CHLORAMINES_CONCENTRATION_MEASUREMENT_CLUSTER + true + true + measured value + + min measured value + + max measured value + + tolerance + + + + Chlorine Concentration Measurement + Measurement & Sensing + Attributes and commands for configuring the Chlorine concentration and reporting concentration measurements. + 0x041A + CHLORINE_CONCENTRATION_MEASUREMENT_CLUSTER + true + true + measured value + + min measured value + + max measured value + + tolerance + + + + Fecal coliform and E. Coli Concentration Measurement + Measurement & Sensing + Attributes and commands for configuring the Fecal coliform and E. Coli concentration and reporting concentration measurements. + 0x041B + FECAL_COLIFORM_AND_E_COLI_CONCENTRATION_MEASUREMENT_CLUSTER + true + true + measured value + + min measured value + + max measured value + + tolerance + + + + Fluoride Concentration Measurement + Measurement & Sensing + Attributes and commands for configuring the Fluoride concentration and reporting concentration measurements. + 0x041C + FLUORIDE_CONCENTRATION_MEASUREMENT_CLUSTER + true + true + measured value + + min measured value + + max measured value + + tolerance + + + + Haloacetic Acids Concentration Measurement + Measurement & Sensing + Attributes and commands for configuring the Haloacetic Acids concentration and reporting concentration measurements. + 0x041D + HALOACETIC_ACIDS_CONCENTRATION_MEASUREMENT_CLUSTER + true + true + measured value + + min measured value + + max measured value + + tolerance + + + + Total Trihalomethanes Concentration Measurement + Measurement & Sensing + Attributes and commands for configuring the Total Trihalomethanes concentration and reporting concentration measurements. + 0x041E + TOTAL_TRIHALOMETHANES_CONCENTRATION_MEASUREMENT_CLUSTER + true + true + measured value + + min measured value + + max measured value + + tolerance + + + + Total Coliform Bacteria Concentration Measurement + Measurement & Sensing + Attributes and commands for configuring the Total Coliform Bacteria concentration and reporting concentration measurements. + 0x041F + TOTAL_COLIFORM_BACTERIA_CONCENTRATION_MEASUREMENT_CLUSTER + true + true + measured value + + min measured value + + max measured value + + tolerance + + + + Turbidity Concentration Measurement + Measurement & Sensing + Attributes and commands for configuring the Turbidity concentration and reporting concentration measurements. + 0x0420 + TURBIDITY_CONCENTRATION_MEASUREMENT_CLUSTER + true + true + measured value + + min measured value + + max measured value + + tolerance + + + + Copper Concentration Measurement + Measurement & Sensing + Attributes and commands for configuring the Copper concentration and reporting concentration measurements. + 0x0421 + COPPER_CONCENTRATION_MEASUREMENT_CLUSTER + true + true + measured value + + min measured value + + max measured value + + tolerance + + + + Lead Concentration Measurement + Measurement & Sensing + Attributes and commands for configuring the Lead concentration and reporting concentration measurements. + 0x0422 + LEAD_CONCENTRATION_MEASUREMENT_CLUSTER + true + true + measured value + + min measured value + + max measured value + + tolerance + + + + Manganese Concentration Measurement + Measurement & Sensing + Attributes and commands for configuring the Manganese concentration and reporting concentration measurements. + 0x0423 + MANGANESE_CONCENTRATION_MEASUREMENT_CLUSTER + true + true + measured value + + min measured value + + max measured value + + tolerance + + + + Sulfate Concentration Measurement + Measurement & Sensing + Attributes and commands for configuring the Sulfate concentration and reporting concentration measurements. + 0x0424 + SULFATE_CONCENTRATION_MEASUREMENT_CLUSTER + true + true + measured value + + min measured value + + max measured value + + tolerance + + + + Bromodichloromethane Concentration Measurement + Measurement & Sensing + Attributes and commands for configuring the Bromodichloromethane concentration and reporting concentration measurements. + 0x0425 + BROMODICHLOROMETHANE_CONCENTRATION_MEASUREMENT_CLUSTER + true + true + measured value + + min measured value + + max measured value + + tolerance + + + + Bromoform Concentration Measurement + Measurement & Sensing + Attributes and commands for configuring the Bromoform concentration and reporting concentration measurements. + 0x0426 + BROMOFORM_CONCENTRATION_MEASUREMENT_CLUSTER + true + true + measured value + + min measured value + + max measured value + + tolerance + + + + Chlorodibromomethane Concentration Measurement + Measurement & Sensing + Attributes and commands for configuring the Chlorodibromomethane concentration and reporting concentration measurements. + 0x0427 + CHLORODIBROMOMETHANE_CONCENTRATION_MEASUREMENT_CLUSTER + true + true + measured value + + min measured value + + max measured value + + tolerance + + + + Chloroform Concentration Measurement + Measurement & Sensing + Attributes and commands for configuring the Chloroform concentration and reporting concentration measurements. + 0x0428 + CHLOROFORM_CONCENTRATION_MEASUREMENT_CLUSTER + true + true + measured value + + min measured value + + max measured value + + tolerance + + + + Sodium Concentration Measurement + Measurement & Sensing + Attributes and commands for configuring the Sodium concentration and reporting concentration measurements. + 0x0429 + SODIUM_CONCENTRATION_MEASUREMENT_CLUSTER + true + true + measured value + + min measured value + + max measured value + + tolerance + + + + IAS Zone + Security & Safety + Attributes and commands for IAS security zone devices. + 0x0500 + IAS_ZONE_CLUSTER + true + true + zone state + zone type + zone status + IAS CIE address + Zone ID + Number of Zone Sensitivity Levels Supported + Current Zone Sensitivity Level + + + Command description for zoneEnrollResponse + + + + + + + Used to tell the IAS Zone server to commence normal operation mode + + + + + Certain IAS Zone servers may have operational configurations that could be configured OTA or locally on the device. This command enables them to be remotely placed into a test mode so that the user or installer may configure their field of view, sensitivity, and other operational parameters. + + + + + + + Command description for zoneStatusChangeNotification + + + + + + + + + Command description for zoneEnrollRequest + + + + + + + Confirms that the IAS Zone server has commenced normal operation mode. + + + + + Confirms that the IAS Zone server has commenced test mode and that the IAS Zone client should treat any Zone Status Change Notification commands received from the sending IAS Zone server as being in response to test events. + + + + + IAS ACE + Security & Safety + Attributes and commands for IAS Ancillary Control Equipment. + 0x0501 + IAS_ACE_CLUSTER + true + true + + + Command description for Arm + + + + + + + + Command description for Bypass + + + + + + + + Command description for Emergency + + + + + Command description for Fire + + + + + Command description for Panic + + + + + Command description for GetZoneIdMap + + + + + Command description for GetZoneInformation + + + + + + Used by the ACE client to request an update to the status of the ACE server + + + + + Used by the ACE client to retrieve the bypassed zones + + + + + Used by the ACE client to request an update to the zone status of the ACE server + + + + + + + + + Command description for ArmResponse + + + + + + Command description for GetZoneIdMapResponse + + + + + + + + + + + + + + + + + + + + + Command description for GetZoneInformationResponse + + + + + + + + + This command updates ACE clients in the system of changes to zone status recorded by the ACE server (e.g., IAS CIE device). + + + + + + + + + This command updates ACE clients in the system of changes to panel status recorded by the ACE server (e.g., IAS CIE device). + + + + + + + + + Command updates requesting IAS ACE clients in the system of changes to the security panel status recorded by the ACE server. + + + + + + + + + Sets the list of bypassed zones on the IAS ACE client + + + + + + + Provides the response of the security panel to the request from the IAS ACE client to bypass zones via a Bypass command. + + + + + + + This command updates requesting IAS ACE clients in the system of changes to the IAS Zone server statuses recorded by the ACE server (e.g., IAS CIE device). + + + + + + + + IAS WD + Security & Safety + Attributes and commands for IAS Warning Devices. + 0x0502 + IAS_WD_CLUSTER + true + true + max duration + + + Command description for StartWarning + + + + + + + + + Command description for Squawk + + + + + + Door Lock + Closures + Provides an interface into a generic way to secure a door. + 0x0101 + DOOR_LOCK_CLUSTER + true + true + lock state + lock type + actuator enabled + door state + door open events + door closed events + open period + num lock records supported + num total users supported + num PIN users supported + num RFID users supported + num weekday schedules supported per user + num yearday schedules supported per user + num holiday schedules supported per user + max pin length + min pin length + max rfid code length + min rfid code length + enable logging + language + led settings + auto relock time + sound volume + operating mode + supported operating modes + default configuration register + enable local programming + enable one touch locking + enable inside status led + enable privacy mode button + wrong code entry limit + user code temporary disable time + send pin over the air + require pin for rf operation + zigbee security level + alarm mask + keypad operation event mask + RF operation event mask + manual operation event mask + rfid operation event mask + keypad programming event mask + rf programming event mask + rfid programming event mask + + + Locks the door + + + + + + Unlocks the door + + + + + + Toggles the door lock from its current state to the opposite state locked or unlocked. + + + + + + Unlock the door with a timeout. When the timeout expires, the door will automatically re-lock. + + + + + + + Retrieve a log record at a specified index. + + + + + + Set the PIN for a specified user id. + + + + + + + + + Retrieve PIN information for a user with a specific user ID. + + + + + + Clear the PIN for a user with a specific user ID + + + + + + Clear all PIN codes on the lock for all users. + + + + + Set the status value for a specified user ID. + + + + + + + Retrieve the status byte for a specific user. + + + + + + Set the schedule of days during the week that the associated user based on the user ID will have access to the lock and will be able to operate it. + + + + + + + + + + + + Retrieve a weekday schedule for doorlock user activation for a specific schedule id and user id. + + + + + + + Clear a weekday schedule for doorlock user activation for a specific schedule id and user id. + + + + + + + Set a door lock user id activation schedule according to a specific absolute local start and end time + + + + + + + + + Retrieve a yearday schedule for a specific scheduleId and userId + + + + + + + Clear a yearday schedule for a specific scheduleId and userId + + + + + + + Set the holiday schedule for a specific user + + + + + + + + + Retrieve a holiday schedule for a specific scheduleId + + + + + + Clear a holiday schedule for a specific scheduleId + + + + + + Set the type value for a user based on user ID. + + + + + + + Retrieve the type for a specific user based on the user ID. + + + + + + Set the PIN for a specified user id. + + + + + + + + + Retrieve RFID ID information for a user with a specific user ID. + + + + + + Clear the RFID ID for a user with a specific user ID + + + + + + Clear all RFID ID codes on the lock for all users. + + + + + Indicates lock success or failure + + + + + + Indicates unlock success or failure + + + + + + Response provided to the toggle command, indicates whether the toggle was successful or not. + + + + + + Response provided to unlock with specific timeout. This command indicates whether the unlock command was successful or not. + + + + + + Returns the specific log record requested. + + + + + + + + + + + + Indicates whether the setting of the PIN was successful or not. + + + + + + Returns the PIN requested according to the user ID passed. + + + + + + + + + Returns success or failure depending on whether the PIN was cleared or not. + + + + + + Returns success or failure depending on whether the PINs were cleared or not. + + + + + + Returns success or failure depending on whether the user status was set or not. + + + + + + Returns the user status. + + + + + + + Returns the status of setting the weekday schedule + + + + + + Returns the weekday schedule requested. + + + + + + + + + + + + + Returns the status of clearing the weekday schedule + + + + + + Returns success or failure depending on whether the yearday schedule was set or not. + + + + + + Returns the yearday schedule requested + + + + + + + + + + Returns success or failure depending on whether the yearday schedule was removed or not. + + + + + + Returns success or failure depending on whether the holiday schedule was set or not. + + + + + + Returns the holiday schedule requested + + + + + + + + + + Returns success or failure depending on whether the holiday schedule was removed or not. + + + + + + returns success or failure depending on whether the user type was set or not. + + + + + + Returns the user type for the user ID requested. + + + + + + + Indicates whether the setting of the RFID ID was successful or not. + + + + + + Returns the RFID ID requested according to the user ID passed. + + + + + + + + + Returns success or failure depending on whether the RFID ID was cleared or not. + + + + + + Returns success or failure depending on whether the RFID IDs were cleared or not. + + + + + + Indicates that an operation event has taken place. Includes the associated event information. + + + + + + + + + + + Indicates that a programming event has taken place. Includes the associated programming event information. + + + + + + + + + + + + + Window Covering + Closures + Provides an interface for controlling and adjusting automatic window coverings. + 0x0102 + WINDOW_COVERING_CLUSTER + true + true + window covering type + physical closed limit - lift + physical closed limit - tilt + current position - lift + current position - tilt + number of actuations - lift + number of actuations - tilt + config status + current position lift percentage + current position tilt percentage + installed open limit - lift + installed closed limit - lift + installed open limit - tilt + installed closed limit - tilt + velocity - lift + acceleration time - lift + deceleration time - lift + mode + intermediate setpoints - lift + intermediate setpoints - tilt + + + Moves window covering to InstalledOpenLimit - Lift and InstalledOpenLimit - Tilt + + + + + Moves window covering to InstalledClosedLimit - Lift and InstalledCloseLimit - Tilt + + + + + Stop any adjusting of window covering + + + + + Goto lift value specified + + + + + + Goto lift percentage specified + + + + + + Goto tilt value specified + + + + + + Goto tilt percentage specified + + + + + + Barrier Control + Closures + This cluster provides control of a barrier (garage door). + 0x0103 + BARRIER_CONTROL_CLUSTER + true + true + barrier moving state + barrier safety status + barrier capabilities + barrier open events + barrier close events + barrier command open events + barrier command close events + barrier open period + barrier close period + barrier position + + + Command to instruct a barrier to go to a percent open state. + + + + + + Command that instructs the barrier to stop moving. + + + + + Appliance Control + General + This cluster provides an interface to remotely control and to program household appliances. + 0x001B + APPLIANCE_CONTROL_CLUSTER + true + true + start time + finish time + remaining time + + + This basic message is used to remotely control and to program household appliances. + + + + + + This basic message is used to retrieve Household Appliances status. + + + + + This basic message is used to set appliance functions, i.e. information regarding the execution of an appliance cycle. Condition parameters such as start time or finish time information could be provided through this command. + + + + + + + + This command shall be used to resume the normal behavior of a household appliance being in pause mode after receiving a Overload Pause command. + + + + + This command shall be used to pause the household appliance as a consequence of an imminent overload event. + + + + + This basic message is used to send warnings the household appliance as a consequence of a possible overload event, or the notification of the end of the warning state. + + + + + + This command shall be used to return household appliance status, according to Appliance Status Values and Remote Enable Flags Values. + + + + + + + + + This command shall be used to return household appliance status, automatically when appliance status changes. + + + + + + + + + Power Profile + General + This cluster provides an interface for transferring power profile information from a device (e.g. Whitegood) to a controller (e.g. the Home Gateway). The Power Profile transferred can be solicited by client side (request command) or can be notified directly from the device (server side). + 0x001A + POWER_PROFILE_CLUSTER + true + true + total profile num + multiple scheduling + energy formatting + energy remote + schedule mode + + + The PowerProfileRequest Command is generated by a device supporting the client side of the Power Profile cluster in order to request the Power Profile of a server device. + + + + + + The PowerProfileStateRequest Command is generated in order to retrieve the identifiers of current Power Profiles. + + + + + The GetPowerProfilePriceResponse command allows a device (client) to communicate the cost associated to the selected Power Profile to another device (server) requesting it. + + + + + + + + + The GetOverallSchedulePriceResponse command allows a device (client) to communicate the overall cost associated to all Power Profiles scheduled to another device (server) requesting it. + + + + + + + + The EnergyPhasesScheduleNotification Command is generated by a device supporting the client side of the Power Profile cluster in order to schedule the start of the selected Power Profile and its phases. + + + + + + + + This command is generated by the client side of Power Profile cluster as a reply to the EnergyPhasesScheduleRequest command. + + + + + + + + The PowerProfileScheduleConstraintsRequest Command is generated by a device supporting the client side of the Power Profile cluster in order to request the constraints -if set- of Power Profile of a client device, in order to set the proper boundaries for the scheduling when calculating the schedules. + + + + + + The EnergyPhasesScheduleStateRequest Command is generated by a device supporting the client side of the Power Profile cluster to check the states of the scheduling of a power profile, which is supported in the device implementing the server side of Power Profile cluster. + + + + + + The Get Power Profile Price Extended Response command allows a device (client) to communicate the cost associated to all Power Profiles scheduled to another device (server) requesting it according to the specific options contained in the Get Power Profile Price Extended Response. + + + + + + + + + The PowerProfileNotification Command is generated by a device supporting the server side of the Power Profile cluster in order to send the information of the specific parameters (such as Peak power and others) belonging to each phase. + + + + + + + + + This command is generated by the server side of Power Profile cluster as a reply to the PowerProfileRequest command. + + + + + + + + + The PowerProfileStateResponse command allows a device (server) to communicate its current Power Profile(s) to another device (client) that previously requested them. + + + + + + + The GetPowerProfilePrice Command is generated by the server (e.g. White goods) in order to retrieve the cost associated to a specific Power profile. + + + + + + The PowerProfileStateNotification Command is generated by the server (e.g. White goods) in order to update the state of the power profile and the current energy phase. + + + + + + + The GetOverallSchedulePrice Command is generated by the server (e.g. White goods) in order to retrieve the overall cost associated to all the Power Profiles scheduled by the scheduler (the device supporting the Power Profile cluster client side) for the next 24 hours. + + + + + The EnergyPhasesScheduleRequest Command is generated by the server (e.g. White goods) in order to retrieve from the scheduler (e.g. Home Gateway) the schedule (if available) associated to the specific Power Profile carried in the payload. + + + + + + The EnergyPhasesScheduleStateResponse Command is generated by the server (e.g. White goods) in order to reply to a EnergyPhasesScheduleStateRequest command about the scheduling states that are set in the server side. + + + + + + + + The EnergyPhasesScheduleStateNotification Command is generated by the server (e.g. White goods) in order to notify (un-solicited command) a client side about the scheduling states that are set in the server side. + + + + + + + + The PowerProfileScheduleConstraintsNotification Command is generated by a device supporting the server side of the Power Profile cluster to notify the client side of this cluster about the imposed constraints and let the scheduler (i.e. the entity supporting the Power Profile cluster client side) to set the proper boundaries for the scheduling. + + + + + + + + The PowerProfileScheduleConstraintsResponse Command is generated by a device supporting the server side of the Power Profile cluster to reply to a client side of this cluster which sent a PowerProfileScheduleConstraintsRequest. + + + + + + + + The Get Power Profile Price Extended command is generated by the server (e.g., White Goods) in order to retrieve the cost associated to a specific Power profile considering specific conditions described in the option field (e.g., a specific time). + + + + + + + + Poll Control + General + This cluster provides a mechanism for the management of an end device's MAC Data Poll rate. For the purposes of this cluster, the term "poll" always refers to the sending of a MAC Data Poll from the end device to the end device's parent. + 0x0020 + POLL_CONTROL_CLUSTER + true + true + check-in interval + long poll interval + short poll interval + fast poll timeout + check in interval min + long poll interval min + fast poll timeout max + + + The Poll Control Cluster server sends out a Check-in command to the devices to which it is paired based on the server's Check-in Interval attribute. + + + + + The Check-in Response is sent in response to the receipt of a Check-in command. + + + + + + + The Fast Poll Stop command is used to stop the fast poll mode initiated by the Check-in response. + + + + + The Set Long Poll Interval command is used to set the read only Long Poll Interval Attribute. + + + + + + The Set Short Poll Interval command is used to set the read only Short Poll Interval Attribute. + + + + + + Appliance Identification + Home Automation + Attributes and commands for determining basic information about a device and setting user device information. + 0x0B00 + APPLIANCE_IDENTIFICATION_CLUSTER + true + true + basic identification + company name + company id + brand name + brand id + model + part number + product revision + software revision + product type name + product type id + ceced specification version + + + + Meter Identification + Home Automation + This cluster provides Attributes and commands for determining advanced information about utility metering device. + 0x0B01 + METER_IDENTIFICATION_CLUSTER + true + true + company name + meter type id + data quality id + customer name + model + part number + product revision + software revision + utility name + pod + available power + power threshold + + + Appliance Events and Alert + Home Automation + Attributes and commands for transmitting or notifying the occurrence of an event, such as "temperature reached" and of an alert such as alarm, fault or warning. + 0x0B02 + APPLIANCE_EVENTS_AND_ALERT_CLUSTER + true + true + + + This basic message is used to retrieve Household Appliance current alerts. + + + + + This message is used to return household appliance current alerts. + + + + + + + This message is used to notify the current modification of warning and/or fault conditions. + + + + + + + This message is used to notify an event occurred during the normal working of the appliance. + + + + + + + Appliance Statistics + Home Automation + + This cluster provides a mechanism for the transmitting appliance statistics to a collection unit (gateway). The statistics can be in format of data logs. In case of statistic information that will not fit the single ZigBee payload, the Partition cluster should be used. + + 0x0B03 + APPLIANCE_STATISTICS_CLUSTER + true + true + log max size + log queue max size + + + The Appliance Statistics Cluster server occasionally sends out a Log Notification command to the devices to which it needs to log information related to statistics (e.g., home gateways) which implement the client side of Appliance Statistics Cluster. + + + + + + + + + The Appliance Statistics Cluster server sends out a Log Response command to respond to a Log Request command generated by the client side of the Appliance Statistics cluster. + + + + + + + + + The Log Queue Response command is generated as a response to a LogQueueRequest command in order to notify the client side of the Appliance statistics cluster about the logs stored in the server side (queue) that can be retrieved by the client side of this cluster through a LogRequest command. + + + + + + + The Appliance Statistics Cluster server sends out a Statistic Available command to notify the client side of the Appliance Statistics cluster that there are statistics that can be retrieved by using the Log Request command. + + + + + + + The Log request command is sent from a device supporting the client side of the Appliance Statistics cluster (e.g., Home Gateway) to retrieve the log from the device supporting the server side (e.g., appliance). + + + + + + The Log Queue Request command is send from a device supporting the client side of the Appliance Statistics cluster (e.g. Home Gateway) to retrieve the information about the logs inserted in the queue, from the device supporting the server side (e.g. appliance). + + + + + Electrical Measurement + Home Automation + Attributes related to the electrical properties of a device. This cluster is used by power outlets and other devices that need to provide instantaneous data as opposed to metrology data which should be retrieved from the metering cluster.. + 0x0B04 + ELECTRICAL_MEASUREMENT_CLUSTER + true + true + measurement type + dc voltage + dc voltage min + dc voltage max + dc current + dc current min + dc current max + dc power + dc power min + dc power max + dc voltage multiplier + dc voltage divisor + dc current multiplier + dc current divisor + dc power multiplier + dc power divisor + ac frequency + ac frequency min + ac frequency max + neutral current + total active power + total reactive power + total apparent power + measured 1st harmonic current + measured 3rd harmonic current + measured 5th harmonic current + measured 7th harmonic current + measured 9th harmonic current + measured 11th harmonic current + measured phase 1st harmonic current + measured phase 3rd harmonic current + measured phase 5th harmonic current + measured phase 7th harmonic current + measured phase 9th harmonic current + measured phase 11th harmonic current + ac frequency multiplier + ac frequency divisor + power multiplier + power divisor + harmonic current multiplier + phase harmonic current multiplier + instantaneous voltage + instantaneous line current + instantaneous active current + instantaneous reactive current + instantaneous power + rms voltage + rms voltage min + rms voltage max + rms current + rms current min + rms current max + active power + active power min + active power max + reactive power + apparent power + power factor + average rms voltage measurement period + average rms under voltage counter + rms extreme over voltage period + rms extreme under voltage period + rms voltage sag period + rms voltage swell period + ac voltage multiplier + ac voltage divisor + ac current multiplier + ac current divisor + ac power multiplier + ac power divisor + overload alarms mask + voltage overload + current overload + ac overload alarms mask + ac voltage overload + ac current overload + ac active power overload + ac reactive power overload + average rms over voltage + average rms under voltage + rms extreme over voltage + rms extreme under voltage + rms voltage sag + rms voltage swell + line current phase b + active current phase b + reactive current phase b + rms voltage phase b + rms voltage min phase b + rms voltage max phase b + rms current phase b + rms current min phase b + rms current max phase b + active power phase b + active power min phase b + active power max phase b + reactive power phase b + apparent power phase b + power factor phase b + average rms voltage measurement period phase b + average rms over voltage counter phase b + average rms under voltage counter phase b + rms extreme over voltage period phase b + rms extreme under voltage period phase b + rms voltage sag period phase b + rms voltage swell period phase b + line current phase c + active current phase c + reactive current phase c + rms voltage phase c + rms voltage min phase c + rms voltage max phase c + rms current phase b + rms current min phase c + rms current max phase c + active power phase c + active power min phase c + active power max phase c + reactive power phase c + apparent power phase c + power factor phase c + average rms voltage measurement period phase c + average rms over voltage counter phase c + average rms under voltage counter phase c + rms extreme over voltage period phase c + rms extreme under voltage period phase c + rms voltage sag period phase c + rms voltage swell period phase c + + + A function which returns the power profiling information requested in the GetProfileInfo command. The power profiling information consists of a list of attributes which are profiled along with the period used to profile them. + + + + + + + + + A function which returns the electricity measurement profile. The electricity measurement profile includes information regarding the amount of time used to capture data related to the flow of electricity as well as the intervals thes + + + + + + + + + + + A function which retrieves the power profiling information from the electrical measurement server. + + + + + A function which retrieves an electricity measurement profile from the electricity measurement server for a specific attribute Id requested. + + + + + + + + Diagnostics + Home Automation + Attributes related to the gathering of diagnostic information from a stack. + 0x0B05 + DIAGNOSTICS_CLUSTER + true + true + number of resets + persistent memory writes + mac rx broadcast + mac tx broadcast + mac rx unicast + mac tx unicast + mac tx unicast retry + mac tx unicast fail + aps rx broadcast + aps tx broadcast + aps rx unicast + aps unicast success + aps tx unicast retries + aps tx unicast failures + route discovery initiated + neighbor added + neighbor moved + neighbor stale + join indication + child moved + network frame control failure + aps frame control failure + aps unauthorized key + network decryption failure + aps decryption failure + packet buffer allocation failures + relayed unicasts + phy to mac queue limit reached + packet validate drop count + average mac retry per aps message sent + last message lqi + last message rssi + + diff --git a/src/app/zap-templates/zcl/data-model/silabs/ha.xml b/src/app/zap-templates/zcl/data-model/silabs/ha.xml new file mode 100644 index 00000000000000..cf654f45ad800f --- /dev/null +++ b/src/app/zap-templates/zcl/data-model/silabs/ha.xml @@ -0,0 +1,2537 @@ + + + + + + + + + + + + + + + + Shade Configuration + Closures + Attributes and commands for configuring a shade. + 0x0100 + SHADE_CONFIG_CLUSTER + true + true + physical closed limit + + motor step size + + status + + closed limit + + mode + + + + Pump Configuration and Control + HVAC + An interface for configuring and controlling pumps. + 0x0200 + PUMP_CONFIG_CONTROL_CLUSTER + true + true + max pressure + max speed + max flow + min const pressure + max const pressure + min comp pressure + max comp pressure + min const speed + max const speed + min const flow + max const flow + min const temp + max const temp + pump status + effective operation mode + effective control mode + capacity + speed + lifetime running hours + power + lifetime energy consumed + operation mode + control mode + alarm mask + + + + Thermostat + HVAC + An interface for configuring and controlling the functionality of a thermostat. + 0x0201 + THERMOSTAT_CLUSTER + true + true + + local temperature + outdoor temperature + occupancy + + abs min heat setpoint limit + abs max heat setpoint limit + abs min cool setpoint limit + abs max cool setpoint limit + pi cooling demand + pi heating demand + HVAC system type configuration + local temperature calibration + occupied cooling setpoint + occupied heating setpoint + unoccupied cooling setpoint + unoccupied heating setpoint + min heat setpoint limit + max heat setpoint limit + min cool setpoint limit + max cool setpoint limit + min setpoint dead band + remote sensing + control sequence of operation + system mode + alarm mask + + thermostat running mode + start of week + number of weekly transitions + number of daily transitions + temperature setpoint hold + temperature setpoint hold duration + thermostat programming operation mode + hvac relay state + setpoint change source + setpoint change amount + setpoint change source timestamp + ac type + ac capacity + ac refrigerant type + ac compressor + ac error code + ac louver position + ac coil temperature + ac capacity format + + + Command description for SetpointRaiseLower + + + + + + + Command description for SetWeeklySchedule + + + + + + + + + Command description for GetWeeklySchedule + + + + + + + The Clear Weekly Schedule command is used to clear the weekly schedule. + + + + + The Get Relay Status Log command is used to query the thermostat internal relay status log. + + + + + The Current Weekly Schedule Command is sent from the server in response to the Get Weekly Schedule Command. + + + + + + + + + This command is sent from the thermostat cluster server in response to the Get Relay Status Log. + + + + + + + + + + + Fan Control + HVAC + An interface for controlling a fan in a heating/cooling system. + 0x0202 + FAN_CONTROL_CLUSTER + true + true + fan mode + + fan mode sequence + + + + Dehumidification Control + HVAC + An interface for controlling dehumidification. + 0x0203 + DEHUMID_CONTROL_CLUSTER + true + true + relative humidity + dehumidification cooling + RH dehumidification setpoint + relative humidity mode + dehumidification lockout + dehumidification hysteresis + dehumidification max cool + relative humidity display + + + Thermostat User Interface Configuration + HVAC + An interface for configuring the user interface of a thermostat (which may be remote from the thermostat). + 0x0204 + THERMOSTAT_UI_CONFIG_CLUSTER + true + true + temperature display mode + keypad lockout + schedule programming visibility + + + Color Control + Lighting + Attributes and commands for controlling the color properties of a color-capable light. + 0x0300 + COLOR_CONTROL_CLUSTER + true + true + + current hue + + current saturation + + remaining time + + current x + + current y + + drift compensation + + compensation text + + color temperature + + color mode + + color control options + + number of primaries + + primary 1 x + + primary 1 y + + primary 1 intensity + + primary 2 x + + primary 2 y + + primary 2 intensity + + primary 3 x + + primary 3 y + + primary 3 intensity + + primary 4 x + + primary 4 y + + primary 4 intensity + + primary 5 x + + primary 5 y + + primary 5 intensity + + primary 6 x + + primary 6 y + + primary 6 intensity + + white point x + + white point y + + color point r x + + color point r y + + color point r intensity + + color point g x + + color point g y + + color point g intensity + + color point b x + + color point b y + + color point b intensity + + couple color temp to level min-mireds + start up color temperature mireds + + + Move to specified hue. + + + + + + + + + + Move hue up or down at specified rate. + + + + + + + + + Step hue up or down by specified size at specified rate. + + + + + + + + + + Move to specified saturation. + + + + + + + + + Move saturation up or down at specified rate. + + + + + + + + + Step saturation up or down by specified size at specified rate. + + + + + + + + + + Move to hue and saturation. + + + + + + + + + + Move to specified color. + + + + + + + + + + Moves the color. + + + + + + + + + Steps the lighting to a specific color. + + + + + + + + + + Move to a specific color temperature. + + + + + + + + + Ballast Configuration + Lighting + Attributes and commands for configuring a lighting ballast. + 0x0301 + BALLAST_CONFIGURATION_CLUSTER + true + true + + physical min level + physical max level + ballast status + min level + max level + power on level + power on fade time + intrinsic ballast factor + ballast factor adjustment + lamp quality + lamp type + lamp manufacturer + lamp rated hours + lamp burn hours + lamp alarm mode + lamp burn hours trip point + + + Illuminance Measurement + Measurement & Sensing + Attributes and commands for configuring the measurement of illuminance, and reporting illuminance measurements. + 0x0400 + ILLUM_MEASUREMENT_CLUSTER + true + true + + measured value + + min measured value + + max measured value + + tolerance + + light sensor type + + + + Illuminance Level Sensing + Measurement & Sensing + Attributes and commands for configuring the sensing of illuminance levels, and reporting whether illuminance is above, below, or on target. + 0x0401 + ILLUM_LEVEL_SENSING_CLUSTER + true + true + level status + light sensor type + + illuminance level target + + + Temperature Measurement + Measurement & Sensing + Attributes and commands for configuring the measurement of temperature, and reporting temperature measurements. + 0x0402 + TEMP_MEASUREMENT_CLUSTER + true + true + + measured value + + min measured value + + max measured value + + tolerance + + + + Pressure Measurement + Measurement & Sensing + Attributes and commands for configuring the measurement of pressure, and reporting pressure measurements. + 0x0403 + PRESSURE_MEASUREMENT_CLUSTER + true + true + + measured value + + min measured value + + max measured value + + tolerance + + scaled value + min scaled value + max scaled value + scaled tolerance + scale + + + Flow Measurement + Measurement & Sensing + Attributes and commands for configuring the measurement of flow, and reporting flow rates. + 0x0404 + FLOW_MEASUREMENT_CLUSTER + true + true + + measured value + + min measured value + + max measured value + + tolerance + + + + Relative Humidity Measurement + Measurement & Sensing + Attributes and commands for configuring the measurement of relative humidity, and reporting relative humidity measurements. + 0x0405 + RELATIVE_HUMIDITY_MEASUREMENT_CLUSTER + true + true + + measured value + + min measured value + + max measured value + + tolerance + + + + Occupancy Sensing + Measurement & Sensing + Attributes and commands for configuring occupancy sensing, and reporting occupancy status. + 0x0406 + OCCUPANCY_SENSING_CLUSTER + true + true + + occupancy + occupancy sensor type + occupancy sensor type bitmap + PIR occupied to unoccupied delay + PIR unoccupied to occupied delay + PIR unoccupied to occupied threshold + ultrasonic occupied to unoccupied delay + ultrasonic unoccupied to occupied delay + ultrasonic unoccupied to occupied threshold + physical contact occupied to unoccupied delay + physical contact unoccupied to occupied delay + physical contact unoccupied to occupied threshold + + + Carbon Monoxide Concentration Measurement + Measurement & Sensing + Attributes and commands for configuring the measurement of carbon monoxide concentration and reporting concentration measurements. + 0x040C + CARBON_MONOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER + true + true + + measured value + + min measured value + + max measured value + + tolerance + + + + Carbon Dioxide Concentration Measurement + Measurement & Sensing + Attributes and commands for configuring the carbon diaoxide concentration and reporting concentration measurements. + 0x040D + CARBON_DIOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER + true + true + + measured value + + min measured value + + max measured value + + tolerance + + + + Ethylene Concentration Measurement + Measurement & Sensing + Attributes and commands for configuring the Ethylene concentration and reporting concentration measurements. + 0x040E + ETHYLENE_CONCENTRATION_MEASUREMENT_CLUSTER + true + true + + measured value + + min measured value + + max measured value + + tolerance + + + + Ethylene Oxide Concentration Measurement + Measurement & Sensing + Attributes and commands for configuring the Ethylene Oxide concentration and reporting concentration measurements. + 0x040F + ETHYLENE_OXIDE_CONCENTRATION_MEASUREMENT_CLUSTER + true + true + + measured value + + min measured value + + max measured value + + tolerance + + + + Hydrogen Concentration Measurement + Measurement & Sensing + Attributes and commands for configuring the Hydrogen concentration and reporting concentration measurements. + 0x0410 + HYDROGEN_CONCENTRATION_MEASUREMENT_CLUSTER + true + true + + measured value + + min measured value + + max measured value + + tolerance + + + + Hydrogen Sulphide Concentration Measurement + Measurement & Sensing + Attributes and commands for configuring the Hydrogen Sulphide concentration and reporting concentration measurements. + 0x0411 + HYDROGEN_SULPHIDE_CONCENTRATION_MEASUREMENT_CLUSTER + true + true + + measured value + + min measured value + + max measured value + + tolerance + + + + Nitric Oxide Concentration Measurement + Measurement & Sensing + Attributes and commands for configuring the Nitric Oxide concentration and reporting concentration measurements. + 0x0412 + NITRIC_OXIDE_CONCENTRATION_MEASUREMENT_CLUSTER + true + true + + measured value + + min measured value + + max measured value + + tolerance + + + + Nitrogen Dioxide Concentration Measurement + Measurement & Sensing + Attributes and commands for configuring the Nitrogen Dioxide concentration and reporting concentration measurements. + 0x0413 + NITROGEN_DIOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER + true + true + + measured value + + min measured value + + max measured value + + tolerance + + + + Oxygen Concentration Measurement + Measurement & Sensing + Attributes and commands for configuring the Oxygen concentration and reporting concentration measurements. + 0x0414 + OXYGEN_CONCENTRATION_MEASUREMENT_CLUSTER + true + true + + measured value + + min measured value + + max measured value + + tolerance + + + + Ozone Concentration Measurement + Measurement & Sensing + Attributes and commands for configuring the Ozone concentration and reporting concentration measurements. + 0x0415 + OZONE_CONCENTRATION_MEASUREMENT_CLUSTER + true + true + + measured value + + min measured value + + max measured value + + tolerance + + + + Sulfur Dioxide Concentration Measurement + Measurement & Sensing + Attributes and commands for configuring the Sulphur Dioxide concentration and reporting concentration measurements. + 0x0416 + SULFUR_DIOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER + true + true + + measured value + + min measured value + + max measured value + + tolerance + + + + Dissolved Oxygen Concentration Measurement + Measurement & Sensing + Attributes and commands for configuring the Dissolved Oxygen concentration and reporting concentration measurements. + 0x0417 + DISSOLVED_OXYGEN_CONCENTRATION_MEASUREMENT_CLUSTER + true + true + + measured value + + min measured value + + max measured value + + tolerance + + + + Bromate Concentration Measurement + Measurement & Sensing + Attributes and commands for configuring the Bromate concentration, and reporting concentration measurements. + 0x0418 + BROMATE_CONCENTRATION_MEASUREMENT_CLUSTER + true + true + + measured value + + min measured value + + max measured value + + tolerance + + + + Chloramines Concentration Measurement + Measurement & Sensing + Attributes and commands for configuring the Chloramines concentration and reporting concentration measurements. + 0x0419 + CHLORAMINES_CONCENTRATION_MEASUREMENT_CLUSTER + true + true + + measured value + + min measured value + + max measured value + + tolerance + + + + Chlorine Concentration Measurement + Measurement & Sensing + Attributes and commands for configuring the Chlorine concentration and reporting concentration measurements. + 0x041A + CHLORINE_CONCENTRATION_MEASUREMENT_CLUSTER + true + true + + measured value + + min measured value + + max measured value + + tolerance + + + + Fecal coliform and E. Coli Concentration Measurement + Measurement & Sensing + Attributes and commands for configuring the Fecal coliform and E. Coli concentration and reporting concentration measurements. + 0x041B + FECAL_COLIFORM_AND_E_COLI_CONCENTRATION_MEASUREMENT_CLUSTER + true + true + + measured value + + min measured value + + max measured value + + tolerance + + + + Fluoride Concentration Measurement + Measurement & Sensing + Attributes and commands for configuring the Fluoride concentration and reporting concentration measurements. + 0x041C + FLUORIDE_CONCENTRATION_MEASUREMENT_CLUSTER + true + true + + measured value + + min measured value + + max measured value + + tolerance + + + + Haloacetic Acids Concentration Measurement + Measurement & Sensing + Attributes and commands for configuring the Haloacetic Acids concentration and reporting concentration measurements. + 0x041D + HALOACETIC_ACIDS_CONCENTRATION_MEASUREMENT_CLUSTER + true + true + + measured value + + min measured value + + max measured value + + tolerance + + + + Total Trihalomethanes Concentration Measurement + Measurement & Sensing + Attributes and commands for configuring the Total Trihalomethanes concentration and reporting concentration measurements. + 0x041E + TOTAL_TRIHALOMETHANES_CONCENTRATION_MEASUREMENT_CLUSTER + true + true + + measured value + + min measured value + + max measured value + + tolerance + + + + Total Coliform Bacteria Concentration Measurement + Measurement & Sensing + Attributes and commands for configuring the Total Coliform Bacteria concentration and reporting concentration measurements. + 0x041F + TOTAL_COLIFORM_BACTERIA_CONCENTRATION_MEASUREMENT_CLUSTER + true + true + + measured value + + min measured value + + max measured value + + tolerance + + + + Turbidity Concentration Measurement + Measurement & Sensing + Attributes and commands for configuring the Turbidity concentration and reporting concentration measurements. + 0x0420 + TURBIDITY_CONCENTRATION_MEASUREMENT_CLUSTER + true + true + + measured value + + min measured value + + max measured value + + tolerance + + + + Copper Concentration Measurement + Measurement & Sensing + Attributes and commands for configuring the Copper concentration and reporting concentration measurements. + 0x0421 + COPPER_CONCENTRATION_MEASUREMENT_CLUSTER + true + true + + measured value + + min measured value + + max measured value + + tolerance + + + + Lead Concentration Measurement + Measurement & Sensing + Attributes and commands for configuring the Lead concentration and reporting concentration measurements. + 0x0422 + LEAD_CONCENTRATION_MEASUREMENT_CLUSTER + true + true + + measured value + + min measured value + + max measured value + + tolerance + + + + Manganese Concentration Measurement + Measurement & Sensing + Attributes and commands for configuring the Manganese concentration and reporting concentration measurements. + 0x0423 + MANGANESE_CONCENTRATION_MEASUREMENT_CLUSTER + true + true + + measured value + + min measured value + + max measured value + + tolerance + + + + Sulfate Concentration Measurement + Measurement & Sensing + Attributes and commands for configuring the Sulfate concentration and reporting concentration measurements. + 0x0424 + SULFATE_CONCENTRATION_MEASUREMENT_CLUSTER + true + true + + measured value + + min measured value + + max measured value + + tolerance + + + + Bromodichloromethane Concentration Measurement + Measurement & Sensing + Attributes and commands for configuring the Bromodichloromethane concentration and reporting concentration measurements. + 0x0425 + BROMODICHLOROMETHANE_CONCENTRATION_MEASUREMENT_CLUSTER + true + true + + measured value + + min measured value + + max measured value + + tolerance + + + + Bromoform Concentration Measurement + Measurement & Sensing + Attributes and commands for configuring the Bromoform concentration and reporting concentration measurements. + 0x0426 + BROMOFORM_CONCENTRATION_MEASUREMENT_CLUSTER + true + true + + measured value + + min measured value + + max measured value + + tolerance + + + + Chlorodibromomethane Concentration Measurement + Measurement & Sensing + Attributes and commands for configuring the Chlorodibromomethane concentration and reporting concentration measurements. + 0x0427 + CHLORODIBROMOMETHANE_CONCENTRATION_MEASUREMENT_CLUSTER + true + true + + measured value + + min measured value + + max measured value + + tolerance + + + + Chloroform Concentration Measurement + Measurement & Sensing + Attributes and commands for configuring the Chloroform concentration and reporting concentration measurements. + 0x0428 + CHLOROFORM_CONCENTRATION_MEASUREMENT_CLUSTER + true + true + + measured value + + min measured value + + max measured value + + tolerance + + + + Sodium Concentration Measurement + Measurement & Sensing + Attributes and commands for configuring the Sodium concentration and reporting concentration measurements. + 0x0429 + SODIUM_CONCENTRATION_MEASUREMENT_CLUSTER + true + true + + measured value + + min measured value + + max measured value + + tolerance + + + + IAS Zone + Security & Safety + Attributes and commands for IAS security zone devices. + 0x0500 + IAS_ZONE_CLUSTER + true + true + + zone state + zone type + zone status + IAS CIE address + Zone ID + Number of Zone Sensitivity Levels Supported + Current Zone Sensitivity Level + + + Command description for zoneEnrollResponse + + + + + + + Used to tell the IAS Zone server to commence normal operation mode + + + + + Certain IAS Zone servers may have operational configurations that could be configured OTA or locally on the device. This command enables them to be remotely placed into a test mode so that the user or installer may configure their field of view, sensitivity, and other operational parameters. + + + + + + + Command description for zoneStatusChangeNotification + + + + + + + + + Command description for zoneEnrollRequest + + + + + + + Confirms that the IAS Zone server has commenced normal operation mode. + + + + + Confirms that the IAS Zone server has commenced test mode and that the IAS Zone client should treat any Zone Status Change Notification commands received from the sending IAS Zone server as being in response to test events. + + + + + IAS ACE + Security & Safety + Attributes and commands for IAS Ancillary Control Equipment. + 0x0501 + IAS_ACE_CLUSTER + true + true + + + Command description for Arm + + + + + + + + Command description for Bypass + + + + + + + + Command description for Emergency + + + + + Command description for Fire + + + + + Command description for Panic + + + + + Command description for GetZoneIdMap + + + + + Command description for GetZoneInformation + + + + + + Used by the ACE client to request an update to the status of the ACE server + + + + + Used by the ACE client to retrieve the bypassed zones + + + + + Used by the ACE client to request an update to the zone status of the ACE server + + + + + + + + + Command description for ArmResponse + + + + + + Command description for GetZoneIdMapResponse + + + + + + + + + + + + + + + + + + + + + Command description for GetZoneInformationResponse + + + + + + + + + This command updates ACE clients in the system of changes to zone status recorded by the ACE server (e.g., IAS CIE device). + + + + + + + + + This command updates ACE clients in the system of changes to panel status recorded by the ACE server (e.g., IAS CIE device). + + + + + + + + + Command updates requesting IAS ACE clients in the system of changes to the security panel status recorded by the ACE server. + + + + + + + + + Sets the list of bypassed zones on the IAS ACE client + + + + + + + Provides the response of the security panel to the request from the IAS ACE client to bypass zones via a Bypass command. + + + + + + + This command updates requesting IAS ACE clients in the system of changes to the IAS Zone server statuses recorded by the ACE server (e.g., IAS CIE device). + + + + + + + + IAS WD + Security & Safety + Attributes and commands for IAS Warning Devices. + 0x0502 + IAS_WD_CLUSTER + true + true + + max duration + + + Command description for StartWarning + + + + + + + + + Command description for Squawk + + + + + + Door Lock + Closures + Provides an interface into a generic way to secure a door. + 0x0101 + DOOR_LOCK_CLUSTER + true + true + + lock state + lock type + actuator enabled + door state + door open events + door closed events + open period + num lock records supported + num total users supported + num PIN users supported + num RFID users supported + num weekday schedules supported per user + num yearday schedules supported per user + num holiday schedules supported per user + max pin length + min pin length + max rfid code length + min rfid code length + enable logging + language + led settings + auto relock time + sound volume + operating mode + supported operating modes + default configuration register + enable local programming + enable one touch locking + enable inside status led + enable privacy mode button + wrong code entry limit + user code temporary disable time + send pin over the air + require pin for rf operation + zigbee security level + alarm mask + keypad operation event mask + RF operation event mask + manual operation event mask + rfid operation event mask + keypad programming event mask + rf programming event mask + rfid programming event mask + + + Locks the door + + + + + + Unlocks the door + + + + + + Toggles the door lock from its current state to the opposite state locked or unlocked. + + + + + + Unlock the door with a timeout. When the timeout expires, the door will automatically re-lock. + + + + + + + Retrieve a log record at a specified index. + + + + + + Set the PIN for a specified user id. + + + + + + + + + Retrieve PIN information for a user with a specific user ID. + + + + + + Clear the PIN for a user with a specific user ID + + + + + + Clear all PIN codes on the lock for all users. + + + + + Set the status value for a specified user ID. + + + + + + + Retrieve the status byte for a specific user. + + + + + + Set the schedule of days during the week that the associated user based on the user ID will have access to the lock and will be able to operate it. + + + + + + + + + + + + Retrieve a weekday schedule for doorlock user activation for a specific schedule id and user id. + + + + + + + Clear a weekday schedule for doorlock user activation for a specific schedule id and user id. + + + + + + + Set a door lock user id activation schedule according to a specific absolute local start and end time + + + + + + + + + Retrieve a yearday schedule for a specific scheduleId and userId + + + + + + + Clear a yearday schedule for a specific scheduleId and userId + + + + + + + Set the holiday schedule for a specific user + + + + + + + + + Retrieve a holiday schedule for a specific scheduleId + + + + + + Clear a holiday schedule for a specific scheduleId + + + + + + Set the type value for a user based on user ID. + + + + + + + Retrieve the type for a specific user based on the user ID. + + + + + + Set the PIN for a specified user id. + + + + + + + + + Retrieve RFID ID information for a user with a specific user ID. + + + + + + Clear the RFID ID for a user with a specific user ID + + + + + + Clear all RFID ID codes on the lock for all users. + + + + + Indicates lock success or failure + + + + + + Indicates unlock success or failure + + + + + + Response provided to the toggle command, indicates whether the toggle was successful or not. + + + + + + Response provided to unlock with specific timeout. This command indicates whether the unlock command was successful or not. + + + + + + Returns the specific log record requested. + + + + + + + + + + + + Indicates whether the setting of the PIN was successful or not. + + + + + + Returns the PIN requested according to the user ID passed. + + + + + + + + + Returns success or failure depending on whether the PIN was cleared or not. + + + + + + Returns success or failure depending on whether the PINs were cleared or not. + + + + + + Returns success or failure depending on whether the user status was set or not. + + + + + + Returns the user status. + + + + + + + Returns the status of setting the weekday schedule + + + + + + Returns the weekday schedule requested. + + + + + + + + + + + + + Returns the status of clearing the weekday schedule + + + + + + Returns success or failure depending on whether the yearday schedule was set or not. + + + + + + Returns the yearday schedule requested + + + + + + + + + + Returns success or failure depending on whether the yearday schedule was removed or not. + + + + + + Returns success or failure depending on whether the holiday schedule was set or not. + + + + + + Returns the holiday schedule requested + + + + + + + + + + Returns success or failure depending on whether the holiday schedule was removed or not. + + + + + + returns success or failure depending on whether the user type was set or not. + + + + + + Returns the user type for the user ID requested. + + + + + + + Indicates whether the setting of the RFID ID was successful or not. + + + + + + Returns the RFID ID requested according to the user ID passed. + + + + + + + + + Returns success or failure depending on whether the RFID ID was cleared or not. + + + + + + Returns success or failure depending on whether the RFID IDs were cleared or not. + + + + + + Indicates that an operation event has taken place. Includes the associated event information. + + + + + + + + + + + Indicates that a programming event has taken place. Includes the associated programming event information. + + + + + + + + + + + + + Window Covering + Closures + Provides an interface for controlling and adjusting automatic window coverings. + 0x0102 + WINDOW_COVERING_CLUSTER + true + true + + window covering type + physical closed limit - lift + physical closed limit - tilt + current position - lift + current position - tilt + number of actuations - lift + number of actuations - tilt + config status + current position lift percentage + current position tilt percentage + installed open limit - lift + installed closed limit - lift + installed open limit - tilt + installed closed limit - tilt + velocity - lift + acceleration time - lift + deceleration time - lift + mode + intermediate setpoints - lift + intermediate setpoints - tilt + + + Moves window covering to InstalledOpenLimit - Lift and InstalledOpenLimit - Tilt + + + + + Moves window covering to InstalledClosedLimit - Lift and InstalledCloseLimit - Tilt + + + + + Stop any adjusting of window covering + + + + + Goto lift value specified + + + + + + Goto lift percentage specified + + + + + + Goto tilt value specified + + + + + + Goto tilt percentage specified + + + + + + Barrier Control + Closures + This cluster provides control of a barrier (garage door). + 0x0103 + BARRIER_CONTROL_CLUSTER + true + true + barrier moving state + barrier safety status + barrier capabilities + barrier open events + barrier close events + barrier command open events + barrier command close events + barrier open period + barrier close period + barrier position + + + Command to instruct a barrier to go to a percent open state. + + + + + + Command that instructs the barrier to stop moving. + + + + + Appliance Control + General + This cluster provides an interface to remotely control and to program household appliances. + 0x001B + APPLIANCE_CONTROL_CLUSTER + true + true + start time + finish time + remaining time + + + This basic message is used to remotely control and to program household appliances. + + + + + + This basic message is used to retrieve Household Appliances status. + + + + + This basic message is used to set appliance functions, i.e. information regarding the execution of an appliance cycle. Condition parameters such as start time or finish time information could be provided through this command. + + + + + + + + This command shall be used to resume the normal behavior of a household appliance being in pause mode after receiving a Overload Pause command. + + + + + This command shall be used to pause the household appliance as a consequence of an imminent overload event. + + + + + This basic message is used to send warnings the household appliance as a consequence of a possible overload event, or the notification of the end of the warning state. + + + + + + This command shall be used to return household appliance status, according to Appliance Status Values and Remote Enable Flags Values. + + + + + + + + + This command shall be used to return household appliance status, automatically when appliance status changes. + + + + + + + + + Power Profile + General + This cluster provides an interface for transferring power profile information from a device (e.g. Whitegood) to a controller (e.g. the Home Gateway). The Power Profile transferred can be solicited by client side (request command) or can be notified directly from the device (server side). + 0x001A + POWER_PROFILE_CLUSTER + true + true + total profile num + multiple scheduling + energy formatting + energy remote + schedule mode + + + The PowerProfileRequest Command is generated by a device supporting the client side of the Power Profile cluster in order to request the Power Profile of a server device. + + + + + + The PowerProfileStateRequest Command is generated in order to retrieve the identifiers of current Power Profiles. + + + + + The GetPowerProfilePriceResponse command allows a device (client) to communicate the cost associated to the selected Power Profile to another device (server) requesting it. + + + + + + + + + The GetOverallSchedulePriceResponse command allows a device (client) to communicate the overall cost associated to all Power Profiles scheduled to another device (server) requesting it. + + + + + + + + The EnergyPhasesScheduleNotification Command is generated by a device supporting the client side of the Power Profile cluster in order to schedule the start of the selected Power Profile and its phases. + + + + + + + + This command is generated by the client side of Power Profile cluster as a reply to the EnergyPhasesScheduleRequest command. + + + + + + + + The PowerProfileScheduleConstraintsRequest Command is generated by a device supporting the client side of the Power Profile cluster in order to request the constraints -if set- of Power Profile of a client device, in order to set the proper boundaries for the scheduling when calculating the schedules. + + + + + + The EnergyPhasesScheduleStateRequest Command is generated by a device supporting the client side of the Power Profile cluster to check the states of the scheduling of a power profile, which is supported in the device implementing the server side of Power Profile cluster. + + + + + + The Get Power Profile Price Extended Response command allows a device (client) to communicate the cost associated to all Power Profiles scheduled to another device (server) requesting it according to the specific options contained in the Get Power Profile Price Extended Response. + + + + + + + + + The PowerProfileNotification Command is generated by a device supporting the server side of the Power Profile cluster in order to send the information of the specific parameters (such as Peak power and others) belonging to each phase. + + + + + + + + + This command is generated by the server side of Power Profile cluster as a reply to the PowerProfileRequest command. + + + + + + + + + The PowerProfileStateResponse command allows a device (server) to communicate its current Power Profile(s) to another device (client) that previously requested them. + + + + + + + The GetPowerProfilePrice Command is generated by the server (e.g. White goods) in order to retrieve the cost associated to a specific Power profile. + + + + + + The PowerProfileStateNotification Command is generated by the server (e.g. White goods) in order to update the state of the power profile and the current energy phase. + + + + + + + The GetOverallSchedulePrice Command is generated by the server (e.g. White goods) in order to retrieve the overall cost associated to all the Power Profiles scheduled by the scheduler (the device supporting the Power Profile cluster client side) for the next 24 hours. + + + + + The EnergyPhasesScheduleRequest Command is generated by the server (e.g. White goods) in order to retrieve from the scheduler (e.g. Home Gateway) the schedule (if available) associated to the specific Power Profile carried in the payload. + + + + + + The EnergyPhasesScheduleStateResponse Command is generated by the server (e.g. White goods) in order to reply to a EnergyPhasesScheduleStateRequest command about the scheduling states that are set in the server side. + + + + + + + + The EnergyPhasesScheduleStateNotification Command is generated by the server (e.g. White goods) in order to notify (un-solicited command) a client side about the scheduling states that are set in the server side. + + + + + + + + The PowerProfileScheduleConstraintsNotification Command is generated by a device supporting the server side of the Power Profile cluster to notify the client side of this cluster about the imposed constraints and let the scheduler (i.e. the entity supporting the Power Profile cluster client side) to set the proper boundaries for the scheduling. + + + + + + + + The PowerProfileScheduleConstraintsResponse Command is generated by a device supporting the server side of the Power Profile cluster to reply to a client side of this cluster which sent a PowerProfileScheduleConstraintsRequest. + + + + + + + + The Get Power Profile Price Extended command is generated by the server (e.g., White Goods) in order to retrieve the cost associated to a specific Power profile considering specific conditions described in the option field (e.g., a specific time). + + + + + + + + Poll Control + General + This cluster provides a mechanism for the management of an end device's MAC Data Poll rate. For the purposes of this cluster, the term "poll" always refers to the sending of a MAC Data Poll from the end device to the end device's parent. + 0x0020 + POLL_CONTROL_CLUSTER + true + true + + check-in interval + long poll interval + short poll interval + fast poll timeout + check in interval min + long poll interval min + fast poll timeout max + + + The Poll Control Cluster server sends out a Check-in command to the devices to which it is paired based on the server's Check-in Interval attribute. + + + + + The Check-in Response is sent in response to the receipt of a Check-in command. + + + + + + + The Fast Poll Stop command is used to stop the fast poll mode initiated by the Check-in response. + + + + + The Set Long Poll Interval command is used to set the read only Long Poll Interval Attribute. + + + + + + The Set Short Poll Interval command is used to set the read only Short Poll Interval Attribute. + + + + + + Appliance Identification + Home Automation + Attributes and commands for determining basic information about a device and setting user device information. + 0x0B00 + APPLIANCE_IDENTIFICATION_CLUSTER + true + true + basic identification + company name + company id + brand name + brand id + model + part number + product revision + software revision + product type name + product type id + ceced specification version + + + + Meter Identification + Home Automation + This cluster provides Attributes and commands for determining advanced information about utility metering device. + 0x0B01 + METER_IDENTIFICATION_CLUSTER + true + true + + company name + meter type id + data quality id + customer name + model + part number + product revision + software revision + utility name + pod + available power + power threshold + + + Appliance Events and Alert + Home Automation + Attributes and commands for transmitting or notifying the occurrence of an event, such as "temperature reached" and of an alert such as alarm, fault or warning. + 0x0B02 + APPLIANCE_EVENTS_AND_ALERT_CLUSTER + true + true + + + This basic message is used to retrieve Household Appliance current alerts. + + + + + This message is used to return household appliance current alerts. + + + + + + + This message is used to notify the current modification of warning and/or fault conditions. + + + + + + + This message is used to notify an event occurred during the normal working of the appliance. + + + + + + + Appliance Statistics + Home Automation + + This cluster provides a mechanism for the transmitting appliance statistics to a collection unit (gateway). The statistics can be in format of data logs. In case of statistic information that will not fit the single ZigBee payload, the Partition cluster should be used. + + 0x0B03 + APPLIANCE_STATISTICS_CLUSTER + true + true + log max size + log queue max size + + + The Appliance Statistics Cluster server occasionally sends out a Log Notification command to the devices to which it needs to log information related to statistics (e.g., home gateways) which implement the client side of Appliance Statistics Cluster. + + + + + + + + + The Appliance Statistics Cluster server sends out a Log Response command to respond to a Log Request command generated by the client side of the Appliance Statistics cluster. + + + + + + + + + The Log Queue Response command is generated as a response to a LogQueueRequest command in order to notify the client side of the Appliance statistics cluster about the logs stored in the server side (queue) that can be retrieved by the client side of this cluster through a LogRequest command. + + + + + + + The Appliance Statistics Cluster server sends out a Statistic Available command to notify the client side of the Appliance Statistics cluster that there are statistics that can be retrieved by using the Log Request command. + + + + + + + The Log request command is sent from a device supporting the client side of the Appliance Statistics cluster (e.g., Home Gateway) to retrieve the log from the device supporting the server side (e.g., appliance). + + + + + + The Log Queue Request command is send from a device supporting the client side of the Appliance Statistics cluster (e.g. Home Gateway) to retrieve the information about the logs inserted in the queue, from the device supporting the server side (e.g. appliance). + + + + + Electrical Measurement + Home Automation + Attributes related to the electrical properties of a device. This cluster is used by power outlets and other devices that need to provide instantaneous data as opposed to metrology data which should be retrieved from the metering cluster.. + 0x0B04 + ELECTRICAL_MEASUREMENT_CLUSTER + true + true + + measurement type + dc voltage + dc voltage min + dc voltage max + dc current + dc current min + dc current max + dc power + dc power min + dc power max + dc voltage multiplier + dc voltage divisor + dc current multiplier + dc current divisor + dc power multiplier + dc power divisor + ac frequency + ac frequency min + ac frequency max + neutral current + total active power + total reactive power + total apparent power + measured 1st harmonic current + measured 3rd harmonic current + measured 5th harmonic current + measured 7th harmonic current + measured 9th harmonic current + measured 11th harmonic current + measured phase 1st harmonic current + measured phase 3rd harmonic current + measured phase 5th harmonic current + measured phase 7th harmonic current + measured phase 9th harmonic current + measured phase 11th harmonic current + ac frequency multiplier + ac frequency divisor + power multiplier + power divisor + harmonic current multiplier + phase harmonic current multiplier + instantaneous voltage + instantaneous line current + instantaneous active current + instantaneous reactive current + instantaneous power + rms voltage + rms voltage min + rms voltage max + rms current + rms current min + rms current max + active power + active power min + active power max + reactive power + apparent power + power factor + average rms voltage measurement period + average rms under voltage counter + rms extreme over voltage period + rms extreme under voltage period + rms voltage sag period + rms voltage swell period + ac voltage multiplier + ac voltage divisor + ac current multiplier + ac current divisor + ac power multiplier + ac power divisor + overload alarms mask + voltage overload + current overload + ac overload alarms mask + ac voltage overload + ac current overload + ac active power overload + ac reactive power overload + average rms over voltage + average rms under voltage + rms extreme over voltage + rms extreme under voltage + rms voltage sag + rms voltage swell + line current phase b + active current phase b + reactive current phase b + rms voltage phase b + rms voltage min phase b + rms voltage max phase b + rms current phase b + rms current min phase b + rms current max phase b + active power phase b + active power min phase b + active power max phase b + reactive power phase b + apparent power phase b + power factor phase b + average rms voltage measurement period phase b + average rms over voltage counter phase b + average rms under voltage counter phase b + rms extreme over voltage period phase b + rms extreme under voltage period phase b + rms voltage sag period phase b + rms voltage swell period phase b + line current phase c + active current phase c + reactive current phase c + rms voltage phase c + rms voltage min phase c + rms voltage max phase c + rms current phase b + rms current min phase c + rms current max phase c + active power phase c + active power min phase c + active power max phase c + reactive power phase c + apparent power phase c + power factor phase c + average rms voltage measurement period phase c + average rms over voltage counter phase c + average rms under voltage counter phase c + rms extreme over voltage period phase c + rms extreme under voltage period phase c + rms voltage sag period phase c + rms voltage swell period phase c + + + A function which returns the power profiling information requested in the GetProfileInfo command. The power profiling information consists of a list of attributes which are profiled along with the period used to profile them. + + + + + + + + + A function which returns the electricity measurement profile. The electricity measurement profile includes information regarding the amount of time used to capture data related to the flow of electricity as well as the intervals thes + + + + + + + + + + + A function which retrieves the power profiling information from the electrical measurement server. + + + + + A function which retrieves an electricity measurement profile from the electricity measurement server for a specific attribute Id requested. + + + + + + + + Diagnostics + Home Automation + Attributes related to the gathering of diagnostic information from a stack. + 0x0B05 + DIAGNOSTICS_CLUSTER + true + true + + number of resets + persistent memory writes + mac rx broadcast + mac tx broadcast + mac rx unicast + mac tx unicast + mac tx unicast retry + mac tx unicast fail + aps rx broadcast + aps tx broadcast + aps rx unicast + aps unicast success + aps tx unicast retries + aps tx unicast failures + route discovery initiated + neighbor added + neighbor moved + neighbor stale + join indication + child moved + network frame control failure + aps frame control failure + aps unauthorized key + network decryption failure + aps decryption failure + packet buffer allocation failures + relayed unicasts + phy to mac queue limit reached + packet validate drop count + average mac retry per aps message sent + last message lqi + last message rssi + + diff --git a/src/app/zap-templates/zcl/data-model/silabs/hc-devices.xml b/src/app/zap-templates/zcl/data-model/silabs/hc-devices.xml new file mode 100644 index 00000000000000..68239a981d71ac --- /dev/null +++ b/src/app/zap-templates/zcl/data-model/silabs/hc-devices.xml @@ -0,0 +1,545 @@ + + + + + HC-datacollectionunit + HC + HC Data Collection Unit + Coordinator + 0x0108 + 0x0000 + + Basic + Identify + Generic Tunnel + 11073 Protocol Tunnel + Power Configuration + Alarms + Time + + + + HC-genericmultifunctiondevice + HC + HC Generic Multifunction Healthcare Device + Coordinator + 0x0108 + 0x0f00 + + Basic + Identify + Generic Tunnel + 11073 Protocol Tunnel + Power Configuration + Alarms + Time + + + + HC-pulseoximeter + HC + HC Pulse Oximeter + Coordinator + 0x0108 + 0x1004 + + Basic + Identify + Generic Tunnel + 11073 Protocol Tunnel + Power Configuration + Alarms + Time + + + + HC-ecg + HC + HC ECG + Coordinator + 0x0108 + 0x1006 + + Basic + Identify + Generic Tunnel + 11073 Protocol Tunnel + Power Configuration + Alarms + Time + + + + HC-bloodpressuremeter + HC + HC Blood Pressure Meter + Coordinator + 0x0108 + 0x1007 + + Basic + Identify + Generic Tunnel + 11073 Protocol Tunnel + Power Configuration + Alarms + Time + + + + HC-thermometer + HC + HC Thermometer + Coordinator + 0x0108 + 0x1008 + + Basic + Identify + Generic Tunnel + 11073 Protocol Tunnel + Power Configuration + Alarms + Time + + + + HC-weightscale + HC + HC Weight Scale + Coordinator + 0x0108 + 0x100f + + Basic + Identify + Generic Tunnel + 11073 Protocol Tunnel + Power Configuration + Alarms + Time + + + + HC-glucosemeter + HC + HC Glucose Meter + Coordinator + 0x0108 + 0x1011 + + Basic + Identify + Generic Tunnel + 11073 Protocol Tunnel + Power Configuration + Alarms + Time + + + + HC-inr + HC + HC INR + Coordinator + 0x0108 + 0x1012 + + Basic + Identify + Generic Tunnel + 11073 Protocol Tunnel + Power Configuration + Alarms + Time + + + + HC-insulinpump + HC + HC Insulin Pump + Coordinator + 0x0108 + 0x1013 + + Basic + Identify + Generic Tunnel + 11073 Protocol Tunnel + Power Configuration + Alarms + Time + + + + HC-peakflowmeter + HC + HC Peak Flow Meter + Coordinator + 0x0108 + 0x1015 + + Basic + Identify + Generic Tunnel + 11073 Protocol Tunnel + Power Configuration + Alarms + Time + + + + HC-cardiovascularfitnessandactivitymonitor + HC + HC Cardiovascular Fitness and Activity Monitor + Coordinator + 0x0108 + 0x1029 + + Basic + Identify + Generic Tunnel + 11073 Protocol Tunnel + Power Configuration + Alarms + Time + + + + HC-strengthfitnessequipment + HC + HC Strength and Fitness Equipment + Coordinator + 0x0108 + 0x102a + + Basic + Identify + Generic Tunnel + 11073 Protocol Tunnel + Power Configuration + Alarms + Time + + + + HC-physicalactivitymonitor + HC + HC Physical Activity Monitor + Coordinator + 0x0108 + 0x102b + + Basic + Identify + Generic Tunnel + 11073 Protocol Tunnel + Power Configuration + Alarms + Time + + + + HC-stepcounter + HC + HC Step Counter + Coordinator + 0x0108 + 0x1068 + + Basic + Identify + Generic Tunnel + 11073 Protocol Tunnel + Power Configuration + Alarms + Time + + + + HC-ilah + HC + HC ILAH + Coordinator + 0x0108 + 0x1047 + + Basic + Identify + Generic Tunnel + 11073 Protocol Tunnel + Power Configuration + Alarms + Time + + + + HC-adherencemonitor + HC + HC Adherence Monitor + Coordinator + 0x0108 + 0x1048 + + Basic + Identify + Generic Tunnel + 11073 Protocol Tunnel + Power Configuration + Alarms + Time + + + + HC-fallsensor + HC + HC Fall Sensor + Coordinator + 0x0108 + 0x1075 + + Basic + Identify + Generic Tunnel + 11073 Protocol Tunnel + Power Configuration + Alarms + Time + + + + HC-perssensor + HC + HC PERS Sensor + Coordinator + 0x0108 + 0x1076 + + Basic + Identify + Generic Tunnel + 11073 Protocol Tunnel + Power Configuration + Alarms + Time + + + + HC-smokesensor + HC + HC Smoke Sensor + Coordinator + 0x0108 + 0x1077 + + Basic + Identify + Generic Tunnel + 11073 Protocol Tunnel + Power Configuration + Alarms + Time + + + + HC-cosensor + HC + HC CO Sensor + Coordinator + 0x0108 + 0x1078 + + Basic + Identify + Generic Tunnel + 11073 Protocol Tunnel + Power Configuration + Alarms + Time + + + + HC-watersensor + HC + HC Water Sensor + Coordinator + 0x0108 + 0x1079 + + Basic + Identify + Generic Tunnel + 11073 Protocol Tunnel + Power Configuration + Alarms + Time + + + + HC-gassensor + HC + HC Gas Sensor + Coordinator + 0x0108 + 0x107a + + Basic + Identify + Generic Tunnel + 11073 Protocol Tunnel + Power Configuration + Alarms + Time + + + + HC-motionsensor + HC + HC Motion Sensor + Coordinator + 0x0108 + 0x107b + + Basic + Identify + Generic Tunnel + 11073 Protocol Tunnel + Power Configuration + Alarms + Time + + + + HC-propertyexitsensor + HC + HC Property Exit Sensor + Coordinator + 0x0108 + 0x107c + + Basic + Identify + Generic Tunnel + 11073 Protocol Tunnel + Power Configuration + Alarms + Time + + + + HC-enuresissensor + HC + HC Enuresis Sensor + Coordinator + 0x0108 + 0x107d + + Basic + Identify + Generic Tunnel + 11073 Protocol Tunnel + Power Configuration + Alarms + Time + + + + HC-contactclosuresensor + HC + HC Contact Closure Sensor + Coordinator + 0x0108 + 0x107e + + Basic + Identify + Generic Tunnel + 11073 Protocol Tunnel + Power Configuration + Alarms + Time + + + + HC-usagesensor + HC + HC Usage Sensor + Coordinator + 0x0108 + 0x107f + + Basic + Identify + Generic Tunnel + 11073 Protocol Tunnel + Power Configuration + Alarms + Time + + + + HC-switchusesensor + HC + HC Switch Use Sensor + Coordinator + 0x0108 + 0x1080 + + Basic + Identify + Generic Tunnel + 11073 Protocol Tunnel + Power Configuration + Alarms + Time + + + + HC-dosagesensor + HC + HC Dosage Sensor + Coordinator + 0x0108 + 0x1081 + + Basic + Identify + Generic Tunnel + 11073 Protocol Tunnel + Power Configuration + Alarms + Time + + + + HC-temperaturesensor + HC + HC Temperature Sensor + Coordinator + 0x0108 + 0x1082 + + Basic + Identify + Generic Tunnel + 11073 Protocol Tunnel + Power Configuration + Alarms + Time + + + diff --git a/src/app/zap-templates/zcl/data-model/silabs/hc.xml b/src/app/zap-templates/zcl/data-model/silabs/hc.xml new file mode 100644 index 00000000000000..e265b3292796e6 --- /dev/null +++ b/src/app/zap-templates/zcl/data-model/silabs/hc.xml @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + 11073 Protocol Tunnel + HC + Attributes and commands for the 11073 protocol tunnel used for ZigBee Health Care. + 0x0614 + 11073_PROTOCOL_TUNNEL_CLUSTER + true + true + device id list + manager target + manager endpoint + connected + preemptible + idle timeout + + + This command is generated when an 11073 network layer wishes to transfer an 11073 APDU across a ZigBee tunnel to another 11073 network layer. + + + + + + This command is generated when an Health Care client wishes to connect to a Health Care server for the purposes of transmitting 11073 APDUs across the 11073 tunnel. + + + + + + + + + This command is generated when an Health Care client wishes to disconnect from a Health Care server. + + + + + + Generated in response to requests related to connection or any event that causes the tunnel to become disconnected. + + + + + diff --git a/src/app/zap-templates/zcl/data-model/silabs/lo-devices.xml b/src/app/zap-templates/zcl/data-model/silabs/lo-devices.xml new file mode 100644 index 00000000000000..5587246803a1df --- /dev/null +++ b/src/app/zap-templates/zcl/data-model/silabs/lo-devices.xml @@ -0,0 +1,1725 @@ + + + + + LO-onofflight + LO + LO On/Off Light + Router + 0x0104 + 0x0100 + + + VERSION + APPLICATION_VERSION + STACK_VERSION + HW_VERSION + MANUFACTURER_NAME + MODEL_IDENTIFIER + DATE_CODE + POWER_SOURCE + GENERIC_DEVICE_CLASS + GENERIC_DEVICE_TYPE + PRODUCT_CODE + PRODUCT_URL + SW_BUILD_ID + + + IDENTIFY_TIME + Identify + IdentifyQuery + TriggerEffect + + + GROUP_NAME_SUPPORT + AddGroup + ViewGroup + GetGroupMembership + RemoveGroup + RemoveAllGroups + AddGroupIfIdentifying + + + SCENE_COUNT + CURRENT_SCENE + CURRENT_GROUP + SCENE_VALID + SCENE_NAME_SUPPORT + AddScene + ViewScene + RemoveScene + RemoveAllScenes + StoreScene + RecallScene + GetSceneMembership + EnhancedAddScene + EnhancedViewScene + CopyScene + + + ON_OFF + GLOBAL_SCENE_CONTROL + ON_TIME + OFF_WAIT_TIME + START_UP_ON_OFF + Off + On + Toggle + OffWithEffect + OnWithRecallGlobalScene + OnWithTimedOff + + + + ScanRequest + DeviceInformationRequest + IdentifyRequest + ResetToFactoryNewRequest + NetworkStartRequest + NetworkJoinRouterRequest + NetworkJoinEndDeviceRequest + NetworkUpdateRequest + GetGroupIdentifiersRequest + GetEndpointListRequest + ScanResponse + DeviceInformationResponse + NetworkStartResponse + NetworkJoinRouterResponse + NetworkJoinEndDeviceResponse + EndpointInformation + GetGroupIdentifiersResponse + GetEndpointListResponse + + + + + + + LO-dimmablelight + LO + LO Dimmable Light + Router + 0x0104 + 0x0101 + + + VERSION + APPLICATION_VERSION + STACK_VERSION + HW_VERSION + MANUFACTURER_NAME + MODEL_IDENTIFIER + DATE_CODE + POWER_SOURCE + GENERIC_DEVICE_CLASS + GENERIC_DEVICE_TYPE + PRODUCT_CODE + PRODUCT_URL + SW_BUILD_ID + + + IDENTIFY_TIME + Identify + IdentifyQuery + TriggerEffect + + + GROUP_NAME_SUPPORT + AddGroup + ViewGroup + GetGroupMembership + RemoveGroup + RemoveAllGroups + AddGroupIfIdentifying + + + SCENE_COUNT + CURRENT_SCENE + CURRENT_GROUP + SCENE_VALID + SCENE_NAME_SUPPORT + AddScene + ViewScene + RemoveScene + RemoveAllScenes + StoreScene + RecallScene + GetSceneMembership + EnhancedAddScene + EnhancedViewScene + CopyScene + + + ON_OFF + GLOBAL_SCENE_CONTROL + ON_TIME + OFF_WAIT_TIME + START_UP_ON_OFF + Off + On + Toggle + OffWithEffect + OnWithRecallGlobalScene + OnWithTimedOff + + + CURRENT_LEVEL + OPTIONS + LEVEL_CONTROL_REMAINING_TIME + START_UP_CURRENT_LEVEL + MoveToLevel + Move + Step + Stop + MoveToLevelWithOnOff + MoveWithOnOff + StepWithOnOff + StopWithOnOff + + + ScanRequest + DeviceInformationRequest + IdentifyRequest + ResetToFactoryNewRequest + NetworkStartRequest + NetworkJoinRouterRequest + NetworkJoinEndDeviceRequest + NetworkUpdateRequest + GetGroupIdentifiersRequest + GetEndpointListRequest + ScanResponse + DeviceInformationResponse + NetworkStartResponse + NetworkJoinRouterResponse + NetworkJoinEndDeviceResponse + EndpointInformation + GetGroupIdentifiersResponse + GetEndpointListResponse + + + + + + + LO-colordimmablelight + LO + LO Color Dimmable Light + Router + 0x0104 + 0x0102 + + + VERSION + APPLICATION_VERSION + STACK_VERSION + HW_VERSION + MANUFACTURER_NAME + MODEL_IDENTIFIER + DATE_CODE + POWER_SOURCE + GENERIC_DEVICE_CLASS + GENERIC_DEVICE_TYPE + PRODUCT_CODE + PRODUCT_URL + SW_BUILD_ID + + + IDENTIFY_TIME + Identify + IdentifyQuery + TriggerEffect + + + GROUP_NAME_SUPPORT + AddGroup + ViewGroup + GetGroupMembership + RemoveGroup + RemoveAllGroups + AddGroupIfIdentifying + + + SCENE_COUNT + CURRENT_SCENE + CURRENT_GROUP + SCENE_VALID + SCENE_NAME_SUPPORT + AddScene + ViewScene + RemoveScene + RemoveAllScenes + StoreScene + RecallScene + GetSceneMembership + EnhancedAddScene + EnhancedViewScene + CopyScene + + + ON_OFF + GLOBAL_SCENE_CONTROL + ON_TIME + OFF_WAIT_TIME + START_UP_ON_OFF + Off + On + Toggle + OffWithEffect + OnWithRecallGlobalScene + OnWithTimedOff + + + CURRENT_LEVEL + OPTIONS + LEVEL_CONTROL_REMAINING_TIME + START_UP_CURRENT_LEVEL + MoveToLevel + Move + Step + Stop + MoveToLevelWithOnOff + MoveWithOnOff + StepWithOnOff + StopWithOnOff + + + COLOR_CONTROL_CURRENT_HUE + COLOR_CONTROL_CURRENT_SATURATION + COLOR_CONTROL_REMAINING_TIME + COLOR_CONTROL_CURRENT_X + COLOR_CONTROL_CURRENT_Y + COLOR_CONTROL_COLOR_MODE + COLOR_CONTROL_OPTIONS + COLOR_CONTROL_NUMBER_OF_PRIMARIES + COLOR_CONTROL_PRIMARY_1_X + COLOR_CONTROL_PRIMARY_1_Y + COLOR_CONTROL_PRIMARY_1_INTENSITY + COLOR_CONTROL_PRIMARY_2_X + COLOR_CONTROL_PRIMARY_2_Y + COLOR_CONTROL_PRIMARY_2_INTENSITY + COLOR_CONTROL_PRIMARY_3_X + COLOR_CONTROL_PRIMARY_3_Y + COLOR_CONTROL_PRIMARY_3_INTENSITY + COLOR_CONTROL_PRIMARY_4_X + COLOR_CONTROL_PRIMARY_4_Y + COLOR_CONTROL_PRIMARY_4_INTENSITY + COLOR_CONTROL_PRIMARY_5_X + COLOR_CONTROL_PRIMARY_5_Y + COLOR_CONTROL_PRIMARY_5_INTENSITY + COLOR_CONTROL_PRIMARY_6_X + COLOR_CONTROL_PRIMARY_6_Y + COLOR_CONTROL_PRIMARY_6_INTENSITY + COLOR_CONTROL_ENHANCED_CURRENT_HUE + COLOR_CONTROL_ENHANCED_COLOR_MODE + COLOR_CONTROL_COLOR_LOOP_ACTIVE + COLOR_CONTROL_COLOR_LOOP_DIRECTION + COLOR_CONTROL_COLOR_LOOP_TIME + COLOR_CONTROL_COLOR_LOOP_START_ENHANCED_HUE + COLOR_CONTROL_COLOR_LOOP_STORED_ENHANCED_HUE + COLOR_CONTROL_COLOR_CAPABILITIES + MoveToHue + MoveHue + StepHue + MoveToSaturation + MoveSaturation + StepSaturation + MoveToHueAndSaturation + MoveToColor + MoveColor + StepColor + EnhancedMoveToHue + EnhancedMoveHue + EnhancedStepHue + EnhancedMoveToHueAndSaturation + ColorLoopSet + StopMoveStep + + + ScanRequest + DeviceInformationRequest + IdentifyRequest + ResetToFactoryNewRequest + NetworkStartRequest + NetworkJoinRouterRequest + NetworkJoinEndDeviceRequest + NetworkUpdateRequest + GetGroupIdentifiersRequest + GetEndpointListRequest + ScanResponse + DeviceInformationResponse + NetworkStartResponse + NetworkJoinRouterResponse + NetworkJoinEndDeviceResponse + EndpointInformation + GetGroupIdentifiersResponse + GetEndpointListResponse + + + + + + + LO-onofflightswitch + LO + LO On/Off Light Switch + Router + 0x0104 + 0x0103 + + + VERSION + APPLICATION_VERSION + STACK_VERSION + HW_VERSION + MANUFACTURER_NAME + MODEL_IDENTIFIER + DATE_CODE + POWER_SOURCE + GENERIC_DEVICE_CLASS + GENERIC_DEVICE_TYPE + PRODUCT_CODE + PRODUCT_URL + SW_BUILD_ID + + + IDENTIFY_TIME + Identify + IdentifyQuery + TriggerEffect + + + + + + + + + + + + + + + LO-dimmerswitch + LO + LO Dimmer Switch + Router + 0x0104 + 0x0104 + + + VERSION + APPLICATION_VERSION + STACK_VERSION + HW_VERSION + MANUFACTURER_NAME + MODEL_IDENTIFIER + DATE_CODE + POWER_SOURCE + GENERIC_DEVICE_CLASS + GENERIC_DEVICE_TYPE + PRODUCT_CODE + PRODUCT_URL + SW_BUILD_ID + + + IDENTIFY_TIME + Identify + IdentifyQuery + TriggerEffect + + + + + + + + + + + + + + + + + LO-colordimmerswitch + LO + LO Color Dimmer Switch + Router + 0x0104 + 0x0105 + + + VERSION + APPLICATION_VERSION + STACK_VERSION + HW_VERSION + MANUFACTURER_NAME + MODEL_IDENTIFIER + DATE_CODE + POWER_SOURCE + GENERIC_DEVICE_CLASS + GENERIC_DEVICE_TYPE + PRODUCT_CODE + PRODUCT_URL + SW_BUILD_ID + + + IDENTIFY_TIME + Identify + IdentifyQuery + TriggerEffect + + + + + + + + + + + + + + + + + + + LO-lightsensor + LO + LO Light Sensor + Router + 0x0104 + 0x0106 + + + VERSION + APPLICATION_VERSION + STACK_VERSION + HW_VERSION + MANUFACTURER_NAME + MODEL_IDENTIFIER + DATE_CODE + POWER_SOURCE + GENERIC_DEVICE_CLASS + GENERIC_DEVICE_TYPE + PRODUCT_CODE + PRODUCT_URL + SW_BUILD_ID + + + IDENTIFY_TIME + Identify + IdentifyQuery + TriggerEffect + + + ILLUM_MEASURED_VALUE + ILLUM_MIN_MEASURED_VALUE + ILLUM_MAX_MEASURED_VALUE + + + + + + + + + LO-occupancysensor + LO + LO Occupancy Sensor + Router + 0x0104 + 0x0107 + + + VERSION + APPLICATION_VERSION + STACK_VERSION + HW_VERSION + MANUFACTURER_NAME + MODEL_IDENTIFIER + DATE_CODE + POWER_SOURCE + GENERIC_DEVICE_CLASS + GENERIC_DEVICE_TYPE + PRODUCT_CODE + PRODUCT_URL + SW_BUILD_ID + + + IDENTIFY_TIME + Identify + IdentifyQuery + TriggerEffect + + + OCCUPANCY + OCCUPANCY_SENSOR_TYPE + + + + + + + + + LO-onoffballast + LO + LO On/Off Balast + Router + 0x0104 + 0x0108 + + + VERSION + APPLICATION_VERSION + STACK_VERSION + HW_VERSION + MANUFACTURER_NAME + MODEL_IDENTIFIER + DATE_CODE + POWER_SOURCE + GENERIC_DEVICE_CLASS + GENERIC_DEVICE_TYPE + PRODUCT_CODE + PRODUCT_URL + SW_BUILD_ID + + + + + CURRENT_TEMPERATURE + + + IDENTIFY_TIME + Identify + IdentifyQuery + TriggerEffect + + + GROUP_NAME_SUPPORT + AddGroup + ViewGroup + GetGroupMembership + RemoveGroup + RemoveAllGroups + AddGroupIfIdentifying + + + SCENE_COUNT + CURRENT_SCENE + CURRENT_GROUP + SCENE_VALID + SCENE_NAME_SUPPORT + AddScene + ViewScene + RemoveScene + RemoveAllScenes + StoreScene + RecallScene + GetSceneMembership + EnhancedAddScene + EnhancedViewScene + CopyScene + + + ON_OFF + GLOBAL_SCENE_CONTROL + ON_TIME + OFF_WAIT_TIME + START_UP_ON_OFF + Off + On + Toggle + OffWithEffect + OnWithRecallGlobalScene + OnWithTimedOff + + + BALLAST_STATUS + + + CURRENT_LEVEL + OPTIONS + LEVEL_CONTROL_REMAINING_TIME + START_UP_CURRENT_LEVEL + MoveToLevel + Move + Step + Stop + MoveToLevelWithOnOff + MoveWithOnOff + StepWithOnOff + StopWithOnOff + + + + + ScanRequest + DeviceInformationRequest + IdentifyRequest + ResetToFactoryNewRequest + NetworkStartRequest + NetworkJoinRouterRequest + NetworkJoinEndDeviceRequest + NetworkUpdateRequest + GetGroupIdentifiersRequest + GetEndpointListRequest + ScanResponse + DeviceInformationResponse + NetworkStartResponse + NetworkJoinRouterResponse + NetworkJoinEndDeviceResponse + EndpointInformation + GetGroupIdentifiersResponse + GetEndpointListResponse + + + + + + + + + + + LO-dimmableballast + LO + LO Dimmable Balast + Router + 0x0104 + 0x0109 + + + VERSION + APPLICATION_VERSION + STACK_VERSION + HW_VERSION + MANUFACTURER_NAME + MODEL_IDENTIFIER + DATE_CODE + POWER_SOURCE + GENERIC_DEVICE_CLASS + GENERIC_DEVICE_TYPE + PRODUCT_CODE + PRODUCT_URL + SW_BUILD_ID + + + + + CURRENT_TEMPERATURE + + + IDENTIFY_TIME + Identify + IdentifyQuery + TriggerEffect + + + GROUP_NAME_SUPPORT + AddGroup + ViewGroup + GetGroupMembership + RemoveGroup + RemoveAllGroups + AddGroupIfIdentifying + + + SCENE_COUNT + CURRENT_SCENE + CURRENT_GROUP + SCENE_VALID + SCENE_NAME_SUPPORT + AddScene + ViewScene + RemoveScene + RemoveAllScenes + StoreScene + RecallScene + GetSceneMembership + EnhancedAddScene + EnhancedViewScene + CopyScene + + + ON_OFF + GLOBAL_SCENE_CONTROL + ON_TIME + OFF_WAIT_TIME + START_UP_ON_OFF + Off + On + Toggle + OffWithEffect + OnWithRecallGlobalScene + OnWithTimedOff + + + BALLAST_STATUS + + + CURRENT_LEVEL + OPTIONS + LEVEL_CONTROL_REMAINING_TIME + START_UP_CURRENT_LEVEL + MoveToLevel + Move + Step + Stop + MoveToLevelWithOnOff + MoveWithOnOff + StepWithOnOff + StopWithOnOff + + + + + ScanRequest + DeviceInformationRequest + IdentifyRequest + ResetToFactoryNewRequest + NetworkStartRequest + NetworkJoinRouterRequest + NetworkJoinEndDeviceRequest + NetworkUpdateRequest + GetGroupIdentifiersRequest + GetEndpointListRequest + ScanResponse + DeviceInformationResponse + NetworkStartResponse + NetworkJoinRouterResponse + NetworkJoinEndDeviceResponse + EndpointInformation + GetGroupIdentifiersResponse + GetEndpointListResponse + + + + + + + + + + + LO-onoffpluginunit + LO + LO On/Off Plug-in Unit + Router + 0x0104 + 0x010A + + + VERSION + APPLICATION_VERSION + STACK_VERSION + HW_VERSION + MANUFACTURER_NAME + MODEL_IDENTIFIER + DATE_CODE + POWER_SOURCE + GENERIC_DEVICE_CLASS + GENERIC_DEVICE_TYPE + PRODUCT_CODE + PRODUCT_URL + SW_BUILD_ID + + + IDENTIFY_TIME + Identify + IdentifyQuery + TriggerEffect + + + GROUP_NAME_SUPPORT + AddGroup + ViewGroup + GetGroupMembership + RemoveGroup + RemoveAllGroups + AddGroupIfIdentifying + + + SCENE_COUNT + CURRENT_SCENE + CURRENT_GROUP + SCENE_VALID + SCENE_NAME_SUPPORT + AddScene + ViewScene + RemoveScene + RemoveAllScenes + StoreScene + RecallScene + GetSceneMembership + EnhancedAddScene + EnhancedViewScene + CopyScene + + + ON_OFF + GLOBAL_SCENE_CONTROL + ON_TIME + OFF_WAIT_TIME + START_UP_ON_OFF + Off + On + Toggle + OffWithEffect + OnWithRecallGlobalScene + OnWithTimedOff + + + CURRENT_LEVEL + OPTIONS + LEVEL_CONTROL_REMAINING_TIME + START_UP_CURRENT_LEVEL + MoveToLevel + Move + Step + Stop + MoveToLevelWithOnOff + MoveWithOnOff + StepWithOnOff + StopWithOnOff + + + + + + + LO-dimmablepluginunit + LO + LO Dimmable Plug-in Unit + Router + 0x0104 + 0x010B + + + VERSION + APPLICATION_VERSION + STACK_VERSION + HW_VERSION + MANUFACTURER_NAME + MODEL_IDENTIFIER + DATE_CODE + POWER_SOURCE + GENERIC_DEVICE_CLASS + GENERIC_DEVICE_TYPE + PRODUCT_CODE + PRODUCT_URL + SW_BUILD_ID + + + IDENTIFY_TIME + Identify + IdentifyQuery + TriggerEffect + + + GROUP_NAME_SUPPORT + AddGroup + ViewGroup + GetGroupMembership + RemoveGroup + RemoveAllGroups + AddGroupIfIdentifying + + + SCENE_COUNT + CURRENT_SCENE + CURRENT_GROUP + SCENE_VALID + SCENE_NAME_SUPPORT + AddScene + ViewScene + RemoveScene + RemoveAllScenes + StoreScene + RecallScene + GetSceneMembership + EnhancedAddScene + EnhancedViewScene + CopyScene + + + ON_OFF + GLOBAL_SCENE_CONTROL + ON_TIME + OFF_WAIT_TIME + START_UP_ON_OFF + Off + On + Toggle + OffWithEffect + OnWithRecallGlobalScene + OnWithTimedOff + + + CURRENT_LEVEL + OPTIONS + LEVEL_CONTROL_REMAINING_TIME + START_UP_CURRENT_LEVEL + MoveToLevel + Move + Step + Stop + MoveToLevelWithOnOff + MoveWithOnOff + StepWithOnOff + StopWithOnOff + + + + + + + LO-colortemperaturelight + LO + LO Color Temperature Light + Router + 0x0104 + 0x010C + + + VERSION + APPLICATION_VERSION + STACK_VERSION + HW_VERSION + MANUFACTURER_NAME + MODEL_IDENTIFIER + DATE_CODE + POWER_SOURCE + GENERIC_DEVICE_CLASS + GENERIC_DEVICE_TYPE + PRODUCT_CODE + PRODUCT_URL + SW_BUILD_ID + + + IDENTIFY_TIME + Identify + IdentifyQuery + TriggerEffect + + + GROUP_NAME_SUPPORT + AddGroup + ViewGroup + GetGroupMembership + RemoveGroup + RemoveAllGroups + AddGroupIfIdentifying + + + SCENE_COUNT + CURRENT_SCENE + CURRENT_GROUP + SCENE_VALID + SCENE_NAME_SUPPORT + AddScene + ViewScene + RemoveScene + RemoveAllScenes + StoreScene + RecallScene + GetSceneMembership + EnhancedAddScene + EnhancedViewScene + CopyScene + + + ON_OFF + GLOBAL_SCENE_CONTROL + ON_TIME + OFF_WAIT_TIME + START_UP_ON_OFF + Off + On + Toggle + OffWithEffect + OnWithRecallGlobalScene + OnWithTimedOff + + + CURRENT_LEVEL + OPTIONS + LEVEL_CONTROL_REMAINING_TIME + START_UP_CURRENT_LEVEL + MoveToLevel + Move + Step + Stop + MoveToLevelWithOnOff + MoveWithOnOff + StepWithOnOff + StopWithOnOff + + + COLOR_CONTROL_REMAINING_TIME + COLOR_CONTROL_COLOR_TEMPERATURE + COLOR_CONTROL_COLOR_MODE + COLOR_CONTROL_OPTIONS + COLOR_CONTROL_NUMBER_OF_PRIMARIES + COLOR_CONTROL_PRIMARY_1_X + COLOR_CONTROL_PRIMARY_1_Y + COLOR_CONTROL_PRIMARY_1_INTENSITY + COLOR_CONTROL_PRIMARY_2_X + COLOR_CONTROL_PRIMARY_2_Y + COLOR_CONTROL_PRIMARY_2_INTENSITY + COLOR_CONTROL_PRIMARY_3_X + COLOR_CONTROL_PRIMARY_3_Y + COLOR_CONTROL_PRIMARY_3_INTENSITY + COLOR_CONTROL_PRIMARY_4_X + COLOR_CONTROL_PRIMARY_4_Y + COLOR_CONTROL_PRIMARY_4_INTENSITY + COLOR_CONTROL_PRIMARY_5_X + COLOR_CONTROL_PRIMARY_5_Y + COLOR_CONTROL_PRIMARY_5_INTENSITY + COLOR_CONTROL_PRIMARY_6_X + COLOR_CONTROL_PRIMARY_6_Y + COLOR_CONTROL_PRIMARY_6_INTENSITY + COLOR_CONTROL_ENHANCED_CURRENT_HUE + COLOR_CONTROL_COLOR_CAPABILITIES + COLOR_CONTROL_COLOR_TEMP_PHYSICAL_MIN + COLOR_CONTROL_COLOR_TEMP_PHYSICAL_MAX + COLOR_CONTROL_TEMPERATURE_LEVEL_MIN_MIREDS + START_UP_COLOR_TEMPERATURE_MIREDS + MoveToHue + MoveHue + StepHue + MoveToSaturation + MoveSaturation + StepSaturation + MoveToHueAndSaturation + MoveToColor + MoveColor + StepColor + MoveToColorTemperature + EnhancedMoveToHue + EnhancedMoveHue + EnhancedStepHue + EnhancedMoveToHueAndSaturation + ColorLoopSet + StopMoveStep + MoveColorTemperature + StepColorTemperature + + + ScanRequest + DeviceInformationRequest + IdentifyRequest + ResetToFactoryNewRequest + NetworkStartRequest + NetworkJoinRouterRequest + NetworkJoinEndDeviceRequest + NetworkUpdateRequest + GetGroupIdentifiersRequest + GetEndpointListRequest + ScanResponse + DeviceInformationResponse + NetworkStartResponse + NetworkJoinRouterResponse + NetworkJoinEndDeviceResponse + EndpointInformation + GetGroupIdentifiersResponse + GetEndpointListResponse + + + + + + LO-extendedcolorlight + LO + LO Extended Color Light + Router + 0x0104 + 0x010D + + + VERSION + APPLICATION_VERSION + STACK_VERSION + HW_VERSION + MANUFACTURER_NAME + MODEL_IDENTIFIER + DATE_CODE + POWER_SOURCE + GENERIC_DEVICE_CLASS + GENERIC_DEVICE_TYPE + PRODUCT_CODE + PRODUCT_URL + SW_BUILD_ID + + + IDENTIFY_TIME + Identify + IdentifyQuery + TriggerEffect + + + GROUP_NAME_SUPPORT + AddGroup + ViewGroup + GetGroupMembership + RemoveGroup + RemoveAllGroups + AddGroupIfIdentifying + + + SCENE_COUNT + CURRENT_SCENE + CURRENT_GROUP + SCENE_VALID + SCENE_NAME_SUPPORT + AddScene + ViewScene + RemoveScene + RemoveAllScenes + StoreScene + RecallScene + GetSceneMembership + EnhancedAddScene + EnhancedViewScene + CopyScene + + + ON_OFF + GLOBAL_SCENE_CONTROL + ON_TIME + OFF_WAIT_TIME + START_UP_ON_OFF + Off + On + Toggle + OffWithEffect + OnWithRecallGlobalScene + OnWithTimedOff + + + CURRENT_LEVEL + OPTIONS + LEVEL_CONTROL_REMAINING_TIME + START_UP_CURRENT_LEVEL + MoveToLevel + Move + Step + Stop + MoveToLevelWithOnOff + MoveWithOnOff + StepWithOnOff + StopWithOnOff + + + COLOR_CONTROL_CURRENT_HUE + COLOR_CONTROL_CURRENT_SATURATION + COLOR_CONTROL_REMAINING_TIME + COLOR_CONTROL_CURRENT_X + COLOR_CONTROL_CURRENT_Y + COLOR_CONTROL_COLOR_TEMPERATURE + COLOR_CONTROL_COLOR_MODE + COLOR_CONTROL_OPTIONS + COLOR_CONTROL_NUMBER_OF_PRIMARIES + COLOR_CONTROL_PRIMARY_1_X + COLOR_CONTROL_PRIMARY_1_Y + COLOR_CONTROL_PRIMARY_1_INTENSITY + COLOR_CONTROL_PRIMARY_2_X + COLOR_CONTROL_PRIMARY_2_Y + COLOR_CONTROL_PRIMARY_2_INTENSITY + COLOR_CONTROL_PRIMARY_3_X + COLOR_CONTROL_PRIMARY_3_Y + COLOR_CONTROL_PRIMARY_3_INTENSITY + COLOR_CONTROL_PRIMARY_4_X + COLOR_CONTROL_PRIMARY_4_Y + COLOR_CONTROL_PRIMARY_4_INTENSITY + COLOR_CONTROL_PRIMARY_5_X + COLOR_CONTROL_PRIMARY_5_Y + COLOR_CONTROL_PRIMARY_5_INTENSITY + COLOR_CONTROL_PRIMARY_6_X + COLOR_CONTROL_PRIMARY_6_Y + COLOR_CONTROL_PRIMARY_6_INTENSITY + COLOR_CONTROL_ENHANCED_CURRENT_HUE + COLOR_CONTROL_ENHANCED_COLOR_MODE + COLOR_CONTROL_COLOR_LOOP_ACTIVE + COLOR_CONTROL_COLOR_LOOP_DIRECTION + COLOR_CONTROL_COLOR_LOOP_TIME + COLOR_CONTROL_COLOR_LOOP_START_ENHANCED_HUE + COLOR_CONTROL_COLOR_LOOP_STORED_ENHANCED_HUE + COLOR_CONTROL_COLOR_CAPABILITIES + COLOR_CONTROL_COLOR_TEMP_PHYSICAL_MIN + COLOR_CONTROL_COLOR_TEMP_PHYSICAL_MAX + COLOR_CONTROL_TEMPERATURE_LEVEL_MIN_MIREDS + START_UP_COLOR_TEMPERATURE_MIREDS + MoveToHue + MoveHue + StepHue + MoveToSaturation + MoveSaturation + StepSaturation + MoveToHueAndSaturation + MoveToColor + MoveColor + StepColor + MoveToColorTemperature + EnhancedMoveToHue + EnhancedMoveHue + EnhancedStepHue + EnhancedMoveToHueAndSaturation + ColorLoopSet + StopMoveStep + MoveColorTemperature + StepColorTemperature + + + ScanRequest + DeviceInformationRequest + IdentifyRequest + ResetToFactoryNewRequest + NetworkStartRequest + NetworkJoinRouterRequest + NetworkJoinEndDeviceRequest + NetworkUpdateRequest + GetGroupIdentifiersRequest + GetEndpointListRequest + ScanResponse + DeviceInformationResponse + NetworkStartResponse + NetworkJoinRouterResponse + NetworkJoinEndDeviceResponse + EndpointInformation + GetGroupIdentifiersResponse + GetEndpointListResponse + + + + + + LO-lightlevelsensor + LO + LO Light Level Sensor + Router + 0x0104 + 0x010E + + + VERSION + APPLICATION_VERSION + STACK_VERSION + HW_VERSION + MANUFACTURER_NAME + MODEL_IDENTIFIER + DATE_CODE + POWER_SOURCE + GENERIC_DEVICE_CLASS + GENERIC_DEVICE_TYPE + PRODUCT_CODE + PRODUCT_URL + SW_BUILD_ID + + + IDENTIFY_TIME + Identify + IdentifyQuery + TriggerEffect + + + LEVEL_STATUS + ILLUMINANCE_TARGET_LEVEL + + + + + + + + + LO-colorcontroller + LO + LO Color Controller + Router + 0x0104 + 0x0800 + + + VERSION + APPLICATION_VERSION + STACK_VERSION + HW_VERSION + MANUFACTURER_NAME + MODEL_IDENTIFIER + DATE_CODE + POWER_SOURCE + GENERIC_DEVICE_CLASS + GENERIC_DEVICE_TYPE + PRODUCT_CODE + PRODUCT_URL + SW_BUILD_ID + + + IDENTIFY_TIME + Identify + IdentifyQuery + TriggerEffect + + + + + + + + + + + ScanRequest + DeviceInformationRequest + IdentifyRequest + ResetToFactoryNewRequest + NetworkStartRequest + NetworkJoinRouterRequest + NetworkJoinEndDeviceRequest + NetworkUpdateRequest + GetGroupIdentifiersRequest + GetEndpointListRequest + ScanResponse + DeviceInformationResponse + NetworkStartResponse + NetworkJoinRouterResponse + NetworkJoinEndDeviceResponse + EndpointInformation + GetGroupIdentifiersResponse + GetEndpointListResponse + + + + + + LO-colorscenecontroller + LO + LO Color Scene Controller + Router + 0x0104 + 0x0810 + + + VERSION + APPLICATION_VERSION + STACK_VERSION + HW_VERSION + MANUFACTURER_NAME + MODEL_IDENTIFIER + DATE_CODE + POWER_SOURCE + GENERIC_DEVICE_CLASS + GENERIC_DEVICE_TYPE + PRODUCT_CODE + PRODUCT_URL + SW_BUILD_ID + + + IDENTIFY_TIME + Identify + IdentifyQuery + TriggerEffect + + + + + + + + + + + + + ScanRequest + DeviceInformationRequest + IdentifyRequest + ResetToFactoryNewRequest + NetworkStartRequest + NetworkJoinRouterRequest + NetworkJoinEndDeviceRequest + NetworkUpdateRequest + GetGroupIdentifiersRequest + GetEndpointListRequest + ScanResponse + DeviceInformationResponse + NetworkStartResponse + NetworkJoinRouterResponse + NetworkJoinEndDeviceResponse + EndpointInformation + GetGroupIdentifiersResponse + GetEndpointListResponse + + + + + + LO-noncolorcontroller + LO + LO Non Color Controller + Router + 0x0104 + 0x0820 + + + VERSION + APPLICATION_VERSION + STACK_VERSION + HW_VERSION + MANUFACTURER_NAME + MODEL_IDENTIFIER + DATE_CODE + POWER_SOURCE + GENERIC_DEVICE_CLASS + GENERIC_DEVICE_TYPE + PRODUCT_CODE + PRODUCT_URL + SW_BUILD_ID + + + IDENTIFY_TIME + Identify + IdentifyQuery + TriggerEffect + + + + + + + + + ScanRequest + DeviceInformationRequest + IdentifyRequest + ResetToFactoryNewRequest + NetworkStartRequest + NetworkJoinRouterRequest + NetworkJoinEndDeviceRequest + NetworkUpdateRequest + GetGroupIdentifiersRequest + GetEndpointListRequest + ScanResponse + DeviceInformationResponse + NetworkStartResponse + NetworkJoinRouterResponse + NetworkJoinEndDeviceResponse + EndpointInformation + GetGroupIdentifiersResponse + GetEndpointListResponse + + + + + + LO-noncolorscenecontroller + LO + LO Non Color Scene Controller + Router + 0x0104 + 0x0830 + + + VERSION + APPLICATION_VERSION + STACK_VERSION + HW_VERSION + MANUFACTURER_NAME + MODEL_IDENTIFIER + DATE_CODE + POWER_SOURCE + GENERIC_DEVICE_CLASS + GENERIC_DEVICE_TYPE + PRODUCT_CODE + PRODUCT_URL + SW_BUILD_ID + + + IDENTIFY_TIME + Identify + IdentifyQuery + TriggerEffect + + + + + + + + + + + ScanRequest + DeviceInformationRequest + IdentifyRequest + ResetToFactoryNewRequest + NetworkStartRequest + NetworkJoinRouterRequest + NetworkJoinEndDeviceRequest + NetworkUpdateRequest + GetGroupIdentifiersRequest + GetEndpointListRequest + ScanResponse + DeviceInformationResponse + NetworkStartResponse + NetworkJoinRouterResponse + NetworkJoinEndDeviceResponse + EndpointInformation + GetGroupIdentifiersResponse + GetEndpointListResponse + + + + + + LO-controlbridge + LO + LO Control Bridge + Router + 0x0104 + 0x0840 + + + VERSION + APPLICATION_VERSION + STACK_VERSION + HW_VERSION + MANUFACTURER_NAME + MODEL_IDENTIFIER + DATE_CODE + POWER_SOURCE + GENERIC_DEVICE_CLASS + GENERIC_DEVICE_TYPE + PRODUCT_CODE + PRODUCT_URL + SW_BUILD_ID + + + IDENTIFY_TIME + Identify + IdentifyQuery + TriggerEffect + + + + + + + + + + + + + ScanRequest + DeviceInformationRequest + IdentifyRequest + ResetToFactoryNewRequest + NetworkStartRequest + NetworkJoinRouterRequest + NetworkJoinEndDeviceRequest + NetworkUpdateRequest + GetGroupIdentifiersRequest + GetEndpointListRequest + ScanResponse + DeviceInformationResponse + NetworkStartResponse + NetworkJoinRouterResponse + NetworkJoinEndDeviceResponse + EndpointInformation + GetGroupIdentifiersResponse + GetEndpointListResponse + + + + + + + + + + + + LO-onoffsensor + LO + LO On/off Sensor + Router + 0x0104 + 0x0850 + + + VERSION + APPLICATION_VERSION + STACK_VERSION + HW_VERSION + MANUFACTURER_NAME + MODEL_IDENTIFIER + DATE_CODE + POWER_SOURCE + GENERIC_DEVICE_CLASS + GENERIC_DEVICE_TYPE + PRODUCT_CODE + PRODUCT_URL + SW_BUILD_ID + + + IDENTIFY_TIME + Identify + IdentifyQuery + TriggerEffect + + + + + + + + + + + + + + + ScanRequest + DeviceInformationRequest + IdentifyRequest + ResetToFactoryNewRequest + NetworkStartRequest + NetworkJoinRouterRequest + NetworkJoinEndDeviceRequest + NetworkUpdateRequest + GetGroupIdentifiersRequest + GetEndpointListRequest + ScanResponse + DeviceInformationResponse + NetworkStartResponse + NetworkJoinRouterResponse + NetworkJoinEndDeviceResponse + EndpointInformation + GetGroupIdentifiersResponse + GetEndpointListResponse + + + + diff --git a/src/app/zap-templates/zcl/data-model/silabs/ota-dotdot.xml b/src/app/zap-templates/zcl/data-model/silabs/ota-dotdot.xml new file mode 100644 index 00000000000000..20f71af461a59b --- /dev/null +++ b/src/app/zap-templates/zcl/data-model/silabs/ota-dotdot.xml @@ -0,0 +1,149 @@ + + + + + + + Over the Air Bootloading + General + This cluster contains commands and attributes that act as an interface for Thread Over-the-air bootloading. + 0x2000 + OTA_BOOTLOAD_CLUSTER + true + true + false + OTA Upgrade Server ID + + Offset (address) into the file + OTA Current File Version + OTA Current ZigBee Stack Version + OTA Downloaded File Version + OTA Downloaded ZigBee Stack Version + OTA Upgrade Status + Manufacturer ID + Image Type ID + Minimum Block Request Period + Image Stamp + Upgrade Activation Policy + Upgrade Timeout Policy + + + This command is generated when the upgrade server wishes to notify the clients of the available OTA upgrade image. The command can be sent as unicast which provides a way for the server to force the upgrade on the client. The command can also be sent as broadcast or multicast to certain class of clients (for example, the ones that have matching manufacturing and device ids). + + + + + + + + + + This command is generated upon receipt of an Image Notify command to indicate that the client is looking for the next firmware image to upgrade to. The client may also choose to send the command periodically to the server. + + + + + + + + + + This command is generated upon receipt of an QueryNextImageRequest command to response whether the server has a valid OTA upgrade image for the client or not. If the server has the file, information regarding the file and OTA upgrade process will be included in the command. + + + + + + + + + This command is generated by the client to request blocks of OTA upgrade file data. + + + + + + + + + + + + This command is generated by the client to request pages of OTA upgrade file data. A page would contain multiple blocks of data. + + + + + + + + + + + + + + This command is generated by the server in response to the block or page request command. If the server has the data available, it will reply back with a SUCCESS status. For other error cases, it may reply with status WAIT_FOR_DATA (server does not have the data available yet) or ABORT (invalid requested parameters or other failure cases). + + + + + + + + + + + + This command is generated by the client to notify the server of the end of the upgrade process. The process may end with success or error status. + + + + + + + + + This command is generated by the server in response to the upgrade request in order to let the client know when to upgrade to running new firmware image. + + + + + + + + + + This command is generated by the client to request a file that is specific to itself. The intention is to provide a way for the client to request non-OTA upgrade file. + + + + + + + + + + This command is generated upon receipt of an QuerySpecificFileRequest command to response whether the server has a valid file for the client or not. If the server has the file, information regarding the file and OTA process will be included in the command. + + + + + + + + diff --git a/src/app/zap-templates/zcl/data-model/silabs/ota.xml b/src/app/zap-templates/zcl/data-model/silabs/ota.xml new file mode 100644 index 00000000000000..479f16b4b41a0c --- /dev/null +++ b/src/app/zap-templates/zcl/data-model/silabs/ota.xml @@ -0,0 +1,152 @@ + + + + + + + Over the Air Bootloading + General + This cluster contains commands and attributes that act as an interface for ZigBee Over-the-air bootloading. + 0x0019 + OTA_BOOTLOAD_CLUSTER + true + true + false + + OTA Upgrade Server ID + + Offset (address) into the file + OTA Current File Version + OTA Current ZigBee Stack Version + OTA Downloaded File Version + OTA Downloaded ZigBee Stack Version + OTA Upgrade Status + Manufacturer ID + Image Type ID + Minimum Block Request Period + Image Stamp + Upgrade Activation Policy + Upgrade Timeout Policy + + + This command is generated when the upgrade server wishes to notify the clients of the available OTA upgrade image. The command can be sent as unicast which provides a way for the server to force the upgrade on the client. The command can also be sent as broadcast or multicast to certain class of clients (for example, the ones that have matching manufacturing and device ids). + + + + + + + + + + This command is generated upon receipt of an Image Notify command to indicate that the client is looking for the next firmware image to upgrade to. The client may also choose to send the command periodically to the server. + + + + + + + + + + This command is generated upon receipt of an QueryNextImageRequest command to response whether the server has a valid OTA upgrade image for the client or not. If the server has the file, information regarding the file and OTA upgrade process will be included in the command. + + + + + + + + + + This command is generated by the client to request blocks of OTA upgrade file data. + + + + + + + + + + + + This command is generated by the client to request pages of OTA upgrade file data. A page would contain multiple blocks of data. + + + + + + + + + + + + + + This command is generated by the server in response to the block or page request command. If the server has the data available, it will reply back with a SUCCESS status. For other error cases, it may reply with status WAIT_FOR_DATA (server does not have the data available yet) or ABORT (invalid requested parameters or other failure cases). + + + + + + + + + + + + This command is generated by the client to notify the server of the end of the upgrade process. The process may end with success or error status. + + + + + + + + + This command is generated by the server in response to the upgrade request in order to let the client know when to upgrade to running new firmware image. + + + + + + + + + + This command is generated by the client to request a file that is specific to itself. The intention is to provide a way for the client to request non-OTA upgrade file. + + + + + + + + + + This command is generated upon receipt of an QuerySpecificFileRequest command to response whether the server has a valid file for the client or not. If the server has the file, information regarding the file and OTA process will be included in the command. + + + + + + + + + diff --git a/src/app/zap-templates/zcl/data-model/silabs/profiles.xml b/src/app/zap-templates/zcl/data-model/silabs/profiles.xml new file mode 100644 index 00000000000000..d2111c29a7f22c --- /dev/null +++ b/src/app/zap-templates/zcl/data-model/silabs/profiles.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + diff --git a/src/app/zap-templates/zcl/data-model/silabs/relay-control.xml b/src/app/zap-templates/zcl/data-model/silabs/relay-control.xml new file mode 100644 index 00000000000000..4528a03b8f4d2a --- /dev/null +++ b/src/app/zap-templates/zcl/data-model/silabs/relay-control.xml @@ -0,0 +1,45 @@ + + + + + Relay Control + Ember + Commands to turn on and off the stack's relay capabilities, and to determine whether or not relay is enabled. + 0xC00D + RELAY_CONTROL_CLUSTER + true + true + + + Sets the on-off state of stack relay. + + + + + + + Client-to-server query that provides the on-off state of stack relay. + + + + + Response to GetRelayState query. + + + + + diff --git a/src/app/zap-templates/zcl/data-model/silabs/sample-extensions.xml b/src/app/zap-templates/zcl/data-model/silabs/sample-extensions.xml new file mode 100644 index 00000000000000..cc79035ba8d814 --- /dev/null +++ b/src/app/zap-templates/zcl/data-model/silabs/sample-extensions.xml @@ -0,0 +1,156 @@ + + + + + + + + Sample Mfg Specific Cluster + Ember + This cluster provides an example of how the Application + Framework can be extended to include manufacturer specific clusters. + + + 0xFC00 + SAMPLE_MFG_SPECIFIC_CLUSTER + true + true + ember sample attribute + ember sample attribute 2 + + + A sample manufacturer specific command within the sample manufacturer specific + cluster. + + + + + + Sample Mfg Specific Cluster 2 + Ember + This cluster provides an example of how the Application + Framework can be extended to include manufacturer specific clusters. + + + 0xFC00 + SAMPLE_MFG_SPECIFIC_CLUSTER_2 + true + true + ember sample attribute 2 + ember sample attribute 2 + + + A sample manufacturer specific command within the sample manufacturer specific + cluster. + + + + + + + Sample Mfg Specific Attribute: 0x0000 0x1002 + Sample Mfg Specific Attribute: 0x0000 0x1049 + Sample Mfg Specific Attribute: 0x0001 0x1002 + Sample Mfg Specific Attribute: 0x0001 0x1040 + + Client command that turns the device off with a transition given + by the transition time in the Ember Sample transition time attribute. + + + Client command that turns the device on with a transition given + by the transition time in the Ember Sample transition time attribute. + + + Client command that toggles the device with a transition given + by the transition time in the Ember Sample transition time attribute. + + + Client command that turns the device on with a transition given + by the transition time in the Ember Sample transition time attribute. + + + Client command that toggles the device with a transition given + by the transition time in the Ember Sample transition time attribute. + + + diff --git a/src/app/zap-templates/zcl/data-model/silabs/schema/zcl-validation.js b/src/app/zap-templates/zcl/data-model/silabs/schema/zcl-validation.js new file mode 100644 index 00000000000000..1ff49a48af4ac5 --- /dev/null +++ b/src/app/zap-templates/zcl/data-model/silabs/schema/zcl-validation.js @@ -0,0 +1,30 @@ +/** + * + * Copyright (c) 2020 Silicon Labs + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +const libxmljs = require('libxmljs') + +// validateZclFile will have validationSchema be bound to it. +function validateZclFile(validationSchemaBuffer, zclFileBuffer) +{ + let zclFile = libxmljs.parseXml(zclFileBuffer.toString()) + let xsdDoc = libxmljs.parseXml(validationSchemaBuffer.toString()) + let validationStatus = zclFile.validate(xsdDoc) + let validationErrors = zclFile.validationErrors + let returnValue = { isValid : validationStatus, errors : validationErrors } return returnValue +} + +exports.validateZclFile = validateZclFile diff --git a/src/app/zap-templates/zcl/data-model/silabs/schema/zcl.xsd b/src/app/zap-templates/zcl/data-model/silabs/schema/zcl.xsd new file mode 100644 index 00000000000000..6737f374d1369b --- /dev/null +++ b/src/app/zap-templates/zcl/data-model/silabs/schema/zcl.xsd @@ -0,0 +1,436 @@ + + + + + This schema describes the format of the XML files, that describe the ZCL specification. +It does not describe over-the-air format of the packet. + +Copyright 2012, Silicon Laboratories Inc. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + An optional attribute, that specifies the length argument. + +This is used in cases where a length argument is preceding the actual array. + +In those cases, an array becomes a known length, and you can have variable length arguments after it. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/app/zap-templates/zcl/data-model/silabs/silabs.xml b/src/app/zap-templates/zcl/data-model/silabs/silabs.xml new file mode 100644 index 00000000000000..2be61c7d4781dd --- /dev/null +++ b/src/app/zap-templates/zcl/data-model/silabs/silabs.xml @@ -0,0 +1,168 @@ + + + + + + + + Configuration Cluster + Ember + This cluster allows for the OTA configuration of firmware + parameters. + + 0xFC01 + OTA_CONFIGURATION_CLUSTER + true + true + Prevents OTA writing of tokens. + + + Command to write a token value over the air. + + + + + + + Command to lock the token values. + + + + + Command to read a token value. + + + + + + Command to unlock tokens with a device-specific password (if allowed). + + + + + + Response to a token value read. + + + + + + + MFGLIB Cluster + Ember + This cluster provides commands to kick off MFGLIB actions + over the air. + + 0xFC02 + MFGLIB_CLUSTER + true + true + Number of packets received while in MFGLIB mode. + RSSI of the first received packet. + LQI of the first received packet. + + + Command to put the device into streaming mode. + + + + + + + + Command to put the device into tone mode. + + + + + + + + Command to put the device into RX mode. + + + + + + + diff --git a/src/app/zap-templates/zcl/data-model/silabs/sleeping-mesh.xml b/src/app/zap-templates/zcl/data-model/silabs/sleeping-mesh.xml new file mode 100644 index 00000000000000..79f9fe524c9618 --- /dev/null +++ b/src/app/zap-templates/zcl/data-model/silabs/sleeping-mesh.xml @@ -0,0 +1,94 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Sleeping Mesh Configuration + SM + This cluster provides an interface for configuring and managing a sleeping mesh. The sleeping mesh is defined as a ZigBee Network where a number of devices supporting router features are able to sleep using an application layer mechanism to synchronize the wakeup and sleep. + 0xXXXX + SM_SLEEPING_MESH_CONFIGURATION_CLUSTER + true + true + status + awake duration + wake up period + next wake up utc time + tx jitter + wake up hour work day + wake up hour holy day + scheduling type + sleeping configuration id + + + The Sleeping Mesh Configuration command is used to configure the device to operate in a sleeping mesh. The configuration parameters allow the devices in the network to understand how to share a wakeup window and to operate in that period of time like an always-on ZigBee network. + + + + + + + + + + + + + + + This command initiates a Sleeping Mesh Configuration command for the current sleeping configuration available for this device. + + + + + diff --git a/src/app/zap-templates/zcl/data-model/silabs/ta-devices.xml b/src/app/zap-templates/zcl/data-model/silabs/ta-devices.xml new file mode 100644 index 00000000000000..69fcb0d22975d4 --- /dev/null +++ b/src/app/zap-templates/zcl/data-model/silabs/ta-devices.xml @@ -0,0 +1,414 @@ + + + + + TA-zigbeesimcard + Telecom Applications + ZigBee SIM Card (ZSIM) + Coordinator + 0x0107 + 0x0000 + + Basic + Groups + Commissioning + Identify + ISO 7816 Protocol Tunnel + Information + Payment + Billing + + + Data Sharing + Voice over ZigBee + Data Rate Control + Chatting + RSSI Location + + + + TA-zigbeemobileterminal + Telecom Applications + ZigBee Mobile Terminal (ZMT) + Coordinator + 0x0107 + 0x0001 + + Basic + Groups + Commissioning + Identify + Information + Payment + Billing + + + Data Sharing + Data Rate Control + Voice over ZigBee + Gaming + Chatting + ISO 7816 Protocol Tunnel + Partition + RSSI Location + + + + TA-configurationtool + Telecom Applications + Configuration Tool + Coordinator + 0x0107 + 0x0005 + + Basic + Groups + Commissioning + Identify + Information + Data Rate Control + Data Sharing + Payment + Billing + Voice over ZigBee + + + RSSI Location + Partition + + + + TA-rangeextender + Telecom Applications + Range Extender + Coordinator + 0x0107 + 0x0008 + + Basic + Groups + Commissioning + Identify + + + + TA-zigbeeaccesspoint + Telecom Applications + ZigBee Access Point (ZAP) + Coordinator + 0x0107 + 0x0100 + + Basic + Groups + Commissioning + Identify + Information + Payment + + + Billing + + + + TA-zigbeeinformationnode + Telecom Applications + ZigBee Information Node (ZIN) + Coordinator + 0x0107 + 0x0101 + + Basic + Groups + Commissioning + Identify + Information + Billing + + + + + + TA-zigbeeinformationterminal + Telecom Applications + ZigBee Information Terminal (ZIT) + Coordinator + 0x0107 + 0x0102 + + Basic + Groups + Commissioning + Identify + Information + + + + TA-pointofsale + Telecom Applications + Point of Sale + Coordinator + 0x0107 + 0x0200 + + Basic + Groups + Commissioning + Identify + Information + Payment + + + + + + TA-ticketingmachine + Telecom Applications + Ticketing Machine + Coordinator + 0x0107 + 0x0201 + + Basic + Groups + Commissioning + Identify + Information + Payment + + + + + + TA-paycontroller + Telecom Applications + Pay Controller + Coordinator + 0x0107 + 0x0202 + + Basic + Groups + Commissioning + Identify + Information + + + Payment + + + + TA-billingunit + Telecom Applications + Billing Unit + Coordinator + 0x0107 + 0x0203 + + Basic + Groups + Commissioning + Identify + Information + + + Billing + + + + TA-chargingunit + Telecom Applications + Charging Unit + Coordinator + 0x0107 + 0x0204 + + Basic + Groups + Commissioning + Identify + Information + + + Billing + + + + TA-zigbeeflashcard + Telecom Applications + ZigBee Flash Card + Coordinator + 0x0107 + 0x0300 + + Basic + Groups + Commissioning + Identify + On/Off + + + Data Sharing + Data Rate Control + Information + Partition + + + + TA-zigbeepcsmartcardreader + Telecom Applications + ZigBee PC Smart Card Reader + Coordinator + 0x0107 + 0x0301 + + Basic + Groups + Commissioning + Identify + ISO 7816 Protocol Tunnel + + + + + + TA-zigbeeheadset + Telecom Applications + ZigBee Headset + Coordinator + 0x0107 + 0x0400 + + Basic + Groups + Commissioning + Identify + Voice over ZigBee + + + + + + TA-zigbeemicrophone + Telecom Applications + ZigBee Microphone + Coordinator + 0x0107 + 0x0401 + + Basic + Groups + Commissioning + Identify + Voice over ZigBee + + + + + + TA-zigbeespeaker + Telecom Applications + ZigBee Speaker + Coordinator + 0x0107 + 0x0402 + + Basic + Groups + Commissioning + Identify + Voice over ZigBee + + + + + + TA-rssianchornode + Telecom Applications + RSSI Anchor Node (RAN) + Coordinator + 0x0107 + 0x0500 + + Basic + Groups + Commissioning + Identify + RSSI Location + + + + TA-rssilocationnode + Telecom Applications + RSSI Location Node (RLN) + Coordinator + 0x0107 + 0x0501 + + Basic + Groups + Commissioning + Identify + RSSI Location + + + + TA-rssilocationgateway + Telecom Applications + RSSI Location Gateway (RLG) + Coordinator + 0x0107 + 0x0502 + + Basic + Groups + Commissioning + Identify + RSSI Location + + + + TA-chattingunit + Telecom Applications + Chatting Unit + Coordinator + 0x0107 + 0x0600 + + Basic + Groups + Commissioning + Identify + Chatting + + + + TA-chattingstation + Telecom Applications + Chatting Station + Coordinator + 0x0107 + 0x0601 + + Basic + Groups + Commissioning + Identify + Chatting + + + diff --git a/src/app/zap-templates/zcl/data-model/silabs/ta.xml b/src/app/zap-templates/zcl/data-model/silabs/ta.xml new file mode 100644 index 00000000000000..891da751d1ffa8 --- /dev/null +++ b/src/app/zap-templates/zcl/data-model/silabs/ta.xml @@ -0,0 +1,886 @@ + + + + + + + + + Partition + General + Commands and attributes for enabling partitioning of large frame to be carried from other clusters of ZigBee devices. + 0x0016 + PARTITION_CLUSTER + true + true + maximum incoming transfer size + maximum outgoing transfer size + partioned frame size + large frame size + number of ack frame + nack timeout + interframe delay + number of send retries + sender timeout + receiver timeout + + The TransferPartitionedFrame command is used to send a partitioned frame to another Partition cluster. + + + + + + + + The ReadHandshakeParam command is used in order to read the appropriate set of parameters for each transaction to be performed by the Partition Cluster. + + + + + The WriteHandshakeParam command is used during the handshake phase in order to write the appropriate parameters for each transaction to be performed by the Partition Cluster. + + + + + MultipleACK command. + + + + + + + + The ReadHandshakeParamResponse command is used in order to response to the corresponding ReadHandshakeParam command in order to communicate the appropriate set of parameters configured for each transaction to be performed by the Partition Cluster. + + + + + + ISO 7816 Protocol Tunnel + Protocol Interfaces + Commands and attributes for mobile office solutions including ZigBee devices. + 0x0615 + ISO7816_PROTOCOL_TUNNEL_CLUSTER + true + true + status + + + Command description for TransferApdu + + + + + + Command description for InsertSmartCard + + + + + Command description for ExtractSmartCard + + + + + Information + Telecommunication + Provides commands and attributes for information delivery service on ZigBee networks. + 0x0900 + INFORMATION_CLUSTER + true + true + node description + delivery enable + push information timer + enable secure configuration + number of contents + content root id + + + Command description for RequestInformation + + + + + + + + + Command description for PushInformationResponse + + + + + + Command description for SendPreference + + + + + + + + Command description for RequestPreferenceResponse + + + + + + + + + Command description for Update + + + + + + + + Command description for Delete + + + + + + + Command description for ConfigureNodeDescription + + + + + + Command description for ConfigureDeliveryEnable + + + + + + Command description for ConfigurePushInformationTimer + + + + + + Command description for ConfigureSetRootId + + + + + + Command description for RequestInformationResponse + + + + + + + + Command description for PushInformation + + + + + + Command description for SendPreferenceResponse + + + + + + Command description for ServerRequestPreference + + + + + Command description for RequestPreferenceConfirmation + + + + + + Command description for UpdateResponse + + + + + + Command description for DeleteResponse + + + + + + Data Sharing + Telecommunication + Commands and attributes for small data sharing among ZigBee devices. + 0x0901 + DATA_SHARING_CLUSTER + true + true + device name + device description + + + Command description for ReadFileRequest + + + + + + + + + + Command description for ReadRecordRequest + + + + + + + + + + Command description for WriteFileResponse + + + + + + + + + Command description for WriteFileRequest + + + + + + + + + Command description for ModifyFileRequest + + + + + + + + Command description for ModifyRecordRequest + + + + + + + + Command description for FileTransmission + + + + + + + + + + + + Command description for RecordTransmission + + + + + + + + + + + + Gaming + Telecommunication + Attributes and commands to support gaming functions of ZigBee-enabled mobile terminals. + 0x0902 + GAMING_CLUSTER + true + true + player name + nb of games + list of games + announcement interval + game id + name of game + game master + status + current nb of players + list of current players + max nb of players + min nb of players + current game level + score of this player + timer1 + timer2 + timer3 + counter1 + counter2 + downloadable + + + Command description for SearchGame + + + + + + + Command description for JoinGame + + + + + + + + Command description for StartGame + + + + + Command description for PauseGame + + + + + Command description for ResumeGame + + + + + Command description for QuitGame + + + + + Command description for EndGame + + + + + Command description for StartOver + + + + + Command description for ActionControl + + + + + + Command description for DownloadGame + + + + + Command description for GameAnnouncement + + + + + + + + Command description for GeneralResponse + + + + + + + + Data Rate Control + Telecommunication + This cluster seeks to give applications a means to managing data rate. It provides commands and attributes which form this interface. + 0x0903 + DATA_RATE_CONTROL_CLUSTER + true + true + average latency requirement + max latency requirement + bandwidth requirement + + + Command description for PathCreation + + + + + + + + Command description for DataRateNotification + + + + + + + + Command description for PathDeletion + + + + + + + Command description for DataRateControl + + + + + + + + Voice over ZigBee + Telecommunication + This cluster seeks to provide an interface to a voice over ZigBee protocol. + 0x0904 + VOICE_OVER_ZIGBEE_CLUSTER + true + true + codec type + sampling frequency + codec rate + establishment timeout + codec type sub 1 + codec type sub 2 + codec type sub 3 + compression type + compression rate + option flags + threshold + + + Command description for EstablishmentRequest + + + + + + + + + + + + + + + + + Command description for VoiceTransmission + + + + + + Command description for VoiceTransmissionCompletion + + + + + Command description for ControlResponse + + + + + + Command description for EstablishmentResponse + + + + + + + Command description for VoiceTransmissionResponse + + + + + + + Command description for Control + + + + + + Chatting + Telecommunication + Commands and attributes for sending chat messages among ZigBee devices. + 0x0905 + CHATTING_CLUSTER + true + true + u id + nickname + c iD + name + enable add chat + + + Command description for JoinChatRequest + + + + + + + + Command description for LeaveChatRequest + + + + + + + Command description for SearchChatRequest + + + + + Command description for SwitchChairmanResponse + + + + + + + Command description for StartChatRequest + + + + + + + + Command description for ChatMessage + + + + + + + + + + Command description for GetNodeInformationRequest + + + + + + + Command description for StartChatResponse + + + + + + + Command description for JoinChatResponse + + + + + + + + Command description for UserLeft + + + + + + + + Command description for UserJoined + + + + + + + + Command description for SearchChatResponse + + + + + + + Command description for SwitchChairmanRequest + + + + + + Command description for SwitchChairmanConfirm + + + + + + + Command description for SwitchChairmanNotification + + + + + + + + + Command description for GetNodeInformationResponse + + + + + + + + + + + + + Payment + Financial + Commands and attributes for payment scenarios including ZigBee devices. + 0x0A01 + PAYMENT_CLUSTER + true + true + user id + user type + service id + service provider id + totem id + currency + price trailing digit + price + good id + serial number + timestamp + trans id + trans status + status + + + Command description for BuyRequest + + + + + + + + + Command description for AcceptPayment + + + + + + + + + Command description for PaymentConfirm + + + + + + + + Command description for BuyConfirm + + + + + + + + + + + + Command description for ReceiptDelivery + + + + + + + + + + Command description for TransactionEnd + + + + + + + Billing + Financial + Attributes and commands to enable billing of users for provided services through the use of a billing platform. + 0x0A02 + BILLING_CLUSTER + true + true + user id + service id + service provider id + session interval + timestamp + duration + + + Command description for Subscribe + + + + + + + + Command description for Unsubscribe + + + + + + + + Command description for StartBillingSession + + + + + + + + Command description for StopBillingSession + + + + + + + + Command description for BillStatusNotification + + + + + + + Command description for SessionKeepAlive + + + + + + + + Command description for CheckBillStatus + + + + + + + + Command description for SendBillRecord + + + + + + + + + diff --git a/src/app/zap-templates/zcl/data-model/silabs/types.xml b/src/app/zap-templates/zcl/data-model/silabs/types.xml new file mode 100644 index 00000000000000..5a8518e47b27d2 --- /dev/null +++ b/src/app/zap-templates/zcl/data-model/silabs/types.xml @@ -0,0 +1,1069 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/app/zap-templates/zcl/data-model/silabs/wwah-silabs-devices.xml b/src/app/zap-templates/zcl/data-model/silabs/wwah-silabs-devices.xml new file mode 100644 index 00000000000000..a651435e3ed28a --- /dev/null +++ b/src/app/zap-templates/zcl/data-model/silabs/wwah-silabs-devices.xml @@ -0,0 +1,38 @@ + + + + + SL-WWAH-door-lock + WWAH + SL WWAH Door Lock + Coordinator + 0x0104 + 0x0000 + + Basic + Power Configuration + Identify + Over the Air Bootloading + Alarms + Poll Control + Door Lock + Diagnostics + Time + SL Works With All Hubs + + + diff --git a/src/app/zap-templates/zcl/data-model/silabs/wwah-silabs.xml b/src/app/zap-templates/zcl/data-model/silabs/wwah-silabs.xml new file mode 100644 index 00000000000000..6a04b4e326511d --- /dev/null +++ b/src/app/zap-templates/zcl/data-model/silabs/wwah-silabs.xml @@ -0,0 +1,352 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + SL Works With All Hubs + + Works With All Hubs + Silicon Labs proprietary attributes and commands for Works With All Hubs functional extensions. + 0xFC57 + + SL_WWAH_CLUSTER + true + true + + + + + disable ota downgrades + mgmt leave without rejoin enabled + network retry count + mac retry count + router checkin enabled + touchlink interpan enabled + wwah parent classification enabled + wwah app event retry enabled + wwah app event retry queue size + wwah rejoin enabled + mac poll failure wait time + configuration mode enabled + current debug report id + tc security on ntwk key rotation enabled + wwah bad parent recovery enabled + pending network update channel + pending network update pan id + ota max offline duration + + + Enable enforcement of APS-level security for all cluster commands. + + + + + + + Disable enforcement of APS-level security for all cluster commands. + + + + + + + Query status of APS-level security enforcement for a specified cluster. + + + + + + Trigger device to request a new APS link key from the Trust Center. + + + + + Enable WWAH App Event retry algorithm. + + + + + + + + + Disable WWAH App Event retry algorithm. + + + + + Trigger device to request current attribute values from Time Cluster server. + + + + + Enable WWAH rejoin algorithm. + + + + + + + + + + Disable WWAH rejoin algorithm. + + + + + Set the enrollment method of an IAS Zone server. + + + + + + Clear the binding table. + + + + + Enable device to periodically check connectivity with Zigbee Coordinator. + + + + + + Disable device from periodically checking connectivity with Zigbee Coordinator. + + + + + Set MAC poll failure wait time. + + + + + + Set pending network update parameters. + + + + + + + Require all unicast commands to have APS ACKs enabled. + + + + + + + Roll back changes made by Require APS ACK on Unicasts. + + + + + Query whether unicast commands are required to have APS ACKs enabled. + + + + + Query for specified debug report. + + + + + + Causes device to perform a scan for beacons advertising the device's network. + + + + + + Disallow OTA downgrade of all device firmware components. + + + + + Causes device to ignore MGMT Leave Without Rejoin commands. + + + + + Causes device to ignore Touchlink Interpan messages. + + + + + Enable WWAH Parent Classification advertisements. + + + + + Disable WWAH Parent Classification advertisements. + + + + + Process only network key rotation commands sent via unicast and encrypted by Trust Center Link Key. + + + + + Enable WWAH Bad Parent Recovery feature. + + + + + Disable WWAH Bad Parent Recovery feature. + + + + + Enable Configuration Mode. + + + + + Disable Configuration Mode. + + + + + Use only the Trust Center as cluster server for the set of clusters specified. + + + + + + + Causes device to send an appropriate Trust Center for Cluster Server Query Response command. + + + + + Command description for SlAPSLinkKeyAuthorizationQueryResponse + + + + + + + Command description for SlPoweringOffNotification + + + + + + + + + Command description for SlPoweringOnNotification + + + + + + + + + Command description for SlShortAddressChange + + + + + + + Command description for SlAPSAckEnablementQueryResponse + + + + + + + Command description for SlPowerDescriptorChange + + + + + + + + + Command description for SlNewDebugReportNotification + + + + + + + Command description for SlDebugReportQueryResponse + + + + + + + + Command description for SlTrustCenterForClusterServerQueryResponse + + + + + + + Command description for SlSurveyBeaconsResponse + + + + + + + + Command description for SlUseTrustCenterForClusterServerResponse + + + + + + + diff --git a/src/app/zap-templates/zcl/data-model/silabs/z3-nfr.xml b/src/app/zap-templates/zcl/data-model/silabs/z3-nfr.xml new file mode 100644 index 00000000000000..d746b489378051 --- /dev/null +++ b/src/app/zap-templates/zcl/data-model/silabs/z3-nfr.xml @@ -0,0 +1,49 @@ + + + + + + occupied setback + occupied setback min + occupied setback max + unoccupied setback + unoccupied setback min + unoccupied setback max + emergency heat delta + + + fan delay + + + backlight timeout + setpoint source indication + + + + current locale + + This command gets locales supported. + + + + + The locales supported response command is sent in response to a get locales supported command, and is used to discover which locales the device supports. + + + + + diff --git a/src/app/zap-templates/zcl/data-model/silabs/zcl-test.properties b/src/app/zap-templates/zcl/data-model/silabs/zcl-test.properties new file mode 100644 index 00000000000000..4a1ac9af279238 --- /dev/null +++ b/src/app/zap-templates/zcl/data-model/silabs/zcl-test.properties @@ -0,0 +1,44 @@ +# This file is provided for test of backwards compatibility. +# The actual files used to load the ZCL for default configuration +# is `zcl.json`, so if you want to affect how loading works for +# built-in configuration, please use that. +# +version=ZCL Test Data + +xmlRoot=. + +xmlFile=\ + types.xml, general.xml, \ + ha.xml, ha-devices.xml, \ + cba.xml, cba-devices.xml, \ + ota.xml, \ + ami.xml, ami-devices.xml, \ + zll.xml, zll-devices.xml, \ + ta.xml, ta-devices.xml, \ + hc.xml, hc-devices.xml, \ + green-power.xml, green-power-devices.xml + +manufacturersXml=../shared/manufacturers.xml +zclSchema=./schema/zcl.xsd +zclValidation=./schema/zcl-validation.js + +options.text.defaultResponsePolicy=Always, Conditional, Never +options.bool=commandDiscovery + +# NOTE NOTE NOTE: This does not work correctly, because JS +# converts 0x1002 automatically to a number, so it ends up being decimal +# 4098, which doesn't match the manufacturer code in the DB. +# You should not use this file for default. +# +# Please use `zcl.json` for these features, because +# the properties file is provided for testing backwards compatibility +# only anyway. +defaults.text.manufacturerCodes=0x1002 +defaults.text.defaultResponsePolicy=always +defaults.bool.commandDiscovery=true + +zigbeeDeviceType.ZA_COORDINATOR=Coordinator or Router +zigbeeDeviceType.ZA_ROUTER=Router +zigbeeDeviceType.ZA_END_DEVICE=End Device +zigbeeDeviceType.ZA_MOBILE_END_DEVICE=Mobile End Device +zigbeeDeviceType.ZA_SLEEPY_END_DEVICE=Sleepy End Device diff --git a/src/app/zap-templates/zcl/data-model/silabs/zcl.json b/src/app/zap-templates/zcl/data-model/silabs/zcl.json new file mode 100644 index 00000000000000..01e153b9298222 --- /dev/null +++ b/src/app/zap-templates/zcl/data-model/silabs/zcl.json @@ -0,0 +1,46 @@ +{ + "version": "ZCL Test Data", + "xmlRoot": ".", + "xmlFile": [ + "chip.xml", + "types.xml", + "general.xml", + "ha.xml", + "ha-devices.xml", + "cba.xml", + "cba-devices.xml", + "ota.xml", + "ami.xml", + "ami-devices.xml", + "zll.xml", + "zll-devices.xml", + "ta.xml", + "ta-devices.xml", + "hc.xml", + "hc-devices.xml", + "green-power.xml", + "green-power-devices.xml", + "silabs.xml", + "lo-devices.xml", + "wwah-silabs.xml", + "wwah-silabs-devices.xml" + ], + "zclSchema": "./schema/zcl.xsd", + "manufacturersXml": "../shared/manufacturers.xml", + "zclValidation": "./schema/zcl-validation.js", + "options": { + "text": { + "defaultResponsePolicy": ["Always", "Conditional", "Never"] + }, + "bool": ["commandDiscovery"] + }, + "defaults": { + "text": { + "manufacturerCodes": "0x1002", + "defaultResponsePolicy": "always" + }, + "bool": { + "commandDiscovery": true + } + } +} diff --git a/src/app/zap-templates/zcl/data-model/silabs/zll-devices.xml b/src/app/zap-templates/zcl/data-model/silabs/zll-devices.xml new file mode 100644 index 00000000000000..ece6d49662e20f --- /dev/null +++ b/src/app/zap-templates/zcl/data-model/silabs/zll-devices.xml @@ -0,0 +1,1241 @@ + + + + + ZLL-onofflight + ZLL + ZLL On/Off Light + Router + 0x0104 + 0x0000 + + + VERSION + APPLICATION_VERSION + STACK_VERSION + HW_VERSION + MANUFACTURER_NAME + MODEL_IDENTIFIER + DATE_CODE + POWER_SOURCE + SW_BUILD_ID + + + ScanRequest + DeviceInformationRequest + IdentifyRequest + ResetToFactoryNewRequest + NetworkStartRequest + NetworkJoinRouterRequest + NetworkJoinEndDeviceRequest + NetworkUpdateRequest + GetGroupIdentifiersRequest + GetEndpointListRequest + ScanResponse + DeviceInformationResponse + NetworkStartResponse + NetworkJoinRouterResponse + NetworkJoinEndDeviceResponse + EndpointInformation + GetGroupIdentifiersResponse + GetEndpointListResponse + + + IDENTIFY_TIME + Identify + IdentifyQuery + TriggerEffect + + + GROUP_NAME_SUPPORT + AddGroup + ViewGroup + GetGroupMembership + RemoveGroup + RemoveAllGroups + AddGroupIfIdentifying + + + SCENE_COUNT + CURRENT_SCENE + CURRENT_GROUP + SCENE_VALID + SCENE_NAME_SUPPORT + AddScene + ViewScene + RemoveScene + RemoveAllScenes + StoreScene + RecallScene + GetSceneMembership + EnhancedAddScene + EnhancedViewScene + CopyScene + + + ON_OFF + GLOBAL_SCENE_CONTROL + ON_TIME + OFF_WAIT_TIME + Off + On + Toggle + OffWithEffect + OnWithRecallGlobalScene + OnWithTimedOff + + + CURRENT_LEVEL + LEVEL_CONTROL_REMAINING_TIME + MoveToLevel + Move + Step + Stop + MoveToLevelWithOnOff + MoveWithOnOff + StepWithOnOff + StopWithOnOff + + + + + + ZLL-onoffpluginunit + ZLL + ZLL On/Off Plug-in Unit + Router + 0x0104 + 0x0010 + + + VERSION + APPLICATION_VERSION + STACK_VERSION + HW_VERSION + MANUFACTURER_NAME + MODEL_IDENTIFIER + DATE_CODE + POWER_SOURCE + SW_BUILD_ID + + + ScanRequest + DeviceInformationRequest + IdentifyRequest + ResetToFactoryNewRequest + NetworkStartRequest + NetworkJoinRouterRequest + NetworkJoinEndDeviceRequest + NetworkUpdateRequest + GetGroupIdentifiersRequest + GetEndpointListRequest + ScanResponse + DeviceInformationResponse + NetworkStartResponse + NetworkJoinRouterResponse + NetworkJoinEndDeviceResponse + EndpointInformation + GetGroupIdentifiersResponse + GetEndpointListResponse + + + IDENTIFY_TIME + Identify + IdentifyQuery + TriggerEffect + + + GROUP_NAME_SUPPORT + AddGroup + ViewGroup + GetGroupMembership + RemoveGroup + RemoveAllGroups + AddGroupIfIdentifying + + + SCENE_COUNT + CURRENT_SCENE + CURRENT_GROUP + SCENE_VALID + SCENE_NAME_SUPPORT + AddScene + ViewScene + RemoveScene + RemoveAllScenes + StoreScene + RecallScene + GetSceneMembership + EnhancedAddScene + EnhancedViewScene + CopyScene + + + ON_OFF + GLOBAL_SCENE_CONTROL + ON_TIME + OFF_WAIT_TIME + Off + On + Toggle + OffWithEffect + OnWithRecallGlobalScene + OnWithTimedOff + + + CURRENT_LEVEL + LEVEL_CONTROL_REMAINING_TIME + MoveToLevel + Move + Step + Stop + MoveToLevelWithOnOff + MoveWithOnOff + StepWithOnOff + StopWithOnOff + + + + + + ZLL-dimmablelight + ZLL + ZLL Dimmable Light + Router + 0x0104 + 0x0100 + + + VERSION + APPLICATION_VERSION + STACK_VERSION + HW_VERSION + MANUFACTURER_NAME + MODEL_IDENTIFIER + DATE_CODE + POWER_SOURCE + SW_BUILD_ID + + + ScanRequest + DeviceInformationRequest + IdentifyRequest + ResetToFactoryNewRequest + NetworkStartRequest + NetworkJoinRouterRequest + NetworkJoinEndDeviceRequest + NetworkUpdateRequest + GetGroupIdentifiersRequest + GetEndpointListRequest + ScanResponse + DeviceInformationResponse + NetworkStartResponse + NetworkJoinRouterResponse + NetworkJoinEndDeviceResponse + EndpointInformation + GetGroupIdentifiersResponse + GetEndpointListResponse + + + IDENTIFY_TIME + Identify + IdentifyQuery + TriggerEffect + + + GROUP_NAME_SUPPORT + AddGroup + ViewGroup + GetGroupMembership + RemoveGroup + RemoveAllGroups + AddGroupIfIdentifying + + + SCENE_COUNT + CURRENT_SCENE + CURRENT_GROUP + SCENE_VALID + SCENE_NAME_SUPPORT + AddScene + ViewScene + RemoveScene + RemoveAllScenes + StoreScene + RecallScene + GetSceneMembership + EnhancedAddScene + EnhancedViewScene + CopyScene + + + ON_OFF + GLOBAL_SCENE_CONTROL + ON_TIME + OFF_WAIT_TIME + Off + On + Toggle + OffWithEffect + OnWithRecallGlobalScene + OnWithTimedOff + + + CURRENT_LEVEL + LEVEL_CONTROL_REMAINING_TIME + MoveToLevel + Move + Step + Stop + MoveToLevelWithOnOff + MoveWithOnOff + StepWithOnOff + StopWithOnOff + + + + + + ZLL-dimmablepluginunit + ZLL + ZLL Dimmable Plug-in Unit + Router + 0x0104 + 0x0110 + + + VERSION + APPLICATION_VERSION + STACK_VERSION + HW_VERSION + MANUFACTURER_NAME + MODEL_IDENTIFIER + DATE_CODE + POWER_SOURCE + SW_BUILD_ID + + + ScanRequest + DeviceInformationRequest + IdentifyRequest + ResetToFactoryNewRequest + NetworkStartRequest + NetworkJoinRouterRequest + NetworkJoinEndDeviceRequest + NetworkUpdateRequest + GetGroupIdentifiersRequest + GetEndpointListRequest + ScanResponse + DeviceInformationResponse + NetworkStartResponse + NetworkJoinRouterResponse + NetworkJoinEndDeviceResponse + EndpointInformation + GetGroupIdentifiersResponse + GetEndpointListResponse + + + IDENTIFY_TIME + Identify + IdentifyQuery + TriggerEffect + + + GROUP_NAME_SUPPORT + AddGroup + ViewGroup + GetGroupMembership + RemoveGroup + RemoveAllGroups + AddGroupIfIdentifying + + + SCENE_COUNT + CURRENT_SCENE + CURRENT_GROUP + SCENE_VALID + SCENE_NAME_SUPPORT + AddScene + ViewScene + RemoveScene + RemoveAllScenes + StoreScene + RecallScene + GetSceneMembership + EnhancedAddScene + EnhancedViewScene + CopyScene + + + ON_OFF + GLOBAL_SCENE_CONTROL + ON_TIME + OFF_WAIT_TIME + Off + On + Toggle + OffWithEffect + OnWithRecallGlobalScene + OnWithTimedOff + + + CURRENT_LEVEL + LEVEL_CONTROL_REMAINING_TIME + MoveToLevel + Move + Step + Stop + MoveToLevelWithOnOff + MoveWithOnOff + StepWithOnOff + StopWithOnOff + + + + + + ZLL-colorlight + ZLL + ZLL Color Light + Router + 0x0104 + 0x0200 + + + VERSION + APPLICATION_VERSION + STACK_VERSION + HW_VERSION + MANUFACTURER_NAME + MODEL_IDENTIFIER + DATE_CODE + POWER_SOURCE + SW_BUILD_ID + + + ScanRequest + DeviceInformationRequest + IdentifyRequest + ResetToFactoryNewRequest + NetworkStartRequest + NetworkJoinRouterRequest + NetworkJoinEndDeviceRequest + NetworkUpdateRequest + GetGroupIdentifiersRequest + GetEndpointListRequest + ScanResponse + DeviceInformationResponse + NetworkStartResponse + NetworkJoinRouterResponse + NetworkJoinEndDeviceResponse + EndpointInformation + GetGroupIdentifiersResponse + GetEndpointListResponse + + + IDENTIFY_TIME + Identify + IdentifyQuery + TriggerEffect + + + GROUP_NAME_SUPPORT + AddGroup + ViewGroup + GetGroupMembership + RemoveGroup + RemoveAllGroups + AddGroupIfIdentifying + + + SCENE_COUNT + CURRENT_SCENE + CURRENT_GROUP + SCENE_VALID + SCENE_NAME_SUPPORT + AddScene + ViewScene + RemoveScene + RemoveAllScenes + StoreScene + RecallScene + GetSceneMembership + EnhancedAddScene + EnhancedViewScene + CopyScene + + + ON_OFF + GLOBAL_SCENE_CONTROL + ON_TIME + OFF_WAIT_TIME + Off + On + Toggle + OffWithEffect + OnWithRecallGlobalScene + OnWithTimedOff + + + CURRENT_LEVEL + LEVEL_CONTROL_REMAINING_TIME + MoveToLevel + Move + Step + Stop + MoveToLevelWithOnOff + MoveWithOnOff + StepWithOnOff + StopWithOnOff + + + COLOR_CONTROL_CURRENT_HUE + COLOR_CONTROL_CURRENT_SATURATION + COLOR_CONTROL_REMAINING_TIME + COLOR_CONTROL_CURRENT_X + COLOR_CONTROL_CURRENT_Y + COLOR_CONTROL_COLOR_TEMPERATURE + COLOR_CONTROL_COLOR_MODE + COLOR_CONTROL_NUMBER_OF_PRIMARIES + COLOR_CONTROL_PRIMARY_1_X + COLOR_CONTROL_PRIMARY_1_Y + COLOR_CONTROL_PRIMARY_1_INTENSITY + COLOR_CONTROL_PRIMARY_2_X + COLOR_CONTROL_PRIMARY_2_Y + COLOR_CONTROL_PRIMARY_2_INTENSITY + COLOR_CONTROL_PRIMARY_3_X + COLOR_CONTROL_PRIMARY_3_Y + COLOR_CONTROL_PRIMARY_3_INTENSITY + COLOR_CONTROL_PRIMARY_4_X + COLOR_CONTROL_PRIMARY_4_Y + COLOR_CONTROL_PRIMARY_4_INTENSITY + COLOR_CONTROL_PRIMARY_5_X + COLOR_CONTROL_PRIMARY_5_Y + COLOR_CONTROL_PRIMARY_5_INTENSITY + COLOR_CONTROL_PRIMARY_6_X + COLOR_CONTROL_PRIMARY_6_Y + COLOR_CONTROL_PRIMARY_6_INTENSITY + COLOR_CONTROL_ENHANCED_CURRENT_HUE + COLOR_CONTROL_ENHANCED_COLOR_MODE + COLOR_CONTROL_COLOR_LOOP_ACTIVE + COLOR_CONTROL_COLOR_LOOP_DIRECTION + COLOR_CONTROL_COLOR_LOOP_TIME + COLOR_CONTROL_COLOR_LOOP_START_ENHANCED_HUE + COLOR_CONTROL_COLOR_LOOP_STORED_ENHANCED_HUE + COLOR_CONTROL_COLOR_CAPABILITIES + COLOR_CONTROL_COLOR_TEMP_PHYSICAL_MIN + COLOR_CONTROL_COLOR_TEMP_PHYSICAL_MAX + MoveToHue + MoveHue + StepHue + MoveToSaturation + MoveSaturation + StepSaturation + MoveToHueAndSaturation + MoveToColor + MoveColor + StepColor + MoveToColorTemperature + EnhancedMoveToHue + EnhancedMoveHue + EnhancedStepHue + EnhancedMoveToHueAndSaturation + ColorLoopSet + StopMoveStep + MoveColorTemperature + StepColorTemperature + + + + + + ZLL-extendedcolorlight + ZLL + ZLL Extended Color Light + Router + 0x0104 + 0x0210 + + + VERSION + APPLICATION_VERSION + STACK_VERSION + HW_VERSION + MANUFACTURER_NAME + MODEL_IDENTIFIER + DATE_CODE + POWER_SOURCE + SW_BUILD_ID + + + ScanRequest + DeviceInformationRequest + IdentifyRequest + ResetToFactoryNewRequest + NetworkStartRequest + NetworkJoinRouterRequest + NetworkJoinEndDeviceRequest + NetworkUpdateRequest + GetGroupIdentifiersRequest + GetEndpointListRequest + ScanResponse + DeviceInformationResponse + NetworkStartResponse + NetworkJoinRouterResponse + NetworkJoinEndDeviceResponse + EndpointInformation + GetGroupIdentifiersResponse + GetEndpointListResponse + + + IDENTIFY_TIME + Identify + IdentifyQuery + TriggerEffect + + + GROUP_NAME_SUPPORT + AddGroup + ViewGroup + GetGroupMembership + RemoveGroup + RemoveAllGroups + AddGroupIfIdentifying + + + SCENE_COUNT + CURRENT_SCENE + CURRENT_GROUP + SCENE_VALID + SCENE_NAME_SUPPORT + AddScene + ViewScene + RemoveScene + RemoveAllScenes + StoreScene + RecallScene + GetSceneMembership + EnhancedAddScene + EnhancedViewScene + CopyScene + + + ON_OFF + GLOBAL_SCENE_CONTROL + ON_TIME + OFF_WAIT_TIME + Off + On + Toggle + OffWithEffect + OnWithRecallGlobalScene + OnWithTimedOff + + + CURRENT_LEVEL + LEVEL_CONTROL_REMAINING_TIME + MoveToLevel + Move + Step + Stop + MoveToLevelWithOnOff + MoveWithOnOff + StepWithOnOff + StopWithOnOff + + + COLOR_CONTROL_CURRENT_HUE + COLOR_CONTROL_CURRENT_SATURATION + COLOR_CONTROL_REMAINING_TIME + COLOR_CONTROL_CURRENT_X + COLOR_CONTROL_CURRENT_Y + COLOR_CONTROL_COLOR_TEMPERATURE + COLOR_CONTROL_COLOR_MODE + COLOR_CONTROL_NUMBER_OF_PRIMARIES + COLOR_CONTROL_PRIMARY_1_X + COLOR_CONTROL_PRIMARY_1_Y + COLOR_CONTROL_PRIMARY_1_INTENSITY + COLOR_CONTROL_PRIMARY_2_X + COLOR_CONTROL_PRIMARY_2_Y + COLOR_CONTROL_PRIMARY_2_INTENSITY + COLOR_CONTROL_PRIMARY_3_X + COLOR_CONTROL_PRIMARY_3_Y + COLOR_CONTROL_PRIMARY_3_INTENSITY + COLOR_CONTROL_PRIMARY_4_X + COLOR_CONTROL_PRIMARY_4_Y + COLOR_CONTROL_PRIMARY_4_INTENSITY + COLOR_CONTROL_PRIMARY_5_X + COLOR_CONTROL_PRIMARY_5_Y + COLOR_CONTROL_PRIMARY_5_INTENSITY + COLOR_CONTROL_PRIMARY_6_X + COLOR_CONTROL_PRIMARY_6_Y + COLOR_CONTROL_PRIMARY_6_INTENSITY + COLOR_CONTROL_ENHANCED_CURRENT_HUE + COLOR_CONTROL_ENHANCED_COLOR_MODE + COLOR_CONTROL_COLOR_LOOP_ACTIVE + COLOR_CONTROL_COLOR_LOOP_DIRECTION + COLOR_CONTROL_COLOR_LOOP_TIME + COLOR_CONTROL_COLOR_LOOP_START_ENHANCED_HUE + COLOR_CONTROL_COLOR_LOOP_STORED_ENHANCED_HUE + COLOR_CONTROL_COLOR_CAPABILITIES + COLOR_CONTROL_COLOR_TEMP_PHYSICAL_MIN + COLOR_CONTROL_COLOR_TEMP_PHYSICAL_MAX + MoveToHue + MoveHue + StepHue + MoveToSaturation + MoveSaturation + StepSaturation + MoveToHueAndSaturation + MoveToColor + MoveColor + StepColor + MoveToColorTemperature + EnhancedMoveToHue + EnhancedMoveHue + EnhancedStepHue + EnhancedMoveToHueAndSaturation + ColorLoopSet + StopMoveStep + MoveColorTemperature + StepColorTemperature + + + + + + ZLL-colortemperaturelight + ZLL + ZLL Color Temperature Light + Router + 0x0104 + 0x0220 + + + VERSION + APPLICATION_VERSION + STACK_VERSION + HW_VERSION + MANUFACTURER_NAME + MODEL_IDENTIFIER + DATE_CODE + POWER_SOURCE + SW_BUILD_ID + + + ScanRequest + DeviceInformationRequest + IdentifyRequest + ResetToFactoryNewRequest + NetworkStartRequest + NetworkJoinRouterRequest + NetworkJoinEndDeviceRequest + NetworkUpdateRequest + GetGroupIdentifiersRequest + GetEndpointListRequest + ScanResponse + DeviceInformationResponse + NetworkStartResponse + NetworkJoinRouterResponse + NetworkJoinEndDeviceResponse + EndpointInformation + GetGroupIdentifiersResponse + GetEndpointListResponse + + + IDENTIFY_TIME + Identify + IdentifyQuery + TriggerEffect + + + GROUP_NAME_SUPPORT + AddGroup + ViewGroup + GetGroupMembership + RemoveGroup + RemoveAllGroups + AddGroupIfIdentifying + + + SCENE_COUNT + CURRENT_SCENE + CURRENT_GROUP + SCENE_VALID + SCENE_NAME_SUPPORT + AddScene + ViewScene + RemoveScene + RemoveAllScenes + StoreScene + RecallScene + GetSceneMembership + EnhancedAddScene + EnhancedViewScene + CopyScene + + + ON_OFF + GLOBAL_SCENE_CONTROL + ON_TIME + OFF_WAIT_TIME + Off + On + Toggle + OffWithEffect + OnWithRecallGlobalScene + OnWithTimedOff + + + CURRENT_LEVEL + LEVEL_CONTROL_REMAINING_TIME + MoveToLevel + Move + Step + Stop + MoveToLevelWithOnOff + MoveWithOnOff + StepWithOnOff + StopWithOnOff + + + COLOR_CONTROL_CURRENT_HUE + COLOR_CONTROL_CURRENT_SATURATION + COLOR_CONTROL_REMAINING_TIME + COLOR_CONTROL_CURRENT_X + COLOR_CONTROL_CURRENT_Y + COLOR_CONTROL_COLOR_TEMPERATURE + COLOR_CONTROL_COLOR_MODE + COLOR_CONTROL_NUMBER_OF_PRIMARIES + COLOR_CONTROL_PRIMARY_1_X + COLOR_CONTROL_PRIMARY_1_Y + COLOR_CONTROL_PRIMARY_1_INTENSITY + COLOR_CONTROL_PRIMARY_2_X + COLOR_CONTROL_PRIMARY_2_Y + COLOR_CONTROL_PRIMARY_2_INTENSITY + COLOR_CONTROL_PRIMARY_3_X + COLOR_CONTROL_PRIMARY_3_Y + COLOR_CONTROL_PRIMARY_3_INTENSITY + COLOR_CONTROL_PRIMARY_4_X + COLOR_CONTROL_PRIMARY_4_Y + COLOR_CONTROL_PRIMARY_4_INTENSITY + COLOR_CONTROL_PRIMARY_5_X + COLOR_CONTROL_PRIMARY_5_Y + COLOR_CONTROL_PRIMARY_5_INTENSITY + COLOR_CONTROL_PRIMARY_6_X + COLOR_CONTROL_PRIMARY_6_Y + COLOR_CONTROL_PRIMARY_6_INTENSITY + COLOR_CONTROL_ENHANCED_CURRENT_HUE + COLOR_CONTROL_ENHANCED_COLOR_MODE + COLOR_CONTROL_COLOR_LOOP_ACTIVE + COLOR_CONTROL_COLOR_LOOP_DIRECTION + COLOR_CONTROL_COLOR_LOOP_TIME + COLOR_CONTROL_COLOR_LOOP_START_ENHANCED_HUE + COLOR_CONTROL_COLOR_LOOP_STORED_ENHANCED_HUE + COLOR_CONTROL_COLOR_CAPABILITIES + COLOR_CONTROL_COLOR_TEMP_PHYSICAL_MIN + COLOR_CONTROL_COLOR_TEMP_PHYSICAL_MAX + MoveToHue + MoveHue + StepHue + MoveToSaturation + MoveSaturation + StepSaturation + MoveToHueAndSaturation + MoveToColor + MoveColor + StepColor + MoveToColorTemperature + EnhancedMoveToHue + EnhancedMoveHue + EnhancedStepHue + EnhancedMoveToHueAndSaturation + ColorLoopSet + StopMoveStep + MoveColorTemperature + StepColorTemperature + + + + + + ZLL-colorremote + ZLL + ZLL Color Controller + End Device + 0x0104 + 0x0800 + + + VERSION + APPLICATION_VERSION + STACK_VERSION + HW_VERSION + MANUFACTURER_NAME + MODEL_IDENTIFIER + DATE_CODE + POWER_SOURCE + SW_BUILD_ID + + + ScanRequest + DeviceInformationRequest + IdentifyRequest + ResetToFactoryNewRequest + NetworkStartRequest + NetworkJoinRouterRequest + NetworkJoinEndDeviceRequest + NetworkUpdateRequest + GetGroupIdentifiersRequest + GetEndpointListRequest + ScanResponse + DeviceInformationResponse + NetworkStartResponse + NetworkJoinRouterResponse + NetworkJoinEndDeviceResponse + EndpointInformation + GetGroupIdentifiersResponse + GetEndpointListResponse + + + IdentifyQueryResponse + + + AddGroupResponse + ViewGroupResponse + GetGroupMembershipResponse + RemoveGroupResponse + + + + + + + + + ZLL-colorsceneremote + ZLL + ZLL Color Scene Controller + End Device + 0x0104 + 0x0810 + + + VERSION + APPLICATION_VERSION + STACK_VERSION + HW_VERSION + MANUFACTURER_NAME + MODEL_IDENTIFIER + DATE_CODE + POWER_SOURCE + SW_BUILD_ID + + + ScanRequest + DeviceInformationRequest + IdentifyRequest + ResetToFactoryNewRequest + NetworkStartRequest + NetworkJoinRouterRequest + NetworkJoinEndDeviceRequest + NetworkUpdateRequest + GetGroupIdentifiersRequest + GetEndpointListRequest + ScanResponse + DeviceInformationResponse + NetworkStartResponse + NetworkJoinRouterResponse + NetworkJoinEndDeviceResponse + EndpointInformation + GetGroupIdentifiersResponse + GetEndpointListResponse + + + IdentifyQueryResponse + + + AddGroupResponse + ViewGroupResponse + GetGroupMembershipResponse + RemoveGroupResponse + + + AddSceneResponse + ViewSceneResponse + RemoveSceneResponse + RemoveAllScenesResponse + StoreSceneResponse + GetSceneMembershipResponse + EnhancedAddSceneResponse + EnhancedViewSceneResponse + CopySceneResponse + + + + + + + + + ZLL-noncolorremote + ZLL + ZLL Non-color Controller + End Device + 0x0104 + 0x0820 + + + VERSION + APPLICATION_VERSION + STACK_VERSION + HW_VERSION + MANUFACTURER_NAME + MODEL_IDENTIFIER + DATE_CODE + POWER_SOURCE + SW_BUILD_ID + + + ScanRequest + DeviceInformationRequest + IdentifyRequest + ResetToFactoryNewRequest + NetworkStartRequest + NetworkJoinRouterRequest + NetworkJoinEndDeviceRequest + NetworkUpdateRequest + GetGroupIdentifiersRequest + GetEndpointListRequest + ScanResponse + DeviceInformationResponse + NetworkStartResponse + NetworkJoinRouterResponse + NetworkJoinEndDeviceResponse + EndpointInformation + GetGroupIdentifiersResponse + GetEndpointListResponse + + + IdentifyQueryResponse + + + AddGroupResponse + ViewGroupResponse + GetGroupMembershipResponse + RemoveGroupResponse + + + + + + + + ZLL-noncolorsceneremote + ZLL + ZLL Non-color Scene Controller + End Device + 0x0104 + 0x0830 + + + VERSION + APPLICATION_VERSION + STACK_VERSION + HW_VERSION + MANUFACTURER_NAME + MODEL_IDENTIFIER + DATE_CODE + POWER_SOURCE + SW_BUILD_ID + + + ScanRequest + DeviceInformationRequest + IdentifyRequest + ResetToFactoryNewRequest + NetworkStartRequest + NetworkJoinRouterRequest + NetworkJoinEndDeviceRequest + NetworkUpdateRequest + GetGroupIdentifiersRequest + GetEndpointListRequest + ScanResponse + DeviceInformationResponse + NetworkStartResponse + NetworkJoinRouterResponse + NetworkJoinEndDeviceResponse + EndpointInformation + GetGroupIdentifiersResponse + GetEndpointListResponse + + + IdentifyQueryResponse + + + AddGroupResponse + ViewGroupResponse + GetGroupMembershipResponse + RemoveGroupResponse + + + AddSceneResponse + ViewSceneResponse + RemoveSceneResponse + RemoveAllScenesResponse + StoreSceneResponse + GetSceneMembershipResponse + EnhancedAddSceneResponse + EnhancedViewSceneResponse + CopySceneResponse + + + + + + + + ZLL-controlbridge + ZLL + ZLL Control Bridge + Router + 0x0104 + 0x0840 + + + VERSION + APPLICATION_VERSION + STACK_VERSION + HW_VERSION + MANUFACTURER_NAME + MODEL_IDENTIFIER + DATE_CODE + POWER_SOURCE + SW_BUILD_ID + + + ScanRequest + DeviceInformationRequest + IdentifyRequest + ResetToFactoryNewRequest + NetworkStartRequest + NetworkJoinRouterRequest + NetworkJoinEndDeviceRequest + NetworkUpdateRequest + GetGroupIdentifiersRequest + GetEndpointListRequest + ScanResponse + DeviceInformationResponse + NetworkStartResponse + NetworkJoinRouterResponse + NetworkJoinEndDeviceResponse + EndpointInformation + GetGroupIdentifiersResponse + GetEndpointListResponse + + + IdentifyQueryResponse + + + AddGroupResponse + ViewGroupResponse + GetGroupMembershipResponse + RemoveGroupResponse + + + AddSceneResponse + ViewSceneResponse + RemoveSceneResponse + RemoveAllScenesResponse + StoreSceneResponse + GetSceneMembershipResponse + EnhancedAddSceneResponse + EnhancedViewSceneResponse + CopySceneResponse + + + + + + + + + ZLL-onoffsensor + ZLL + ZLL On/Off Sensor + End Device + 0x0104 + 0x0850 + + + VERSION + APPLICATION_VERSION + STACK_VERSION + HW_VERSION + MANUFACTURER_NAME + MODEL_IDENTIFIER + DATE_CODE + POWER_SOURCE + SW_BUILD_ID + + + ScanRequest + DeviceInformationRequest + IdentifyRequest + ResetToFactoryNewRequest + NetworkStartRequest + NetworkJoinRouterRequest + NetworkJoinEndDeviceRequest + NetworkUpdateRequest + GetGroupIdentifiersRequest + GetEndpointListRequest + ScanResponse + DeviceInformationResponse + NetworkStartResponse + NetworkJoinRouterResponse + NetworkJoinEndDeviceResponse + EndpointInformation + GetGroupIdentifiersResponse + GetEndpointListResponse + + + IdentifyQueryResponse + + + AddGroupResponse + ViewGroupResponse + GetGroupMembershipResponse + RemoveGroupResponse + + + AddSceneResponse + ViewSceneResponse + RemoveSceneResponse + RemoveAllScenesResponse + StoreSceneResponse + GetSceneMembershipResponse + EnhancedAddSceneResponse + EnhancedViewSceneResponse + CopySceneResponse + + + + + + + + diff --git a/src/app/zap-templates/zcl/data-model/silabs/zll-thread.xml b/src/app/zap-templates/zcl/data-model/silabs/zll-thread.xml new file mode 100644 index 00000000000000..d1933309d04e27 --- /dev/null +++ b/src/app/zap-templates/zcl/data-model/silabs/zll-thread.xml @@ -0,0 +1,511 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + sw build id + + + + + Command description for TriggerEffect + + + + + + + + + Command description for EnhancedAddScene + + + + + + + + + + Command description for EnhancedViewScene + + + + + + + Command description for CopyScene + + + + + + + + + + Command description for EnhancedAddSceneResponse + + + + + + + + Command description for EnhancedViewSceneResponse + + + + + + + + + + + Command description for CopySceneResponse + + + + + + + + global scene control + on time + off wait time + + + Command description for OffWithEffect + + + + + + + Command description for OnWithRecallGlobalScene + + + + + Command description for OnWithTimedOff + + + + + + + + enhanced current hue + enhanced color mode + color loop active + color loop direction + color loop time + color loop start enhanced hue + color loop stored enhanced hue + color capabilities + color temp physical min + color temp physical max + + + Command description for EnhancedMoveToHue + + + + + + + + Command description for EnhancedMoveHue + + + + + + + Command description for EnhancedStepHue + + + + + + + + Command description for EnhancedMoveToHueAndSaturation + + + + + + + + Command description for ColorLoopSet + + + + + + + + + + Command description for StopMoveStep + + + + + Command description for MoveColorTemperature + + + + + + + + + Command description for StepColorTemperature + + + + + + + + + + ZLL Commissioning + ZLL + The ZLL commissioning cluster provides commands to support touch link commissioning. + 0x1000 + ZLL_COMMISSIONING_CLUSTER + true + true + + + Command description for ScanRequest + + + + + + + + Command description for DeviceInformationRequest + + + + + + + Command description for IdentifyRequest + + + + + + + Command description for ResetToFactoryNewRequest + + + + + + Command description for NetworkStartRequest + + + + + + + + + + + + + + + + + + + + Command description for NetworkJoinRouterRequest + + + + + + + + + + + + + + + + + + + Command description for NetworkJoinEndDeviceRequest + + + + + + + + + + + + + + + + + + + Command description for NetworkUpdateRequest + + + + + + + + + + + Command description for GetGroupIdentifiersRequest + + + + + + Command description for GetEndpointListRequest + + + + + + Command description for ScanResponse + + + + + + + + + + + + + + + + + + + + + + + + + + + + Command description for DeviceInformationResponse + + + + + + + + + + Command description for NetworkStartResponse + + + + + + + + + + + Command description for NetworkJoinRouterResponse + + + + + + + Command description for NetworkJoinEndDeviceResponse + + + + + + + Command description for EndpointInformation + + + + + + + + + + + Command description for GetGroupIdentifiersResponse + + + + + + + + + Command description for GetEndpointListResponse + + + + + + + + diff --git a/src/app/zap-templates/zcl/data-model/silabs/zll.xml b/src/app/zap-templates/zcl/data-model/silabs/zll.xml new file mode 100644 index 00000000000000..1268b4c09fb60e --- /dev/null +++ b/src/app/zap-templates/zcl/data-model/silabs/zll.xml @@ -0,0 +1,517 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + sw build id + + + + + Command description for TriggerEffect + + + + + + + + + Command description for EnhancedAddScene + + + + + + + + + + Command description for EnhancedViewScene + + + + + + + Command description for CopyScene + + + + + + + + + + Command description for EnhancedAddSceneResponse + + + + + + + + Command description for EnhancedViewSceneResponse + + + + + + + + + + + Command description for CopySceneResponse + + + + + + + + global scene control + on time + off wait time + + + Command description for OffWithEffect + + + + + + + Command description for OnWithRecallGlobalScene + + + + + Command description for OnWithTimedOff + + + + + + + + enhanced current hue + enhanced color mode + color loop active + color loop direction + color loop time + color loop start enhanced hue + color loop stored enhanced hue + color capabilities + color temp physical min + color temp physical max + + + Command description for EnhancedMoveToHue + + + + + + + + Command description for EnhancedMoveHue + + + + + + + Command description for EnhancedStepHue + + + + + + + + Command description for EnhancedMoveToHueAndSaturation + + + + + + + + Command description for ColorLoopSet + + + + + + + + + + Command description for StopMoveStep + + + + + + + Command description for MoveColorTemperature + + + + + + + + + + + Command description for StepColorTemperature + + + + + + + + + + + + ZLL Commissioning + ZLL + The ZLL commissioning cluster provides commands to support touch link commissioning. + 0x1000 + ZLL_COMMISSIONING_CLUSTER + true + true + + + Command description for ScanRequest + + + + + + + + Command description for DeviceInformationRequest + + + + + + + Command description for IdentifyRequest + + + + + + + Command description for ResetToFactoryNewRequest + + + + + + Command description for NetworkStartRequest + + + + + + + + + + + + + + + + + + + + Command description for NetworkJoinRouterRequest + + + + + + + + + + + + + + + + + + + Command description for NetworkJoinEndDeviceRequest + + + + + + + + + + + + + + + + + + + Command description for NetworkUpdateRequest + + + + + + + + + + + Command description for GetGroupIdentifiersRequest + + + + + + Command description for GetEndpointListRequest + + + + + + Command description for ScanResponse + + + + + + + + + + + + + + + + + + + + + + + + + + + + Command description for DeviceInformationResponse + + + + + + + + + + Command description for NetworkStartResponse + + + + + + + + + + + Command description for NetworkJoinRouterResponse + + + + + + + Command description for NetworkJoinEndDeviceResponse + + + + + + + Command description for EndpointInformation + + + + + + + + + + + Command description for GetGroupIdentifiersResponse + + + + + + + + + Command description for GetEndpointListResponse + + + + + + + + diff --git a/src/app/zap-templates/zcl/zcl.json b/src/app/zap-templates/zcl/zcl.json index 360f43b6f65cf0..a54d6dd133142f 100644 --- a/src/app/zap-templates/zcl/zcl.json +++ b/src/app/zap-templates/zcl/zcl.json @@ -1,6 +1,6 @@ { "version": "ZCL Test Data", - "xmlRoot": [".", "../../../../third_party/zap/repo/zcl-builtin/silabs/"], + "xmlRoot": [".", "./data-model/silabs/"], "xmlFile": [ "binding-cluster.xml", "clusters-extensions.xml", From ec761ed447bddabac24784861f3097d71e75fa7d Mon Sep 17 00:00:00 2001 From: Vivien Nicolas Date: Wed, 3 Feb 2021 02:56:02 +0100 Subject: [PATCH 20/24] Add a dumb gen_tokens.zapt file to src/app/zap-templates (#4589) #### Problem `gen_tokens.h` is one of the file required by `src/app` but that it still missing a template. If someone tries to create a new app from scratch using `ZAP` it will complains that `gen_tokens.h` is missing. This PR introduce a dumb template based on the content of `gen_tokens.h` from what is in the tree. The tokens list is empty because the tokens code has not yet been fixed in `src/app` and so nobody uses it at the moment. Most of the changes from this PR comes from syncing the tree with the actual zap templates. --- .../all-clusters-common/gen/af-structs.h | 4 +- .../all-clusters-common/gen/att-storage.h | 4 +- .../all-clusters-common/gen/attribute-id.h | 4 +- .../all-clusters-common/gen/attribute-size.h | 4 +- .../all-clusters-common/gen/attribute-type.h | 4 +- .../gen/call-command-handler.cpp | 4 +- .../gen/call-command-handler.h | 4 +- .../all-clusters-common/gen/callback-stub.cpp | 105 +++++++++++------ .../all-clusters-common/gen/callback.h | 4 +- .../gen/client-command-macro.h | 4 +- .../all-clusters-common/gen/cluster-id.h | 4 +- .../all-clusters-common/gen/command-id.h | 4 +- .../all-clusters-common/gen/endpoint_config.h | 4 +- .../all-clusters-common/gen/enums.h | 4 +- .../all-clusters-common/gen/gen_config.h | 4 +- .../all-clusters-common/gen/gen_tokens.h | 27 +---- .../all-clusters-common/gen/print-cluster.h | 4 +- .../bridge-app/bridge-common/gen/af-structs.h | 4 +- .../bridge-common/gen/att-storage.h | 4 +- .../bridge-common/gen/attribute-id.h | 4 +- .../bridge-common/gen/attribute-size.h | 4 +- .../bridge-common/gen/attribute-type.h | 4 +- .../gen/call-command-handler.cpp | 4 +- .../bridge-common/gen/call-command-handler.h | 4 +- .../bridge-common/gen/callback-stub.cpp | 91 +++++++------- .../bridge-app/bridge-common/gen/callback.h | 4 +- .../bridge-common/gen/client-command-macro.h | 4 +- .../bridge-app/bridge-common/gen/cluster-id.h | 4 +- .../bridge-app/bridge-common/gen/command-id.h | 4 +- .../bridge-common/gen/endpoint_config.h | 4 +- examples/bridge-app/bridge-common/gen/enums.h | 4 +- .../bridge-app/bridge-common/gen/gen_config.h | 4 +- .../bridge-app/bridge-common/gen/gen_tokens.h | 27 +---- .../bridge-common/gen/print-cluster.h | 4 +- .../lighting-common/gen/af-structs.h | 4 +- .../lighting-common/gen/att-storage.h | 4 +- .../lighting-common/gen/attribute-id.h | 4 +- .../lighting-common/gen/attribute-size.h | 4 +- .../lighting-common/gen/attribute-type.h | 4 +- .../gen/call-command-handler.cpp | 4 +- .../gen/call-command-handler.h | 4 +- .../lighting-common/gen/callback-stub.cpp | 110 +++++++++++------ .../lighting-common/gen/callback.h | 4 +- .../gen/client-command-macro.h | 4 +- .../lighting-common/gen/cluster-id.h | 4 +- .../lighting-common/gen/command-id.h | 4 +- .../lighting-common/gen/endpoint_config.h | 4 +- .../lighting-app/lighting-common/gen/enums.h | 4 +- .../lighting-common/gen/gen_config.h | 4 +- .../lighting-common/gen/gen_tokens.h | 27 +---- .../lighting-common/gen/print-cluster.h | 4 +- .../lock-app/lock-common/gen/af-structs.h | 4 +- .../lock-app/lock-common/gen/att-storage.h | 4 +- .../lock-app/lock-common/gen/attribute-id.h | 4 +- .../lock-app/lock-common/gen/attribute-size.h | 4 +- .../lock-app/lock-common/gen/attribute-type.h | 4 +- .../lock-common/gen/call-command-handler.cpp | 4 +- .../lock-common/gen/call-command-handler.h | 4 +- .../lock-common/gen/callback-stub.cpp | 111 ++++++++++++------ examples/lock-app/lock-common/gen/callback.h | 4 +- .../lock-common/gen/client-command-macro.h | 4 +- .../lock-app/lock-common/gen/cluster-id.h | 4 +- .../lock-app/lock-common/gen/command-id.h | 4 +- .../lock-common/gen/endpoint_config.h | 4 +- examples/lock-app/lock-common/gen/enums.h | 4 +- .../lock-app/lock-common/gen/gen_config.h | 4 +- .../lock-app/lock-common/gen/gen_tokens.h | 27 +---- .../lock-app/lock-common/gen/print-cluster.h | 4 +- .../esp32/main/gen/af-structs.h | 4 +- .../esp32/main/gen/att-storage.h | 4 +- .../esp32/main/gen/attribute-id.h | 4 +- .../esp32/main/gen/attribute-size.h | 4 +- .../esp32/main/gen/attribute-type.h | 4 +- .../esp32/main/gen/call-command-handler.cpp | 4 +- .../esp32/main/gen/call-command-handler.h | 4 +- .../esp32/main/gen/callback-stub.cpp | 105 +++++++++++------ .../esp32/main/gen/callback.h | 4 +- .../esp32/main/gen/client-command-macro.h | 4 +- .../esp32/main/gen/cluster-id.h | 4 +- .../esp32/main/gen/command-id.h | 4 +- .../esp32/main/gen/endpoint_config.h | 4 +- .../esp32/main/gen/enums.h | 4 +- .../esp32/main/gen/gen_config.h | 4 +- .../esp32/main/gen/gen_tokens.h | 12 +- .../esp32/main/gen/print-cluster.h | 4 +- src/app/encoder.cpp | 2 +- src/app/zap-templates/app-templates.json | 5 + .../templates/app/gen_tokens.zapt | 28 +++++ 88 files changed, 615 insertions(+), 362 deletions(-) create mode 100644 src/app/zap-templates/templates/app/gen_tokens.zapt diff --git a/examples/all-clusters-app/all-clusters-common/gen/af-structs.h b/examples/all-clusters-app/all-clusters-common/gen/af-structs.h index 02960bec60ddfb..c5cd195f38d882 100644 --- a/examples/all-clusters-app/all-clusters-common/gen/af-structs.h +++ b/examples/all-clusters-app/all-clusters-common/gen/af-structs.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2021 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,8 @@ * limitations under the License. */ +// THIS FILE IS GENERATED BY ZAP + // Prevent multiple inclusion #pragma once diff --git a/examples/all-clusters-app/all-clusters-common/gen/att-storage.h b/examples/all-clusters-app/all-clusters-common/gen/att-storage.h index 74b44d6111b3e4..bd817b76cb7b89 100644 --- a/examples/all-clusters-app/all-clusters-common/gen/att-storage.h +++ b/examples/all-clusters-app/all-clusters-common/gen/att-storage.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2021 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,8 @@ * limitations under the License. */ +// THIS FILE IS GENERATED BY ZAP + // Prevent multiple inclusion #pragma once diff --git a/examples/all-clusters-app/all-clusters-common/gen/attribute-id.h b/examples/all-clusters-app/all-clusters-common/gen/attribute-id.h index 901653b7d8f3b6..0fd456c36a20f6 100644 --- a/examples/all-clusters-app/all-clusters-common/gen/attribute-id.h +++ b/examples/all-clusters-app/all-clusters-common/gen/attribute-id.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2021 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,8 @@ * limitations under the License. */ +// THIS FILE IS GENERATED BY ZAP + // Prevent multiple inclusion #pragma once diff --git a/examples/all-clusters-app/all-clusters-common/gen/attribute-size.h b/examples/all-clusters-app/all-clusters-common/gen/attribute-size.h index f9ef9212244eca..a6caf3ac7ca695 100644 --- a/examples/all-clusters-app/all-clusters-common/gen/attribute-size.h +++ b/examples/all-clusters-app/all-clusters-common/gen/attribute-size.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2021 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,8 @@ * limitations under the License. */ +// THIS FILE IS GENERATED BY ZAP + // Prevent multiple inclusion #pragma once diff --git a/examples/all-clusters-app/all-clusters-common/gen/attribute-type.h b/examples/all-clusters-app/all-clusters-common/gen/attribute-type.h index 225cbc68be49c2..56900dcb558841 100644 --- a/examples/all-clusters-app/all-clusters-common/gen/attribute-type.h +++ b/examples/all-clusters-app/all-clusters-common/gen/attribute-type.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2021 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,8 @@ * limitations under the License. */ +// THIS FILE IS GENERATED BY ZAP + // Prevent multiple inclusion #pragma once diff --git a/examples/all-clusters-app/all-clusters-common/gen/call-command-handler.cpp b/examples/all-clusters-app/all-clusters-common/gen/call-command-handler.cpp index 773c0d65af1010..f9f1aa8be1f1ed 100644 --- a/examples/all-clusters-app/all-clusters-common/gen/call-command-handler.cpp +++ b/examples/all-clusters-app/all-clusters-common/gen/call-command-handler.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2021 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,8 @@ * limitations under the License. */ +// THIS FILE IS GENERATED BY ZAP + #include #include "af-structs.h" diff --git a/examples/all-clusters-app/all-clusters-common/gen/call-command-handler.h b/examples/all-clusters-app/all-clusters-common/gen/call-command-handler.h index 43164ad576bfa8..16314d83b9817f 100644 --- a/examples/all-clusters-app/all-clusters-common/gen/call-command-handler.h +++ b/examples/all-clusters-app/all-clusters-common/gen/call-command-handler.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2021 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,8 @@ * limitations under the License. */ +// THIS FILE IS GENERATED BY ZAP + // Prevent multiple inclusion #pragma once diff --git a/examples/all-clusters-app/all-clusters-common/gen/callback-stub.cpp b/examples/all-clusters-app/all-clusters-common/gen/callback-stub.cpp index aa44eae4e45cd1..37ee2e10104311 100644 --- a/examples/all-clusters-app/all-clusters-common/gen/callback-stub.cpp +++ b/examples/all-clusters-app/all-clusters-common/gen/callback-stub.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2021 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,8 @@ * limitations under the License. */ +// THIS FILE IS GENERATED BY ZAP + #include "callback.h" #include "cluster-id.h" @@ -143,7 +145,7 @@ void __attribute__((weak)) emberAfTemperatureMeasurementClusterInitCallback(Endp * * @param tasks Ver.: always */ -void emberAfAddToCurrentAppTasksCallback(EmberAfApplicationTask tasks) {} +void __attribute__((weak)) emberAfAddToCurrentAppTasksCallback(EmberAfApplicationTask tasks) {} /** @brief Remove From Current App Tasks * @@ -157,7 +159,7 @@ void emberAfAddToCurrentAppTasksCallback(EmberAfApplicationTask tasks) {} * * @param tasks Ver.: always */ -void emberAfRemoveFromCurrentAppTasksCallback(EmberAfApplicationTask tasks) {} +void __attribute__((weak)) emberAfRemoveFromCurrentAppTasksCallback(EmberAfApplicationTask tasks) {} /** @brief Allow Network Write Attribute * @@ -192,9 +194,9 @@ void emberAfRemoveFromCurrentAppTasksCallback(EmberAfApplicationTask tasks) {} * @param value Ver.: always * @param type Ver.: always */ -EmberAfAttributeWritePermission emberAfAllowNetworkWriteAttributeCallback(EndpointId endpoint, ClusterId clusterId, - AttributeId attributeId, uint8_t mask, - uint16_t manufacturerCode, uint8_t * value, uint8_t type) +EmberAfAttributeWritePermission __attribute__((weak)) +emberAfAllowNetworkWriteAttributeCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId, uint8_t mask, + uint16_t manufacturerCode, uint8_t * value, uint8_t type) { return EMBER_ZCL_ATTRIBUTE_WRITE_PERMISSION_ALLOW_WRITE_NORMAL; // Default } @@ -209,8 +211,8 @@ EmberAfAttributeWritePermission emberAfAllowNetworkWriteAttributeCallback(Endpoi * @param manufacturerCode Ver.: always * @param attributeId Ver.: always */ -bool emberAfAttributeReadAccessCallback(EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode, - AttributeId attributeId) +bool __attribute__((weak)) +emberAfAttributeReadAccessCallback(EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode, AttributeId attributeId) { return true; } @@ -225,8 +227,8 @@ bool emberAfAttributeReadAccessCallback(EndpointId endpoint, ClusterId clusterId * @param manufacturerCode Ver.: always * @param attributeId Ver.: always */ -bool emberAfAttributeWriteAccessCallback(EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode, - AttributeId attributeId) +bool __attribute__((weak)) +emberAfAttributeWriteAccessCallback(EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode, AttributeId attributeId) { return true; } @@ -243,7 +245,7 @@ bool emberAfAttributeWriteAccessCallback(EndpointId endpoint, ClusterId clusterI * @param status Specifies either SUCCESS or the nature of the error that was * detected in the received command. Ver.: always */ -bool emberAfDefaultResponseCallback(ClusterId clusterId, CommandId commandId, EmberAfStatus status) +bool __attribute__((weak)) emberAfDefaultResponseCallback(ClusterId clusterId, CommandId commandId, EmberAfStatus status) { return false; } @@ -268,8 +270,8 @@ bool emberAfDefaultResponseCallback(ClusterId clusterId, CommandId commandId, Em * @param extended Indicates whether the response is in the extended format or * not. Ver.: always */ -bool emberAfDiscoverAttributesResponseCallback(ClusterId clusterId, bool discoveryComplete, uint8_t * buffer, uint16_t bufLen, - bool extended) +bool __attribute__((weak)) emberAfDiscoverAttributesResponseCallback(ClusterId clusterId, bool discoveryComplete, uint8_t * buffer, + uint16_t bufLen, bool extended) { return false; } @@ -288,8 +290,9 @@ bool emberAfDiscoverAttributesResponseCallback(ClusterId clusterId, bool discove * @param commandIdCount The length of bytes of the list, whish is the same as * the number of identifiers. Ver.: always */ -bool emberAfDiscoverCommandsGeneratedResponseCallback(ClusterId clusterId, uint16_t manufacturerCode, bool discoveryComplete, - CommandId * commandIds, uint16_t commandIdCount) +bool __attribute__((weak)) +emberAfDiscoverCommandsGeneratedResponseCallback(ClusterId clusterId, uint16_t manufacturerCode, bool discoveryComplete, + CommandId * commandIds, uint16_t commandIdCount) { return false; } @@ -308,8 +311,9 @@ bool emberAfDiscoverCommandsGeneratedResponseCallback(ClusterId clusterId, uint1 * @param commandIdCount The length of bytes of the list, whish is the same as * the number of identifiers. Ver.: always */ -bool emberAfDiscoverCommandsReceivedResponseCallback(ClusterId clusterId, uint16_t manufacturerCode, bool discoveryComplete, - CommandId * commandIds, uint16_t commandIdCount) +bool __attribute__((weak)) +emberAfDiscoverCommandsReceivedResponseCallback(ClusterId clusterId, uint16_t manufacturerCode, bool discoveryComplete, + CommandId * commandIds, uint16_t commandIdCount) { return false; } @@ -327,7 +331,7 @@ bool emberAfDiscoverCommandsReceivedResponseCallback(ClusterId clusterId, uint16 * * @param cmd Ver.: always */ -bool emberAfPreCommandReceivedCallback(EmberAfClusterCommand * cmd) +bool __attribute__((weak)) emberAfPreCommandReceivedCallback(EmberAfClusterCommand * cmd) { return false; } @@ -351,7 +355,7 @@ bool emberAfPreCommandReceivedCallback(EmberAfClusterCommand * cmd) * @param status A pointer to the status code value that will be returned to the * caller. Ver.: always */ -bool emberAfPreMessageSendCallback(EmberAfMessageStruct * messageStruct, EmberStatus * status) +bool __attribute__((weak)) emberAfPreMessageSendCallback(EmberAfMessageStruct * messageStruct, EmberStatus * status) { return false; } @@ -374,8 +378,9 @@ bool emberAfPreMessageSendCallback(EmberAfMessageStruct * messageStruct, EmberSt * @param message Ver.: always * @param status Ver.: always */ -bool emberAfMessageSentCallback(EmberOutgoingMessageType type, uint64_t indexOrDestination, EmberApsFrame * apsFrame, - uint16_t msgLen, uint8_t * message, EmberStatus status) +bool __attribute__((weak)) +emberAfMessageSentCallback(EmberOutgoingMessageType type, uint64_t indexOrDestination, EmberApsFrame * apsFrame, uint16_t msgLen, + uint8_t * message, EmberStatus status) { return false; } @@ -397,12 +402,33 @@ bool emberAfMessageSentCallback(EmberOutgoingMessageType type, uint64_t indexOrD * @param size Ver.: always * @param value Ver.: always */ -EmberAfStatus emberAfPreAttributeChangeCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId, uint8_t mask, - uint16_t manufacturerCode, uint8_t type, uint8_t size, uint8_t * value) +EmberAfStatus __attribute__((weak)) +emberAfPreAttributeChangeCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId, uint8_t mask, + uint16_t manufacturerCode, uint8_t type, uint8_t size, uint8_t * value) { return EMBER_ZCL_STATUS_SUCCESS; } +/** @brief Post Attribute Change + * + * This function is called by the application framework after it changes an + * attribute value. The value passed into this callback is the value to which + * the attribute was set by the framework. + * + * @param endpoint Ver.: always + * @param clusterId Ver.: always + * @param attributeId Ver.: always + * @param mask Ver.: always + * @param manufacturerCode Ver.: always + * @param type Ver.: always + * @param size Ver.: always + * @param value Ver.: always + */ +void __attribute__((weak)) +emberAfPostAttributeChangeCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId, uint8_t mask, + uint16_t manufacturerCode, uint8_t type, uint8_t size, uint8_t * value) +{} + /** @brief Read Attributes Response * * This function is called by the application framework when a Read Attributes @@ -414,7 +440,7 @@ EmberAfStatus emberAfPreAttributeChangeCallback(EndpointId endpoint, ClusterId c * Ver.: always * @param bufLen The length in bytes of the list. Ver.: always */ -bool emberAfReadAttributesResponseCallback(ClusterId clusterId, uint8_t * buffer, uint16_t bufLen) +bool __attribute__((weak)) emberAfReadAttributesResponseCallback(ClusterId clusterId, uint8_t * buffer, uint16_t bufLen) { return false; } @@ -455,9 +481,9 @@ bool emberAfReadAttributesResponseCallback(ClusterId clusterId, uint8_t * buffer * @param buffer Ver.: always * @param maxReadLength Ver.: always */ -EmberAfStatus emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterId clusterId, - EmberAfAttributeMetadata * attributeMetadata, uint16_t manufacturerCode, - uint8_t * buffer, uint16_t maxReadLength) +EmberAfStatus __attribute__((weak)) +emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterId clusterId, EmberAfAttributeMetadata * attributeMetadata, + uint16_t manufacturerCode, uint8_t * buffer, uint16_t maxReadLength) { return EMBER_ZCL_STATUS_FAILURE; } @@ -473,7 +499,7 @@ EmberAfStatus emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterI * Ver.: always * @param bufLen The length in bytes of the list. Ver.: always */ -bool emberAfWriteAttributesResponseCallback(ClusterId clusterId, uint8_t * buffer, uint16_t bufLen) +bool __attribute__((weak)) emberAfWriteAttributesResponseCallback(ClusterId clusterId, uint8_t * buffer, uint16_t bufLen) { return false; } @@ -524,9 +550,9 @@ bool emberAfWriteAttributesResponseCallback(ClusterId clusterId, uint8_t * buffe * @param manufacturerCode Ver.: always * @param buffer Ver.: always */ -EmberAfStatus emberAfExternalAttributeWriteCallback(EndpointId endpoint, ClusterId clusterId, - EmberAfAttributeMetadata * attributeMetadata, uint16_t manufacturerCode, - uint8_t * buffer) +EmberAfStatus __attribute__((weak)) +emberAfExternalAttributeWriteCallback(EndpointId endpoint, ClusterId clusterId, EmberAfAttributeMetadata * attributeMetadata, + uint16_t manufacturerCode, uint8_t * buffer) { return EMBER_ZCL_STATUS_FAILURE; } @@ -542,7 +568,7 @@ EmberAfStatus emberAfExternalAttributeWriteCallback(EndpointId endpoint, Cluster * always * @param bufLen The length in bytes of the list. Ver.: always */ -bool emberAfReportAttributesCallback(ClusterId clusterId, uint8_t * buffer, uint16_t bufLen) +bool __attribute__((weak)) emberAfReportAttributesCallback(ClusterId clusterId, uint8_t * buffer, uint16_t bufLen) { return false; } @@ -556,7 +582,7 @@ bool emberAfReportAttributesCallback(ClusterId clusterId, uint8_t * buffer, uint * that device does not have access to real time. * */ -uint32_t emberAfGetCurrentTimeCallback() +uint32_t __attribute__((weak)) emberAfGetCurrentTimeCallback() { return 0; } @@ -578,8 +604,8 @@ uint32_t emberAfGetCurrentTimeCallback() * @param returnEndpointInfo A pointer to a data struct that will be written * with information about the endpoint. Ver.: always */ -bool emberAfGetEndpointInfoCallback(EndpointId endpoint, uint8_t * returnNetworkIndex, - EmberAfEndpointInfoStruct * returnEndpointInfo) +bool __attribute__((weak)) +emberAfGetEndpointInfoCallback(EndpointId endpoint, uint8_t * returnNetworkIndex, EmberAfEndpointInfoStruct * returnEndpointInfo) { return false; } @@ -591,7 +617,7 @@ bool emberAfGetEndpointInfoCallback(EndpointId endpoint, uint8_t * returnNetwork * * @param destination The node id of the destination Ver.: always */ -uint8_t emberAfGetSourceRouteOverheadCallback(chip::NodeId destination) +uint8_t __attribute__((weak)) emberAfGetSourceRouteOverheadCallback(chip::NodeId destination) { return 0; } @@ -602,7 +628,7 @@ uint8_t emberAfGetSourceRouteOverheadCallback(chip::NodeId destination) * process. * */ -void emberAfRegistrationAbortCallback() {} +void __attribute__((weak)) emberAfRegistrationAbortCallback() {} /** @brief Interpan Send Message * @@ -614,7 +640,8 @@ void emberAfRegistrationAbortCallback() {} * always * @param message The message data received or to send. Ver.: always */ -EmberStatus emberAfInterpanSendMessageCallback(EmberAfInterpanHeader * header, uint16_t messageLength, uint8_t * message) +EmberStatus __attribute__((weak)) +emberAfInterpanSendMessageCallback(EmberAfInterpanHeader * header, uint16_t messageLength, uint8_t * message) { return EMBER_LIBRARY_NOT_PRESENT; } @@ -625,7 +652,7 @@ EmberStatus emberAfInterpanSendMessageCallback(EmberAfInterpanHeader * header, u * to a new parent. * */ -bool emberAfStartMoveCallback() +bool __attribute__((weak)) emberAfStartMoveCallback() { return false; } diff --git a/examples/all-clusters-app/all-clusters-common/gen/callback.h b/examples/all-clusters-app/all-clusters-common/gen/callback.h index 38f6f6c16de667..d1f85067f9a167 100644 --- a/examples/all-clusters-app/all-clusters-common/gen/callback.h +++ b/examples/all-clusters-app/all-clusters-common/gen/callback.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2021 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,8 @@ * limitations under the License. */ +// THIS FILE IS GENERATED BY ZAP + // Prevent multiple inclusion #pragma once diff --git a/examples/all-clusters-app/all-clusters-common/gen/client-command-macro.h b/examples/all-clusters-app/all-clusters-common/gen/client-command-macro.h index 7116663d885eca..0cdc54212f2375 100644 --- a/examples/all-clusters-app/all-clusters-common/gen/client-command-macro.h +++ b/examples/all-clusters-app/all-clusters-common/gen/client-command-macro.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2021 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,8 @@ * limitations under the License. */ +// THIS FILE IS GENERATED BY ZAP + // Prevent multiple inclusion #pragma once diff --git a/examples/all-clusters-app/all-clusters-common/gen/cluster-id.h b/examples/all-clusters-app/all-clusters-common/gen/cluster-id.h index 4db65e9cad99d0..262de53f3b3378 100644 --- a/examples/all-clusters-app/all-clusters-common/gen/cluster-id.h +++ b/examples/all-clusters-app/all-clusters-common/gen/cluster-id.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2021 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,8 @@ * limitations under the License. */ +// THIS FILE IS GENERATED BY ZAP + // Prevent multiple inclusion #pragma once diff --git a/examples/all-clusters-app/all-clusters-common/gen/command-id.h b/examples/all-clusters-app/all-clusters-common/gen/command-id.h index 42dcc0e89c71f5..9e608623150c7c 100644 --- a/examples/all-clusters-app/all-clusters-common/gen/command-id.h +++ b/examples/all-clusters-app/all-clusters-common/gen/command-id.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2021 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,8 @@ * limitations under the License. */ +// THIS FILE IS GENERATED BY ZAP + // Prevent multiple inclusion #pragma once diff --git a/examples/all-clusters-app/all-clusters-common/gen/endpoint_config.h b/examples/all-clusters-app/all-clusters-common/gen/endpoint_config.h index 8e3bdb4693c97a..1197299d41f723 100644 --- a/examples/all-clusters-app/all-clusters-common/gen/endpoint_config.h +++ b/examples/all-clusters-app/all-clusters-common/gen/endpoint_config.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2021 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,8 @@ * limitations under the License. */ +// THIS FILE IS GENERATED BY ZAP + // Prevent multiple inclusion #pragma once diff --git a/examples/all-clusters-app/all-clusters-common/gen/enums.h b/examples/all-clusters-app/all-clusters-common/gen/enums.h index 5202a5283172f0..7cf4c5c578e788 100644 --- a/examples/all-clusters-app/all-clusters-common/gen/enums.h +++ b/examples/all-clusters-app/all-clusters-common/gen/enums.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2021 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,8 @@ * limitations under the License. */ +// THIS FILE IS GENERATED BY ZAP + // Prevent multiple inclusion #pragma once diff --git a/examples/all-clusters-app/all-clusters-common/gen/gen_config.h b/examples/all-clusters-app/all-clusters-common/gen/gen_config.h index d9f7fbf87b4210..bd18c97939963b 100644 --- a/examples/all-clusters-app/all-clusters-common/gen/gen_config.h +++ b/examples/all-clusters-app/all-clusters-common/gen/gen_config.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2021 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,8 @@ * limitations under the License. */ +// THIS FILE IS GENERATED BY ZAP + // Prevent multiple inclusion #pragma once diff --git a/examples/all-clusters-app/all-clusters-common/gen/gen_tokens.h b/examples/all-clusters-app/all-clusters-common/gen/gen_tokens.h index 80bd8a4098e676..860bf575d35d81 100644 --- a/examples/all-clusters-app/all-clusters-common/gen/gen_tokens.h +++ b/examples/all-clusters-app/all-clusters-common/gen/gen_tokens.h @@ -1,6 +1,6 @@ -/** +/* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2021 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,25 +15,10 @@ * limitations under the License. */ -/** - * - * Copyright (c) 2020 Silicon Labs - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// This file is generated by Simplicity Studio. Please do not edit manually. -// -// +// THIS FILE IS GENERATED BY ZAP + +// Prevent multiple inclusion +#pragma once // This file contains the tokens for attributes stored in flash diff --git a/examples/all-clusters-app/all-clusters-common/gen/print-cluster.h b/examples/all-clusters-app/all-clusters-common/gen/print-cluster.h index 7155ccf0294122..4348de1953fb86 100644 --- a/examples/all-clusters-app/all-clusters-common/gen/print-cluster.h +++ b/examples/all-clusters-app/all-clusters-common/gen/print-cluster.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2021 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,8 @@ * limitations under the License. */ +// THIS FILE IS GENERATED BY ZAP + // Prevent multiple inclusion #pragma once diff --git a/examples/bridge-app/bridge-common/gen/af-structs.h b/examples/bridge-app/bridge-common/gen/af-structs.h index 02960bec60ddfb..c5cd195f38d882 100644 --- a/examples/bridge-app/bridge-common/gen/af-structs.h +++ b/examples/bridge-app/bridge-common/gen/af-structs.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2021 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,8 @@ * limitations under the License. */ +// THIS FILE IS GENERATED BY ZAP + // Prevent multiple inclusion #pragma once diff --git a/examples/bridge-app/bridge-common/gen/att-storage.h b/examples/bridge-app/bridge-common/gen/att-storage.h index 74b44d6111b3e4..bd817b76cb7b89 100644 --- a/examples/bridge-app/bridge-common/gen/att-storage.h +++ b/examples/bridge-app/bridge-common/gen/att-storage.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2021 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,8 @@ * limitations under the License. */ +// THIS FILE IS GENERATED BY ZAP + // Prevent multiple inclusion #pragma once diff --git a/examples/bridge-app/bridge-common/gen/attribute-id.h b/examples/bridge-app/bridge-common/gen/attribute-id.h index 901653b7d8f3b6..0fd456c36a20f6 100644 --- a/examples/bridge-app/bridge-common/gen/attribute-id.h +++ b/examples/bridge-app/bridge-common/gen/attribute-id.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2021 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,8 @@ * limitations under the License. */ +// THIS FILE IS GENERATED BY ZAP + // Prevent multiple inclusion #pragma once diff --git a/examples/bridge-app/bridge-common/gen/attribute-size.h b/examples/bridge-app/bridge-common/gen/attribute-size.h index f9ef9212244eca..a6caf3ac7ca695 100644 --- a/examples/bridge-app/bridge-common/gen/attribute-size.h +++ b/examples/bridge-app/bridge-common/gen/attribute-size.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2021 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,8 @@ * limitations under the License. */ +// THIS FILE IS GENERATED BY ZAP + // Prevent multiple inclusion #pragma once diff --git a/examples/bridge-app/bridge-common/gen/attribute-type.h b/examples/bridge-app/bridge-common/gen/attribute-type.h index 225cbc68be49c2..56900dcb558841 100644 --- a/examples/bridge-app/bridge-common/gen/attribute-type.h +++ b/examples/bridge-app/bridge-common/gen/attribute-type.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2021 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,8 @@ * limitations under the License. */ +// THIS FILE IS GENERATED BY ZAP + // Prevent multiple inclusion #pragma once diff --git a/examples/bridge-app/bridge-common/gen/call-command-handler.cpp b/examples/bridge-app/bridge-common/gen/call-command-handler.cpp index 4fe1fc6f96f2dd..a9ef106c2b88e5 100644 --- a/examples/bridge-app/bridge-common/gen/call-command-handler.cpp +++ b/examples/bridge-app/bridge-common/gen/call-command-handler.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2021 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,8 @@ * limitations under the License. */ +// THIS FILE IS GENERATED BY ZAP + #include #include "af-structs.h" diff --git a/examples/bridge-app/bridge-common/gen/call-command-handler.h b/examples/bridge-app/bridge-common/gen/call-command-handler.h index 43164ad576bfa8..16314d83b9817f 100644 --- a/examples/bridge-app/bridge-common/gen/call-command-handler.h +++ b/examples/bridge-app/bridge-common/gen/call-command-handler.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2021 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,8 @@ * limitations under the License. */ +// THIS FILE IS GENERATED BY ZAP + // Prevent multiple inclusion #pragma once diff --git a/examples/bridge-app/bridge-common/gen/callback-stub.cpp b/examples/bridge-app/bridge-common/gen/callback-stub.cpp index 49aa1e73d7a8e2..2ce67c6b297aaf 100644 --- a/examples/bridge-app/bridge-common/gen/callback-stub.cpp +++ b/examples/bridge-app/bridge-common/gen/callback-stub.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2021 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,8 @@ * limitations under the License. */ +// THIS FILE IS GENERATED BY ZAP + #include "callback.h" #include "cluster-id.h" @@ -63,7 +65,7 @@ void __attribute__((weak)) emberAfOnOffClusterInitCallback(EndpointId endpoint) * * @param tasks Ver.: always */ -void emberAfAddToCurrentAppTasksCallback(EmberAfApplicationTask tasks) {} +void __attribute__((weak)) emberAfAddToCurrentAppTasksCallback(EmberAfApplicationTask tasks) {} /** @brief Remove From Current App Tasks * @@ -77,7 +79,7 @@ void emberAfAddToCurrentAppTasksCallback(EmberAfApplicationTask tasks) {} * * @param tasks Ver.: always */ -void emberAfRemoveFromCurrentAppTasksCallback(EmberAfApplicationTask tasks) {} +void __attribute__((weak)) emberAfRemoveFromCurrentAppTasksCallback(EmberAfApplicationTask tasks) {} /** @brief Allow Network Write Attribute * @@ -112,9 +114,9 @@ void emberAfRemoveFromCurrentAppTasksCallback(EmberAfApplicationTask tasks) {} * @param value Ver.: always * @param type Ver.: always */ -EmberAfAttributeWritePermission emberAfAllowNetworkWriteAttributeCallback(EndpointId endpoint, ClusterId clusterId, - AttributeId attributeId, uint8_t mask, - uint16_t manufacturerCode, uint8_t * value, uint8_t type) +EmberAfAttributeWritePermission __attribute__((weak)) +emberAfAllowNetworkWriteAttributeCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId, uint8_t mask, + uint16_t manufacturerCode, uint8_t * value, uint8_t type) { return EMBER_ZCL_ATTRIBUTE_WRITE_PERMISSION_ALLOW_WRITE_NORMAL; // Default } @@ -129,8 +131,8 @@ EmberAfAttributeWritePermission emberAfAllowNetworkWriteAttributeCallback(Endpoi * @param manufacturerCode Ver.: always * @param attributeId Ver.: always */ -bool emberAfAttributeReadAccessCallback(EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode, - AttributeId attributeId) +bool __attribute__((weak)) +emberAfAttributeReadAccessCallback(EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode, AttributeId attributeId) { return true; } @@ -145,8 +147,8 @@ bool emberAfAttributeReadAccessCallback(EndpointId endpoint, ClusterId clusterId * @param manufacturerCode Ver.: always * @param attributeId Ver.: always */ -bool emberAfAttributeWriteAccessCallback(EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode, - AttributeId attributeId) +bool __attribute__((weak)) +emberAfAttributeWriteAccessCallback(EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode, AttributeId attributeId) { return true; } @@ -163,7 +165,7 @@ bool emberAfAttributeWriteAccessCallback(EndpointId endpoint, ClusterId clusterI * @param status Specifies either SUCCESS or the nature of the error that was * detected in the received command. Ver.: always */ -bool emberAfDefaultResponseCallback(ClusterId clusterId, CommandId commandId, EmberAfStatus status) +bool __attribute__((weak)) emberAfDefaultResponseCallback(ClusterId clusterId, CommandId commandId, EmberAfStatus status) { return false; } @@ -188,8 +190,8 @@ bool emberAfDefaultResponseCallback(ClusterId clusterId, CommandId commandId, Em * @param extended Indicates whether the response is in the extended format or * not. Ver.: always */ -bool emberAfDiscoverAttributesResponseCallback(ClusterId clusterId, bool discoveryComplete, uint8_t * buffer, uint16_t bufLen, - bool extended) +bool __attribute__((weak)) emberAfDiscoverAttributesResponseCallback(ClusterId clusterId, bool discoveryComplete, uint8_t * buffer, + uint16_t bufLen, bool extended) { return false; } @@ -208,8 +210,9 @@ bool emberAfDiscoverAttributesResponseCallback(ClusterId clusterId, bool discove * @param commandIdCount The length of bytes of the list, whish is the same as * the number of identifiers. Ver.: always */ -bool emberAfDiscoverCommandsGeneratedResponseCallback(ClusterId clusterId, uint16_t manufacturerCode, bool discoveryComplete, - CommandId * commandIds, uint16_t commandIdCount) +bool __attribute__((weak)) +emberAfDiscoverCommandsGeneratedResponseCallback(ClusterId clusterId, uint16_t manufacturerCode, bool discoveryComplete, + CommandId * commandIds, uint16_t commandIdCount) { return false; } @@ -228,8 +231,9 @@ bool emberAfDiscoverCommandsGeneratedResponseCallback(ClusterId clusterId, uint1 * @param commandIdCount The length of bytes of the list, whish is the same as * the number of identifiers. Ver.: always */ -bool emberAfDiscoverCommandsReceivedResponseCallback(ClusterId clusterId, uint16_t manufacturerCode, bool discoveryComplete, - CommandId * commandIds, uint16_t commandIdCount) +bool __attribute__((weak)) +emberAfDiscoverCommandsReceivedResponseCallback(ClusterId clusterId, uint16_t manufacturerCode, bool discoveryComplete, + CommandId * commandIds, uint16_t commandIdCount) { return false; } @@ -247,7 +251,7 @@ bool emberAfDiscoverCommandsReceivedResponseCallback(ClusterId clusterId, uint16 * * @param cmd Ver.: always */ -bool emberAfPreCommandReceivedCallback(EmberAfClusterCommand * cmd) +bool __attribute__((weak)) emberAfPreCommandReceivedCallback(EmberAfClusterCommand * cmd) { return false; } @@ -271,7 +275,7 @@ bool emberAfPreCommandReceivedCallback(EmberAfClusterCommand * cmd) * @param status A pointer to the status code value that will be returned to the * caller. Ver.: always */ -bool emberAfPreMessageSendCallback(EmberAfMessageStruct * messageStruct, EmberStatus * status) +bool __attribute__((weak)) emberAfPreMessageSendCallback(EmberAfMessageStruct * messageStruct, EmberStatus * status) { return false; } @@ -294,8 +298,9 @@ bool emberAfPreMessageSendCallback(EmberAfMessageStruct * messageStruct, EmberSt * @param message Ver.: always * @param status Ver.: always */ -bool emberAfMessageSentCallback(EmberOutgoingMessageType type, uint64_t indexOrDestination, EmberApsFrame * apsFrame, - uint16_t msgLen, uint8_t * message, EmberStatus status) +bool __attribute__((weak)) +emberAfMessageSentCallback(EmberOutgoingMessageType type, uint64_t indexOrDestination, EmberApsFrame * apsFrame, uint16_t msgLen, + uint8_t * message, EmberStatus status) { return false; } @@ -317,8 +322,9 @@ bool emberAfMessageSentCallback(EmberOutgoingMessageType type, uint64_t indexOrD * @param size Ver.: always * @param value Ver.: always */ -EmberAfStatus emberAfPreAttributeChangeCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId, uint8_t mask, - uint16_t manufacturerCode, uint8_t type, uint8_t size, uint8_t * value) +EmberAfStatus __attribute__((weak)) +emberAfPreAttributeChangeCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId, uint8_t mask, + uint16_t manufacturerCode, uint8_t type, uint8_t size, uint8_t * value) { return EMBER_ZCL_STATUS_SUCCESS; } @@ -338,8 +344,10 @@ EmberAfStatus emberAfPreAttributeChangeCallback(EndpointId endpoint, ClusterId c * @param size Ver.: always * @param value Ver.: always */ -// void emberAfPostAttributeChangeCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId, uint8_t mask, -// uint16_t manufacturerCode, uint8_t type, uint8_t size, uint8_t * value) {} +void __attribute__((weak)) +emberAfPostAttributeChangeCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId, uint8_t mask, + uint16_t manufacturerCode, uint8_t type, uint8_t size, uint8_t * value) +{} /** @brief Read Attributes Response * @@ -352,7 +360,7 @@ EmberAfStatus emberAfPreAttributeChangeCallback(EndpointId endpoint, ClusterId c * Ver.: always * @param bufLen The length in bytes of the list. Ver.: always */ -bool emberAfReadAttributesResponseCallback(ClusterId clusterId, uint8_t * buffer, uint16_t bufLen) +bool __attribute__((weak)) emberAfReadAttributesResponseCallback(ClusterId clusterId, uint8_t * buffer, uint16_t bufLen) { return false; } @@ -393,9 +401,9 @@ bool emberAfReadAttributesResponseCallback(ClusterId clusterId, uint8_t * buffer * @param buffer Ver.: always * @param maxReadLength Ver.: always */ -EmberAfStatus emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterId clusterId, - EmberAfAttributeMetadata * attributeMetadata, uint16_t manufacturerCode, - uint8_t * buffer, uint16_t maxReadLength) +EmberAfStatus __attribute__((weak)) +emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterId clusterId, EmberAfAttributeMetadata * attributeMetadata, + uint16_t manufacturerCode, uint8_t * buffer, uint16_t maxReadLength) { return EMBER_ZCL_STATUS_FAILURE; } @@ -411,7 +419,7 @@ EmberAfStatus emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterI * Ver.: always * @param bufLen The length in bytes of the list. Ver.: always */ -bool emberAfWriteAttributesResponseCallback(ClusterId clusterId, uint8_t * buffer, uint16_t bufLen) +bool __attribute__((weak)) emberAfWriteAttributesResponseCallback(ClusterId clusterId, uint8_t * buffer, uint16_t bufLen) { return false; } @@ -462,9 +470,9 @@ bool emberAfWriteAttributesResponseCallback(ClusterId clusterId, uint8_t * buffe * @param manufacturerCode Ver.: always * @param buffer Ver.: always */ -EmberAfStatus emberAfExternalAttributeWriteCallback(EndpointId endpoint, ClusterId clusterId, - EmberAfAttributeMetadata * attributeMetadata, uint16_t manufacturerCode, - uint8_t * buffer) +EmberAfStatus __attribute__((weak)) +emberAfExternalAttributeWriteCallback(EndpointId endpoint, ClusterId clusterId, EmberAfAttributeMetadata * attributeMetadata, + uint16_t manufacturerCode, uint8_t * buffer) { return EMBER_ZCL_STATUS_FAILURE; } @@ -480,7 +488,7 @@ EmberAfStatus emberAfExternalAttributeWriteCallback(EndpointId endpoint, Cluster * always * @param bufLen The length in bytes of the list. Ver.: always */ -bool emberAfReportAttributesCallback(ClusterId clusterId, uint8_t * buffer, uint16_t bufLen) +bool __attribute__((weak)) emberAfReportAttributesCallback(ClusterId clusterId, uint8_t * buffer, uint16_t bufLen) { return false; } @@ -494,7 +502,7 @@ bool emberAfReportAttributesCallback(ClusterId clusterId, uint8_t * buffer, uint * that device does not have access to real time. * */ -uint32_t emberAfGetCurrentTimeCallback() +uint32_t __attribute__((weak)) emberAfGetCurrentTimeCallback() { return 0; } @@ -516,8 +524,8 @@ uint32_t emberAfGetCurrentTimeCallback() * @param returnEndpointInfo A pointer to a data struct that will be written * with information about the endpoint. Ver.: always */ -bool emberAfGetEndpointInfoCallback(EndpointId endpoint, uint8_t * returnNetworkIndex, - EmberAfEndpointInfoStruct * returnEndpointInfo) +bool __attribute__((weak)) +emberAfGetEndpointInfoCallback(EndpointId endpoint, uint8_t * returnNetworkIndex, EmberAfEndpointInfoStruct * returnEndpointInfo) { return false; } @@ -529,7 +537,7 @@ bool emberAfGetEndpointInfoCallback(EndpointId endpoint, uint8_t * returnNetwork * * @param destination The node id of the destination Ver.: always */ -uint8_t emberAfGetSourceRouteOverheadCallback(chip::NodeId destination) +uint8_t __attribute__((weak)) emberAfGetSourceRouteOverheadCallback(chip::NodeId destination) { return 0; } @@ -540,7 +548,7 @@ uint8_t emberAfGetSourceRouteOverheadCallback(chip::NodeId destination) * process. * */ -void emberAfRegistrationAbortCallback() {} +void __attribute__((weak)) emberAfRegistrationAbortCallback() {} /** @brief Interpan Send Message * @@ -552,7 +560,8 @@ void emberAfRegistrationAbortCallback() {} * always * @param message The message data received or to send. Ver.: always */ -EmberStatus emberAfInterpanSendMessageCallback(EmberAfInterpanHeader * header, uint16_t messageLength, uint8_t * message) +EmberStatus __attribute__((weak)) +emberAfInterpanSendMessageCallback(EmberAfInterpanHeader * header, uint16_t messageLength, uint8_t * message) { return EMBER_LIBRARY_NOT_PRESENT; } @@ -563,7 +572,7 @@ EmberStatus emberAfInterpanSendMessageCallback(EmberAfInterpanHeader * header, u * to a new parent. * */ -bool emberAfStartMoveCallback() +bool __attribute__((weak)) emberAfStartMoveCallback() { return false; } diff --git a/examples/bridge-app/bridge-common/gen/callback.h b/examples/bridge-app/bridge-common/gen/callback.h index 661d681d4f1f81..cbc332c1a624ab 100644 --- a/examples/bridge-app/bridge-common/gen/callback.h +++ b/examples/bridge-app/bridge-common/gen/callback.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2021 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,8 @@ * limitations under the License. */ +// THIS FILE IS GENERATED BY ZAP + // Prevent multiple inclusion #pragma once diff --git a/examples/bridge-app/bridge-common/gen/client-command-macro.h b/examples/bridge-app/bridge-common/gen/client-command-macro.h index 7116663d885eca..0cdc54212f2375 100644 --- a/examples/bridge-app/bridge-common/gen/client-command-macro.h +++ b/examples/bridge-app/bridge-common/gen/client-command-macro.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2021 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,8 @@ * limitations under the License. */ +// THIS FILE IS GENERATED BY ZAP + // Prevent multiple inclusion #pragma once diff --git a/examples/bridge-app/bridge-common/gen/cluster-id.h b/examples/bridge-app/bridge-common/gen/cluster-id.h index 4db65e9cad99d0..262de53f3b3378 100644 --- a/examples/bridge-app/bridge-common/gen/cluster-id.h +++ b/examples/bridge-app/bridge-common/gen/cluster-id.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2021 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,8 @@ * limitations under the License. */ +// THIS FILE IS GENERATED BY ZAP + // Prevent multiple inclusion #pragma once diff --git a/examples/bridge-app/bridge-common/gen/command-id.h b/examples/bridge-app/bridge-common/gen/command-id.h index 42dcc0e89c71f5..9e608623150c7c 100644 --- a/examples/bridge-app/bridge-common/gen/command-id.h +++ b/examples/bridge-app/bridge-common/gen/command-id.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2021 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,8 @@ * limitations under the License. */ +// THIS FILE IS GENERATED BY ZAP + // Prevent multiple inclusion #pragma once diff --git a/examples/bridge-app/bridge-common/gen/endpoint_config.h b/examples/bridge-app/bridge-common/gen/endpoint_config.h index 2183780047efdb..e919e30a5b0159 100644 --- a/examples/bridge-app/bridge-common/gen/endpoint_config.h +++ b/examples/bridge-app/bridge-common/gen/endpoint_config.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2021 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,8 @@ * limitations under the License. */ +// THIS FILE IS GENERATED BY ZAP + // Prevent multiple inclusion #pragma once diff --git a/examples/bridge-app/bridge-common/gen/enums.h b/examples/bridge-app/bridge-common/gen/enums.h index 5202a5283172f0..7cf4c5c578e788 100644 --- a/examples/bridge-app/bridge-common/gen/enums.h +++ b/examples/bridge-app/bridge-common/gen/enums.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2021 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,8 @@ * limitations under the License. */ +// THIS FILE IS GENERATED BY ZAP + // Prevent multiple inclusion #pragma once diff --git a/examples/bridge-app/bridge-common/gen/gen_config.h b/examples/bridge-app/bridge-common/gen/gen_config.h index 5caee62b8d12df..b9bf957a375ef3 100644 --- a/examples/bridge-app/bridge-common/gen/gen_config.h +++ b/examples/bridge-app/bridge-common/gen/gen_config.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2021 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,8 @@ * limitations under the License. */ +// THIS FILE IS GENERATED BY ZAP + // Prevent multiple inclusion #pragma once diff --git a/examples/bridge-app/bridge-common/gen/gen_tokens.h b/examples/bridge-app/bridge-common/gen/gen_tokens.h index 80bd8a4098e676..860bf575d35d81 100644 --- a/examples/bridge-app/bridge-common/gen/gen_tokens.h +++ b/examples/bridge-app/bridge-common/gen/gen_tokens.h @@ -1,6 +1,6 @@ -/** +/* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2021 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,25 +15,10 @@ * limitations under the License. */ -/** - * - * Copyright (c) 2020 Silicon Labs - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// This file is generated by Simplicity Studio. Please do not edit manually. -// -// +// THIS FILE IS GENERATED BY ZAP + +// Prevent multiple inclusion +#pragma once // This file contains the tokens for attributes stored in flash diff --git a/examples/bridge-app/bridge-common/gen/print-cluster.h b/examples/bridge-app/bridge-common/gen/print-cluster.h index 7155ccf0294122..4348de1953fb86 100644 --- a/examples/bridge-app/bridge-common/gen/print-cluster.h +++ b/examples/bridge-app/bridge-common/gen/print-cluster.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2021 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,8 @@ * limitations under the License. */ +// THIS FILE IS GENERATED BY ZAP + // Prevent multiple inclusion #pragma once diff --git a/examples/lighting-app/lighting-common/gen/af-structs.h b/examples/lighting-app/lighting-common/gen/af-structs.h index 02960bec60ddfb..c5cd195f38d882 100644 --- a/examples/lighting-app/lighting-common/gen/af-structs.h +++ b/examples/lighting-app/lighting-common/gen/af-structs.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2021 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,8 @@ * limitations under the License. */ +// THIS FILE IS GENERATED BY ZAP + // Prevent multiple inclusion #pragma once diff --git a/examples/lighting-app/lighting-common/gen/att-storage.h b/examples/lighting-app/lighting-common/gen/att-storage.h index 74b44d6111b3e4..bd817b76cb7b89 100644 --- a/examples/lighting-app/lighting-common/gen/att-storage.h +++ b/examples/lighting-app/lighting-common/gen/att-storage.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2021 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,8 @@ * limitations under the License. */ +// THIS FILE IS GENERATED BY ZAP + // Prevent multiple inclusion #pragma once diff --git a/examples/lighting-app/lighting-common/gen/attribute-id.h b/examples/lighting-app/lighting-common/gen/attribute-id.h index 901653b7d8f3b6..0fd456c36a20f6 100644 --- a/examples/lighting-app/lighting-common/gen/attribute-id.h +++ b/examples/lighting-app/lighting-common/gen/attribute-id.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2021 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,8 @@ * limitations under the License. */ +// THIS FILE IS GENERATED BY ZAP + // Prevent multiple inclusion #pragma once diff --git a/examples/lighting-app/lighting-common/gen/attribute-size.h b/examples/lighting-app/lighting-common/gen/attribute-size.h index f9ef9212244eca..a6caf3ac7ca695 100644 --- a/examples/lighting-app/lighting-common/gen/attribute-size.h +++ b/examples/lighting-app/lighting-common/gen/attribute-size.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2021 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,8 @@ * limitations under the License. */ +// THIS FILE IS GENERATED BY ZAP + // Prevent multiple inclusion #pragma once diff --git a/examples/lighting-app/lighting-common/gen/attribute-type.h b/examples/lighting-app/lighting-common/gen/attribute-type.h index 225cbc68be49c2..56900dcb558841 100644 --- a/examples/lighting-app/lighting-common/gen/attribute-type.h +++ b/examples/lighting-app/lighting-common/gen/attribute-type.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2021 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,8 @@ * limitations under the License. */ +// THIS FILE IS GENERATED BY ZAP + // Prevent multiple inclusion #pragma once diff --git a/examples/lighting-app/lighting-common/gen/call-command-handler.cpp b/examples/lighting-app/lighting-common/gen/call-command-handler.cpp index 77d3e9816e3636..7f529f75473a23 100644 --- a/examples/lighting-app/lighting-common/gen/call-command-handler.cpp +++ b/examples/lighting-app/lighting-common/gen/call-command-handler.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2021 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,8 @@ * limitations under the License. */ +// THIS FILE IS GENERATED BY ZAP + #include #include "af-structs.h" diff --git a/examples/lighting-app/lighting-common/gen/call-command-handler.h b/examples/lighting-app/lighting-common/gen/call-command-handler.h index 43164ad576bfa8..16314d83b9817f 100644 --- a/examples/lighting-app/lighting-common/gen/call-command-handler.h +++ b/examples/lighting-app/lighting-common/gen/call-command-handler.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2021 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,8 @@ * limitations under the License. */ +// THIS FILE IS GENERATED BY ZAP + // Prevent multiple inclusion #pragma once diff --git a/examples/lighting-app/lighting-common/gen/callback-stub.cpp b/examples/lighting-app/lighting-common/gen/callback-stub.cpp index ffed3e7b75e537..2ce67c6b297aaf 100644 --- a/examples/lighting-app/lighting-common/gen/callback-stub.cpp +++ b/examples/lighting-app/lighting-common/gen/callback-stub.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2021 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,8 @@ * limitations under the License. */ +// THIS FILE IS GENERATED BY ZAP + #include "callback.h" #include "cluster-id.h" @@ -42,6 +44,11 @@ void __attribute__((weak)) emberAfLevelControlClusterInitCallback(EndpointId end // To prevent warning (void) endpoint; } +void __attribute__((weak)) emberAfOnOffClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} // // Non-Cluster Related Callbacks @@ -58,7 +65,7 @@ void __attribute__((weak)) emberAfLevelControlClusterInitCallback(EndpointId end * * @param tasks Ver.: always */ -void emberAfAddToCurrentAppTasksCallback(EmberAfApplicationTask tasks) {} +void __attribute__((weak)) emberAfAddToCurrentAppTasksCallback(EmberAfApplicationTask tasks) {} /** @brief Remove From Current App Tasks * @@ -72,7 +79,7 @@ void emberAfAddToCurrentAppTasksCallback(EmberAfApplicationTask tasks) {} * * @param tasks Ver.: always */ -void emberAfRemoveFromCurrentAppTasksCallback(EmberAfApplicationTask tasks) {} +void __attribute__((weak)) emberAfRemoveFromCurrentAppTasksCallback(EmberAfApplicationTask tasks) {} /** @brief Allow Network Write Attribute * @@ -107,9 +114,9 @@ void emberAfRemoveFromCurrentAppTasksCallback(EmberAfApplicationTask tasks) {} * @param value Ver.: always * @param type Ver.: always */ -EmberAfAttributeWritePermission emberAfAllowNetworkWriteAttributeCallback(EndpointId endpoint, ClusterId clusterId, - AttributeId attributeId, uint8_t mask, - uint16_t manufacturerCode, uint8_t * value, uint8_t type) +EmberAfAttributeWritePermission __attribute__((weak)) +emberAfAllowNetworkWriteAttributeCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId, uint8_t mask, + uint16_t manufacturerCode, uint8_t * value, uint8_t type) { return EMBER_ZCL_ATTRIBUTE_WRITE_PERMISSION_ALLOW_WRITE_NORMAL; // Default } @@ -124,8 +131,8 @@ EmberAfAttributeWritePermission emberAfAllowNetworkWriteAttributeCallback(Endpoi * @param manufacturerCode Ver.: always * @param attributeId Ver.: always */ -bool emberAfAttributeReadAccessCallback(EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode, - AttributeId attributeId) +bool __attribute__((weak)) +emberAfAttributeReadAccessCallback(EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode, AttributeId attributeId) { return true; } @@ -140,8 +147,8 @@ bool emberAfAttributeReadAccessCallback(EndpointId endpoint, ClusterId clusterId * @param manufacturerCode Ver.: always * @param attributeId Ver.: always */ -bool emberAfAttributeWriteAccessCallback(EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode, - AttributeId attributeId) +bool __attribute__((weak)) +emberAfAttributeWriteAccessCallback(EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode, AttributeId attributeId) { return true; } @@ -158,7 +165,7 @@ bool emberAfAttributeWriteAccessCallback(EndpointId endpoint, ClusterId clusterI * @param status Specifies either SUCCESS or the nature of the error that was * detected in the received command. Ver.: always */ -bool emberAfDefaultResponseCallback(ClusterId clusterId, CommandId commandId, EmberAfStatus status) +bool __attribute__((weak)) emberAfDefaultResponseCallback(ClusterId clusterId, CommandId commandId, EmberAfStatus status) { return false; } @@ -183,8 +190,8 @@ bool emberAfDefaultResponseCallback(ClusterId clusterId, CommandId commandId, Em * @param extended Indicates whether the response is in the extended format or * not. Ver.: always */ -bool emberAfDiscoverAttributesResponseCallback(ClusterId clusterId, bool discoveryComplete, uint8_t * buffer, uint16_t bufLen, - bool extended) +bool __attribute__((weak)) emberAfDiscoverAttributesResponseCallback(ClusterId clusterId, bool discoveryComplete, uint8_t * buffer, + uint16_t bufLen, bool extended) { return false; } @@ -203,8 +210,9 @@ bool emberAfDiscoverAttributesResponseCallback(ClusterId clusterId, bool discove * @param commandIdCount The length of bytes of the list, whish is the same as * the number of identifiers. Ver.: always */ -bool emberAfDiscoverCommandsGeneratedResponseCallback(ClusterId clusterId, uint16_t manufacturerCode, bool discoveryComplete, - CommandId * commandIds, uint16_t commandIdCount) +bool __attribute__((weak)) +emberAfDiscoverCommandsGeneratedResponseCallback(ClusterId clusterId, uint16_t manufacturerCode, bool discoveryComplete, + CommandId * commandIds, uint16_t commandIdCount) { return false; } @@ -223,8 +231,9 @@ bool emberAfDiscoverCommandsGeneratedResponseCallback(ClusterId clusterId, uint1 * @param commandIdCount The length of bytes of the list, whish is the same as * the number of identifiers. Ver.: always */ -bool emberAfDiscoverCommandsReceivedResponseCallback(ClusterId clusterId, uint16_t manufacturerCode, bool discoveryComplete, - CommandId * commandIds, uint16_t commandIdCount) +bool __attribute__((weak)) +emberAfDiscoverCommandsReceivedResponseCallback(ClusterId clusterId, uint16_t manufacturerCode, bool discoveryComplete, + CommandId * commandIds, uint16_t commandIdCount) { return false; } @@ -242,7 +251,7 @@ bool emberAfDiscoverCommandsReceivedResponseCallback(ClusterId clusterId, uint16 * * @param cmd Ver.: always */ -bool emberAfPreCommandReceivedCallback(EmberAfClusterCommand * cmd) +bool __attribute__((weak)) emberAfPreCommandReceivedCallback(EmberAfClusterCommand * cmd) { return false; } @@ -266,7 +275,7 @@ bool emberAfPreCommandReceivedCallback(EmberAfClusterCommand * cmd) * @param status A pointer to the status code value that will be returned to the * caller. Ver.: always */ -bool emberAfPreMessageSendCallback(EmberAfMessageStruct * messageStruct, EmberStatus * status) +bool __attribute__((weak)) emberAfPreMessageSendCallback(EmberAfMessageStruct * messageStruct, EmberStatus * status) { return false; } @@ -289,8 +298,9 @@ bool emberAfPreMessageSendCallback(EmberAfMessageStruct * messageStruct, EmberSt * @param message Ver.: always * @param status Ver.: always */ -bool emberAfMessageSentCallback(EmberOutgoingMessageType type, uint64_t indexOrDestination, EmberApsFrame * apsFrame, - uint16_t msgLen, uint8_t * message, EmberStatus status) +bool __attribute__((weak)) +emberAfMessageSentCallback(EmberOutgoingMessageType type, uint64_t indexOrDestination, EmberApsFrame * apsFrame, uint16_t msgLen, + uint8_t * message, EmberStatus status) { return false; } @@ -312,12 +322,33 @@ bool emberAfMessageSentCallback(EmberOutgoingMessageType type, uint64_t indexOrD * @param size Ver.: always * @param value Ver.: always */ -EmberAfStatus emberAfPreAttributeChangeCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId, uint8_t mask, - uint16_t manufacturerCode, uint8_t type, uint8_t size, uint8_t * value) +EmberAfStatus __attribute__((weak)) +emberAfPreAttributeChangeCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId, uint8_t mask, + uint16_t manufacturerCode, uint8_t type, uint8_t size, uint8_t * value) { return EMBER_ZCL_STATUS_SUCCESS; } +/** @brief Post Attribute Change + * + * This function is called by the application framework after it changes an + * attribute value. The value passed into this callback is the value to which + * the attribute was set by the framework. + * + * @param endpoint Ver.: always + * @param clusterId Ver.: always + * @param attributeId Ver.: always + * @param mask Ver.: always + * @param manufacturerCode Ver.: always + * @param type Ver.: always + * @param size Ver.: always + * @param value Ver.: always + */ +void __attribute__((weak)) +emberAfPostAttributeChangeCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId, uint8_t mask, + uint16_t manufacturerCode, uint8_t type, uint8_t size, uint8_t * value) +{} + /** @brief Read Attributes Response * * This function is called by the application framework when a Read Attributes @@ -329,7 +360,7 @@ EmberAfStatus emberAfPreAttributeChangeCallback(EndpointId endpoint, ClusterId c * Ver.: always * @param bufLen The length in bytes of the list. Ver.: always */ -bool emberAfReadAttributesResponseCallback(ClusterId clusterId, uint8_t * buffer, uint16_t bufLen) +bool __attribute__((weak)) emberAfReadAttributesResponseCallback(ClusterId clusterId, uint8_t * buffer, uint16_t bufLen) { return false; } @@ -370,9 +401,9 @@ bool emberAfReadAttributesResponseCallback(ClusterId clusterId, uint8_t * buffer * @param buffer Ver.: always * @param maxReadLength Ver.: always */ -EmberAfStatus emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterId clusterId, - EmberAfAttributeMetadata * attributeMetadata, uint16_t manufacturerCode, - uint8_t * buffer, uint16_t maxReadLength) +EmberAfStatus __attribute__((weak)) +emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterId clusterId, EmberAfAttributeMetadata * attributeMetadata, + uint16_t manufacturerCode, uint8_t * buffer, uint16_t maxReadLength) { return EMBER_ZCL_STATUS_FAILURE; } @@ -388,7 +419,7 @@ EmberAfStatus emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterI * Ver.: always * @param bufLen The length in bytes of the list. Ver.: always */ -bool emberAfWriteAttributesResponseCallback(ClusterId clusterId, uint8_t * buffer, uint16_t bufLen) +bool __attribute__((weak)) emberAfWriteAttributesResponseCallback(ClusterId clusterId, uint8_t * buffer, uint16_t bufLen) { return false; } @@ -439,9 +470,9 @@ bool emberAfWriteAttributesResponseCallback(ClusterId clusterId, uint8_t * buffe * @param manufacturerCode Ver.: always * @param buffer Ver.: always */ -EmberAfStatus emberAfExternalAttributeWriteCallback(EndpointId endpoint, ClusterId clusterId, - EmberAfAttributeMetadata * attributeMetadata, uint16_t manufacturerCode, - uint8_t * buffer) +EmberAfStatus __attribute__((weak)) +emberAfExternalAttributeWriteCallback(EndpointId endpoint, ClusterId clusterId, EmberAfAttributeMetadata * attributeMetadata, + uint16_t manufacturerCode, uint8_t * buffer) { return EMBER_ZCL_STATUS_FAILURE; } @@ -457,7 +488,7 @@ EmberAfStatus emberAfExternalAttributeWriteCallback(EndpointId endpoint, Cluster * always * @param bufLen The length in bytes of the list. Ver.: always */ -bool emberAfReportAttributesCallback(ClusterId clusterId, uint8_t * buffer, uint16_t bufLen) +bool __attribute__((weak)) emberAfReportAttributesCallback(ClusterId clusterId, uint8_t * buffer, uint16_t bufLen) { return false; } @@ -471,7 +502,7 @@ bool emberAfReportAttributesCallback(ClusterId clusterId, uint8_t * buffer, uint * that device does not have access to real time. * */ -uint32_t emberAfGetCurrentTimeCallback() +uint32_t __attribute__((weak)) emberAfGetCurrentTimeCallback() { return 0; } @@ -493,8 +524,8 @@ uint32_t emberAfGetCurrentTimeCallback() * @param returnEndpointInfo A pointer to a data struct that will be written * with information about the endpoint. Ver.: always */ -bool emberAfGetEndpointInfoCallback(EndpointId endpoint, uint8_t * returnNetworkIndex, - EmberAfEndpointInfoStruct * returnEndpointInfo) +bool __attribute__((weak)) +emberAfGetEndpointInfoCallback(EndpointId endpoint, uint8_t * returnNetworkIndex, EmberAfEndpointInfoStruct * returnEndpointInfo) { return false; } @@ -506,7 +537,7 @@ bool emberAfGetEndpointInfoCallback(EndpointId endpoint, uint8_t * returnNetwork * * @param destination The node id of the destination Ver.: always */ -uint8_t emberAfGetSourceRouteOverheadCallback(chip::NodeId destination) +uint8_t __attribute__((weak)) emberAfGetSourceRouteOverheadCallback(chip::NodeId destination) { return 0; } @@ -517,7 +548,7 @@ uint8_t emberAfGetSourceRouteOverheadCallback(chip::NodeId destination) * process. * */ -void emberAfRegistrationAbortCallback() {} +void __attribute__((weak)) emberAfRegistrationAbortCallback() {} /** @brief Interpan Send Message * @@ -529,7 +560,8 @@ void emberAfRegistrationAbortCallback() {} * always * @param message The message data received or to send. Ver.: always */ -EmberStatus emberAfInterpanSendMessageCallback(EmberAfInterpanHeader * header, uint16_t messageLength, uint8_t * message) +EmberStatus __attribute__((weak)) +emberAfInterpanSendMessageCallback(EmberAfInterpanHeader * header, uint16_t messageLength, uint8_t * message) { return EMBER_LIBRARY_NOT_PRESENT; } @@ -540,7 +572,7 @@ EmberStatus emberAfInterpanSendMessageCallback(EmberAfInterpanHeader * header, u * to a new parent. * */ -bool emberAfStartMoveCallback() +bool __attribute__((weak)) emberAfStartMoveCallback() { return false; } diff --git a/examples/lighting-app/lighting-common/gen/callback.h b/examples/lighting-app/lighting-common/gen/callback.h index cce8d918437b70..b20aea2c771541 100644 --- a/examples/lighting-app/lighting-common/gen/callback.h +++ b/examples/lighting-app/lighting-common/gen/callback.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2021 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,8 @@ * limitations under the License. */ +// THIS FILE IS GENERATED BY ZAP + // Prevent multiple inclusion #pragma once diff --git a/examples/lighting-app/lighting-common/gen/client-command-macro.h b/examples/lighting-app/lighting-common/gen/client-command-macro.h index 7116663d885eca..0cdc54212f2375 100644 --- a/examples/lighting-app/lighting-common/gen/client-command-macro.h +++ b/examples/lighting-app/lighting-common/gen/client-command-macro.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2021 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,8 @@ * limitations under the License. */ +// THIS FILE IS GENERATED BY ZAP + // Prevent multiple inclusion #pragma once diff --git a/examples/lighting-app/lighting-common/gen/cluster-id.h b/examples/lighting-app/lighting-common/gen/cluster-id.h index 4db65e9cad99d0..262de53f3b3378 100644 --- a/examples/lighting-app/lighting-common/gen/cluster-id.h +++ b/examples/lighting-app/lighting-common/gen/cluster-id.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2021 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,8 @@ * limitations under the License. */ +// THIS FILE IS GENERATED BY ZAP + // Prevent multiple inclusion #pragma once diff --git a/examples/lighting-app/lighting-common/gen/command-id.h b/examples/lighting-app/lighting-common/gen/command-id.h index 42dcc0e89c71f5..9e608623150c7c 100644 --- a/examples/lighting-app/lighting-common/gen/command-id.h +++ b/examples/lighting-app/lighting-common/gen/command-id.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2021 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,8 @@ * limitations under the License. */ +// THIS FILE IS GENERATED BY ZAP + // Prevent multiple inclusion #pragma once diff --git a/examples/lighting-app/lighting-common/gen/endpoint_config.h b/examples/lighting-app/lighting-common/gen/endpoint_config.h index 3f0063dfc47f98..8897bf1f167da6 100644 --- a/examples/lighting-app/lighting-common/gen/endpoint_config.h +++ b/examples/lighting-app/lighting-common/gen/endpoint_config.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2021 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,8 @@ * limitations under the License. */ +// THIS FILE IS GENERATED BY ZAP + // Prevent multiple inclusion #pragma once diff --git a/examples/lighting-app/lighting-common/gen/enums.h b/examples/lighting-app/lighting-common/gen/enums.h index 5202a5283172f0..7cf4c5c578e788 100644 --- a/examples/lighting-app/lighting-common/gen/enums.h +++ b/examples/lighting-app/lighting-common/gen/enums.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2021 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,8 @@ * limitations under the License. */ +// THIS FILE IS GENERATED BY ZAP + // Prevent multiple inclusion #pragma once diff --git a/examples/lighting-app/lighting-common/gen/gen_config.h b/examples/lighting-app/lighting-common/gen/gen_config.h index ac019658052b2a..3bafddea1838cf 100644 --- a/examples/lighting-app/lighting-common/gen/gen_config.h +++ b/examples/lighting-app/lighting-common/gen/gen_config.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2021 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,8 @@ * limitations under the License. */ +// THIS FILE IS GENERATED BY ZAP + // Prevent multiple inclusion #pragma once diff --git a/examples/lighting-app/lighting-common/gen/gen_tokens.h b/examples/lighting-app/lighting-common/gen/gen_tokens.h index 80bd8a4098e676..860bf575d35d81 100644 --- a/examples/lighting-app/lighting-common/gen/gen_tokens.h +++ b/examples/lighting-app/lighting-common/gen/gen_tokens.h @@ -1,6 +1,6 @@ -/** +/* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2021 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,25 +15,10 @@ * limitations under the License. */ -/** - * - * Copyright (c) 2020 Silicon Labs - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// This file is generated by Simplicity Studio. Please do not edit manually. -// -// +// THIS FILE IS GENERATED BY ZAP + +// Prevent multiple inclusion +#pragma once // This file contains the tokens for attributes stored in flash diff --git a/examples/lighting-app/lighting-common/gen/print-cluster.h b/examples/lighting-app/lighting-common/gen/print-cluster.h index 7155ccf0294122..4348de1953fb86 100644 --- a/examples/lighting-app/lighting-common/gen/print-cluster.h +++ b/examples/lighting-app/lighting-common/gen/print-cluster.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2021 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,8 @@ * limitations under the License. */ +// THIS FILE IS GENERATED BY ZAP + // Prevent multiple inclusion #pragma once diff --git a/examples/lock-app/lock-common/gen/af-structs.h b/examples/lock-app/lock-common/gen/af-structs.h index 02960bec60ddfb..c5cd195f38d882 100644 --- a/examples/lock-app/lock-common/gen/af-structs.h +++ b/examples/lock-app/lock-common/gen/af-structs.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2021 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,8 @@ * limitations under the License. */ +// THIS FILE IS GENERATED BY ZAP + // Prevent multiple inclusion #pragma once diff --git a/examples/lock-app/lock-common/gen/att-storage.h b/examples/lock-app/lock-common/gen/att-storage.h index 74b44d6111b3e4..bd817b76cb7b89 100644 --- a/examples/lock-app/lock-common/gen/att-storage.h +++ b/examples/lock-app/lock-common/gen/att-storage.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2021 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,8 @@ * limitations under the License. */ +// THIS FILE IS GENERATED BY ZAP + // Prevent multiple inclusion #pragma once diff --git a/examples/lock-app/lock-common/gen/attribute-id.h b/examples/lock-app/lock-common/gen/attribute-id.h index 901653b7d8f3b6..0fd456c36a20f6 100644 --- a/examples/lock-app/lock-common/gen/attribute-id.h +++ b/examples/lock-app/lock-common/gen/attribute-id.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2021 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,8 @@ * limitations under the License. */ +// THIS FILE IS GENERATED BY ZAP + // Prevent multiple inclusion #pragma once diff --git a/examples/lock-app/lock-common/gen/attribute-size.h b/examples/lock-app/lock-common/gen/attribute-size.h index f9ef9212244eca..a6caf3ac7ca695 100644 --- a/examples/lock-app/lock-common/gen/attribute-size.h +++ b/examples/lock-app/lock-common/gen/attribute-size.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2021 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,8 @@ * limitations under the License. */ +// THIS FILE IS GENERATED BY ZAP + // Prevent multiple inclusion #pragma once diff --git a/examples/lock-app/lock-common/gen/attribute-type.h b/examples/lock-app/lock-common/gen/attribute-type.h index 225cbc68be49c2..56900dcb558841 100644 --- a/examples/lock-app/lock-common/gen/attribute-type.h +++ b/examples/lock-app/lock-common/gen/attribute-type.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2021 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,8 @@ * limitations under the License. */ +// THIS FILE IS GENERATED BY ZAP + // Prevent multiple inclusion #pragma once diff --git a/examples/lock-app/lock-common/gen/call-command-handler.cpp b/examples/lock-app/lock-common/gen/call-command-handler.cpp index e87194dbb323d0..5c9bdd76005c89 100644 --- a/examples/lock-app/lock-common/gen/call-command-handler.cpp +++ b/examples/lock-app/lock-common/gen/call-command-handler.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2021 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,8 @@ * limitations under the License. */ +// THIS FILE IS GENERATED BY ZAP + #include #include "af-structs.h" diff --git a/examples/lock-app/lock-common/gen/call-command-handler.h b/examples/lock-app/lock-common/gen/call-command-handler.h index 43164ad576bfa8..16314d83b9817f 100644 --- a/examples/lock-app/lock-common/gen/call-command-handler.h +++ b/examples/lock-app/lock-common/gen/call-command-handler.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2021 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,8 @@ * limitations under the License. */ +// THIS FILE IS GENERATED BY ZAP + // Prevent multiple inclusion #pragma once diff --git a/examples/lock-app/lock-common/gen/callback-stub.cpp b/examples/lock-app/lock-common/gen/callback-stub.cpp index 498fdb3a0a8ca0..11e56d0afd4c49 100644 --- a/examples/lock-app/lock-common/gen/callback-stub.cpp +++ b/examples/lock-app/lock-common/gen/callback-stub.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2021 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,8 @@ * limitations under the License. */ +// THIS FILE IS GENERATED BY ZAP + #include "callback.h" #include "cluster-id.h" @@ -34,6 +36,12 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) } } +void __attribute__((weak)) emberAfOnOffClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} + // // Non-Cluster Related Callbacks // @@ -49,7 +57,7 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) * * @param tasks Ver.: always */ -void emberAfAddToCurrentAppTasksCallback(EmberAfApplicationTask tasks) {} +void __attribute__((weak)) emberAfAddToCurrentAppTasksCallback(EmberAfApplicationTask tasks) {} /** @brief Remove From Current App Tasks * @@ -63,7 +71,7 @@ void emberAfAddToCurrentAppTasksCallback(EmberAfApplicationTask tasks) {} * * @param tasks Ver.: always */ -void emberAfRemoveFromCurrentAppTasksCallback(EmberAfApplicationTask tasks) {} +void __attribute__((weak)) emberAfRemoveFromCurrentAppTasksCallback(EmberAfApplicationTask tasks) {} /** @brief Allow Network Write Attribute * @@ -98,9 +106,9 @@ void emberAfRemoveFromCurrentAppTasksCallback(EmberAfApplicationTask tasks) {} * @param value Ver.: always * @param type Ver.: always */ -EmberAfAttributeWritePermission emberAfAllowNetworkWriteAttributeCallback(EndpointId endpoint, ClusterId clusterId, - AttributeId attributeId, uint8_t mask, - uint16_t manufacturerCode, uint8_t * value, uint8_t type) +EmberAfAttributeWritePermission __attribute__((weak)) +emberAfAllowNetworkWriteAttributeCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId, uint8_t mask, + uint16_t manufacturerCode, uint8_t * value, uint8_t type) { return EMBER_ZCL_ATTRIBUTE_WRITE_PERMISSION_ALLOW_WRITE_NORMAL; // Default } @@ -115,8 +123,8 @@ EmberAfAttributeWritePermission emberAfAllowNetworkWriteAttributeCallback(Endpoi * @param manufacturerCode Ver.: always * @param attributeId Ver.: always */ -bool emberAfAttributeReadAccessCallback(EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode, - AttributeId attributeId) +bool __attribute__((weak)) +emberAfAttributeReadAccessCallback(EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode, AttributeId attributeId) { return true; } @@ -131,8 +139,8 @@ bool emberAfAttributeReadAccessCallback(EndpointId endpoint, ClusterId clusterId * @param manufacturerCode Ver.: always * @param attributeId Ver.: always */ -bool emberAfAttributeWriteAccessCallback(EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode, - AttributeId attributeId) +bool __attribute__((weak)) +emberAfAttributeWriteAccessCallback(EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode, AttributeId attributeId) { return true; } @@ -149,7 +157,7 @@ bool emberAfAttributeWriteAccessCallback(EndpointId endpoint, ClusterId clusterI * @param status Specifies either SUCCESS or the nature of the error that was * detected in the received command. Ver.: always */ -bool emberAfDefaultResponseCallback(ClusterId clusterId, CommandId commandId, EmberAfStatus status) +bool __attribute__((weak)) emberAfDefaultResponseCallback(ClusterId clusterId, CommandId commandId, EmberAfStatus status) { return false; } @@ -174,8 +182,8 @@ bool emberAfDefaultResponseCallback(ClusterId clusterId, CommandId commandId, Em * @param extended Indicates whether the response is in the extended format or * not. Ver.: always */ -bool emberAfDiscoverAttributesResponseCallback(ClusterId clusterId, bool discoveryComplete, uint8_t * buffer, uint16_t bufLen, - bool extended) +bool __attribute__((weak)) emberAfDiscoverAttributesResponseCallback(ClusterId clusterId, bool discoveryComplete, uint8_t * buffer, + uint16_t bufLen, bool extended) { return false; } @@ -194,8 +202,9 @@ bool emberAfDiscoverAttributesResponseCallback(ClusterId clusterId, bool discove * @param commandIdCount The length of bytes of the list, whish is the same as * the number of identifiers. Ver.: always */ -bool emberAfDiscoverCommandsGeneratedResponseCallback(ClusterId clusterId, uint16_t manufacturerCode, bool discoveryComplete, - CommandId * commandIds, uint16_t commandIdCount) +bool __attribute__((weak)) +emberAfDiscoverCommandsGeneratedResponseCallback(ClusterId clusterId, uint16_t manufacturerCode, bool discoveryComplete, + CommandId * commandIds, uint16_t commandIdCount) { return false; } @@ -214,8 +223,9 @@ bool emberAfDiscoverCommandsGeneratedResponseCallback(ClusterId clusterId, uint1 * @param commandIdCount The length of bytes of the list, whish is the same as * the number of identifiers. Ver.: always */ -bool emberAfDiscoverCommandsReceivedResponseCallback(ClusterId clusterId, uint16_t manufacturerCode, bool discoveryComplete, - CommandId * commandIds, uint16_t commandIdCount) +bool __attribute__((weak)) +emberAfDiscoverCommandsReceivedResponseCallback(ClusterId clusterId, uint16_t manufacturerCode, bool discoveryComplete, + CommandId * commandIds, uint16_t commandIdCount) { return false; } @@ -233,7 +243,7 @@ bool emberAfDiscoverCommandsReceivedResponseCallback(ClusterId clusterId, uint16 * * @param cmd Ver.: always */ -bool emberAfPreCommandReceivedCallback(EmberAfClusterCommand * cmd) +bool __attribute__((weak)) emberAfPreCommandReceivedCallback(EmberAfClusterCommand * cmd) { return false; } @@ -257,7 +267,7 @@ bool emberAfPreCommandReceivedCallback(EmberAfClusterCommand * cmd) * @param status A pointer to the status code value that will be returned to the * caller. Ver.: always */ -bool emberAfPreMessageSendCallback(EmberAfMessageStruct * messageStruct, EmberStatus * status) +bool __attribute__((weak)) emberAfPreMessageSendCallback(EmberAfMessageStruct * messageStruct, EmberStatus * status) { return false; } @@ -280,8 +290,9 @@ bool emberAfPreMessageSendCallback(EmberAfMessageStruct * messageStruct, EmberSt * @param message Ver.: always * @param status Ver.: always */ -bool emberAfMessageSentCallback(EmberOutgoingMessageType type, uint64_t indexOrDestination, EmberApsFrame * apsFrame, - uint16_t msgLen, uint8_t * message, EmberStatus status) +bool __attribute__((weak)) +emberAfMessageSentCallback(EmberOutgoingMessageType type, uint64_t indexOrDestination, EmberApsFrame * apsFrame, uint16_t msgLen, + uint8_t * message, EmberStatus status) { return false; } @@ -303,12 +314,33 @@ bool emberAfMessageSentCallback(EmberOutgoingMessageType type, uint64_t indexOrD * @param size Ver.: always * @param value Ver.: always */ -EmberAfStatus emberAfPreAttributeChangeCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId, uint8_t mask, - uint16_t manufacturerCode, uint8_t type, uint8_t size, uint8_t * value) +EmberAfStatus __attribute__((weak)) +emberAfPreAttributeChangeCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId, uint8_t mask, + uint16_t manufacturerCode, uint8_t type, uint8_t size, uint8_t * value) { return EMBER_ZCL_STATUS_SUCCESS; } +/** @brief Post Attribute Change + * + * This function is called by the application framework after it changes an + * attribute value. The value passed into this callback is the value to which + * the attribute was set by the framework. + * + * @param endpoint Ver.: always + * @param clusterId Ver.: always + * @param attributeId Ver.: always + * @param mask Ver.: always + * @param manufacturerCode Ver.: always + * @param type Ver.: always + * @param size Ver.: always + * @param value Ver.: always + */ +void __attribute__((weak)) +emberAfPostAttributeChangeCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId, uint8_t mask, + uint16_t manufacturerCode, uint8_t type, uint8_t size, uint8_t * value) +{} + /** @brief Read Attributes Response * * This function is called by the application framework when a Read Attributes @@ -320,7 +352,7 @@ EmberAfStatus emberAfPreAttributeChangeCallback(EndpointId endpoint, ClusterId c * Ver.: always * @param bufLen The length in bytes of the list. Ver.: always */ -bool emberAfReadAttributesResponseCallback(ClusterId clusterId, uint8_t * buffer, uint16_t bufLen) +bool __attribute__((weak)) emberAfReadAttributesResponseCallback(ClusterId clusterId, uint8_t * buffer, uint16_t bufLen) { return false; } @@ -361,9 +393,9 @@ bool emberAfReadAttributesResponseCallback(ClusterId clusterId, uint8_t * buffer * @param buffer Ver.: always * @param maxReadLength Ver.: always */ -EmberAfStatus emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterId clusterId, - EmberAfAttributeMetadata * attributeMetadata, uint16_t manufacturerCode, - uint8_t * buffer, uint16_t maxReadLength) +EmberAfStatus __attribute__((weak)) +emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterId clusterId, EmberAfAttributeMetadata * attributeMetadata, + uint16_t manufacturerCode, uint8_t * buffer, uint16_t maxReadLength) { return EMBER_ZCL_STATUS_FAILURE; } @@ -379,7 +411,7 @@ EmberAfStatus emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterI * Ver.: always * @param bufLen The length in bytes of the list. Ver.: always */ -bool emberAfWriteAttributesResponseCallback(ClusterId clusterId, uint8_t * buffer, uint16_t bufLen) +bool __attribute__((weak)) emberAfWriteAttributesResponseCallback(ClusterId clusterId, uint8_t * buffer, uint16_t bufLen) { return false; } @@ -430,9 +462,9 @@ bool emberAfWriteAttributesResponseCallback(ClusterId clusterId, uint8_t * buffe * @param manufacturerCode Ver.: always * @param buffer Ver.: always */ -EmberAfStatus emberAfExternalAttributeWriteCallback(EndpointId endpoint, ClusterId clusterId, - EmberAfAttributeMetadata * attributeMetadata, uint16_t manufacturerCode, - uint8_t * buffer) +EmberAfStatus __attribute__((weak)) +emberAfExternalAttributeWriteCallback(EndpointId endpoint, ClusterId clusterId, EmberAfAttributeMetadata * attributeMetadata, + uint16_t manufacturerCode, uint8_t * buffer) { return EMBER_ZCL_STATUS_FAILURE; } @@ -448,7 +480,7 @@ EmberAfStatus emberAfExternalAttributeWriteCallback(EndpointId endpoint, Cluster * always * @param bufLen The length in bytes of the list. Ver.: always */ -bool emberAfReportAttributesCallback(ClusterId clusterId, uint8_t * buffer, uint16_t bufLen) +bool __attribute__((weak)) emberAfReportAttributesCallback(ClusterId clusterId, uint8_t * buffer, uint16_t bufLen) { return false; } @@ -462,7 +494,7 @@ bool emberAfReportAttributesCallback(ClusterId clusterId, uint8_t * buffer, uint * that device does not have access to real time. * */ -uint32_t emberAfGetCurrentTimeCallback() +uint32_t __attribute__((weak)) emberAfGetCurrentTimeCallback() { return 0; } @@ -484,8 +516,8 @@ uint32_t emberAfGetCurrentTimeCallback() * @param returnEndpointInfo A pointer to a data struct that will be written * with information about the endpoint. Ver.: always */ -bool emberAfGetEndpointInfoCallback(EndpointId endpoint, uint8_t * returnNetworkIndex, - EmberAfEndpointInfoStruct * returnEndpointInfo) +bool __attribute__((weak)) +emberAfGetEndpointInfoCallback(EndpointId endpoint, uint8_t * returnNetworkIndex, EmberAfEndpointInfoStruct * returnEndpointInfo) { return false; } @@ -497,7 +529,7 @@ bool emberAfGetEndpointInfoCallback(EndpointId endpoint, uint8_t * returnNetwork * * @param destination The node id of the destination Ver.: always */ -uint8_t emberAfGetSourceRouteOverheadCallback(chip::NodeId destination) +uint8_t __attribute__((weak)) emberAfGetSourceRouteOverheadCallback(chip::NodeId destination) { return 0; } @@ -508,7 +540,7 @@ uint8_t emberAfGetSourceRouteOverheadCallback(chip::NodeId destination) * process. * */ -void emberAfRegistrationAbortCallback() {} +void __attribute__((weak)) emberAfRegistrationAbortCallback() {} /** @brief Interpan Send Message * @@ -520,7 +552,8 @@ void emberAfRegistrationAbortCallback() {} * always * @param message The message data received or to send. Ver.: always */ -EmberStatus emberAfInterpanSendMessageCallback(EmberAfInterpanHeader * header, uint16_t messageLength, uint8_t * message) +EmberStatus __attribute__((weak)) +emberAfInterpanSendMessageCallback(EmberAfInterpanHeader * header, uint16_t messageLength, uint8_t * message) { return EMBER_LIBRARY_NOT_PRESENT; } @@ -531,7 +564,7 @@ EmberStatus emberAfInterpanSendMessageCallback(EmberAfInterpanHeader * header, u * to a new parent. * */ -bool emberAfStartMoveCallback() +bool __attribute__((weak)) emberAfStartMoveCallback() { return false; } diff --git a/examples/lock-app/lock-common/gen/callback.h b/examples/lock-app/lock-common/gen/callback.h index 70bfe97f92ee63..d6edd9d4ed9a03 100644 --- a/examples/lock-app/lock-common/gen/callback.h +++ b/examples/lock-app/lock-common/gen/callback.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2021 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,8 @@ * limitations under the License. */ +// THIS FILE IS GENERATED BY ZAP + // Prevent multiple inclusion #pragma once diff --git a/examples/lock-app/lock-common/gen/client-command-macro.h b/examples/lock-app/lock-common/gen/client-command-macro.h index 7116663d885eca..0cdc54212f2375 100644 --- a/examples/lock-app/lock-common/gen/client-command-macro.h +++ b/examples/lock-app/lock-common/gen/client-command-macro.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2021 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,8 @@ * limitations under the License. */ +// THIS FILE IS GENERATED BY ZAP + // Prevent multiple inclusion #pragma once diff --git a/examples/lock-app/lock-common/gen/cluster-id.h b/examples/lock-app/lock-common/gen/cluster-id.h index 4db65e9cad99d0..262de53f3b3378 100644 --- a/examples/lock-app/lock-common/gen/cluster-id.h +++ b/examples/lock-app/lock-common/gen/cluster-id.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2021 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,8 @@ * limitations under the License. */ +// THIS FILE IS GENERATED BY ZAP + // Prevent multiple inclusion #pragma once diff --git a/examples/lock-app/lock-common/gen/command-id.h b/examples/lock-app/lock-common/gen/command-id.h index 42dcc0e89c71f5..9e608623150c7c 100644 --- a/examples/lock-app/lock-common/gen/command-id.h +++ b/examples/lock-app/lock-common/gen/command-id.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2021 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,8 @@ * limitations under the License. */ +// THIS FILE IS GENERATED BY ZAP + // Prevent multiple inclusion #pragma once diff --git a/examples/lock-app/lock-common/gen/endpoint_config.h b/examples/lock-app/lock-common/gen/endpoint_config.h index 93db60254ced2d..d0cb3749194a9c 100644 --- a/examples/lock-app/lock-common/gen/endpoint_config.h +++ b/examples/lock-app/lock-common/gen/endpoint_config.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2021 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,8 @@ * limitations under the License. */ +// THIS FILE IS GENERATED BY ZAP + // Prevent multiple inclusion #pragma once diff --git a/examples/lock-app/lock-common/gen/enums.h b/examples/lock-app/lock-common/gen/enums.h index 5202a5283172f0..7cf4c5c578e788 100644 --- a/examples/lock-app/lock-common/gen/enums.h +++ b/examples/lock-app/lock-common/gen/enums.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2021 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,8 @@ * limitations under the License. */ +// THIS FILE IS GENERATED BY ZAP + // Prevent multiple inclusion #pragma once diff --git a/examples/lock-app/lock-common/gen/gen_config.h b/examples/lock-app/lock-common/gen/gen_config.h index 012dd88267a140..b5f0621684ee4a 100644 --- a/examples/lock-app/lock-common/gen/gen_config.h +++ b/examples/lock-app/lock-common/gen/gen_config.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2021 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,8 @@ * limitations under the License. */ +// THIS FILE IS GENERATED BY ZAP + // Prevent multiple inclusion #pragma once diff --git a/examples/lock-app/lock-common/gen/gen_tokens.h b/examples/lock-app/lock-common/gen/gen_tokens.h index 80bd8a4098e676..860bf575d35d81 100644 --- a/examples/lock-app/lock-common/gen/gen_tokens.h +++ b/examples/lock-app/lock-common/gen/gen_tokens.h @@ -1,6 +1,6 @@ -/** +/* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2021 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,25 +15,10 @@ * limitations under the License. */ -/** - * - * Copyright (c) 2020 Silicon Labs - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// This file is generated by Simplicity Studio. Please do not edit manually. -// -// +// THIS FILE IS GENERATED BY ZAP + +// Prevent multiple inclusion +#pragma once // This file contains the tokens for attributes stored in flash diff --git a/examples/lock-app/lock-common/gen/print-cluster.h b/examples/lock-app/lock-common/gen/print-cluster.h index 7155ccf0294122..4348de1953fb86 100644 --- a/examples/lock-app/lock-common/gen/print-cluster.h +++ b/examples/lock-app/lock-common/gen/print-cluster.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2021 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,8 @@ * limitations under the License. */ +// THIS FILE IS GENERATED BY ZAP + // Prevent multiple inclusion #pragma once diff --git a/examples/temperature-measurement-app/esp32/main/gen/af-structs.h b/examples/temperature-measurement-app/esp32/main/gen/af-structs.h index 02960bec60ddfb..c5cd195f38d882 100644 --- a/examples/temperature-measurement-app/esp32/main/gen/af-structs.h +++ b/examples/temperature-measurement-app/esp32/main/gen/af-structs.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2021 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,8 @@ * limitations under the License. */ +// THIS FILE IS GENERATED BY ZAP + // Prevent multiple inclusion #pragma once diff --git a/examples/temperature-measurement-app/esp32/main/gen/att-storage.h b/examples/temperature-measurement-app/esp32/main/gen/att-storage.h index 74b44d6111b3e4..bd817b76cb7b89 100644 --- a/examples/temperature-measurement-app/esp32/main/gen/att-storage.h +++ b/examples/temperature-measurement-app/esp32/main/gen/att-storage.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2021 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,8 @@ * limitations under the License. */ +// THIS FILE IS GENERATED BY ZAP + // Prevent multiple inclusion #pragma once diff --git a/examples/temperature-measurement-app/esp32/main/gen/attribute-id.h b/examples/temperature-measurement-app/esp32/main/gen/attribute-id.h index 901653b7d8f3b6..0fd456c36a20f6 100644 --- a/examples/temperature-measurement-app/esp32/main/gen/attribute-id.h +++ b/examples/temperature-measurement-app/esp32/main/gen/attribute-id.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2021 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,8 @@ * limitations under the License. */ +// THIS FILE IS GENERATED BY ZAP + // Prevent multiple inclusion #pragma once diff --git a/examples/temperature-measurement-app/esp32/main/gen/attribute-size.h b/examples/temperature-measurement-app/esp32/main/gen/attribute-size.h index f9ef9212244eca..a6caf3ac7ca695 100644 --- a/examples/temperature-measurement-app/esp32/main/gen/attribute-size.h +++ b/examples/temperature-measurement-app/esp32/main/gen/attribute-size.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2021 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,8 @@ * limitations under the License. */ +// THIS FILE IS GENERATED BY ZAP + // Prevent multiple inclusion #pragma once diff --git a/examples/temperature-measurement-app/esp32/main/gen/attribute-type.h b/examples/temperature-measurement-app/esp32/main/gen/attribute-type.h index 225cbc68be49c2..56900dcb558841 100644 --- a/examples/temperature-measurement-app/esp32/main/gen/attribute-type.h +++ b/examples/temperature-measurement-app/esp32/main/gen/attribute-type.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2021 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,8 @@ * limitations under the License. */ +// THIS FILE IS GENERATED BY ZAP + // Prevent multiple inclusion #pragma once diff --git a/examples/temperature-measurement-app/esp32/main/gen/call-command-handler.cpp b/examples/temperature-measurement-app/esp32/main/gen/call-command-handler.cpp index 9d9b42eeb0e6cd..82d19ea4353c59 100644 --- a/examples/temperature-measurement-app/esp32/main/gen/call-command-handler.cpp +++ b/examples/temperature-measurement-app/esp32/main/gen/call-command-handler.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2021 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,8 @@ * limitations under the License. */ +// THIS FILE IS GENERATED BY ZAP + #include #include "af-structs.h" diff --git a/examples/temperature-measurement-app/esp32/main/gen/call-command-handler.h b/examples/temperature-measurement-app/esp32/main/gen/call-command-handler.h index 43164ad576bfa8..16314d83b9817f 100644 --- a/examples/temperature-measurement-app/esp32/main/gen/call-command-handler.h +++ b/examples/temperature-measurement-app/esp32/main/gen/call-command-handler.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2021 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,8 @@ * limitations under the License. */ +// THIS FILE IS GENERATED BY ZAP + // Prevent multiple inclusion #pragma once diff --git a/examples/temperature-measurement-app/esp32/main/gen/callback-stub.cpp b/examples/temperature-measurement-app/esp32/main/gen/callback-stub.cpp index 0f1ad5993166ec..c6abf1da8346e0 100644 --- a/examples/temperature-measurement-app/esp32/main/gen/callback-stub.cpp +++ b/examples/temperature-measurement-app/esp32/main/gen/callback-stub.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2021 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,8 @@ * limitations under the License. */ +// THIS FILE IS GENERATED BY ZAP + #include "callback.h" #include "cluster-id.h" @@ -63,7 +65,7 @@ void __attribute__((weak)) emberAfTemperatureMeasurementClusterInitCallback(Endp * * @param tasks Ver.: always */ -void emberAfAddToCurrentAppTasksCallback(EmberAfApplicationTask tasks) {} +void __attribute__((weak)) emberAfAddToCurrentAppTasksCallback(EmberAfApplicationTask tasks) {} /** @brief Remove From Current App Tasks * @@ -77,7 +79,7 @@ void emberAfAddToCurrentAppTasksCallback(EmberAfApplicationTask tasks) {} * * @param tasks Ver.: always */ -void emberAfRemoveFromCurrentAppTasksCallback(EmberAfApplicationTask tasks) {} +void __attribute__((weak)) emberAfRemoveFromCurrentAppTasksCallback(EmberAfApplicationTask tasks) {} /** @brief Allow Network Write Attribute * @@ -112,9 +114,9 @@ void emberAfRemoveFromCurrentAppTasksCallback(EmberAfApplicationTask tasks) {} * @param value Ver.: always * @param type Ver.: always */ -EmberAfAttributeWritePermission emberAfAllowNetworkWriteAttributeCallback(EndpointId endpoint, ClusterId clusterId, - AttributeId attributeId, uint8_t mask, - uint16_t manufacturerCode, uint8_t * value, uint8_t type) +EmberAfAttributeWritePermission __attribute__((weak)) +emberAfAllowNetworkWriteAttributeCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId, uint8_t mask, + uint16_t manufacturerCode, uint8_t * value, uint8_t type) { return EMBER_ZCL_ATTRIBUTE_WRITE_PERMISSION_ALLOW_WRITE_NORMAL; // Default } @@ -129,8 +131,8 @@ EmberAfAttributeWritePermission emberAfAllowNetworkWriteAttributeCallback(Endpoi * @param manufacturerCode Ver.: always * @param attributeId Ver.: always */ -bool emberAfAttributeReadAccessCallback(EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode, - AttributeId attributeId) +bool __attribute__((weak)) +emberAfAttributeReadAccessCallback(EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode, AttributeId attributeId) { return true; } @@ -145,8 +147,8 @@ bool emberAfAttributeReadAccessCallback(EndpointId endpoint, ClusterId clusterId * @param manufacturerCode Ver.: always * @param attributeId Ver.: always */ -bool emberAfAttributeWriteAccessCallback(EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode, - AttributeId attributeId) +bool __attribute__((weak)) +emberAfAttributeWriteAccessCallback(EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode, AttributeId attributeId) { return true; } @@ -163,7 +165,7 @@ bool emberAfAttributeWriteAccessCallback(EndpointId endpoint, ClusterId clusterI * @param status Specifies either SUCCESS or the nature of the error that was * detected in the received command. Ver.: always */ -bool emberAfDefaultResponseCallback(ClusterId clusterId, CommandId commandId, EmberAfStatus status) +bool __attribute__((weak)) emberAfDefaultResponseCallback(ClusterId clusterId, CommandId commandId, EmberAfStatus status) { return false; } @@ -188,8 +190,8 @@ bool emberAfDefaultResponseCallback(ClusterId clusterId, CommandId commandId, Em * @param extended Indicates whether the response is in the extended format or * not. Ver.: always */ -bool emberAfDiscoverAttributesResponseCallback(ClusterId clusterId, bool discoveryComplete, uint8_t * buffer, uint16_t bufLen, - bool extended) +bool __attribute__((weak)) emberAfDiscoverAttributesResponseCallback(ClusterId clusterId, bool discoveryComplete, uint8_t * buffer, + uint16_t bufLen, bool extended) { return false; } @@ -208,8 +210,9 @@ bool emberAfDiscoverAttributesResponseCallback(ClusterId clusterId, bool discove * @param commandIdCount The length of bytes of the list, whish is the same as * the number of identifiers. Ver.: always */ -bool emberAfDiscoverCommandsGeneratedResponseCallback(ClusterId clusterId, uint16_t manufacturerCode, bool discoveryComplete, - CommandId * commandIds, uint16_t commandIdCount) +bool __attribute__((weak)) +emberAfDiscoverCommandsGeneratedResponseCallback(ClusterId clusterId, uint16_t manufacturerCode, bool discoveryComplete, + CommandId * commandIds, uint16_t commandIdCount) { return false; } @@ -228,8 +231,9 @@ bool emberAfDiscoverCommandsGeneratedResponseCallback(ClusterId clusterId, uint1 * @param commandIdCount The length of bytes of the list, whish is the same as * the number of identifiers. Ver.: always */ -bool emberAfDiscoverCommandsReceivedResponseCallback(ClusterId clusterId, uint16_t manufacturerCode, bool discoveryComplete, - CommandId * commandIds, uint16_t commandIdCount) +bool __attribute__((weak)) +emberAfDiscoverCommandsReceivedResponseCallback(ClusterId clusterId, uint16_t manufacturerCode, bool discoveryComplete, + CommandId * commandIds, uint16_t commandIdCount) { return false; } @@ -247,7 +251,7 @@ bool emberAfDiscoverCommandsReceivedResponseCallback(ClusterId clusterId, uint16 * * @param cmd Ver.: always */ -bool emberAfPreCommandReceivedCallback(EmberAfClusterCommand * cmd) +bool __attribute__((weak)) emberAfPreCommandReceivedCallback(EmberAfClusterCommand * cmd) { return false; } @@ -271,7 +275,7 @@ bool emberAfPreCommandReceivedCallback(EmberAfClusterCommand * cmd) * @param status A pointer to the status code value that will be returned to the * caller. Ver.: always */ -bool emberAfPreMessageSendCallback(EmberAfMessageStruct * messageStruct, EmberStatus * status) +bool __attribute__((weak)) emberAfPreMessageSendCallback(EmberAfMessageStruct * messageStruct, EmberStatus * status) { return false; } @@ -294,8 +298,9 @@ bool emberAfPreMessageSendCallback(EmberAfMessageStruct * messageStruct, EmberSt * @param message Ver.: always * @param status Ver.: always */ -bool emberAfMessageSentCallback(EmberOutgoingMessageType type, uint64_t indexOrDestination, EmberApsFrame * apsFrame, - uint16_t msgLen, uint8_t * message, EmberStatus status) +bool __attribute__((weak)) +emberAfMessageSentCallback(EmberOutgoingMessageType type, uint64_t indexOrDestination, EmberApsFrame * apsFrame, uint16_t msgLen, + uint8_t * message, EmberStatus status) { return false; } @@ -317,12 +322,33 @@ bool emberAfMessageSentCallback(EmberOutgoingMessageType type, uint64_t indexOrD * @param size Ver.: always * @param value Ver.: always */ -EmberAfStatus emberAfPreAttributeChangeCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId, uint8_t mask, - uint16_t manufacturerCode, uint8_t type, uint8_t size, uint8_t * value) +EmberAfStatus __attribute__((weak)) +emberAfPreAttributeChangeCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId, uint8_t mask, + uint16_t manufacturerCode, uint8_t type, uint8_t size, uint8_t * value) { return EMBER_ZCL_STATUS_SUCCESS; } +/** @brief Post Attribute Change + * + * This function is called by the application framework after it changes an + * attribute value. The value passed into this callback is the value to which + * the attribute was set by the framework. + * + * @param endpoint Ver.: always + * @param clusterId Ver.: always + * @param attributeId Ver.: always + * @param mask Ver.: always + * @param manufacturerCode Ver.: always + * @param type Ver.: always + * @param size Ver.: always + * @param value Ver.: always + */ +void __attribute__((weak)) +emberAfPostAttributeChangeCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId, uint8_t mask, + uint16_t manufacturerCode, uint8_t type, uint8_t size, uint8_t * value) +{} + /** @brief Read Attributes Response * * This function is called by the application framework when a Read Attributes @@ -334,7 +360,7 @@ EmberAfStatus emberAfPreAttributeChangeCallback(EndpointId endpoint, ClusterId c * Ver.: always * @param bufLen The length in bytes of the list. Ver.: always */ -bool emberAfReadAttributesResponseCallback(ClusterId clusterId, uint8_t * buffer, uint16_t bufLen) +bool __attribute__((weak)) emberAfReadAttributesResponseCallback(ClusterId clusterId, uint8_t * buffer, uint16_t bufLen) { return false; } @@ -375,9 +401,9 @@ bool emberAfReadAttributesResponseCallback(ClusterId clusterId, uint8_t * buffer * @param buffer Ver.: always * @param maxReadLength Ver.: always */ -EmberAfStatus emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterId clusterId, - EmberAfAttributeMetadata * attributeMetadata, uint16_t manufacturerCode, - uint8_t * buffer, uint16_t maxReadLength) +EmberAfStatus __attribute__((weak)) +emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterId clusterId, EmberAfAttributeMetadata * attributeMetadata, + uint16_t manufacturerCode, uint8_t * buffer, uint16_t maxReadLength) { return EMBER_ZCL_STATUS_FAILURE; } @@ -393,7 +419,7 @@ EmberAfStatus emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterI * Ver.: always * @param bufLen The length in bytes of the list. Ver.: always */ -bool emberAfWriteAttributesResponseCallback(ClusterId clusterId, uint8_t * buffer, uint16_t bufLen) +bool __attribute__((weak)) emberAfWriteAttributesResponseCallback(ClusterId clusterId, uint8_t * buffer, uint16_t bufLen) { return false; } @@ -444,9 +470,9 @@ bool emberAfWriteAttributesResponseCallback(ClusterId clusterId, uint8_t * buffe * @param manufacturerCode Ver.: always * @param buffer Ver.: always */ -EmberAfStatus emberAfExternalAttributeWriteCallback(EndpointId endpoint, ClusterId clusterId, - EmberAfAttributeMetadata * attributeMetadata, uint16_t manufacturerCode, - uint8_t * buffer) +EmberAfStatus __attribute__((weak)) +emberAfExternalAttributeWriteCallback(EndpointId endpoint, ClusterId clusterId, EmberAfAttributeMetadata * attributeMetadata, + uint16_t manufacturerCode, uint8_t * buffer) { return EMBER_ZCL_STATUS_FAILURE; } @@ -462,7 +488,7 @@ EmberAfStatus emberAfExternalAttributeWriteCallback(EndpointId endpoint, Cluster * always * @param bufLen The length in bytes of the list. Ver.: always */ -bool emberAfReportAttributesCallback(ClusterId clusterId, uint8_t * buffer, uint16_t bufLen) +bool __attribute__((weak)) emberAfReportAttributesCallback(ClusterId clusterId, uint8_t * buffer, uint16_t bufLen) { return false; } @@ -476,7 +502,7 @@ bool emberAfReportAttributesCallback(ClusterId clusterId, uint8_t * buffer, uint * that device does not have access to real time. * */ -uint32_t emberAfGetCurrentTimeCallback() +uint32_t __attribute__((weak)) emberAfGetCurrentTimeCallback() { return 0; } @@ -498,8 +524,8 @@ uint32_t emberAfGetCurrentTimeCallback() * @param returnEndpointInfo A pointer to a data struct that will be written * with information about the endpoint. Ver.: always */ -bool emberAfGetEndpointInfoCallback(EndpointId endpoint, uint8_t * returnNetworkIndex, - EmberAfEndpointInfoStruct * returnEndpointInfo) +bool __attribute__((weak)) +emberAfGetEndpointInfoCallback(EndpointId endpoint, uint8_t * returnNetworkIndex, EmberAfEndpointInfoStruct * returnEndpointInfo) { return false; } @@ -511,7 +537,7 @@ bool emberAfGetEndpointInfoCallback(EndpointId endpoint, uint8_t * returnNetwork * * @param destination The node id of the destination Ver.: always */ -uint8_t emberAfGetSourceRouteOverheadCallback(chip::NodeId destination) +uint8_t __attribute__((weak)) emberAfGetSourceRouteOverheadCallback(chip::NodeId destination) { return 0; } @@ -522,7 +548,7 @@ uint8_t emberAfGetSourceRouteOverheadCallback(chip::NodeId destination) * process. * */ -void emberAfRegistrationAbortCallback() {} +void __attribute__((weak)) emberAfRegistrationAbortCallback() {} /** @brief Interpan Send Message * @@ -534,7 +560,8 @@ void emberAfRegistrationAbortCallback() {} * always * @param message The message data received or to send. Ver.: always */ -EmberStatus emberAfInterpanSendMessageCallback(EmberAfInterpanHeader * header, uint16_t messageLength, uint8_t * message) +EmberStatus __attribute__((weak)) +emberAfInterpanSendMessageCallback(EmberAfInterpanHeader * header, uint16_t messageLength, uint8_t * message) { return EMBER_LIBRARY_NOT_PRESENT; } @@ -545,7 +572,7 @@ EmberStatus emberAfInterpanSendMessageCallback(EmberAfInterpanHeader * header, u * to a new parent. * */ -bool emberAfStartMoveCallback() +bool __attribute__((weak)) emberAfStartMoveCallback() { return false; } diff --git a/examples/temperature-measurement-app/esp32/main/gen/callback.h b/examples/temperature-measurement-app/esp32/main/gen/callback.h index df4a40d85d979f..1ba42de9744d43 100644 --- a/examples/temperature-measurement-app/esp32/main/gen/callback.h +++ b/examples/temperature-measurement-app/esp32/main/gen/callback.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2021 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,8 @@ * limitations under the License. */ +// THIS FILE IS GENERATED BY ZAP + // Prevent multiple inclusion #pragma once diff --git a/examples/temperature-measurement-app/esp32/main/gen/client-command-macro.h b/examples/temperature-measurement-app/esp32/main/gen/client-command-macro.h index 7116663d885eca..0cdc54212f2375 100644 --- a/examples/temperature-measurement-app/esp32/main/gen/client-command-macro.h +++ b/examples/temperature-measurement-app/esp32/main/gen/client-command-macro.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2021 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,8 @@ * limitations under the License. */ +// THIS FILE IS GENERATED BY ZAP + // Prevent multiple inclusion #pragma once diff --git a/examples/temperature-measurement-app/esp32/main/gen/cluster-id.h b/examples/temperature-measurement-app/esp32/main/gen/cluster-id.h index 4db65e9cad99d0..262de53f3b3378 100644 --- a/examples/temperature-measurement-app/esp32/main/gen/cluster-id.h +++ b/examples/temperature-measurement-app/esp32/main/gen/cluster-id.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2021 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,8 @@ * limitations under the License. */ +// THIS FILE IS GENERATED BY ZAP + // Prevent multiple inclusion #pragma once diff --git a/examples/temperature-measurement-app/esp32/main/gen/command-id.h b/examples/temperature-measurement-app/esp32/main/gen/command-id.h index 42dcc0e89c71f5..9e608623150c7c 100644 --- a/examples/temperature-measurement-app/esp32/main/gen/command-id.h +++ b/examples/temperature-measurement-app/esp32/main/gen/command-id.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2021 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,8 @@ * limitations under the License. */ +// THIS FILE IS GENERATED BY ZAP + // Prevent multiple inclusion #pragma once diff --git a/examples/temperature-measurement-app/esp32/main/gen/endpoint_config.h b/examples/temperature-measurement-app/esp32/main/gen/endpoint_config.h index 727fb7da5eeec9..70322b0d3a47c9 100644 --- a/examples/temperature-measurement-app/esp32/main/gen/endpoint_config.h +++ b/examples/temperature-measurement-app/esp32/main/gen/endpoint_config.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2021 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,8 @@ * limitations under the License. */ +// THIS FILE IS GENERATED BY ZAP + // Prevent multiple inclusion #pragma once diff --git a/examples/temperature-measurement-app/esp32/main/gen/enums.h b/examples/temperature-measurement-app/esp32/main/gen/enums.h index 5202a5283172f0..7cf4c5c578e788 100644 --- a/examples/temperature-measurement-app/esp32/main/gen/enums.h +++ b/examples/temperature-measurement-app/esp32/main/gen/enums.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2021 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,8 @@ * limitations under the License. */ +// THIS FILE IS GENERATED BY ZAP + // Prevent multiple inclusion #pragma once diff --git a/examples/temperature-measurement-app/esp32/main/gen/gen_config.h b/examples/temperature-measurement-app/esp32/main/gen/gen_config.h index 794f259cc7e692..5a04a8fb141862 100644 --- a/examples/temperature-measurement-app/esp32/main/gen/gen_config.h +++ b/examples/temperature-measurement-app/esp32/main/gen/gen_config.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2021 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,8 @@ * limitations under the License. */ +// THIS FILE IS GENERATED BY ZAP + // Prevent multiple inclusion #pragma once diff --git a/examples/temperature-measurement-app/esp32/main/gen/gen_tokens.h b/examples/temperature-measurement-app/esp32/main/gen/gen_tokens.h index 49437d25113ebd..860bf575d35d81 100644 --- a/examples/temperature-measurement-app/esp32/main/gen/gen_tokens.h +++ b/examples/temperature-measurement-app/esp32/main/gen/gen_tokens.h @@ -1,6 +1,6 @@ -/** +/* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2021 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -// This file is generated by Simplicity Studio. Please do not edit manually. -// -// + +// THIS FILE IS GENERATED BY ZAP + +// Prevent multiple inclusion +#pragma once // This file contains the tokens for attributes stored in flash diff --git a/examples/temperature-measurement-app/esp32/main/gen/print-cluster.h b/examples/temperature-measurement-app/esp32/main/gen/print-cluster.h index 7155ccf0294122..4348de1953fb86 100644 --- a/examples/temperature-measurement-app/esp32/main/gen/print-cluster.h +++ b/examples/temperature-measurement-app/esp32/main/gen/print-cluster.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2021 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,8 @@ * limitations under the License. */ +// THIS FILE IS GENERATED BY ZAP + // Prevent multiple inclusion #pragma once diff --git a/src/app/encoder.cpp b/src/app/encoder.cpp index 9cd16c76ff87fa..c11aa1d0cf8b6b 100644 --- a/src/app/encoder.cpp +++ b/src/app/encoder.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020-2021 Project CHIP Authors + * Copyright (c) 2021 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/app/zap-templates/app-templates.json b/src/app/zap-templates/app-templates.json index 4e0fc1389cd433..ed6fe36e3c25d0 100644 --- a/src/app/zap-templates/app-templates.json +++ b/src/app/zap-templates/app-templates.json @@ -89,6 +89,11 @@ "name": "ZCL gen_config header", "output": "gen_config.h" }, + { + "path": "templates/app/gen_tokens.zapt", + "name": "ZCL gen_tokens header", + "output": "gen_tokens.h" + }, { "path": "templates/app/print-cluster.zapt", "name": "ZCL print-cluster header", diff --git a/src/app/zap-templates/templates/app/gen_tokens.zapt b/src/app/zap-templates/templates/app/gen_tokens.zapt new file mode 100644 index 00000000000000..718a7d770178fd --- /dev/null +++ b/src/app/zap-templates/templates/app/gen_tokens.zapt @@ -0,0 +1,28 @@ +{{> header}} + +// Prevent multiple inclusion +#pragma once + +// This file contains the tokens for attributes stored in flash + +// Identifier tags for tokens + +// Types for the tokens +#ifdef DEFINETYPES +#endif // DEFINETYPES + +// Actual token definitions +#ifdef DEFINETOKENS +#endif // DEFINETOKENS + +// Macro snippet that loads all the attributes from tokens +#define GENERATED_TOKEN_LOADER(endpoint) \ + do \ + { \ + } while (false) + +// Macro snippet that saves the attribute to token +#define GENERATED_TOKEN_SAVER \ + do \ + { \ + } while (false) From 696daf43e35833120cdd1440489eed79fa585ba7 Mon Sep 17 00:00:00 2001 From: shana-apple <61782012+shana-apple@users.noreply.github.com> Date: Wed, 3 Feb 2021 03:06:56 +0100 Subject: [PATCH 21/24] Add UI to manage biding/unbiding (#4608) * Add UI to manage biding/unbiding * Fix copyright year * Restyled by whitespace * Restyled by clang-format Co-authored-by: Restyled.io Co-authored-by: Justin Wood --- .../CHIPTool.xcodeproj/project.pbxproj | 14 ++ .../CHIPTool/UI Helpers/CHIPUIViewUtils.h | 1 + .../CHIPTool/UI Helpers/CHIPUIViewUtils.m | 22 +++ .../Bindings/BindingsViewController.h | 25 ++++ .../Bindings/BindingsViewController.m | 138 ++++++++++++++++++ .../View Controllers/RootViewController.m | 14 +- .../Wifi/WifiViewController.m | 33 +---- 7 files changed, 219 insertions(+), 28 deletions(-) create mode 100644 src/darwin/CHIPTool/CHIPTool/View Controllers/Bindings/BindingsViewController.h create mode 100644 src/darwin/CHIPTool/CHIPTool/View Controllers/Bindings/BindingsViewController.m diff --git a/src/darwin/CHIPTool/CHIPTool.xcodeproj/project.pbxproj b/src/darwin/CHIPTool/CHIPTool.xcodeproj/project.pbxproj index 3502944d991e0b..bf17da2722ae5c 100644 --- a/src/darwin/CHIPTool/CHIPTool.xcodeproj/project.pbxproj +++ b/src/darwin/CHIPTool/CHIPTool.xcodeproj/project.pbxproj @@ -20,6 +20,7 @@ B243A6692513A73600E56FEA /* RootViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = B243A6682513A73600E56FEA /* RootViewController.m */; }; B2946A4224C99D53005C87D0 /* WifiViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = B2946A4124C99D53005C87D0 /* WifiViewController.m */; }; B2946A9B24C9A7BF005C87D0 /* DefaultsUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = B2946A9A24C9A7BF005C87D0 /* DefaultsUtils.m */; }; + B2B0209225C9C1AC00A4C220 /* BindingsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = B2B0209125C9C1AC00A4C220 /* BindingsViewController.m */; }; B2F51E99252DCDC000911FA5 /* TemperatureSensorViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = B2F51E98252DCDC000911FA5 /* TemperatureSensorViewController.m */; }; B2F53AEB245B0D140010745E /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = B2F53AE9245B0D140010745E /* LaunchScreen.storyboard */; }; /* End PBXBuildFile section */ @@ -75,6 +76,8 @@ B2946A4124C99D53005C87D0 /* WifiViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = WifiViewController.m; sourceTree = ""; }; B2946A9924C9A7BF005C87D0 /* DefaultsUtils.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DefaultsUtils.h; sourceTree = ""; }; B2946A9A24C9A7BF005C87D0 /* DefaultsUtils.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DefaultsUtils.m; sourceTree = ""; }; + B2B0209025C9C1AC00A4C220 /* BindingsViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BindingsViewController.h; sourceTree = ""; }; + B2B0209125C9C1AC00A4C220 /* BindingsViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BindingsViewController.m; sourceTree = ""; }; B2F51E97252DCDC000911FA5 /* TemperatureSensorViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TemperatureSensorViewController.h; sourceTree = ""; }; B2F51E98252DCDC000911FA5 /* TemperatureSensorViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TemperatureSensorViewController.m; sourceTree = ""; }; B2F53AEA245B0D140010745E /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = UI/Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; @@ -195,6 +198,7 @@ B243A6672513A73600E56FEA /* RootViewController.h */, B243A6682513A73600E56FEA /* RootViewController.m */, B2F51E93252DCC9E00911FA5 /* Temperature Sensor */, + B2B0208F25C9C18500A4C220 /* Bindings */, B2946A3F24C99D21005C87D0 /* Wifi */, 0C79937824858B3B0047A373 /* QRCode */, 0C79937924858B4F0047A373 /* Echo client */, @@ -221,6 +225,15 @@ path = Wifi; sourceTree = ""; }; + B2B0208F25C9C18500A4C220 /* Bindings */ = { + isa = PBXGroup; + children = ( + B2B0209025C9C1AC00A4C220 /* BindingsViewController.h */, + B2B0209125C9C1AC00A4C220 /* BindingsViewController.m */, + ); + path = Bindings; + sourceTree = ""; + }; B2F51E93252DCC9E00911FA5 /* Temperature Sensor */ = { isa = PBXGroup; children = ( @@ -334,6 +347,7 @@ B232D8BA2514BD0800792CB4 /* CHIPUIViewUtils.m in Sources */, B2946A9B24C9A7BF005C87D0 /* DefaultsUtils.m in Sources */, 991DC091247747F500C13860 /* EchoViewController.m in Sources */, + B2B0209225C9C1AC00A4C220 /* BindingsViewController.m in Sources */, B204A621244E1D0600C7C0E1 /* AppDelegate.m in Sources */, B2F51E99252DCDC000911FA5 /* TemperatureSensorViewController.m in Sources */, B243A6692513A73600E56FEA /* RootViewController.m in Sources */, diff --git a/src/darwin/CHIPTool/CHIPTool/UI Helpers/CHIPUIViewUtils.h b/src/darwin/CHIPTool/CHIPTool/UI Helpers/CHIPUIViewUtils.h index 50d041f7f29c3d..aefa7794c60bbb 100644 --- a/src/darwin/CHIPTool/CHIPTool/UI Helpers/CHIPUIViewUtils.h +++ b/src/darwin/CHIPTool/CHIPTool/UI Helpers/CHIPUIViewUtils.h @@ -27,6 +27,7 @@ NS_ASSUME_NONNULL_BEGIN + (UIView *)viewWithLabel:(UILabel *)label toggle:(UISwitch *)toggle; + (UIStackView *)stackViewWithLabel:(UILabel *)label buttons:(NSArray *)buttons; ++ (UIStackView *)stackViewWithButtons:(NSArray *)buttons; + (UILabel *)addTitle:(NSString *)title toView:(UIView *)view; @end diff --git a/src/darwin/CHIPTool/CHIPTool/UI Helpers/CHIPUIViewUtils.m b/src/darwin/CHIPTool/CHIPTool/UI Helpers/CHIPUIViewUtils.m index d0cfadb835de18..adeddf1bb770a6 100644 --- a/src/darwin/CHIPTool/CHIPTool/UI Helpers/CHIPUIViewUtils.m +++ b/src/darwin/CHIPTool/CHIPTool/UI Helpers/CHIPUIViewUtils.m @@ -140,6 +140,28 @@ + (UIView *)viewWithUITextField:(UITextField *)textField button:(UIButton *)butt return containingView; } ++ (UIStackView *)stackViewWithButtons:(NSArray *)buttons +{ + UIStackView * stackViewButtons = [UIStackView new]; + stackViewButtons.axis = UILayoutConstraintAxisHorizontal; + stackViewButtons.distribution = UIStackViewDistributionFillEqually; + stackViewButtons.alignment = UIStackViewAlignmentTrailing; + stackViewButtons.spacing = 10; + + for (int i = 0; i < buttons.count; i++) { + UIButton * buttonForStack = [buttons objectAtIndex:i]; + buttonForStack.backgroundColor = UIColor.systemBlueColor; + buttonForStack.titleLabel.font = [UIFont systemFontOfSize:17]; + buttonForStack.titleLabel.textColor = [UIColor whiteColor]; + buttonForStack.layer.cornerRadius = 5; + buttonForStack.clipsToBounds = YES; + buttonForStack.translatesAutoresizingMaskIntoConstraints = false; + [buttonForStack.widthAnchor constraintEqualToConstant:70].active = YES; + [stackViewButtons addArrangedSubview:buttonForStack]; + } + return stackViewButtons; +} + + (UIStackView *)stackViewWithLabel:(UILabel *)label buttons:(NSArray *)buttons { // Button stack view diff --git a/src/darwin/CHIPTool/CHIPTool/View Controllers/Bindings/BindingsViewController.h b/src/darwin/CHIPTool/CHIPTool/View Controllers/Bindings/BindingsViewController.h new file mode 100644 index 00000000000000..954bfeece70408 --- /dev/null +++ b/src/darwin/CHIPTool/CHIPTool/View Controllers/Bindings/BindingsViewController.h @@ -0,0 +1,25 @@ +/** + * + * Copyright (c) 2021 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface BindingsViewController : UIViewController + +@end + +NS_ASSUME_NONNULL_END diff --git a/src/darwin/CHIPTool/CHIPTool/View Controllers/Bindings/BindingsViewController.m b/src/darwin/CHIPTool/CHIPTool/View Controllers/Bindings/BindingsViewController.m new file mode 100644 index 00000000000000..8d28b70f0216e5 --- /dev/null +++ b/src/darwin/CHIPTool/CHIPTool/View Controllers/Bindings/BindingsViewController.m @@ -0,0 +1,138 @@ +/** + * + * Copyright (c) 2021 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import "BindingsViewController.h" +#import "CHIPUIViewUtils.h" + +@interface BindingsViewController () +@property (nonatomic, strong) UITextField * nodeIDTextField; +@property (nonatomic, strong) UITextField * groupIDTextField; +@property (nonatomic, strong) UITextField * endpointIDTextField; +@property (nonatomic, strong) UITextField * clusterIDTextField; +@end + +@implementation BindingsViewController + +- (void)viewDidLoad +{ + [super viewDidLoad]; + [self setupUI]; + + UITapGestureRecognizer * tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(dismissKeyboard)]; + [self.view addGestureRecognizer:tap]; +} + +- (void)dismissKeyboard +{ + [_nodeIDTextField resignFirstResponder]; + [_endpointIDTextField resignFirstResponder]; + [_groupIDTextField resignFirstResponder]; + [_clusterIDTextField resignFirstResponder]; +} + +// MARK: UI helpers + +- (void)setupUI +{ + self.view.backgroundColor = UIColor.whiteColor; + + // Title + UILabel * titleLabel = [CHIPUIViewUtils addTitle:@"Bindings" toView:self.view]; + + // stack view + UIStackView * stackView = [UIStackView new]; + stackView.axis = UILayoutConstraintAxisVertical; + stackView.distribution = UIStackViewDistributionFill; + stackView.alignment = UIStackViewAlignmentLeading; + stackView.spacing = 30; + [self.view addSubview:stackView]; + + stackView.translatesAutoresizingMaskIntoConstraints = false; + [stackView.topAnchor constraintEqualToAnchor:titleLabel.bottomAnchor constant:30].active = YES; + [stackView.leadingAnchor constraintEqualToAnchor:self.view.leadingAnchor constant:30].active = YES; + [stackView.trailingAnchor constraintEqualToAnchor:self.view.trailingAnchor constant:-30].active = YES; + + // nodeID entry + UILabel * nodeIDLabel = [UILabel new]; + nodeIDLabel.text = @"Node ID"; + _nodeIDTextField = [UITextField new]; + UIView * nodeIDView = [CHIPUIViewUtils viewWithLabel:nodeIDLabel textField:_nodeIDTextField]; + [stackView addArrangedSubview:nodeIDView]; + nodeIDView.translatesAutoresizingMaskIntoConstraints = false; + [nodeIDView.trailingAnchor constraintEqualToAnchor:stackView.trailingAnchor].active = YES; + + // groupID entry + UILabel * groupIDLabel = [UILabel new]; + groupIDLabel.text = @"Group ID"; + _groupIDTextField = [UITextField new]; + UIView * groupIDView = [CHIPUIViewUtils viewWithLabel:groupIDLabel textField:_groupIDTextField]; + [stackView addArrangedSubview:groupIDView]; + [groupIDView.trailingAnchor constraintEqualToAnchor:stackView.trailingAnchor].active = YES; + + // endpointID entry + UILabel * endpointIDLabel = [UILabel new]; + endpointIDLabel.text = @"Endpoint ID"; + _endpointIDTextField = [UITextField new]; + UIView * endpointIDView = [CHIPUIViewUtils viewWithLabel:endpointIDLabel textField:_endpointIDTextField]; + [stackView addArrangedSubview:endpointIDView]; + endpointIDView.translatesAutoresizingMaskIntoConstraints = false; + [endpointIDView.trailingAnchor constraintEqualToAnchor:stackView.trailingAnchor].active = YES; + + // clusterID entry + UILabel * clusterIDLabel = [UILabel new]; + clusterIDLabel.text = @"Cluster ID"; + _clusterIDTextField = [UITextField new]; + UIView * clusterIDView = [CHIPUIViewUtils viewWithLabel:clusterIDLabel textField:_clusterIDTextField]; + [stackView addArrangedSubview:clusterIDView]; + [clusterIDView.trailingAnchor constraintEqualToAnchor:stackView.trailingAnchor].active = YES; + + // Buttons + UIButton * bindButton = [UIButton new]; + [bindButton setTitle:@"Bind" forState:UIControlStateNormal]; + UIButton * unbindButton = [UIButton new]; + [unbindButton setTitle:@"Unbind" forState:UIControlStateNormal]; + [bindButton addTarget:self action:@selector(bind:) forControlEvents:UIControlEventTouchUpInside]; + [unbindButton addTarget:self action:@selector(unbind:) forControlEvents:UIControlEventTouchUpInside]; + UIStackView * stackViewButtons = [CHIPUIViewUtils stackViewWithButtons:@[ bindButton, unbindButton ]]; + + [stackView addArrangedSubview:stackViewButtons]; + [stackViewButtons.trailingAnchor constraintEqualToAnchor:stackView.trailingAnchor].active = YES; +} + +- (void)_clearTextFields +{ + _nodeIDTextField.text = @""; + _endpointIDTextField.text = @""; + _groupIDTextField.text = @""; + _clusterIDTextField.text = @""; +} + +// MARK: Button methods + +- (IBAction)bind:(id)sender +{ + [self _clearTextFields]; + // TODO: Call binding API +} + +- (IBAction)unbind:(id)sender +{ + [self _clearTextFields]; + // TODO: Call unbinding API +} + +@end diff --git a/src/darwin/CHIPTool/CHIPTool/View Controllers/RootViewController.m b/src/darwin/CHIPTool/CHIPTool/View Controllers/RootViewController.m index 0d852cdbbb35b5..338c42db86dfe1 100644 --- a/src/darwin/CHIPTool/CHIPTool/View Controllers/RootViewController.m +++ b/src/darwin/CHIPTool/CHIPTool/View Controllers/RootViewController.m @@ -16,6 +16,7 @@ */ #import "RootViewController.h" +#import "BindingsViewController.h" #import "EchoViewController.h" #import "OnOffViewController.h" #import "QRCodeViewController.h" @@ -37,7 +38,9 @@ - (void)setUpTableView self.tableView.delegate = self; self.tableView.dataSource = self; [self.view addSubview:self.tableView]; - self.options = @[ @"QRCode scanner", @"Echo client", @"Light on / off cluster", @"Temperature Sensor", @"Wifi Configuration" ]; + self.options = @[ + @"QRCode scanner", @"Echo client", @"Light on / off cluster", @"Temperature Sensor", @"Bindings", @"Wifi Configuration" + ]; } - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section @@ -75,6 +78,9 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath [self pushTemperatureSensor]; break; case 4: + [self pushBindings]; + break; + case 5: [self pushNetworkConfiguration]; break; default: @@ -82,6 +88,12 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath } } +- (void)pushBindings +{ + BindingsViewController * controller = [BindingsViewController new]; + [self.navigationController pushViewController:controller animated:YES]; +} + - (void)pushTemperatureSensor { TemperatureSensorViewController * controller = [TemperatureSensorViewController new]; diff --git a/src/darwin/CHIPTool/CHIPTool/View Controllers/Wifi/WifiViewController.m b/src/darwin/CHIPTool/CHIPTool/View Controllers/Wifi/WifiViewController.m index 6bdbd276292fe5..61ded066c5461e 100644 --- a/src/darwin/CHIPTool/CHIPTool/View Controllers/Wifi/WifiViewController.m +++ b/src/darwin/CHIPTool/CHIPTool/View Controllers/Wifi/WifiViewController.m @@ -99,37 +99,16 @@ - (void)setupUI [passwordView.trailingAnchor constraintEqualToAnchor:stackView.trailingAnchor].active = YES; // Button stack view - UIStackView * stackViewButtons = [UIStackView new]; - stackViewButtons.axis = UILayoutConstraintAxisHorizontal; - stackViewButtons.distribution = UIStackViewDistributionEqualCentering; - stackViewButtons.alignment = UIStackViewAlignmentTrailing; - stackViewButtons.spacing = 10; - [self.view addSubview:stackViewButtons]; - - stackViewButtons.translatesAutoresizingMaskIntoConstraints = false; - [stackViewButtons.topAnchor constraintEqualToAnchor:stackView.bottomAnchor constant:30].active = YES; - [stackViewButtons.bottomAnchor constraintLessThanOrEqualToAnchor:self.view.safeAreaLayoutGuide.bottomAnchor constant:-30].active - = YES; - [stackViewButtons.trailingAnchor constraintEqualToAnchor:self.view.trailingAnchor constant:-30].active = YES; - NSArray * buttonTitles = @[ @"Clear", @"Save" ]; _clearButton = [UIButton new]; + [_clearButton setTitle:@"Clear" forState:UIControlStateNormal]; _saveButton = [UIButton new]; + [_saveButton setTitle:@"Save" forState:UIControlStateNormal]; [_clearButton addTarget:self action:@selector(clearCredientials:) forControlEvents:UIControlEventTouchUpInside]; [_saveButton addTarget:self action:@selector(saveCredientials:) forControlEvents:UIControlEventTouchUpInside]; - NSArray * buttonsBelow = @[ _clearButton, _saveButton ]; - for (int i = 0; i < buttonTitles.count; i++) { - UIButton * buttonForStack = [buttonsBelow objectAtIndex:i]; - NSString * title = [buttonTitles objectAtIndex:i]; - [buttonForStack setTitle:title forState:UIControlStateNormal]; - buttonForStack.backgroundColor = UIColor.systemBlueColor; - buttonForStack.titleLabel.font = [UIFont systemFontOfSize:17]; - buttonForStack.titleLabel.textColor = [UIColor whiteColor]; - buttonForStack.layer.cornerRadius = 5; - buttonForStack.clipsToBounds = YES; - buttonForStack.translatesAutoresizingMaskIntoConstraints = false; - [buttonForStack.widthAnchor constraintEqualToConstant:70].active = YES; - [stackViewButtons addArrangedSubview:buttonForStack]; - } + + UIStackView * stackViewButtons = [CHIPUIViewUtils stackViewWithButtons:@[ _clearButton, _saveButton ]]; + [stackView addArrangedSubview:stackViewButtons]; + [stackViewButtons.trailingAnchor constraintEqualToAnchor:stackView.trailingAnchor].active = YES; } - (void)fillNetworkConfigWithDefaults From fc9715e3d082242c29e45a870c4e8f063fbebd82 Mon Sep 17 00:00:00 2001 From: Michael Sandstedt Date: Tue, 2 Feb 2021 20:10:59 -0600 Subject: [PATCH 22/24] [build] fix chip_detail_logging=false (#4575) (#4576) Co-authored-by: Justin Wood --- src/app/InteractionModelEngine.cpp | 4 +--- src/platform/Linux/CHIPBluezHelper.cpp | 3 +-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/app/InteractionModelEngine.cpp b/src/app/InteractionModelEngine.cpp index 134b3f9d926713..53dd4167849aba 100644 --- a/src/app/InteractionModelEngine.cpp +++ b/src/app/InteractionModelEngine.cpp @@ -237,12 +237,10 @@ CHIP_ERROR InteractionModelEngine::DeregisterClusterCommandHandler(chip::Cluster HandlersMapType::iterator handlerIt = mHandlersMap.find(HandlerKey(aClusterId, aCommandId, aCommandRoleId)); if (handlerIt != mHandlersMap.end()) { - CommandCbFunct pDispatcher = handlerIt->second; - ChipLogDetail(DataManagement, "DeregisterClusterCommandHandler unregistered handler for ClusterId = %d, CommandId = %d, CommandRoleId " "= %d, Dispatcher = %p", - aClusterId, aCommandId, aCommandRoleId, (void *) pDispatcher); + aClusterId, aCommandId, aCommandRoleId, (void *) handlerIt->second); mHandlersMap.erase(handlerIt); } else diff --git a/src/platform/Linux/CHIPBluezHelper.cpp b/src/platform/Linux/CHIPBluezHelper.cpp index 51a5e0d925d5d7..4ba0e6b79fac35 100644 --- a/src/platform/Linux/CHIPBluezHelper.cpp +++ b/src/platform/Linux/CHIPBluezHelper.cpp @@ -907,7 +907,6 @@ static bool BluezGetChipDeviceInfo(BluezDevice1 & aDevice, chip::Ble::ChipBLEDev /// Handle advertisement from a device and connect to it if its discriminator is the requested one. static void BluezHandleAdvertisementFromDevice(BluezDevice1 * aDevice, BluezEndpoint * aEndpoint) { - const char * address = bluez_device1_get_address(aDevice); GVariant * serviceData = bluez_device1_get_service_data(aDevice); char * debugStr = nullptr; chip::Ble::ChipBLEDeviceIdentificationInfo deviceInfo; @@ -915,7 +914,7 @@ static void BluezHandleAdvertisementFromDevice(BluezDevice1 * aDevice, BluezEndp VerifyOrExit(serviceData != nullptr, ); debugStr = g_variant_print(serviceData, TRUE); - ChipLogDetail(DeviceLayer, "TRACE: Device %s Service data: %s", address, debugStr); + ChipLogDetail(DeviceLayer, "TRACE: Device %s Service data: %s", bluez_device1_get_address(aDevice), debugStr); VerifyOrExit(BluezGetChipDeviceInfo(*aDevice, deviceInfo), ); ChipLogDetail(DeviceLayer, "TRACE: Found CHIP BLE Device: %" PRIu16, deviceInfo.GetDeviceDiscriminator()); From f8dc12ef2176da39a8aad6c78dd27cc7386986cb Mon Sep 17 00:00:00 2001 From: Michael Spang Date: Tue, 2 Feb 2021 21:36:46 -0500 Subject: [PATCH 23/24] Add builds missing from "default" group in unified (#4573) Currently enabling certain builds and running: ninja -C out/debug does not build them. This means we can end up building nothing at all, which is fairly confusing. They will however be built if you run either: ninja -C out/debug all ninja -C out/debug Add the missing deps to the default target so that all opted in configs are built with the first command. Co-authored-by: Justin Wood --- BUILD.gn | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/BUILD.gn b/BUILD.gn index ba676c6008b923..d653baa0a2dc24 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -311,9 +311,18 @@ if (current_toolchain != "${dir_pw_toolchain}/dummy:dummy") { if (enable_efr32_lock_app_build) { deps += [ ":efr32_lock_app" ] } + if (enable_efr32_lighting_app_build) { + deps += [ ":efr32_lighting_app" ] + } if (enable_k32w_lock_app_build) { deps += [ ":k32w_lock_app" ] } + if (enable_qpg6100_lock_app_build) { + deps += [ ":qpg6100_lock_app" ] + } + if (enable_cc13x2_26x2_lock_app_build) { + deps += [ ":cc13x2_26x2_lock_app" ] + } } group("check") { From eac670e6f1dde0a48cb69f039951c304b0d7748e Mon Sep 17 00:00:00 2001 From: Pankaj Garg Date: Tue, 2 Feb 2021 18:36:52 -0800 Subject: [PATCH 24/24] Enable pairing window only when needed (#4597) --- examples/all-clusters-app/esp32/main/main.cpp | 1 + src/app/server/Server.cpp | 58 +++++++++++++------ src/app/server/Server.h | 5 ++ 3 files changed, 47 insertions(+), 17 deletions(-) diff --git a/examples/all-clusters-app/esp32/main/main.cpp b/examples/all-clusters-app/esp32/main/main.cpp index 3412b07931619b..9cee0b1d69a9e6 100644 --- a/examples/all-clusters-app/esp32/main/main.cpp +++ b/examples/all-clusters-app/esp32/main/main.cpp @@ -261,6 +261,7 @@ class SetupListModel : public ListScreen::Model if (i == 0) { ConnectivityMgr().ClearWiFiStationProvision(); + OpenDefaultPairingWindow(); } } diff --git a/src/app/server/Server.cpp b/src/app/server/Server.cpp index 9510ceed882747..7ed872c0648503 100644 --- a/src/app/server/Server.cpp +++ b/src/app/server/Server.cpp @@ -68,6 +68,31 @@ class ServerRendezvousAdvertisementDelegate : public RendezvousAdvertisementDele CHIP_ERROR StopAdvertisement() const override { return chip::DeviceLayer::ConnectivityMgr().SetBLEAdvertisingEnabled(false); } }; +DemoTransportMgr gTransports; +SecureSessionMgr gSessions; +RendezvousServer gRendezvousServer; + +ServerRendezvousAdvertisementDelegate gAdvDelegate; + +static CHIP_ERROR OpenPairingWindow(uint32_t pinCode, uint16_t discriminator) +{ + RendezvousParameters params; + + ReturnErrorOnFailure(DeviceLayer::ConfigurationMgr().StoreSetupDiscriminator(discriminator)); + ReturnErrorOnFailure(DeviceLayer::ConfigurationMgr().StoreSetupPinCode(pinCode)); + +#if CONFIG_NETWORK_LAYER_BLE + params.SetSetupPINCode(pinCode) + .SetBleLayer(DeviceLayer::ConnectivityMgr().GetBleLayer()) + .SetPeerAddress(Transport::PeerAddress::BLE()) + .SetAdvertisementDelegate(&gAdvDelegate); +#else + params.SetSetupPINCode(pinCode); +#endif // CONFIG_NETWORK_LAYER_BLE + + return gRendezvousServer.Init(std::move(params), &gTransports, &gSessions); +} + class ServerCallback : public SecureSessionMgrDelegate { public: @@ -176,15 +201,11 @@ CHIP_ERROR InitMdns() } #endif -DemoTransportMgr gTransports; #ifdef CHIP_APP_USE_INTERACTION_MODEL Messaging::ExchangeManager gExchange; #endif -SecureSessionMgr gSessions; ServerCallback gCallbacks; SecurePairingUsingTestSecret gTestPairing; -RendezvousServer gRendezvousServer; -ServerRendezvousAdvertisementDelegate gRendezvousAdvDelegate; } // namespace @@ -193,6 +214,15 @@ SecureSessionMgr & chip::SessionManager() return gSessions; } +CHIP_ERROR OpenDefaultPairingWindow() +{ + uint32_t pinCode; + uint16_t discriminator; + ReturnErrorOnFailure(DeviceLayer::ConfigurationMgr().GetSetupPinCode(pinCode)); + ReturnErrorOnFailure(DeviceLayer::ConfigurationMgr().GetSetupDiscriminator(discriminator)); + return OpenPairingWindow(pinCode, discriminator); +} + // The function will initialize datamodel handler and then start the server // The server assumes the platform's networking has been setup already void InitServer(AppDelegate * delegate) @@ -233,21 +263,15 @@ void InitServer(AppDelegate * delegate) err = gSessions.NewPairing(peer, chip::kTestControllerNodeId, &gTestPairing); SuccessOrExit(err); } + else if (DeviceLayer::ConnectivityMgr().IsWiFiStationProvisioned() || DeviceLayer::ConnectivityMgr().IsThreadProvisioned()) + { + // If the network is already provisioned, proactively disable BLE advertisement. + ChipLogProgress(AppServer, "Network already provisioned. Disabling BLE advertisement"); + chip::DeviceLayer::ConnectivityMgr().SetBLEAdvertisingEnabled(false); + } else { - RendezvousParameters params; - uint32_t pinCode; - - SuccessOrExit(err = DeviceLayer::ConfigurationMgr().GetSetupPinCode(pinCode)); -#if CONFIG_NETWORK_LAYER_BLE - params.SetSetupPINCode(pinCode) - .SetBleLayer(DeviceLayer::ConnectivityMgr().GetBleLayer()) - .SetPeerAddress(Transport::PeerAddress::BLE()) - .SetAdvertisementDelegate(&gRendezvousAdvDelegate); -#else - params.SetSetupPINCode(pinCode); -#endif // CONFIG_NETWORK_LAYER_BLE - SuccessOrExit(err = gRendezvousServer.Init(params, &gTransports, &gSessions)); + SuccessOrExit(err = OpenDefaultPairingWindow()); } #if CHIP_ENABLE_MDNS diff --git a/src/app/server/Server.h b/src/app/server/Server.h index 697258a8ee4e89..5a12fba31d56dd 100644 --- a/src/app/server/Server.h +++ b/src/app/server/Server.h @@ -35,3 +35,8 @@ using DemoTransportMgr = chip::TransportMgr; * @param [in] delegate An optional AppDelegate */ void InitServer(AppDelegate * delegate = nullptr); + +/** + * Open the pairing window using default configured parameters. + */ +CHIP_ERROR OpenDefaultPairingWindow();