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
5a77516c
Commit
5a77516c
authored
Sep 02, 2013
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Android app, operator window added
parent
263cfc45
Changes
15
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
489 additions
and
45 deletions
+489
-45
java/aapp/app/src/AGraphInfo.java
java/aapp/app/src/AGraphInfo.java
+15
-0
java/aapp/app/src/OpwinCmn.java
java/aapp/app/src/OpwinCmn.java
+130
-0
java/aapp/app/src/PlowCmnIfc.java
java/aapp/app/src/PlowCmnIfc.java
+1
-0
java/aapp/pwrxtt/src/MainActivity.java
java/aapp/pwrxtt/src/MainActivity.java
+228
-39
java/aapp/res/drawable/xnav_alarmlist.png
java/aapp/res/drawable/xnav_alarmlist.png
+0
-0
java/aapp/res/drawable/xnav_close.png
java/aapp/res/drawable/xnav_close.png
+0
-0
java/aapp/res/drawable/xnav_eventlist.png
java/aapp/res/drawable/xnav_eventlist.png
+0
-0
java/aapp/res/drawable/xnav_navigator.png
java/aapp/res/drawable/xnav_navigator.png
+0
-0
java/aapp/res/menu/activity_main.xml
java/aapp/res/menu/activity_main.xml
+11
-4
java/jpwr/rt/src/Pwrb.java
java/jpwr/rt/src/Pwrb.java
+1
-0
src/doc/man/en_us/man_dg.dat
src/doc/man/en_us/man_dg.dat
+1
-1
src/doc/man/sv_se/man_dg.dat
src/doc/man/sv_se/man_dg.dat
+1
-1
wb/lib/wb/src/wb_build.cpp
wb/lib/wb/src/wb_build.cpp
+99
-0
wb/lib/wb/src/wb_build.h
wb/lib/wb/src/wb_build.h
+1
-0
wb/lib/wb/src/wb_wb.meth
wb/lib/wb/src/wb_wb.meth
+1
-0
No files found.
java/aapp/app/src/AGraphInfo.java
0 → 100644
View file @
5a77516c
package
jpwr.app
;
import
android.graphics.Bitmap
;
public
class
AGraphInfo
{
public
Bitmap
bpm
;
public
String
graph
;
public
String
text
;
public
int
iconX
;
public
int
iconY
;
public
int
iconWidth
;
public
int
iconHeight
;
public
int
textX
;
public
int
textY
;
}
java/aapp/app/src/OpwinCmn.java
0 → 100644
View file @
5a77516c
package
jpwr.app
;
import
java.util.Vector
;
import
jpwr.pwrxtt.MainActivity
;
import
android.graphics.Canvas
;
import
android.graphics.Paint
;
public
class
OpwinCmn
implements
PlowCmnIfc
{
Object
userData
;
Canvas
canvas
;
Vector
<
AGraphInfo
>
graphList
;
MainActivity
appl
;
boolean
configured
=
false
;
int
canvasHeight
;
int
canvasWidth
;
int
offsetY
=
0
;
int
borderY
=
0
;
public
OpwinCmn
(
MainActivity
appl
,
Vector
<
AGraphInfo
>
graphList
)
{
this
.
graphList
=
graphList
;
this
.
appl
=
appl
;
}
public
int
type
()
{
return
TYPE_OPWIN
;
}
public
void
configureIcons
()
{
canvasWidth
=
canvas
.
getWidth
();
canvasHeight
=
canvas
.
getHeight
();
// Get largest bitmap size
int
iconWidthMax
=
0
;
int
iconHeightMax
=
0
;
for
(
int
i
=
0
;
i
<
graphList
.
size
();
i
++)
{
AGraphInfo
graph
=
graphList
.
get
(
i
);
graph
.
iconWidth
=
graph
.
bpm
.
getWidth
();
graph
.
iconHeight
=
graph
.
bpm
.
getHeight
();
if
(
graph
.
iconWidth
>
iconWidthMax
)
iconWidthMax
=
graph
.
iconWidth
;
if
(
graph
.
iconHeight
>
iconHeightMax
)
iconHeightMax
=
graph
.
iconHeight
;
}
int
offsetX
=
100
;
int
offsetY
=
100
;
int
distX
=
iconWidthMax
+
50
;
int
distY
=
iconHeightMax
+
70
;
int
x
=
offsetX
;
int
y
=
offsetY
;
for
(
int
i
=
0
;
i
<
graphList
.
size
();
i
++)
{
AGraphInfo
graph
=
graphList
.
get
(
i
);
graph
.
iconX
=
x
;
graph
.
iconY
=
y
;
graph
.
textX
=
graph
.
iconX
+
graph
.
iconWidth
/
2
;
graph
.
textY
=
graph
.
iconY
+
graph
.
iconHeight
+
15
;
borderY
=
graph
.
textY
+
100
;
x
+=
distX
;
if
(
x
+
distX
>
canvasWidth
)
{
x
=
offsetX
;
y
+=
distY
;
}
}
configured
=
true
;
}
public
Object
getUserData
()
{
return
userData
;
}
public
void
setUserData
(
Object
userData
)
{
this
.
userData
=
userData
;
}
public
void
draw
()
{
Paint
p
=
new
Paint
();
if
(
!
configured
)
configureIcons
();
for
(
int
i
=
0
;
i
<
graphList
.
size
();
i
++)
{
AGraphInfo
graph
=
graphList
.
get
(
i
);
canvas
.
drawBitmap
(
graph
.
bpm
,
graph
.
iconX
,
graph
.
iconY
-
offsetY
,
p
);
int
textWidth
=
(
int
)
p
.
measureText
(
graph
.
text
);
canvas
.
drawText
(
graph
.
text
,
graph
.
textX
-
textWidth
/
2
,
graph
.
textY
-
offsetY
,
p
);
}
}
public
void
setNodraw
()
{}
public
void
resetNodraw
()
{}
public
void
zoom
(
double
factor
)
{}
public
void
scroll
(
int
x
,
int
y
)
{
if
(
borderY
<
canvasHeight
)
return
;
offsetY
+=
y
;
if
(
offsetY
<
0
)
offsetY
=
0
;
if
(
offsetY
>
borderY
-
canvasHeight
)
offsetY
=
borderY
-
canvasHeight
;
}
public
void
pageUp
()
{}
public
void
pageDown
()
{}
public
void
eventHandler
(
int
action
,
double
fx
,
double
fy
)
{
switch
(
action
)
{
case
PlowEvent
.
TYPE_CLICK
:
System
.
out
.
println
(
"Opwin click "
+
fx
+
" "
+
fy
);
for
(
int
i
=
0
;
i
<
graphList
.
size
();
i
++)
{
if
(
fx
>
graphList
.
get
(
i
).
iconX
&&
fx
<=
graphList
.
get
(
i
).
iconX
+
graphList
.
get
(
i
).
iconWidth
&&
fy
>
graphList
.
get
(
i
).
iconY
-
offsetY
&&
fy
<=
graphList
.
get
(
i
).
iconY
+
graphList
.
get
(
i
).
iconHeight
-
offsetY
)
{
System
.
out
.
println
(
"Hit in icon"
);
String
cmd
=
"open graph "
+
graphList
.
get
(
i
).
graph
;
appl
.
command
(
cmd
);
}
}
break
;
}
}
public
void
select
(
Object
node
)
{}
public
void
selectClear
()
{}
public
Object
getSelect
()
{
return
null
;}
public
void
configure
()
{}
public
void
dynamicOpen
()
{}
public
void
dynamicClose
()
{}
public
void
dynamicUpdate
()
{}
public
void
setCanvas
(
Canvas
canvas
)
{
this
.
canvas
=
canvas
;
}
public
Object
getFirst
()
{
return
null
;}
public
Object
getLast
()
{
return
null
;}
public
Object
getNext
(
Object
elem
)
{
return
null
;}
public
Object
getPrevious
(
Object
elem
)
{
return
null
;}
public
int
remove
(
Object
e
)
{
return
0
;}
}
java/aapp/app/src/PlowCmnIfc.java
View file @
5a77516c
...
...
@@ -7,6 +7,7 @@ public interface PlowCmnIfc {
public
static
final
int
TYPE_FLOW
=
2
;
public
static
final
int
TYPE_GRAPH
=
3
;
public
static
final
int
TYPE_EV
=
4
;
public
static
final
int
TYPE_OPWIN
=
5
;
public
int
type
();
public
Object
getUserData
();
...
...
java/aapp/pwrxtt/src/MainActivity.java
View file @
5a77516c
This diff is collapsed.
Click to expand it.
java/aapp/res/drawable/xnav_alarmlist.png
0 → 100644
View file @
5a77516c
484 Bytes
java/aapp/res/drawable/xnav_close.png
View replaced file @
263cfc45
View file @
5a77516c
425 Bytes
|
W:
|
H:
581 Bytes
|
W:
|
H:
2-up
Swipe
Onion skin
java/aapp/res/drawable/xnav_eventlist.png
0 → 100644
View file @
5a77516c
240 Bytes
java/aapp/res/drawable/xnav_navigator.png
0 → 100644
View file @
5a77516c
583 Bytes
java/aapp/res/menu/activity_main.xml
View file @
5a77516c
...
...
@@ -9,12 +9,12 @@
android:id=
"@+id/pageup_option"
android:title=
"Page up"
android:icon=
"@drawable/xnav_pageup"
android:showAsAction=
"
ifRoom
"
/>
android:showAsAction=
"
never
"
/>
<item
android:id=
"@+id/pagedown_option"
android:title=
"Page down"
android:icon=
"@drawable/xnav_pagedown"
android:showAsAction=
"
ifRoom
"
/>
android:showAsAction=
"
never
"
/>
<item
android:id=
"@+id/zoomin_option"
android:title=
"Zoom in"
...
...
@@ -25,6 +25,11 @@
android:title=
"Zoom out"
android:icon=
"@drawable/xnav_zoomout"
android:showAsAction=
"ifRoom"
/>
<item
android:id=
"@+id/navigator_option"
android:title=
"Navigator"
android:icon=
"@drawable/xnav_navigator"
android:showAsAction=
"ifRoom"
/>
<item
android:id=
"@+id/openobject_option"
android:title=
"Open Object"
...
...
@@ -48,11 +53,13 @@
<item
android:id=
"@+id/alarmlist_option"
android:title=
"Alarm List"
android:icon=
"@drawable/xnav_openobject"
/>
android:icon=
"@drawable/xnav_alarmlist"
android:showAsAction=
"ifRoom"
/>
<item
android:id=
"@+id/eventlist_option"
android:title=
"Event List"
android:icon=
"@drawable/xnav_openobject"
/>
android:icon=
"@drawable/xnav_eventlist"
android:showAsAction=
"ifRoom"
/>
<item
android:id=
"@+id/alarmack_option"
android:title=
"Alarm Acknowledge"
...
...
java/jpwr/rt/src/Pwrb.java
View file @
5a77516c
...
...
@@ -68,6 +68,7 @@ public class Pwrb {
public
static
final
int
cClass_Ao_Vmic4800
=
133176
;
public
static
final
int
cClass_ApCollect
=
133224
;
public
static
final
int
cClass_ApDistribute
=
133232
;
public
static
final
int
cClass_AppGraph
=
135960
;
public
static
final
int
cClass_ApplDistribute
=
131208
;
public
static
final
int
cClass_ASup
=
131216
;
public
static
final
int
cClass_Av
=
131224
;
...
...
src/doc/man/en_us/man_dg.dat
View file @
5a77516c
...
...
@@ -3559,7 +3559,7 @@ to read the statistic table in a mysql database, where the project name is opg7.
<c>>mysql -u pwrp
<c>mysql> use pwrp__opg7;
<c>mysql> select * f
or
m set_stat;
<c>mysql> select * f
ro
m set_stat;
<c>| 7.24149 | 7.90368 | 907.713 | 908.8 | 32321 | 0 | 1 | 0 |
<c>1 row in set (0.00 sec)
...
...
src/doc/man/sv_se/man_dg.dat
View file @
5a77516c
...
...
@@ -3515,7 +3515,7 @@ l
<c>>mysql -u pwrp
<c>mysql> use pwrp__opg7;
<c>mysql> select * f
or
m set_stat;
<c>mysql> select * f
ro
m set_stat;
<c>| 7.24149 | 7.90368 | 907.713 | 908.8 | 32321 | 0 | 1 | 0 |
<c>1 row in set (0.00 sec)
...
...
wb/lib/wb/src/wb_build.cpp
View file @
5a77516c
...
...
@@ -83,6 +83,9 @@ void wb_build::classlist( pwr_tCid cid)
case
pwr_cClass_WebGraph
:
webgraph
(
o
.
oid
());
break
;
case
pwr_cClass_AppGraph
:
appgraph
(
o
.
oid
());
break
;
case
pwr_cClass_Application
:
application
(
o
.
oid
());
break
;
...
...
@@ -362,6 +365,12 @@ void wb_build::rootvolume( pwr_tVid vid)
if
(
sumsts
==
PWRB__NOBUILT
&&
m_sts
!=
PWRB__NOBUILT
)
sumsts
=
m_sts
;
// Build all AppGraph
classlist
(
pwr_cClass_AppGraph
);
if
(
evenSts
())
return
;
if
(
sumsts
==
PWRB__NOBUILT
&&
m_sts
!=
PWRB__NOBUILT
)
sumsts
=
m_sts
;
classlist
(
pwr_cClass_Application
);
if
(
evenSts
())
return
;
if
(
sumsts
==
PWRB__NOBUILT
&&
m_sts
!=
PWRB__NOBUILT
)
...
...
@@ -590,6 +599,11 @@ void wb_build::nodehier( pwr_tOid oid)
if
(
sumsts
==
PWRB__NOBUILT
&&
m_sts
!=
PWRB__NOBUILT
)
sumsts
=
m_sts
;
classlist
(
pwr_cClass_AppGraph
);
if
(
evenSts
())
return
;
if
(
sumsts
==
PWRB__NOBUILT
&&
m_sts
!=
PWRB__NOBUILT
)
sumsts
=
m_sts
;
classlist
(
pwr_cClass_Application
);
if
(
evenSts
())
return
;
if
(
sumsts
==
PWRB__NOBUILT
&&
m_sts
!=
PWRB__NOBUILT
)
...
...
@@ -938,6 +952,91 @@ void wb_build::webgraph( pwr_tOid oid)
}
}
void
wb_build
::
appgraph
(
pwr_tOid
oid
)
{
pwr_tFileName
dest_fname
;
pwr_tFileName
src_fname
;
pwr_tCmd
cmd
;
pwr_tString80
graph_name
;
pwr_tString80
name
;
pwr_tTime
dest_time
,
src_time
;
int
check_hierarchy
=
cdh_ObjidIsNotNull
(
m_hierarchy
);
int
hierarchy_found
=
0
;
char
*
s
;
wb_object
o
=
m_session
.
object
(
oid
);
if
(
!
o
)
{
m_sts
=
o
.
sts
();
return
;
}
// Check that no ancestor is a LibHier
for
(
wb_object
p
=
o
.
parent
();
p
.
oddSts
();
p
=
p
.
parent
())
{
if
(
p
.
cid
()
==
pwr_eClass_LibHier
)
{
m_sts
=
PWRB__INLIBHIER
;
return
;
}
if
(
check_hierarchy
&&
cdh_ObjidIsEqual
(
m_hierarchy
,
p
.
oid
()))
hierarchy_found
=
1
;
}
if
(
check_hierarchy
&&
!
hierarchy_found
)
{
m_sts
=
PWRB__NOBUILT
;
return
;
}
wb_attribute
a
=
m_session
.
attribute
(
oid
,
"RtBody"
,
"Name"
);
if
(
!
a
)
{
m_sts
=
a
.
sts
();
return
;
}
a
.
value
(
graph_name
);
if
(
!
a
)
{
m_sts
=
a
.
sts
();
return
;
}
cdh_ToLower
(
graph_name
,
graph_name
);
strcpy
(
src_fname
,
"$pwrp_pop/"
);
strcat
(
src_fname
,
graph_name
);
if
(
strstr
(
src_fname
,
".pwg"
)
==
0
)
strcat
(
src_fname
,
".pwg"
);
dcli_translate_filename
(
src_fname
,
src_fname
);
m_sts
=
dcli_file_time
(
src_fname
,
&
src_time
);
if
(
evenSts
())
{
m_sts
=
PWRB__NOBUILT
;
return
;
}
strcpy
(
dest_fname
,
"$pwrp_exe/"
);
strcat
(
dest_fname
,
graph_name
);
if
(
strstr
(
dest_fname
,
".pwg"
)
==
0
)
strcat
(
dest_fname
,
".pwg"
);
dcli_translate_filename
(
dest_fname
,
dest_fname
);
m_sts
=
dcli_file_time
(
dest_fname
,
&
dest_time
);
if
(
opt
.
force
||
evenSts
()
||
src_time
.
tv_sec
>
dest_time
.
tv_sec
)
{
sprintf
(
cmd
,
"cp %s %s"
,
src_fname
,
dest_fname
);
system
(
cmd
);
sprintf
(
cmd
,
"Build: AppGraph copy $pwrp_pop/%s -> $pwrp_exe"
,
graph_name
);
MsgWindow
::
message
(
'I'
,
cmd
,
msgw_ePop_No
,
oid
);
strcpy
(
name
,
graph_name
);
if
((
s
=
strrchr
(
name
,
'.'
)))
*
s
=
0
;
wb_log
::
log
(
wlog_eCategory_GeBuild
,
name
,
0
);
m_sts
=
PWRB__SUCCESS
;
}
else
m_sts
=
PWRB__NOBUILT
;
}
void
wb_build
::
webhandler
(
pwr_tOid
oid
)
{
pwr_tTime
modtime
;
...
...
wb/lib/wb/src/wb_build.h
View file @
5a77516c
...
...
@@ -63,6 +63,7 @@ class wb_build : public wb_status
void
webhandler
(
pwr_tOid
oid
);
void
webbrowserconfig
(
pwr_tOid
oid
);
void
webgraph
(
pwr_tOid
oid
);
void
appgraph
(
pwr_tOid
oid
);
void
application
(
pwr_tOid
oid
);
void
classdef
(
pwr_tOid
oid
);
...
...
wb/lib/wb/src/wb_wb.meth
View file @
5a77516c
...
...
@@ -39,3 +39,4 @@ Application
FriendNodeConfig
SevHistThread
SevHistObject
AppGraph
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