Beijer Electronics (formerly QSI Corporation)

G55 - Ethernet connection Status
Page 1 of 1

Author:  jet4 [ Tue Nov 18, 2008 12:16 pm ]
Post subject:  G55 - Ethernet connection Status

I'm looking for documentation of the _ETHER_CONN_STATUS_ return type - namely what the various codes mean. I'm getting a 2 when I check the BasicEthernet.getConnectionStatus().
I wasn't seeing this code before and I'm trying to figure out what has changed.

Author:  Jeremy [ Tue Nov 18, 2008 1:01 pm ]
Post subject:  Re: G55 - Ethernet connection Status

I looked at the help for BasicEthernet.GetConnectionStatus (Help->Object Documentation, then type GetConnecitonStatus in the index field).

This is what it says:
fixed func GetConnectionStatus() returns _ETHER_CONN_STATUS_

Returns an enumerated value representing the status of the connection.
ETHER_NOT_CONNECTED: Object has no ethernet connection and is ready to open a new connection.
ETHER_PENDING_CONNECT: Object is in the process of opening a new ethernet connection.
ETHER_CONNECTED: Object has an established connection.

The value returned from GetConnectionStatus will be one of those three values. Because the enumeration definition did not assign specific values to to the enumerated items, the compiler is free to assign whatever numeric values it wants. I suspect that you are receiving ETHER_PENDING_CONNECT, but I cannot guarantee it as your Qlarity compiler could assign different values if it wanted to.

Here might be some code to deal with this:

dim status as _ETHER_CONN_STATUS
status := myEthernetObj.GetConnectionStatus()

if status ==  ETHER_NOT_CONNECTED then
    'Do not connected stuff
elseif status == ETHER_PENDING_CONNECT then
    'Do pending connection stuff
    'Do connected stuff

A connection is pending if the system is trying to establish a network connection but has not completed that yet. For a UDP "connection" this phase is almost instantaneous. For TCP it could take a significant period. Especially if the other side of the connection is slow or not responding.


Author:  jet4 [ Tue Nov 18, 2008 3:17 pm ]
Post subject:  Re: G55 - Ethernet connection Status

Thanks Jeremy.
I appreciate the help.

Author:  jet4 [ Thu Nov 20, 2008 5:58 am ]
Post subject:  Re: G55 - Ethernet connection Status

Jeremy -

When I tried to open Help-> Object Documentation I get an error saying that the help can't be opened...
Am I missing a file or something? (note: I do not have internet access where I'm doing the development)


Author:  Jeremy [ Thu Nov 20, 2008 9:01 am ]
Post subject:  Re: G55 - Ethernet connection Status

Hrmm, what OS are you using and are you running QF as an administrator or a normal user?

Author:  jet4 [ Mon Nov 24, 2008 10:44 am ]
Post subject:  Re: G55 - Ethernet connection Status

OS is Windows XP pro and I'm a normal user.

Author:  Jeremy [ Tue Nov 25, 2008 9:51 am ]
Post subject:  Re: G55 - Ethernet connection Status

Any chance you can try running QF as an administrator and seeing if the problem persists?

I think I know what the problem is -- QF has to dynamically create the help file that it uses based on your workspace information. The help code was designed and implemented a very long time ago -- back when Win 98 and Win NT 4 were the OSes that QF targeted. The philosophy back in those days was for an application to write any application specific data to its install directory so that it was easy to clean up when you removed the application. Unfortunately while the philosophy from Redmond has changed since then some of the QF code still predates that period.

If this solves the problem, the easiest solution would be to move QF to a different directory. When you eventually uninstall QF, delete the new directory and run the uninstaller.

Author:  jet4 [ Wed Dec 17, 2008 6:09 am ]
Post subject:  Re: G55 - Ethernet connection Status

Moving QF to new directory worked.

Page 1 of 1 All times are UTC - 7 hours
Powered by phpBB® Forum Software © phpBB Group