You can send an existing Signal Instance (or create a new one and then send it) to a target object with the following APIs
public static void sendSignal(String signalName, Object_ object) { ... } public static void sendSignal(String signalName, String targetName) { ... } public static void sendSignal(SignalInstance signal, Object_ object) { ... } public static void sendSignal(SignalInstance signal, String targetName) { ... } public static void sendSignal(String signalName, Object_ target, String portName) { ... } public static void sendSignal(SignalInstance signal, Object_ target, String portName) { ... } |
The conditions that apply when creating an Instance are as follows
The following example shows how to send a specific signal to a specific target object in ALH API
ALH.sendSignal("play", o); → "o" references to a target object. ALH.sendSignal("system::play", o); → Find a signal using a qualified name. ALH.sendSignal("play", "Speaker"); → Send to all waiting objects that have "Speaker" as their type name. ALH.sendSignal("play", "Player", "out2"); → "Player" is an object, and "out2" is a port name. |
All parameters must not be null, otherwise the ScriptEngine errors will be thrown.