Main Content

matlabshared.targetsdk.SerialInterface Class

Namespace: matlabshared.targetsdk
Superclasses: matlabshared.targetsdk.IOInterface

Serial interface connected to hardware

Description

A SerialInterface object represents a serial interface on the hardware and used for PIL and external mode.

Construction

H = SerialInterface(interfaceName) returns a SerialInterface object, H, with the Name property set to the string interfaceName.

Input Arguments

expand all

Name of a serial interface, specified as a string.

Data Types: char

Properties

expand all

Name of a SerialInterface object, specified as a string.

Data Types: char

Default baud rate for the serial interface, specified as an integer. The default is 115200.

Data Types: double

Available baud rates for the serial interface, specified as an array of integers. The default is {115200}

Data Types: double

Default port for the serial interface, specified as a string. Default is 'COM1'.

Data Types: char

Available ports for the serial interface, specified as a cell array of strings. Default is {'COM1'}

Data Types: cell

Version History

Introduced in R2015a