Training, Open Source computer languages

This is page http://www.wellho.net/forum/The-Tcl- ... guage/Respond-to-remote-events.html

Our email: info@wellho.net • Phone: 01144 1225 708225

 
For 2023 (and 2024 ...) - we are now fully retired from IT training.
We have made many, many friends over 25 years of teaching about Python, Tcl, Perl, PHP, Lua, Java, C and C++ - and MySQL, Linux and Solaris/SunOS too. Our training notes are now very much out of date, but due to upward compatability most of our examples remain operational and even relevant ad you are welcome to make us if them "as seen" and at your own risk.

Lisa and I (Graham) now live in what was our training centre in Melksham - happy to meet with former delegates here - but do check ahead before coming round. We are far from inactive - rather, enjoying the times that we are retired but still healthy enough in mind and body to be active!

I am also active in many other area and still look after a lot of web sites - you can find an index ((here))
Respond to remote events

Posted by asmall (asmall), 4 July 2007
I'm writing a Command Prompt based test tool in C that includes the TCL language. I'm overriding Tcl_AppINit and adding custom commands using Tcl_CreateObjCommand() and calling Tcl_Main from main().

The system has two processor boards (A & B) that normally interact, and the test tool emulates one side (so we can test the other) by replacing board A with a PC. The original concept was that board A would send data and commands to B, but now it looks more complex.

Now, some commands from A (e.g. dataavailable) result in B calling back to request blocks of data (e.g. getblock). This event arrives at the C program as a callback function.

I need to allow the event to come back into the TCL script and respond appropriately depending on the parameter values in the callback. An idea is to define a TCL proc earlier in the script that can be called from within the C handler, somehow passing on the parameters. The parameters include a number of status flags, and a void pointer to "pDetails".

Can TCL do this?

Posted by admin (Graham Ellis), 6 July 2007
This is one of those questions that I went "oh help" at when I first read it ... and I'm still wallowing slightly - I'm away from home and all my reference books, and looking at Java / Tomcat stuff today which is a very different topic indeed. But I THINK the answer to your question is "Yes".

Pleas do follow up further if you would like me to take a further look and see if I can came up with more certainty for that answer next week, when I'll be back in base

Posted by asmall (asmall), 6 July 2007
Yes, still interested. Currently the callbacks are going to a printf statement so the developers are able to manually confirm the parameters and respond accordingly. This is OK for early development, but we'll need better automation for testing.



This page is a thread posted to the opentalk forum at www.opentalk.org.uk and archived here for reference. To jump to the archive index please follow this link.

© WELL HOUSE CONSULTANTS LTD., 2024: Well House Manor • 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 01144 1225 708225 • FAX: 01144 1225 793803 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho