McIDAS Programmer's Manual
Version 2003

[Search Manual] [Table of Contents] [Go to Previous] [Go to Next]


UC

McIDAS-X User Common.

User Common is a block of data stored in shared memory. Its contents are lost if McIDAS-X stops; otherwise, it retains values that allow for interprocess communication of information usually related to the state of the McIDAS-X session (for example, the number of frames being viewed or the location of the cursor). UC variables with negative subscripts are carried along from the calling process through all spawned processes. UC variables with positive subscripts and UC(0) are available to all tasks that are running whether spawned or not. Words -12 to -1 contain a snapshot of the state taken just before the command begins.

For McIDAS user common Application Program Interfaces (APIs), refer to the API functions list at the end of this section.

Word allocation

Word Description

-123 to -120

current font information

-82

logon initialization flag; 1 = I option used by PC

-58

ending column number in the current MD wind file

-57

ending row number in the current MD wind file

-56

starting row number in the current MD wind file

-55

current MD wind file used for core output

-54

current MD wind file used for imv, selector and core output

-53

element size of the target cursor

-52

line size of the target cursor

-51

space bar toggle

-50

error status word

-46

current TCOL

-45

current TWIN

-44

second cursor state control word; bits 0-2 are not used;
bits 3-5 are cursor color; bits 6-8 are cursor type

-43

second cursor element position

-42

second cursor line position

-41

second cursor element size

-40

second cursor line size

-38

next record pointer for the file created with DEV=F

-37 to -35

the disk file name for the DEV=F file; on the workstation, the file descriptors for the printer or file dataset for sdest, edest and ddest, respectively

-34

current graphics virtual frame; if less than zero, doesn't plot

-33

current diagnostic message (ddest) device: 0 = suppressed;
1 = terminal screen; 2 = local printer; 3 = system printer

-32

current error message (edest) device: 0 = suppressed;
1 = terminal screen; 2 = local printer; 3 = system printer

-31

device for standard text messages: 0 = suppressed;
1 = terminal screen; 2 = local printer; 3 = system printer

-30

auto context table search: 0 = no keyword substitution;
1 = parameter fetching subroutines; for example, CKWP, resort to system string table for missing keyword parameters

-26

0 = program currently running is not a macro
1 = program currently running is a macro

-25

0 = program currently running is background
1 = program currently running is foreground
-1= program currently running is background with Fortran main; can do Fortran I/O
2 = program currently running is a console started task, such as a tape job

-24

current level when starting another process: 0 = scanner;
1 = next program, etc.

-23

number of this initiator

-22

0 = command was not started by the scheduler
1 = command was started by the scheduler

-21

abort signal handling; see word 455

-16

project number the command runs under; may be different from the logged on project number in UC(1)

-13

cursor state control word:
if bits 0-2 = 0, cursor is frozen (PC command)
if bits 0-2 = 1, cursor is controlled by joystick (P)
if bits 0-2 = 2, size/position are joystick controlled (Z)
bits 3-5 are cursor color (DT); bits 6-8 are cursor type (DT)

-12

cursor element position

-11

cursor line position

-10

cursor element size

-9

cursor line size

-8

graphics state control word:
if bit 0 = 1, graphics are connected to loop control (J)
if bit 1 = 1, graphics frame is looping (L)
if bit 2 = 0, graphics frame is blanked (W)

-7

graphics lower bound

-6

graphics upper bound

-5

current graphics frame

-4

frame state control word:
if bit 0 = 1, frame is connected to loop control (Y)
if bit 1 = 1, frame is looping (L)
if bit 2 = 0, frame is blanked (K)

-3

image frame lower bound

-2

image frame upper bound

-1

current image frame

0

user's terminal number

1

project number under which the current user is logged on;
may be different from UC(-16)

2

user's initials

4

current navigation file number

5

current MD file number

6

current grid file number

11

number of lines on the screen; for terminals where all frames are the same size

12

number of elements on the screen; for terminals where all frames are the same size

13

number of image frames

14

number of graphics frames

15

0 = terminal is local ProNET; 1 = terminal is remote bisync;
2 = terminal is asynchronous

16

0 = terminal is nonvideo; 1 = terminal is video;
2 = terminal is host

17

flag for the E key: 0 = lat/lon are displayed in dddmmss;
1 = lat/lon are displayed in decimal

20

set to 1 by the G key

21

set to 1 by the Q key

22

import pointer

37

image display hardware: 6 = X Windows

38

graphics state flag: 0 = no graphics; 1 = draws graphics

39

virtual graphics state flag: 0 = doesn't write virtual graphics;
nonzero = virtual frame to write

46

default graphics line width

47

graphics dash length, in pixels

48

graphics dash gap length, in pixels

49

graphics dash gap color

50

loop control system; consists of the LS command and the A, B, J, Y, O and L keys; images and graphics are connected to and disconnected from the loop system via UC 54 and 59; 1 = loop control system is looping; 2 = not looping

51

current image frame

52

image frame loop, upper bound

53

image frame loop, lower bound

54

1 = image frames are connected to the loop control
0 = image frames aren't connected

55

1 = image frames are visible
0 = image frames are blanked (Alt K)

56

current graphics frame

57

graphics frame loop, upper bound

58

graphics frame loop, lower bound

59

1 = graphics frames connected to loop control
0 = graphics frames not connected

60

1 = graphics frames are visible
0 = graphics frames are blanked (Alt W)

61

cursor size, vertical

62

cursor size, horizontal

63

cursor position, line number

64

cursor position, element number

65

cursor type: 1 = box; 2 = crosshair; 3 = box and crosshair;
4 = solid box; 5 = star wars

66

cursor color (0 - 7)

67

joystick 1: 0 = disconnected; 1 = controls cursor position;
2 = vernier cursor control; 3 = controls cursor size;
4 = velocity cursor

69

second cursor size, vertical

70

second cursor size, horizontal

71

second cursor position, line number

72

second cursor position, element number

73

second cursor type; see word 65

74

second cursor color; see word 66

75

cursor mode: 0 = single cursor mode; 1 = dual cursor mode

76

saved cursor type; set when word 65 = 0 to turn off the cursor

77 - 79

reserved

87

McBASI list window size

88

McBASI auto-line number line number

89

McBASI run abort flag

98

current MD core output file for motion vectors (WINDCO)

99

nortle toggle

100

current MD selector file for motion vectors (WINDCO)

121

single-letter command; otherwise, zero

122

used by the scheduler (sked); last time through all entries flag

158

vdisk drive letter

160

TCP/IP address of session partner

161

TCP rate measurement word

162

TCP connection status code

163

TCP reserved

164

WINDCO velocity cursor toggle set by Alt V: 0 = off; 1 = on

165

WINDCO sampling flag set by Alt X

166

WINDCO mode is active

167

reserved

168

0 = asynchronous communication is OK
1 = async comm is suspended, port available

169

1 = update loop when new image enters it

170

1 = loop in both directions (1 2 3 4 5 4 3 2 1)

171

reserved

172

routing table modification flag: 0 = modified; 1 = unchanged

173

briefing control signature for channel 1

174

briefing control signature for channel 2

176

1 = system is running without a session manager

177

communication connection state flag: 0 = no carrier;
1 = communications connected; 2 = connection in progress

178

switch to tell mousef to ignore mouse button press

185

mouse button status; two 2-byte integer (I* 2) values that correspond to mouse buttons 1 and 2 respectively

186

mouse movement values (mickies); two 2-byte integer (I * 2) values that correspond to movement up/down and left/right respectively

187

switch to tell mousef to set mickies into UC(186)

188

image nortle toggle

189

1 = commands go to the host

190

outgoing spool-in-use flag

191

mouse PID so EXIT can kill it

192

outgoing message request pointer

193

outgoing message completed pointer

194

1 = system shutdown request

195

last text window displayed; see UC(200)

196

count of text waiting to be displayed

197

import pointer from the decoder

198

communications port name, binary 0 for ProNET

199

last written pointer for import decoder

200

reserved

201

first line in the text window to display; the range is 1 to 57

202 - 203

mouse RAW position

204

reserved

205

reserved

206

reserved

207

nonzero means kbdctl is in insert mode

208

PF key input only; nonzero means that command line text is not allowed and the user cannot change the text window; the program must change the window

209

address of a memory segment used for displaying text on windows 5 through 9; each text window uses 4000 bytes; each character is represented in a 2-byte format where the least significant byte is the character displayed and the most significant byte is the color attribute

210

number of commands that mctext should remember, as specified in the -ih option of the .mcidasrc file

211

1 = echo all GUI commands to the mctext window

212 - 214

reserved

215 - 305

reserved

315 - 350

briefing port, frame controls and movie flag

400

number of text screens in use

401

reserved

451 - 453

cursor color (red, green, blue); the range is 0 to 255

455

1 = traps abort signals; see UC(-21)

456

ID of the command window

457

ID of the image window

465

offset from the start of UC to the start of redirect memory

467

1 = independent graphics

470

1 = to use fonts

471 - 480

family name of the font

500

number of graphics levels

501

interpolation strategy

502

1 = image window should resize to the size of the current frame (Alt R)

503

zoom factor; used when UC(300) is one

504

mcimage process ID

600

number of gray levels

700

TCPIP module loaded

701

IMPORT module loaded

1000 - 1999

user/site defined

2000

if nonzero, the image window should raise itself and reset the value to zero

2001+

frame object offsets from the start of UC

3001+

terminal types with variable frame sizes; line and element sizes as halfwords

4000

relative pointer for random looping

4001+

list for random looping, where zero is the end

5001+

list of dwell rates

6000

relative pointer for random graphics loops

6001+

list for random graphics loop, where zero is the end

7001+

list of random opposites, where zero is the end

16383 -

end of segment

API functions

Function Description

luc

reads a word from User Common

puc

writes a word to User Common

mcmoubtn

reports the state of the mouse buttons as soon as a mouse button event occurs

Mcluc

returns a value from User Common

Mcpuc

changes a value in User Common


[Search Manual] [Table of Contents] [Go to Previous] [Go to Next]