15,892,809 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Trevor Johansen (Top 16 by date)
Trevor Johansen
21-Jul-11 22:53pm
View
Yea I am a bit confused by the C# syntax in your article. I was going to rework my code to allow adding states and events such as:
AddState ( Curr_State, New_State, Event );
AddEvent ( Event Key_UP );
AddEventFunction ( Event Key_UP, pFunc UP_Function);
AddStateFunction ( State, pFunc State_Function);
However I would store these variables into an array as I am already doing but in order to make it flexible I would need to use vectors to allow dynamic resizing. The vector library is not available on embedded devices. I could skirt around this by having a STATE_TABLE [#States][#Events][pFuncs] macro but that's not a very clean implimentation...
Current code is here: http://pastebin.com/sKkcF0Ui
Trevor Johansen
20-Jul-11 23:32pm
View
Well that was a great read! Unfortunately I do not use C#...
I quite like the enum as a class that C# has there. I have to maintain an 2d char array for debugging my enums in english in C/C++.
However I do not get quite a bit of the syntax as I have not dealt with templates yet and am unsure how to apply things to C++. I am working on a version of my code but have some kinks still. I will post it on pastebin tomorrow and I will ask my questions.
Thanks!
Trevor Johansen
15-Jul-11 13:20pm
View
I found this awesome website: http://www.mywikinet.com/mpl/paper/html/example.html and it has a very clean FSM implementation. Should be applicable to C++ and Java, It is much more robust than my FSM and has a better interface.
Trevor Johansen
15-Jul-11 11:52am
View
I have used it to and its handy for things like quick user menus but I prefer not to rely on a closed source project.
Trevor Johansen
15-Jul-11 11:51am
View
Thanks for the heads up on the Boost::FSM. It is open and has all the features I was looking for I believe.
Do they make a Java equivalent of the Boost library do you know?
Trevor Johansen
15-Jul-11 11:50am
View
I was hoping to find a framework to work from as the ones I have written on my own are not robust enough.
Trevor Johansen
14-Jul-11 0:40am
View
I'm open to different versions of FSM's or something completely different.
What I am implementing is a simple enough state chart but their is error checking and redundancy added to each state and if their are errors the system needs to branch into an alternate state set to discover and/or correct the problem.
I have done simple state machines such as user menus where everything is set in stone and their are no issues with things failing. Theirs not a whole lot of info on FSM's so most of what I know I learned from here: http://en.wikipedia.org/wiki/Automata-based_programming
Trevor Johansen
5-Jul-11 7:23am
View
jd2xx.jar Is a guys implementation of FTDI's serial/FIFO USB communications chips bit-bang driver.
I am using Java instead of c/c++ as my app needs to run on Windows and Linux.
Trevor Johansen
5-Jul-11 7:21am
View
I have the jd2xx.jar included in my compile and run paths in NetBeans and when I run my jar with "-Djava.class.path="path to jd2xx.jar" and -cp "path to jd2xx.jar" it says that it can not find jd2xx in the java.class.path
Here is my NetBeans project if that helps:
http://www.4shared.com/file/EGLVyDnm/jd2xx_Test.html
Trevor Johansen
2-Jul-11 20:59pm
View
Is Java a good place to focus my energy on? All of the applications I plan on writing to handle my hardware need to be Windows/Linux compatible as 90% of users are on Windows and I develop on Linux.
It seems like the logical choice but it still has a lot of pitfalls such as throughput when handling external communications. For example an Isosynchronous USB device will never have a hope of achieving USB 2.0 bandwidth when the application is written in Java.
What is a decent looking GUI library for Java? All I have heard of is Swing.
Trevor Johansen
4-Jan-11 22:58pm
View
Yes.. problems indeed...
I just started writing makefiles this weekend so I am quite new to it. Single file ones are not to hard but things got unruly quite quickly.
Trevor Johansen
4-Jan-11 20:23pm
View
Sorry for the late reply work got busy after the holidays. I have tried out Process Explorer from SysInternals and its quite a handy app even though it spits out so much info its overwhelming.
I did manage to figure out how the IDE builds its projects though. Turns out it was making c,as,link instructions internally and then dumping them in the system temp directory so whenever I saw the compiler thread the input was garbled but that was actually the temp file name!
Finally got windows to hold onto the temp files and now I can make my makefiles. Although I have a makefile question now and will make a new request.
Thanks!
Trevor Johansen
1-Jan-11 21:44pm
View
Interesting little utility. It defiantly does what ps does but with alot more effort.
The IDE does not spawn a visible process for the ARMCC.exe so I can not tell what it was called with and have no idea how I would setup the command string to dump every ~100ms only knowing that programs name. In linux you could just write a simple script and use ps -A | grep binary and away you go.
Do you have any experience with WMI? or know how I can get it to dump what I want?
Trevor Johansen
1-Jan-11 14:23pm
View
Oh wow the autotools tutorial is long but excellent. Exactly the info I was looking for on how to make a better makefile thats for sure!
However I still need to find out what command line switches to actually pass to my compiler as its documentation is not spectacular and I can only compile 50% of my programs by hand
Trevor Johansen
1-Jan-11 13:20pm
View
Deleted
The end goal is to get the project IDE as Code::Blocks but use the arm compiler
Trevor Johansen
1-Jan-11 13:15pm
View
Deleted
My project tree has several folders and outputs obj, lst, lib to seperate directories from around ~40 files.
What programs would you recommended to create a makefile skeleton for a large project? I can make basic makefiles but then theirs a lot of dependencies and output folders the %:.: and .c.o: can get confusing.
Also I ran 'strace wine ide.exe 2>dump.txt' and then 'cat dump.txt | grep armgcc' and I only found references to the files locations. In the IDE i compiled one c file and when I grep for that file I see:
stat64("/home/uminded/.wine/dosdevices/c:/Keil/ARM/Examples/Blinky/Blinky.c", {st_mode=S_IFREG|0644, st_size=1755, ...}) = 0
write(19, "compiling Blinky.c...\r\n", 23) = 23
write(19, "Blinky.c - 0 Error(s), 0 Warning"..., 38) = 38
But I can not find the string that was passed to armgcc.exe to compile Blinky.c
Show More