This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

socFileReader

Description

The socFileReader object is a file reader that reads data from a specified TGZ-compressed file and stores the data sets in the object. The data set contains information about the source objects that represent recorded data sources from the specified TGZ-compressed file. The TGZ file format is created by a previous recording session on an SoC hardware board.

Creation

Syntax

fr = socFileReader(filename)

Description

example

fr = socFileReader(filename) creates an object, fr, from the specified file. The object is a file reader that reads data from a specified TGZ-compressed file and stores the data sets in the object. The filename must be a file saved using the save function of an soc.recorder object.

Input Arguments

expand all

File from a previous data recording session on SoC hardware board, specified as a character vector with a tgz extension.

Example: 'UDPDataReceived.tgz'

Properties

expand all

User meta data describing the data set, specified as a character vector. This value is added to the file when you call the save object function.

Data Types: char

Name of the SoC hardware board used for data collection in the soc.recorder object, specified as a character vector.

Data Types: char

User tags, specified as a cell array. This value is added to the file when you call the save object function.

Data Types: cell

Name of recorded data file, specified as a character vector. This value represents the file name of a file saved using the save object function.

Data Types: char

List of sources in data set file, returned as a cell array.

Data Types: cell

Date of data set creation, returned as a character vector.

Data Types: char | string

Object Functions

getDataGet data from file reader

Examples

collapse all

Create a file reader to read data from the specified TGZ-compressed file.

fr = socFileReader('UDPDataReceived.tgz')
fr = 

  socFileReader with properties:

      Description: ''
    HardwareBoard: 'Xilinx Zynq ZC706 evaluation kit'
             Tags: {}
         Filename: 'H:\UDPDataReceived.tgz'
          Sources: {'UDPDataOnPort25000'}
             Date: 28-Dec-2018 15:17:08

Get the data of a specified source from the file using the getData function.

rd = getData(fr,'UDPDataReceived-Port25000');

See Also

|

Introduced in R2019a