SinelaboreRT Header Logo

SinelaboreRT

As simple as possible, but not any simpler!

User Tools

Site Tools


wiki:news:10oct2013

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
wiki:news:10oct2013 [2013/09/22 20:50] pmuellerwiki:news:10oct2013 [2022/08/17 19:44] (current) – Discussion status changed pmueller
Line 50: Line 50:
  
 ===== Provide an own Instance Structure ===== ===== Provide an own Instance Structure =====
-Sometimes it makes sense to provide an own instance structure. In our example we want to store the baud rate, parity and other values relevant for each serial port. So the state machine can store there all local data and makes it "object oriented" this way.+Sometimes it makes sense to provide an own instance structure. In our example we want to store the baud rate, parity and other values relevant for each serial port.
  
-So first define an own struct in a file called ''own_inst_type.h'' (as an example). As you can see in the code below local data like the noRxBytes is defined there but also variables that are initialized just once like the bit rate which is more like a parameter.+So first define an own struct in a file called ''own_inst_type.h'' (as an example). The example below shows how to define local variables like the ''noRxBytes'' (number of already defined bytes) as well as parameters like the parity etc.
  
 <code c> <code c>
Line 119: Line 119:
  
  
-{(rater>id=6|name=How do you like this article?|type=rate)} + 
-~~DISCUSSION|Leave your comments~~+~~DISCUSSION:closed|Leave your comments~~
wiki/news/10oct2013.1379875810.txt.gz · Last modified: 2013/09/22 20:50 by pmueller

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki