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

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