Main Content

matlabshared.targetsdk.SerialInterface Class

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

Serial interface connected to hardware

Description

Use the SerialInterface class to represent a serial interface on the hardware and used for processor-in-the-loop (PIL) and external mode.

Creation

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

Input Arguments

expand all

Name of a serial interface, specified as a character vector or string scalar.

This argument sets the Name property as a character vector.

Data Types: char | string

Properties

expand all

Name of a SerialInterface object, specified as a character vector or string scalar.

Data Types: char | string

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 a cell array of integers.

Data Types: cell

Default port for the serial interface, specified as a character vector or string scalar.

Data Types: char | string

Available ports for the serial interface, specified as a cell array of character vectors.

Data Types: cell

Version History

Introduced in R2015a