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
f4da6e39
Commit
f4da6e39
authored
Jul 08, 2004
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
GetMsg added
parent
4505f24a
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
86 additions
and
2 deletions
+86
-2
java/jpwr/rt/src/Gdh.java
java/jpwr/rt/src/Gdh.java
+2
-0
java/jpwr/rt/src/GdhServer.java
java/jpwr/rt/src/GdhServer.java
+41
-1
src/jpwr/rt/src/Gdh.java
src/jpwr/rt/src/Gdh.java
+2
-0
src/jpwr/rt/src/GdhServer.java
src/jpwr/rt/src/GdhServer.java
+41
-1
No files found.
java/jpwr/rt/src/Gdh.java
View file @
f4da6e39
...
...
@@ -302,6 +302,8 @@ public class Gdh {
public
static
native
String
translateFilename
(
String
filename
);
public
native
CdhrString
crrSignal
(
String
name
);
public
native
CdhrString
crrObject
(
String
name
);
public
native
CdhrString
getMsg
(
int
sts
);
public
native
CdhrString
getMsgText
(
int
sts
);
}
...
...
java/jpwr/rt/src/GdhServer.java
View file @
f4da6e39
...
...
@@ -62,11 +62,12 @@ public class GdhServer
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
;
public
final
static
int
PORT
=
4445
;
...
...
@@ -680,6 +681,10 @@ public class GdhServer
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
:
if
(
elements
>
1
)
{
//its an array
...
...
@@ -1283,6 +1288,41 @@ public class GdhServer
System
.
out
.
println
(
"crrObject: IO exception"
);
}
break
;
case
GET_MSG:
try
{
int
status
=
in
.
readInt
();
CdhrString
ret
=
gdh
.
getMsg
(
status
);
System
.
out
.
println
(
"getMsg : "
+
status
+
" "
+
ret
.
str
);
out
.
writeInt
(
ret
.
getSts
());
if
(
ret
.
oddSts
())
{
out
.
writeUTF
(
ret
.
str
);
}
out
.
flush
();
}
catch
(
IOException
e
)
{
System
.
out
.
println
(
"getMsg: IO exception"
);
}
break
;
case
GET_MSG_TEXT:
try
{
int
status
=
in
.
readInt
();
CdhrString
ret
=
gdh
.
getMsgText
(
status
);
out
.
writeInt
(
ret
.
getSts
());
if
(
ret
.
oddSts
())
{
out
.
writeUTF
(
ret
.
str
);
}
out
.
flush
();
}
catch
(
IOException
e
)
{
System
.
out
.
println
(
"getMsg: IO exception"
);
}
break
;
case
LOG_STRING:
try
{
...
...
src/jpwr/rt/src/Gdh.java
View file @
f4da6e39
...
...
@@ -302,6 +302,8 @@ public class Gdh {
public
static
native
String
translateFilename
(
String
filename
);
public
native
CdhrString
crrSignal
(
String
name
);
public
native
CdhrString
crrObject
(
String
name
);
public
native
CdhrString
getMsg
(
int
sts
);
public
native
CdhrString
getMsgText
(
int
sts
);
}
...
...
src/jpwr/rt/src/GdhServer.java
View file @
f4da6e39
...
...
@@ -62,11 +62,12 @@ public class GdhServer
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
;
public
final
static
int
PORT
=
4445
;
...
...
@@ -680,6 +681,10 @@ public class GdhServer
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
:
if
(
elements
>
1
)
{
//its an array
...
...
@@ -1283,6 +1288,41 @@ public class GdhServer
System
.
out
.
println
(
"crrObject: IO exception"
);
}
break
;
case
GET_MSG:
try
{
int
status
=
in
.
readInt
();
CdhrString
ret
=
gdh
.
getMsg
(
status
);
System
.
out
.
println
(
"getMsg : "
+
status
+
" "
+
ret
.
str
);
out
.
writeInt
(
ret
.
getSts
());
if
(
ret
.
oddSts
())
{
out
.
writeUTF
(
ret
.
str
);
}
out
.
flush
();
}
catch
(
IOException
e
)
{
System
.
out
.
println
(
"getMsg: IO exception"
);
}
break
;
case
GET_MSG_TEXT:
try
{
int
status
=
in
.
readInt
();
CdhrString
ret
=
gdh
.
getMsgText
(
status
);
out
.
writeInt
(
ret
.
getSts
());
if
(
ret
.
oddSts
())
{
out
.
writeUTF
(
ret
.
str
);
}
out
.
flush
();
}
catch
(
IOException
e
)
{
System
.
out
.
println
(
"getMsg: IO exception"
);
}
break
;
case
LOG_STRING:
try
{
...
...
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