Adding non-SNAPI commands to a module
mstocum
Junior Member
I'm trying to add some non-standard commands to a module I'm working on. Right now I'm just overriding handleCommandEvent() like so:
and it works, but if I have debug output enabled on the module, I get the following output on the console when I send the command to the module:
I feel like there's something I'm supposed to do to let the SNAPIRouter know that I'm handling the command.
public void handleCommandEvent(Event evt, String cmd) {
if (evt == null)
return;
if(cmd.equals("DOIT")) {
doit();
}
}
and it works, but if I have debug output enabled on the module, I get the following output on the console when I send the command to the module:
Line 3 (12:05:43.007):: ModuleComponent:OnHandleDataEvent(41001:1:1,DOIT) Line 4 (12:05:43.007):: LebowJoinscheduler: SNAPIRouter: Routing the Data Event Line 8 (12:05:43.007):: LebowJoinscheduler: unhandled - DataEvent: 9 Line 9 (12:05:43.007):: LebowJoinscheduler: unhandled - DataEvent: 64 Line 10 (12:05:43.007):: LebowJoinscheduler: SNAPIRouter: UNKNOWN-DOIT
I feel like there's something I'm supposed to do to let the SNAPIRouter know that I'm handling the command.
Comments
-
Unfortunately there is no way (AFAIK) to pass back anything to the underlying Module class that you've successfully handled an event. The message is generated by Module's handleAdvancedEvent(..). This is a utility method that breaks out an Event object and routes it the appropriate handler methods and can be overridden if you like. Alternatively, if you just want to suppress that message for your entire module call
setProperty("IGNORE-UNKNOWN-NETLINX-COMMAND","true");on your Module somewhere convenient or set it externally with a 'PROPERTY-...' send command.
Categories
- All Categories
- 2.5K AMX General Discussion
- 922 AMX Technical Discussion
- 514 AMX Hardware
- 502 AMX Control Products
- 3 AMX Video Distribution Products
- 9 AMX Networked AV (SVSI) Products
- AMX Workspace & Collaboration Products
- 3.4K AMX Software
- 151 AMX Resource Management Suite Software
- 386 AMX Design Tools
- 2.4K NetLinx Studio
- 135 Duet/Cafe Duet
- 248 NetLinx Modules & Duet Modules
- 57 AMX RPM Forum
- 228 MODPEDIA - The Public Repository of Modules for Everyone
- 943 AMX Specialty Forums
- 2.6K AMXForums Archive
- 2.6K AMXForums Archive Threads
- 1.5K AMX Hardware
- 432 AMX Applications and Solutions
- 249 Residential Forum
- 182 Tips and Tricks
- 146 AMX Website/Forums