serial

The serial commands module.

These commands are used in the following models: SMU2601B, SMU2602B, SMU2604B, SMU2611B, SMU2612B, SMU2614B, SMU2634B, SMU2635B, SMU2636B, SMU2651A, SMU2657A

THIS FILE IS AUTO-GENERATED, IT SHOULD NOT BE MANUALLY MODIFIED.

Please report an issue if one is found.

Attributes and Functions
- serial.baud
- serial.databits
- serial.flowcontrol
- serial.parity
- serial.read()
- serial.write()

Serial

Bases: BaseTSPCmd

The serial command tree.

Constants
  • .FLOW_HARDWARE: Hardware flow control.
  • .FLOW_NONE: No flow control.
  • .PARITY_EVEN: Select even parity.
  • .PARITY_NONE: Select no parity.
  • .PARITY_ODD: Select odd parity.
Properties and methods
  • .baud: The serial.baud attribute.
  • .databits: The serial.databits attribute.
  • .flowcontrol: The serial.flowcontrol attribute.
  • .parity: The serial.parity attribute.
  • .read(): The serial.read() function.
  • .write(): The serial.write() function.

FLOW_HARDWARE class-attribute instance-attribute

FLOW_HARDWARE = 'serial.FLOW_HARDWARE'

FLOW_NONE class-attribute instance-attribute

FLOW_NONE = 'serial.FLOW_NONE'

PARITY_EVEN class-attribute instance-attribute

PARITY_EVEN = 'serial.PARITY_EVEN'

PARITY_NONE class-attribute instance-attribute

PARITY_NONE = 'serial.PARITY_NONE'

PARITY_ODD class-attribute instance-attribute

PARITY_ODD = 'serial.PARITY_ODD'

baud property writable

baud: str

Access the serial.baud attribute.

Description
  • This attribute configures the baud rate for the RS-232 port.
Usage
  • Accessing this property will send the print(serial.baud) query.
  • Setting this property to a value will send the serial.baud = value command.
TSP Syntax
- serial.baud = value
- print(serial.baud)
Raises:

databits property writable

databits: str

Access the serial.databits attribute.

Description
  • This attribute configures character width (data bits) for the RS-232 port.
Usage
  • Accessing this property will send the print(serial.databits) query.
  • Setting this property to a value will send the serial.databits = value command.
TSP Syntax
- serial.databits = value
- print(serial.databits)
Info
  • bits, the an integer representing the character width (7 or 8).
Raises:

flowcontrol property writable

flowcontrol: str

Access the serial.flowcontrol attribute.

Description
  • This attribute configures flow control for the RS-232 port.
Usage
  • Accessing this property will send the print(serial.flowcontrol) query.
  • Setting this property to a value will send the serial.flowcontrol = value command.
TSP Syntax
- serial.flowcontrol = value
- print(serial.flowcontrol)
Raises:

parity property writable

parity: str

Access the serial.parity attribute.

Description
  • This attribute configures parity for the RS-232 port.
Usage
  • Accessing this property will send the print(serial.parity) query.
  • Setting this property to a value will send the serial.parity = value command.
TSP Syntax
- serial.parity = value
- print(serial.parity)
Raises:

read

read(maxchars: str) -> str

Run the serial.read() function.

Description
  • This function reads available characters (data) from the serial port.
TSP Syntax
- serial.read()
Parameters:
  • maxchars (str) –

    An integer that specifies the maximum number of characters to read.

Returns:
  • str

    The result of the function call.

Raises:

write

write(data: str) -> None

Run the serial.write() function.

Description
  • This function writes data to the serial port.
TSP Syntax
- serial.write()
Parameters:
  • data (str) –

    A string representing the data to write.

Raises: