<?xml-stylesheet type="text/xsl" href="https://community.element14.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/"><channel><title>Third Year Systems Project - 3: Begining to look like Something</title><link>/members-area/personalblogs/b/blog/posts/third-year-systems-project---3-begining-to-look-like-something</link><description>Some fun news first, We now have a logo for the &amp;quot;Company&amp;quot; (as this is a mock project, its a mock company). We are Called Alpha Vending Solutions I have just managed to get working the Maintenance mode Software using visual c#. The fix ...</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Third Year Systems Project - 3: Begining to look like Something</title><link>https://community.element14.com/members-area/personalblogs/b/blog/posts/third-year-systems-project---3-begining-to-look-like-something</link><pubDate>Wed, 18 Oct 2017 08:41:35 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:c39dcd81-a88a-422a-9056-1914fe6ef9ba</guid><dc:creator>michaelkellett</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;Re the serial port.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Normally you would only allow access to a hardware resource to just one module or object of your code.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Any other forms or modules would only get access by calling that.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;The way I would design it is for the communications from PC to Mbed to use a strict &amp;quot;command/response&amp;quot; protocol. The PC will send commands and the Mbed will respond. The Mbed will never send a message except in response to a command and it will always respond within a defined (short) time. This allows you to use&amp;nbsp; blocking calls to a &amp;quot;sendcommand&amp;quot; method in your serial comms object (or module or task or whatever).&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;If you are using threads in c# you can do better and allow many objects to access the &amp;quot;sendcommand&amp;quot; method simultaneously but it gets much more complicated because the serial comms object has to be able to queue the requests and send the responses to the right places.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;If more than one object has access to the hardware then there is no reasonable way of sharing the hardware (because you cant tell if some other object just sent a command and is waiting for&amp;nbsp; a reply.)&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;C# is very big and complicated and offers many ways of dealing with asynchronous communications (that&amp;#39;s where you send a command and don&amp;#39;t wait for the answer) but you should be able to accomplish all you need with a much simpler (blocking) model.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;MK&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=3700&amp;AppID=293&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Third Year Systems Project - 3: Begining to look like Something</title><link>https://community.element14.com/members-area/personalblogs/b/blog/posts/third-year-systems-project---3-begining-to-look-like-something</link><pubDate>Tue, 17 Oct 2017 17:47:45 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:c39dcd81-a88a-422a-9056-1914fe6ef9ba</guid><dc:creator>DAB</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;Nice update.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;When getting into projects with new tools and software, you always need to allocate some learning time.&lt;/p&gt;&lt;p&gt;Often you discover that what the product promises is different from what the product can deliver.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;DAB&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=3700&amp;AppID=293&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item></channel></rss>