MASSACHUSETTS INSTITUTE OF TECHNOLOGY HAYSTACK OBSERVATORY 24 December 2002

advertisement
MASSACHUSETTS INSTITUTE OF TECHNOLOGY
HAYSTACK OBSERVATORY
WESTFORD, MASSACHUSETTS 01886
Telephone:
Fax:
978-692-4764
781-981-0590
24 December 2002
TO:
FROM:
SUBJECT:
Distribution
A. R. Whitney and J. A. Ball
Mark 5A command set (Revision 2.1)
(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 cause the system to take some action and 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 error
4 - error encountered during attempt to execute
5 - currently too busy to service request; try again later
6 - inconsistent or conflicting request1
7 - no such keyword
8 - parameter error
<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 return information about the system and are of the form
<keyword> ? <field 1> : <field 2> : …. ;
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 error
4 - ‘error encountered during attempt to execute query
5 - currently too busy to service request; try again later
6 - inconsistent or conflicting request
7 - no such keyword
8 - parameter error
9 - indeterminate state
4.0 Mark 5A Command Set
This section contains a list of the commands/queries and their responses for the Mark 5P and Mark 5A
systems.
3
4.1 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 ‘bypass’ 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 module.
This command should only be issued once after a module is assembled.
reset
1
System reset
task_ID
1
Set task ID
VSN (NYI)
1
Write module 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-8.
2
# tracks
int
8 | 16 | 32 | 64
32
Relevant only for ‘mark4’ or ‘vlba’ mode
char
mark4 |
vlba |
st |
tvg
-
int
8 | 16 | 32 | 64
-
start_stats
mode*
[3]
For diagnostic use only: force
Output Section to this mode
[4]
For diagnostic use only: #tracks
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
Fields 3 and 4 are for diagnostic use only:
Forces the Output Section of the Mark 5A I/O board into this specified mode;
Input Section is configured according to Fields 1 and 2.
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 ‘mode=’ command sets both the input and output modes to be as specified.
5. 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).
4
6.
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’
7.
8.
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’ mode, the station ID must be an even number. Attempting to record in ‘mark4’ mode with an odd station ID will result in an error.
If in ‘tvg’ mode, TVG is operated at clock-rate set by ‘play_rate’ command.
4.2 Record Commands
Keyword
Field
#
record
Description
1
Record on/off
[2]
Scan name
Type
Allowed values
Default
Comments
char
on | off
-
‘on’ automatically appends to end of existing recording; ‘bypass’ is active;
’off’ stops recording, leaves system in ‘bypass’ mode. See Note 4.
literal
ASCII
max 63 chars
(no spaces)
-
Optional; relevant only if field 1 is ‘on’;
No checking is done for duplicate scan names
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.
4.3 Playback Commands
Keyword
play
Field
#
1
Start/stop playback
2
Playback pointer (bytes)
[3]
scan_play
Description
-
ROT clock reading
Play scan specified by current
‘scan_set’ value
Type
Allowed values
Default
Comments
char
on | off
-
‘on’ – causes playback to start at position specified by fields 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).
In all play modes, all 64 output tracks are active; if fewer than 64 tracks were
recorded, the recorded track set is duplicated to unused output tracks.
int
null | >=0
null
Absolute byte number in recorded data stream; if Fields 2 and 3 are both 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).
5
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
-
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
int
2-33 (hdstk 1)
102-133 (hdstk 2)
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
Second track – sent back to
DQA/decoder chan B
int
2-33 (hdstk 1)
102-133 (hdstk 2)
16
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.
scan_set
[set_scan]
Scan name or number
2
Set play pointer as prescribed
>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.
See Note 6.
Set scan pointer for subsequent
‘scan_play’, ‘scan_check’ or
‘scan_dir’ command/query.
1
‘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
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 halted, and a ‘play?’ query will show the status as ‘halted’; 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 record/playback data
rate is a function of the number of active disks, as follows (see also Table 1):
1 disk - 128 Mbps
2 disks –256 Mbps
4 disks –512 Mbps
8 disks –1024 Mbps
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.
6
5.
6.
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.
The ‘track_select=’ command may select any two of the 64 output tracks to be sent to the decoder or DQA. However, tracks selected to be examined by the
‘track_check’ query must correspond to actual recorded track numbers; see Note associated with ‘track_check’ query.
4.4 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
2
System ID
3
Revision level
4
Media type
int
1 – magnetic disk
status
2
General status query
hex
Bit 0 – system ‘ready’ (0x00001)
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 (0x0002)
Bit 2 – not used
Bit 3 – one or more ‘delayed-completion’ commands are pending (0x0008)
Bit 4 – one or more ‘delayed-completion’ queries are pending (0x0010)
Bit 5 – not used
Bits 7-6: 00 – record ‘off’
01 – record ‘on’ (0x0040)
10 – recording stopped (end of media) (0x0080)
Bits 9-8: 00 – playback ‘off’
01 – playback ‘on’ (0x0100)
10 – playback halted (end of data) – (0x0200)
error
2
Get error number/message
int
Error number associated with ‘status’ bit 1
DTS_id
3
position
char
int
literalASCII
time
literal ASCII
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
‘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.
7
disk_size
[disc_size]
2-17
Individual disk sizes (bytes)
int
Null returned for empty slot
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
Returns current bin-definition values (see ‘start_stats’ command in ‘System Commands’ for details).
Get drive-performance statistics
2
3-10
VSN (NYI)
time
2
3-18
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
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.
4.5 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]
Scan name (if assigned)
Type
char
int
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
8
4.6 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
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 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 ‘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 ‘missing’ bytes between last
and current ‘track_check’
int
Should be =0 if last and current ‘track_checks’ are within same scan; is meaningless if they span a scan
boundary. See also comments in ‘scan_check’ query. Will return ‘-‘ is selected track is not a ‘primary’
playback track – see Notes 1 and 2.
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
int
time
int
time
‘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.
’tvg’ corresponds to VSI test pattern; SS corresponds to StreamStor test pattern.
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
9
data_check
scan_check
-
Check data starting at position of
current playback pointer
2
Data format
3
#tracks
4
Data time at next frame header
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
‘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
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 missing bytes between last and
current ‘data_check’
int
Should be =0 if last and current ‘data_checks’ are within same scan; is meaningless 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
Same as returned by ‘data_check’
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 missing bytes
int
Should always be =0 for normally recorded data.
>0 indicates #bytes that have been dropped somewhere within scan
<0 indicates #bytes that have been added somewhere within scan
time
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 module
Time tag at first frame header in scan
10
Notes:
1. The selected tracks in the ‘track_select’ command should 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
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
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,
When playing back in a mode with fewer than 64 tracks, groups of tracks are duplicated so that all 64 track outputs are always active, as follows:
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
2.
3.
Primary playback tracks
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 should 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. If the selected track is a ‘duplicated playback track’ (see above table), this is
indicated by returning a ‘-‘ in the ‘# of missing bytes’ field.
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
4.
5.
Duplicated playback tracks
Duplicated to 3-17 odd, 18-32 even, 19-33 even on hdstk1; hdstk2 is duplicate of hdstk1
Duplicated to 2-33 even on hdstk1; hdstk2 is duplicate of hdstk1
Headstack 1 output is duplicated to Headstack 2
None
Headstack 1 output is duplicated to Headstack 2
Headstack 1 output is duplicated to Headstack 2
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.
11
4.7 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
Sum of total available disk space (unrecorded plus recorded)
5
Remaining recording time (seconds)
int
Approximate remaining record time for current ‘mode’ and ‘play_rate’ parameters; see Note 2.
-
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
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:
1. The scan directory is automatically appended each time data are recorded to the disks (added after end of recording; length 81952 bytes).
2. Since recording is controlled by an external clock, the Mark 5 has no knowledge of the record data rate. However, if ‘play_rate’ is set to the same as the
recording rate, the remaining recording time can be estimated.
12
4.8 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
1
Control data transfer of prerecorded data 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.
disk2net
[disc2net]
Analog of ‘net2disk’ command.
Function will also be implemented in a standalone program; see Note 5.
13
Notes:
1. To set up connection: First, issue ‘open’ to the receiving system (‘net2disk=open’ or ‘net2out=open’ to Mark 5; then issue ‘connect’ to the sending
system (‘in2net=connect:..’ or ‘disk2net=connect:…’ to Mark 5).
2. To start data transfer: Issue ‘on’ to sending system (‘in2net=on’ or ‘disk2net=on’ to Mark 5).
3. To stop data transfer: Issue ‘off’ to the sending system (‘in2net=off’ to Mark 5). A ‘disk2net’ 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’). A ‘disk2net=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). After a ‘net2disk’ transfer, the data on disk are not ready for use until after a ‘net2disk=close’
command has been issued.
5. The functionality of the ‘net2file’ and ‘file2net’ commands are implemented in standalone programs ‘Net2file’ and ‘File2net’, which can be used on any
Linux and certain other (HP-UX, for example) machines; see ‘Mark 5A control program and utilities’ at
http://web.haystack.mit.edu/mark5/Software.html. There are no current plans to implement these functions as part of the Mark 5A control program.
4.9 e-VLBI Queries and Responses (Note: Returned Field 1 is always the query return code – see Section 3.3)
Keyword
in2net
disk2net
[disc2net]
net2disk
[net2disc]
net2out
Retur
ned
Field
#
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
literal
ASCII
char
14
inactive |
active |
waiting
Comments
Transfer is done when current byte# is same as endbyte#
4.10 Local Transfer Commands
Keyword
Field
#
disk2file
[disc2file]
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
char
Linux file name (source)
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 (cf., 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
Source
file name
Scan name to be saved to scan directory
4.11 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
15
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.
16
5. Simplified Diagrams of Various Mark 5 Data Transfer Modes
Mark 5
Mark 5
Network
disk2net
SSdisks
disk
net2disk
2net
net2
out
et
in2n
Formatter
I/O Board
SSdisks
disk
net2
in2net
I/O Board
net2out
Correlator
Figure 1: Mark 5 to Mark 5 transfer through network
Mark 5
Other Machine
disk2net
SSdisks
Net2file
OS disk
Formatter
in2net
I/O Board
Net2file
Figure 2: Mark 5 to file transfer through network
Other Machine
Mark 5
File2net
net2disk
File2net
net2out
SSdisks
OS disk
I/O Board
Figure 3: File to Mark 5 transfer through network
Mark 5
disk2file
SSdisks
filetodisk
OS
disk
Figure 4: Internal Mark 5 to file transfer
17
Correlator
6. Disk Requirements and Recording Times
Table 1 shows the minimum number of disks required in each operating mode based on sustained
transfer rate of 25 MB/sec for each disk2. Table 2 shows the recording time per disk at various total
data rates for various common disk capacities.
Data
Mode3
Track
Mode3
‘st’
32
8
‘mark4’
or
’vlba’
16
32
64
Data rate4
(Mbps/track)
2
4
8
16
2
4
8
16
2
4
8
16
2
4
8
16
2
4
8
16
Total data
rate5
(Mbps)
72
144
288
576
16
32
64
128
32
64
128
256
64
128
256
512
128
256
512
1024
Minimum
# of disks
required
1
1
2
3
1
1
1
1
1
1
1
2
1
1
2
3
1
2
3
6
Table 1: Minimum number of disks required in each operating mode
Total data rate
(Mbps)
16
32
64
72
128
144
256
288
512
576
1024
Record time per disk (minutes)
(multiply by #disks for total record time)
120GB disk
200GB disk
300 GB disk
1000.0
1666.7
2500.0
500.0
833.3
1250.0
250.0
416.7
625.0
222.2
370.4
555.6
125.0
208.3
312.5
111.1
185.2
277.8
62.5
104.2
156.3
55.6
92.6
138.9
31.3
52.1
78.1
27.8
46.3
69.4
15.6
26.0
39.1
Table 2: Record time per disk for various total data rates
2
The Western Digital 120GB and 200GB disks commonly used in Mark 5 systems will, if properly operating, actually
sustain ~30MB/sec/disk (240Mbps) over the entire surface of the disk. The WD 120GB sustained-rate capability varies
from ~48MB/sec to ~30MB/sec as the disk fills from the outer to the inner circumference of the platters. The WD 200GB
sustained-rate capability varies from ~56MB/sec to 30MB/sec in the same manner.
3
Set as a parameter in ‘mode’ command.
4
This is the ‘play_rate’ for ‘data’ and also corresponds to the formatter’s track data rate (without parity). The track data
rate is the (channel) sample rate divided by the multiplex ratio (1, 2 or 4).
5
Total data rate recorded/played from disks (includes parity in ‘st’ mode).
18
7. Command/Query Summary by Category
System Commands (Section 4.1)
reset
System reset
task_ID
Set task ID
VSN (NYI)
Write module VSN to permanent area
start_stats
Start gathering drive-performance statistics. Optionally, set bin ranges to custom values
mode
Data mode
Record Commands (Section 4.2)
record
Record on/off
Playback Commands (Section 4.3)
play
Start/stop playback
scan_play
Play scan specified by current ‘scan_set’ value
play_rate
Playback rate reference
skip
Skip forward/backward specified number of bytes while playing
track_select
Selected tracks to be sent to the Mark 4 formatter or VLBA DQA.
scan_set
[set_scan]
Set scan pointer for subsequent ‘scan_play’, ‘scan_check’ or ‘scan_dir’ command/query.
System Queries (Section 4.4)
mode
Data mode
DTS_id
System ID
status
General status query
error
Get error number/message
position
Current record pointer (bytes)
disk_size
[disc_size]
Individual disk sizes (bytes)
disk_serial
[disc_serial]
Individual disk serial numbers
disk_model
[disc_model]
Individual disk model numbers
start_stats
Get bin values for statistics
get_stats
Get drive-performance statistics
VSN (NYI)
Permanent VSN
SS_rev1
StreamStor firmware/software revision, part 1
SS_rev2
StreamStor firmware/software revision, part 2
OS_rev1
OS software info, part 1
OS_rev2
OS software info, part 2
19
Record Queries (Section 4.5)
record
Recording status
Playback Queries (Section 4.6)
play
Playback status
play_rate
Data rate (Mbps/track)
scan_set
[set_scan]
Scan number
skip
Actual value of skip executed
track_select
Selected tracks to be sent to the Mark 4 formatter or VLBA DQA.
track_check
Check data on selected track.
Start at current playback pointer.
data_check
Check data starting at position of current playback pointer
scan_check
Check scan parameters
Scan Directory Queries (Section 4.7)
dir_info
Number of scans in directory
scan_dir
[next_scan]
Retrieve scan directory information
e-VLBI Commands (Section 4.8)
net2disk
[net2disc]
Enable data transfer from network to disks
net2out
Enable data transfer from network to VLBI data output; bypass disks
in2net
Control direct data transfer from VLBI data input to network; bypass disks
disk2net
[disc2net]
Control data transfer of pre-recorded data from disks to network
net2file
Enable data transfer from network to Linux file
file2net
Control data transfer from Linux file to network)
e-VLBI Queries (Section 4.9)
in2net
in2net status
disk2net
[disc2net]
disk2net status
net2disk
[net2disc]
net2disk status
net2out
net2out status
Local Transfer Commands (Section 4.10)
disk2file
[disc2file]
Linux file name (destination)
file2disk
[file2disc]
Linux file name (source)
20
Local Transfer Queries (Section 4.11)
disk2file
[disc2file]
Status (active/inactive)
file2disk
[file2disc]
Status (active/inactive)
8. Command/Query Summary (Alphabetical)
Keyword
Command/
Query
Section
Description
data_check
Q
4.6
Check data starting at position of current playback pointer
dir_info
Q
4.7
Number of scans in directory
disk_model
[disc_model]
Q
4.4
Individual disk model numbers
disk_serial
[disc_serial]
Q
4.4
Individual disk serial numbers
disk_size
[disc_size]
Q
4.4
Individual disk sizes (bytes)
disk2file
[disc2file]
C
4.10
Linux file name (destination)
disk2file
[disc2file]
Q
4.11
Status (active/inactive)
disk2net
[disc2net]
C
4.8
Control data transfer of pre-recorded data from disks to network
disk2net
[disc2net]
Q
4.9
disk2net status
DTS_id
Q
4.4
System ID
error
Q
4.4
Get error number/message
file2disk
[file2disc]
C
4.10
Linux file name (source)
file2disk
[file2disc]
Q
4.11
Status (active/inactive)
file2net
C
4.8
Control data transfer from Linux file to network)
get_stats
Q
4.4
Get drive-performance statistics
in2net
C
4.8
Control direct data transfer from VLBI data input to network; bypass disks
in2net
Q
4.9
in2net status
mode
C
4.1
Data mode
mode
Q
4.4
Data mode
net2disk
[net2disc]
C
4.8
Enable data transfer from network to disks
net2disk
[net2disc]
Q
4.9
net2disk status
net2file
C
4.8
Enable data transfer from network to Linux file
net2out
C
4.8
Enable data transfer from network to VLBI data output; bypass disks
net2out
Q
4.9
net2out status
OS_rev1
Q
4.4
OS software info, part 1
21
OS_rev2
Q
4.4
OS software info, part 2
play
C
4.3
Start/stop playback
play
Q
4.6
Playback status
play_rate
C
4.3
Playback rate reference
play_rate
Q
4.6
Data rate (Mbps/track)
position
Q
4.4
Current record pointer (bytes)
record
C
4.2
Record on/off
record
Q
4.5
Recording status
reset
C
4.1
System reset
scan_check
Q
4.6
Check scan parameters
scan_dir
[next_scan]
Q
4.7
Retrieve scan directory information
scan_play
C
4.3
Play scan specified by current ‘scan_set’ value
scan_set
[set_scan]
C
4.3
Set scan pointer for subsequent ‘scan_play’, ‘scan_check’ or ‘scan_dir’
command/query.
scan_set
[set_scan]
Q
4.6
Scan number
skip
C
4.3
Skip forward/backward specified number of bytes while playing
skip
Q
4.6
Actual value of skip executed
SS_rev1
Q
4.4
StreamStor firmware/software revision, part 1
SS_rev2
Q
4.4
StreamStor firmware/software revision, part 2
start_stats
C
4.1
Start gathering drive-performance statistics.
start_stats
Q
4.4
Get bin values for statistics
status
Q
4.4
General status query
task_ID
C
4.1
Set task ID
track_check
Q
4.6
Check data on selected track.
track_select
C
4.3
Selected tracks to be sent to the Mark 4 formatter or VLBA DQA.
track_select
Q
4.6
Selected tracks to be sent to the Mark 4 formatter or VLBA DQA.
VSN (NYI)
C
4.1
Write module VSN to permanent area
VSN (NYI)
Q
4.4
Permanent VSN
22
Download