Re: [LHA-misc] Line parsing routine
Status: Beta
Brought to you by:
ncherry
From: Jay H. <jh...@fa...> - 2000-11-27 00:37:28
|
At 04:37 PM 11/26/00 -0500, you wrote: >Quoting Neil Cherry <nc...@ho...>: > > > > > This was taken from Jay Hogg's recommendation, I hate it because > > it's > > hard to remember (and !12000200 is?) but it is simple and I > > think it > > covers all types of commands that can be sent. Maybe instead of > > value > > we can change that to num= , str=, hex=, oct=, etc? > > > > Hey this is becoming more object oriented! > > > >TO save bandwidth, but make it somewhat readable for debugging, perhaps >you should use single or double char commands. > >Stuff like N=, etc. But that kinda limits you. But keeping things 3 >chars or less would do fine. Hey Neil, If you don't like it I'm game for changes... What I've got implemented as far as commands are: USER <user id> PASS <password> QUIT HELP (displays allowed commands) LANG (tells language variants - AGENT-1.0 MCUSTOM) SET <> GET <> NOTIFY <> (Sets notification events to be received) Mxxx <> (Module specific for "playing", dlding code/IR on ocelot General format of addresses is: [device name:]device.domain.point [device name:]device.domain.group.point Where: [device name:] is used from the server side to identify an agent device is the particular address within an agent Ocelots: 0=Ocelot, 1..N=Adicon Bus ADICON: 0..N=Bus RCS Themostats 0..N = Controller # (rs485) or 0 for Serial Napco P9600 0=Main Unit (no others) domain is the area within the device: Ocelot & ADICON: 0=X10, 1=IR, 2=Inputs, 3=Outputs, 100=Parms, 101=Timers, 102=Vars RCS Themostats Domain = Zone Napco 0=Areas, 1=Keypads, 2=Sensors, 3=Relays item is the particular variable within the domain group was in because some devices have more nesting layers and I needed it when I first layed out the RCS Thems but can't remember why at the moment. Regarding the 1/2/3 character variable names - it doesn't make any difference on the packets if it is <42 bytes because it will be padded. I'd rather use descriptive names plus it make the transition to XML and no-brainer because we just change the format and not the content. Jay |