PDA

View Full Version : eventstring vs payload



denmike
July 7th, 2005, 04:14 PM
Hi,

something is not exactly clear to me wrt the api:

Quote from the documentation:
"Passing events to Girder is done through the SendEventEx function.
void SendEventEx(pchar eventstring, void * payload, int payloadlen, int DEVICENUM, int KeyMod);
The eventstring is the obvious eventstring, the payload is the payload data"

I have an IR -> RS232 device. I assume this is the command I should use to communicate a received command to Girder.

But what is meant by 'eventstring' - what is that supposed to be?
Can it be the data received from the device or should that be put in the payload?
The data received is a string of about 10-30 chars. If that has anything to say.

//michael

Promixis
July 7th, 2005, 08:19 PM
The eventstring is the name of the event which should be unique for each button on your remote? What IR receiver are you using? And if its rs232, why not use the serial plugin?

denmike
July 8th, 2005, 02:35 PM
The eventstring is the name of the event which should be unique for each button on your remote?
Name of the event? I still don't get it - where do I get that name from? And what's the payload?


What IR receiver are you using?
Lintronic TT455-RT-238


And if its rs232, why not use the serial plugin?
Well for one thing I can't get it to work. Plus my device uses a command string like <cmddatacrc> where command for receiving/transmitting is different.

Maybe I could use the scripting stuff for that, but I really don't feel like learning a new language just for that. And anyways I'll need to write some soft of a plugin to select the actions send to the device, so I figured I might as well just do the input part there too...

//michael

Promixis
July 8th, 2005, 02:51 PM
G4 is about to go into public beta. You may want to wait to do your plugin until then.

denmike
July 8th, 2005, 05:03 PM
G4 is about to go into public beta. You may want to wait to do your plugin until then.
I've got that already, but I have some problems with that. Either there is a problem with the alfa, or with the delphi UI example, or with my Delphi 4 version, so I decided to start with Girder 3. Hopefully a more stabel version goes out in the meantime.. As far as I can see the plugin interface is not too different - mostly a few additions, right?

Anyways, that didn't really answer my question :-?

Btw: What is the roadmap for G4? I know the beta should be out 'soon', but when do you expect the final, and when do you expect to stop shipping G3?
Is upgrading to G4 free for all users, otherwise I'd need the G3 plugin anyways..

PS: I've got a rough event receiver working already - so it didn't take that long :)

So far I'm just using the serial data as the "eventstring" - but what is the intended use of the "payload"?

//michael

Promixis
July 8th, 2005, 05:07 PM
the payload is only needed if you have to send extradata with the eventstring. in your case, likely no.