[Xastir] Feature idea for Xastir

Brad Douglas rez at touchofmadness.com
Tue Oct 9 14:46:26 EDT 2007


On Thu, 2007-10-04 at 14:27 -0400, William McKeehan wrote:
> Well, the last time we discussed this, I think this is where the discussion
> ended (after we managed to get a piglatin translation added to the
> repository).
> 
> I've been playing and thinking about this a fair amount. What about using
> HTML/JavaScript/XML ala Ajax? This would require Xastir having an "http" style
> server that would serve up pages and would respond to certain queries with XML
> code. For example if Xastir's server were listening on port 8001,
> http://localhost:8001/getStationInformation?callsignssid=KI4HDU-2 would
> respond with something like
> <station>
>     <CallsignSSID>KI4HDU-2</CallsignSSID>
>     <PacketsReceived>75</PacketsReceived>
>     <LastHeard>10/04/2007 14:05:08</LastHeard>
>     <Comments>
>         <Comment>10/04 14:05 : .open2300v1.10</Comment>
>         <Comment>10/04 14:00 :</Comment>
>     </Comments>
> .
> .
> .
> </station>

Are you suggesting that everyone have a working http server on their
local machine?  That is quite an excessive (and generally insecure)
method of accomplishing the given goal, locally.

> Other things like
> http://localhost:8001/findStation?callsignssid=KI4HDU-2&exact=1 would cause
> the UI to behave as if someone had used the "Station-> Find Station" dialog
> box.
> 
> To facilitate this, we could provide an Xastir "Object" in JavaScript that
> would handle most of the heavy lifting here's a rough (very) start...
> 
> function XastirObject() {
>     this.myConn=null;
>     this.getStationInformation=getStationInformation;
>     this.findStation=findStation;
> 
>     this.myConn = new XHConn();
>     if (!this.myConn) alert("XMLHTTP not available.");
>     if (!this.myConn) return;
> }
> 
> function findStation(CallsignSSID) {
>     this.getStation(CallsignSSID, xastirFindStation);
> }
> 
> function xastirFindStation(oXML) {
>     var xml = oXML.responseXML;
>     alert( oXML.responseText );
>     var station = xml.getElementsByTagName( 'station' )[0].firstChild;
> 
>     var newStation = new station();
>     newStation.CallsignSSID = station.getElementsByTagName('name')[0].firstChild;
>     newStation.find();
> }
> 
> function getStationInformation(CallsignSSID, fnToDo) {
>    this.myConn.connect("http://localhost:8001/getStationInformation", "POST",
> "CallsignSSID=" + CallsignSSID, fnToDo);
> }
> 
> function station() {
>     this.CallsignSSID = "";
>     this.find=find;
>     this.send=send;
>     return this;
> }
> 
> function find() {
>     Alert("Ask Xastir to 'find' " + this.CallsignSSID + ".");
> }
> 
> 
> Does this sound like something that would be useful? Personally, I think this
> would let people develop their own APRS "interface" using Xastir to do the
> heavy lifting - and I think that if done correctly, this would eventually let
> you run Xastir in a daemon mode and only use this interface if you wanted to.

IMO, wxPython is the way to go for GUI development.

> I imagine that adding a simple http server to the code would be pretty
> straight forward; the only question would be if that server would be able to
> get the data to answer the queries with easily.
> 
> Thoughts?

I highly recommend you look into REST[1] before proceeding.


[1]
http://www.workflowresearch.com/Publications/PDF/MIZU.JENI.KESW-DSS(2004).pdf


-- 
73, de Brad KB8UYR/6 <rez touchofmadness com>




More information about the Xastir mailing list