Home AMX User Forum Duet/Cafe Duet

Adding non-SNAPI commands to a module

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:
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

  • PhreaKPhreaK Posts: 966
    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.
Sign In or Register to comment.