Hi All, On 14/04/2015 19:46, Bill Somerville wrote: > On 14/04/2015 18:35, SM0THU wrote: >> Hi Bill, >> >> >> That sounds great. <snip> >> I’ll have to look into QDataStream and see how I can do that with Swift. > Here is the key information: http://doc.qt.io/qt-5/datastreamformat.html > > That page lists how the various supported data types are serialized. All > the numbers are Big Endian i.e. normal network byte ordering. There will > be a header and the message formats are implicit i.e. no type ids or > framing, just read the expected fields in the expected order. Simple and > compact. Strings will all be encoded as utf-8 and serialized as > QByteArray types i.e. 32-bit count followed by the string content > converted to utf-8. > > There will be a C++ header file that documents the message format, > headers, various message types and, content. Here is a provisional > snapshot of that: <snip> > So a message will be like: > > Magic number id: 0xabbccbda > Schema number: 0x00000001 > followed by the serialized payload. > > So for example a two field payload of a single string of length 10 that > maps to a 10 byte utf-8 sequence and a 32 bit number would form a > message of length 26 bytes: > > the eight byte header above > a string count of 10 serialized as a 32 bit unsigned BE number (4 bytes) > the 10 utf-8 bytes > 4 bytes of the number in BE format. > > The real messages have a payload header as well which is an unsigned > 32-bit number for the message type followed by a utf-8 string that > identifies the "arena" of the message. This last field the the same > unique string that identifies the instance of WSJT-X i.e. "WSJT-X" for > the default instance or "WSJT-X - rigname" for a WSJT-X instance started as: > > wsjtx --rig-name=rigname > > The message server (your application) cannot broadcast messages but it > can reply to a client (a WSJT-X instance) that it has received messages > from beforehand. This is sort of similar to a web server that serves > many clients except that the bulk of the data flows from client to > server and the protocol is UDP. This is now committed to the WSJT-X development branch. For now the demo application that shows off the UDP server facilities is built and installed along with the rest of the WSJT-X application. It is called message_aggregator(.exe) and is fully functional. I intend to remove this application from the installed tree for release builds but for convenience for now it is in for anyone who wants to investigate this new feature. >> 73 >> /Anders > 73 > Bill 73 Bill G4WJS. > G4WJS. >>> On 14 Apr 2015, at 19:23, Bill Somerville <[email protected]> wrote: >>> >>> On 14/04/2015 17:57, Anders Östlund wrote: >>>> Hi, >>> Hi Anders, >>>> I'm writing a program that is kind of a JT-Alert alternative, but for Mac >>>> OS X. >>>> Being able to trigger a reply to a CQ from externally would be a great >>>> feature. >>>> >>>> I've got Mike's patch to work on r5068. Before trying to get it to work on >>>> a >>>> more recent commit, I just want to ask if there has been more work done on >>>> this already. >>> Yes, I am close to committing a full functioning version with a formal >>> message protocol that is extensible. I am adding some other messages >>> (outgoing from WSJT-X) that should be useful to applications like >>> JTAlert and yours such as status updates, WSJT-X closedown and >>> notification of QSOs logged. >>> >>> The protocol is binary and pretty simple, based on the Qt QDataStream >>> serialization capability. I am testing my changes right now after a >>> final clean up before check in, currently it is broken but I should have >>> it all working again shortly. >>>> I'd be happy to help out with testing or coding, if needed. >>> OK. What is your choice of implementation language and tools for your >>> application? I would like to have some reference code for various >>> platforms for usage of the message protocol. C++ with Qt I have in hand >>> already. >>>> 73 >>>> /Anders - SM0THU >>>> http://jt-bridge.eller.nu >>> 73 >>> Bill >>> G4WJS.
------------------------------------------------------------------------------ BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT Develop your own process in accordance with the BPMN 2 standard Learn Process modeling best practices with Bonita BPM through live exercises http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_ source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF _______________________________________________ wsjt-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/wsjt-devel
