ofxSerial close connection

Hello Everyone,

I’m using the ofxSerial addon to read serial data but I need to close the connection and re-open it again with a different baud rate. how could I do that?
here my ofApp.h

ofx::IO::SerialDevice device;

here my ofApp.cpp inside the setup() function.

string mydevice = "/dev/tty.SLAB_USBtoUART";
int baudrate = 115200;
// Connect to my device
bool success = device.setup(mydevice,
                                baudrate,
                                device.DATA_BITS_EIGHT,
                                device.PAR_EVEN,
                                device.STOP_ONE,
                                device.FLOW_CTRL_NONE);

Thanks!