Sign in to follow this  
  • entries
    201
  • comments
    88
  • views
    100397

SCXML V1.0 ?

Sign in to follow this  

70 views

Hi,

a lot of things have happened since my last entry to the journal. Although I wanted to make an entry every two or three days, I missed this goal by far :) To be honest, I was quite sick the last couple of weeks (well... the entire month of january) and I only start to feel a little bit better now... This should teach me to work from 7:30 am to 10:00 pm for 3 months :)

In january I passed my theory exams for CCNA3. Although I could learn, I made some 83% which is way below what I normally do. Hopefully my practical exams will be better.

I also had some stuff to do for Ford Germany. Things worked out quite well and a new week of work for them is showing up at the horizon. I'll probably start on this the 2/18.

Being sick has the advantage that you have quite some time to think of what you do :)

First of all, I have made some progress on my prohibition game concept although it's more in my head than on paper.

And more importantly: I think that I reached V1.0 of what I wanted to accomplish with my State Chart XML stuff. A lot of things have happened there:

1. I replaced the expression parser I found on the net with my own implementation. This is mostly due to the fact that the one I found on the net only supported doubles as return values. Also, there was no decend way to include string support to the parser.

So I wrote my own one which supports things like integers, floats, booleans and string. The basic operations for numbers are supported such as +, -, *, /, ==, +=, etc. Any value can be transformed to a string. I have implemented some basic string stuff to support compares etc.

The type of value will be assigned when parsed. A variable can change from int type to string type without problems.

Also, since today, I have support for arrays. This was important to me because now it should be possible to support speech recognition based picking processes. If you don't know what I mean: Imagine a guy at Amazon running around in the warehouse, picking up stuff he has to send to ppl out there. He's got a headset and a PDA with my software on it. He'll be told where to go, what to fetch and how much. He utters in some responses and off he goes to the next position. The entire process can now be configured by my SCXML implementation. From data fetching (of the warehouse DB) to the speech out- and input. Arrays are needed to store the different picking positions.







'11-C'
1
'Book'


'11-B'
1
'Book'





In this example, the positions are stored within an array and you can access the different value by ie. "pickdata.pick[curpick].position".

The expression parser also supports user defined functions which can be feeded to the parser:

parser->addFunction("getWord", &getWord);
parser->addFunction("getSize", &getSize);

Within the XML file you now can write things like:

getWord(speech, getSize(speech)-1)=='3'

or more precisely:



2. My SCXML implementation and the interfaces have changed a bit.

class IStateMachine
{
public:
virtual ScxmlString getVersion() const = 0;

virtual void update(float _fTimeDelta) = 0;
virtual bool isInFinal() = 0;

virtual void addEvent(const SEvent &_event) = 0;
virtual void removeEventsOf(const ScxmlString &_senderID) = 0;

virtual void registerEventHandler(const ScxmlString &_targetType, const ScxmlString& _target, IEventHandler *_handler) = 0;
virtual void unregisterEventHandler(const ScxmlString &_targetType, const ScxmlString& _target, IEventHandler *_handler) = 0;

virtual IParser* getExpressionParser() const = 0;

virtual bool getDataOf(const ScxmlString &_name, ScxmlString &_out ) = 0;
virtual void setDataFor(const ScxmlString &_name, const ScxmlString &_val ) = 0;
virtual void removeData(const ScxmlString &_name) = 0;
};


An event handler is derived from this:

class IEventHandler
{
public:
virtual bool handleEvent(const ScxmlString& _senderID, const ScxmlString& _event, const DataContainer& _data, const ScxmlString& _hints) = 0;
};


The implementation seems to be quite stable but I need to improve the error handling. Currently I throw some std::exceptions but I want to wrap all this in my own exception. But this can wait for V1.5 or so.

3. SCXML and WinCE... yes... I also did a WinCE port of my SCXML. The picking software I write runs on PDAs such as HP2940 or other devices running WinCE. I don't do anything special for the WinCE stuff. The most differences in code are in the applications themself. There are some differences in the settings for the compiler but this is managed by Visual Studio.

Soo.... what do I want to do with all this... to be honest, I'm not quite sure. The company I worked for 2 years ago might be interested in using my lib for their PDA software package (also picking software) but they're not sure yet.

All this also leads me to the question how I want to release my lib. I was thinking of making it open source, but this would lead to the situation that I cannot sell licences of my lib. Selling licences would be the only way to make at least a little bit of money with it.

Perhaps an indie license + company licence would be interesting... Small bucks for indies, big bucks for companies ;)

What is your advice?

Have fun,
Metron
Sign in to follow this  


0 Comments


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now