Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Esteban Blanc
proview
Commits
22445455
Commit
22445455
authored
Jul 08, 2004
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
GetMsg added
parent
0ddda9fa
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
98 additions
and
2 deletions
+98
-2
java/jpwr/rt_client/src/Gdh.java
java/jpwr/rt_client/src/Gdh.java
+49
-1
src/jpwr/rt_client/src/Gdh.java
src/jpwr/rt_client/src/Gdh.java
+49
-1
No files found.
java/jpwr/rt_client/src/Gdh.java
View file @
22445455
...
...
@@ -51,11 +51,12 @@ public class Gdh
public
final
static
int
CRR_OBJECT
=
43
;
public
final
static
int
GET_PARENT
=
44
;
public
final
static
int
GET_OBJECT_INFO_OBJID
=
45
;
public
final
static
int
GET_OBJECT_REF_INFO_BOOLEAN_ARRAY
=
46
;
public
final
static
int
GET_OBJECT_REF_INFO_FLOAT_ARRAY
=
47
;
public
final
static
int
GET_OBJECT_REF_INFO_INT_ARRAY
=
48
;
public
final
static
int
GET_OBJECT_REF_INFO_STRING_ARRAY
=
49
;
public
final
static
int
GET_MSG
=
50
;
public
final
static
int
GET_MSG_TEXT
=
51
;
...
...
@@ -1296,6 +1297,10 @@ public class Gdh
case
Pwr
.
eType_UInt16
:
case
Pwr
.
eType_Int8
:
case
Pwr
.
eType_UInt8
:
case
Pwr
.
eType_Status
:
case
Pwr
.
eType_NetStatus
:
case
Pwr
.
eType_Enum
:
case
Pwr
.
eType_Mask
:
((
jpwr
.
rt
.
Sub
)(
subscriptions
.
get
(
i
))).
setValue
(
in
.
readInt
());
break
;
case
Pwr
.
eType_Float32
:
...
...
@@ -1550,6 +1555,49 @@ public class Gdh
}
}
public
CdhrString
getMsg
(
int
status
)
{
try
{
out
.
writeInt
(
GET_MSG
);
out
.
writeInt
(
status
);
out
.
flush
();
int
sts
=
in
.
readInt
();
if
(
sts
%
2
==
0
)
{
return
new
CdhrString
(
null
,
sts
);
}
String
str
=
in
.
readUTF
();
return
new
CdhrString
(
str
,
sts
);
}
catch
(
IOException
e
)
{
return
new
CdhrString
(
""
,
__IO_EXCEPTION
);
}
}
public
CdhrString
getMsgText
(
int
status
)
{
try
{
out
.
writeInt
(
GET_MSG_TEXT
);
out
.
writeInt
(
status
);
out
.
flush
();
int
sts
=
in
.
readInt
();
if
(
sts
%
2
==
0
)
{
return
new
CdhrString
(
null
,
sts
);
}
String
str
=
in
.
readUTF
();
return
new
CdhrString
(
str
,
sts
);
}
catch
(
IOException
e
)
{
return
new
CdhrString
(
""
,
__IO_EXCEPTION
);
}
}
public
void
logString
(
String
str
)
{
...
...
src/jpwr/rt_client/src/Gdh.java
View file @
22445455
...
...
@@ -51,11 +51,12 @@ public class Gdh
public
final
static
int
CRR_OBJECT
=
43
;
public
final
static
int
GET_PARENT
=
44
;
public
final
static
int
GET_OBJECT_INFO_OBJID
=
45
;
public
final
static
int
GET_OBJECT_REF_INFO_BOOLEAN_ARRAY
=
46
;
public
final
static
int
GET_OBJECT_REF_INFO_FLOAT_ARRAY
=
47
;
public
final
static
int
GET_OBJECT_REF_INFO_INT_ARRAY
=
48
;
public
final
static
int
GET_OBJECT_REF_INFO_STRING_ARRAY
=
49
;
public
final
static
int
GET_MSG
=
50
;
public
final
static
int
GET_MSG_TEXT
=
51
;
...
...
@@ -1296,6 +1297,10 @@ public class Gdh
case
Pwr
.
eType_UInt16
:
case
Pwr
.
eType_Int8
:
case
Pwr
.
eType_UInt8
:
case
Pwr
.
eType_Status
:
case
Pwr
.
eType_NetStatus
:
case
Pwr
.
eType_Enum
:
case
Pwr
.
eType_Mask
:
((
jpwr
.
rt
.
Sub
)(
subscriptions
.
get
(
i
))).
setValue
(
in
.
readInt
());
break
;
case
Pwr
.
eType_Float32
:
...
...
@@ -1550,6 +1555,49 @@ public class Gdh
}
}
public
CdhrString
getMsg
(
int
status
)
{
try
{
out
.
writeInt
(
GET_MSG
);
out
.
writeInt
(
status
);
out
.
flush
();
int
sts
=
in
.
readInt
();
if
(
sts
%
2
==
0
)
{
return
new
CdhrString
(
null
,
sts
);
}
String
str
=
in
.
readUTF
();
return
new
CdhrString
(
str
,
sts
);
}
catch
(
IOException
e
)
{
return
new
CdhrString
(
""
,
__IO_EXCEPTION
);
}
}
public
CdhrString
getMsgText
(
int
status
)
{
try
{
out
.
writeInt
(
GET_MSG_TEXT
);
out
.
writeInt
(
status
);
out
.
flush
();
int
sts
=
in
.
readInt
();
if
(
sts
%
2
==
0
)
{
return
new
CdhrString
(
null
,
sts
);
}
String
str
=
in
.
readUTF
();
return
new
CdhrString
(
str
,
sts
);
}
catch
(
IOException
e
)
{
return
new
CdhrString
(
""
,
__IO_EXCEPTION
);
}
}
public
void
logString
(
String
str
)
{
...
...
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