<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-NZ" link="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">Yip, I stuffed up that first paragraph. I blame covid brain. What I meant to say was:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#4472C4">This patch will read 0x0012 if the SII alias is zero, but<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#4472C4">if it is non-zero it will continue on to
<span style="background:yellow;mso-highlight:yellow">entering the slave into PREOP</span><o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">The patch says it all:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";mso-fareast-language:EN-US">diff --git a/master/fsm_slave_scan.c b/master/fsm_slave_scan.c<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";background:yellow;mso-highlight:yellow;mso-fareast-language:EN-US">--- a/master/fsm_slave_scan.c<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";background:yellow;mso-highlight:yellow;mso-fareast-language:EN-US">+++ b/master/fsm_slave_scan.c</span><span style="font-family:"Courier New";mso-fareast-language:EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";color:red;mso-fareast-language:EN-US">@@ -589,14 +589,16 @@<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";mso-fareast-language:EN-US"> }<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";mso-fareast-language:EN-US"> // The SII image data is already available and we can enter PREOP<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";mso-fareast-language:EN-US">#ifdef EC_REGALIAS<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";background:red;mso-highlight:red;mso-fareast-language:EN-US">- ec_fsm_slave_scan_enter_regalias(fsm, datagram);</span><span style="font-family:"Courier New";mso-fareast-language:EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";background:lime;mso-highlight:lime;mso-fareast-language:EN-US">+ if (slave->effective_alias == 0) {<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";background:lime;mso-highlight:lime;mso-fareast-language:EN-US">+ ec_fsm_slave_scan_enter_regalias(fsm, datagram);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";background:lime;mso-highlight:lime;mso-fareast-language:EN-US">+ } else if (slave->sii_image->sii.mailbox_protocols & EC_MBOX_COE) {</span><span style="font-family:"Courier New";mso-fareast-language:EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";mso-fareast-language:EN-US">#else<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";mso-fareast-language:EN-US"> if (slave->sii_image->sii.mailbox_protocols & EC_MBOX_COE) {<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";background:lime;mso-highlight:lime;mso-fareast-language:EN-US">+#endif</span><span style="font-family:"Courier New";mso-fareast-language:EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";mso-fareast-language:EN-US"> ec_fsm_slave_scan_enter_preop(fsm, datagram);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";mso-fareast-language:EN-US"> } else {<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";mso-fareast-language:EN-US"> fsm->state = ec_fsm_slave_scan_state_end;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";mso-fareast-language:EN-US"> }<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";background:red;mso-highlight:red;mso-fareast-language:EN-US">-#endif</span><span style="font-family:"Courier New";mso-fareast-language:EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";mso-fareast-language:EN-US"> }<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";mso-fareast-language:EN-US"> else<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";mso-fareast-language:EN-US">#endif<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";color:red;mso-fareast-language:EN-US">@@ -1384,14 +1386,16 @@<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";mso-fareast-language:EN-US"> }<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";mso-fareast-language:EN-US"> #ifdef EC_REGALIAS<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";background:red;mso-highlight:red;mso-fareast-language:EN-US">- ec_fsm_slave_scan_enter_regalias(fsm, datagram);</span><span style="font-family:"Courier New";mso-fareast-language:EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";background:lime;mso-highlight:lime;mso-fareast-language:EN-US">+ if (slave->effective_alias == 0) {<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";background:lime;mso-highlight:lime;mso-fareast-language:EN-US">+ ec_fsm_slave_scan_enter_regalias(fsm, datagram);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";background:lime;mso-highlight:lime;mso-fareast-language:EN-US">+ } else if (slave->sii_image->sii.mailbox_protocols & EC_MBOX_COE) {</span><span style="font-family:"Courier New";mso-fareast-language:EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";mso-fareast-language:EN-US">#else<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";mso-fareast-language:EN-US"> if (slave->sii_image->sii.mailbox_protocols & EC_MBOX_COE) {<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";background:lime;mso-highlight:lime;mso-fareast-language:EN-US">+#endif</span><span style="font-family:"Courier New";mso-fareast-language:EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";mso-fareast-language:EN-US"> ec_fsm_slave_scan_enter_preop(fsm, datagram);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";mso-fareast-language:EN-US"> } else {<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";mso-fareast-language:EN-US"> fsm->state = ec_fsm_slave_scan_state_end;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";mso-fareast-language:EN-US"> }<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";background:red;mso-highlight:red;mso-fareast-language:EN-US">-#endif</span><span style="font-family:"Courier New";mso-fareast-language:EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";mso-fareast-language:EN-US"> return;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";mso-fareast-language:EN-US"> end:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">Graeme.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US">From:</span></b><span lang="EN-US"> Gavin Lambert <<a href="mailto:gavin.lambert@tomra.com">gavin.lambert@tomra.com</a>>
<br>
<b>Sent:</b> Wednesday, 14 December 2022 11:16<br>
<b>To:</b> Graeme Foot <<a href="mailto:Graeme.Foot@touchcut.com">Graeme.Foot@touchcut.com</a>>;
<a href="mailto:etherlab-users@etherlab.org">etherlab-users@etherlab.org</a><br>
<b>Subject:</b> RE: Patch for --enable-regalias<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span lang="EN-US">You’re using very confusing wording, which makes it hard to understand. Admittedly I haven’t reviewed the patch itself as yet.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#4472C4">Yes, if you have a slave that requires reading register 0x0012 then the SII<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#4472C4">alias value will be zero. This patch will read 0x0012 if the SII alias is zero, but<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#4472C4">if it is non-zero it will continue on to reading the 0x0012 register. Also if the<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#4472C4">SII alias is non-zero then it should match the 0x0012 value, so reading 0x0012<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#4472C4">is not required and can be skipped.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">So it reads 0x0012 if the alias is zero, or it reads 0x0012 if the alias is non-zero, although it isn’t required? This appears to be some strange usage of the word “non-zero” that I wasn’t previously aware of…<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#4472C4">This patch will also improve scan performance of –enable-regalias by<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#4472C4">skipping reading register 0x0012 if the slave has an non-zero SII slave alias.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#4472C4">Also if you do not use slave aliases in your system then you are unlikely to<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#4472C4">Require –enable-regalias for this type of slave anyway.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">This is a bit clearer, but it’s different from what you said in your original post.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><strong><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:#231F20">Gavin Lambert</span></strong><b><span lang="EN-US" style="color:#231F20"><br>
</span></b><span lang="EN-US" style="color:#231F20"> <br>
Senior Software Developer TOMRA Fresh Food<br>
<br>
</span><span lang="EN-US"><br>
<br>
<img border="0" width="192" height="45" style="width:2.0in;height:.4687in" id="Picture_x0020_1" src="cid:image001.png@01D90FB3.3D3DE750"> <o:p></o:p></span></p>
<p style="margin-top:0cm"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif"><img border="0" width="600" height="151" style="width:6.25in;height:1.5729in" id="Picture_x0020_2" src="cid:image002.jpg@01D90FB3.3D3DE750"></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> </span><a href="https://www.facebook.com/TOMRA.Food/" target="_blank"><span lang="EN-US" style="text-decoration:none"><img border="0" width="30" height="30" style="width:.3125in;height:.3125in" id="Picture_x0020_3" src="cid:image003.jpg@01D90FB3.3D3DE750" alt="tomra facebook"></span></a><span lang="EN-US"> </span><a href="https://www.linkedin.com/company/tomra-food/" target="_blank"><span lang="EN-US" style="text-decoration:none"><img border="0" width="30" height="30" style="width:.3125in;height:.3125in" id="Picture_x0020_4" src="cid:image004.jpg@01D90FB3.3D3DE750" alt="tomra linkedin"></span></a><span lang="EN-US"> </span><a href="https://twitter.com/TOMRAFood" target="_blank"><span lang="EN-US" style="text-decoration:none"><img border="0" width="30" height="30" style="width:.3125in;height:.3125in" id="Picture_x0020_5" src="cid:image005.jpg@01D90FB3.3D3DE750" alt="tomra twitter"></span></a><span lang="EN-US"> </span><a href="https://www.youtube.com/playlist?list=PLDD3B1A7BAE919EC6" target="_blank"><span lang="EN-US" style="text-decoration:none"><img border="0" width="30" height="30" style="width:.3125in;height:.3125in" id="Picture_x0020_6" src="cid:image006.jpg@01D90FB3.3D3DE750" alt="tomra youtube"></span></a><span lang="EN-US"> </span><a href="https://www.instagram.com/tomrafood/" target="_blank"><span lang="EN-US" style="text-decoration:none"><img border="0" width="30" height="30" style="width:.3125in;height:.3125in" id="Picture_x0020_7" src="cid:image007.jpg@01D90FB3.3D3DE750" alt="tomra instragram"></span></a><span lang="EN-US"><br>
</span><span lang="EN-US" style="font-size:8.5pt;color:#6E8186"> <b>Compac Technologies Ltd</b> | 4 Henderson Place | PO Box 13 516 | Onehunga 1061 | New Zealand
</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:8.5pt;color:#6E8186"> Phone: +64 96 34 00 88 |
<a href="https://www.compacsort.com">https://www.compacsort.com</a></span><span lang="EN-US"><br>
</span><span lang="EN-US" style="font-size:6.5pt;color:#6E8186">The information contained in this communication and any attachment is confidential and may be legally privileged. It should only be read by the person(s) to whom it is addressed. If you have received
this communication in error, please notify the sender and delete the communication.
</span><span lang="EN-US"><o:p></o:p></span></p>
</div>
</body>
</html>