Manual Settings in RM

Discussion forum for JP1 software tools currently in use, or being developed, such as IR, KM, RemoteMaster, and other misc apps/tools.

Moderator: Moderators

Post Reply
Mark Pierson
Expert
Posts: 3023
Joined: Sun Aug 03, 2003 12:13 am
Location: Connecticut, USA
Contact:

Manual Settings in RM

Post by Mark Pierson »

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
gfb107
Expert
Posts: 3411
Joined: Sun Aug 03, 2003 7:18 pm
Location: Cary, NC
Contact:

Post by gfb107 »

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.
jon_armstrong
Expert
Posts: 1238
Joined: Sun Aug 03, 2003 9:14 pm
Location: R.I.P. 3/25/2005
Contact:

Post by jon_armstrong »

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
gfb107
Expert
Posts: 3411
Joined: Sun Aug 03, 2003 7:18 pm
Location: Cary, NC
Contact:

Post by gfb107 »

OK, but what about more than 8 bits? KM allows up to 15 bits.
Mark Pierson
Expert
Posts: 3023
Joined: Sun Aug 03, 2003 12:13 am
Location: Connecticut, USA
Contact:

Post by Mark Pierson »

gfb107 wrote:KM allows up to 15 bits.
Not anymore. The next release will limit them to 8 each.
Mark
gfb107
Expert
Posts: 3411
Joined: Sun Aug 03, 2003 7:18 pm
Location: Cary, NC
Contact:

Post by gfb107 »

Mark Pierson wrote:Not anymore. The next release will limit them to 8 each.
Ok, that makes things easier. Let's see what I can come up with.
johnsfine
Site Admin
Posts: 4766
Joined: Sun Aug 10, 2003 5:00 pm
Location: Bedford, MA
Contact:

Post by johnsfine »

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).
Post Reply