def getCD(self):
     """Read terminal status line: Carrier Detect"""
     if self.fd is None: raise portNotOpenError
     s = termios.tcgetstats(self.fd)[1]
     return s & termios.MS_DCD != 0
 def getDSR(self):
     """Read terminal status line: Data Set Ready"""
     if self.fd is None: raise portNotOpenError
     s = termios.tcgetstats(self.fd)[1]
     return s & termios.MS_DSR != 0
 def getRI(self):
     """Read terminal status line: Ring Indicator"""
     if self.fd is None: raise portNotOpenError
     s = termios.tcgetstats(self.fd)[1]
     return s & termios.MS_RI != 0
 def getCTS(self):
     """Read terminal status line: Clear To Send"""
     if self.fd is None: raise portNotOpenError
     s = termios.tcgetstats(self.fd)[1]
     return s & termios.MS_CTS != 0
 def getCD(self):
     """Read terminal status line: Carrier Detect"""
     if self.fd is None: raise portNotOpenError
     s = termios.tcgetstats(self.fd)[1]
     return s & termios.MS_DCD != 0
 def getRI(self):
     """Read terminal status line: Ring Indicator"""
     if self.fd is None: raise portNotOpenError
     s = termios.tcgetstats(self.fd)[1]
     return s & termios.MS_RI != 0
 def getDSR(self):
     """Read terminal status line: Data Set Ready"""
     if self.fd is None: raise portNotOpenError
     s = termios.tcgetstats(self.fd)[1]
     return s & termios.MS_DSR != 0
 def getCTS(self):
     """Read terminal status line: Clear To Send"""
     if self.fd is None: raise portNotOpenError
     s = termios.tcgetstats(self.fd)[1]
     return s & termios.MS_CTS != 0