Main Content

vita49Reader

VITA 49 file reader

    Description

    The vita49Reader object reads and decodes the VMEbus International Trade Association (VITA) 49 packets from the input VITA 49 file. The object reads both signal data packets and context packets.

    Creation

    Description

    example

    vita49ReaderObj = vita49Reader(filename) creates a VITA 49 file reader object to read the packets from the input VITA 49 file.

    vita49ReaderObj = vita49Reader(filename,OutputTimestampFormat="datetime") sets the OutputTimestampFormat property to "datetime".

    Input Arguments

    expand all

    Name of a VITA 49 file, including the extension, specified as a character vector or a string scalar.

    Data Types: char | string

    Properties

    expand all

    Output format for the packet timestamp, specified as "seconds" or "datetime". This value specifies the timestamp of the decoded VITA 49 packet.

    Data Types: char | string

    This property is read-only.

    Total number of packets read, stored as an integer scalar.

    Data Types: double

    Object Functions

    readRead next VITA 49 packet from file
    resetReset VITA 49 file reader to first VITA 49 packet of file

    Examples

    collapse all

    Create a VITA 49 file reader object, specifying the name of a VITA 49 file and an output format for the packet timestamp.

    vita49ReaderObj = vita49Reader("VITA49SampleData.bin");
    vita49ReaderObj.OutputTimestampFormat = "seconds";

    Specify the number of packets to be read from the file.

    numpkt = 11;

    Read the specified number of packets from the VITA 49 file to the MATLAB® workspace.

    [signalDataPacket,contextPacket,contextPacketChangeIndex] = read(vita49ReaderObj,NumPackets=numpkt)
    signalDataPacket = struct with fields:
                      PacketType: 1
                        StreamID: 0
                         ClassID: "7C386C0000"
                     PadBitCount: 0
            IntegerTimestampType: "GPS"
           IntegerTimestampValue: 1625215654
         FractionalTimestampType: "real time"
        FractionalTimestampValue: 900000344000
                        RawBytes: [1472x1 uint8]
                       IQSamples: [361x1 double]
                         Trailer: [1x1 struct]
    
    
    contextPacket=1×10 struct array with fields:
        PacketType
        StreamID
        ClassID
        IntegerTimestampType
        IntegerTimestampValue
        FractionalTimestampType
        FractionalTimestampValue
        RawBytes
        ContextFieldChangeIndicator
        ReferencePointIdentifier
        Bandwidth
        IFReferenceFrequency
        RFFrequency
        RFFrequencyOffset
        IFBandOffset
        ReferenceLevel
        Gain
        OverRangeCount
        SampleRate
        TimestampAdjustment
        TimestampCalibrationTime
        StateAndEventIndicator
        SignalDataPayloadFormat
          ⋮
    
    
    contextPacketChangeIndex = 1×10
    
         0     0     0     0     0     0     0     0     0     1
    
    

    Extended Capabilities

    Version History

    Introduced in R2022b