<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>editing light-switch server struct</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/56780/editing-light-switch-server-struct</link><description>Hi, I am using Mesh SDK 4.0.0 and have couple of nRF52840 dev kits. 
 1) In light switch server example of Mesh SDK, is it possible to add more on_off data types to the server state? I want to check with you whether the server can hold 4 different on_off</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 21 Jan 2020 16:32:09 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/56780/editing-light-switch-server-struct" /><item><title>RE: editing light-switch server struct</title><link>https://devzone.nordicsemi.com/thread/230142?ContentTypeID=1</link><pubDate>Tue, 21 Jan 2020 16:32:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7b9f4118-3095-4cb8-bb1a-a372b0ce55b3</guid><dc:creator>kunal1234</dc:creator><description>&lt;p&gt;Thanks Terje. I will try making 4 server models for 4 bool type data. I have some follow-up questions.&lt;br /&gt;&lt;br /&gt;1) Which server model/struct do I edit to have integer data type in the server? Any other suggestion to implement integer data server?&lt;br /&gt;2) Unrelated question- In Mesh beaconing example, I see that devices send their beacon (device name) in advertisement packets. I didn&amp;#39;t see any &amp;quot;mesh&amp;quot; feature in the example. I assume we should add server/client models to the example code and use beaconing simultaneously. Is that the purpose of that mesh example?&lt;/p&gt;
&lt;p&gt;-Kunal&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: editing light-switch server struct</title><link>https://devzone.nordicsemi.com/thread/230132?ContentTypeID=1</link><pubDate>Tue, 21 Jan 2020 15:37:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1c1d7af6-38aa-41b6-baf1-0cfadedffa45</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;1) Yes, you can add Generic OnOff server models. The light switch examples uses only one Generic OnOff model on the server side (to mimic individual light bulbs), but the client side (representing switches) uses four client models. In the same manner you can have a device with four server models. If you use the Generic OnOff models, you will see that the server uses &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.meshsdk.v4.0.0%2Fgroup__GENERIC__ONOFF__SERVER.html&amp;amp;anchor=ga9f4767d5e00f5f22251682698d9619b0"&gt;generic_onoff_server_init()&lt;/a&gt; which corresponds to &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.meshsdk.v4.0.0%2Fgroup__GENERIC__ONOFF__CLIENT.html&amp;amp;anchor=ga755ac4f33906a7310f647e33b0c92470"&gt;generic_onoff_client_init()&lt;/a&gt; for the client.&lt;/p&gt;
&lt;p&gt;2) You find &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.meshsdk.v4.0.0%2Fgroup__GENERIC__ONOFF__MODEL.html"&gt;Generic OnOff model documentation&lt;/a&gt; on Infocenter. The implementation is under &amp;lt;SDK root folder&amp;gt;/models/model_spec/generic_onoff/, but note that you should not modify our implementation of SIG specified models.&lt;/p&gt;
&lt;p&gt;3) You should be able to implement what you need by adding four instances of the Generic OnOff server model and add/modify callbacks as appropriate, yes.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>