View Full Version : Problems using gir_send_event()
scott
November 15th, 2002, 09:16 AM
I've been trying to use the Girder Event Library using the gir_send_event() function. I'm new to Girder (great app), so I'm probably doing something foolish.
My sample application IS connecting to Girder as I am able to learn the event that is sent by the sample. However, after it is learned, Girder does not involk the command when the event is received.
If I check the 'Invert' checkbox, it causes the command to execute, so I know it is being received by Girder.
int nRc = gir_send_event_easy( "test", 2001, NULL, NULL, NULL );
Another thing that I don't understand (may be part of the problem), is why pressing F5 (test) on the EventString in Grider does nothing, but pressing F5 on the command actually executes the command.
Any ideas?
Thanks,
Scott
Ron
November 15th, 2002, 10:08 AM
Well its 99% sure not a problem of the library or Girder ;-)
- Install the logger plugin and see if the event is coming in correctly.
- Check if the event assigned to the command is correct ( so did you by any chance change the device number after assigning it ? ) Check in the .gml file to see what number was assigned.
About the F5 thing,.. well you can't execute an eventstring, only a command... I think that makes sense.
scott
November 15th, 2002, 10:47 AM
Ron,
The logger is showing the event received. It shows the same event name and device # for the learned event and the 'real' event.
I've attached the GML and sample app, if you have the time to check it out.
The GML simple writes some text to NotePad.exe (that is already running and targeted).
Thanks,
Scott
Ron
November 15th, 2002, 11:25 AM
Congratulations.. You won the lotto. The 1% was the problem. :oops:
If you change the device number to 18 it will work. ( I had been testing with 18 all the time ). Fixed in next release.
If you need this release now let me know. I'll give you a pre-release.
scott
November 15th, 2002, 11:36 AM
Congratulations.. You won the lotto. The 1% was the problem. :oops:
If you change the device number to 18 it will work. ( I had been testing with 18 all the time ). Fixed in next release.
If you need this release now let me know. I'll give you a pre-release.
Fantastic!
It's the story of my life. I'm always finding that elusive 1% (except when it comes to the lotto. :wink:
I'm glad you found it. I was starting to feel really stupid. It's such a simple API, I was ashamed to be screwing it up.
I'll use 18 for now. Do I need to get an official device # for this? Since it's called from an application, it won't be an official plugin.
Thanks for your help,
Scott
Ron
November 15th, 2002, 11:38 AM
No just use any number you like.
Mark F
November 15th, 2002, 11:59 AM
Never mind. :)
scott
November 15th, 2002, 12:03 PM
Never mind. :)
So I guess that means I'll just use 18 to be backward compatible with the existing gireventlib.dll.
I see that 0-24 are reserved. If I use 18, will it be OK? It seems to work fine.
Mark F
November 15th, 2002, 12:09 PM
Ron - Does the LUA TriggerEvent() function have this same problem?
Ron
November 15th, 2002, 12:20 PM
Yes its a problem inside of Girder.
Girder tries to compare the eventstrings using a plugin, but most of the time the plugin with id 2001 ( or whatever number) isn't available, so instead of using a default compare the function returned FALSE ). This was all good until we started sending device numbers that did not have an actual plugin. Thats why it stayed inside girder for so long.
Events with device ID 18 are Girder events they are used for this kind of stuff.
Ron
November 18th, 2002, 04:49 AM
3.2.6b fixes the problem.
Powered by vBulletin® Version 4.1.8 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.