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