Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
S
seatunnel-web
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
宋勇
seatunnel-web
Commits
7e7fa155
提交
7e7fa155
authored
5月 04, 2024
作者:
宋勇
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
kepserver
上级
3a0f3340
显示空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
6 行增加
和
7 行删除
+6
-7
KepServerOptionRule.java
...nnel/datasource/plugin/kepserver/KepServerOptionRule.java
+4
-4
ReadKepServer.java
.../seatunnel/datasource/plugin/kepserver/ReadKepServer.java
+2
-3
没有找到文件。
seatunnel-datasource/seatunnel-datasource-plugins/datasource-kepserver/src/main/java/org/apache/seatunnel/datasource/plugin/kepserver/KepServerOptionRule.java
浏览文件 @
7e7fa155
...
@@ -35,8 +35,8 @@ public class KepServerOptionRule {
...
@@ -35,8 +35,8 @@ public class KepServerOptionRule {
public
static
final
Option
<
Integer
>
NS
=
public
static
final
Option
<
Integer
>
NS
=
Options
.
key
(
"ns"
).
intType
().
noDefaultValue
().
withDescription
(
"ns"
);
Options
.
key
(
"ns"
).
intType
().
noDefaultValue
().
withDescription
(
"ns"
);
public
static
final
Option
<
String
>
ID
=
public
static
final
Option
<
String
>
ID
ENTIFIER
=
Options
.
key
(
"id
"
).
stringType
().
noDefaultValue
().
withDescription
(
"id
"
);
Options
.
key
(
"id
entifier"
).
stringType
().
noDefaultValue
().
withDescription
(
"identifier
"
);
public
static
final
Option
<
String
>
TYPE
=
public
static
final
Option
<
String
>
TYPE
=
Options
.
key
(
"type"
).
stringType
().
defaultValue
(
"int"
).
withDescription
(
"type"
);
Options
.
key
(
"type"
).
stringType
().
defaultValue
(
"int"
).
withDescription
(
"type"
);
...
@@ -45,10 +45,10 @@ public class KepServerOptionRule {
...
@@ -45,10 +45,10 @@ public class KepServerOptionRule {
Options
.
key
(
"gs"
).
intType
().
defaultValue
(
1
).
withDescription
(
"type"
);
Options
.
key
(
"gs"
).
intType
().
defaultValue
(
1
).
withDescription
(
"type"
);
public
static
OptionRule
optionRule
()
{
public
static
OptionRule
optionRule
()
{
return
OptionRule
.
builder
().
required
(
HOST
,
PORT
,
NS
,
ID
).
optional
(
GS
).
build
();
return
OptionRule
.
builder
().
required
(
HOST
,
PORT
,
NS
,
ID
ENTIFIER
).
optional
(
GS
).
build
();
}
}
public
static
OptionRule
metadataRule
()
{
public
static
OptionRule
metadataRule
()
{
return
OptionRule
.
builder
().
required
(
NS
,
ID
).
build
();
return
OptionRule
.
builder
().
required
(
NS
,
ID
ENTIFIER
).
build
();
}
}
}
}
seatunnel-datasource/seatunnel-datasource-plugins/datasource-kepserver/src/main/java/org/apache/seatunnel/datasource/plugin/kepserver/ReadKepServer.java
浏览文件 @
7e7fa155
...
@@ -12,7 +12,6 @@ package org.apache.seatunnel.datasource.plugin.kepserver;
...
@@ -12,7 +12,6 @@ package org.apache.seatunnel.datasource.plugin.kepserver;
import
com.google.common.collect.ImmutableList
;
import
com.google.common.collect.ImmutableList
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.checkerframework.checker.units.qual.K
;
import
org.eclipse.milo.opcua.sdk.client.OpcUaClient
;
import
org.eclipse.milo.opcua.sdk.client.OpcUaClient
;
import
org.eclipse.milo.opcua.sdk.client.nodes.UaNode
;
import
org.eclipse.milo.opcua.sdk.client.nodes.UaNode
;
import
org.eclipse.milo.opcua.sdk.client.nodes.UaVariableNode
;
import
org.eclipse.milo.opcua.sdk.client.nodes.UaVariableNode
;
...
@@ -42,7 +41,7 @@ public class ReadKepServer implements KepServerClient {
...
@@ -42,7 +41,7 @@ public class ReadKepServer implements KepServerClient {
map
.
put
(
KepServerOptionRule
.
HOST
.
key
(),
"127.0.0.1"
);
map
.
put
(
KepServerOptionRule
.
HOST
.
key
(),
"127.0.0.1"
);
map
.
put
(
KepServerOptionRule
.
PORT
.
key
(),
"49320"
);
map
.
put
(
KepServerOptionRule
.
PORT
.
key
(),
"49320"
);
map
.
put
(
KepServerOptionRule
.
NS
.
key
(),
"2"
);
map
.
put
(
KepServerOptionRule
.
NS
.
key
(),
"2"
);
map
.
put
(
KepServerOptionRule
.
ID
.
key
(),
"cs.设备.top2"
);
map
.
put
(
KepServerOptionRule
.
ID
ENTIFIER
.
key
(),
"cs.设备.top2"
);
ReadKepServer
example
=
new
ReadKepServer
(
map
);
ReadKepServer
example
=
new
ReadKepServer
(
map
);
example
.
endpointUrl
=
"opc.tcp://127.0.0.1:49320"
;
example
.
endpointUrl
=
"opc.tcp://127.0.0.1:49320"
;
new
KepServerClientRunner
(
example
,
true
).
run
();
new
KepServerClientRunner
(
example
,
true
).
run
();
...
@@ -62,7 +61,7 @@ public class ReadKepServer implements KepServerClient {
...
@@ -62,7 +61,7 @@ public class ReadKepServer implements KepServerClient {
}
}
}
}
this
.
identifier
=
requestParams
.
get
(
KepServerOptionRule
.
ID
.
key
());
this
.
identifier
=
requestParams
.
get
(
KepServerOptionRule
.
ID
ENTIFIER
.
key
());
}
}
private
final
Logger
logger
=
LoggerFactory
.
getLogger
(
getClass
());
private
final
Logger
logger
=
LoggerFactory
.
getLogger
(
getClass
());
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论