Re: [LHA-misc] Line parsing routine
Status: Beta
Brought to you by:
ncherry
From: <bap...@cc...> - 2000-11-26 21:37:06
|
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. On that note (Neil already knows what I'm about to type) I've got some news that may interest you, especiall the HCS users out there. Any of you with an HCS looking to interface it with Linux or whatever.... I've got a prototype Ethernet interface going on an HCS-II system here. It is based on the Dallas Semi TINI board (A SIMM sized board) It is running a webserver for serving HTML documents and applets which can communicate directly with the HCS. Its pretty 'alpha' right now. But it works! It sends all HCS status data on port 5050 and can handle up to 24 simultaneous connections. The data protocol is the same as the normal HCS serial protocol which is outlined in Appendix D of the XPRESS manual (online at http://www.cc- concepts.com/) The beauty of this is anyone can write Applets or applications to communicate with teh HCS. All I/O and states can be read and changed via this socket. Eventually I plan to add ftp and email functionality to the gateway so you can send emails from the HCS and also upload log data to remote servers, etc. TO check it out, go to http://64.40.83.12/ The web pages are served directly from teh gateway as are the applets. Right now I only have an applet which will show all console messages. Right now the test bonard is cycl.ing through 8 relays and everytime they change states a console msg is sent. If you play around with the socket (Port 5050) and an applet, make sure you use DataInputStream and DataOutputStream objects when talking on the socket. If you use any other language, the data will be regular bytes. Mike |