User Tools

Site Tools


difx:vdifio

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
difx:vdifio [2015/01/28 12:58]
chrisphillips [VDIFIO Functions]
difx:vdifio [2015/10/21 10:08] (current)
Line 1: Line 1:
 +
 ====== VDIFIO ====== ====== VDIFIO ======
  
Line 121: Line 122:
  
 Set the frame number of channels. Internally VDIF stores this as a power of 2. Set the frame number of channels. Internally VDIF stores this as a power of 2.
 +
 +<code C>
 +void setVDIFBitsPerSample(vdif_header *header, int nbits);
 +</code>
 +
 +Set the number of bits per sample.
 +
  
 <code C> <code C>
Line 127: Line 135:
  
 Set the VDIF Epoch value directly. Set the VDIF Epoch value directly.
 +
 +<code C>
 +void setVDIFFrameEpochSecOffset(vdif_header *header, int epoch);
 +</code>
 +
 +Set the seconds since epoch directly.
 +
  
 <code C> <code C>
Line 218: Line 233:
 Increment the VDIF frame number, incrementing seconds since Epoch as appropriate. ''framepersec'' needs to be passed to correctly wrap the frame counter. Increment the VDIF frame number, incrementing seconds since Epoch as appropriate. ''framepersec'' needs to be passed to correctly wrap the frame counter.
  
 +
 +<code C>
 +int incrementVDIFHeader(vdif_header *header, int framepersec, int64_t inc);
 +</code>
 +
 +Increment the VDIF frame number num "inc" frames incrementing seconds since Epoch as appropriate. inc can be negative and the frames will be reduce by that many frames. 
 +''inc'' can be larger than a second (arbitrarily large). No check is done to check the increment does not overflow the 30bit "seconds" field in the VDIF header. A check is
 +made to ensure the header is not set to a value before the set Epoch.
 +''framepersec'' needs to be passed to correctly wrap the frame counter.
difx/vdifio.txt · Last modified: 2015/10/21 10:08 (external edit)