kevotheclone wrote:#1 If I add multiple Channel Hooks to the same Channel, are they called in the order that they appear in the list, top to bottom?
I think the answer is yes. That's why you included the "Move Item Up" and "Move Item Down" buttons.
kevotheclone wrote:#2 Are multiple Channel Hooks attached to the same Channel, called synchronously or asynchronously?
I think the answer is synchronous.
kevotheclone wrote:#3 If the answer to #2 is synchronous, if a Channel Hook encounters an error (and maybe, writes anything to the error output (stderr) or returns a non-zero exit code) do subsequently listed Channel Hooks still get called or does subsequently listed Channel Hook processing continue?
Processing continues. Channel hooks are independent of each other and I'd be quite annoyed if my hook wasn't being called because somebody else had an error.
kevotheclone wrote: Does stderr output constitute an error? Does a non-zero exit code constitute an error?
Yes and yes.
kevotheclone wrote:#4 Is there a timeout on Channel Hooks and if so what's the timeout interval?
I'm guessing there is a timeout, but wouldn't be surprised if there isn't a timeout.
No, there has to be one. Channel hooks get invoked as part of updating a channel so if one got stuck, the channel would never finish updating.
The global setting is in the Advanced tab of the Program Options (Script timeout). This is the default timeout any time Awasu runs an external program. For channel hooks, you can also define a global or per-instance <tt>ScriptTimeout</tt> parameters.
kevotheclone wrote:#5 If a Channel Hook never returns an exit code and never writes anything to stderr and a timeout occurs, do subsequently listed Channel Hooks still get called or does subsequently listed Channel Hook processing continue?
I'm guessing subsequently listed Channel Hooks will still get called.
As explained above, external programs *must* finish and Awasu will terminate them if they timeout.
kevotheclone wrote:#6 When are the Channel Hook parameters, both global and instance, read by Awasu? When Awasu first runs? When the Channel is updated? Right before each Channel Hooks is called? At different times depending upon the registered event(s)? At different times depending upon whether it's a global parameter or an instance parameter?
I'm guessing it's "When the Channel is updated" based upon the presence of the "BeginChannelUpdate" event.
Hmmm, your first wrong guess
For all config files, Awasu reads them at startup and then keeps them in memory.
kevotheclone wrote:#7 "Commands" can be defined for Channel Hooks; can you give me some details on how these commands are invoked? I'm not talking about invoked as in "the user clicks a menu item", more like how does Awasu know how to dig into a Python script and call a function?
It doesn't. Awasu has no knowledge of what language an external program is written in so it couldn't possibly do anything like this. All it knows is how to run the program. It passes through which command the user invoked via the INI file
(the same way it passes through what event occurred when running a hook to process an event).
kevotheclone wrote:I can see that it works with Python and some of the DLL-based Channel Hooks, but what about other programming languages? If someone wanted to create a Channel Hook in Java or a .NET-based language, can they define Commands?
It doesn't matter what language you use, it's completely generic. As the help says, "read an INI file and write to the console" is all you need to be able to do.
kevotheclone wrote:#8 Is there a limit on the number of global parameters that that can be defined for a Channel Hook?
I don't have a guess on this question.
Absolutely. When Awasu starts up, it reads the parameters from the channel's config file in a loop using an int to index, so you can have at most 4,294,967,295 parameters. Of course, you're much more likely to run out of memory storing the details of all those parameters before you hit that limit
And your users will hate you when they see them all in the UI...
kevotheclone wrote:#9 Is there a limit on the number of instance parameters that that can be defined for a Channel Hook?
I don't have a guess on this question.