Skip to content

Commit 3871671

Browse files
author
dennis
committed
Imported SA9052 struct definition to IDA. Updated IDA db.
1 parent 9bd47d0 commit 3871671

File tree

2 files changed

+178
-0
lines changed

2 files changed

+178
-0
lines changed

src/morrow/include/sa9.h

+178
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,178 @@
1+
/*
2+
* sa9.h
3+
*
4+
* Created on: 04.05.2018
5+
* Author: dennis
6+
*/
7+
8+
#ifndef SA9_H_
9+
#define SA9_H_
10+
11+
struct SAStruct1
12+
{
13+
short op_mode; /* 0 Current mode: Sweep, Zspan, freq hop,etc */
14+
short engine_model; /* 2 Enumerated engine model type: SA9052, */
15+
/* SA9016, SA9085, or SA9034. */
16+
short swp_in_prog; /* 4 Flag indicating if data is currently */
17+
/* being gathered(TRUE),or if sweep is being*/
18+
/* paused or held(FALSE). */
19+
20+
/* DD: TODO: 'start' starts with 8 , not 6, due to alignment */
21+
double start; /* 8 Start frequency in Hz */
22+
double stop ; /* 16 -0x11 Stop frequency in Hz */
23+
double step ; /* 24-0xxx Step size in Hz */
24+
short step_mode; /* 32-0xxx Is stepsize AUTO,by pointcnt,or specified*/
25+
short time_mode; /* 34-0xxx Swp time in AUTO, by step time or swptime*/
26+
int dwell_time; /* 36-0xxx Time to dwell at each freq step in uS */
27+
int settle_time; /* 40-0xxx Override norm filter settle time in uS */
28+
/* Will normally be 0. Causes decalibrat */
29+
double sweep_time; /* 48 0xxx Time in uS to complete entire sweep. */
30+
short swp_time_unit; /* 56-0xxx Unit of time for sweep_time. Needed */
31+
/* because int can't hold large enough */
32+
/* value in uS. Can switch to mS, or */
33+
/* seconds. */
34+
int synth_time; /* 60 Synthesizer settling time. Constant. */
35+
short cell_mode; /* 64 Divide frequency span in num_cells groups*/
36+
/* and return min and/or max point of each */
37+
/* cell when set to TRUE. FALSE means */
38+
/* return points for each step of the synth.*/
39+
short auto_cell; /* 66 AUTO_ON means 9052 can set cell_mode to */
40+
/* TRUE automatically. AUTO_OFF means */
41+
/* value of cell_mode can only be changed */
42+
/* by the calling application. */
43+
int deflt_pt_cnt; /* 68 Default number of sweep points. This is */
44+
/* the number of points the engine will */
45+
/* return when step_mode is AUTO. */
46+
short rbw_code; /* 72 Resolution bandwidth code. */
47+
short auto_rbw; /* 74 Auto mode on or off for RBW? (1 or 0) */
48+
short vbw_code; /* 76 Video bandwidth code. */
49+
short auto_vbw; /* 78 Auto mode on or off for VBW? (1 or 0) */
50+
short filter_code; /* 80 Combined filter codes for RBW & VBW. */
51+
/* Upper byte is VBW. Lower byte is RBW. */
52+
double filter_ratio; /* 88=82+6 Ratio of VBW to RBW. Defaults to 0.10 */
53+
/* ---------------------------------------------------------------- */
54+
/* Since the calling application can switch between linear and log
55+
detectors at will, multiple structure members are provided to
56+
store the various values. attenuation and ref_level are the
57+
true current settings. They are set based upon the current
58+
detector mode. API functions handle conversions needed by the
59+
calling aps based upon the detector in use. */
60+
/* ---------------------------------------------------------------- */
61+
short attenuation; /* 96 Input attenuation val. 0 - 60 dB. */
62+
short ref_level; /* 98 Top of amplitude scale. Adjusts atten. */
63+
/* ---------------------------------------------------------------- */
64+
65+
short PreampAvailable;/* 100 the engine has a preamp installed */
66+
short PreampEnabled; /* 102 the preamp is enabled (only valid if
67+
PreampAvailable == TRUE) */
68+
short PreampGain; /* 104 gain of the preamp (in dBm) */
69+
70+
short EngineRefLevel; /* 106 reference level of ENGINE, can be
71+
different than ref_level so that
72+
calling apps can zoom the amplitude
73+
scale. */
74+
75+
/* ---------------------------------------------------------------- */
76+
short trig_code; /* 108 Code to determine triggering mode. */
77+
short trig_norm_flag; /* 110 Determines if continuous sweep triggers */
78+
/* occur one time & then free run, or more*/
79+
/* normally- sweep for each trigger hit. */
80+
/* 1 is TRUE or normal. 0 triggers hit */
81+
/* time only. */
82+
int trig_delay; /* 112 Delay time for all trigger modes, in uS */
83+
short trig_thresh; /* 116 Ampltd. threshold for video trig. Should*/
84+
/* be zero for all other trigger modes. */
85+
double trig_freq; /* 120 Frequency for thresh for video trig. Should*/
86+
/* be zero for all other trigger modes. */
87+
short detect_code; /* 128 Code for sa detector mode(log,lin,AM,etc)*/
88+
short sweep_code; /* 130 Bit field for sweep modes. */
89+
int num_cells; /* 132 Number of cells to divide the span into */
90+
/* when cell_mode == TRUE */
91+
short intr_code; /* 136 Code for point at which engine should */
92+
/* interrupt the PC. */
93+
/* DD: due to aligment 138 -> 144 */
94+
double zspan_freq; /* 144 Frequency at which to set zero span mode */
95+
int num_samples; /* 152 For Zspan mode: number of samples to be */
96+
/* returned to the PC. 0 means continue */
97+
/* until a terminate command is sent. */
98+
unsigned short zsampl_dvdr; /* 156 12-bit value at which to take readings. */
99+
/* The sampling rate is equal to */
100+
/* 10,000,000 / zsampl_dvdr [samples/sec].*/
101+
int sweepIndex; /* 160 The index of the current frequency point */
102+
int num_swp_pts; /* 164 Number of points current sweep params */
103+
/* will generate. */
104+
int num_step_pts; /* 168 Number of synthesizer steps to generate */
105+
/* the data points. ie 500 steps with */
106+
/* min & max will return 1000 data points.*/
107+
int num_hop_pts; /* 172 Number of points in the freq hop table. */
108+
short impedance; /* 176 Input impedance. Normally 50 ohms. */
109+
110+
int ie_duration; /* 180 delay time in milliseconds */
111+
short extern_ref; /* 184 REALITY:184 Flag for extern ref. 0 is default and */
112+
/* indicates extern ref is off. 1 */
113+
/* activates the external reference. */
114+
115+
/* DD: added next line */
116+
unsigned int z_cell_size; /* 188: by code analysis, we have that value here !?! */
117+
118+
unsigned int err_status; /* 192 last error that occured at low level */
119+
/* DD: in decompile, interfaceType is uint32_t ! */
120+
unsigned short interfaceType; /* 196 the hardware platform this analyzer uses */
121+
unsigned int eng_options ; /* 200 coded options flags, internal usage */
122+
short func_status_code ; /* 204 status code of last function return */
123+
unsigned short engine_reply_code ; /* 206 engine reply code of last engine return */
124+
125+
short openStep ; /* 208 Current step in the open session */
126+
/* sequence. Steps begins at 0 and */
127+
/* increment. */
128+
char sessionString[256]; /* 210 Session string to be used for opening a */
129+
/* the spectrum analyzer session. */
130+
unsigned int session_handle; /* 468 defines a specific type of session */
131+
132+
/* ISA specific members */
133+
unsigned short data_port; /* 472 Address port for this engine. status */
134+
/* will be data_port + 2. */
135+
unsigned short irq_num; /* 474 Which interrupt line is this engine on. */
136+
137+
/* VXI specific members */
138+
short logical_addr; /* 476 VXI logical address of the instrument if */
139+
/* it is a VXI device */
140+
141+
/* Serial specific members */
142+
void *commHandle; /* 480 this is the pointer to the GreenLeaf
143+
PORT structure used for the serial port.
144+
Changed type to void * from
145+
struct _tag_port* */
146+
int serialErrs[6][2]; /* 484 */
147+
short commNumber; /* 484+48=532 Value that specifies a particular COMx
148+
for the GreenLeaf port open functions */
149+
short comm_addr; /* 534 address for the current uart */
150+
short comm_irq; /* 536 irq for the current uart */
151+
short commRateCode; /* 538 the index in the rate array of the bps
152+
of the comm link */
153+
/* the first index should be 1 less than
154+
the rates array's length(hokey) */
155+
short commDialMeth; /* 540 tone(0) or pulse(1) */
156+
short commSpeakMode; /* 542 speaker on(1) or off(0) */
157+
char commPhoneNum[50] ; /* 544 phone number to dial */
158+
char commInitString[50]; /* 594 initialization string for modems */
159+
short modemConnectTimeout ; /* 644 time after which modem connection is */
160+
/* considered to have failed */
161+
/* HP SICL members */
162+
char *baseAddr; /* 648 the base address for the register map */
163+
164+
int vxiID; /* 652 */
165+
166+
/* HANDLE is defined for the NT device driver development in the
167+
files <windows.h> <winioctl.h>. The device handle is set in the
168+
ntisafce.c source file in InitEngine(). The handle is needed
169+
to access the low level driver which must be installed in the
170+
system and entered into the registry. */
171+
#if defined(MR90XX_OS_WIN32) && !defined (MR90XX_COMPILER_LW40)
172+
HANDLE nt_port_handle;
173+
#endif
174+
175+
long funcLink ; /* 656 */
176+
} SET9052;
177+
178+
#endif /* SA9_H_ */

src/morrow/orig/lib/mtcsa32.i64

16.9 KB
Binary file not shown.

0 commit comments

Comments
 (0)