public override MetaWearController addModuleCallback(ModuleCallbacks callback) { byte moduleOpcode = callback.getModule().modID; if (!moduleCallbackMap.ContainsKey(moduleOpcode)) { moduleCallbackMap[moduleOpcode] = new List <ModuleCallbacks>(); } moduleCallbackMap[moduleOpcode].Add(callback); return(this); }
public override void removeModuleCallback(ModuleCallbacks callback) { moduleCallbackMap[callback.getModule().modID].Remove(callback); }