-
-
Notifications
You must be signed in to change notification settings - Fork 7
feat(OpcDa): add Browse feature #520
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
eae7387
feat: 增加浏览功能
ArgoZhang d14ad08
test: 增加单元测试
ArgoZhang 012c7ef
feat: 增加浏览功能
ArgoZhang 6052edb
test: 更新单元测试
ArgoZhang ccb76af
refactor: 精简代码
ArgoZhang 38cdd4e
refactor: 完善 Browse 功能
ArgoZhang 59eda3a
feat: 增加 OpcBrowseFilterType 枚举
ArgoZhang ddfeecf
test: 增加单元测试
ArgoZhang 2e6bec6
chore: bump version 9.0.1
ArgoZhang File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
src/extensions/BootstrapBlazor.OpcDa/BootstrapBlazor.OpcDa.csproj
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| // Copyright (c) Argo Zhang (argo@163.com). All rights reserved. | ||
| // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. | ||
| // Website: https://www.blazor.zone or https://argozhang.github.io/ | ||
|
|
||
| using Opc.Da; | ||
|
|
||
| namespace BootstrapBlazor.OpcDa; | ||
|
|
||
| /// <summary> | ||
| /// 对 OpcDataServer BrowseElement 的封装类 | ||
| /// </summary> | ||
| public class OpcBrowseElement | ||
| { | ||
| /// <summary> | ||
| /// 获得/设置 节点名称 | ||
| /// </summary> | ||
| public string Name { get; set; } | ||
|
|
||
| /// <summary> | ||
| /// 获得/设置 Item 名称 | ||
| /// </summary> | ||
| public string ItemName { get; set; } | ||
|
|
||
| /// <summary> | ||
| /// 获得/设置 是否是数据项 | ||
| /// </summary> | ||
| public bool IsItem { get; set; } | ||
|
|
||
| /// <summary> | ||
| /// 获得/设置 是否有子节点 | ||
| /// </summary> | ||
| public bool HasChildren { get; set; } | ||
|
|
||
| /// <summary> | ||
| /// 构造函数 | ||
| /// </summary> | ||
| public OpcBrowseElement() | ||
| { | ||
| Name = ""; | ||
| ItemName = ""; | ||
| } | ||
|
|
||
| internal OpcBrowseElement(BrowseElement element) | ||
| { | ||
| Name = element.Name; | ||
| ItemName = element.ItemName; | ||
| IsItem = element.IsItem; | ||
| HasChildren = element.HasChildren; | ||
| } | ||
| } |
26 changes: 26 additions & 0 deletions
26
src/extensions/BootstrapBlazor.OpcDa/OpcBrowseFilterType.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| // Copyright (c) Argo Zhang (argo@163.com). All rights reserved. | ||
| // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. | ||
| // Website: https://www.blazor.zone or https://argozhang.github.io/ | ||
|
|
||
| namespace BootstrapBlazor.OpcDa; | ||
|
|
||
| /// <summary> | ||
| /// OpcDa 浏览过滤器类型枚举 | ||
| /// </summary> | ||
| public enum OpcBrowseFilterType | ||
| { | ||
| /// <summary> | ||
| /// 全部 | ||
| /// </summary> | ||
| All, | ||
|
|
||
| /// <summary> | ||
| /// 分支 | ||
| /// </summary> | ||
| Branch, | ||
|
|
||
| /// <summary> | ||
| /// 数据项 | ||
| /// </summary> | ||
| Item | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| // Copyright (c) Argo Zhang (argo@163.com). All rights reserved. | ||
| // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. | ||
| // Website: https://www.blazor.zone or https://argozhang.github.io/ | ||
|
|
||
| namespace BootstrapBlazor.OpcDa; | ||
|
|
||
| /// <summary> | ||
| /// 对 OpcDataServer BrowseFilters 的封装类 | ||
| /// </summary> | ||
| public class OpcBrowseFilters | ||
| { | ||
| /// <summary> | ||
| /// 获得/设置 最大返回节点数量 | ||
| /// </summary> | ||
| public int MaxElementsReturned { get; set; } | ||
|
|
||
| /// <summary> | ||
| /// 获得/设置 元素名称过滤器 | ||
| /// </summary> | ||
| public string? ElementNameFilter { get; set; } | ||
|
|
||
| /// <summary> | ||
| /// 获得/设置 是否返回所有属性 | ||
| /// </summary> | ||
| public bool ReturnAllProperties { get; set; } | ||
|
|
||
| /// <summary> | ||
| /// 获得/设置 是否返回属性值 | ||
| /// </summary> | ||
| public bool ReturnPropertyValues { get; set; } | ||
|
|
||
| /// <summary> | ||
| /// 获得/设置 浏览过滤器类型 | ||
| /// </summary> | ||
| public OpcBrowseFilterType BrowseFilter { get; set; } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| // Copyright (c) Argo Zhang (argo@163.com). All rights reserved. | ||
| // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. | ||
| // Website: https://www.blazor.zone or https://argozhang.github.io/ | ||
|
|
||
| namespace BootstrapBlazor.OpcDa; | ||
|
|
||
| /// <summary> | ||
| /// 对 OpcDataServer BrowsePosition 的封装类 | ||
| /// </summary> | ||
| public class OpcBrowsePosition | ||
| { | ||
| internal OpcBrowsePosition(Opc.Da.BrowsePosition? position) | ||
| { | ||
| Position = position; | ||
| } | ||
|
|
||
| internal Opc.Da.BrowsePosition? Position { get; set; } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.