#tag Class Protected Class ICSSerialPort Inherits serial #tag Event Sub DataAvailable() //Add to the buffer first buffer = buffer + me.ReadAll //Figure out if we need to do anything select case mode case "read" dim flagstart as integer dim datastart as integer //We need to decode the packet to figure out the values //First we need to make sure we have enough data //If not we need to wait for more flagstart = InStrb(buffer, ChrB(&h5A)) if flagstart = 0 then //We did not find a match so we can discard the data and wait for more buffer = "" return ElseIf lenb(buffer) < 17 + flagStart - 1 then // we do not have a complete packet return and wait return end if datastart = flagstart + 1 byte03 = midb(buffer, datastart, 1) byte04 = midb(buffer, datastart+1, 1) byte05 = midb(buffer, datastart+2, 1) byte06 = midb(buffer, datastart+3, 1) byte07 = midb(buffer, datastart+4, 1) byte08 = midb(buffer, datastart+5, 1) byte09 = midb(buffer, datastart+6, 1) byte10 = midb(buffer, datastart+7, 1) byte11 = midb(buffer, datastart+8, 1) byte12 = midb(buffer, datastart+9, 1) byte13 = midb(buffer, datastart+10, 1) byte14 = midb(buffer, datastart+11, 1) byte15 = midb(buffer, datastart+12, 1) byte16 = midb(buffer, datastart+13, 1) byte17 = midb(buffer, datastart+14, 1) valuesChanged() else //We do not care about the data, discard it buffer = "" end select End Sub #tag EndEvent #tag Method, Flags = &h0 Sub calculateChecksum() //Use this to calculate byte 18, the checksum //The checksum is just adding bytes 2-17 together but rounded at each byte dim i as integer i = (asc(byte02) + asc(byte03)) mod &h100 i = (i + asc(byte04)) mod &h100 i = (i + asc(byte05)) mod &h100 i = (i + asc(byte06)) mod &h100 i = (i + asc(byte07)) mod &h100 i = (i + asc(byte08)) mod &h100 i = (i + asc(byte09)) mod &h100 i = (i + asc(byte10)) mod &h100 i = (i + asc(byte11)) mod &h100 i = (i + asc(byte12)) mod &h100 i = (i + asc(byte13)) mod &h100 i = (i + asc(byte14)) mod &h100 i = (i + asc(byte15)) mod &h100 i = (i + asc(byte16)) mod &h100 i = (i + asc(byte17)) mod &h100 byte18 = chrb(i) End Sub #tag EndMethod #tag Method, Flags = &h0 Sub Constructor() //Make sure we have a database and if not create it dim exists as boolean exists = prepareDB() if exists = false then //No database available, create one createDB() else //Database exists, connect to it if fsicsdb.Connect = false then MsgBox "Database connection failed" end if end if //Set default byte values byte01 = chrb(&hD5) byte02 = chrb(&h5A) byte03 = chrb(&h64) byte04 = chrb(&hFF) byte05 = chrb(&h02) byte06 = chrb(&h02) byte07 = chrb(&h01) byte08 = chrb(&hFF) byte09 = chrb(&hBC) byte10 = chrb(&h44) byte11 = chrb(&h88) byte12 = chrb(&h78) byte13 = chrb(&hFF) byte14 = chrb(&h2C) byte15 = chrb(&h05) byte16 = chrb(&h5A) byte17 = chrb(&h3C) byte18 = chrb(&h87) carType = "MR-03" End Sub #tag EndMethod #tag Method, Flags = &h21 Private Sub createDB() //Create a new database //make sure we can create the file if fsicsdb.CreateDatabaseFile() then if fsicsdb.Connect() then dim query as string query = "CREATE TABLE carprofiles (id INTEGER PRIMARY KEY, name VARCHAR, cartype VARCHAR, byte01 INTEGER, byte02 INTEGER, byte03 INTEGER, byte04 INTEGER, byte05 INTEGER, byte06 INTEGER"+_ ", byte07 INTEGER, byte08 INTEGER, byte09 INTEGER, byte10 INTEGER, byte11 INTEGER, byte12 INTEGER, byte13 INTEGER, byte14 INTEGER, byte15 INTEGER, byte16 INTEGER, byte17 INTEGER"+_ ", byte18 INTEGER, UNIQUE(name))" fsicsdb.SQLExecute(query) if fsicsdb.Error then MsgBox "Database Error (carprofiles):" + fsicsdb.ErrorMessage fsicsdb.Rollback else fsicsdb.Commit end if else MsgBox "Failed to connect to new database file" end if else //Failed to create database file MsgBox "Failed to create database file" end if End Sub #tag EndMethod #tag Method, Flags = &h0 Function createProfile(theName as String) As Boolean dim success as boolean success = false //Make sure we got a name if theName = "" then return success else //Build a new database record dim rec as DatabaseRecord rec = New DatabaseRecord rec.Column("name") = theName rec.Column("cartype") = carType rec.IntegerColumn("byte01") = asc(byte01) rec.IntegerColumn("byte02") = asc(byte02) rec.IntegerColumn("byte03") = asc(byte03) rec.IntegerColumn("byte04") = asc(byte04) rec.IntegerColumn("byte05") = asc(byte05) rec.IntegerColumn("byte06") = asc(byte06) rec.IntegerColumn("byte07") = asc(byte07) rec.IntegerColumn("byte08") = asc(byte08) rec.IntegerColumn("byte09") = asc(byte09) rec.IntegerColumn("byte10") = asc(byte10) rec.IntegerColumn("byte11") = asc(byte11) rec.IntegerColumn("byte12") = asc(byte12) rec.IntegerColumn("byte13") = asc(byte13) rec.IntegerColumn("byte14") = asc(byte14) rec.IntegerColumn("byte15") = asc(byte15) rec.IntegerColumn("byte16") = asc(byte16) rec.IntegerColumn("byte17") = asc(byte17) rec.IntegerColumn("byte18") = asc(byte18) fsicsdb.InsertRecord("carprofiles", rec) if fsicsdb.Error = True then MsgBox "Error creating profile, " + fsicsdb.ErrorMessage fsicsdb.Rollback else fsicsdb.Commit success = true end if end if Return success End Function #tag EndMethod #tag Method, Flags = &h0 Sub deleteProfile(theName as String) if theName <> "" then //Delete the profile selected fsicsdb.SQLExecute("DELETE FROM carprofiles WHERE name = '" + theName + "'") //Check for errors if fsicsdb.Error = True then MsgBox "Error deleting profile" fsicsdb.Rollback else fsicsdb.Commit end if else MsgBox "Please select a profile to delete" end if End Sub #tag EndMethod #tag Method, Flags = &h0 Sub exportProfile(theName as string) dim xml as XmlDocument dim root as XmlNode dim rootchild as XmlNode dim rs as RecordSet dim i as integer dim dlg as SaveAsDialog dim f as FolderItem dlg = New SaveAsDialog dlg.Title = "Export your profile" #if TargetLinux dlg.InitialDirectory = SpecialFolder.Home #else dlg.InitialDirectory = SpecialFolder.Documents #endif dlg.SuggestedFileName = "ics_"+theName+".xml" f = dlg.ShowModal() if f <> Nil then //Nothing to see here, move along else MsgBox "You must choose a file" Return end if //Find the record rs = fsicsdb.SQLSelect("SELECT * FROM carprofiles WHERE name= '"+theName+"'") if rs <> Nil then //We have a record, so do something //Create the root element of the XML file xml = New XmlDocument root = xml.AppendChild(xml.CreateElement("icsprofile")) //Itterate all available fields and write them to the xml document for i = 1 to rs.FieldCount if rs.IdxField(i).Name <> "" and rs.IdxField(i).StringValue<> "" then rootchild = root.AppendChild(xml.CreateElement(rs.IdxField(i).Name)) rootchild.AppendChild(xml.CreateTextNode(rs.IdxField(i).StringValue)) end if next //Write the document to a file xml.SaveXml(f) else MsgBox "No profile to export" Return end if End Sub #tag EndMethod #tag Method, Flags = &h0 Function importProfile() As Boolean dim success as boolean dim dlg as OpenDialog dim f as FolderItem dim xdoc as XmlDocument dim root as XmlNode dim i as integer dim count as Integer dim item as string dim rec as DatabaseRecord dim theName as string rec = New DatabaseRecord success = False //Get the user to select a file dlg = New OpenDialog dlg.Title = "Select a profile to import" #if TargetLinux dlg.InitialDirectory = SpecialFolder.Home #else dlg.InitialDirectory = SpecialFolder.Documents #endif f = dlg.ShowModal() //If we have a valid file we need to read it as an xml file to process it //Items are individually specified to prevent the program from trying to insert columns that do not exist //All column names should match the database table if f <> nil then //Read the XML file xdoc = New XmlDocument(f) count = xdoc.DocumentElement.ChildCount for i = 0 to count - 1 root = xdoc.DocumentElement.Child(i) item = root.FirstChild.Value select case root.Name case "name" theName = item case "cartype" carType = item case "byte01" byte01 = chrb(val(item)) case "byte02" byte02 = chrb(val(item)) case "byte03" byte03 = chrb(val(item)) case "byte04" byte04 = chrb(val(item)) case "byte05" byte05 = chrb(val(item)) case "byte06" byte06 = chrb(val(item)) case "byte07" byte07 = chrb(val(item)) case "byte08" byte08 = chrb(val(item)) case "byte09" byte09 = chrb(val(item)) case "byte10" byte10 = chrb(val(item)) case "byte11" byte11 = chrb(val(item)) case "byte12" byte12 = chrb(val(item)) case "byte13" byte13 = chrb(val(item)) case "byte14" byte14 = chrb(val(item)) case "byte15" byte15 = chrb(val(item)) case "byte16" byte16 = chrb(val(item)) case "byte17" byte17 = chrb(val(item)) case "byte18" byte18 = chrb(val(item)) end select next else //File not select we can stop success = False return success end if //Now check to make sure their is not an existing profile with this name dim rs as RecordSet rs = fsicsdb.SQLSelect("SELECT * FROM carprofiles WHERE name= '"+theName+"'") if rs <> Nil then if rs.RecordCount > 0 then //we have a duplicate record //we need to prompt the user about what to do dim d as New MessageDialog dim b as MessageDialogButton d.Icon = MessageDialog.GraphicCaution d.ActionButton.Caption = "Yes" d.CancelButton.Visible = True d.CancelButton.Caption = "No" d.Message = "A profile exists with this name, do you want to overwrite the existing profile?" b = d.ShowModal //Now determine what the user chose Select Case b case d.ActionButton //The user wants to overwrite the record so we can just save what we have saveProfile(theName) success = True //Values changed because of the overwrite valuesChanged() case d.CancelButton //The user chose not to overwrite the record, we need to come up with a new name //We will increment the number until we find a name not used or we hit 32 just in case an infinite loop would occur dim tempString as string dim tempName as string i = 0 while rs.RecordCount > 0 i = i + 1 tempString = str(i) tempName = theName + tempString //Check to make sure we are not in an infinite looooooooop //If we are something went wrong if i > 31 then exit While end if rs = fsicsdb.SQLSelect("SELECT * FROM carprofiles WHERE name = '"+tempName+"'") wend //OK we have a unique name at this point theName = theName + tempString saveProfile(theName) success = True //new profile was imported profileImported(theName) end select else //No duplicate exists so we can just insert the record saveProfile(theName) success = True //new profile was imported profileImported(theName) end if //Close our record rs.Close end if Return success End Function #tag EndMethod #tag Method, Flags = &h0 Function listProfiles() As String() dim rs as RecordSet dim s() as string //Find records rs = fsicsdb.SQLSelect("SELECT name FROM carprofiles") if rs <> nil then while rs.EOF = false s.Append rs.Field("name").StringValue rs.MoveNext wend end if rs.Close Return s() End Function #tag EndMethod #tag Method, Flags = &h0 Sub loadProfile(theName as string) //Find the profile in the database, update the bytes and fire the event dim rs as RecordSet rs = fsicsdb.SQLSelect("SELECT * FROM carprofiles WHERE name= '"+theName+"'") //Make sure we got a record to work with if rs <> Nil then if rs.Field("cartype").StringValue <> "" then carType = rs.Field("cartype").StringValue end if if rs.Field("byte01").StringValue <> "" then byte01 = chrb(rs.Field("byte01").IntegerValue) end if if rs.Field("byte02").StringValue <> "" then byte02 = chrb(rs.Field("byte02").IntegerValue) end if if rs.Field("byte03").StringValue <> "" then byte03 = chrb(rs.Field("byte03").IntegerValue) end if if rs.Field("byte04").StringValue <> "" then byte04 = chrb(rs.Field("byte04").IntegerValue) end if if rs.Field("byte05").StringValue <> "" then byte05 = chrb(rs.Field("byte05").IntegerValue) end if if rs.Field("byte06").StringValue <> "" then byte06 = chrb(rs.Field("byte06").IntegerValue) end if if rs.Field("byte07").StringValue <> "" then byte07 = chrb(rs.Field("byte07").IntegerValue) end if if rs.Field("byte08").StringValue <> "" then byte08 = chrb(rs.Field("byte08").IntegerValue) end if if rs.Field("byte09").StringValue <> "" then byte09 = chrb(rs.Field("byte09").IntegerValue) end if if rs.Field("byte10").StringValue <> "" then byte10 = chrb(rs.Field("byte10").IntegerValue) end if if rs.Field("byte11").StringValue <> "" then byte11 = chrb(rs.Field("byte11").IntegerValue) end if if rs.Field("byte12").StringValue <> "" then byte12 = chrb(rs.Field("byte12").IntegerValue) end if if rs.Field("byte13").StringValue <> "" then byte13 = chrb(rs.Field("byte13").IntegerValue) end if if rs.Field("byte14").StringValue <> "" then byte14 = chrb(rs.Field("byte14").IntegerValue) end if if rs.Field("byte15").StringValue <> "" then byte15 = chrb(rs.Field("byte15").IntegerValue) end if if rs.Field("byte16").StringValue <> "" then byte16 = chrb(rs.Field("byte16").IntegerValue) end if if rs.Field("byte17").StringValue <> "" then byte17 = chrb(rs.Field("byte17").IntegerValue) end if if rs.Field("byte18").StringValue <> "" then byte18 = chrb(rs.Field("byte18").IntegerValue) end if valuesChanged() end if End Sub #tag EndMethod #tag Method, Flags = &h21 Private Function prepareDB() As Boolean //Open the database file fsicsdb = new REALSQLDatabase dim f as FolderItem = GetFolderItem("fsicsdb") fsicsdb.DatabaseFile = f return f.Exists End Function #tag EndMethod #tag Method, Flags = &h0 Sub readCar() //Read values from the currently attached car dim sendstring as string mode = "read" sendstring = chrb(&hC5) me.Write(sendstring) End Sub #tag EndMethod #tag Method, Flags = &h0 Sub resetCar() //This sends the command to reset the car back to a default configuration //Defaults are different for each car type setDefaultValues //Send the default values to the car writeCar End Sub #tag EndMethod #tag Method, Flags = &h0 Sub saveProfile(theName as String) if theName <> "" then dim rs as RecordSet dim status as Boolean //Find a record rs = fsicsdb.SQLSelect("SELECT * FROM carprofiles WHERE name= '"+theName+"'") //Make sure we got a record if rs <> nil then //delete the record before saving deleteProfile(theName) end if rs.Close status = createProfile(theName) else MsgBox "Please select a profile to modify" end if End Sub #tag EndMethod #tag Method, Flags = &h0 Sub setCarType(value as string) //When setting car type we must reconfigure the serial port //Some car types have a different baud rate select case value case "MR-03" carType = value byte15 = chrb(&h05) byte16 = chrb(&h5A) byte17 = chrb(&h3C) case "dNaNo" carType = value byte15 = chrb(&hFF) byte16 = chrb(&h80) byte17 = chrb(&h80) case "ASF" carType = value byte15 = chrb(&hFF) byte16 = chrb(&hFF) byte17 = chrb(&hFF) else MsgBox "Error setting Car Type" end select valuesChanged() End Sub #tag EndMethod #tag Method, Flags = &h0 Sub setDefaultValues() //Set the defaults for the bytes sent to a car select case carType case "MR-03" byte01 = chrb(&hD5) byte02 = chrb(&h5A) byte03 = chrb(&h64) byte04 = chrb(&hFF) byte05 = chrb(&h02) byte06 = chrb(&h02) byte07 = chrb(&h01) byte08 = chrb(&hFF) byte09 = chrb(&hBC) byte10 = chrb(&h44) byte11 = chrb(&h88) byte12 = chrb(&h78) byte13 = chrb(&hFF) byte14 = chrb(&h2C) byte15 = chrb(&h05) byte16 = chrb(&h5A) byte17 = chrb(&h3C) byte18 = chrb(&h87) case "dNaNo" byte01 = chrb(&hD5) byte02 = chrb(&h5A) byte03 = chrb(&hFF) byte04 = chrb(&hFF) byte05 = chrb(&h0A) byte06 = chrb(&h03) byte07 = chrb(&h01) byte08 = chrb(&h40) byte09 = chrb(&hBC) byte10 = chrb(&h44) byte11 = chrb(&h88) byte12 = chrb(&h78) byte13 = chrb(&h03) byte14 = chrb(&hFF) byte15 = chrb(&hFF) byte16 = chrb(&h80) byte17 = chrb(&h80) byte18 = chrb(&hA7) case "ASF" byte01 = chrb(&hD5) byte02 = chrb(&h5A) byte03 = chrb(&hFF) byte04 = chrb(&hFF) byte05 = chrb(&h0A) byte06 = chrb(&h03) byte07 = chrb(&h01) byte08 = chrb(&h78) byte09 = chrb(&hBC) byte10 = chrb(&h44) byte11 = chrb(&h88) byte12 = chrb(&h78) byte13 = chrb(&h03) byte14 = chrb(&hFF) byte15 = chrb(&hFF) byte16 = chrb(&hFF) byte17 = chrb(&hFF) byte18 = chrb(&hDD) else //default thing to do MsgBox "Error invalid car type" return end select //trigger the event definition so main program knows the values changed valuesChanged() End Sub #tag EndMethod #tag Method, Flags = &h0 Sub writeCar() //Send set bytes to the car mode = "write" dim sendstring as string calculateChecksum() sendstring = byte01 + byte02 + byte03 + byte04 + byte05 + byte06 + byte07 + byte08 + byte09 + byte10 + byte11 + byte12 + byte13 + byte14 + byte15 + byte16 + byte17 + byte18 me.Write(sendstring) End Sub #tag EndMethod #tag Hook, Flags = &h0 Event profileImported(profileName as string) #tag EndHook #tag Hook, Flags = &h0 Event valuesChanged() #tag EndHook #tag Note, Name = General Car type must be set for this to operate Car types supported by this application are MR-03 dNaNo ASF #tag EndNote #tag Note, Name = License Copyright 2010 Jeremy Auten This file is part of Flip Side ICS Software. Flip Side ICS Software is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Flip Side ICS Software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Flip Side ICS Software. If not, see . #tag EndNote #tag Property, Flags = &h21 Private buffer As String #tag EndProperty #tag Property, Flags = &h0 byte01 As String #tag EndProperty #tag Property, Flags = &h0 byte02 As String #tag EndProperty #tag Property, Flags = &h0 byte03 As String #tag EndProperty #tag Property, Flags = &h0 byte04 As String #tag EndProperty #tag Property, Flags = &h0 byte05 As String #tag EndProperty #tag Property, Flags = &h0 byte06 As String #tag EndProperty #tag Property, Flags = &h0 byte07 As String #tag EndProperty #tag Property, Flags = &h0 byte08 As String #tag EndProperty #tag Property, Flags = &h0 byte09 As String #tag EndProperty #tag Property, Flags = &h0 byte10 As String #tag EndProperty #tag Property, Flags = &h0 byte11 As String #tag EndProperty #tag Property, Flags = &h0 byte12 As String #tag EndProperty #tag Property, Flags = &h0 byte13 As String #tag EndProperty #tag Property, Flags = &h0 byte14 As String #tag EndProperty #tag Property, Flags = &h0 byte15 As String #tag EndProperty #tag Property, Flags = &h0 byte16 As String #tag EndProperty #tag Property, Flags = &h0 byte17 As String #tag EndProperty #tag Property, Flags = &h0 byte18 As String #tag EndProperty #tag Property, Flags = &h0 carType As String = "MR-03" #tag EndProperty #tag Property, Flags = &h0 fsicsdb As REALSQLDatabase #tag EndProperty #tag Property, Flags = &h21 Private mode As String = "none" #tag EndProperty #tag ViewBehavior #tag ViewProperty Name="Baud" Visible=true Group="Behavior" InitialValue="13" Type="Integer" EditorType="Enum" InheritedFrom="serial" #tag EnumValues "0 - 300" "1 - 600" "2 - 1200" "3 - 1800" "4 - 2400" "5 - 3600" "6 - 4800" "7 - 7200" "8 - 9600" "9 - 14400" "10 - 19200" "11 - 28800" "12 - 38400" "13 - 57600" "14 - 115200" "15 - 230400" #tag EndEnumValues #tag EndViewProperty #tag ViewProperty Name="Bits" Visible=true Group="Behavior" InitialValue="3" Type="Integer" EditorType="Enum" InheritedFrom="serial" #tag EnumValues "0 - 5 Data Bits" "1 - 6 Data Bits" "2 - 7 Data Bits" "3 - 8 Data bits" #tag EndEnumValues #tag EndViewProperty #tag ViewProperty Name="byte01" Group="Behavior" InitialValue="&hFF" Type="String" EditorType="MultiLineEditor" #tag EndViewProperty #tag ViewProperty Name="byte02" Group="Behavior" Type="String" EditorType="MultiLineEditor" #tag EndViewProperty #tag ViewProperty Name="byte03" Group="Behavior" Type="String" EditorType="MultiLineEditor" #tag EndViewProperty #tag ViewProperty Name="byte04" Group="Behavior" Type="String" EditorType="MultiLineEditor" #tag EndViewProperty #tag ViewProperty Name="byte05" Group="Behavior" Type="String" EditorType="MultiLineEditor" #tag EndViewProperty #tag ViewProperty Name="byte06" Group="Behavior" Type="String" EditorType="MultiLineEditor" #tag EndViewProperty #tag ViewProperty Name="byte07" Group="Behavior" Type="String" EditorType="MultiLineEditor" #tag EndViewProperty #tag ViewProperty Name="byte08" Group="Behavior" Type="String" EditorType="MultiLineEditor" #tag EndViewProperty #tag ViewProperty Name="byte09" Group="Behavior" Type="String" EditorType="MultiLineEditor" #tag EndViewProperty #tag ViewProperty Name="byte10" Group="Behavior" Type="String" EditorType="MultiLineEditor" #tag EndViewProperty #tag ViewProperty Name="byte11" Group="Behavior" Type="String" EditorType="MultiLineEditor" #tag EndViewProperty #tag ViewProperty Name="byte12" Group="Behavior" Type="String" EditorType="MultiLineEditor" #tag EndViewProperty #tag ViewProperty Name="byte13" Group="Behavior" Type="String" EditorType="MultiLineEditor" #tag EndViewProperty #tag ViewProperty Name="byte14" Group="Behavior" Type="String" EditorType="MultiLineEditor" #tag EndViewProperty #tag ViewProperty Name="byte15" Group="Behavior" Type="String" EditorType="MultiLineEditor" #tag EndViewProperty #tag ViewProperty Name="byte16" Group="Behavior" Type="String" EditorType="MultiLineEditor" #tag EndViewProperty #tag ViewProperty Name="byte17" Group="Behavior" Type="String" EditorType="MultiLineEditor" #tag EndViewProperty #tag ViewProperty Name="byte18" Group="Behavior" Type="String" EditorType="MultiLineEditor" #tag EndViewProperty #tag ViewProperty Name="CTS" Visible=true Group="Behavior" Type="Boolean" InheritedFrom="serial" #tag EndViewProperty #tag ViewProperty Name="DTR" Visible=true Group="Behavior" Type="Boolean" InheritedFrom="serial" #tag EndViewProperty #tag ViewProperty Name="Index" Visible=true Group="ID" Type="Integer" InheritedFrom="serial" #tag EndViewProperty #tag ViewProperty Name="Left" Visible=true Group="Position" InheritedFrom="serial" #tag EndViewProperty #tag ViewProperty Name="Name" Visible=true Group="ID" InheritedFrom="serial" #tag EndViewProperty #tag ViewProperty Name="Parity" Visible=true Group="Behavior" InitialValue="0" Type="Integer" EditorType="Enum" InheritedFrom="serial" #tag EnumValues "0 - No Parity" "1 - Odd Parity" "2 - EvenParity" #tag EndEnumValues #tag EndViewProperty #tag ViewProperty Name="Stop" Visible=true Group="Behavior" InitialValue="0" Type="Integer" EditorType="Enum" InheritedFrom="serial" #tag EnumValues "0 - 1 Stop Bit" "1 - 1.5 Stop Bits" "2 - 2 Stop Bits" #tag EndEnumValues #tag EndViewProperty #tag ViewProperty Name="Super" Visible=true Group="ID" InheritedFrom="serial" #tag EndViewProperty #tag ViewProperty Name="Top" Visible=true Group="Position" InheritedFrom="serial" #tag EndViewProperty #tag ViewProperty Name="XON" Visible=true Group="Behavior" Type="Boolean" InheritedFrom="serial" #tag EndViewProperty #tag EndViewBehavior End Class #tag EndClass