I would like to refine this diagram/note so that I can use it to create a new loader that utilizes a "comms suite". I used dia to create what I like to call a proposed class sheet.
I don’t necessarily want to create all these classes at once, some have higher priorities than others. I also don’t want to work myself back into a corner making it too much work to add/change some of the underlying classes.
I will use loading an s19 file from the GUI to the Device to iterate though the diagram.
1. the user loads the application creating within it an instance of the Communications/Operations class.
2. the user selects properer comms method and protocol(rs232 and serial monitor)- this could be the default
3. The user clicks connect and depending on their settings the Communications/Operations initializes within it self the a Data-I/0 class with the specified parameters. In this example Data-I/O will use the serial monitor over RS232.
4. The user clicks load and chooses an s19 file from the file menu.
5. The Communications/Operations class receives a file name parameter and a "load" command after which it reads out the file and gets/checks the payload data via the functions in this s19 lib.
6. CO class feeds data to the Data-I/O object who checks for proper acks etc depending on the transport protocol and set options.
7. After the operation has completed the user has the option to reset the device state and disconnect etc.
I think what would be a big help is to define what each part should and should not do before writing any new code.
-sean
Proper code/class layout diagram before writing any code.
- SleepyKeys
- LQFP144 - On Top Of The Game
- Posts: 549
- Joined: Mon Feb 11, 2008 10:52 pm
- Location: Arizona
- Contact:
Proper code/class layout diagram before writing any code.
You snooze, you lose!
Re: Proper code/class layout diagram before writing any code
I've had a bunch of graphviz tabs open in my browser for months, so I'm dumping them here for the time being.
Gallery of examples: http://graphviz.org/Gallery.php
Live online engine: http://graphviz-dev.appspot.com/
The balance were from the gallery page, trying to choose a style.
Fred.
Gallery of examples: http://graphviz.org/Gallery.php
Live online engine: http://graphviz-dev.appspot.com/
The balance were from the gallery page, trying to choose a style.
Fred.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
- SleepyKeys
- LQFP144 - On Top Of The Game
- Posts: 549
- Joined: Mon Feb 11, 2008 10:52 pm
- Location: Arizona
- Contact:
Re: Proper code/class layout diagram before writing any code
Thanks for the link!
Re: Proper code/class layout diagram before writing any code
http://plantuml.sourceforge.net/activity.html
Check out the other types of diagram that they offer. It USES graphviz, so it IS a front end to graphviz, just a text based one. Nice stuff.
Build like so:
I hope you have a sense of humour!
Fred.
Check out the other types of diagram that they offer. It USES graphviz, so it IS a front end to graphviz, just a text based one. Nice stuff.
Code: Select all
@startuml EMS.Purchasing.png
title EMS Purchasing Flow Chart
(*) --> "Looking for an EMS"
if "FreeEMS?" then
-->[yes] "Run engine beautifully"
--> "Have money left over for..."
if "Hungry?" then
-->[yes] "Pizza!"
--> "Be very happy!"
else
-->[no] "Beer!"
--> "Be very happy!"
endif
--> "Laugh at MS user"
--> "Still be very happy!"
--> "Buy second project car"
--> "Be happier than ever"
--> "Retire early"
--> (*)
else
-->[no] "Which EMS then?"
if "Rich?" then
-->[yes] "Motec"
--> "Not anymore!"
--> "Run engine well"
--> "Put on smug face"
--> "Desire customisation"
else
-->[no] "Get a Link"
--> "Bros like it"
--> "Run engine ok"
--> "Bros get one too"
--> "Desire customisation"
--> "Be very sad"
else
-->[poor] "MegaSquirt"
--> "Laugh at Motec user"
--> "Load new code, again"
--> "Melt coils"
--> "Replace coils"
--> "Bad PID idle"
--> "Use open loop"
--> "DB37 Problem"
--> "Melt piston"
--> "Be very sad"
endif
--> "Be very broke"
--> (*)
endif
@enduml
Code: Select all
fred@cheetah:~$ java -jar plantuml.jar EMS.Purchasing.plantuml
fred@cheetah:~$ eog EMS.Purchasing.png
I hope you have a sense of humour!
Fred.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
Re: Proper code/class layout diagram before writing any code
I use this a lot for diagramming state machines: http://www.umlet.com
Re: Proper code/class layout diagram before writing any code
Sean and I were talking the other day and agreed that he should do a meta summary of the parts required to build an awesome loader. I didn't want to lose what we had discussed into the depths of time, so here it is!
The issue tracker can act as a guide about needed glue logic and the current spec too. Plus, you know the sort of chunks it has in it to do the work, stuff like:
Fred.
The issue tracker can act as a guide about needed glue logic and the current spec too. Plus, you know the sort of chunks it has in it to do the work, stuff like:
- low level serial
- sm commands
- fw commands
- s19 parsing/reading/writing
- etc
- micro sequences
- combos of sequences
- logic on how to handle different states
Fred.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
- SleepyKeys
- LQFP144 - On Top Of The Game
- Posts: 549
- Joined: Mon Feb 11, 2008 10:52 pm
- Location: Arizona
- Contact:
Re: Proper code/class layout diagram before writing any code
Selecting previously deselected package umlet.
Unpacking umlet (from .../archives/umlet_10.4-1_all.deb) ...
Processing triggers for menu ...
Processing triggers for man-db ...
Setting up libecj-java (3.5.1-3) ...
Setting up libitext-java (2.1.7-2) ...
Setting up libjlibeps-java (0.1+2-1) ...
Setting up umlet (10.4-1) ...
Processing triggers for menu ...
Unpacking umlet (from .../archives/umlet_10.4-1_all.deb) ...
Processing triggers for menu ...
Processing triggers for man-db ...
Setting up libecj-java (3.5.1-3) ...
Setting up libitext-java (2.1.7-2) ...
Setting up libjlibeps-java (0.1+2-1) ...
Setting up umlet (10.4-1) ...
Processing triggers for menu ...
You snooze, you lose!