Hello everyone,
I think I have run across an issue in the .NET implementation of the
toolkit.  I was testing opening and closing connections repeatedly. Every
once and a while the LLRPClient.Open method would timeout and respond false
indicating that the connection failed, but in fact the connection had
succeeded.  I made a couple of changes and now things are working very well
for me so I thought I'd report back in case anyone else was seeing this sort
of problem.

LLRPClient.Open
{
status = ENUM_ConnectionAttemptStatusType.Success;

// This line was previously after the try/catch block
// and would not always be non-null when the ProcesssMessage
// thread was executing, causing the conn_status_type not to be set
// correctly
conn_evt = new ManualResetEvent(false);

// This line was previously after the try/catch block
// and sometimes the ReaderEventNotification message would be missed 
cI.OnMessageReceived += new delegateMessageReceived(ProcesssMessage);

try { cI.Open(llrp_reader_name, LLRP1_TCP_PORT); }
catch { return false; }
            
if (conn_evt.WaitOne(timeout, false))
{
status = conn_status_type;
if (status == ENUM_ConnectionAttemptStatusType.Success) return true;
}

try { cI.Close(); }
catch { }
return false;
}


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
llrp-toolkit-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/llrp-toolkit-devel

Reply via email to