File: GlobalDescriptorRecord.java

package info (click to toggle)
jcdf 1.2.5%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 572 kB
  • sloc: java: 5,315; makefile: 198; sh: 98
file content (53 lines) | stat: -rw-r--r-- 1,840 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
package uk.ac.bristol.star.cdf.record;

import java.io.IOException;

/**
 * Field data for CDF record of type Global Descriptor Record.
 *
 * @author   Mark Taylor
 * @since    19 Jun 2013
 */
public class GlobalDescriptorRecord extends Record {

    @CdfField @OffsetField public final long rVdrHead;
    @CdfField @OffsetField public final long zVdrHead;
    @CdfField @OffsetField public final long adrHead;
    @CdfField public final long eof;
    @CdfField public final int nrVars;
    @CdfField public final int numAttr;
    @CdfField public final int rMaxRec;
    @CdfField public final int rNumDims;
    @CdfField public final int nzVars;
    @CdfField @OffsetField public final long uirHead;
    @CdfField public final int rfuC;
    @CdfField public final int leapSecondLastUpdated;
    @CdfField public final int rfuE;
    @CdfField public final int[] rDimSizes;

    /**
     * Constructor.
     *
     * @param  plan   basic record information
     */
    public GlobalDescriptorRecord( RecordPlan plan ) throws IOException {
        super( plan, "GDR", 2 );
        Buf buf = plan.getBuf();
        Pointer ptr = plan.createContentPointer();
        this.rVdrHead = buf.readOffset( ptr );
        this.zVdrHead = buf.readOffset( ptr );
        this.adrHead = buf.readOffset( ptr );
        this.eof = buf.readOffset( ptr );
        this.nrVars = buf.readInt( ptr );
        this.numAttr = buf.readInt( ptr );
        this.rMaxRec = buf.readInt( ptr );
        this.rNumDims = buf.readInt( ptr );
        this.nzVars = buf.readInt( ptr );
        this.uirHead = buf.readOffset( ptr );
        this.rfuC = buf.readInt( ptr );
        this.leapSecondLastUpdated = buf.readInt( ptr );
        this.rfuE = buf.readInt( ptr );
        this.rDimSizes = readIntArray( buf , ptr, this.rNumDims );
        checkEndRecord( ptr );
    }
}