<?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>How to message-passing between models</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/70142/how-to-message-passing-between-models</link><description>Dear 
 
 I increated a Generic Level module to main elements which have a Generic ONOFF module on Mesh example Light Switch Server project base on PCA10056 DK board for nrf52840 chips.(SES + nrf5_SDK_for_Mesh_v4.0.0_src+ nRF5_SDK_16.0.0_98a08e2) 
 Right</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 03 Feb 2021 19:05:02 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/70142/how-to-message-passing-between-models" /><item><title>RE: How to message-passing between models</title><link>https://devzone.nordicsemi.com/thread/292759?ContentTypeID=1</link><pubDate>Wed, 03 Feb 2021 19:05:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d406405a-f3d0-49df-a2d5-a8021d00cb1f</guid><dc:creator>Di-sheng</dc:creator><description>&lt;p&gt;Dear Mttrinh&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Thanks for your reply!&lt;/p&gt;
&lt;p&gt;I will read more.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Di-sheng&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to message-passing between models</title><link>https://devzone.nordicsemi.com/thread/290524?ContentTypeID=1</link><pubDate>Thu, 21 Jan 2021 13:03:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:752efe1f-ff89-47c9-b26b-630d56fcf631</guid><dc:creator>Mttrinh</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;1. The application should open radio session and register signal handler at the beginning of every new timeslot that SD provided to the app. Furthermore, it is up to the application to configure RF registers and provide memory for raw data.&amp;nbsp;SD just generates a signal if an interrupt happens. It is up to the application of how to handle and interpret them. It is better to read SD documentation. Looks like I just rewrite it briefly.&lt;span&gt;&amp;nbsp;&lt;/span&gt;&amp;nbsp; &amp;nbsp;&lt;/p&gt;
&lt;p&gt;2. These handlers are called by the behavioral part of the model. That happens according to model specification and depends on the appropriate model state and transition parameters. For instance, for the level model it is implemented here &amp;#39;./examples/common/src/app_level.c&amp;#39;.&lt;/p&gt;
&lt;p&gt;3. SD and Mesh stack are autonomic software and do not belong to each other. Mesh stack reuses some functional of SD for example the timeslot system to coexist with SD or GATT.&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to message-passing between models</title><link>https://devzone.nordicsemi.com/thread/289024?ContentTypeID=1</link><pubDate>Wed, 13 Jan 2021 20:01:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:012df2e1-82bd-4584-8080-5fb2b6d4c023</guid><dc:creator>Di-sheng</dc:creator><description>&lt;p&gt;Hi Mttrinh&lt;/p&gt;
&lt;p&gt;Thanks for your repaly.&lt;/p&gt;
&lt;p&gt;The answer of the second question is what I want. I will change the control power by connect or disconnect the pin to PWM(PSEL.OUT&amp;agrave;CONNECT).&lt;/p&gt;
&lt;p&gt;About the first question, I thinks I may not have made the first question clear. Let me take a different approach and ask specific questions:&lt;/p&gt;
&lt;p&gt;Q1: After a message is received by hardware RF, it is processed by SD because the RF module is not available to the user (as described in the SD manual). Then, the interrupt service routine for RF hardware interrupt should be completed by SD. My question is what does SD do when it receives this message and what is the output?&lt;/p&gt;
&lt;p&gt;Q2: There are two callbacks in each model definition (for example, the Generic Level Module, which defines 2 callback functions:void app_level_server_set_cb(....) &amp;nbsp;and void app_level_server_get_cb (...).). My question is by whom and where are these callbacks called?&lt;/p&gt;
&lt;p&gt;Q3: I think SD belongs to the Mesh stack, not to the BLE stack. My question is if an application does not use SD, what is the interrupt service routine for RF?&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;B,Rs&lt;/p&gt;
&lt;p&gt;Di-sheng&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to message-passing between models</title><link>https://devzone.nordicsemi.com/thread/289013?ContentTypeID=1</link><pubDate>Wed, 13 Jan 2021 18:18:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6438d422-3337-49cc-b0f7-62b101d6c519</guid><dc:creator>Mttrinh</dc:creator><description>&lt;p&gt;The easiest would be to use the nRF Mesh app (Android/iOS) as provisioner. After you have finished the provisioning you will be able to see the unicast address in the app. You can also set the publish/subscribtion address in the app.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;When PWM is started it will take control over the GPIO, while when PWM is stopped it will fall back to the normal GPIO usage. So it should work&amp;nbsp;by starting and stopping PWM.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to message-passing between models</title><link>https://devzone.nordicsemi.com/thread/288479?ContentTypeID=1</link><pubDate>Mon, 11 Jan 2021 19:26:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b447a82b-0925-4637-a2ae-3379b8eab021</guid><dc:creator>Di-sheng</dc:creator><description>&lt;div class="author"&gt;
&lt;div class="avatar"&gt;&lt;a class="internal-link view-user-profile" href="https://devzone.nordicsemi.com/members/spongebob"&gt;&lt;img alt="Di-sheng" border="0px" src="https://devzone.nordicsemi.com/cfs-filesystemfile/__key/communityserver-components-imagefileviewer/system-images/anonymous.gif_2D00_44x44x2.png?_=637367229955000086" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="meta"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="content full threaded-reply-content user-defined-markup"&gt;
&lt;div class="content"&gt;
&lt;p&gt;Dear Mttrinh&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Thanks for your reply!&lt;/p&gt;
&lt;p&gt;For the first question on my last mail, your answer&amp;nbsp; is exactly the result I want. My project is a Light switch server note which have 2 elements ,the every element have a Generic ONOFF model and a Generic level model. In order to correlate two models in the same element, I&amp;nbsp;have to exchange state information each other . Because I do not know what&amp;nbsp;code of the mesh stack of nordic should be read. Would you like give me&amp;nbsp;some detile about that.For exemaple,where I can find the unicast addresses and how I can publish/subscribe to a group address. Do you have some information or simple of mesh to recommended or some advice to me?&lt;/p&gt;
&lt;p&gt;Right now I althrough can let the 2 models in the same element work together by determine each other&amp;#39;s state variables at the code level, but I do not think it is righgt way.So I want to know how to achieve it by nordic mesh stack code.&lt;/p&gt;
&lt;p&gt;The second question is simply: if the pin is assigned to the PWM module, can the GPIO module still control him and a pin?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;B,Rs&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Di-sheng&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to message-passing between models</title><link>https://devzone.nordicsemi.com/thread/287919?ContentTypeID=1</link><pubDate>Thu, 07 Jan 2021 10:54:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9f404b2e-1ff2-42d5-bcd9-604546c74a58</guid><dc:creator>Mttrinh</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;1. You can send messages between models by publishing directly using unicast addresses or publish/subscribe to a group address.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;2.&amp;nbsp;&lt;/p&gt;
[quote user=""] which mean the Generic ONOFF module do not work[/quote]
&lt;p&gt;Can you tell me what doesn&amp;#39;t work? Can you elaborate?&lt;/p&gt;
&lt;p&gt;If I understand you correctly, you want to control one LED with Generic OnOff model and Generic Level Model, am I correct?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>