question: private void reset ( ) { serialInterface . ifPresent ( null ) ; serialInterface = Optional . empty ( ) ; cancelRead ( ) ; cancelWrite ( ) ; }
target:  Reset the state of the module, its ports, and, if there was one, the serial interface, then clears it.