Beijer Electronics (formerly QSI Corporation)

Manufacturer of Mobile Data and Human Machine Interface Terminals.
It is currently Sat Nov 18, 2017 5:20 am

All times are UTC - 7 hours




Post new topic Reply to topic  [ 8 posts ] 
Author Message
PostPosted: Tue Nov 18, 2008 12:16 pm 
Offline

Joined: Tue Nov 18, 2008 11:59 am
Posts: 19
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.
Thanks,
jet4


Top
 Profile  
 
PostPosted: Tue Nov 18, 2008 1:01 pm 
Offline
QSI Support
QSI Support
User avatar

Joined: Wed Mar 08, 2006 12:25 pm
Posts: 881
Location: Salt Lake City, Utah
GetConnectionStatus
I looked at the help for BasicEthernet.GetConnectionStatus (Help->Object Documentation, then type GetConnecitonStatus in the index field).

This is what it says:
Quote:
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:

Code:
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
else
    'Do connected stuff
endif


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.



--------------------------------------------------------------------------------

_________________
Jeremy
http://www.beijerinc.com


Top
 Profile  
 
PostPosted: Tue Nov 18, 2008 3:17 pm 
Offline

Joined: Tue Nov 18, 2008 11:59 am
Posts: 19
Thanks Jeremy.
I appreciate the help.
jet4


Top
 Profile  
 
PostPosted: Thu Nov 20, 2008 5:58 am 
Offline

Joined: Tue Nov 18, 2008 11:59 am
Posts: 19
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)

Thanks,
jet4


Top
 Profile  
 
PostPosted: Thu Nov 20, 2008 9:01 am 
Offline
QSI Support
QSI Support
User avatar

Joined: Wed Mar 08, 2006 12:25 pm
Posts: 881
Location: Salt Lake City, Utah
Hrmm, what OS are you using and are you running QF as an administrator or a normal user?

_________________
Jeremy
http://www.beijerinc.com


Top
 Profile  
 
PostPosted: Mon Nov 24, 2008 10:44 am 
Offline

Joined: Tue Nov 18, 2008 11:59 am
Posts: 19
OS is Windows XP pro and I'm a normal user.


Top
 Profile  
 
PostPosted: Tue Nov 25, 2008 9:51 am 
Offline
QSI Support
QSI Support
User avatar

Joined: Wed Mar 08, 2006 12:25 pm
Posts: 881
Location: Salt Lake City, Utah
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.

_________________
Jeremy
http://www.beijerinc.com


Top
 Profile  
 
PostPosted: Wed Dec 17, 2008 6:09 am 
Offline

Joined: Tue Nov 18, 2008 11:59 am
Posts: 19
Moving QF to new directory worked.
Thanks.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC - 7 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group