MASSACHUSETTS INSTITUTE OF TECHNOLOGY HAYSTACK OBSERVATORY 18 November 2002

advertisement
MASSACHUSETTS INSTITUTE OF TECHNOLOGY
HAYSTACK OBSERVATORY
WESTFORD, MASSACHUSETTS 01886
Telephone:
Fax:
978-692-4764
781-981-0590
18 November 2002
TO:
FROM:
SUBJECT:
Distribution
A. R. Whitney and J. A. Ball
Mark 5A command set (Revision 1.9)
(Updates from previous revision are in red. All earlier versions of this memo are available in the Mark 5
memo series.)
1. Mark5A program
The commands detailed in this memo are implemented by a program named Mark5A running under Red
Hat Linux on the Mark 5P or Mark 5A system. The details concerning the operation of Mark5A are
available in documents at http://web.haystack.mit.edu/mark5/Mark5.htm (‘Mark 5P test procedures’ for
instructions for using Mark 5A in a simple interactive mode; ‘Mark 5A Software’→’Mark 5A control
program and utilities’ for much more detail).
2. Notes on command set
The following should be noted with respect to the command set:
1. All commands/queries are implemented using the VSI-S communications protocol and
command/response syntax.
2. Commands/queries are case insensitive.
3. Commands designated with ‘*’ are relevant for Mark 5A only and are not implemented for
Mark 5P.
4. Commands marked with ‘NYI’ are not yet implemented.
5. Commands marked with ‘UC’ are under consideration.
6. Commands/queries in brackets (‘[..]’) are secondary names for commands/queries; though
currently still functional, these old names may eventually be dropped.
7. Versions of program ‘Mark5A’ with a revision date earlier than the date on this memo may not
implement all commands indicated in this memo (use ‘DTS_id’ query to get revision date of
current system software – see ‘System Queries and Responses’).
8. Sections in red indicate changes since the last revision of this memo.
1
3. VSI-S Command, Query and Response Syntax
The following explanation of the VSI-S syntax may be useful in understanding the structure of
commands, queries and their respective responses. This explanation has been lifted directly from the
VSI-S specification.
3.1 Command Syntax
Commands are of the form
<keyword> = <field 1> : <field 2> : …. ;
where <keyword> is a VSI-S command keyword. The number of fields may either be fixed or
indefinite; fields are separated by colons and terminated with a semi-colon. A field may be of type
decimal integer, decimal real, integer hex, character, literal ASCII or a special ‘time’ code (see Section
7.2). White space between tokens in the command line is ignored. VSI-S keywords are listed in Section
9.
3.2 Command-Response Syntax
Each command elicits a response of the form
!<keyword> = < return code > [:<DTS-specific return> :….] ;
where
<keyword> is the command keyword
<return code> is an ASCII integer as follows:
0 - action successfully completed
1 - action initiated or enabled, but not completed
2 - command not implemented or not relevant to this DTS
3 - syntax or parameter error
4 - error encountered
5 - currently too busy to service request; try again later
6 - inconsistent or conflicting request1
<DTS-specific return> - one or more optional fields specific to the particular DTS, following the
standard fields defined by VSI-S; fields may be of any type, but should be informative about the
details of the action or error.
3.3 Query and Query-Response Syntax
Queries are of the form
<keyword>?;
with a response of the form
!<keyword> ? <field 1(return code)> : <field 2> : <field 3> : …: [<DTS-specific
return>];
1
For example, it is illegal to attempt to record during playback or position unloaded media.
2
where
<return code> is an ASCII integer as follows:
0 - query successfully completed
1 - action initiated or enabled, but not completed
2 - query not implemented or not relevant to this DTS
3 - syntax or parameter error
4 - ‘error encountered
5 - currently too busy to service request; try again later
3
System Commands
Keyword
Field
#
Description
Type
Allowed values
Default
Comments
char
erase |
mount |
dismount
None
’erase’ intiates the setting of record and playback pointers to zero (i.e. beginning
of media), effectively erasing media;
’mount’ initiates a disk mount request for newly inserted disks;
’dismount’ initiates the dismounting of the current set of disks;
System is always left in ‘pass-through’ mode after any reset command.
See Note 1.
int
-
-
For use with Mark 4 correlator only: Causes Mark 5 system to listen to only ROT
broadcasts with the corresponding ‘task ID’. See Note 2.
Permanent 8-char VSN analogous to tape VSN, which will survive ‘reset=erase’
command; also permanently logs all serial numbers in disk set.
This command should only be issued once after a disk set is assembled.
reset
1
System reset
task_ID
1
Set task ID
VSN (NYI)
1
Write disk-set VSN to permanent
area
char
-
[1-7]
Start gathering drive-performance
statistics. Optionally, set bin
ranges to custom values
time
0.001125s
0.00225s
0.0045s
0.009s
0.018s
0.036s
0.072s
1
Data mode
char
mark4 |
vlba |
st |
tvg
st
‘mark4’ or ‘vlba’: strips and restores parity bits.
st – (‘straight-through’ mode) records 32 input ‘tracks’ directly (ala Mark 5P)
tvg – takes data from internal TVG.
See Notes 4-7.
2
# tracks
int
8 | 16 | 32 | 64
32
Relevant only for ‘mark4’ or ‘vlba’ mode
start_stats
mode*
Clears and restarts gathering of drive statistics. See Note 3.
Seven optional values define 8 bins corresponding to drive-response (i.e.
transaction completion) times; values must increase monotonically; a separate set
of bins is maintained for each mounted drive. The count in a bin is incremented
according to the following rules, where ‘t’ is drive-response time of a single read or
write transaction:
Bin 0: t<t0
Bin 1: t0<t<t1
.
Bin 6: t5<t<t6
Bin 7: t>t6
Notes:
1. An ‘erase’ completes almost instantly; a ‘mount’ command takes about 12 seconds; a ‘dismount’ command takes about 3 seconds. After a dismount
completes, almost all commands return a return code of 4 (soft error) because the disks have been effectively disconnected from the software.
2. ‘task_ID’ command is used in conjunction with the ‘play’ command for accurate synchronization of Mark 5 playback-start with correlator ROT clock.
3. By default, drive statistics are cleared and re-started whenever a new disc set is mounted. Read drive statistics with ‘get_stats’ query. Bin values are
common for all drives. Each count within a bin represents a transfer of 65528 bytes (216-8).
4. The tracks expected from a Mark4 or VLBA formatter in the various modes are as follows:
mode
‘mark4’ or ‘vlba’:8 tks
‘mark4’ or ‘vlba’:16 tks
‘mark4’ or ‘vlba’:32 tks
‘mark4’ or ‘vlba’:64 tks
‘st’
5.
6.
7.
Recorded formatter track#’s
2-16 even (headstack 1)
2-33 even (headstack 1)
2-33 all (headstack 1)
2-33 (headstacks 1 and 2)
2-33 all (headstack 1)
FPDP bit streams
Trk 2 to FPDP streams 0,8,16,24; trk 4 to 1,9,17,25; etc.
Trk 2 to FPDP streams 0,16; trk 4 to 1,17; etc.
Correspond to FPDP bit streams 0-31, respectively
Trks 2 from both hdstks mux’ed to FPDP bit stream 0, etc.
Correspond to FPDP bit streams 0-31, respectively; only mode for Mark 5P
In ‘mark4’ or ‘vlba’ mode, the Mark 5A strips parity on record and restores it on playback to save storage space. In ‘st’ (‘straight-through’) mode, the input
data are recorded and played back with no processing (same as Mark 5P).
The ‘mode=’ command sets both the input and output modes to be as specified.
If in ‘tvg’ mode, TVG is operated at clock-rate set by ‘play_rate’ command.
4
Record Commands
Keyword
Field
#
record
1
[2]
Description
Type
Allowed values
Default
char
on | off
-
‘on’ automatically appends to end of existing recording; ‘pass-through’ is active;
’off’ stops recording, leaves system in ‘pass-through’ mode. See Note 4.
literal
ASCII
max 63 chars
-
Optional; relevant only if field 1 is ‘on’;
No checking is done for duplicate scan names
Record on/off
Scan name
Comments
Notes:
1. After record is turned ‘on’, the user should periodically query general ‘status?’ for details; if recording stops on its own accord (due to end-of-media, etc.),
this will be reflected in the response to the ‘status?’ query as ‘recording stopped’, and a ‘record?’ query will show the status as ‘halted’; a subsequent
command to turn record ‘off’ or ‘on’ will reset the relevant bits (5-4) in the ‘status?’ response.
Playback Commands
Keyword
play
Field
#
Description
1
Start/stop playback
2
Playback pointer (bytes)
[3]
ROT clock reading
Type
Allowed values
Default
Comments
char
on | off
-
‘on’ – causes playback to start at position specified by field 2-4.
If fields 2-4 are null, resumes playback from current playback pointer;
’off’ = stops playback (if active) and unconditionally updates playback
pointer to current play position or, if fields 2-4 are non-null, to the
position specified. See also Note 1.
Cannot be issued while ‘record’ is ‘on’ (error).
int
null | >=0
null
If non-null, overrides fields 3 and 4.
Absolute byte number in recorded data stream; if Fields 2-4 all null, defaults
to current playback pointer value. Also see Note 2.
time
-
-
Cause play to start at specified ROT clock time; for use with Mark 4
correlator only.
-
-
-
Sets play pointer to beginning of ‘scan_set’ scan and begins playing.
Stops automatically at end of scan with play pointer updated to stop position.
May also be stopped by ‘play=off’ command; play pointer is updated to stop
position. Does not affect ‘scan_set’ value (unlike ‘scan_check’ query).
‘data’ – set output data rate per track(not including parity) to specified value.
’clock’ – set output clock rate (including parity) to specified value.
’clockgen’ – set clock generator chip to specified frequency.
’ext’ – external clock select
See also Note 3
scan_play (UC)
-
Play scan specified by current
‘scan_set’ value
play_rate*
1
Playback rate reference
char
data |
clock |
clockgen |
ext
clock
2
Rate (MHz)
real
>=0
9 MHz
skip
1
Skip forward/backward specified
number of bytes while playing
int
multiple of 8;
see Note 4
-
track_select
-
Selected tracks to be sent to the Mark
4 formatter or VLBA DQA.
1
First track – sent back to
DQA/decoder chan A; track checked
with ‘track_check’ command
>0 – set rate to specified value; freq resolution ~20 mHz; 40 MHz max
If in ‘tvg’ mode, sets on-board TVG clock rate; see Note 4.
>0 – skip forward; <0 – skip backward; must be multiple of 8 bytes
Used to synchronize data to correlator – see Note 5.
If not playing, increments start-playback position.
Note: For Mark 5P: Tracks 3 and 2 are permanently selected for monitoring
and cannot be changed; field 1 selects track for use with ‘track_check’ cmd
int
2-33 (hdstk 1)
102-133 (hdstk 2)
5
15
Default is headstack 1; add 100 for headstack 2, if present.
Track numbers are ‘VLBA’; 2-33 for headstack 1; 102-133 for headstack 2.
If null, current value is maintained.
2
scan_set
[set_scan]
Second track – sent back to
DQA/decoder chan B
int
2-33 (hdstk 1)
102-133 (hdstk 2)
16
Set scan pointer for subsequent
‘scan_play’, ‘scan_check’ or
‘scan_dir’ command/query.
1
Scan name or number
2
Set play pointer as prescribed
Default is headstack 1; add 100 for headstack 2, if present.
Track numbers are ‘VLBA’; 2-33 for headstack 1; 102-133 for headstack 2.
If null, current value is maintained.
Does not affect current play pointer unless field 2 is non-null
int or
literal
ASCII
null | >0 |
scan name
last
recorded
scan
Will first attempt to match to existing scan name, then will try to interpret as
scan number (first scan is number 1). If null, defaults to last fully recorded
scan (e.g. if recording is in progress, defaults to previous scan).
char
s|c|e
null
If non-null, set play pointer to ‘start’, ‘center’ or ‘end-1MB’ of scan; this is
convenient if you want to do a subsequent ‘data_check’ or ‘track_check’ at
the prescribed position. If ‘null’, play pointer is not affected.
Notes:
1. After playback is turned ‘on’, the user should periodically query general ‘status?’ for details; if playback stops on its own accord (due to end-of-media, etc.),
this will be reflected in the response to the ‘status?’ query as ‘playback stopped’, and a ‘play?’ query will show the status as ‘off’; a subsequent command to
turn play ‘off’ or ‘on’ will reset the relevant bits (9-8) in the ‘status?’ response.
2. Note that record/playback pointers may have values as large as ~2x1013 (~44 bits), so pointer arithmetic must be handled appropriately.
3. The ‘data’ option is relevant only for formatted VLBI data and represents the average rate of the data itself; the clock generator frequency will normally be
set to 9/8 of this rate. The playback clock rate differs from the clock generator rate only in the case of 64-track ‘mark4’ or ‘vlba’ mode, where the clock
generator frequency is twice the output clock rate. The clock generator is settable from 0 to 40 MHz in ~23 mHz steps. The maximum output clock rate
depends on the number of number of active disks; typically, the maximum aggregate data rate is ~140 Mbps times the number of disks.
4. The on-board TVG is driven by the same clock generator that sets the output clock rate during playback. Therefore, when ‘tvg’ mode is active in
bypass/record, the TVG is driven at the clock generator frequency.
5. During playback, the ‘skip’ command will synchronously skip over a prescribed amount of data, either positive or negative, and is intended for
synchronizing the data during playback at the correlator. A skip of any size may be requested, however the actual skip executed is limited to be within the
data currently within the SS on-board 512MB buffer; the size of the actual executed skip can be determined with a subsequent ‘skip?’ query. Subsequent
‘skip’ commands can then be used to make up the remainder of the total desired skip, if necessary. During normal playback, a maximum forward or
backward skip of ~256MB is possible (except immediately after starting playback and possibly after a preceding large skip), which corresponds to ~2
seconds of data at 1 Gbps and longer at slower playback rates. Normally, it should be possible to control the position and timing of the start of playback so
that skips larger than the available buffer size are not necessary.
System Queries and Responses (Note: Returned Field 1 is always the query return code – see Section 3.3)
Keyword
mode*
Returned
Field
#
Description
Type
Comments
2
Data mode
char
mark4 | vlba | st | tvg
’mark4’ and ‘vlba’ modes remove parity before recording.
3
Track mode
int
8 | 16 | 32 | 64 : Relevant for ‘mark4’ or ‘vlba’ mode only:
4
Sync’ed?
5
# of sync attempts
char
int
Relevant for ‘mark4’ or ‘vlba’ modes only:
‘s’ –output section of I/O board has properly sync’ed to formatter frames.
’-‘ – output secion of I/O board unable to properly sync to formatter frames
Relevant only for ‘mark4’ and ‘vlba’ modes only. Should be zero or small number. See Note 1
6
DTS_id
2
System ID
3
Revision level
4
Media type
int
1 – magnetic disk
status
2
General status query
hex
Bit 0 – system ‘ready’
Bit 1 – error message(s) pending; (use ‘error’ query for details of error); messages may be queued;
cleared by ‘error’ command that empties message queue
Bit 2 – not used
Bit 3 – one or more ‘delayed-completion’ commands are pending
Bit 4 – one or more ‘delayed-completion’ queries are pending
Bit 5 – not used
Bits 7-6: 00 – record ‘off’
01 – record ‘on’
10 – recording stopped (end of media)
Bits 9-8: 00 – playback ‘off’
01 – playback ‘on’
10 – playback stopped (end of data)
error
2
Get error number/message
int
Error number associated with ‘status’ bit 1
3
position
literalASCII
time
literal ASCII
‘mark5-xx’ where xx is a system serial number
Date stamp on current version of Mark 5 software
Associated error message
2
Current record pointer (bytes)
int
If stopped, returns position at which ‘record=on’ command will begin recording (always appends to existing);
if recording, returns current record position.
3
Current playback pointer (bytes)
int
If stopped, returns position at which ‘playback=on;’ command will begin playing;
Can never be greater than current record position.
int
Null returned for empty slot
disk_size
[disc_size]
2-17
Individual disk sizes (bytes)
disk_serial
[disc_serial]
2-17
Individual disk serial numbers
literal ASCII
Null returned for empty slot
disk_model
[disc_model]
2-17
Individual disk model numbers
literal ASCII
Null returned for empty slot
start_stats
2-8
Get bin values for statistics
get_stats
Get drive-performance statistics
2
3-10
VSN (NYI)
time
2
3-18
Returns current bin-definition values (see ‘start_stats’ command in ‘System Commands’ for details).
Each subsequent ‘get_stats?’ query returns current performance statistics for the next mounted drive; recycles
through mounted drives. Bin counts are not cleared. See details in notes on ‘start_stats’ command.
Drive number
int
0=0M, 1=0S, 2=1M, 3=1S,….,14=7M, 15=7S
Binned drive-transaction times
int
Each bin contains number of drive transactions falling in its range (see ‘start_stats’ command for explanation)
Permanent VSN
char
8-char permanent VSN
Mismatching serial numbers
char
Null for each disk position with matching logged serial number;
Reports logged serial number for each disk position with serial number mismatch.
SS_rev1
2
StreamStor firmware/software
revision, part 1
literal ASCII
Primarily for diagnostic purposes
SS_rev2
2
StreamStor firmware/software
revision, part 2
literal ASCII
Primarily for diagnostic purposes
7
OS_rev1
2
OS software info, part 1
literal ASCII
Primarily for diagnostic purposes
OS_rev2
2
OS software info, part 2
literal ASCII
Primarily for diagnostic purposes
Notes:
1. The ‘# of sync attempts’ returned value in the ‘mode=’ command counts the number of sync attempts the Mark 5A I/O board output section had to make
before parity-stripped data (‘mark4’ or ‘vlba’) was re-sync’ed, as necessary for parity re-insertion. A large number indicates a problem, perhaps in the
output clock or the data itself. The counter is reset to zero on a subsequent ‘mode=’ command.
Record Queries and Responses (Note: Returned Field 1 is always the query return code – see Section 3.3)
Keyword
record
Returned
Field
#
Description
2
Recording status
3
Scan number
[4]
Type
char
int
Scan name (if assigned)
Comments
‘on’ | ‘off’ | ‘halted’; ‘halted’ indicates end-of-media was encountered while recording.
First scan is number 1. On ‘record=off’ command, scan number is automatically incremented.
literal ASCII
Playback Queries and Responses (Note: Returned Field 1 is always the query return code – see Section 3.3)
Keyword
Returned
Field
#
Description
Type
Comments
play
2
Playback status
char
‘on’ – playback active
‘off’ – playback inactive
‘halted’ – playback stopped due to reaching end of recording
’waiting’ – delayed start of playback (special mode for correlator only)
play_rate*
2
Data rate (Mbps/track)
real
Data-rate per track (see ‘play_rate’ command); =0 if external clock selected
3
Clock rate (MHz)
real
Actual clock rate
4
Clock generator frequency (MHz)
real
Frequency of on-board clock-generator chip
2
Scan number
3
Scan name (if assigned)
4
Total #scans
int
#scans recorded
skip
2
Actual value of skip executed
int
See Note 4 in ‘Playback Commands’ relating to ‘skip’ command
track_select
2
Track selected to Decoder chan A
int
Default is headstack 1; add 100 for headstack 2. See Note 1 for allowable tracks.
This track is also used by the ‘track_check’ query.
3
Track selected to Decoder chan B
int
Default is headstack 1; add 100 for headstack 2. See Note 1 for allowable tracks.
-
Check data on selected track.
Start at current playback pointer.
2
Data format
scan_set
[set_scan]
track_check
Returns current ‘scan pointer’, which relates only to the ‘scan_play’ command and to the ‘scan_check” and
‘scan_dir’ queries. Does not affect playback pointer.
Attempt to decode recorded data from the first of the two ‘track_select’ tracks. See Notes 2 and 5.
Does not affect playback pointer; will be honored only if record and play are both ‘off’.
char
‘mark4 | vlba | st_mark4 | st_vlba | tvg | SS’;’?’ if format cannot be determined;
fields 3-6 relevant only if ‘mark4’, ‘vlba’, ‘st mark4’ or ‘st vlba’ mode.
8
’tvg’ corresponds to VSI test pattern; SS corresponds to StreamStor test pattern.
data_check
scan_check
3
#tracks
int
4
Data time at next frame header
5
Byte offset
6
Track frame period (time)
7
Total #bytes in SS recording
between track frame headers
int
A useful (if somewhat redundant) number. For Mark 5P or ‘st’ mode: Mk4, will always be
90,000 (i.e. 32*2500*9/8); VLBA, will always be 90,720 (i.e. 32*2520*9/8).
For Mark 5A: Mk4, will be (#trks*2500*9/8); VLBA will be (#trks*2520*9/8), where ‘#trks’ is the ‘track
mode’ (i.e. 8, 16, 32, or 64)
8
# of ‘skipped’ bytes between last
and current ‘track_check’
int
Should be =0 if last and current ‘track_checks’ are within same scan; will be a large number if they span a
scan boundary. See also comments in ‘scan_check’ query.
-
Check data starting at position of
current playback pointer
2
Data format
3
#tracks
4
Data time at next frame header
5
Byte offset
6
Track frame period (time)
7
Total #bytes in SS recording
between track frame headers
int
A useful (if somewhat redundant) number. For ‘st_mark4’ mode: should always be
90,000 (i.e. 32*2500*9/8); for ‘st_vlba’ mode, should always be 90,720 (i.e. 32*2520*9/8).
For ‘mark4’ mode, will be (#trks*2500); for ‘vlba’ mode, will be (#trks*2520), where ‘#trks’ is the ‘track
mode’ (i.e. 8, 16, 32, or 64)
8
# of ‘skipped’ bytes between last
and current ‘data_check’
int
Should be =0 if last and current ‘data_checks’ are within same scan; will be a large number if they span a
scan boundary. See also comments in ‘scan_check’ query.
-
Check scan parameters
2
Scan number
3
Scan name
literal
ASCII
4
Data format
char
time
int
time
8|16|32|64; relevant only if data format is ‘mark4’ or ‘vlba’
Time tag from next ‘track’ frame header beyond current playback pointer
Byte offset from current playback pointer to beginning of next ‘track’ frame header
Time tag difference between adjacent track frames; allows sample-rate determination
Query will be honored only if record and play are both ‘off’; does not affect playback pointer.
See Notes 3 and 5 for additional information.
char
int
time
int
time
‘mark4 | vlba | st_mark4 | st_vlba | tvg | SS’;’?’ if format cannot be determined;
fields 3-7 are relevant only if ‘mark4’, ‘vlba’, ‘st_mark4’ or ‘st_vlba’ mode.
’tvg’ corresponds to VSI test pattern; SS corresponds to StreamStor test pattern.
8|16|32|64; if ‘mode’ is ‘mark4’ or ‘vlba’
Time tag from next ‘track’ frame header beyond current playback pointer
Byte offset from current playback pointer to beginning of next ‘track’ frame header
Time tag difference between adjacent track frames; allows sample-rate determination
Retrieve scan information for scan specified by current ‘scan_set’ value; if return code is 0, automatically
increments ‘scan_set’ to point to next scan (or back to scan 1 after last scan).
Does not affect playback pointer.
Will be honored only if record and play are both ‘off’. See Notes 4 and 5 for additional information.
int
Starts at 1 for first scan on disk set
Same as returned by ‘data_check’
9
5
#tracks
int
Same as returned by ‘data_check’
6
Data time at first frame header
time
7
Length of scan
time
8
Track data rate
real
Excludes parity bits; will always be 0.125, 0.25, 0.5, 1, 2, 4, 8 or 16 (Mbps)
9
# of skipped bytes
int
Should always be =0 for normally recorded data.
>0 indicates bytes have been dropped somewhere within scan
<0 indicates bytes have been added somewhere within scan
Time tag at first frame header in scan
Notes:
2. The selected tracks in the ‘track_select’ command must correspond to formatter output track numbers that are actually recorded in the selected mode, as
follows (see also Mark 5 memo 11.1):
mode
‘mark4’ or ‘vlba’:8 tks
‘mark4’ or ‘vlba’:16 tks
‘mark4’ or ‘vlba’:32 tks
‘mark4’ or ‘vlba’:64 tks
‘st_mark4’ or ‘st_vlba’
tvg
3.
4.
Recorded formatter track#’s
2-16 even (headstack 1)
2-33 even (headstack 1)
2-33 all (headstack 1)
2-33 (headstacks 1 and 2)
2-33 all (headstack 1)
equivalent to tracks 2-33
The ‘track_check?’ query targets the first of the two selected ‘track_select’ tracks and attempts to make sense of that track in the recorded data starting at the
present play-pointer position. The selected track must be recorded, depending on the input mode, as indicated in the table of Note 1 above. Note that the
selected track may have data multiplexed to as many as 4 FPDP bit-streams.
Starting at the present play-pointer position, the ‘data_check?’ query searches through all modes in the table of Note 1 above until it can make sense of the
data, then reports what it has found; ‘mark4’, ‘vlba’, ‘mark4_st’ and ‘vlba_st’ modes must have been recorded data from a VLBA or Mark 4 formatter. In
order for the ‘data_check’ command to be successful with data recorded from a VLBA or Mark 4 formatter, a minimum set of tracks must be recorded
according to the following table:
mode
‘mark4’ or ‘vlba’:8 tks
‘mark4’ or ‘vlba’:16 tks
‘mark4’ or ‘vlba’ or ‘st_mark4’ or ‘st_vlba’:32 tks
‘mark4’ or ‘vlba’:64 tks
5.
6.
FPDP bit streams
Trk 2 to FPDP streams 0,8,16,24; trk 4 to 1,9,17,25; etc.
Trk 2 to FPDP streams 0,16; trk 4 to 1,17; etc.
Correspond to FPDP bit streams 0-31, respectively
Trks 2 from both hdstks mux’ed to FPDP bit stream 0, etc.
Correspond to FPDP bit streams 0-31, respectively; only mode for Mark 5P
TVG data; correspond to FPDP bit streams 0-31, respectively,
Minimum set of Mark4/VLBA tracks that must be active
2-16 even (headstack 1)
2-16 even or 18-33 even (headstack 1)
2-9 or 10-17 or 18-25 or 26-33 (headstack 1)
2-9 or 10-17 or 18-25 or 26-33 (headstack 1 or headstack 2)
The ‘scan_check?’ query essentially executes a ‘data_check?’ at the beginning of a scan, followed by a ‘data_check?’ at the end of the scan. This allows
information about the selected scan to be conveniently determined. Successive ‘scan_check?’ queries without an intervening ‘scan_set’ command will
simply increment through the set of recorded scans.
Regarding the ‘data time’ value returned by the ‘data_check?’, ‘scan_check?’ and ‘track_check?’ queries: The Mark 4 time-tags contain the day-of-year
(DOY) but only the final digit of the year; the VLBA time-tags contain, instead, the last 3 digits of the Julian day number (misnamed MJD). To show the
year and DOY in the returned values of ‘data time’ requires some assumptions. For Mark 4, we assume the most recent year consistent with the unit-year
and DOY written in the Mark 4 time-tag; this algorithm reports the proper year provided the data were taken no more than 10 years ago. For VLBA, we
assume the most recent Julian Day Number (JDN) consistent with the last 3 digits available in the VLBA time-tag; this algorithm reports the proper year
provided the data were taken no more than 1000 days ago.
10
Scan Directory Queries and Responses (Note: Returned Field 1 is always the query return code – see Section 3.3)
Keyword
dir_info
scan_dir
[next_scan]
Returned
Field
#
Description
Type
Comments
2
Number of scans in directory
int
Resets directory pointer to zero (i.e. subsequent ‘scan_dir’ query will retrieve first directory entry)
3
Total bytes recorded
int
4
Total bytes available
int
-
Retrieve scan directory information
2
Scan number
3
Scan name
4
Start byte position
int
Absolute byte position of start of this scan
5
End byte position
int
Absolute byte position of end of this scan
Sum of total available disk space (unrecorded plus recorded)
Retrieve directory information for scan specified by preceding ‘scan_set’ command; after execution,
automatically increments to next scan (or back to scan 1 after last scan)
int
Scan numbers start at 1
literal
ASCII
Note: The scan directory is automatically appended each time data are recorded to the disks (added after end of recording; length 81952 bytes).
e-VLBI Commands
Keyword
net2disk
[net2disc]
Field
#
1
[2]
Description
Enable data transfer from
network to disks
Scan name
Type
Allowed values
Default
char
open |
close
-
literal
ASCII
Comments
‘open’ socket; ’close’ socket
See Notes 1-4
Option scan name to be assigned to this data; defaults to previously specified
name or, if none, to ‘net2disk’ or ‘net2disc’.
net2out
1
Enable data transfer from
network to VLBI data output;
bypass disks
char
open |
close
-
‘open’ socket;
’close’ socket
See Notes 1-4
in2net
1
Control direct data transfer from
VLBI data input to network;
bypass disks
char
connect |
on |
off
disconnect
-
‘connect’ – connect to socket on receiving Mark 5 system
‘on’ – start data transfer
’off’ – end data transfer
’disconnect’ – disconnect socket
See Notes 1-4
2
If field 1 is ‘connect’: hostname
of receiving system
char
-
-
Required only on first ‘connect’; optional thereafter
11
disk2net
[disc2net]
1
Control data transfer of prerecorded from disks to network
char
connect |
on |
disconnect
-
‘connect’ – connect to socket on receiving Mark 5 system
‘on’ – start data transfer
’disconnect’ – disconnect socket
See Notes 1-4
2
If field 1 is ‘connect’: hostname
of receiving system
char
-
-
Required only on first ‘connect; optional thereafter
2
If field 1 is ‘on’: startbyte#
int
-
0
Specifies first disk byte# to send;
if not specified, value usec in previous ‘disk2net’ command is assumed.
3
If field 1 is ‘on’: endbyte#
int
-
-
Specifies last disk byte# to send;
if not specified, value used in previous ‘disk2net’ command is assumed.
net2file
(NYI – see Note 5)
1
Enable data transfer from
network to Linux file
char
open |
close
file2net
(NYI – see Note 5)
1
Control data transfer from Linux
file to network)
char
connect |
on |
disconnect
-
Analog of ‘disk2net’ command; entire file will be transferred.
‘connect’ – connect to socket on receiving Mark 5 system
‘on’ – start data transfer
’disconnect’ – disconnect socket
Function will also be implemented in a standalone program; see Note 5.
2
If field 1 is ‘connect’: hostname
of receiving system
char
-
-
Required only on first ‘connect; optional thereafter
2
If field 1 is ‘on’: source file
name
literal
ASCII
max 63 chars
-
File name must include path if not default.
Scan or file name will be same on destination machine.
3
If field 1 is ‘on’: startbyte# in
file to send
int
-
0
Specifies first file byte# to send;
if not specified, value used in previous ‘file2net’ command is assumed.
4
If field 1 is ‘on’: endbyte# in file
to send
int
-
File size
Specifies last file byte# to send;
if not specified, value used in previous ‘file2net’ command is assumed.
Analog of ‘net2disk’ command.
Function will also be implemented in a standalone program; see Note 5.
Notes:
1. To set up connection: First, issue ‘open’ to the receiving system (‘net2disk=open’ or ‘net2out=open’ to Mark 5; ‘net2file=open’ to Linux file system
host), then issue ‘connect’ to the sending system (‘in2net=connect:..’ or ‘disk2net=connect:…’ to Mark 5; ‘file2net=connect:..’ to Linux file system
host).
2. To start data transfer: Issue ‘on’ to sending system (‘in2net=on’ or ‘disk2net=on’ to Mark 5; ‘file2net=on’ to Linux file system host).
3. To stop data transfer: Issue ‘off’ to the sending system (‘in2net=off’ to Mark 5; ‘file2net=off’ to Linux file system host). A ‘disk2net’ or ‘file2net’
transfer will stop automatically after the specified number of bytes are sent. After each transfer has been stopped or completed, another transfer may be
initiated (see Note 2).
4. To close connection: First, issue ‘disconnect’ to the sender (‘in2net=disconnect’ or disk2net=disconnect’ to Mark5’; ‘file2net=disconnect’ to Linux file
system host). A ‘disk2net=disconnect’ or ‘file2net=disconnect’ command issued before the specified number of bytes are transferred will abort the
transfer and close the connection. Then, ‘close’ the receiver (‘net2disk=close’ or ‘net2out=close’ to Mark 5; ‘net2file=close’ to Linux file system host).
After a ‘net2disk’ or ‘net2file’ transfer, the data on disk are not ready for use until after a ‘net2disk=close’ or ‘net2file=close’ command has been issued.
5. The functionality of the ‘net2file’ and ‘file2net’ commands are implemented in standalone programs that can be used on any Linux and certain other
(HP-UX, for example) machines. There are no current plans to implement these functions as part of the Mark 5A control program.
12
e-VLBI Queries and Responses (Note: Returned Field 1 is always the query return code – see Section 3.3)
Keyword
Retur
ned
Field
#
in2net
disk2net
[disc2net]
net2disk
[net2disc]
net2out
Description
Type
Values
char
inactive |
waiting |
sending
int
-
char
inactive |
waiting |
active
2
in2net status
3
For ‘sending’ only; #bytes sent since ‘on’
2
disk2net status
3
For ‘active’ only; start byte#
int
-
4
For ‘active’ only; current byte#
int
-
5
For ‘active’ only; endbyte#
int
-
2
net2disk status
char
inactive |
active |
waiting
3
Scan name (if field 2 is ‘active’ or ‘waiting’)
2
net2out status
Comments
Transfer is done when current byte# is same as endbyte#
literal
ASCII
char
inactive |
active |
waiting
Local Transfer Commands
Keyword
disk2file
[disc2file]
Field
#
1
Linux file name (destination)
2
3
[4]
file2disk
[file2disc]
Description
1
Type
Allowed values
Default
literal
ASCII
save.data
Start byte#
int
0
End byte#
int
1000000
Option
Linux file name (source)
char
w|a
a
literal
ASCII
save.data
Comments
Initiate data transfer from SS to local Linux file;
file name must include path if not default
Absolute byte number
w – create file if necessary, or erase (truncate at 0) existing file.
a – create file if necessary, or append to existing file (c.f., fopen()).
Initiate data transfer from local Linux file to SS;
file name must include path if not default
[2]
Start byte#
int
0
Absolute byte number; if unspecified, assumed to be zero
[3]
End byte#
int
0
If =0, will copy to end of file
[4]
Scan name
literal
ASCII
max 63 chars
13
Source
file name
Scan name to be saved to scan directory
Local Transfer Queries and Responses (Note: Returned Field 1 is always the query return code – see Section 3.3)
Keyword
Returned
Field
#
disk2file
[disc2file]
2
Status (active/inactive)
3
Linux file name (destination)
4
Start byte#
int
Start byte number
5
‘Now’ byte#
int
Current byte number
6
End byte#
int
End byte number
7
Option
char
w|a
2
Status (active/inactive)
char
active |
inactive
3
Linux file name (source)
4
Start byte#
int
Start byte number
5
‘Now’ byte#
int
Current byte number
6
End byte#
int
End byte number
7
Scan name
literal
ASCII
file2disk
[file2disc]
Description
Type
Values
char
active |
inactive
Comments
Current status of transfer
literal
ASCII
Current status of transfer
literal
ASCII
Scan name to be written to Mark 5 directory
General Notes
1. Only one data transfer activity may be active at any given time. That is, among ‘record=on’, ‘play=on’, ‘in2net=..’,
‘disk2net=..’, ‘net2disk=..’, ‘net2out=..’, ‘disk2file’=..’, ‘file2disk=..’, ‘data_check?’ and ‘track_check?’ ‘scan_check?’, only
one may be active at any given time.
*
Implemented in Mark 5A only
14
Download