Board index FlightGear Development New features

Problems creating socket

Discussion and requests for new features. Please note that FlightGear developers are volunteers and may or may not be able to consider these requests.

Problems creating socket

Postby MaverickAlex » Wed Dec 08, 2010 12:01 pm

I am trying to connect to FG via socket for an ACARS system

i'm using
Code: Select all
--generic,socket,out,5,127.0.0.1,5501,tcp,acars

basic protocol borrowed from the WIKI (to test)

Code: Select all
<?xml version="1.0"?>
<PropertyList>
<generic>
   <output>
      <line_separator>newline</line_separator>
      <var_separator>tab</var_separator>
 
      <chunk>
         <name>altitude above ground</name>
         <node>/position/altitude-agl-ft</node>
         <type>float</type>
         <format>%03.2f</format>
       </chunk>
 
      <chunk>
         <name>elevator position</name>
         <node>/surface-positions/elevator-pos-norm</node>
         <type>float</type>         
         <format>elevator=%03.2f</format>
       </chunk>

      <chunk>
         <name>altitude autopilot (wip)</name>
         <node>/autopilot/locks/altitude</node>
         <type>string</type>
         <format>%s</format>
       </chunk>

   </output>
</generic>
</PropertyList>


but keep getting the IO error


Code: Select all
Parse I/O channel request: generic,socket,out,10,127.0.0.1,5501,tcp,acars
  protocol = generic
Reading communication protocol from E:/newFGCVS/data/Protocol/acars.xml
  medium = socket
  direction = out
  hertz = 10
  hostname = 127.0.0.1
  port = 5501
  style = tcp
Error: connect() failed in make_client_socket()
SG_IO_OUT socket creation failed
Error opening channel communication layer.
I/O Channel config failed.


Any Ideas?
http://www.atlasvirtualairlines.com
Modeller of: TNCM TBPB MDPP TFFF TJSJ FMEE TKPK TFFG TQPF KLAX KATL EGNJ EGGW APACHE, EUROFIGHTER, HP VICTOR, DHC8
FGcom 122.75
creator Terragear GUI
User avatar
MaverickAlex
 
Posts: 1204
Joined: Sun Mar 23, 2008 4:46 pm
Location: Kingston Upon Hull. UK

Re: Problems creating socket

Postby MaverickAlex » Wed Dec 08, 2010 2:34 pm

swapped the protocol over to something else and now can connect. S obviously some problem with the protocol i had.
http://www.atlasvirtualairlines.com
Modeller of: TNCM TBPB MDPP TFFF TJSJ FMEE TKPK TFFG TQPF KLAX KATL EGNJ EGGW APACHE, EUROFIGHTER, HP VICTOR, DHC8
FGcom 122.75
creator Terragear GUI
User avatar
MaverickAlex
 
Posts: 1204
Joined: Sun Mar 23, 2008 4:46 pm
Location: Kingston Upon Hull. UK

Re: Problems creating socket

Postby MaverickAlex » Thu Dec 09, 2010 4:12 pm

i have succesfully started a connection to the internal server.

Code: Select all
Props server started on port 2222
Parse I/O channel request: generic,socket,out,1,127.0.0.1,2222,tcp,acars
  protocol = generic
Reading communication protocol from E:/newFGCVS/data/Protocol/acars.xml
  medium = socket
  direction = out
  hertz = 1
  hostname = 127.0.0.1
  port = 2222
  style = tcp


Do i need to send a data string to to it to get it to output to my client, or does it do it automagically?
http://www.atlasvirtualairlines.com
Modeller of: TNCM TBPB MDPP TFFF TJSJ FMEE TKPK TFFG TQPF KLAX KATL EGNJ EGGW APACHE, EUROFIGHTER, HP VICTOR, DHC8
FGcom 122.75
creator Terragear GUI
User avatar
MaverickAlex
 
Posts: 1204
Joined: Sun Mar 23, 2008 4:46 pm
Location: Kingston Upon Hull. UK

Re: Problems creating socket

Postby erik » Sun Dec 12, 2010 10:20 am

Once the connection is established FlightGear should start spewing o0ut data chunks, no need to trigger it in any way.

Erik
erik
 
Posts: 1822
Joined: Thu Nov 01, 2007 1:41 pm


Return to New features

Who is online

Users browsing this forum: No registered users and 4 guests