have USB device that "Talks" to software running on my machine. I want to be able to read this data and then do a lookup on a DBF and then display relevant information.
What I have found out so far:
The socket outputs the messages on IP "127.0.0.1" socket 30003 in a CSV format, with a carriage return and lifefeed (ascii 13 followed by ascii 10) at the end of each message.
Not all lines will have the same number of fields, and not all fields will have the same meaning. Basically, the first field has the message type, and then from that I know how many other fields there will be and what they will contain.
I want to ignore any message types that aren't ones I want.
the records I want to read are formatted as shown below:
Field 1: AIR
Field 2: [null]
Field 3: SessionID
Field 4: AircraftID
Field 5: HexIdent
Field 6: FlightID
Field 7: Date message generated
Field 8: Time message generated
Field 9: Date message logged
Field 10: Time message logged
I then want to do a database lookup on field 5 [HexIdent].
Can some tell me whether this is available in A5V7 as I see some "socket" commands. If so how do I go about doing it.
open socket.
if field1 = "AIR" get Field5
query on HexIdent field [24-bit-binary code represented in 6 character Hex].
display result.
go back to reading the socket for next query.
What I have found out so far:
The socket outputs the messages on IP "127.0.0.1" socket 30003 in a CSV format, with a carriage return and lifefeed (ascii 13 followed by ascii 10) at the end of each message.
Not all lines will have the same number of fields, and not all fields will have the same meaning. Basically, the first field has the message type, and then from that I know how many other fields there will be and what they will contain.
I want to ignore any message types that aren't ones I want.
the records I want to read are formatted as shown below:
Field 1: AIR
Field 2: [null]
Field 3: SessionID
Field 4: AircraftID
Field 5: HexIdent
Field 6: FlightID
Field 7: Date message generated
Field 8: Time message generated
Field 9: Date message logged
Field 10: Time message logged
I then want to do a database lookup on field 5 [HexIdent].
Can some tell me whether this is available in A5V7 as I see some "socket" commands. If so how do I go about doing it.
open socket.
if field1 = "AIR" get Field5
query on HexIdent field [24-bit-binary code represented in 6 character Hex].
display result.
go back to reading the socket for next query.
Comment