Main Content

io.reader Class

Namespace: io

Base class used to define custom variable or file reader for Simulation Data Inspector

Since R2020b

Description

Use the io.reader base class to specify how to import custom variable and file formats into the Simulation Data Inspector. Write a class definition file that uses the io.reader methods to specify how to extract information like time and data values from the variable or file. Use this syntax as the first line in the class definition file to inherit from the io.reader class, where MyReader is the name of your subclass:

classdef MyReader < io.reader

For an example that shows how to write and use a custom file reader, see Import Data Using Custom File Reader.

For an example that shows how to write and use a custom workspace data reader, see Import Workspace Variables Using a Custom Data Reader.

The io.reader class is a handle class.

Class Attributes

Abstract
true
HandleCompatible
true

For information on class attributes, see Class Attributes.

Properties

expand all

Name of imported file when using the subclass to import a file, specified as a character array.

Example: 'MyCustomFile'

Attributes:

GetAccess
public
SetAccess
public

Name of imported variable or signal, specified as a character array.

Example: 'MyVar'

Attributes:

GetAccess
public
SetAccess
public

Imported variable. The VariableValue property has the same data type as the variable in the workspace or file. Use the VariableValue property to access the variable data inside method definitions.

Example: MyVar

Attributes:

GetAccess
public
SetAccess
public

Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64 | logical | char | string | struct | enumerated | bus | table | cell | categorical | datetime | duration | calendarDuration | fi

Methods

expand all

Version History

Introduced in R2020b