1//=============================================================================
2//=============================================================================
3// COM automation interface documentation
4// This should be built and stored in the SVN repository already.
5// IDL files are generated from com_template.idl
6// This allows re-branded versions of the applciation to have differing UUIDs with
7// common source code.
8//
9// This should be built with the doxygen tool and is under the doxygen/ folder.
10// If you extend the COM automation interface then be sure to update this documentation.
11//
12// **** IMPORTANT ****
13// **** IMPORTANT ****
14// Note that extending the COM interface should be done with care! Do not move functions
15// around or change released signatures, DISPIDs or UUIDs. Append new methods using
16// unused DISPIDs to preserve existing vtable slots. Native clients using an appended
17// method require an updated server; the unchanged IID cannot identify older servers.
18// Incompatible changes require a new interface and IID.
19// **** IMPORTANT ****
20// **** IMPORTANT ****
21//
22import "oaidl.idl";
23import "ocidl.idl";
24// import "dispex.idl";
25
26#include "olectl.h"
27[ uuid(E86AB722-6C65-4174-82C9-9D1C462CCBA1), version(1.0) ]
28// This is usually the name of your application.
29library GemsDashDesign
30{
31 importlib("stdole32.tlb");
32 importlib("stdole2.tlb");
33
34 interface IDashJob;
35 interface IDashOptionsMap;
36 interface IDashDeviceList;
37 interface IDashDevice;
38 interface IDashCANPorts;
39
40
41 //-----------------------------------------------------------------------------
42 [uuid(CD921794-AADF-45FF-9411-4CC28B1AA4B9),
43 oleautomation,
44 dual
45 ]
46 interface IDashApplication : IDispatch
47 {
48 [id(1), propget, helpstring("Version String.")]
49 HRESULT Version([out, retval] BSTR* retval);
50
51 [id(2), propget, helpstring("Module (EXE) path.")]
52 HRESULT ModulePath([out, retval] BSTR* retval);
53
54 [id(3), propget, helpstring("Displays/hides the Application UI. The UI will be hidden initially when creating an instance of GemsDashDesign.")]
55 HRESULT Visible([out, retval] BOOL* retval);
56 [id(3), propput]
57 HRESULT Visible([in] BOOL visible);
58
59 [id(4), propget, helpstring("Makes the window fullscreen (or not)")]
60 HRESULT FullScreen([out, retval] BOOL* retval);
61 [id(4), propput]
62 HRESULT FullScreen([in] BOOL value);
63
64 [id(5), propget, helpstring("String describing the last error that occurred.")]
65 HRESULT LastErrorString([out, retval] BSTR* retval);
66
67 [id(6), helpstring("Creates an object with the IDashOptionsMap interface. This is an optional argument to various methods that accept options.")]
68 HRESULT CreateOptionsMap(
69 [out, retval] IDashOptionsMap** options);
70
71 [id(7), helpstring("Invokes the application action specified by 'action_id'.")]
72 HRESULT InvokeAction(
73 [in] BSTR action_id,
74 [in, optional] VARIANT options);
75
76 [id(8), helpstring("Opens the setup specified by 'path'.")]
77 HRESULT OpenSetup(
78 [in] BSTR path,
79 [in, optional] VARIANT options);
80
81 [id(9), helpstring("Saves the current setup. If the setup does not have a file name, the user will be prompted for one if the supplied options has SaveModifiedPrompt==TRUE.")]
82 HRESULT SaveSetup(
83 [in] VARIANT options);
84
85 [id(10), helpstring("Saves the current setup as the given path.")]
86 HRESULT SaveSetupAs(
87 [in] BSTR path,
88 [in] VARIANT options);
89
90 [id(11), helpstring("Creates a new blank setup.")]
91 HRESULT NewSetup(
92 [in] VARIANT options);
93
94 [id(12), propget, helpstring("Gets the setup object. This is currently not implemented.")]
95 HRESULT Setup([out, retval] IDispatch** retval);
96
97 [id(13), propget, helpstring("Gets the tabs manager. This is currently not implemented.")]
98 HRESULT Tabs([out, retval] IDispatch** retval);
99
100 [id(14), helpstring("Gets a list of devices that are attached to the system.")]
101 HRESULT CreateDeviceList([out, retval] IDashDeviceList** retval);
102
103 [id(15), propget, helpstring("Gets the currently selected device.")]
104 HRESULT SelectedDevice([out, retval] IDashDevice** retval);
105 [id(15), propput, helpstring("Selects the given device.")]
106 HRESULT SelectedDevice([in] IDashDevice* v);
107
108
109
110 [ id(16), helpstring("Generate Help Information as XML") ] HRESULT GenerateHelpInfo(
111 [ in, optional ] VARIANT options,
112 [ out, retval ] BSTR * result);
113
114 [ id(17), helpstring("Enumerate Windows in the application") ] HRESULT EnumerateWindows(
115 [ in, optional ] VARIANT options,
116 [ out, retval ] BSTR * result);
117
118 [ id(18), helpstring("Take a screenshot of a window or the whole application") ] HRESULT TakeScreenShot(
119 [ in, optional ] VARIANT options,
120 [ out, retval ] VARIANT * result);
121 [ id(19), helpstring("Close a window (if possible)") ] HRESULT CloseWindow(
122 [in] VARIANT options,
123 [ out, retval ] VARIANT * result);
124
125 [ id(20), helpstring("Focus a window") ] HRESULT FocusWindow(
126 [in] VARIANT options);
127
128 [ id(21), helpstring("Set view properties") ] HRESULT SetProperties(
129 [in] VARIANT options,
130 [in] VARIANT props);
131
132 [ id(22), helpstring("Get view properties") ] HRESULT GetProperties(
133 [in] VARIANT options,
134 [ out, retval ] VARIANT * result);
135
136 [ id(23), helpstring("Set a view property") ] HRESULT SetProperty(
137 [in] VARIANT options,
138 [in] BSTR name,
139 [in] VARIANT value);
140
141 [ id(24), helpstring("Get a view property") ] HRESULT GetProperty(
142 [in] VARIANT options,
143 [in] BSTR name,
144 [ out, retval ] VARIANT * result);
145
146 [id(42), helpstring("Simulate a mouse click.")] HRESULT Click(
147 [in] VARIANT options);
148
149 [id(26), propget, helpstring("Gets/sets the ID of the current top-level tab. Setting this property will change the selected tab.")]
150 HRESULT CurrentTabID([out, retval] BSTR* retval);
151 [id(26), propput]
152 HRESULT CurrentTabID([in] BSTR tab_id);
153
154 [id(27), propget, helpstring("Gets/sets the ID of the current sub-tab on a top-level tab (if any). Setting this property will change the selected tab.")]
155 HRESULT CurrentSubTabID([out, retval] BSTR* retval);
156 [id(27), propput]
157 HRESULT CurrentSubTabID([in] BSTR tab_id);
158
159 [id(28), helpstring("Set a simulator channel value.")]
160 HRESULT SetSimulationChannel([in] BSTR channel, [in] VARIANT value);
161
162 [id(29), helpstring("Import CAN DBC file.")]
163 HRESULT ImportCanDbc([in] BSTR path, [in] VARIANT options);
164
165 [id(30), helpstring("Simulate a keyboard event.")] HRESULT Keyboard(
166 [in] VARIANT options);
167
168 [id(31), helpstring("Obtains an interface for listing CAN adaptors connected to the PC.")]
169 HRESULT ListCANPorts([out, retval] IDashCANPorts** retval);
170
171 [id(32), helpstring("Connect a physical CAN port to the simulator.")]
172 HRESULT BindSimuatorCANPort([in] int index, [in] BSTR port_identifier, [in] VARIANT options);
173
174
175 [id(33), propget, helpstring("Control the simulator running state")]
176 HRESULT SimulatorRunning([out, retval] BOOL* retval);
177 [id(33), propput]
178 HRESULT SimulatorRunning([in] BOOL value);
179
180 [id(43), helpstring("Embed a CDX Model package into the current editable supported setup without saving it.")]
181 HRESULT EmbedCdxModel([in] BSTR path);
182
183 [id(44), helpstring("Configure local simulator model files and debugger startup delay.")]
184 HRESULT ConfigureSimulator([in] VARIANT options);
185
186 [id(45), propget, helpstring("Simulator process ID for native debugger attachment, or zero.")]
187 HRESULT SimulatorProcessId([out, retval] ULONG* retval);
188
189 [id(46), helpstring("Query CDX Model image descriptor support without loading or changing anything.")]
190 HRESULT SupportsCdxModelImageDescriptor([in] LONG descriptorVersion, [out, retval] VARIANT_BOOL* supported);
191 };
192
193 //-----------------------------------------------------------------------------
194 [uuid(4CF7EE02-7183-4DF2-B0D9-751AEE62FC25),
195 appobject
196 ]
197 coclass Application
198 {
199 [default] interface IDashApplication;
200 interface IDispatch;
201 };
202
203 //-----------------------------------------------------------------------------
204 [uuid(6B7A53F1-0F43-4ED1-9377-E488FA99DB8F),
205 oleautomation,
206 dual
207 ]
208 interface IDashOptionsMap : IDispatch
209 {
210 [id(1), helpstring("Gets a property value.")]
211 HRESULT GetProperty(
212 [in] BSTR name,
213 [out, retval] VARIANT* retval
214 );
215 // TODO: implement IDispatchEx (could do that via aggregation).
216 [id(2), helpstring("Sets a property value. If the property does not exist, it will be created.")]
217 HRESULT SetProperty(
218 [in] BSTR name,
219 [in] VARIANT value
220 );
221 };
222
223
224 //-----------------------------------------------------------------------------
225 [uuid(EF3B31CC-2B8C-4836-B08F-8C996DBC275C),
226 oleautomation,
227 dual
228 ]
229 interface IDashJob : IDispatch
230 {
231 [id(1), helpstring("Cancels the Job.")]
232 HRESULT Cancel(void);
233
234 [id(2), propget, helpstring("Gets the progress of the Job as a value between 0.0 and 1.0 inclusive.")]
235 HRESULT Progress([out, retval] double* retval);
236
237 [id(3), propget, helpstring("Returns 'true' if the Job has completed.")]
238 HRESULT Completed([out, retval] BOOL* retval);
239
240 [id(4), propget, helpstring("Returns 'true' if the Job failed. If the job has not yet completed this will return false.")]
241 HRESULT Failed([out, retval] BOOL* retval);
242
243 [id(5), propget, helpstring("Returns an error string. The string is empty if there were no errors.")]
244 HRESULT Error([out, retval] BSTR* retval);
245
246 [id(6), propget, helpstring("Returns a newline separated string containing all messages generated by the job.")]
247 HRESULT AllMessages([out, retval] BSTR* retval);
248
249 [id(7), helpstring("Waits for the job to complete.")]
250 HRESULT Wait(void);
251
252 };
253
254 //-----------------------------------------------------------------------------
255 [uuid(C65E1163-3337-46F6-BD42-2FC0C52FD10E),
256 oleautomation,
257 dual
258 ]
259 interface IDashDeviceList : IDispatch
260 {
261 [id(1), propget, helpstring("Gets the length of the list")]
262 HRESULT Count([out, retval] int* retval);
263
264 [id(2), helpstring("Gets the name of the device at position 'index'")]
265 HRESULT NameAt(
266 [in] int index,
267 [out, retval] BSTR* retval);
268
269 [id(3), helpstring("Gets the serial number of the device at position 'index'")]
270 HRESULT SerialNumberAt(
271 [in] int index,
272 [out, retval] BSTR* retval);
273
274 [id(4), helpstring("Gets the description of the device at position 'index'")]
275 HRESULT DescriptionAt(
276 [in] int index,
277 [out, retval] BSTR* retval);
278
279 [id(5), helpstring("Gets the USB VID of the device at position 'index'")]
280 HRESULT UsbVidAt(
281 [in] int index,
282 [out, retval] int* retval);
283
284 [id(6), helpstring("Gets the USB VID of the device at position 'index'")]
285 HRESULT UsbPidAt(
286 [in] int index,
287 [out, retval] int* retval);
288
289 [id(7), helpstring("Gets the device at position 'index'")]
290 HRESULT Get(
291 [in] int index,
292 [out, retval] IDashDevice** retval);
293
294 [id(8), helpstring("Refreshes the list.")]
295 HRESULT Refresh(void);
296
297 [id(9), helpstring("Tests whether the device at position 'index' is connected through USB.")]
298 HRESULT IsUsbAt(
299 [in] int index,
300 [out, retval] VARIANT_BOOL* retval);
301 };
302
303
304 //-----------------------------------------------------------------------------
305 [uuid(5B918F6D-CBB6-43BD-A440-95379011D543),
306 oleautomation,
307 dual
308 ]
309 interface IDashDevice : IDispatch
310 {
311 [id(1), propget, helpstring("Gets the name of the device.")]
312 HRESULT Name([out, retval] BSTR* retval);
313
314 [id(2), propget, helpstring("Gets the device serial number.")]
315 HRESULT SerialNumber([out, retval] BSTR* retval);
316
317 [id(3), propget, helpstring("Gets the device description.")]
318 HRESULT Description([out, retval] BSTR* retval);
319
320 [id(4), propget, helpstring("Gets the device VID.")]
321 HRESULT UsbVid([out, retval] int* retval);
322 [id(5), propget, helpstring("Gets the device PID.")]
323 HRESULT UsbPid([out, retval] int* retval);
324
325 [id(6), helpstring("Downloads the log setup from the device.")]
326 HRESULT DownloadSetup(
327 [in] BSTR filename,
328 [in, optional] VARIANT options,
329 [out, retval] IDashJob** retval);
330
331 [id(7), helpstring("Uploads a new setup to the device.")]
332 HRESULT UploadSetup(
333 [in] BSTR filename,
334 [in, optional] VARIANT options,
335 [out, retval] IDashJob** retval);
336
337
338 [id(8), helpstring("Uploads firmware to the device.")]
339 HRESULT UploadFirmware(
340 [in] BSTR filename,
341 [in, optional] VARIANT options,
342 [out, retval] IDashJob** retval);
343
344 [id(9), helpstring("Erases the log from the device.")]
345 HRESULT EraseLog(
346 [in, optional] VARIANT options,
347 [out, retval] IDashJob** retval);
348
349 [id(10), helpstring("Upload a native setup without interactive prompts.")]
350 HRESULT UploadSetupUnattended(
351 [in] BSTR filename,
352 [in, optional] VARIANT options,
353 [out, retval] IDashJob** retval);
354
355 };
356
357 //-----------------------------------------------------------------------------
358 [uuid(F8B4BC3B-C680-4B9F-8AAD-8EA85E8A3AA3),
359 oleautomation,
360 dual
361 ]
362 interface IDashCANPorts : IDispatch
363 {
364 [id(1), helpstring("Refresh the CAN ports list. Blocks execution until complete.")]
365 HRESULT Refresh();
366
367 [id(2), propget, helpstring("Get number of detected ports.")]
368 HRESULT Count([out, retval] unsigned int* retval);
369
370 [id(3), helpstring("Get friendly name of the port at the specified index in the list.")]
371 HRESULT NameAt(
372 [in] unsigned int index,
373 [out, retval] BSTR * retval);
374
375 [id(4), helpstring("Get internal 'memento' of the port at the specified index in the list.")]
376 HRESULT IdentifierAt(
377 [in] unsigned int index,
378 [out, retval] BSTR * retval);
379
380 [id(5), propget, helpstring("Include ISA PCAN ports in the list.")]
381 HRESULT IncludePCAN_ISA([out, retval] BOOL * retval);
382 [id(5), propput, helpstring("Include ISA PCAN ports in the list.")]
383 HRESULT IncludePCAN_ISA([in] BOOL v);
384
385 [id(6), propget, helpstring("Include Kvaser Virtual CAN ports in the list.")]
386 HRESULT IncludeKvaserVirtual([out, retval] BOOL * retval);
387 [id(6), propput, helpstring("Include Kvaser Virtual CAN ports in the list.")]
388 HRESULT IncludeKvaserVirtual([in] BOOL v);
389
390 };
391}
392//=============================================================================
393// End of File
394//=============================================================================