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
Show 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 {
...
@@ -7,6 +7,7 @@ public interface PlowCmnIfc {
public
static
final
int
TYPE_FLOW
=
2
;
public
static
final
int
TYPE_FLOW
=
2
;
public
static
final
int
TYPE_GRAPH
=
3
;
public
static
final
int
TYPE_GRAPH
=
3
;
public
static
final
int
TYPE_EV
=
4
;
public
static
final
int
TYPE_EV
=
4
;
public
static
final
int
TYPE_OPWIN
=
5
;
public
int
type
();
public
int
type
();
public
Object
getUserData
();
public
Object
getUserData
();
...
...
java/aapp/pwrxtt/src/MainActivity.java
View file @
5a77516c
...
@@ -16,7 +16,9 @@ import android.os.Handler;
...
@@ -16,7 +16,9 @@ import android.os.Handler;
import
android.support.v4.app.FragmentManager
;
import
android.support.v4.app.FragmentManager
;
import
android.text.Editable
;
import
android.text.Editable
;
import
android.text.InputType
;
import
android.text.InputType
;
import
android.util.FloatMath
;
import
android.util.Log
;
import
android.util.Log
;
import
android.util.TypedValue
;
import
android.app.Activity
;
import
android.app.Activity
;
import
android.app.AlertDialog
;
import
android.app.AlertDialog
;
import
android.app.Dialog
;
import
android.app.Dialog
;
...
@@ -35,6 +37,9 @@ import jpwr.app.*;
...
@@ -35,6 +37,9 @@ import jpwr.app.*;
import
jpwr.jopg.*
;
import
jpwr.jopg.*
;
public
class
MainActivity
extends
Activity
implements
PlowAppl
,
GraphApplIfc
,
GdhApplIfc
,
OnClickListener
,
AEvAppl
{
public
class
MainActivity
extends
Activity
implements
PlowAppl
,
GraphApplIfc
,
GdhApplIfc
,
OnClickListener
,
AEvAppl
{
static
final
int
MODE_NO
=
0
;
static
final
int
MODE_SCROLL
=
1
;
static
final
int
MODE_ZOOM
=
2
;
Timer
timer
=
new
Timer
();
Timer
timer
=
new
Timer
();
MainView
view
;
MainView
view
;
...
@@ -69,10 +74,16 @@ public class MainActivity extends Activity implements PlowAppl, GraphApplIfc, Gd
...
@@ -69,10 +74,16 @@ public class MainActivity extends Activity implements PlowAppl, GraphApplIfc, Gd
String
confirmText
;
String
confirmText
;
String
messageText
;
String
messageText
;
AlertDialog
inputDialog
=
null
;
AlertDialog
inputDialog
=
null
;
Context
context
;
static
private
boolean
initDone
=
false
;
static
private
boolean
initDone
=
false
;
String
pwrHost
=
null
;
String
pwrHost
=
null
;
AEv
aev
=
null
;
AEv
aev
=
null
;
OpwinCmn
opwinCmn
=
null
;
Menu
menu
=
null
;
int
viewOffsetY
=
0
;
int
eventMode
;
float
eventDistance
;
Vector
<
AGraphInfo
>
graphList
=
new
Vector
<
AGraphInfo
>();
Vector
<
PlowCmnIfc
>
cmnList
=
new
Vector
<
PlowCmnIfc
>();
Vector
<
PlowCmnIfc
>
cmnList
=
new
Vector
<
PlowCmnIfc
>();
@Override
@Override
...
@@ -131,6 +142,7 @@ public class MainActivity extends Activity implements PlowAppl, GraphApplIfc, Gd
...
@@ -131,6 +142,7 @@ public class MainActivity extends Activity implements PlowAppl, GraphApplIfc, Gd
dialog
.
dismiss
();
dialog
.
dismiss
();
new
GdhTask
().
execute
(
new
GdhTaskArg
(
GdhTask
.
ROOTLIST
,(
AXttItemBase
)
null
));
new
GdhTask
().
execute
(
new
GdhTaskArg
(
GdhTask
.
ROOTLIST
,(
AXttItemBase
)
null
));
new
GdhTask
().
execute
(
new
GdhTaskArg
(
GdhTask
.
OPWIN
,
null
));
}
}
}
}
...
@@ -142,7 +154,18 @@ public class MainActivity extends Activity implements PlowAppl, GraphApplIfc, Gd
...
@@ -142,7 +154,18 @@ public class MainActivity extends Activity implements PlowAppl, GraphApplIfc, Gd
@Override
@Override
public
boolean
onPrepareOptionsMenu
(
Menu
menu
)
{
public
boolean
onPrepareOptionsMenu
(
Menu
menu
)
{
this
.
menu
=
menu
;
configMenu
();
return
true
;
}
public
void
configMenu
()
{
if
(
menu
==
null
)
return
;
MenuItem
item_close
=
menu
.
findItem
(
R
.
id
.
close_option
);
MenuItem
item_zoomin
=
menu
.
findItem
(
R
.
id
.
zoomin_option
);
MenuItem
item_zoomout
=
menu
.
findItem
(
R
.
id
.
zoomout_option
);
MenuItem
item_pageup
=
menu
.
findItem
(
R
.
id
.
pageup_option
);
MenuItem
item_pageup
=
menu
.
findItem
(
R
.
id
.
pageup_option
);
MenuItem
item_pagedown
=
menu
.
findItem
(
R
.
id
.
pagedown_option
);
MenuItem
item_pagedown
=
menu
.
findItem
(
R
.
id
.
pagedown_option
);
MenuItem
item_openobject
=
menu
.
findItem
(
R
.
id
.
openobject_option
);
MenuItem
item_openobject
=
menu
.
findItem
(
R
.
id
.
openobject_option
);
...
@@ -151,9 +174,13 @@ public class MainActivity extends Activity implements PlowAppl, GraphApplIfc, Gd
...
@@ -151,9 +174,13 @@ public class MainActivity extends Activity implements PlowAppl, GraphApplIfc, Gd
MenuItem
item_openplc
=
menu
.
findItem
(
R
.
id
.
openplc_option
);
MenuItem
item_openplc
=
menu
.
findItem
(
R
.
id
.
openplc_option
);
MenuItem
item_opencrr
=
menu
.
findItem
(
R
.
id
.
opencrr_option
);
MenuItem
item_opencrr
=
menu
.
findItem
(
R
.
id
.
opencrr_option
);
MenuItem
item_alarmack
=
menu
.
findItem
(
R
.
id
.
alarmack_option
);
MenuItem
item_alarmack
=
menu
.
findItem
(
R
.
id
.
alarmack_option
);
MenuItem
item_navigator
=
menu
.
findItem
(
R
.
id
.
navigator_option
);
MenuItem
item_changevalue
=
menu
.
findItem
(
R
.
id
.
changevalue_option
);
MenuItem
item_changevalue
=
menu
.
findItem
(
R
.
id
.
changevalue_option
);
if
(
aev
!=
null
&&
currentCmn
==
aev
.
getCmnAla
())
{
if
(
aev
!=
null
&&
currentCmn
==
aev
.
getCmnAla
())
{
// Alarm list
// Alarm list
item_close
.
setVisible
(
true
);
item_zoomin
.
setVisible
(
true
);
item_zoomout
.
setVisible
(
true
);
item_pageup
.
setVisible
(
true
);
item_pageup
.
setVisible
(
true
);
item_pagedown
.
setVisible
(
true
);
item_pagedown
.
setVisible
(
true
);
item_openobject
.
setVisible
(
true
);
item_openobject
.
setVisible
(
true
);
...
@@ -162,10 +189,14 @@ public class MainActivity extends Activity implements PlowAppl, GraphApplIfc, Gd
...
@@ -162,10 +189,14 @@ public class MainActivity extends Activity implements PlowAppl, GraphApplIfc, Gd
item_openplc
.
setVisible
(
true
);
item_openplc
.
setVisible
(
true
);
item_opencrr
.
setVisible
(
true
);
item_opencrr
.
setVisible
(
true
);
item_alarmack
.
setVisible
(
true
);
item_alarmack
.
setVisible
(
true
);
item_navigator
.
setVisible
(
true
);
item_changevalue
.
setVisible
(
false
);
item_changevalue
.
setVisible
(
false
);
}
}
else
if
(
aev
!=
null
&&
currentCmn
==
aev
.
getCmnEve
())
{
else
if
(
aev
!=
null
&&
currentCmn
==
aev
.
getCmnEve
())
{
// Event list
// Event list
item_close
.
setVisible
(
true
);
item_zoomin
.
setVisible
(
true
);
item_zoomout
.
setVisible
(
true
);
item_pageup
.
setVisible
(
true
);
item_pageup
.
setVisible
(
true
);
item_pagedown
.
setVisible
(
true
);
item_pagedown
.
setVisible
(
true
);
item_openobject
.
setVisible
(
true
);
item_openobject
.
setVisible
(
true
);
...
@@ -174,10 +205,14 @@ public class MainActivity extends Activity implements PlowAppl, GraphApplIfc, Gd
...
@@ -174,10 +205,14 @@ public class MainActivity extends Activity implements PlowAppl, GraphApplIfc, Gd
item_openplc
.
setVisible
(
true
);
item_openplc
.
setVisible
(
true
);
item_opencrr
.
setVisible
(
true
);
item_opencrr
.
setVisible
(
true
);
item_alarmack
.
setVisible
(
false
);
item_alarmack
.
setVisible
(
false
);
item_navigator
.
setVisible
(
true
);
item_changevalue
.
setVisible
(
false
);
item_changevalue
.
setVisible
(
false
);
}
}
else
if
(
currentCmn
==
cmnList
.
get
(
0
))
{
else
if
(
currentCmn
==
cmnList
.
get
(
0
))
{
// Navigator
// Navigator
item_close
.
setVisible
(
true
);
item_zoomin
.
setVisible
(
true
);
item_zoomout
.
setVisible
(
true
);
item_pageup
.
setVisible
(
true
);
item_pageup
.
setVisible
(
true
);
item_pagedown
.
setVisible
(
true
);
item_pagedown
.
setVisible
(
true
);
item_openobject
.
setVisible
(
true
);
item_openobject
.
setVisible
(
true
);
...
@@ -186,10 +221,14 @@ public class MainActivity extends Activity implements PlowAppl, GraphApplIfc, Gd
...
@@ -186,10 +221,14 @@ public class MainActivity extends Activity implements PlowAppl, GraphApplIfc, Gd
item_openplc
.
setVisible
(
true
);
item_openplc
.
setVisible
(
true
);
item_opencrr
.
setVisible
(
true
);
item_opencrr
.
setVisible
(
true
);
item_alarmack
.
setVisible
(
false
);
item_alarmack
.
setVisible
(
false
);
item_navigator
.
setVisible
(
true
);
item_changevalue
.
setVisible
(
true
);
item_changevalue
.
setVisible
(
true
);
}
}
else
if
(
currentCmn
.
type
()
==
PlowCmnIfc
.
TYPE_FLOW
)
{
else
if
(
currentCmn
.
type
()
==
PlowCmnIfc
.
TYPE_FLOW
)
{
// Plc
// Plc
item_close
.
setVisible
(
true
);
item_zoomin
.
setVisible
(
true
);
item_zoomout
.
setVisible
(
true
);
item_pageup
.
setVisible
(
true
);
item_pageup
.
setVisible
(
true
);
item_pagedown
.
setVisible
(
true
);
item_pagedown
.
setVisible
(
true
);
item_openobject
.
setVisible
(
true
);
item_openobject
.
setVisible
(
true
);
...
@@ -198,10 +237,14 @@ public class MainActivity extends Activity implements PlowAppl, GraphApplIfc, Gd
...
@@ -198,10 +237,14 @@ public class MainActivity extends Activity implements PlowAppl, GraphApplIfc, Gd
item_openplc
.
setVisible
(
true
);
item_openplc
.
setVisible
(
true
);
item_opencrr
.
setVisible
(
true
);
item_opencrr
.
setVisible
(
true
);
item_alarmack
.
setVisible
(
false
);
item_alarmack
.
setVisible
(
false
);
item_navigator
.
setVisible
(
true
);
item_changevalue
.
setVisible
(
false
);
item_changevalue
.
setVisible
(
false
);
}
}
else
if
(
currentCmn
.
type
()
==
PlowCmnIfc
.
TYPE_GRAPH
)
{
else
if
(
currentCmn
.
type
()
==
PlowCmnIfc
.
TYPE_GRAPH
)
{
// Graph
// Graph
item_close
.
setVisible
(
true
);
item_zoomin
.
setVisible
(
true
);
item_zoomout
.
setVisible
(
true
);
item_pageup
.
setVisible
(
false
);
item_pageup
.
setVisible
(
false
);
item_pagedown
.
setVisible
(
false
);
item_pagedown
.
setVisible
(
false
);
item_openobject
.
setVisible
(
false
);
item_openobject
.
setVisible
(
false
);
...
@@ -210,11 +253,30 @@ public class MainActivity extends Activity implements PlowAppl, GraphApplIfc, Gd
...
@@ -210,11 +253,30 @@ public class MainActivity extends Activity implements PlowAppl, GraphApplIfc, Gd
item_openplc
.
setVisible
(
false
);
item_openplc
.
setVisible
(
false
);
item_opencrr
.
setVisible
(
false
);
item_opencrr
.
setVisible
(
false
);
item_alarmack
.
setVisible
(
false
);
item_alarmack
.
setVisible
(
false
);
item_navigator
.
setVisible
(
true
);
item_changevalue
.
setVisible
(
false
);
}
else
if
(
currentCmn
.
type
()
==
PlowCmnIfc
.
TYPE_OPWIN
)
{
// Operator window
item_close
.
setVisible
(
true
);
item_zoomin
.
setVisible
(
true
);
item_zoomout
.
setVisible
(
true
);
item_pageup
.
setVisible
(
false
);
item_pagedown
.
setVisible
(
false
);
item_openobject
.
setVisible
(
false
);
item_opengraph
.
setVisible
(
false
);
item_openclassgraph
.
setVisible
(
false
);
item_openplc
.
setVisible
(
false
);
item_opencrr
.
setVisible
(
false
);
item_alarmack
.
setVisible
(
false
);
item_navigator
.
setVisible
(
true
);
item_changevalue
.
setVisible
(
false
);
item_changevalue
.
setVisible
(
false
);
}
}
else
{
else
{
// Default
// Default
item_pageup
.
setVisible
(
true
);
item_pageup
.
setVisible
(
true
);
item_zoomin
.
setVisible
(
true
);
item_zoomout
.
setVisible
(
true
);
item_pagedown
.
setVisible
(
true
);
item_pagedown
.
setVisible
(
true
);
item_openobject
.
setVisible
(
true
);
item_openobject
.
setVisible
(
true
);
item_opengraph
.
setVisible
(
true
);
item_opengraph
.
setVisible
(
true
);
...
@@ -222,12 +284,9 @@ public class MainActivity extends Activity implements PlowAppl, GraphApplIfc, Gd
...
@@ -222,12 +284,9 @@ public class MainActivity extends Activity implements PlowAppl, GraphApplIfc, Gd
item_openplc
.
setVisible
(
true
);
item_openplc
.
setVisible
(
true
);
item_opencrr
.
setVisible
(
true
);
item_opencrr
.
setVisible
(
true
);
item_alarmack
.
setVisible
(
false
);
item_alarmack
.
setVisible
(
false
);
item_navigator
.
setVisible
(
true
);
item_changevalue
.
setVisible
(
false
);
item_changevalue
.
setVisible
(
false
);
}
}
// this.invalidateOptionsMenu();
return
true
;
}
}
@Override
@Override
...
@@ -257,7 +316,12 @@ public class MainActivity extends Activity implements PlowAppl, GraphApplIfc, Gd
...
@@ -257,7 +316,12 @@ public class MainActivity extends Activity implements PlowAppl, GraphApplIfc, Gd
switch
(
currentCmn
.
type
())
{
switch
(
currentCmn
.
type
())
{
case
PlowCmnIfc
.
TYPE_PLOW
:
{
case
PlowCmnIfc
.
TYPE_PLOW
:
{
if
(
cmnList
.
size
()
==
1
)
{
if
(
cmnList
.
size
()
==
1
)
{
// TODO Close application
// Open opwin
if
(
opwinCmn
!=
null
)
{
currentCmn
=
opwinCmn
;
cmnList
.
add
(
opwinCmn
);
view
.
invalidate
();
}
break
;
break
;
}
}
...
@@ -299,6 +363,9 @@ public class MainActivity extends Activity implements PlowAppl, GraphApplIfc, Gd
...
@@ -299,6 +363,9 @@ public class MainActivity extends Activity implements PlowAppl, GraphApplIfc, Gd
view
.
invalidate
();
view
.
invalidate
();
System
.
out
.
println
(
"Close graph"
);
System
.
out
.
println
(
"Close graph"
);
break
;
break
;
case
PlowCmnIfc
.
TYPE_OPWIN
:
// Close app ?
break
;
}
}
break
;
break
;
case
R
.
id
.
openobject_option
:
{
case
R
.
id
.
openobject_option
:
{
...
@@ -443,6 +510,16 @@ public class MainActivity extends Activity implements PlowAppl, GraphApplIfc, Gd
...
@@ -443,6 +510,16 @@ public class MainActivity extends Activity implements PlowAppl, GraphApplIfc, Gd
}
}
break
;
break
;
}
}
case
R
.
id
.
navigator_option
:
{
System
.
out
.
println
(
"Open Navigator"
);
int
xttCmnIdx
=
0
;
currentCmn
=
cmnList
.
get
(
xttCmnIdx
);
for
(
int
i
=
cmnList
.
size
()-
1
;
i
>
xttCmnIdx
;
i
--)
cmnList
.
removeElementAt
(
i
);
break
;
}
case
R
.
id
.
alarmlist_option
:
{
case
R
.
id
.
alarmlist_option
:
{
System
.
out
.
println
(
"Open Alarmlist"
);
System
.
out
.
println
(
"Open Alarmlist"
);
...
@@ -566,6 +643,9 @@ public class MainActivity extends Activity implements PlowAppl, GraphApplIfc, Gd
...
@@ -566,6 +643,9 @@ public class MainActivity extends Activity implements PlowAppl, GraphApplIfc, Gd
}
}
}
}
break
;
break
;
case
PlowCmnIfc
.
TYPE_OPWIN
:
currentCmn
.
eventHandler
(
e
.
type
,
e
.
x
,
e
.
y
);
break
;
}
}
break
;
break
;
case
PlowEvent
.
TYPE_OBJECT_DELETED
:
{
case
PlowEvent
.
TYPE_OBJECT_DELETED
:
{
...
@@ -623,6 +703,7 @@ public class MainActivity extends Activity implements PlowAppl, GraphApplIfc, Gd
...
@@ -623,6 +703,7 @@ public class MainActivity extends Activity implements PlowAppl, GraphApplIfc, Gd
public
static
final
int
OPEN_CLASSGRAPH_NAME
=
18
;
public
static
final
int
OPEN_CLASSGRAPH_NAME
=
18
;
public
static
final
int
VALUEINPUT_ACTION
=
19
;
public
static
final
int
VALUEINPUT_ACTION
=
19
;
public
static
final
int
CONFIRM_ACTION
=
20
;
public
static
final
int
CONFIRM_ACTION
=
20
;
public
static
final
int
OPWIN
=
21
;
@Override
@Override
protected
Void
doInBackground
(
GdhTaskArg
...
arg
)
{
protected
Void
doInBackground
(
GdhTaskArg
...
arg
)
{
...
@@ -957,6 +1038,66 @@ public class MainActivity extends Activity implements PlowAppl, GraphApplIfc, Gd
...
@@ -957,6 +1038,66 @@ public class MainActivity extends Activity implements PlowAppl, GraphApplIfc, Gd
((
Dyn
)
confirmDyn
).
confirmedAction
(
Glow
.
eEvent_MB1Click
,
confirmObject
);
((
Dyn
)
confirmDyn
).
confirmedAction
(
Glow
.
eEvent_MB1Click
,
confirmObject
);
break
;
break
;
}
}
case
OPWIN:
{
// If plc window open flow for window, else for first child
CdhrObjid
oret
=
gdh
.
getClassList
(
Pwrb
.
cClass_WebHandler
);
if
(
oret
.
oddSts
())
{
for
(
oret
=
gdh
.
getChild
(
oret
.
objid
);
oret
.
oddSts
();
oret
=
gdh
.
getNextSibling
(
oret
.
objid
))
{
CdhrClassId
cret
=
gdh
.
getObjectClass
(
oret
.
objid
);
if
(
cret
.
oddSts
()
&&
cret
.
getClassId
()
==
Pwrb
.
cClass_AppGraph
)
{
CdhrString
sret
=
gdh
.
objidToName
(
oret
.
objid
,
Cdh
.
mName_volumeStrict
);
String
name
=
sret
.
str
;
AGraphInfo
info
=
new
AGraphInfo
();
String
aName
=
name
+
".Image"
;
sret
=
gdh
.
getObjectInfoString
(
aName
);
if
(
sret
.
evenSts
())
continue
;
String
image
=
sret
.
str
;
URL
url
=
null
;
try
{
if
(
image
.
startsWith
(
"$pwr_exe/"
))
{
// url = new URL("http://10.0.2.2/data0/x4-8-6/rls/os_linux/hw_x86/exp/exe/" + filename.substring(9));
url
=
new
URL
(
"http://"
+
pwrHost
+
"/pwr_exe/"
+
image
.
substring
(
9
));
}
else
{
// url = new URL("http://10.0.2.2/data0/pwrp/opg7/bld/x86_linux/exe/" + filename);
url
=
new
URL
(
"http://"
+
pwrHost
+
"/pwrp_exe/"
+
image
);
}
info
.
bpm
=
BitmapFactory
.
decodeStream
(
url
.
openConnection
().
getInputStream
());
}
catch
(
IOException
e
)
{
System
.
out
.
println
(
"Unable to open file "
+
image
+
" "
+
url
);
continue
;
}
aName
=
name
+
".Name"
;
sret
=
gdh
.
getObjectInfoString
(
aName
);
if
(
sret
.
evenSts
())
continue
;
info
.
graph
=
sret
.
str
;
aName
=
name
+
".Text"
;
sret
=
gdh
.
getObjectInfoString
(
aName
);
if
(
sret
.
evenSts
())
continue
;
info
.
text
=
sret
.
str
;
graphList
.
add
(
info
);
}
}
if
(
graphList
.
size
()
>
0
)
{
opwinCmn
=
new
OpwinCmn
(
appl
,
graphList
);
currentCmn
=
opwinCmn
;
cmnList
.
add
(
opwinCmn
);
}
}
break
;
}
}
}
return
null
;
return
null
;
}
}
...
@@ -1011,17 +1152,31 @@ public class MainActivity extends Activity implements PlowAppl, GraphApplIfc, Gd
...
@@ -1011,17 +1152,31 @@ public class MainActivity extends Activity implements PlowAppl, GraphApplIfc, Gd
@Override
@Override
public
boolean
onTouchEvent
(
MotionEvent
me
)
{
public
boolean
onTouchEvent
(
MotionEvent
me
)
{
int
viewOffset
=
80
;
int
action
=
me
.
getAction
();
int
action
=
me
.
getAction
();
float
x
=
me
.
getX
();
float
x
=
me
.
getX
();
float
y
=
me
.
getY
();
float
y
=
me
.
getY
();
if
(
viewOffsetY
==
0
)
{
if
(
context
!=
null
)
{
TypedValue
tv
=
new
TypedValue
();
context
.
getTheme
().
resolveAttribute
(
android
.
R
.
attr
.
actionBarSize
,
tv
,
true
);
viewOffsetY
=
getResources
().
getDimensionPixelSize
(
tv
.
resourceId
);
int
id
=
getResources
().
getIdentifier
(
"status_bar_height"
,
"dimen"
,
"android"
);
if
(
id
>
0
)
viewOffsetY
+=
getResources
().
getDimensionPixelSize
(
id
);
}
else
viewOffsetY
=
80
;
}
System
.
out
.
println
(
"offset : "
+
viewOffsetY
);
switch
(
action
)
{
switch
(
action
)
{
case
MotionEvent
.
ACTION_MOVE
:
case
MotionEvent
.
ACTION_MOVE
:
System
.
out
.
println
(
"Event Move "
+
action
+
" ("
+
x
+
","
+
y
+
")"
);
System
.
out
.
println
(
"Event Move "
+
action
+
" ("
+
x
+
","
+
y
+
")"
);
if
(
eventMode
==
MODE_SCROLL
)
{
if
(
currentCmn
.
type
()
==
PlowCmnIfc
.
TYPE_GRAPH
){
if
(
currentCmn
.
type
()
==
PlowCmnIfc
.
TYPE_GRAPH
){
new
GdhTask
().
execute
(
new
GdhTaskArg
(
GdhTask
.
EVENTHANDLER
,
new
GdhTask
().
execute
(
new
GdhTaskArg
(
GdhTask
.
EVENTHANDLER
,
new
GdhEventArg
(
GraphCmn
.
ACTION_MOVE
,
x
,
y
-
viewOffset
)));
new
GdhEventArg
(
GraphCmn
.
ACTION_MOVE
,
x
,
y
-
viewOffsetY
)));
}
}
else
{
else
{
if
(
(
int
)(
lastTouchY
-
y
)
!=
0
)
{
if
(
(
int
)(
lastTouchY
-
y
)
!=
0
)
{
...
@@ -1030,7 +1185,16 @@ public class MainActivity extends Activity implements PlowAppl, GraphApplIfc, Gd
...
@@ -1030,7 +1185,16 @@ public class MainActivity extends Activity implements PlowAppl, GraphApplIfc, Gd
}
}
lastTouchX
=
x
;
lastTouchX
=
x
;
lastTouchY
=
y
;
lastTouchY
=
y
;
}
}
else
if
(
eventMode
==
MODE_ZOOM
)
{
float
distance
=
eventDistance
(
me
);
currentCmn
.
zoom
(
distance
/
eventDistance
);
eventDistance
=
distance
;
}
}
break
;
break
;
case
MotionEvent
.
ACTION_UP
:
case
MotionEvent
.
ACTION_UP
:
if
(
currentCmn
!=
null
&&
currentCmn
.
type
()
==
PlowCmnIfc
.
TYPE_GRAPH
){
if
(
currentCmn
!=
null
&&
currentCmn
.
type
()
==
PlowCmnIfc
.
TYPE_GRAPH
){
...
@@ -1039,33 +1203,53 @@ public class MainActivity extends Activity implements PlowAppl, GraphApplIfc, Gd
...
@@ -1039,33 +1203,53 @@ public class MainActivity extends Activity implements PlowAppl, GraphApplIfc, Gd
me
.
getEventTime
()
-
me
.
getDownTime
()
<
700
)
{
me
.
getEventTime
()
-
me
.
getDownTime
()
<
700
)
{
System
.
out
.
println
(
"Event Click "
+
action
+
" ("
+
x
+
","
+
y
+
") cmn "
+
currentCmn
.
type
());
System
.
out
.
println
(
"Event Click "
+
action
+
" ("
+
x
+
","
+
y
+
") cmn "
+
currentCmn
.
type
());
new
GdhTask
().
execute
(
new
GdhTaskArg
(
GdhTask
.
EVENTHANDLER
,
new
GdhTask
().
execute
(
new
GdhTaskArg
(
GdhTask
.
EVENTHANDLER
,
new
GdhEventArg
(
GraphCmn
.
ACTION_CLICK
,
x
,
y
-
viewOffset
)));
new
GdhEventArg
(
GraphCmn
.
ACTION_CLICK
,
x
,
y
-
viewOffsetY
)));
}
}
else
{
else
{
new
GdhTask
().
execute
(
new
GdhTaskArg
(
GdhTask
.
EVENTHANDLER
,
new
GdhTask
().
execute
(
new
GdhTaskArg
(
GdhTask
.
EVENTHANDLER
,
new
GdhEventArg
(
GraphCmn
.
ACTION_UP
,
x
,
y
-
viewOffset
)));
new
GdhEventArg
(
GraphCmn
.
ACTION_UP
,
x
,
y
-
viewOffsetY
)));
}
}
}
}
else
{
else
{
if
(
Math
.
abs
(
x
-
downTouchX
)
<
10
&&
Math
.
abs
(
y
-
downTouchY
)
<
10
&&
currentCmn
!=
null
)
{
if
(
Math
.
abs
(
x
-
downTouchX
)
<
10
&&
Math
.
abs
(
y
-
downTouchY
)
<
10
&&
currentCmn
!=
null
)
{
currentCmn
.
eventHandler
(
action
,
x
,
y
-
viewOffset
);
currentCmn
.
eventHandler
(
action
,
x
,
y
-
viewOffsetY
);
}
}
}
}
eventMode
=
MODE_NO
;
break
;
break
;
case
MotionEvent
.
ACTION_DOWN
:
case
MotionEvent
.
ACTION_DOWN
:
System
.
out
.
println
(
"Event Down "
+
action
+
" ("
+
x
+
","
+
y
+
")"
);
System
.
out
.
println
(
"Event Down "
+
action
+
" ("
+
x
+
","
+
y
+
")"
);
if
(
currentCmn
.
type
()
==
PlowCmnIfc
.
TYPE_GRAPH
){
if
(
currentCmn
.
type
()
==
PlowCmnIfc
.
TYPE_GRAPH
){
new
GdhTask
().
execute
(
new
GdhTaskArg
(
GdhTask
.
EVENTHANDLER
,
new
GdhTask
().
execute
(
new
GdhTaskArg
(
GdhTask
.
EVENTHANDLER
,
new
GdhEventArg
(
GraphCmn
.
ACTION_DOWN
,
x
,
y
-
viewOffset
)));
new
GdhEventArg
(
GraphCmn
.
ACTION_DOWN
,
x
,
y
-
viewOffset
Y
)));
}
}
lastTouchX
=
x
;
lastTouchX
=
x
;
lastTouchY
=
y
;
lastTouchY
=
y
;
downTouchX
=
x
;
downTouchX
=
x
;
downTouchY
=
y
;
downTouchY
=
y
;
eventMode
=
MODE_SCROLL
;
break
;
case
MotionEvent
.
ACTION_POINTER_DOWN
:
System
.
out
.
println
(
"Event Action Pointer Down"
);
eventDistance
=
eventDistance
(
me
);
if
(
eventDistance
>
10
)
eventMode
=
MODE_ZOOM
;
break
;
case
MotionEvent
.
ACTION_POINTER_UP
:
System
.
out
.
println
(
"Event Action Pointer Up"
);
eventMode
=
MODE_NO
;
break
;
break
;
}
}
return
true
;
return
true
;
}
}
private
float
eventDistance
(
MotionEvent
me
)
{
float
x
=
me
.
getX
(
0
)
-
me
.
getX
(
1
);
float
y
=
me
.
getY
(
0
)
-
me
.
getY
(
1
);
return
FloatMath
.
sqrt
(
x
*
x
+
y
*
y
);
}
@Override
@Override
public
boolean
onCreateOptionsMenu
(
Menu
menu
)
{
public
boolean
onCreateOptionsMenu
(
Menu
menu
)
{
// Inflate the menu; this adds items to the action bar if it is present.
// Inflate the menu; this adds items to the action bar if it is present.
...
@@ -1084,6 +1268,7 @@ public class MainActivity extends Activity implements PlowAppl, GraphApplIfc, Gd
...
@@ -1084,6 +1268,7 @@ public class MainActivity extends Activity implements PlowAppl, GraphApplIfc, Gd
public
MainView
(
Context
context
)
{
public
MainView
(
Context
context
)
{
super
(
context
);
super
(
context
);
appl
.
context
=
context
;
setWillNotDraw
(
false
);
setWillNotDraw
(
false
);
}
}
...
@@ -1360,8 +1545,12 @@ System.out.println("MainActivity TimerTask " + currentCmn.type());
...
@@ -1360,8 +1545,12 @@ System.out.println("MainActivity TimerTask " + currentCmn.type());
return
0
;
return
0
;
}
}
// Back to basic cmn
// Back to basic cmn
currentCmn
=
cmnList
.
get
(
0
);
int
cmnIdx
=
0
;
for
(
int
i
=
cmnList
.
size
()-
1
;
i
>
0
;
i
--)
if
(
opwinCmn
!=
null
)
cmnIdx
=
1
;
currentCmn
=
cmnList
.
get
(
cmnIdx
);
for
(
int
i
=
cmnList
.
size
()-
1
;
i
>
cmnIdx
;
i
--)
cmnList
.
removeElementAt
(
i
);
cmnList
.
removeElementAt
(
i
);
for
(
int
i
=
graphObject
.
size
()-
1
;
i
>=
0
;
i
--)
for
(
int
i
=
graphObject
.
size
()-
1
;
i
>=
0
;
i
--)
graphObject
.
removeElementAt
(
i
);
graphObject
.
removeElementAt
(
i
);
...
...
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 @@
...
@@ -9,12 +9,12 @@
android:id=
"@+id/pageup_option"
android:id=
"@+id/pageup_option"
android:title=
"Page up"
android:title=
"Page up"
android:icon=
"@drawable/xnav_pageup"
android:icon=
"@drawable/xnav_pageup"
android:showAsAction=
"
ifRoom
"
/>
android:showAsAction=
"
never
"
/>
<item
<item
android:id=
"@+id/pagedown_option"
android:id=
"@+id/pagedown_option"
android:title=
"Page down"
android:title=
"Page down"
android:icon=
"@drawable/xnav_pagedown"
android:icon=
"@drawable/xnav_pagedown"
android:showAsAction=
"
ifRoom
"
/>
android:showAsAction=
"
never
"
/>
<item
<item
android:id=
"@+id/zoomin_option"
android:id=
"@+id/zoomin_option"
android:title=
"Zoom in"
android:title=
"Zoom in"
...
@@ -25,6 +25,11 @@
...
@@ -25,6 +25,11 @@
android:title=
"Zoom out"
android:title=
"Zoom out"
android:icon=
"@drawable/xnav_zoomout"
android:icon=
"@drawable/xnav_zoomout"
android:showAsAction=
"ifRoom"
/>
android:showAsAction=
"ifRoom"
/>
<item
android:id=
"@+id/navigator_option"
android:title=
"Navigator"
android:icon=
"@drawable/xnav_navigator"
android:showAsAction=
"ifRoom"
/>
<item
<item
android:id=
"@+id/openobject_option"
android:id=
"@+id/openobject_option"
android:title=
"Open Object"
android:title=
"Open Object"
...
@@ -48,11 +53,13 @@
...
@@ -48,11 +53,13 @@
<item
<item
android:id=
"@+id/alarmlist_option"
android:id=
"@+id/alarmlist_option"
android:title=
"Alarm List"
android:title=
"Alarm List"
android:icon=
"@drawable/xnav_openobject"
/>
android:icon=
"@drawable/xnav_alarmlist"
android:showAsAction=
"ifRoom"
/>
<item
<item
android:id=
"@+id/eventlist_option"
android:id=
"@+id/eventlist_option"
android:title=
"Event List"
android:title=
"Event List"
android:icon=
"@drawable/xnav_openobject"
/>
android:icon=
"@drawable/xnav_eventlist"
android:showAsAction=
"ifRoom"
/>
<item
<item
android:id=
"@+id/alarmack_option"
android:id=
"@+id/alarmack_option"
android:title=
"Alarm Acknowledge"
android:title=
"Alarm Acknowledge"
...
...
java/jpwr/rt/src/Pwrb.java
View file @
5a77516c
...
@@ -68,6 +68,7 @@ public class Pwrb {
...
@@ -68,6 +68,7 @@ public class Pwrb {
public
static
final
int
cClass_Ao_Vmic4800
=
133176
;
public
static
final
int
cClass_Ao_Vmic4800
=
133176
;
public
static
final
int
cClass_ApCollect
=
133224
;
public
static
final
int
cClass_ApCollect
=
133224
;
public
static
final
int
cClass_ApDistribute
=
133232
;
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_ApplDistribute
=
131208
;
public
static
final
int
cClass_ASup
=
131216
;
public
static
final
int
cClass_ASup
=
131216
;
public
static
final
int
cClass_Av
=
131224
;
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.
...
@@ -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 -u pwrp
<c>mysql> use pwrp__opg7;
<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>| 7.24149 | 7.90368 | 907.713 | 908.8 | 32321 | 0 | 1 | 0 |
<c>1 row in set (0.00 sec)
<c>1 row in set (0.00 sec)
...
...
src/doc/man/sv_se/man_dg.dat
View file @
5a77516c
...
@@ -3515,7 +3515,7 @@ l
...
@@ -3515,7 +3515,7 @@ l
<c>>mysql -u pwrp
<c>>mysql -u pwrp
<c>mysql> use pwrp__opg7;
<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>| 7.24149 | 7.90368 | 907.713 | 908.8 | 32321 | 0 | 1 | 0 |
<c>1 row in set (0.00 sec)
<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)
...
@@ -83,6 +83,9 @@ void wb_build::classlist( pwr_tCid cid)
case
pwr_cClass_WebGraph
:
case
pwr_cClass_WebGraph
:
webgraph
(
o
.
oid
());
webgraph
(
o
.
oid
());
break
;
break
;
case
pwr_cClass_AppGraph
:
appgraph
(
o
.
oid
());
break
;
case
pwr_cClass_Application
:
case
pwr_cClass_Application
:
application
(
o
.
oid
());
application
(
o
.
oid
());
break
;
break
;
...
@@ -362,6 +365,12 @@ void wb_build::rootvolume( pwr_tVid vid)
...
@@ -362,6 +365,12 @@ void wb_build::rootvolume( pwr_tVid vid)
if
(
sumsts
==
PWRB__NOBUILT
&&
m_sts
!=
PWRB__NOBUILT
)
if
(
sumsts
==
PWRB__NOBUILT
&&
m_sts
!=
PWRB__NOBUILT
)
sumsts
=
m_sts
;
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
);
classlist
(
pwr_cClass_Application
);
if
(
evenSts
())
return
;
if
(
evenSts
())
return
;
if
(
sumsts
==
PWRB__NOBUILT
&&
m_sts
!=
PWRB__NOBUILT
)
if
(
sumsts
==
PWRB__NOBUILT
&&
m_sts
!=
PWRB__NOBUILT
)
...
@@ -590,6 +599,11 @@ void wb_build::nodehier( pwr_tOid oid)
...
@@ -590,6 +599,11 @@ void wb_build::nodehier( pwr_tOid oid)
if
(
sumsts
==
PWRB__NOBUILT
&&
m_sts
!=
PWRB__NOBUILT
)
if
(
sumsts
==
PWRB__NOBUILT
&&
m_sts
!=
PWRB__NOBUILT
)
sumsts
=
m_sts
;
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
);
classlist
(
pwr_cClass_Application
);
if
(
evenSts
())
return
;
if
(
evenSts
())
return
;
if
(
sumsts
==
PWRB__NOBUILT
&&
m_sts
!=
PWRB__NOBUILT
)
if
(
sumsts
==
PWRB__NOBUILT
&&
m_sts
!=
PWRB__NOBUILT
)
...
@@ -938,6 +952,91 @@ void wb_build::webgraph( pwr_tOid oid)
...
@@ -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
)
void
wb_build
::
webhandler
(
pwr_tOid
oid
)
{
{
pwr_tTime
modtime
;
pwr_tTime
modtime
;
...
...
wb/lib/wb/src/wb_build.h
View file @
5a77516c
...
@@ -63,6 +63,7 @@ class wb_build : public wb_status
...
@@ -63,6 +63,7 @@ class wb_build : public wb_status
void
webhandler
(
pwr_tOid
oid
);
void
webhandler
(
pwr_tOid
oid
);
void
webbrowserconfig
(
pwr_tOid
oid
);
void
webbrowserconfig
(
pwr_tOid
oid
);
void
webgraph
(
pwr_tOid
oid
);
void
webgraph
(
pwr_tOid
oid
);
void
appgraph
(
pwr_tOid
oid
);
void
application
(
pwr_tOid
oid
);
void
application
(
pwr_tOid
oid
);
void
classdef
(
pwr_tOid
oid
);
void
classdef
(
pwr_tOid
oid
);
...
...
wb/lib/wb/src/wb_wb.meth
View file @
5a77516c
...
@@ -39,3 +39,4 @@ Application
...
@@ -39,3 +39,4 @@ Application
FriendNodeConfig
FriendNodeConfig
SevHistThread
SevHistThread
SevHistObject
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