Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
YeeAmosConnectRoot
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
station
YeeAmosConnectRoot
Commits
585ff76f
Commit
585ff76f
authored
Dec 18, 2019
by
xukaiqiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
11
parent
1b33f698
Hide whitespace changes
Inline
Side-by-side
Showing
30 changed files
with
880 additions
and
12 deletions
+880
-12
application-dev.properties
...onnectStart/src/main/resources/application-dev.properties
+1
-1
TestQueue.java
...tStart/src/test/java/com/yeejoin/amos/test/TestQueue.java
+27
-0
app.properties
...osConnectStart/src/test/resources/META-INF/app.properties
+2
-0
application-dev.properties
...onnectStart/src/test/resources/application-dev.properties
+94
-0
application-prod.properties
...nnectStart/src/test/resources/application-prod.properties
+85
-0
application-test.properties
...nnectStart/src/test/resources/application-test.properties
+92
-0
application.properties
...mosConnectStart/src/test/resources/application.properties
+16
-0
cause.properties
YeeAmosConnectStart/src/test/resources/cause.properties
+112
-0
license.bat
YeeAmosConnectStart/src/test/resources/config/license.bat
+6
-0
cause.properties
...nnectStart/src/test/resources/configfile/cause.properties
+112
-0
debug.properties
...nnectStart/src/test/resources/configfile/debug.properties
+3
-0
typeId.properties
...nectStart/src/test/resources/configfile/typeId.properties
+42
-0
changelog-master.xml
...tart/src/test/resources/db/changelog/changelog-master.xml
+9
-0
i_client_linsten.sql
...tart/src/test/resources/db/changelog/i_client_linsten.sql
+68
-0
i_transmit_mapper.sql
...art/src/test/resources/db/changelog/i_transmit_mapper.sql
+65
-0
librxtxParallel.so
...urces/lib/Linux/i686-unknown-linux-gnu/librxtxParallel.so
+0
-0
librxtxSerial.so
...sources/lib/Linux/i686-unknown-linux-gnu/librxtxSerial.so
+0
-0
librxtxSerial.so
...esources/lib/Linux/ia64-unkown-linux-gnu/librxtxSerial.so
+0
-0
librxtxSerial.so
...urces/lib/Linux/x86_64-unknown-linux-gnu/librxtxSerial.so
+0
-0
README
YeeAmosConnectStart/src/test/resources/lib/Mac_OS_X/README
+4
-0
librxtxSerial.jnilib
...tart/src/test/resources/lib/Mac_OS_X/librxtxSerial.jnilib
+0
-0
rxtxParallel.dll
...nectStart/src/test/resources/lib/Windows/rxtxParallel.dll
+0
-0
rxtxParallel64.dll
...ctStart/src/test/resources/lib/Windows/rxtxParallel64.dll
+0
-0
rxtxSerial.dll
...onnectStart/src/test/resources/lib/Windows/rxtxSerial.dll
+0
-0
rxtxSerial64.dll
...nectStart/src/test/resources/lib/Windows/rxtxSerial64.dll
+0
-0
log4j.properties
YeeAmosConnectStart/src/test/resources/log4j.properties
+20
-0
package.xml
YeeAmosConnectStart/src/test/resources/package.xml
+65
-0
typeId.properties
YeeAmosConnectStart/src/test/resources/typeId.properties
+42
-0
AlarmParam.java
...va/com/yeejoin/amos/iec104/business/param/AlarmParam.java
+4
-1
GeneralDataQueue.java
...ejoin/amos/iec104/tcp/client/invoke/GeneralDataQueue.java
+11
-10
No files found.
YeeAmosConnectStart/src/main/resources/application-dev.properties
View file @
585ff76f
...
...
@@ -19,7 +19,7 @@ ribbon.ConnectTimeout = 30000
#DB properties:
#spring.datasource.url = jdbc:mysql://172.233.0.6:3306/amos_beijing_command_dev?useSSL=false&allowMultiQueries=true&serverTimezone=Asia/Shanghai
spring.datasource.url
=
jdbc:mysql://172.16.11.33:3306/amos_iec
_test
?useSSL=false&allowMultiQueries=true&serverTimezone=Asia/Shanghai
spring.datasource.url
=
jdbc:mysql://172.16.11.33:3306/amos_iec?useSSL=false&allowMultiQueries=true&serverTimezone=Asia/Shanghai
spring.datasource.username
=
root
spring.datasource.password
=
admin_1234
...
...
YeeAmosConnectStart/src/test/java/com/yeejoin/amos/test/TestQueue.java
0 → 100644
View file @
585ff76f
package
com
.
yeejoin
.
amos
.
test
;
import
com.yeejoin.amos.YeeAmosIec104IntfStart
;
import
com.yeejoin.amos.iec104.business.param.AlarmParam
;
import
com.yeejoin.amos.iec104.tcp.client.invoke.GeneralDataQueue
;
import
org.junit.Test
;
import
org.junit.runner.RunWith
;
import
org.springframework.boot.test.context.SpringBootTest
;
import
org.springframework.test.context.junit4.SpringRunner
;
@RunWith
(
SpringRunner
.
class
)
@SpringBootTest
(
classes
=
YeeAmosIec104IntfStart
.
class
,
webEnvironment
=
SpringBootTest
.
WebEnvironment
.
RANDOM_PORT
)
public
class
TestQueue
{
@Test
public
void
test
()
{
GeneralDataQueue
queue
=
GeneralDataQueue
.
getInstance
();
AlarmParam
alarmParam
=
new
AlarmParam
();
alarmParam
.
setInformationAddress
(
"1"
);
alarmParam
.
setIsInvalid
(
0
);
alarmParam
.
setPointCode
(
"16385"
);
alarmParam
.
setServiceId
(
"S000007"
);
alarmParam
.
setState
(
"1"
);
queue
.
add
(
alarmParam
);
}
}
YeeAmosConnectStart/src/test/resources/META-INF/app.properties
0 → 100644
View file @
585ff76f
app.id
=
YeeAmosFireAutoIntf
\ No newline at end of file
YeeAmosConnectStart/src/test/resources/application-dev.properties
0 → 100644
View file @
585ff76f
eureka.client.serviceUrl.defaultZone
=
http://172.16.10.99:10001/eureka/
eureka.client.register-with-eureka
=
false
eureka.client.fetch-registry
=
false
eureka.client.healthcheck.enabled
=
false
eureka.instance.hostname
=
${spring.cloud.client.ipAddress}
eureka.instance.statusPageUrlPath
=
${management.context-path}/info
eureka.instance.healthCheckUrlPath
=
${management.context-path}/health
eureka.instance.preferIpAddress
=
false
eureka.instance.instance-id
=
${spring.cloud.client.ipAddress}:${server.port}
eureka.instance.lease-expiration-duration-in-seconds
=
10
eureka.instance.lease-renewal-interval-in-seconds
=
5
#\u8BF7\u6C42\u5904\u7406\u7684\u8D85\u65F6\u65F6\u95F4
ribbon.ReadTimeout
=
120000
#\u8BF7\u6C42\u8FDE\u63A5\u7684\u8D85\u65F6\u65F6\u95F4
ribbon.ConnectTimeout
=
30000
#DB properties:
#spring.datasource.url = jdbc:mysql://172.233.0.6:3306/amos_beijing_command_dev?useSSL=false&allowMultiQueries=true&serverTimezone=Asia/Shanghai
spring.datasource.url
=
jdbc:mysql://172.16.11.33:3306/amos_iec?useSSL=false&allowMultiQueries=true&serverTimezone=Asia/Shanghai
spring.datasource.username
=
root
spring.datasource.password
=
admin_1234
spring.datasource.driver-class-name
=
com.mysql.jdbc.Driver
spring.datasource.type
=
com.zaxxer.hikari.HikariDataSource
spring.jpa.hibernate.ddl-auto
=
none
spring.datasource.hikari.minimum-idle
=
5
spring.datasource.hikari.maximum-pool-size
=
15
spring.datasource.hikari.auto-commit
=
true
spring.datasource.hikari.idle-timeout
=
30000
spring.datasource.hikari.pool-name
=
DatebookHikariCP
spring.datasource.hikari.max-lifetime
=
1800000
spring.datasource.hikari.connection-timeout
=
30000
spring.datasource.hikari.connection-test-query
=
SELECT 1
#JPA Configuration:
# Show or not log for each sql query
spring.jpa.show-sql
=
true
# Hibernate ddl auto (create, create-drop, update): with "update" the database
# schema will be automatically updated accordingly to java entities found in
# the project
# Naming strategy
#spring.jpa.hibernate.naming.physical-strategy=org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
spring.jpa.hibernate.naming-strategy
=
org.hibernate.cfg.ImprovedNamingStrategy
# Allows Hibernate to generate SQL optimized for a particular DBMS
spring.jpa.database-platform
=
org.hibernate.dialect.MySQLDialect
#mybatis mapper file
mybatis.mapper-locations
=
classpath:db/mapper/*.xml
# mybatis entity package
mybatis.type-aliases-package
=
com.yeejoin.amos.fireAutoIntf.business.entity.mybatis
#equipment check
param.protocol.not.check
=
HTTP
#enable Gzip compression
server.compression.enabled
=
true
server.compression.mime-types
=
application/json,application/xml,text/html,text/xml,text/plain
\u3001
server.compression.min-response-size
=
2048
#liquibase
liquibase.change-log
=
classpath:/db/changelog/changelog-master.xml
liquibase.enabled
:
true
#redis database index
spring.redis.database
=
9
#redis ip
spring.redis.host
=
172.16.11.33
spring.redis.port
=
6379
#redis password (default is empty)
spring.redis.password
=
1234560
#max connect number
spring.redis.pool.max-active
=
200
# redis max wait time ( -1 is not limit)
spring.redis.pool.max-wait
=
-1
spring.redis.pool.max-idle
=
10
spring.redis.pool.min-idle
=
0
spring.redis.timeout
=
1000
#iec104.debug = false
#iec104.tcp.service.reomteIp=172.233.0.4
#iec104.tcp.service.reomtePort=2404
#iec104.server.Id=1
#iec104.tcp.bind.port=2404
#iec104.client.commonAddress=0000
#iec104.server.start.infomation.address = 1
#iec104.server.consecutive.transmissions.number = 6
#iec104.server.zz.max.transmissions.number = 100
#iec104.server.soe.max.transmissions.number = 10
#
iec104.server.sec.max.transmissions.number
=
10
\ No newline at end of file
YeeAmosConnectStart/src/test/resources/application-prod.properties
0 → 100644
View file @
585ff76f
eureka.client.serviceUrl.defaultZone
=
http://172.233.0.7:10500/eureka/
eureka.client.register-with-eureka
=
false
eureka.client.fetch-registry
=
false
eureka.client.healthcheck.enabled
=
false
eureka.instance.hostname
=
${spring.cloud.client.ipAddress}
eureka.instance.statusPageUrlPath
=
${management.context-path}/info
eureka.instance.healthCheckUrlPath
=
${management.context-path}/health
eureka.instance.preferIpAddress
=
false
eureka.instance.instance-id
=
${spring.cloud.client.ipAddress}:${server.port}
eureka.instance.lease-expiration-duration-in-seconds
=
10
eureka.instance.lease-renewal-interval-in-seconds
=
5
#\u8BF7\u6C42\u5904\u7406\u7684\u8D85\u65F6\u65F6\u95F4
ribbon.ReadTimeout
=
120000
#\u8BF7\u6C42\u8FDE\u63A5\u7684\u8D85\u65F6\u65F6\u95F4
ribbon.ConnectTimeout
=
30000
#DB properties:
#spring.datasource.url = jdbc:mysql://172.233.0.6:3306/amos_beijing_command_dev?useSSL=false&allowMultiQueries=true&serverTimezone=Asia/Shanghai
spring.datasource.url
=
jdbc:mysql://localhost:3306/nr_db?useSSL=false&allowMultiQueries=true&serverTimezone=Asia/Shanghai
spring.datasource.username
=
root
spring.datasource.password
=
root_123
spring.datasource.driver-class-name
=
com.mysql.jdbc.Driver
spring.datasource.type
=
com.zaxxer.hikari.HikariDataSource
spring.jpa.hibernate.ddl-auto
=
update
spring.datasource.hikari.minimum-idle
=
5
spring.datasource.hikari.maximum-pool-size
=
15
spring.datasource.hikari.auto-commit
=
true
spring.datasource.hikari.idle-timeout
=
30000
spring.datasource.hikari.pool-name
=
DatebookHikariCP
spring.datasource.hikari.max-lifetime
=
1800000
spring.datasource.hikari.connection-timeout
=
30000
spring.datasource.hikari.connection-test-query
=
SELECT 1
#JPA Configuration:
# Show or not log for each sql query
spring.jpa.show-sql
=
true
# Hibernate ddl auto (create, create-drop, update): with "update" the database
# schema will be automatically updated accordingly to java entities found in
# the project
# Naming strategy
#spring.jpa.hibernate.naming.physical-strategy=org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
spring.jpa.hibernate.naming-strategy
=
org.hibernate.cfg.ImprovedNamingStrategy
# Allows Hibernate to generate SQL optimized for a particular DBMS
spring.jpa.database-platform
=
org.hibernate.dialect.MySQLDialect
#mybatis mapper file
mybatis.mapper-locations
=
classpath:db/mapper/*.xml
# mybatis entity package
mybatis.type-aliases-package
=
com.yeejoin.amos.fireAutoIntf.business.entity.mybatis
#equipment check
param.protocol.not.check
=
HTTP
#enable Gzip compression
server.compression.enabled
=
true
server.compression.mime-types
=
application/json,application/xml,text/html,text/xml,text/plain
\u3001
server.compression.min-response-size
=
2048
#liquibase
liquibase.change-log
=
classpath:/db/changelog/changelog-master.xml
liquibase.enabled
:
false
# Redis\u6570\u636E\u5E93\u7D22\u5F15\uFF08\u9ED8\u8BA4\u4E3A0\uFF09
spring.redis.database
=
0
# Redis\u670D\u52A1\u5668\u5730\u5740
spring.redis.host
=
172.16.11.33
# Redis\u670D\u52A1\u5668\u8FDE\u63A5\u7AEF\u53E3
spring.redis.port
=
6379
# Redis\u670D\u52A1\u5668\u8FDE\u63A5\u5BC6\u7801\uFF08\u9ED8\u8BA4\u4E3A\u7A7A\uFF09
spring.redis.password
=
# \u8FDE\u63A5\u6C60\u6700\u5927\u8FDE\u63A5\u6570\uFF08\u4F7F\u7528\u8D1F\u503C\u8868\u793A\u6CA1\u6709\u9650\u5236\uFF09
spring.redis.pool.max-active=200
# \u8FDE\u63A5\u6C60\u6700\u5927\u963B\u585E\u7B49\u5F85\u65F6\u95F4\uFF08\u4F7F\u7528\u8D1F\u503C\u8868\u793A\u6CA1\u6709\u9650\u5236\uFF09
spring.redis.pool.max-wait
=
-1
# \u8FDE\u63A5\u6C60\u4E2D\u7684\u6700\u5927\u7A7A\u95F2\u8FDE\u63A5
spring.redis.pool.max-idle
=
10
# \u8FDE\u63A5\u6C60\u4E2D\u7684\u6700\u5C0F\u7A7A\u95F2\u8FDE\u63A5
spring.redis.pool.min-idle
=
0
# \u8FDE\u63A5\u8D85\u65F6\u65F6\u95F4\uFF08\u6BEB\u79D2\uFF09
spring.redis.timeout
=
1000
\ No newline at end of file
YeeAmosConnectStart/src/test/resources/application-test.properties
0 → 100644
View file @
585ff76f
eureka.client.serviceUrl.defaultZone
=
http://172.233.0.7:10500/eureka/
eureka.client.register-with-eureka
=
false
eureka.client.fetch-registry
=
false
eureka.client.healthcheck.enabled
=
false
eureka.instance.hostname
=
${spring.cloud.client.ipAddress}
eureka.instance.statusPageUrlPath
=
${management.context-path}/info
eureka.instance.healthCheckUrlPath
=
${management.context-path}/health
eureka.instance.preferIpAddress
=
false
eureka.instance.instance-id
=
${spring.cloud.client.ipAddress}:${server.port}
eureka.instance.lease-expiration-duration-in-seconds
=
10
eureka.instance.lease-renewal-interval-in-seconds
=
5
#\u8BF7\u6C42\u5904\u7406\u7684\u8D85\u65F6\u65F6\u95F4
ribbon.ReadTimeout
=
120000
#\u8BF7\u6C42\u8FDE\u63A5\u7684\u8D85\u65F6\u65F6\u95F4
ribbon.ConnectTimeout
=
30000
#DB properties:
#spring.datasource.url = jdbc:mysql://172.233.0.6:3306/amos_beijing_command_dev?useSSL=false&allowMultiQueries=true&serverTimezone=Asia/Shanghai
spring.datasource.url
=
jdbc:mysql://localhost:3306/nr_db?useSSL=false&allowMultiQueries=true&serverTimezone=Asia/Shanghai
spring.datasource.username
=
root
spring.datasource.password
=
root_123
spring.datasource.driver-class-name
=
com.mysql.jdbc.Driver
#spring.datasource.username = his
#spring.datasource.username = root
#spring.datasource.username = root
#spring.datasource.password = admin_1234
#spring.datasource.password = His@9700
# HikariCP settings
# spring.datasource.hikari.*
# contection life time (ms)
spring.datasource.type
=
com.zaxxer.hikari.HikariDataSource
spring.jpa.hibernate.ddl-auto
=
update
spring.datasource.hikari.minimum-idle
=
5
spring.datasource.hikari.maximum-pool-size
=
15
spring.datasource.hikari.auto-commit
=
true
spring.datasource.hikari.idle-timeout
=
30000
spring.datasource.hikari.pool-name
=
DatebookHikariCP
spring.datasource.hikari.max-lifetime
=
1800000
spring.datasource.hikari.connection-timeout
=
30000
spring.datasource.hikari.connection-test-query
=
SELECT 1
#JPA Configuration:
# Show or not log for each sql query
spring.jpa.show-sql
=
true
# Hibernate ddl auto (create, create-drop, update): with "update" the database
# schema will be automatically updated accordingly to java entities found in
# the project
# Naming strategy
#spring.jpa.hibernate.naming.physical-strategy=org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
spring.jpa.hibernate.naming-strategy
=
org.hibernate.cfg.ImprovedNamingStrategy
# Allows Hibernate to generate SQL optimized for a particular DBMS
spring.jpa.database-platform
=
org.hibernate.dialect.MySQLDialect
#mybatis mapper file
mybatis.mapper-locations
=
classpath:db/mapper/*.xml
# mybatis entity package
mybatis.type-aliases-package
=
com.yeejoin.amos.fireAutoIntf.business.entity.mybatis
#equipment check
param.protocol.not.check
=
HTTP
#enable Gzip compression
server.compression.enabled
=
true
server.compression.mime-types
=
application/json,application/xml,text/html,text/xml,text/plain
\u3001
server.compression.min-response-size
=
2048
#liquibase
liquibase.change-log
=
classpath:/db/changelog/changelog-master.xml
liquibase.enabled
:
false
# Redis\u6570\u636E\u5E93\u7D22\u5F15\uFF08\u9ED8\u8BA4\u4E3A0\uFF09
spring.redis.database
=
0
# Redis\u670D\u52A1\u5668\u5730\u5740
spring.redis.host
=
172.16.11.33
# Redis\u670D\u52A1\u5668\u8FDE\u63A5\u7AEF\u53E3
spring.redis.port
=
6379
# Redis\u670D\u52A1\u5668\u8FDE\u63A5\u5BC6\u7801\uFF08\u9ED8\u8BA4\u4E3A\u7A7A\uFF09
spring.redis.password
=
# \u8FDE\u63A5\u6C60\u6700\u5927\u8FDE\u63A5\u6570\uFF08\u4F7F\u7528\u8D1F\u503C\u8868\u793A\u6CA1\u6709\u9650\u5236\uFF09
spring.redis.pool.max-active=200
# \u8FDE\u63A5\u6C60\u6700\u5927\u963B\u585E\u7B49\u5F85\u65F6\u95F4\uFF08\u4F7F\u7528\u8D1F\u503C\u8868\u793A\u6CA1\u6709\u9650\u5236\uFF09
spring.redis.pool.max-wait
=
-1
# \u8FDE\u63A5\u6C60\u4E2D\u7684\u6700\u5927\u7A7A\u95F2\u8FDE\u63A5
spring.redis.pool.max-idle
=
10
# \u8FDE\u63A5\u6C60\u4E2D\u7684\u6700\u5C0F\u7A7A\u95F2\u8FDE\u63A5
spring.redis.pool.min-idle
=
0
# \u8FDE\u63A5\u8D85\u65F6\u65F6\u95F4\uFF08\u6BEB\u79D2\uFF09
spring.redis.timeout
=
1000
YeeAmosConnectStart/src/test/resources/application.properties
0 → 100644
View file @
585ff76f
spring.application.name
=
YeeAmosIec104Intf
server.port
=
9007
#environment
spring.profiles.active
=
dev
#netty
so.keepalive
=
true
so.backlog
=
128
#redis
params.remoteurl
=
http://172.16.11.33:8800/
#params.remoteurl = http://172.16.10.74:8800/
params.time
=
5
params.period
=
1800
\ No newline at end of file
YeeAmosConnectStart/src/test/resources/cause.properties
0 → 100644
View file @
585ff76f
#周期、循环 - 上行
#PERIODIC = 1,
1
=
周期、循环
#<para>背景扫描 - 上行</para>
#BACKGROUND_SCAN = 2,
2
=
背景扫描
#突发(自发) - 上行
#SPONTANEOUS = 3,
3
=
突发(自发)
#初始化 - 上行
#INITIALIZED = 4,
4
=
初始化
#请求或者被请求 - 上行、下行
#REQUEST = 5,
5
=
请求或者被请求
#激活 - 下行
#ACTIVATION = 6,
6
=
激活
#激活确认 - 上行
#ACTIVATION_CON = 7,
7
=
激活确认
#停止激活 - 下行
#DEACTIVATION = 8,
8
=
停止激活
# 停止激活确认 - 上行
#DEACTIVATION_CON = 9,
9
=
停止激活确认
#激活终止 - 下行
#ACTIVATION_TERMINATION = 10,
10
=
激活结束
#远方命令引起的返送信息 - 上行
#RETURN_INFO_REMOTE = 11,
11
=
远方命令引起的返送信息
#当地命令引起的返送信息 - 上行
#RETURN_INFO_LOCAL = 12,
12
=
当地命令引起的返送信息
# 文件传输
#FILE_TRANSFER = 13,
13
=
文件传输
#AUTHENTICATION = 14,
14
=
AUTHENTICATION
#MAINTENANCE_OF_AUTH_SESSION_KEY = 15,
15
=
MAINTENANCE_OF_AUTH_SESSION_KEY
#MAINTENANCE_OF_USER_ROLE_AND_UPDATE_KEY = 16,
16
=
MAINTENANCE_OF_USER_ROLE_AND_UPDATE_KEY
#响应站召唤 - 上行
#INTERROGATED_BY_STATION = 20,
20
=
响应站召唤
#响应第 1 组召唤 - 上行
#INTERROGATED_BY_GROUP_1 = 21,
21
=
响应第 1 组召唤
#响应第 2 组召唤 - 上行
#INTERROGATED_BY_GROUP_2 = 22,
22
=
响应第 2 组召唤
#响应第 3 组召唤 - 上行
#INTERROGATED_BY_GROUP_3 = 23,
23
=
响应第 3 组召唤
#响应第 4 组召唤 - 上行
#INTERROGATED_BY_GROUP_4 = 24,
24
=
响应第 4 组召唤
#响应第 5 组召唤 - 上行
#INTERROGATED_BY_GROUP_5 = 25,
25
=
响应第 5 组召唤
#响应第 6 组召唤 - 上行
#INTERROGATED_BY_GROUP_6 = 26,
26
=
响应第 6 组召唤
#响应第 7 组召唤 - 上行
#INTERROGATED_BY_GROUP_7 = 27,
27
=
响应第 7 组召唤
#响应第 8 组召唤 - 上行
#INTERROGATED_BY_GROUP_8 = 28,
28
=
响应第 8 组召唤
#响应第 9 组召唤 - 上行
#INTERROGATED_BY_GROUP_9 = 29,
29
=
响应第 9 组召唤
#响应第 10 组召唤 - 上行
#INTERROGATED_BY_GROUP_10 = 30,
30
=
响应第 10 组召唤 - 上行
#响应第 11 组召唤 - 上行
#INTERROGATED_BY_GROUP_11 = 31,
31
=
响应第 11 组召唤 - 上行
#/// 响应第 12 组召唤 - 上行
#INTERROGATED_BY_GROUP_12 = 32,
32
=
响应第 12 组召唤 - 上行
YeeAmosConnectStart/src/test/resources/config/license.bat
0 → 100644
View file @
585ff76f
info=1
expireDate=2018-4-1,
mac=,
ip=,
licenseType=2
<licenseKey>[-57,-28,-8,41,-121,-46,29,-41,-112,-13,63,-66,-26,-101,24,-69]
YeeAmosConnectStart/src/test/resources/configfile/cause.properties
0 → 100644
View file @
585ff76f
#周期、循环 - 上行
#PERIODIC = 1,
1
=
周期、循环
#<para>背景扫描 - 上行</para>
#BACKGROUND_SCAN = 2,
2
=
背景扫描
#突发(自发) - 上行
#SPONTANEOUS = 3,
3
=
突发(自发)
#初始化 - 上行
#INITIALIZED = 4,
4
=
初始化
#请求或者被请求 - 上行、下行
#REQUEST = 5,
5
=
请求或者被请求
#激活 - 下行
#ACTIVATION = 6,
6
=
激活
#激活确认 - 上行
#ACTIVATION_CON = 7,
7
=
激活确认
#停止激活 - 下行
#DEACTIVATION = 8,
8
=
停止激活
# 停止激活确认 - 上行
#DEACTIVATION_CON = 9,
9
=
停止激活确认
#激活终止 - 下行
#ACTIVATION_TERMINATION = 10,
10
=
激活结束
#远方命令引起的返送信息 - 上行
#RETURN_INFO_REMOTE = 11,
11
=
远方命令引起的返送信息
#当地命令引起的返送信息 - 上行
#RETURN_INFO_LOCAL = 12,
12
=
当地命令引起的返送信息
# 文件传输
#FILE_TRANSFER = 13,
13
=
文件传输
#AUTHENTICATION = 14,
14
=
AUTHENTICATION
#MAINTENANCE_OF_AUTH_SESSION_KEY = 15,
15
=
MAINTENANCE_OF_AUTH_SESSION_KEY
#MAINTENANCE_OF_USER_ROLE_AND_UPDATE_KEY = 16,
16
=
MAINTENANCE_OF_USER_ROLE_AND_UPDATE_KEY
#响应站召唤 - 上行
#INTERROGATED_BY_STATION = 20,
20
=
响应站召唤
#响应第 1 组召唤 - 上行
#INTERROGATED_BY_GROUP_1 = 21,
21
=
响应第 1 组召唤
#响应第 2 组召唤 - 上行
#INTERROGATED_BY_GROUP_2 = 22,
22
=
响应第 2 组召唤
#响应第 3 组召唤 - 上行
#INTERROGATED_BY_GROUP_3 = 23,
23
=
响应第 3 组召唤
#响应第 4 组召唤 - 上行
#INTERROGATED_BY_GROUP_4 = 24,
24
=
响应第 4 组召唤
#响应第 5 组召唤 - 上行
#INTERROGATED_BY_GROUP_5 = 25,
25
=
响应第 5 组召唤
#响应第 6 组召唤 - 上行
#INTERROGATED_BY_GROUP_6 = 26,
26
=
响应第 6 组召唤
#响应第 7 组召唤 - 上行
#INTERROGATED_BY_GROUP_7 = 27,
27
=
响应第 7 组召唤
#响应第 8 组召唤 - 上行
#INTERROGATED_BY_GROUP_8 = 28,
28
=
响应第 8 组召唤
#响应第 9 组召唤 - 上行
#INTERROGATED_BY_GROUP_9 = 29,
29
=
响应第 9 组召唤
#响应第 10 组召唤 - 上行
#INTERROGATED_BY_GROUP_10 = 30,
30
=
响应第 10 组召唤 - 上行
#响应第 11 组召唤 - 上行
#INTERROGATED_BY_GROUP_11 = 31,
31
=
响应第 11 组召唤 - 上行
#/// 响应第 12 组召唤 - 上行
#INTERROGATED_BY_GROUP_12 = 32,
32
=
响应第 12 组召唤 - 上行
YeeAmosConnectStart/src/test/resources/configfile/debug.properties
0 → 100644
View file @
585ff76f
soe.time
=
60
status.time
=
20
\ No newline at end of file
YeeAmosConnectStart/src/test/resources/configfile/typeId.properties
0 → 100644
View file @
585ff76f
1
=
单点信息
3
=
双点信息
5
=
步位置信息
7
=
32比特串
9
=
测量值,归一化值
11
=
测量值,标度化值
13
=
测量值,短浮点数
15
=
累计量
20
=
带状态检出的成组单点信息
21
=
不带品质描述的归一化测量值
30
=
带时标CP56Time2a的单点信息
31
=
带时标CP56Time2a的双点信息
32
=
带时标CP56Time2a的步位置信息
33
=
带时标CP56Time2a的32比特串
34
=
带时标CP56Time2a的测量值,归一化值
35
=
带时标CP56Time2a的测量值,标度化值
36
=
带时标CP56Time2a的测量值,短浮点数
37
=
带时标CP56Time2a的累计量
38
=
带时标CP56Time2a的继电保护装置事件
39
=
带时标CP56Time2a的继电保护装置成组启动事件
40
=
带时标CP56Time2a的继电保护装置成组输出电路信息
45
=
单命令
46
=
双命令
47
=
步调节命令
48
=
设点命令,归一化值
49
=
设点命令,标度化值
50
=
设点命令,短浮点数
51
=
32比特串
58
=
带时标CP56Time2a的单命令
59
=
带时标CP56Time2a的双命令
60
=
带时标CP56Time2a的步调节命令
61
=
带时标CP56Time2a的设点命令,归一化值
62
=
带时标CP56Time2a的设点命令,标度化值
63
=
带时标CP56Time2a的设点命令,短浮点数
64
=
带时标CP56Time2a的32比特串
100
=
总召唤命令
101
=
计数量召唤命令
102
=
读命令
103
=
时钟同步命令
105
=
复位进程命令
107
=
带时标CP56Time2a的测试命令
YeeAmosConnectStart/src/test/resources/db/changelog/changelog-master.xml
0 → 100644
View file @
585ff76f
<?xml version="1.0" encoding="utf-8"?>
<databaseChangeLog
xmlns=
"http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.4.xsd"
>
<include
file=
"i_client_linsten.sql"
relativeToChangelogFile=
"true"
/>
<include
file=
"i_transmit_mapper.sql"
relativeToChangelogFile=
"true"
/>
</databaseChangeLog>
\ No newline at end of file
YeeAmosConnectStart/src/test/resources/db/changelog/i_client_linsten.sql
0 → 100644
View file @
585ff76f
/*
Navicat MySQL Data Transfer
Source Server : 172.16.11.33
Source Server Version : 50717
Source Host : 172.16.11.33:3306
Source Database : amos_iec
Target Server Type : MYSQL
Target Server Version : 50717
File Encoding : 65001
Date: 2019-11-07 15:05:38
*/
SET
FOREIGN_KEY_CHECKS
=
0
;
-- ----------------------------
-- Table structure for i_client_linsten
-- ----------------------------
DROP
TABLE
IF
EXISTS
`i_client_linsten`
;
CREATE
TABLE
`i_client_linsten`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
,
`channle_no`
varchar
(
255
)
DEFAULT
NULL
,
`data_type`
varchar
(
255
)
DEFAULT
NULL
,
`remark`
varchar
(
255
)
DEFAULT
NULL
,
`url`
varchar
(
255
)
DEFAULT
NULL
,
`name`
varchar
(
255
)
DEFAULT
NULL
,
PRIMARY
KEY
(
`id`
)
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
10
DEFAULT
CHARSET
=
utf8mb4
;
-- ----------------------------
-- Table structure for i_ip_port_conf
-- ----------------------------
DROP
TABLE
IF
EXISTS
`i_ip_port_conf`
;
CREATE
TABLE
`i_ip_port_conf`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
,
`channel_no`
varchar
(
255
)
DEFAULT
NULL
,
`common_address`
varchar
(
255
)
DEFAULT
NULL
,
`ip`
varchar
(
255
)
DEFAULT
NULL
,
`is_delete`
int
(
11
)
NOT
NULL
,
`last_update_time`
datetime
DEFAULT
NULL
,
`port`
varchar
(
255
)
DEFAULT
NULL
,
`service_id`
varchar
(
255
)
DEFAULT
NULL
,
`service_type`
varchar
(
255
)
DEFAULT
NULL
,
`name`
varchar
(
255
)
DEFAULT
NULL
,
PRIMARY
KEY
(
`id`
)
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
12
DEFAULT
CHARSET
=
utf8mb4
;
-- ----------------------------
-- Table structure for i_point_config
-- ----------------------------
DROP
TABLE
IF
EXISTS
`i_point_config`
;
CREATE
TABLE
`i_point_config`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
,
`channel_no`
varchar
(
255
)
DEFAULT
NULL
,
`common_address`
bigint
(
20
)
DEFAULT
NULL
,
`invalid`
bit
(
1
)
NOT
NULL
,
`name`
varchar
(
255
)
DEFAULT
NULL
,
`originator_address`
int
(
11
)
DEFAULT
NULL
,
`point_code`
varchar
(
255
)
DEFAULT
NULL
,
`remark`
varchar
(
255
)
DEFAULT
NULL
,
`value`
varchar
(
255
)
DEFAULT
NULL
,
`point_type`
varchar
(
255
)
DEFAULT
NULL
,
`point_classify`
varchar
(
255
)
DEFAULT
NULL
,
PRIMARY
KEY
(
`id`
)
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
2988
DEFAULT
CHARSET
=
utf8mb4
;
SET
FOREIGN_KEY_CHECKS
=
1
;
YeeAmosConnectStart/src/test/resources/db/changelog/i_transmit_mapper.sql
0 → 100644
View file @
585ff76f
/*
Navicat Premium Data Transfer
Source Server : 172.16.11.33
Source Server Type : MySQL
Source Server Version : 50717
Source Host : 172.16.11.33:3306
Source Schema : amos_iec_test
Target Server Type : MySQL
Target Server Version : 50717
File Encoding : 65001
Date: 25/11/2019 19:50:58
*/
SET
NAMES
utf8mb4
;
SET
FOREIGN_KEY_CHECKS
=
0
;
-- ----------------------------
-- Table structure for i_transmit_mapper
-- ----------------------------
DROP
TABLE
IF
EXISTS
`i_transmit_mapper`
;
CREATE
TABLE
`i_transmit_mapper`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
,
`mapper_id`
bigint
(
20
)
NULL
DEFAULT
NULL
,
`mapper_type`
varchar
(
255
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
,
`transmit_ip`
varchar
(
255
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
,
`transmit_port`
varchar
(
255
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
,
`transmit_type`
varchar
(
255
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
,
`transmit_url`
varchar
(
255
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
2
CHARACTER
SET
=
utf8mb4
COLLATE
=
utf8mb4_general_ci
ROW_FORMAT
=
Dynamic
;
-- ----------------------------
-- Records of i_transmit_mapper
-- ----------------------------
INSERT
INTO
`i_transmit_mapper`
VALUES
(
1
,
2
,
'UART'
,
'172.16.3.3'
,
NULL
,
'TCP'
,
'172.16.3.3'
);
-- ----------------------------
-- Table structure for i_uart_config
-- ----------------------------
DROP
TABLE
IF
EXISTS
`i_uart_config`
;
CREATE
TABLE
`i_uart_config`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
,
`baud_rate`
int
(
11
)
NOT
NULL
,
`create_by`
varchar
(
255
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
,
`created_time`
datetime
(
0
)
NULL
DEFAULT
NULL
,
`data_bits`
int
(
11
)
NOT
NULL
,
`is_delete`
int
(
11
)
NOT
NULL
,
`name`
varchar
(
255
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
,
`parity`
int
(
11
)
NOT
NULL
,
`remark`
varchar
(
255
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
,
`serial_port`
varchar
(
255
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
,
`stop_bits`
int
(
11
)
NOT
NULL
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
5
CHARACTER
SET
=
utf8mb4
COLLATE
=
utf8mb4_general_ci
ROW_FORMAT
=
Dynamic
;
-- ----------------------------
-- Records of i_uart_config
-- ----------------------------
INSERT
INTO
`i_uart_config`
VALUES
(
2
,
9600
,
NULL
,
NULL
,
8
,
0
,
'COM4'
,
1
,
NULL
,
'COM4'
,
1
);
INSERT
INTO
`i_uart_config`
VALUES
(
3
,
9600
,
NULL
,
NULL
,
8
,
0
,
'COM3'
,
1
,
NULL
,
'COM3'
,
1
);
SET
FOREIGN_KEY_CHECKS
=
1
;
YeeAmosConnectStart/src/test/resources/lib/Linux/i686-unknown-linux-gnu/librxtxParallel.so
0 → 100644
View file @
585ff76f
File added
YeeAmosConnectStart/src/test/resources/lib/Linux/i686-unknown-linux-gnu/librxtxSerial.so
0 → 100644
View file @
585ff76f
File added
YeeAmosConnectStart/src/test/resources/lib/Linux/ia64-unkown-linux-gnu/librxtxSerial.so
0 → 100644
View file @
585ff76f
File added
YeeAmosConnectStart/src/test/resources/lib/Linux/x86_64-unknown-linux-gnu/librxtxSerial.so
0 → 100644
View file @
585ff76f
File added
YeeAmosConnectStart/src/test/resources/lib/Mac_OS_X/README
0 → 100644
View file @
585ff76f
Wed Mar 1 12:05:10 MST 2006
We forgot to update the Mac OS X binary. Previously, it was an old version
(RXTX-2.1-7pre20). This has now been corrected.
YeeAmosConnectStart/src/test/resources/lib/Mac_OS_X/librxtxSerial.jnilib
0 → 100644
View file @
585ff76f
File added
YeeAmosConnectStart/src/test/resources/lib/Windows/rxtxParallel.dll
0 → 100644
View file @
585ff76f
File added
YeeAmosConnectStart/src/test/resources/lib/Windows/rxtxParallel64.dll
0 → 100644
View file @
585ff76f
File added
YeeAmosConnectStart/src/test/resources/lib/Windows/rxtxSerial.dll
0 → 100644
View file @
585ff76f
File added
YeeAmosConnectStart/src/test/resources/lib/Windows/rxtxSerial64.dll
0 → 100644
View file @
585ff76f
File added
YeeAmosConnectStart/src/test/resources/log4j.properties
0 → 100644
View file @
585ff76f
log4j.rootLogger
=
DEBUG, stdout, logfile
log4j.logger.io.netty
=
info
log4j.logger.org.hibernate
=
info
log4j.logger.com.mchange
=
info
log4j.logger.org.springframework
=
info
log4j.logger.com.mangofactory
=
info
log4j.logger.org.apache
=
info
log4j.logger.com.zaxxer.hikari.pool
=
info
log4j.appender.stdout
=
org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout
=
org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern
=
%d %t %-5p [%c{1}:%L] %m%n
log4j.appender.logfile
=
org.apache.log4j.RollingFileAppender
log4j.appender.logfile.File
=
logs/fireAutoIntf.log
log4j.appender.logfile.MaxFileSize
=
10240KB
log4j.appender.logfile.MaxBackupIndex
=
30
log4j.appender.logfile.layout
=
org.apache.log4j.PatternLayout
log4j.appender.logfile.layout.ConversionPattern
=
%d %t %-5p [%c{1}:%L] %m%n
YeeAmosConnectStart/src/test/resources/package.xml
0 → 100644
View file @
585ff76f
<?xml version="1.0" encoding="UTF-8"?>
<assembly
xmlns=
"http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3 http://maven.apache.org/xsd/assembly-1.1.3.xsd"
>
<id>
package
</id>
<formats>
<format>
zip
</format>
</formats>
<includeBaseDirectory>
true
</includeBaseDirectory>
<fileSets>
<fileSet>
<directory>
bin
</directory>
<outputDirectory>
/
</outputDirectory>
</fileSet>
<fileSet>
<directory>
src/main/resources/config
</directory>
<outputDirectory>
/config/
</outputDirectory>
</fileSet>
<fileSet>
<directory>
src/main/resources/db
</directory>
<outputDirectory>
/db
</outputDirectory>
</fileSet>
<fileSet>
<directory>
src/main/resources/lib
</directory>
<outputDirectory>
/lib
</outputDirectory>
</fileSet>
<fileSet>
<directory>
src/main/resources
</directory>
<includes>
<include>
application.properties
</include>
<include>
application-dev.properties
</include>
<include>
application-prod.properties
</include>
<include>
application-test.properties
</include>
<include>
cause.properties
</include>
<include>
debug.properties
</include>
<include>
typeId.properties
</include>
<include>
point.json
</include>
<include>
soe.json
</include>
<include>
log4j.properties
</include>
<include>
META-INF/app.properties
</include>
</includes>
<outputDirectory>
/
</outputDirectory>
</fileSet>
<fileSet>
<directory>
${project.build.directory}
</directory>
<outputDirectory>
/
</outputDirectory>
<includes>
<include>
*.jar
</include>
</includes>
</fileSet>
</fileSets>
<dependencySets>
<dependencySet>
<outputDirectory>
lib
</outputDirectory>
<scope>
runtime
</scope>
<!-- <unpack>false</unpack> -->
<excludes>
<!-- <exclude>${project.name}-${project.version}</exclude> -->
<exclude>
${groupId}:${artifactId}
</exclude>
</excludes>
</dependencySet>
</dependencySets>
</assembly>
\ No newline at end of file
YeeAmosConnectStart/src/test/resources/typeId.properties
0 → 100644
View file @
585ff76f
1
=
单点信息
3
=
双点信息
5
=
步位置信息
7
=
32比特串
9
=
测量值,归一化值
11
=
测量值,标度化值
13
=
测量值,短浮点数
15
=
累计量
20
=
带状态检出的成组单点信息
21
=
不带品质描述的归一化测量值
30
=
带时标CP56Time2a的单点信息
31
=
带时标CP56Time2a的双点信息
32
=
带时标CP56Time2a的步位置信息
33
=
带时标CP56Time2a的32比特串
34
=
带时标CP56Time2a的测量值,归一化值
35
=
带时标CP56Time2a的测量值,标度化值
36
=
带时标CP56Time2a的测量值,短浮点数
37
=
带时标CP56Time2a的累计量
38
=
带时标CP56Time2a的继电保护装置事件
39
=
带时标CP56Time2a的继电保护装置成组启动事件
40
=
带时标CP56Time2a的继电保护装置成组输出电路信息
45
=
单命令
46
=
双命令
47
=
步调节命令
48
=
设点命令,归一化值
49
=
设点命令,标度化值
50
=
设点命令,短浮点数
51
=
32比特串
58
=
带时标CP56Time2a的单命令
59
=
带时标CP56Time2a的双命令
60
=
带时标CP56Time2a的步调节命令
61
=
带时标CP56Time2a的设点命令,归一化值
62
=
带时标CP56Time2a的设点命令,标度化值
63
=
带时标CP56Time2a的设点命令,短浮点数
64
=
带时标CP56Time2a的32比特串
100
=
总召唤命令
101
=
计数量召唤命令
102
=
读命令
103
=
时钟同步命令
105
=
复位进程命令
107
=
带时标CP56Time2a的测试命令
YeeAmosIec104IntfServer/src/main/java/com/yeejoin/amos/iec104/business/param/AlarmParam.java
View file @
585ff76f
package
com
.
yeejoin
.
amos
.
iec104
.
business
.
param
;
public
class
AlarmParam
{
import
java.io.Serializable
;
public
class
AlarmParam
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
private
String
informationAddress
;
//转发码
private
int
soe
;
private
String
state
;
// 值
...
...
YeeAmosIec104IntfServer/src/main/java/com/yeejoin/amos/iec104/tcp/client/invoke/GeneralDataQueue.java
View file @
585ff76f
...
...
@@ -8,10 +8,12 @@ import com.yeejoin.amos.iec104.business.param.AlarmParam;
import
com.yeejoin.amos.iec104.business.service.intfc.IClientListenService
;
import
com.yeejoin.amos.iec104.business.service.intfc.IConfService
;
import
com.yeejoin.amos.iec104.business.service.intfc.IPointConfigService
;
import
com.yeejoin.amos.iec104.context.FireAutoIntfContext
;
import
org.apache.log4j.Logger
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.StringUtils
;
import
java.util.LinkedList
;
...
...
@@ -21,31 +23,28 @@ import java.util.concurrent.LinkedBlockingQueue;
import
java.util.concurrent.ScheduledExecutorService
;
import
java.util.concurrent.TimeUnit
;
@Service
public
class
GeneralDataQueue
{
private
static
final
BlockingQueue
<
AlarmParam
>
blockingQueue
=
new
LinkedBlockingQueue
<
AlarmParam
>();
private
ScheduledExecutorService
service_general
=
null
;
@Autowired
private
IClientListenService
clientListenService
;
@Autowired
private
IPointConfigService
pointConfigService
;
@Autowired
private
IConfService
confService
;
private
volatile
static
GeneralDataQueue
instance
=
null
;
@Autowired
private
RedisTemplate
<
String
,
String
>
redisTemplate
;
// private GeneralDataQueue() {
// clientListenService = (IClientListenService) FireAutoIntfContext.getInstance().getBean(IClientListenService.class);
// confService = (IConfService) FireAutoIntfContext.getInstance().getBean(IConfService.class);
// pointConfigService = (IPointConfigService) FireAutoIntfContext.getInstance().getBean(IPointConfigService.class);
// }
private
GeneralDataQueue
()
{
clientListenService
=
(
IClientListenService
)
FireAutoIntfContext
.
getInstance
().
getBean
(
IClientListenService
.
class
);
confService
=
(
IConfService
)
FireAutoIntfContext
.
getInstance
().
getBean
(
IConfService
.
class
);
pointConfigService
=
(
IPointConfigService
)
FireAutoIntfContext
.
getInstance
().
getBean
(
IPointConfigService
.
class
);
redisTemplate
=
(
RedisTemplate
)
FireAutoIntfContext
.
getInstance
().
getBean
(
"redisTemplate"
);
}
public
static
GeneralDataQueue
getInstance
()
{
//先检查实例是否存在,如果不存在才进入下面的同步块
...
...
@@ -99,12 +98,14 @@ public class GeneralDataQueue {
AlarmParam
param1
=
blockingQueue
.
take
();
LinkedList
<
AlarmParam
>
datas
=
new
LinkedList
<>();
PointConfigVo
vo
=
pointConfigService
.
findByServicesIdAndInfoAddress
(
param1
.
getServiceId
(),
Integer
.
valueOf
(
param1
.
getInformationAddress
()));
if
(
ObjectUtils
.
isEmpty
(
vo
))
continue
;
param1
.
setPointCode
(
vo
.
getPointCode
());
if
(
alarmParamIsChange
(
param1
))
{
datas
.
add
(
param1
);
clientListenService
.
sendDatas
(
IEC104Constant
.
GENERAL_MESSAGE
,
datas
);
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
Logger
.
getLogger
(
this
.
getClass
()).
error
(
e
.
getMessage
());
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment