View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000019 | .NET API | Implementation Bug | public | 2005-12-12 23:34 | 2007-02-10 03:48 |
Reporter | Randy Armstrong | Assigned To | Randy Armstrong | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Summary | 0000019: Flat Address Space Browsing does not work | ||||
Description | I tested my app which browses DA Servers (and also the sample DA client) against a known "flat" server (Honeywell PHD OPC Server) | ||||
Additional Information | Randy, I made the changes you suggested.
At the "if" above, itemID is null and an exception is thrown attempting to access itemID.ItemName -Dane From: Randy Armstrong [mailto:randy.armstrong@opcfoundation.org] Hi Dane, The checks for flat address space were moved up one level in the function stack. Unfortunately, I omitted a check when I moved the code. The following changes should fix the problem: private BrowseElement[] GetElements(
... // return an empty list if requesting branches for a flat address space. if (namespaceType == OPCNAMESPACETYPE.OPC_NS_FLAT) {
} // get the enumerator. enumerator = GetEnumerator((itemID != null)?itemID.ItemName:null, filters, branches, namespaceType == OPCNAMESPACETYPE.OPC_NS_FLAT); ... private EnumString GetEnumerator(string itemID, BrowseFilters filters, bool branches, bool flat) {
} From: Dane Overfield [mailto:dane@exele.com] Sent: November 29, 2005 12:01 PM To: 'Randy Armstrong' Subject: More info... Randy, Here is some more detail on the flat server problem. I ran the older .Net API 1.3 code vs. the new to see the difference. The problem is in private EnumString GetEnumerator(string itemID, BrowseFilters filters, bool branches) OLD 1.3 Code:
NEW 1.3 Code:
Here are the routines: you can see that the first few lines are not the same Old Code: private EnumString GetEnumerator(string itemID, BrowseFilters filters, bool branches) { IOPCBrowseServerAddressSpace browser = (IOPCBrowseServerAddressSpace)m_server; // check the server address space type. OPCNAMESPACETYPE namespaceType = OPCNAMESPACETYPE.OPC_NS_HIERARCHIAL; try {
} catch (Exception e) {
} // move to the specified branch for hierarchial address spaces. if (namespaceType == OPCNAMESPACETYPE.OPC_NS_HIERARCHIAL) {
} // generate error for any value other that the 'root' item for flat address spaces. else {
} try {
} catch {
} } New Code private EnumString GetEnumerator(string itemID, BrowseFilters filters, bool branches) { IOPCBrowseServerAddressSpace browser = (IOPCBrowseServerAddressSpace)m_server; // move to the specified branch for hierarchial address spaces. try {
} catch {
} try {
} catch {
} } | ||||
Tags | No tags attached. | ||||
Date Modified | Username | Field | Change |
---|---|---|---|
2005-12-12 23:34 | Randy Armstrong | New Issue | |
2005-12-12 23:35 | Randy Armstrong | Status | new => assigned |
2005-12-12 23:35 | Randy Armstrong | Assigned To | => Randy Armstrong |
2007-02-10 03:48 | Randy Armstrong | Status | assigned => resolved |
2007-02-10 03:48 | Randy Armstrong | Resolution | open => fixed |
2007-02-10 03:48 | Randy Armstrong | Note Added: 0000154 |