public void RegisterPortInHandler(short port, Func<short> handler) { deviceInHandlers.Add(port, handler); }