View previous topic :: View next topic |
Author |
Message |
Mark Pierson Expert
Joined: 03 Aug 2003 Posts: 3017 Location: Connecticut, USA |
Posted: Sat Oct 18, 2003 10:24 am Post subject: Manual Settings in RM |
|
|
In another post, johnsfine wrote: | RM's protocols.ini file is a simple text file, so when you want to use RM for a custom protocol, you can just create an entry in its protocols.ini file and specify any translation you like between OBC and hex command. |
RM's protocols.ini syntax can be quite intimidating. Since Greg seems to be very good at wrapping thing up in the UI, maybe he can add a "Manual Settings" capability to RM where the user selects all these details via checkboxes and dropdowns, along with the ability to import p-code from sources like protocol-builder. All this detail would then be saved in the .rmdu file so that a), future versions of protocols.ini don't overwrite custom user entries, and b), the data is available to anyone who uses the upgrade file. _________________ Mark |
|
Back to top |
|
|
gfb107 Expert
Joined: 03 Aug 2003 Posts: 3411 Location: Cary, NC |
Posted: Sun Oct 19, 2003 6:09 pm Post subject: |
|
|
I'll take a look at what KM does for the "Manual Settings" protocol, and see if I can't throw something together.
In KM, the Signal Sytle value determines both the Device N to Fixed Data calculation and the OBC to Hex calculation. Is that same behavior appropriate for RM?
I could use an explanation of what the Bits/Dev and Bits/Cmd fields are supposed to do. _________________ -- Greg
Original RemoteMaster developer
JP1 How-To's and Software Tools
The #1 Code Search FAQ and it's answer (PLEASE READ FIRST) |
|
Back to top |
|
|
jon_armstrong Expert
Joined: 03 Aug 2003 Posts: 1238 Location: R.I.P. 3/25/2005 |
Posted: Sun Oct 19, 2003 7:44 pm Post subject: |
|
|
Greg,
Since I just tested this feature in KM Master, I'll start and hopefully Mark and John will correct me if I get it wrong or over-generalize.
In LSB it really doesn't matter because when you define a field width in a protocol because it always starts from the left and in LSB that IS the least significant bit.
If your protocol is MSB and less then 8-bits, then you want to shift the bits 8-n to the left (where n is the number of bits in a byte). A simple example is a 4-bit MSB byte. If the real value is 0x1 then it becomes 0x1X where the nibble X can be any value, except for some protocols where the unused bits act as control bits. The complements are just subtracting the byte from FF. _________________ -Jon |
|
Back to top |
|
|
gfb107 Expert
Joined: 03 Aug 2003 Posts: 3411 Location: Cary, NC |
|
Back to top |
|
|
Mark Pierson Expert
Joined: 03 Aug 2003 Posts: 3017 Location: Connecticut, USA |
Posted: Mon Oct 20, 2003 4:58 am Post subject: |
|
|
gfb107 wrote: | KM allows up to 15 bits. |
Not anymore. The next release will limit them to 8 each. _________________ Mark |
|
Back to top |
|
|
gfb107 Expert
Joined: 03 Aug 2003 Posts: 3411 Location: Cary, NC |
|
Back to top |
|
|
johnsfine Site Admin
Joined: 10 Aug 2003 Posts: 4766 Location: Bedford, MA |
Posted: Mon Oct 20, 2003 7:42 am Post subject: |
|
|
jon_armstrong wrote: |
In LSB it really doesn't matter because when you define a field width in a protocol because it always starts from the left and in LSB that IS the least significant bit. |
That length might not matter much for LSB, but for simplicity and clarity we can pretend it does.
That length is the "bits" value documented as the second argument of a "Translator" definition in protocols.ini
The length does matter a little even in LSB:
In LSB, if the OBC were 50 then a length of 6, 7 or 8 would all do the same thing, but if the OBC were 64 a length of 6 would treat the OBC like 0, while 7 or 8 would encode the 64.
jon_armstrong wrote: | If your protocol is MSB and less then 8-bits, then you want to shift the bits 8-n to the left |
The "Translator" class in RM already knows all that processing. Just specify the index and length, and whether it's msb or lsb and whether or not it's comp and the processing is already there.
I didn't really follow (in KM or) in this thread, what is desired for multiple bytes. I expect a Translator is required for each byte and the msboffset argument of Translator must be 8 times the index (meaning the bytes in fixed data go in exactly the same sequence as they do in the device GUI). |
|
Back to top |
|
|
|