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
e35de3be
Commit
e35de3be
authored
May 25, 2020
by
高东东
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改类型
parent
b04958e5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
6 deletions
+6
-6
ApduQueue.java
.../com/yeejoin/amos/iec104/tcp/client/invoke/ApduQueue.java
+1
-1
IeFloat.java
...main/java/com/yeejoin/amos/iec104/tcp/entity/IeFloat.java
+3
-3
InformationObject.java
...com/yeejoin/amos/iec104/tcp/entity/InformationObject.java
+2
-2
No files found.
YeeAmosIec104IntfServer/src/main/java/com/yeejoin/amos/iec104/tcp/client/invoke/ApduQueue.java
View file @
e35de3be
...
@@ -103,7 +103,7 @@ public class ApduQueue {
...
@@ -103,7 +103,7 @@ public class ApduQueue {
data
.
setCreatedTime
(
new
Date
());
data
.
setCreatedTime
(
new
Date
());
data
.
setDataType
(
2
);
data
.
setDataType
(
2
);
data
.
setInformationAddress
(
informationObjectAddress
);
data
.
setInformationAddress
(
informationObjectAddress
);
Ie
Short
shortFloat
=
(
IeShor
t
)
informationElement
[
0
][
0
];
Ie
Float
shortFloat
=
(
IeFloa
t
)
informationElement
[
0
][
0
];
IeQuality
ieQuality
=
(
IeQuality
)
informationElement
[
0
][
1
];
IeQuality
ieQuality
=
(
IeQuality
)
informationElement
[
0
][
1
];
data
.
setValue
(
String
.
format
(
"%.2f"
,
shortFloat
.
getValue
()));
data
.
setValue
(
String
.
format
(
"%.2f"
,
shortFloat
.
getValue
()));
data
.
setQuality
(
ieQuality
.
toJson
().
toString
());
data
.
setQuality
(
ieQuality
.
toJson
().
toString
());
...
...
YeeAmosIec104IntfServer/src/main/java/com/yeejoin/amos/iec104/tcp/entity/Ie
Shor
t.java
→
YeeAmosIec104IntfServer/src/main/java/com/yeejoin/amos/iec104/tcp/entity/Ie
Floa
t.java
View file @
e35de3be
...
@@ -4,15 +4,15 @@ import io.netty.buffer.ByteBuf;
...
@@ -4,15 +4,15 @@ import io.netty.buffer.ByteBuf;
import
java.io.IOException
;
import
java.io.IOException
;
public
class
Ie
Shor
t
extends
InformationElement
{
public
class
Ie
Floa
t
extends
InformationElement
{
private
final
float
value
;
private
final
float
value
;
public
Ie
Shor
t
(
float
value
)
{
public
Ie
Floa
t
(
float
value
)
{
this
.
value
=
value
;
this
.
value
=
value
;
}
}
public
Ie
Shor
t
(
ByteBuf
is
)
throws
IOException
{
public
Ie
Floa
t
(
ByteBuf
is
)
throws
IOException
{
value
=
Float
.
intBitsToFloat
((
is
.
readByte
()
&
0xff
)
|
((
is
.
readByte
()
&
0xff
)
<<
8
));
value
=
Float
.
intBitsToFloat
((
is
.
readByte
()
&
0xff
)
|
((
is
.
readByte
()
&
0xff
)
<<
8
));
}
}
...
...
YeeAmosIec104IntfServer/src/main/java/com/yeejoin/amos/iec104/tcp/entity/InformationObject.java
View file @
e35de3be
...
@@ -44,7 +44,7 @@ public class InformationObject {
...
@@ -44,7 +44,7 @@ public class InformationObject {
case
9
:
case
9
:
informationElements
=
new
InformationElement
[
numberOfSequenceElements
][
2
];
informationElements
=
new
InformationElement
[
numberOfSequenceElements
][
2
];
for
(
int
i
=
0
;
i
<
numberOfSequenceElements
;
i
++)
{
for
(
int
i
=
0
;
i
<
numberOfSequenceElements
;
i
++)
{
informationElements
[
i
][
0
]
=
new
Ie
Shor
t
(
is
);
informationElements
[
i
][
0
]
=
new
Ie
Floa
t
(
is
);
informationElements
[
i
][
1
]
=
new
IeQuality
(
is
);
informationElements
[
i
][
1
]
=
new
IeQuality
(
is
);
log
.
debug
(
"9 浮点型遥测1: "
+
i
+
"--->"
+
informationElements
[
i
][
0
].
toString
());
log
.
debug
(
"9 浮点型遥测1: "
+
i
+
"--->"
+
informationElements
[
i
][
0
].
toString
());
log
.
debug
(
"9 浮点型遥测2: "
+
i
+
"--->"
+
informationElements
[
i
][
1
].
toString
());
log
.
debug
(
"9 浮点型遥测2: "
+
i
+
"--->"
+
informationElements
[
i
][
1
].
toString
());
...
@@ -64,7 +64,7 @@ public class InformationObject {
...
@@ -64,7 +64,7 @@ public class InformationObject {
case
21
:
case
21
:
informationElements
=
new
InformationElement
[
numberOfSequenceElements
][
1
];
informationElements
=
new
InformationElement
[
numberOfSequenceElements
][
1
];
for
(
int
i
=
0
;
i
<
numberOfSequenceElements
;
i
++)
{
for
(
int
i
=
0
;
i
<
numberOfSequenceElements
;
i
++)
{
informationElements
[
i
][
0
]
=
new
Ie
Shor
t
(
is
);
informationElements
[
i
][
0
]
=
new
Ie
Floa
t
(
is
);
log
.
debug
(
"21 浮点型遥测, 不带品质描述词的规一化值: "
+
i
+
"--->"
+
informationElements
[
i
][
0
].
toString
());
log
.
debug
(
"21 浮点型遥测, 不带品质描述词的规一化值: "
+
i
+
"--->"
+
informationElements
[
i
][
0
].
toString
());
}
}
break
;
break
;
...
...
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