Ron Buchwald Posted March 15, 2011 Report Posted March 15, 2011 Hi Pete: I have made very good progress on my B777 overhead software and have 2 questions 1) I am using offsets 66c0-66ff. If my PGM works well, Can I keep these offset,after rights, Lic, and all, or will I need to use new offset? Can I just make up offsets? 2) How do I know what the offset type is, IE is it a BYTE, DOUBLE,SHORT, LONG, FLOAT,ARRAY ECT..... I would like to use BitArrays for this as they are most easy to write in VB 2010.net. Ron.
Pete Dowson Posted March 15, 2011 Report Posted March 15, 2011 1) I am using offsets 66c0-66ff. If my PGM works well, Can I keep these offset,after rights, Lic, and all, or will I need to use new offset? Can I just make up offsets? No, you can't just make them up. They may be in use already. The 66C0-66FF ones are free for individual use, but if you want to release software using offsets for others to use you need to get some specificaly assigned. Just email me (petedowson@btconnect.com) with the number of bytes you need, and I'll assign them. Please try to be compact -- there's only a finite range. 2) How do I know what the offset type is, IE is it a BYTE, DOUBLE,SHORT, LONG, FLOAT,ARRAY ECT..... Offsets are just bytes in memory. You can use them singly, in pairs or whatever, as you wish. It is up to your programming needs. I would like to use BitArrays for this as they are most easy to write in VB 2010.net. Bit arrays? Really? Are they supported as a data type in VB? Wow. The underlying code must use Shifts, And's and Or's to access the bits because no Intel processor types supports such a type directly. Regards Pete
Ron Buchwald Posted March 15, 2011 Author Report Posted March 15, 2011 Bit arrays? Really? Are they supported as a data type in VB? Wow. The underlying code must use Shifts, And's and Or's to access the bits because no Intel processor types supports such a type directly] Not sure what you mean by the Intel stuff, In the PM software, example=(&H5626.0, 5626.2 and so on) Any way, thats what they call them,(BitArray) in VB.Net. I only use AMD chips. So To get assinged offsets, Does It cost me money for them? Ron.
Pete Dowson Posted March 15, 2011 Report Posted March 15, 2011 Not sure what you mean by the Intel stuff Intel-type processors, like those made by Intel and AMD, which are the brains of your PC or Laptop. The ones FS runs on. In the PM software, example=(&H5626.0, 5626.2 and so on) I didn't write PM, but when they use the XXXX.Y notation they mean bit Y in offset XXXX. So the size is 1 bit. However, to access that bit necessitates a shift and an AND (to clear it or test it) or an OR (to set it). Individual bits aren't addressable. When PM provides the length instead (as does my offsets list), then 1 = 1 byte = 8 bits = 1 BYTE 2 = 2 bytes = 16 bits = 1 WORD 4 = 4 bytes = 32 bits = 1 DWORD 8 = 8 bytes = 64 bits = 1 QWORD In floating point there a 4 and 8 byte versions, 4 = FLOAT, 8 = DOUBLE And strings are simply BYTE arrays, with one character in each byte. A string can be any length, and, as per C/C++ practice, are usually (but not always) terminated by a zero byte. I believe this is completely different in VB however. You usually need to read and write strings in FS as byte arrays, not VB strings. So To get assinged offsets, Does It cost me money for them? No. Regards Pete
Ron Buchwald Posted March 15, 2011 Author Report Posted March 15, 2011 I didn't write PM, but when they use the XXXX.Y notation they mean bit Y in offset XXXX. So the size is 1 bit. However, to access that bit necessitates a shift and an AND (to clear it or test it) or an OR (to set it). Individual bits aren't addressable. Thanks Pete, I kind of understand. Below is how I am assigning the offsets. Dim LDRIVEOIL As Offset(Of BitArray) = New Offset(Of BitArray)(&H561F, 2)' LDRIVE LOW OIL IDG BIT 4 Dim RDRIVEOIL As Offset(Of BitArray) = New Offset(Of BitArray)(&H561F, 2)' RDRIVE LOW OIL IDG BIT 5 Then the code is: Dim ENG1N1 As Double = (FS1N2.Value * 100D / 16384D) ' ENG 1 N1 Me.TextBox6.Text = ENG1N1.ToString("f1") If ENG1N1 > 10 Then Me.Label37.ForeColor = Color.Green Me.lDrive.BorderColor = Color.Green Me.LDRIVEOIL.Value(4) = False Else Me.Label37.ForeColor = Color.DarkOrange Me.lDrive.BorderColor = Color.DarkOrange Me.LDRIVEOIL.Value(4) = True End If So it should be called BYTE ARRAY, I guess, but it is not. Any way It works. In VB.NET I can say AND,OR. I do have to call a class called Bit Array, to use that function. I don't know how many offset I will need so I will use 66c0-66ff for now to be safe. Thanks again. Ron.
Pete Dowson Posted March 15, 2011 Report Posted March 15, 2011 Thanks Pete, I kind of understand. Below is how I am assigning the offsets. I'm afraid all that is a kind of gibberish to me. I'm not a VB person. I'm glad it works for you. Regards Pete
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now