1 | #tag Class |
---|
2 | Protected Class ICSSerialPort |
---|
3 | Inherits serial |
---|
4 | #tag Method, Flags = &h0 |
---|
5 | Sub resetCar() |
---|
6 | //This sends the command to reset the car back to a default configuration |
---|
7 | //Defaults are different for each car type |
---|
8 | setDefaultValues |
---|
9 | |
---|
10 | //Send the default values to the car |
---|
11 | writeCar |
---|
12 | End Sub |
---|
13 | #tag EndMethod |
---|
14 | |
---|
15 | #tag Method, Flags = &h0 |
---|
16 | Sub setDefaultValues() |
---|
17 | //Set the defaults for the bytes sent to a car |
---|
18 | |
---|
19 | select case carType |
---|
20 | |
---|
21 | case "MR-03" |
---|
22 | byte01 = chrb(&hD5) |
---|
23 | byte02 = chrb(&h5A) |
---|
24 | byte03 = chrb(&h64) |
---|
25 | byte04 = chrb(&hFF) |
---|
26 | byte05 = chrb(&h02) |
---|
27 | byte06 = chrb(&h02) |
---|
28 | byte07 = chrb(&h01) |
---|
29 | byte08 = chrb(&hFF) |
---|
30 | byte09 = chrb(&hBC) |
---|
31 | byte10 = chrb(&h44) |
---|
32 | byte11 = chrb(&h88) |
---|
33 | byte12 = chrb(&h78) |
---|
34 | byte13 = chrb(&hFF) |
---|
35 | byte14 = chrb(&h2C) |
---|
36 | byte15 = chrb(&h05) |
---|
37 | byte16 = chrb(&h5A) |
---|
38 | byte17 = chrb(&h3C) |
---|
39 | byte18 = chrb(&h87) |
---|
40 | |
---|
41 | case "dNaNo" |
---|
42 | byte01 = chrb(&hD5) |
---|
43 | byte02 = chrb(&h5A) |
---|
44 | byte03 = chrb(&hFF) |
---|
45 | byte04 = chrb(&hFF) |
---|
46 | byte05 = chrb(&h0A) |
---|
47 | byte06 = chrb(&h03) |
---|
48 | byte07 = chrb(&h01) |
---|
49 | byte08 = chrb(&h40) |
---|
50 | byte09 = chrb(&hBC) |
---|
51 | byte10 = chrb(&h44) |
---|
52 | byte11 = chrb(&h88) |
---|
53 | byte12 = chrb(&h78) |
---|
54 | byte13 = chrb(&h03) |
---|
55 | byte14 = chrb(&hFF) |
---|
56 | byte15 = chrb(&hFF) |
---|
57 | byte16 = chrb(&h80) |
---|
58 | byte17 = chrb(&h80) |
---|
59 | byte18 = chrb(&hA7) |
---|
60 | |
---|
61 | case "ASF" |
---|
62 | byte01 = chrb(&hD5) |
---|
63 | byte02 = chrb(&h5A) |
---|
64 | byte03 = chrb(&hFF) |
---|
65 | byte04 = chrb(&hFF) |
---|
66 | byte05 = chrb(&h0A) |
---|
67 | byte06 = chrb(&h03) |
---|
68 | byte07 = chrb(&h01) |
---|
69 | byte08 = chrb(&h78) |
---|
70 | byte09 = chrb(&hBC) |
---|
71 | byte10 = chrb(&h44) |
---|
72 | byte11 = chrb(&h88) |
---|
73 | byte12 = chrb(&h78) |
---|
74 | byte13 = chrb(&h03) |
---|
75 | byte14 = chrb(&hFF) |
---|
76 | byte15 = chrb(&hFF) |
---|
77 | byte16 = chrb(&hFF) |
---|
78 | byte17 = chrb(&hFF) |
---|
79 | byte18 = chrb(&hDD) |
---|
80 | |
---|
81 | else |
---|
82 | //default thing to do |
---|
83 | MsgBox "Error invalid car type" |
---|
84 | return |
---|
85 | end select |
---|
86 | |
---|
87 | //trigger the event definition so main program knows the values changed |
---|
88 | valuesChanged() |
---|
89 | End Sub |
---|
90 | #tag EndMethod |
---|
91 | |
---|
92 | #tag Method, Flags = &h0 |
---|
93 | Sub setCarType(value as string) |
---|
94 | //When setting car type we must reconfigure the serial port |
---|
95 | //Some car types have a different baud rate |
---|
96 | |
---|
97 | select case value |
---|
98 | |
---|
99 | case "MR-03" |
---|
100 | carType = value |
---|
101 | byte15 = chrb(&h05) |
---|
102 | byte16 = chrb(&h5A) |
---|
103 | byte17 = chrb(&h3C) |
---|
104 | case "dNaNo" |
---|
105 | carType = value |
---|
106 | byte15 = chrb(&hFF) |
---|
107 | byte16 = chrb(&h80) |
---|
108 | byte17 = chrb(&h80) |
---|
109 | case "ASF" |
---|
110 | carType = value |
---|
111 | byte15 = chrb(&hFF) |
---|
112 | byte16 = chrb(&hFF) |
---|
113 | byte17 = chrb(&hFF) |
---|
114 | |
---|
115 | else |
---|
116 | MsgBox "Error setting Car Type" |
---|
117 | end select |
---|
118 | |
---|
119 | valuesChanged() |
---|
120 | End Sub |
---|
121 | #tag EndMethod |
---|
122 | |
---|
123 | #tag Method, Flags = &h0 |
---|
124 | Sub writeCar() |
---|
125 | //Send set bytes to the car |
---|
126 | mode = "write" |
---|
127 | |
---|
128 | dim sendstring as string |
---|
129 | |
---|
130 | calculateChecksum() |
---|
131 | |
---|
132 | sendstring = byte01 + byte02 + byte03 + byte04 + byte05 + byte06 + byte07 + byte08 + byte09 + byte10 + byte11 + byte12 + byte13 + byte14 + byte15 + byte16 + byte17 + byte18 |
---|
133 | |
---|
134 | me.Write(sendstring) |
---|
135 | End Sub |
---|
136 | #tag EndMethod |
---|
137 | |
---|
138 | #tag Method, Flags = &h0 |
---|
139 | Sub calculateChecksum() |
---|
140 | //Use this to calculate byte 18, the checksum |
---|
141 | //The checksum is just adding bytes 2-17 together but rounded at each byte |
---|
142 | |
---|
143 | dim i as integer |
---|
144 | |
---|
145 | i = (asc(byte02) + asc(byte03)) mod &h100 |
---|
146 | i = (i + asc(byte04)) mod &h100 |
---|
147 | i = (i + asc(byte05)) mod &h100 |
---|
148 | i = (i + asc(byte06)) mod &h100 |
---|
149 | i = (i + asc(byte07)) mod &h100 |
---|
150 | i = (i + asc(byte08)) mod &h100 |
---|
151 | i = (i + asc(byte09)) mod &h100 |
---|
152 | i = (i + asc(byte10)) mod &h100 |
---|
153 | i = (i + asc(byte11)) mod &h100 |
---|
154 | i = (i + asc(byte12)) mod &h100 |
---|
155 | i = (i + asc(byte13)) mod &h100 |
---|
156 | i = (i + asc(byte14)) mod &h100 |
---|
157 | i = (i + asc(byte15)) mod &h100 |
---|
158 | i = (i + asc(byte16)) mod &h100 |
---|
159 | i = (i + asc(byte17)) mod &h100 |
---|
160 | |
---|
161 | byte18 = chrb(i) |
---|
162 | End Sub |
---|
163 | #tag EndMethod |
---|
164 | |
---|
165 | #tag Method, Flags = &h0 |
---|
166 | Sub readCar() |
---|
167 | //Read values from the currently attached car |
---|
168 | |
---|
169 | mode = "read" |
---|
170 | End Sub |
---|
171 | #tag EndMethod |
---|
172 | |
---|
173 | #tag Method, Flags = &h0 |
---|
174 | Sub Constructor() |
---|
175 | //Make sure we have a database and if not create it |
---|
176 | dim exists as boolean |
---|
177 | |
---|
178 | exists = prepareDB() |
---|
179 | if exists = false then |
---|
180 | //No database available, create one |
---|
181 | createDB() |
---|
182 | else |
---|
183 | //Database exists, connect to it |
---|
184 | if fsicsdb.Connect = false then |
---|
185 | MsgBox "Database connection failed" |
---|
186 | end if |
---|
187 | end if |
---|
188 | |
---|
189 | //Set default byte values |
---|
190 | byte01 = chrb(&hD5) |
---|
191 | byte02 = chrb(&h5A) |
---|
192 | byte03 = chrb(&h64) |
---|
193 | byte04 = chrb(&hFF) |
---|
194 | byte05 = chrb(&h02) |
---|
195 | byte06 = chrb(&h02) |
---|
196 | byte07 = chrb(&h01) |
---|
197 | byte08 = chrb(&hFF) |
---|
198 | byte09 = chrb(&hBC) |
---|
199 | byte10 = chrb(&h44) |
---|
200 | byte11 = chrb(&h88) |
---|
201 | byte12 = chrb(&h78) |
---|
202 | byte13 = chrb(&hFF) |
---|
203 | byte14 = chrb(&h2C) |
---|
204 | byte15 = chrb(&h05) |
---|
205 | byte16 = chrb(&h5A) |
---|
206 | byte17 = chrb(&h3C) |
---|
207 | byte18 = chrb(&h87) |
---|
208 | |
---|
209 | carType = "MR-03" |
---|
210 | End Sub |
---|
211 | #tag EndMethod |
---|
212 | |
---|
213 | #tag Method, Flags = &h21 |
---|
214 | Private Function prepareDB() As Boolean |
---|
215 | //Open the database file |
---|
216 | fsicsdb = new REALSQLDatabase |
---|
217 | dim f as FolderItem = GetFolderItem("fsicsdb") |
---|
218 | fsicsdb.DatabaseFile = f |
---|
219 | |
---|
220 | return f.Exists |
---|
221 | End Function |
---|
222 | #tag EndMethod |
---|
223 | |
---|
224 | #tag Method, Flags = &h21 |
---|
225 | Private Sub createDB() |
---|
226 | //Create a new database |
---|
227 | |
---|
228 | |
---|
229 | //make sure we can create the file |
---|
230 | if fsicsdb.CreateDatabaseFile() then |
---|
231 | if fsicsdb.Connect() then |
---|
232 | dim query as string |
---|
233 | query = "CREATE TABLE carprofiles (id INTEGER PRIMARY KEY, name VARCHAR, cartype VARCHAR, byte01 INTEGER, byte02 INTEGER, byte03 INTEGER, byte04 INTEGER, byte05 INTEGER, byte06 INTEGER"+_ |
---|
234 | ", byte07 INTEGER, byte08 INTEGER, byte09 INTEGER, byte10 INTEGER, byte11 INTEGER, byte12 INTEGER, byte13 INTEGER, byte14 INTEGER, byte15 INTEGER, byte16 INTEGER, byte17 INTEGER"+_ |
---|
235 | ", byte18 INTEGER, UNIQUE(name))" |
---|
236 | fsicsdb.SQLExecute(query) |
---|
237 | if fsicsdb.Error then |
---|
238 | MsgBox "Database Error (carprofiles):" + fsicsdb.ErrorMessage |
---|
239 | fsicsdb.Rollback |
---|
240 | |
---|
241 | else |
---|
242 | fsicsdb.Commit |
---|
243 | end if |
---|
244 | |
---|
245 | |
---|
246 | else |
---|
247 | MsgBox "Failed to connect to new database file" |
---|
248 | end if |
---|
249 | else |
---|
250 | //Failed to create database file |
---|
251 | MsgBox "Failed to create database file" |
---|
252 | end if |
---|
253 | End Sub |
---|
254 | #tag EndMethod |
---|
255 | |
---|
256 | #tag Method, Flags = &h0 |
---|
257 | Function createProfile(theName as String) As Boolean |
---|
258 | dim success as boolean |
---|
259 | success = false |
---|
260 | |
---|
261 | //Make sure we got a name |
---|
262 | if theName = "" then |
---|
263 | return success |
---|
264 | else |
---|
265 | //Build a new database record |
---|
266 | dim rec as DatabaseRecord |
---|
267 | rec = New DatabaseRecord |
---|
268 | |
---|
269 | rec.Column("name") = theName |
---|
270 | rec.Column("cartype") = carType |
---|
271 | rec.IntegerColumn("byte01") = asc(byte01) |
---|
272 | rec.IntegerColumn("byte02") = asc(byte02) |
---|
273 | rec.IntegerColumn("byte03") = asc(byte03) |
---|
274 | rec.IntegerColumn("byte04") = asc(byte04) |
---|
275 | rec.IntegerColumn("byte05") = asc(byte05) |
---|
276 | rec.IntegerColumn("byte06") = asc(byte06) |
---|
277 | rec.IntegerColumn("byte07") = asc(byte07) |
---|
278 | rec.IntegerColumn("byte08") = asc(byte08) |
---|
279 | rec.IntegerColumn("byte09") = asc(byte09) |
---|
280 | rec.IntegerColumn("byte10") = asc(byte10) |
---|
281 | rec.IntegerColumn("byte11") = asc(byte11) |
---|
282 | rec.IntegerColumn("byte12") = asc(byte12) |
---|
283 | rec.IntegerColumn("byte13") = asc(byte13) |
---|
284 | rec.IntegerColumn("byte14") = asc(byte14) |
---|
285 | rec.IntegerColumn("byte15") = asc(byte15) |
---|
286 | rec.IntegerColumn("byte16") = asc(byte16) |
---|
287 | rec.IntegerColumn("byte17") = asc(byte17) |
---|
288 | rec.IntegerColumn("byte18") = asc(byte18) |
---|
289 | |
---|
290 | fsicsdb.InsertRecord("carprofiles", rec) |
---|
291 | |
---|
292 | if fsicsdb.Error = True then |
---|
293 | MsgBox "Error creating profile, " + fsicsdb.ErrorMessage |
---|
294 | fsicsdb.Rollback |
---|
295 | else |
---|
296 | fsicsdb.Commit |
---|
297 | success = true |
---|
298 | end if |
---|
299 | end if |
---|
300 | |
---|
301 | Return success |
---|
302 | End Function |
---|
303 | #tag EndMethod |
---|
304 | |
---|
305 | #tag Method, Flags = &h0 |
---|
306 | Sub deleteProfile(theName as String) |
---|
307 | if theName <> "" then |
---|
308 | |
---|
309 | //Delete the profile selected |
---|
310 | fsicsdb.SQLExecute("DELETE FROM carprofiles WHERE name = '" + theName + "'") |
---|
311 | |
---|
312 | //Check for errors |
---|
313 | if fsicsdb.Error = True then |
---|
314 | MsgBox "Error deleting profile" |
---|
315 | fsicsdb.Rollback |
---|
316 | else |
---|
317 | fsicsdb.Commit |
---|
318 | end if |
---|
319 | |
---|
320 | else |
---|
321 | |
---|
322 | MsgBox "Please select a profile to delete" |
---|
323 | |
---|
324 | end if |
---|
325 | End Sub |
---|
326 | #tag EndMethod |
---|
327 | |
---|
328 | #tag Method, Flags = &h0 |
---|
329 | Sub saveProfile(theName as String) |
---|
330 | dim rs as RecordSet |
---|
331 | dim status as Boolean |
---|
332 | |
---|
333 | //Find a record |
---|
334 | rs = fsicsdb.SQLSelect("SELECT * FROM carprofiles WHERE name= '"+theName+"'") |
---|
335 | |
---|
336 | //Make sure we got a record |
---|
337 | if rs <> nil then |
---|
338 | //delete the record before saving |
---|
339 | deleteProfile(theName) |
---|
340 | end if |
---|
341 | |
---|
342 | rs.Close |
---|
343 | |
---|
344 | status = createProfile(theName) |
---|
345 | End Sub |
---|
346 | #tag EndMethod |
---|
347 | |
---|
348 | #tag Method, Flags = &h0 |
---|
349 | Function listProfiles() As String() |
---|
350 | dim rs as RecordSet |
---|
351 | dim s() as string |
---|
352 | |
---|
353 | //Find records |
---|
354 | rs = fsicsdb.SQLSelect("SELECT name FROM carprofiles") |
---|
355 | |
---|
356 | if rs <> nil then |
---|
357 | |
---|
358 | while rs.EOF = false |
---|
359 | s.Append rs.Field("name").StringValue |
---|
360 | rs.MoveNext |
---|
361 | wend |
---|
362 | |
---|
363 | end if |
---|
364 | |
---|
365 | rs.Close |
---|
366 | Return s() |
---|
367 | End Function |
---|
368 | #tag EndMethod |
---|
369 | |
---|
370 | #tag Method, Flags = &h0 |
---|
371 | Sub loadProfile(theName as string) |
---|
372 | //Find the profile in the database, update the bytes and fire the event |
---|
373 | dim rs as RecordSet |
---|
374 | |
---|
375 | rs = fsicsdb.SQLSelect("SELECT * FROM carprofiles WHERE name= '"+theName+"'") |
---|
376 | |
---|
377 | //Make sure we got a record to work with |
---|
378 | if rs <> Nil then |
---|
379 | |
---|
380 | if rs.Field("cartype").StringValue <> "" then |
---|
381 | carType = rs.Field("cartype").StringValue |
---|
382 | end if |
---|
383 | |
---|
384 | if rs.Field("byte01").StringValue <> "" then |
---|
385 | byte01 = chrb(rs.Field("byte01").IntegerValue) |
---|
386 | end if |
---|
387 | if rs.Field("byte02").StringValue <> "" then |
---|
388 | byte02 = chrb(rs.Field("byte02").IntegerValue) |
---|
389 | end if |
---|
390 | if rs.Field("byte03").StringValue <> "" then |
---|
391 | byte03 = chrb(rs.Field("byte03").IntegerValue) |
---|
392 | end if |
---|
393 | if rs.Field("byte04").StringValue <> "" then |
---|
394 | byte04 = chrb(rs.Field("byte04").IntegerValue) |
---|
395 | end if |
---|
396 | if rs.Field("byte05").StringValue <> "" then |
---|
397 | byte05 = chrb(rs.Field("byte05").IntegerValue) |
---|
398 | end if |
---|
399 | if rs.Field("byte06").StringValue <> "" then |
---|
400 | byte06 = chrb(rs.Field("byte06").IntegerValue) |
---|
401 | end if |
---|
402 | if rs.Field("byte07").StringValue <> "" then |
---|
403 | byte07 = chrb(rs.Field("byte07").IntegerValue) |
---|
404 | end if |
---|
405 | if rs.Field("byte08").StringValue <> "" then |
---|
406 | byte08 = chrb(rs.Field("byte08").IntegerValue) |
---|
407 | end if |
---|
408 | if rs.Field("byte09").StringValue <> "" then |
---|
409 | byte09 = chrb(rs.Field("byte09").IntegerValue) |
---|
410 | end if |
---|
411 | if rs.Field("byte10").StringValue <> "" then |
---|
412 | byte10 = chrb(rs.Field("byte10").IntegerValue) |
---|
413 | end if |
---|
414 | if rs.Field("byte11").StringValue <> "" then |
---|
415 | byte11 = chrb(rs.Field("byte11").IntegerValue) |
---|
416 | end if |
---|
417 | if rs.Field("byte12").StringValue <> "" then |
---|
418 | byte12 = chrb(rs.Field("byte12").IntegerValue) |
---|
419 | end if |
---|
420 | if rs.Field("byte13").StringValue <> "" then |
---|
421 | byte13 = chrb(rs.Field("byte13").IntegerValue) |
---|
422 | end if |
---|
423 | if rs.Field("byte14").StringValue <> "" then |
---|
424 | byte14 = chrb(rs.Field("byte14").IntegerValue) |
---|
425 | end if |
---|
426 | if rs.Field("byte15").StringValue <> "" then |
---|
427 | byte15 = chrb(rs.Field("byte15").IntegerValue) |
---|
428 | end if |
---|
429 | if rs.Field("byte16").StringValue <> "" then |
---|
430 | byte16 = chrb(rs.Field("byte16").IntegerValue) |
---|
431 | end if |
---|
432 | if rs.Field("byte17").StringValue <> "" then |
---|
433 | byte17 = chrb(rs.Field("byte17").IntegerValue) |
---|
434 | end if |
---|
435 | if rs.Field("byte18").StringValue <> "" then |
---|
436 | byte18 = chrb(rs.Field("byte18").IntegerValue) |
---|
437 | end if |
---|
438 | |
---|
439 | valuesChanged() |
---|
440 | end if |
---|
441 | End Sub |
---|
442 | #tag EndMethod |
---|
443 | |
---|
444 | |
---|
445 | #tag Hook, Flags = &h0 |
---|
446 | Event valuesChanged() |
---|
447 | #tag EndHook |
---|
448 | |
---|
449 | |
---|
450 | #tag Note, Name = General |
---|
451 | Car type must be set for this to operate |
---|
452 | Car types supported by this application are |
---|
453 | MR-03 |
---|
454 | dNaNo |
---|
455 | ASF |
---|
456 | #tag EndNote |
---|
457 | |
---|
458 | |
---|
459 | #tag Property, Flags = &h0 |
---|
460 | byte01 As String |
---|
461 | #tag EndProperty |
---|
462 | |
---|
463 | #tag Property, Flags = &h0 |
---|
464 | byte11 As String |
---|
465 | #tag EndProperty |
---|
466 | |
---|
467 | #tag Property, Flags = &h0 |
---|
468 | byte12 As String |
---|
469 | #tag EndProperty |
---|
470 | |
---|
471 | #tag Property, Flags = &h0 |
---|
472 | byte13 As String |
---|
473 | #tag EndProperty |
---|
474 | |
---|
475 | #tag Property, Flags = &h0 |
---|
476 | byte14 As String |
---|
477 | #tag EndProperty |
---|
478 | |
---|
479 | #tag Property, Flags = &h0 |
---|
480 | byte15 As String |
---|
481 | #tag EndProperty |
---|
482 | |
---|
483 | #tag Property, Flags = &h0 |
---|
484 | byte16 As String |
---|
485 | #tag EndProperty |
---|
486 | |
---|
487 | #tag Property, Flags = &h0 |
---|
488 | byte17 As String |
---|
489 | #tag EndProperty |
---|
490 | |
---|
491 | #tag Property, Flags = &h0 |
---|
492 | byte18 As String |
---|
493 | #tag EndProperty |
---|
494 | |
---|
495 | #tag Property, Flags = &h0 |
---|
496 | byte02 As String |
---|
497 | #tag EndProperty |
---|
498 | |
---|
499 | #tag Property, Flags = &h0 |
---|
500 | byte03 As String |
---|
501 | #tag EndProperty |
---|
502 | |
---|
503 | #tag Property, Flags = &h0 |
---|
504 | byte04 As String |
---|
505 | #tag EndProperty |
---|
506 | |
---|
507 | #tag Property, Flags = &h0 |
---|
508 | byte05 As String |
---|
509 | #tag EndProperty |
---|
510 | |
---|
511 | #tag Property, Flags = &h0 |
---|
512 | byte06 As String |
---|
513 | #tag EndProperty |
---|
514 | |
---|
515 | #tag Property, Flags = &h0 |
---|
516 | byte07 As String |
---|
517 | #tag EndProperty |
---|
518 | |
---|
519 | #tag Property, Flags = &h0 |
---|
520 | byte08 As String |
---|
521 | #tag EndProperty |
---|
522 | |
---|
523 | #tag Property, Flags = &h0 |
---|
524 | byte09 As String |
---|
525 | #tag EndProperty |
---|
526 | |
---|
527 | #tag Property, Flags = &h0 |
---|
528 | byte10 As String |
---|
529 | #tag EndProperty |
---|
530 | |
---|
531 | #tag Property, Flags = &h0 |
---|
532 | carType As String = "MR-03" |
---|
533 | #tag EndProperty |
---|
534 | |
---|
535 | #tag Property, Flags = &h0 |
---|
536 | fsicsdb As REALSQLDatabase |
---|
537 | #tag EndProperty |
---|
538 | |
---|
539 | #tag Property, Flags = &h0 |
---|
540 | mode As String = "read" |
---|
541 | #tag EndProperty |
---|
542 | |
---|
543 | |
---|
544 | #tag ViewBehavior |
---|
545 | #tag ViewProperty |
---|
546 | Name="Name" |
---|
547 | Visible=true |
---|
548 | Group="ID" |
---|
549 | InheritedFrom="serial" |
---|
550 | #tag EndViewProperty |
---|
551 | #tag ViewProperty |
---|
552 | Name="Index" |
---|
553 | Visible=true |
---|
554 | Group="ID" |
---|
555 | Type="Integer" |
---|
556 | InheritedFrom="serial" |
---|
557 | #tag EndViewProperty |
---|
558 | #tag ViewProperty |
---|
559 | Name="Super" |
---|
560 | Visible=true |
---|
561 | Group="ID" |
---|
562 | InheritedFrom="serial" |
---|
563 | #tag EndViewProperty |
---|
564 | #tag ViewProperty |
---|
565 | Name="Left" |
---|
566 | Visible=true |
---|
567 | Group="Position" |
---|
568 | InheritedFrom="serial" |
---|
569 | #tag EndViewProperty |
---|
570 | #tag ViewProperty |
---|
571 | Name="Top" |
---|
572 | Visible=true |
---|
573 | Group="Position" |
---|
574 | InheritedFrom="serial" |
---|
575 | #tag EndViewProperty |
---|
576 | #tag ViewProperty |
---|
577 | Name="Baud" |
---|
578 | Visible=true |
---|
579 | Group="Behavior" |
---|
580 | InitialValue="13" |
---|
581 | Type="Integer" |
---|
582 | EditorType="Enum" |
---|
583 | InheritedFrom="serial" |
---|
584 | #tag EnumValues |
---|
585 | "0 - 300" |
---|
586 | "1 - 600" |
---|
587 | "2 - 1200" |
---|
588 | "3 - 1800" |
---|
589 | "4 - 2400" |
---|
590 | "5 - 3600" |
---|
591 | "6 - 4800" |
---|
592 | "7 - 7200" |
---|
593 | "8 - 9600" |
---|
594 | "9 - 14400" |
---|
595 | "10 - 19200" |
---|
596 | "11 - 28800" |
---|
597 | "12 - 38400" |
---|
598 | "13 - 57600" |
---|
599 | "14 - 115200" |
---|
600 | "15 - 230400" |
---|
601 | #tag EndEnumValues |
---|
602 | #tag EndViewProperty |
---|
603 | #tag ViewProperty |
---|
604 | Name="Bits" |
---|
605 | Visible=true |
---|
606 | Group="Behavior" |
---|
607 | InitialValue="3" |
---|
608 | Type="Integer" |
---|
609 | EditorType="Enum" |
---|
610 | InheritedFrom="serial" |
---|
611 | #tag EnumValues |
---|
612 | "0 - 5 Data Bits" |
---|
613 | "1 - 6 Data Bits" |
---|
614 | "2 - 7 Data Bits" |
---|
615 | "3 - 8 Data bits" |
---|
616 | #tag EndEnumValues |
---|
617 | #tag EndViewProperty |
---|
618 | #tag ViewProperty |
---|
619 | Name="Parity" |
---|
620 | Visible=true |
---|
621 | Group="Behavior" |
---|
622 | InitialValue="0" |
---|
623 | Type="Integer" |
---|
624 | EditorType="Enum" |
---|
625 | InheritedFrom="serial" |
---|
626 | #tag EnumValues |
---|
627 | "0 - No Parity" |
---|
628 | "1 - Odd Parity" |
---|
629 | "2 - EvenParity" |
---|
630 | #tag EndEnumValues |
---|
631 | #tag EndViewProperty |
---|
632 | #tag ViewProperty |
---|
633 | Name="Stop" |
---|
634 | Visible=true |
---|
635 | Group="Behavior" |
---|
636 | InitialValue="0" |
---|
637 | Type="Integer" |
---|
638 | EditorType="Enum" |
---|
639 | InheritedFrom="serial" |
---|
640 | #tag EnumValues |
---|
641 | "0 - 1 Stop Bit" |
---|
642 | "1 - 1.5 Stop Bits" |
---|
643 | "2 - 2 Stop Bits" |
---|
644 | #tag EndEnumValues |
---|
645 | #tag EndViewProperty |
---|
646 | #tag ViewProperty |
---|
647 | Name="XON" |
---|
648 | Visible=true |
---|
649 | Group="Behavior" |
---|
650 | Type="Boolean" |
---|
651 | InheritedFrom="serial" |
---|
652 | #tag EndViewProperty |
---|
653 | #tag ViewProperty |
---|
654 | Name="CTS" |
---|
655 | Visible=true |
---|
656 | Group="Behavior" |
---|
657 | Type="Boolean" |
---|
658 | InheritedFrom="serial" |
---|
659 | #tag EndViewProperty |
---|
660 | #tag ViewProperty |
---|
661 | Name="DTR" |
---|
662 | Visible=true |
---|
663 | Group="Behavior" |
---|
664 | Type="Boolean" |
---|
665 | InheritedFrom="serial" |
---|
666 | #tag EndViewProperty |
---|
667 | #tag ViewProperty |
---|
668 | Name="byte01" |
---|
669 | Group="Behavior" |
---|
670 | InitialValue="&hFF" |
---|
671 | Type="String" |
---|
672 | EditorType="MultiLineEditor" |
---|
673 | #tag EndViewProperty |
---|
674 | #tag ViewProperty |
---|
675 | Name="byte11" |
---|
676 | Group="Behavior" |
---|
677 | Type="String" |
---|
678 | EditorType="MultiLineEditor" |
---|
679 | #tag EndViewProperty |
---|
680 | #tag ViewProperty |
---|
681 | Name="byte12" |
---|
682 | Group="Behavior" |
---|
683 | Type="String" |
---|
684 | EditorType="MultiLineEditor" |
---|
685 | #tag EndViewProperty |
---|
686 | #tag ViewProperty |
---|
687 | Name="byte13" |
---|
688 | Group="Behavior" |
---|
689 | Type="String" |
---|
690 | EditorType="MultiLineEditor" |
---|
691 | #tag EndViewProperty |
---|
692 | #tag ViewProperty |
---|
693 | Name="byte14" |
---|
694 | Group="Behavior" |
---|
695 | Type="String" |
---|
696 | EditorType="MultiLineEditor" |
---|
697 | #tag EndViewProperty |
---|
698 | #tag ViewProperty |
---|
699 | Name="byte15" |
---|
700 | Group="Behavior" |
---|
701 | Type="String" |
---|
702 | EditorType="MultiLineEditor" |
---|
703 | #tag EndViewProperty |
---|
704 | #tag ViewProperty |
---|
705 | Name="byte16" |
---|
706 | Group="Behavior" |
---|
707 | Type="String" |
---|
708 | EditorType="MultiLineEditor" |
---|
709 | #tag EndViewProperty |
---|
710 | #tag ViewProperty |
---|
711 | Name="byte17" |
---|
712 | Group="Behavior" |
---|
713 | Type="String" |
---|
714 | EditorType="MultiLineEditor" |
---|
715 | #tag EndViewProperty |
---|
716 | #tag ViewProperty |
---|
717 | Name="byte18" |
---|
718 | Group="Behavior" |
---|
719 | Type="String" |
---|
720 | EditorType="MultiLineEditor" |
---|
721 | #tag EndViewProperty |
---|
722 | #tag ViewProperty |
---|
723 | Name="byte02" |
---|
724 | Group="Behavior" |
---|
725 | Type="String" |
---|
726 | EditorType="MultiLineEditor" |
---|
727 | #tag EndViewProperty |
---|
728 | #tag ViewProperty |
---|
729 | Name="byte03" |
---|
730 | Group="Behavior" |
---|
731 | Type="String" |
---|
732 | EditorType="MultiLineEditor" |
---|
733 | #tag EndViewProperty |
---|
734 | #tag ViewProperty |
---|
735 | Name="byte04" |
---|
736 | Group="Behavior" |
---|
737 | Type="String" |
---|
738 | EditorType="MultiLineEditor" |
---|
739 | #tag EndViewProperty |
---|
740 | #tag ViewProperty |
---|
741 | Name="byte05" |
---|
742 | Group="Behavior" |
---|
743 | Type="String" |
---|
744 | EditorType="MultiLineEditor" |
---|
745 | #tag EndViewProperty |
---|
746 | #tag ViewProperty |
---|
747 | Name="byte06" |
---|
748 | Group="Behavior" |
---|
749 | Type="String" |
---|
750 | EditorType="MultiLineEditor" |
---|
751 | #tag EndViewProperty |
---|
752 | #tag ViewProperty |
---|
753 | Name="byte07" |
---|
754 | Group="Behavior" |
---|
755 | Type="String" |
---|
756 | EditorType="MultiLineEditor" |
---|
757 | #tag EndViewProperty |
---|
758 | #tag ViewProperty |
---|
759 | Name="byte08" |
---|
760 | Group="Behavior" |
---|
761 | Type="String" |
---|
762 | EditorType="MultiLineEditor" |
---|
763 | #tag EndViewProperty |
---|
764 | #tag ViewProperty |
---|
765 | Name="byte09" |
---|
766 | Group="Behavior" |
---|
767 | Type="String" |
---|
768 | EditorType="MultiLineEditor" |
---|
769 | #tag EndViewProperty |
---|
770 | #tag ViewProperty |
---|
771 | Name="byte10" |
---|
772 | Group="Behavior" |
---|
773 | Type="String" |
---|
774 | EditorType="MultiLineEditor" |
---|
775 | #tag EndViewProperty |
---|
776 | #tag ViewProperty |
---|
777 | Name="carType" |
---|
778 | Group="Behavior" |
---|
779 | InitialValue="MR-03" |
---|
780 | Type="String" |
---|
781 | #tag EndViewProperty |
---|
782 | #tag ViewProperty |
---|
783 | Name="mode" |
---|
784 | Group="Behavior" |
---|
785 | InitialValue="read" |
---|
786 | Type="String" |
---|
787 | #tag EndViewProperty |
---|
788 | #tag EndViewBehavior |
---|
789 | End Class |
---|
790 | #tag EndClass |
---|