0% found this document useful (0 votes)
6 views4 pages

Gurux Device Framework Serial Port API

The document describes the IGXNative class, part of the Gurux Device Framework, which is an open-source software licensed under the GNU General Public License v2. This class is intended for internal use to manage communication with native serial ports, providing various abstract methods for operations such as opening and closing ports, setting baud rates, and reading/writing data. The document emphasizes that the class should not be used directly by users.

Uploaded by

leotecnoap
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views4 pages

Gurux Device Framework Serial Port API

The document describes the IGXNative class, part of the Gurux Device Framework, which is an open-source software licensed under the GNU General Public License v2. This class is intended for internal use to manage communication with native serial ports, providing various abstract methods for operations such as opening and closing ports, setting baud rates, and reading/writing data. The document emphasizes that the class should not be used directly by users.

Uploaded by

leotecnoap
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

#

# --------------------------------------------------------------------------
# Gurux Ltd
#
#
#
# Filename: $HeadURL$
#
# Version: $Revision$,
# $Date$
# $Author$
#
# Copyright (c) Gurux Ltd
#
# ---------------------------------------------------------------------------
#
# DESCRIPTION
#
# This file is a part of Gurux Device Framework.
#
# Gurux Device Framework is Open Source software; you can redistribute it
# and/or modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; version 2 of the License.
# Gurux Device Framework is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
#
# More information of Gurux products: [Link]
#
# This code is licensed under the GNU General Public License v2.
# Full text may be retrieved at [Link]
# ---------------------------------------------------------------------------
import abc

ABC = [Link]('ABC', (object,), {'__slots__': ()})


# pylint: disable=too-many-public-methods
class IGXNative(ABC):
"""
This class is used to communicate with native serial port class. This is
reserved for inner use. DO NOT USE.
"""

@[Link]
def getPortNames(self):
"""Returns available serial ports."""

@[Link]
def open(self, port):
"""
Open serial port.

port: Name of serial port.


"""

@[Link]
def close(self):
"""
Close serial port.
"""

@[Link]
def getBaudRate(self):
"""
Get baud rate.
"""

@[Link]
def setBaudRate(self, value):
"""
Set baud rate.
"""

@[Link]
def getDataBits(self):
"""Get data bits.
"""

@[Link]
def setDataBits(self, value):
"""Set amount of data bits.
value : Amount of data bits.
"""

@[Link]
def getParity(self):
"""Get parity.
"""

@[Link]
def setParity(self, value):
"""
Set parity.
value : parity.
"""

@[Link]
def getStopBits(self):
"""
Get stop bits.
"""

@[Link]
def setStopBits(self, value):
"""
Set stop bits.
value: Amount of stop bits.
"""

@[Link]
def setBreakState(self, value):
"""
Set break state.
value : Is serial port in break state.
"""

@[Link]
def getRtsEnable(self):
"""
Get Request To Send state.
"""

@[Link]
def setRtsEnable(self, value):
"""Set Request To Send state.
value: Is RTS set.
"""

@[Link]
def getDtrEnable(self):
"""
Is Data Terminal ready set.
"""

@[Link]
def setDtrEnable(self, value):
"""Is Data Terminal ready set.
value : True, if DTR is set.
"""

@[Link]
def getDsrHolding(self):
"""
Get Get Data Set Ready holding flag.
"""

@[Link]
def getBytesToRead(self):
"""
Returns amount of bytes to read.
"""

@[Link]
def getBytesToWrite(self):
"""
Returns amount of bytes to write.
"""

@[Link]
def read(self):
"""Read data from serial port to the buffer."""

@[Link]
def write(self, data):
"""Write data to the serial port."""

@[Link]
def getCtsHolding(self):
"""Returns Clear To Send holding flag."""

@[Link]
def getCDHolding(self):
"""Gets the state of the Carrier Detect line for the port."""

@[Link]
def getHandshake(self):
"""Gets the handshaking protocol for serial port transmission of data."""

@[Link]
def setHandshake(self, value):
"""Sets the handshaking protocol for serial port transmission of data."""

@[Link]
def isOpen(self):
"""Is connnection open."""

You might also like