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
94e7ebf3
Commit
94e7ebf3
authored
Jun 16, 2015
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adef flag PublicWrite added, and xtt script function SetAttribute()
parent
d3a420fe
Changes
61
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
61 changed files
with
1097 additions
and
98 deletions
+1097
-98
java/aapp/jopg/src/GrowFrame.java
java/aapp/jopg/src/GrowFrame.java
+6
-0
java/aapp/jopg/src/os_templ/hw_templ/makefile
java/aapp/jopg/src/os_templ/hw_templ/makefile
+18
-0
java/aapp/pwrxtt/src/MainActivity.java
java/aapp/pwrxtt/src/MainActivity.java
+33
-4
java/aapp/rt/src/os_templ/hw_templ/makefile
java/aapp/rt/src/os_templ/hw_templ/makefile
+1
-0
java/exe/jpwr_rt_gdh/src/jpwr_rt_gdh.c
java/exe/jpwr_rt_gdh/src/jpwr_rt_gdh.c
+42
-3
java/exe/jpwr_rt_gdh/src/jpwr_rt_gdh.h
java/exe/jpwr_rt_gdh/src/jpwr_rt_gdh.h
+8
-0
java/jpwr/jop/src/JopSpider.java
java/jpwr/jop/src/JopSpider.java
+9
-6
java/jpwr/jop/src/os_templ/hw_templ/makefile
java/jpwr/jop/src/os_templ/hw_templ/makefile
+0
-17
java/jpwr/jopg/src/Ccm.java
java/jpwr/jopg/src/Ccm.java
+7
-2
java/jpwr/jopg/src/CcmApplIfc.java
java/jpwr/jopg/src/CcmApplIfc.java
+2
-2
java/jpwr/jopg/src/CcmArg.java
java/jpwr/jopg/src/CcmArg.java
+1
-1
java/jpwr/jopg/src/CcmFileCtx.java
java/jpwr/jopg/src/CcmFileCtx.java
+1
-1
java/jpwr/jopg/src/CcmFileReturn.java
java/jpwr/jopg/src/CcmFileReturn.java
+1
-1
java/jpwr/jopg/src/CcmFloatvar.java
java/jpwr/jopg/src/CcmFloatvar.java
+1
-1
java/jpwr/jopg/src/CcmFunc.java
java/jpwr/jopg/src/CcmFunc.java
+1
-1
java/jpwr/jopg/src/CcmFuncCtx.java
java/jpwr/jopg/src/CcmFuncCtx.java
+1
-1
java/jpwr/jopg/src/CcmIntvar.java
java/jpwr/jopg/src/CcmIntvar.java
+1
-1
java/jpwr/jopg/src/CcmLine.java
java/jpwr/jopg/src/CcmLine.java
+1
-1
java/jpwr/jopg/src/CcmOperand.java
java/jpwr/jopg/src/CcmOperand.java
+1
-1
java/jpwr/jopg/src/CcmReturn.java
java/jpwr/jopg/src/CcmReturn.java
+1
-1
java/jpwr/jopg/src/CcmRowCtx.java
java/jpwr/jopg/src/CcmRowCtx.java
+1
-1
java/jpwr/jopg/src/CcmStringvar.java
java/jpwr/jopg/src/CcmStringvar.java
+1
-1
java/jpwr/jopg/src/CcmSysFunc.java
java/jpwr/jopg/src/CcmSysFunc.java
+1
-1
java/jpwr/jopg/src/CcmVariable.java
java/jpwr/jopg/src/CcmVariable.java
+1
-1
java/jpwr/jopg/src/JopgCcm.java
java/jpwr/jopg/src/JopgCcm.java
+151
-3
java/jpwr/jopg/src/os_templ/hw_templ/makefile
java/jpwr/jopg/src/os_templ/hw_templ/makefile
+17
-0
java/jpwr/rt/src/Gdh.java
java/jpwr/rt/src/Gdh.java
+6
-0
java/jpwr/rt/src/GdhServer.java
java/jpwr/rt/src/GdhServer.java
+37
-0
java/jpwr/rt/src/GdhrGetAttributeFlags.java
java/jpwr/rt/src/GdhrGetAttributeFlags.java
+59
-0
java/jpwr/rt/src/Pwr.java
java/jpwr/rt/src/Pwr.java
+1
-1
java/jpwr/rt/src/os_templ/hw_templ/makefile
java/jpwr/rt/src/os_templ/hw_templ/makefile
+1
-0
java/jpwr/rt_client/src/Gdh.java
java/jpwr/rt_client/src/Gdh.java
+48
-2
src/doc/man/en_us/man_opg.dat
src/doc/man/en_us/man_opg.dat
+36
-0
src/doc/man/sv_se/man_opg.dat
src/doc/man/sv_se/man_opg.dat
+36
-0
src/exe/co_convert/src/cnv_readwbl.cpp
src/exe/co_convert/src/cnv_readwbl.cpp
+1
-1
src/exp/inc/src/pwr_class.h
src/exp/inc/src/pwr_class.h
+3
-4
src/wbl/pwrb/src/pwrb_c_asup.wb_load
src/wbl/pwrb/src/pwrb_c_asup.wb_load
+0
-1
src/wbl/pwrb/src/pwrb_c_asupcomp.wb_load
src/wbl/pwrb/src/pwrb_c_asupcomp.wb_load
+0
-1
src/wbl/pwrb/src/pwrb_c_cyclesup.wb_load
src/wbl/pwrb/src/pwrb_c_cyclesup.wb_load
+0
-1
src/wbl/pwrb/src/pwrb_c_dorder.wb_load
src/wbl/pwrb/src/pwrb_c_dorder.wb_load
+0
-1
src/wbl/pwrb/src/pwrb_c_drive.wb_load
src/wbl/pwrb/src/pwrb_c_drive.wb_load
+0
-1
src/wbl/pwrb/src/pwrb_c_dsup.wb_load
src/wbl/pwrb/src/pwrb_c_dsup.wb_load
+0
-1
src/wbl/pwrb/src/pwrb_c_dsupcomp.wb_load
src/wbl/pwrb/src/pwrb_c_dsupcomp.wb_load
+0
-1
src/wbl/pwrb/src/pwrb_c_inc3p.wb_load
src/wbl/pwrb/src/pwrb_c_inc3p.wb_load
+0
-1
src/wbl/pwrb/src/pwrb_c_lorder.wb_load
src/wbl/pwrb/src/pwrb_c_lorder.wb_load
+0
-1
src/wbl/pwrb/src/pwrb_c_mvalve.wb_load
src/wbl/pwrb/src/pwrb_c_mvalve.wb_load
+0
-1
src/wbl/pwrb/src/pwrb_c_nodelinksup.wb_load
src/wbl/pwrb/src/pwrb_c_nodelinksup.wb_load
+0
-1
src/wbl/pwrb/src/pwrb_c_pos3p.wb_load
src/wbl/pwrb/src/pwrb_c_pos3p.wb_load
+0
-1
src/wbl/pwrb/src/pwrb_c_posit.wb_load
src/wbl/pwrb/src/pwrb_c_posit.wb_load
+0
-1
src/wbl/pwrb/src/pwrb_c_publicav.wb_load
src/wbl/pwrb/src/pwrb_c_publicav.wb_load
+73
-0
src/wbl/pwrb/src/pwrb_c_publicdv.wb_load
src/wbl/pwrb/src/pwrb_c_publicdv.wb_load
+73
-0
src/wbl/pwrb/src/pwrb_c_publiciv.wb_load
src/wbl/pwrb/src/pwrb_c_publiciv.wb_load
+73
-0
src/wbl/pwrb/src/pwrb_c_publicsv.wb_load
src/wbl/pwrb/src/pwrb_c_publicsv.wb_load
+73
-0
src/wbl/pwrb/src/pwrb_c_pulse.wb_load
src/wbl/pwrb/src/pwrb_c_pulse.wb_load
+0
-1
src/wbl/pwrb/src/pwrb_c_timer.wb_load
src/wbl/pwrb/src/pwrb_c_timer.wb_load
+0
-1
src/wbl/pwrb/src/pwrb_c_valve.wb_load
src/wbl/pwrb/src/pwrb_c_valve.wb_load
+0
-1
src/wbl/pwrb/src/pwrb_c_wait.wb_load
src/wbl/pwrb/src/pwrb_c_wait.wb_load
+0
-1
src/wbl/pwrb/src/pwrb_c_waith.wb_load
src/wbl/pwrb/src/pwrb_c_waith.wb_load
+0
-1
src/wbl/pwrs/src/pwrs_td_adefflags.wb_load
src/wbl/pwrs/src/pwrs_td_adefflags.wb_load
+4
-4
wb/lib/wb/src/wb_wblnode.cpp
wb/lib/wb/src/wb_wblnode.cpp
+1
-2
xtt/lib/xtt/src/xtt_xnav_command.cpp
xtt/lib/xtt/src/xtt_xnav_command.cpp
+264
-15
No files found.
java/aapp/jopg/src/GrowFrame.java
View file @
94e7ebf3
...
...
@@ -72,6 +72,12 @@ public class GrowFrame implements GraphApplIfc {
return
0
;
}
public
int
script
(
String
script
)
{
if
(
appl
!=
null
)
return
appl
.
script
(
script
);
return
0
;
}
public
void
confirmNo
()
{}
public
void
confirmYes
()
{}
public
void
openConfirmDialog
(
Object
dyn
,
String
text
,
Object
object
)
{}
...
...
java/aapp/jopg/src/os_templ/hw_templ/makefile
View file @
94e7ebf3
include
$(pwre_dir_symbols)
extern_java_sources
:=
\
CcmApplIfc.java,
\
CcmFloatvar.java,
\
CcmIntvar.java,
\
CcmStringvar.java,
\
CcmLine.java,
\
CcmReturn.java,
\
CcmFileReturn.java,
\
CcmArg.java,
\
CcmVariable.java,
\
CcmFunc.java,
\
CcmOperand.java,
\
CcmFuncCtx.java,
\
CcmFileCtx.java,
\
CcmRowCtx.java,
\
CcmSysFunc.java,
\
Ccm.java,
\
JopgCcm.java,
\
Glow.java,
\
GlowCrypt.java,
\
PrintfFormat.java,
\
...
...
@@ -44,6 +61,7 @@ extern_java_sources := \
GrowGroup.java,
\
GrowSlider.java,
\
GrowAxis.java,
\
GrowAxisArc.java,
\
GrowArc.java,
\
GrowLine.java,
\
GrowPolyline.java,
\
...
...
java/aapp/pwrxtt/src/MainActivity.java
View file @
94e7ebf3
...
...
@@ -47,7 +47,8 @@ import jpwr.rt.*;
import
jpwr.app.*
;
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
,
CcmApplIfc
{
static
final
int
MODE_NO
=
0
;
static
final
int
MODE_SCROLL
=
1
;
static
final
int
MODE_ZOOM
=
2
;
...
...
@@ -2160,6 +2161,28 @@ System.out.println("MainActivity TimerTask " + currentCmn.type());
return
graph
.
loadSubgraph
(
reader
);
}
public
int
externCmd
(
String
cmd
)
{
return
command
(
cmd
);
}
public
String
defFilename
(
String
filename
)
{
String
fname
=
"http://"
+
pwrHost
+
"/"
+
pwrp_exe
+
filename
;
if
(
!
fname
.
endsWith
(
".rtt_com"
))
fname
+=
".rtt_com"
;
return
fname
;
}
public
void
errorMessage
(
String
msg
,
int
severity
)
{
}
public
int
confirmDialog
(
String
title
,
String
text
)
{
return
1
;
}
public
int
getRootType
()
{
return
Ccm
.
ROOT_AAPP
;
}
public
int
script
(
String
script
)
{
new
JopgCcm
(
this
,
appl
.
gdh
,
null
,
script
);
return
1
;
}
static
CliTable
[]
cliTable
=
new
CliTable
[]
{
new
CliTable
(
"OPEN"
,
new
String
[]
{
"cli_arg1"
,
"cli_arg2"
,
"/NAME"
,
"/FILE"
,
"/SCROLLBAR"
,
"/WIDTH"
,
"/HEIGHT"
,
"/MENU"
,
"/NAVIGATOR"
,
...
...
@@ -2181,9 +2204,15 @@ System.out.println("MainActivity TimerTask " + currentCmn.type());
boolean
local_cmd
=
false
;
if
(
!
appl
.
gdh
.
isAuthorized
(
Pwr
.
mAccess_AllRt
))
{
openMessageDialog
(
"Not authorized"
);
return
0
;
}
openMessageDialog
(
"Not authorized"
);
return
0
;
}
if
(
cmd
.
charAt
(
0
)
==
'@'
)
{
// Execute a script
new
JopgCcm
(
this
,
gdh
,
cmd
.
substring
(
1
),
null
);
return
1
;
}
Cli
cli
=
new
Cli
(
cliTable
);
String
command
=
cli
.
parse
(
cmd
);
...
...
java/aapp/rt/src/os_templ/hw_templ/makefile
View file @
94e7ebf3
...
...
@@ -18,6 +18,7 @@ extern_java_sources := \
CliTable.java,
\
GdhApplIfc.java,
\
GdhrGetAttributeChar.java,
\
GdhrGetAttributeFlags.java,
\
GdhrGetXttObj.java,
\
GdhrRefObjectInfo.java,
\
MhData.java,
\
...
...
java/exe/jpwr_rt_gdh/src/jpwr_rt_gdh.c
View file @
94e7ebf3
...
...
@@ -165,6 +165,7 @@ JNIEXPORT jobject JNICALL Java_jpwr_rt_Gdh_setObjectInfoInt
strcat
(
cstr
,
s1
);
}
sts
=
gdh_SetObjectInfo
(
cstr
,
(
void
*
)
&
val
,
sizeof
(
val
));
(
*
env
)
->
ReleaseStringUTFChars
(
env
,
name
,
cstr
);
jsts
=
(
jint
)
sts
;
return_obj
=
(
*
env
)
->
NewObject
(
env
,
pwrtStatus_id
,
...
...
@@ -1642,6 +1643,7 @@ JNIEXPORT jobject JNICALL Java_jpwr_rt_Gdh_getAttributeChar
unsigned
int
elements
;
unsigned
int
offset
;
pwr_eType
type_id
;
pwr_tAttrRef
aref
;
gdhrGetAttributeChar_id
=
(
*
env
)
->
FindClass
(
env
,
"jpwr/rt/GdhrGetAttributeChar"
);
...
...
@@ -1652,14 +1654,51 @@ JNIEXPORT jobject JNICALL Java_jpwr_rt_Gdh_getAttributeChar
cstr
=
(
char
*
)
str
;
gdh_ConvertUTFstring
(
cstr
,
cstr
);
sts
=
gdh_GetAttributeCharacteristics
(
cstr
,
&
type_id
,
&
size
,
&
offset
,
&
elements
);
sts
=
gdh_NameToAttrref
(
pwr_cNObjid
,
cstr
,
&
aref
);
if
(
ODD
(
sts
))
sts
=
gdh_GetAttributeCharAttrref
(
&
aref
,
&
type_id
,
&
size
,
&
offset
,
&
elements
);
(
*
env
)
->
ReleaseStringUTFChars
(
env
,
name
,
cstr
);
jsts
=
(
jint
)
sts
;
return_obj
=
(
*
env
)
->
NewObject
(
env
,
gdhrGetAttributeChar_id
,
gdhrGetAttributeChar_cid
,
(
jint
)
type_id
,
(
jint
)
size
,
(
jint
)
offset
,
(
jint
)
elements
,
jsts
);
(
jint
)
offset
,
(
jint
)
elements
,
jsts
);
return
return_obj
;
}
JNIEXPORT
jobject
JNICALL
Java_jpwr_rt_Gdh_getAttributeFlags
(
JNIEnv
*
env
,
jobject
obj
,
jstring
name
)
{
int
sts
;
const
char
*
str
;
char
*
cstr
;
jobject
return_obj
;
jint
jsts
;
jclass
gdhrGetAttributeFlags_id
;
jmethodID
gdhrGetAttributeFlags_cid
;
unsigned
int
flags
;
pwr_tAttrRef
aref
;
gdhrGetAttributeFlags_id
=
(
*
env
)
->
FindClass
(
env
,
"jpwr/rt/GdhrGetAttributeFlags"
);
gdhrGetAttributeFlags_cid
=
(
*
env
)
->
GetMethodID
(
env
,
gdhrGetAttributeFlags_id
,
"<init>"
,
"(II)V"
);
str
=
(
*
env
)
->
GetStringUTFChars
(
env
,
name
,
0
);
cstr
=
(
char
*
)
str
;
gdh_ConvertUTFstring
(
cstr
,
cstr
);
sts
=
gdh_NameToAttrref
(
pwr_cNObjid
,
cstr
,
&
aref
);
if
(
ODD
(
sts
))
sts
=
gdh_GetAttributeFlags
(
&
aref
,
&
flags
);
(
*
env
)
->
ReleaseStringUTFChars
(
env
,
name
,
cstr
);
jsts
=
(
jint
)
sts
;
return_obj
=
(
*
env
)
->
NewObject
(
env
,
gdhrGetAttributeFlags_id
,
gdhrGetAttributeFlags_cid
,
(
jint
)
flags
,
jsts
);
return
return_obj
;
}
...
...
java/exe/jpwr_rt_gdh/src/jpwr_rt_gdh.h
View file @
94e7ebf3
...
...
@@ -319,6 +319,14 @@ JNIEXPORT jobject JNICALL Java_jpwr_rt_Gdh_getNodeObject
JNIEXPORT
jobject
JNICALL
Java_jpwr_rt_Gdh_getAttributeChar
(
JNIEnv
*
,
jobject
,
jstring
);
/*
* Class: jpwr_rt_Gdh
* Method: getAttributeFlags
* Signature: (Ljava/lang/String;)Ljpwr/rt/GdhrGetAttributeFlags;
*/
JNIEXPORT
jobject
JNICALL
Java_jpwr_rt_Gdh_getAttributeFlags
(
JNIEnv
*
,
jobject
,
jstring
);
/*
* Class: jpwr_rt_Gdh
* Method: getClassAttribute
...
...
java/jpwr/jop/src/JopSpider.java
View file @
94e7ebf3
...
...
@@ -88,10 +88,10 @@ public class JopSpider {
}
}
private
static
class
JopCcmCb
implements
CcmApplIfc
{
private
static
class
Jop
g
CcmCb
implements
CcmApplIfc
{
JopSession
session
;
JopCcmCb
(
JopSession
session
)
{
Jop
g
CcmCb
(
JopSession
session
)
{
this
.
session
=
session
;
}
...
...
@@ -130,8 +130,11 @@ public class JopSpider {
System
.
out
.
println
(
"Confirm dialoga: "
+
title
+
", "
+
text
);
return
1
;
}
public
Object
getRoot
()
{
return
session
.
getRoot
();
public
int
getRootType
()
{
if
(
session
.
getRoot
()
instanceof
JopApplet
)
return
Ccm
.
ROOT_APPLET
;
else
return
Ccm
.
ROOT_FRAME
;
}
}
...
...
@@ -195,7 +198,7 @@ public class JopSpider {
// Execute a script
Gdh
gdh
=
session
.
getEngine
().
gdh
;
new
Jop
Ccm
(
new
Jop
CcmCb
(
session
),
gdh
,
null
,
script
);
new
Jop
gCcm
(
new
Jopg
CcmCb
(
session
),
gdh
,
null
,
script
);
return
1
;
}
...
...
@@ -214,7 +217,7 @@ public class JopSpider {
if
(
cmd
.
charAt
(
0
)
==
'@'
)
{
// Execute a script
new
Jop
Ccm
(
new
Jop
CcmCb
(
session
),
gdh
,
cmd
.
substring
(
1
),
null
);
new
Jop
gCcm
(
new
Jopg
CcmCb
(
session
),
gdh
,
cmd
.
substring
(
1
),
null
);
return
1
;
}
...
...
java/jpwr/jop/src/os_templ/hw_templ/makefile
View file @
94e7ebf3
...
...
@@ -9,23 +9,6 @@ local_java_sources := \
GeColor.java
\
JopDynamic.java
\
LocalDb.java
\
CcmApplIfc.java
\
CcmFloatvar.java
\
CcmIntvar.java
\
CcmStringvar.java
\
CcmLine.java
\
CcmReturn.java
\
CcmFileReturn.java
\
CcmArg.java
\
CcmVariable.java
\
CcmFunc.java
\
CcmOperand.java
\
CcmFuncCtx.java
\
CcmFileCtx.java
\
CcmRowCtx.java
\
CcmSysFunc.java
\
Ccm.java
\
JopCcm.java
\
JopCrypt.java
\
JopEngine.java
\
JopSessionIfc.java
\
...
...
java/jpwr/jop/src/Ccm.java
→
java/jpwr/jop
g
/src/Ccm.java
View file @
94e7ebf3
...
...
@@ -34,7 +34,7 @@
* General Public License plus this exception.
*/
package
jpwr.jop
;
package
jpwr.jop
g
;
import
java.util.Vector
;
import
java.util.Scanner
;
import
java.util.Calendar
;
...
...
@@ -45,6 +45,10 @@ import java.net.*;
public
class
Ccm
{
static
final
boolean
ccm_testmode
=
false
;
public
static
final
int
ROOT_APPLET
=
1
;
public
static
final
int
ROOT_FRAME
=
2
;
public
static
final
int
ROOT_AAPP
=
3
;
public
static
final
int
CCM__SUCCESS
=
1
;
public
static
final
int
CCM__EXITFUNC
=
3
;
public
static
final
int
CCM__EXPRESSION
=
2
;
...
...
@@ -995,7 +999,8 @@ public class Ccm {
try
{
BufferedReader
reader
;
if
(
filectx
.
appl
!=
null
&&
filectx
.
appl
.
getRoot
()
instanceof
JopApplet
)
{
if
(
filectx
.
appl
!=
null
&&
(
filectx
.
appl
.
getRootType
()
==
ROOT_APPLET
||
filectx
.
appl
.
getRootType
()
==
ROOT_AAPP
))
{
URL
fileURL
=
new
URL
(
filename
);
InputStream
in
=
fileURL
.
openStream
();
InputStreamReader
r2
=
new
InputStreamReader
(
in
,
"ISO-8859-1"
);
...
...
java/jpwr/jop/src/CcmApplIfc.java
→
java/jpwr/jop
g
/src/CcmApplIfc.java
View file @
94e7ebf3
...
...
@@ -34,13 +34,13 @@
* General Public License plus this exception.
*/
package
jpwr.jop
;
package
jpwr.jop
g
;
public
interface
CcmApplIfc
{
public
int
externCmd
(
String
cmd
);
public
String
defFilename
(
String
filename
);
public
void
errorMessage
(
String
msg
,
int
severity
);
public
int
confirmDialog
(
String
title
,
String
text
);
public
Object
getRoot
();
public
int
getRootType
();
}
java/jpwr/jop/src/CcmArg.java
→
java/jpwr/jop
g
/src/CcmArg.java
View file @
94e7ebf3
...
...
@@ -34,7 +34,7 @@
* General Public License plus this exception.
*/
package
jpwr.jop
;
package
jpwr.jop
g
;
public
class
CcmArg
{
public
CcmArg
()
{
...
...
java/jpwr/jop/src/CcmFileCtx.java
→
java/jpwr/jop
g
/src/CcmFileCtx.java
View file @
94e7ebf3
...
...
@@ -34,7 +34,7 @@
* General Public License plus this exception.
*/
package
jpwr.jop
;
package
jpwr.jop
g
;
import
java.util.Vector
;
public
class
CcmFileCtx
{
...
...
java/jpwr/jop/src/CcmFileReturn.java
→
java/jpwr/jop
g
/src/CcmFileReturn.java
View file @
94e7ebf3
...
...
@@ -34,7 +34,7 @@
* General Public License plus this exception.
*/
package
jpwr.jop
;
package
jpwr.jop
g
;
public
class
CcmFileReturn
{
public
CcmFileReturn
()
{
...
...
java/jpwr/jop/src/CcmFloatvar.java
→
java/jpwr/jop
g
/src/CcmFloatvar.java
View file @
94e7ebf3
...
...
@@ -34,7 +34,7 @@
* General Public License plus this exception.
*/
package
jpwr.jop
;
package
jpwr.jop
g
;
public
class
CcmFloatvar
{
public
CcmFloatvar
()
{
...
...
java/jpwr/jop/src/CcmFunc.java
→
java/jpwr/jop
g
/src/CcmFunc.java
View file @
94e7ebf3
...
...
@@ -34,7 +34,7 @@
* General Public License plus this exception.
*/
package
jpwr.jop
;
package
jpwr.jop
g
;
public
class
CcmFunc
{
public
CcmFunc
()
{
...
...
java/jpwr/jop/src/CcmFuncCtx.java
→
java/jpwr/jop
g
/src/CcmFuncCtx.java
View file @
94e7ebf3
...
...
@@ -34,7 +34,7 @@
* General Public License plus this exception.
*/
package
jpwr.jop
;
package
jpwr.jop
g
;
import
java.util.Vector
;
public
class
CcmFuncCtx
{
...
...
java/jpwr/jop/src/CcmIntvar.java
→
java/jpwr/jop
g
/src/CcmIntvar.java
View file @
94e7ebf3
...
...
@@ -34,7 +34,7 @@
* General Public License plus this exception.
*/
package
jpwr.jop
;
package
jpwr.jop
g
;
public
class
CcmIntvar
{
public
CcmIntvar
()
{
...
...
java/jpwr/jop/src/CcmLine.java
→
java/jpwr/jop
g
/src/CcmLine.java
View file @
94e7ebf3
...
...
@@ -34,7 +34,7 @@
* General Public License plus this exception.
*/
package
jpwr.jop
;
package
jpwr.jop
g
;
public
class
CcmLine
{
public
CcmLine
(
String
line
,
int
row
)
{
...
...
java/jpwr/jop/src/CcmOperand.java
→
java/jpwr/jop
g
/src/CcmOperand.java
View file @
94e7ebf3
...
...
@@ -34,7 +34,7 @@
* General Public License plus this exception.
*/
package
jpwr.jop
;
package
jpwr.jop
g
;
public
class
CcmOperand
{
public
CcmOperand
()
{
...
...
java/jpwr/jop/src/CcmReturn.java
→
java/jpwr/jop
g
/src/CcmReturn.java
View file @
94e7ebf3
...
...
@@ -34,7 +34,7 @@
* General Public License plus this exception.
*/
package
jpwr.jop
;
package
jpwr.jop
g
;
public
class
CcmReturn
{
public
CcmReturn
()
{
...
...
java/jpwr/jop/src/CcmRowCtx.java
→
java/jpwr/jop
g
/src/CcmRowCtx.java
View file @
94e7ebf3
...
...
@@ -34,7 +34,7 @@
* General Public License plus this exception.
*/
package
jpwr.jop
;
package
jpwr.jop
g
;
import
java.util.Vector
;
...
...
java/jpwr/jop/src/CcmStringvar.java
→
java/jpwr/jop
g
/src/CcmStringvar.java
View file @
94e7ebf3
...
...
@@ -34,7 +34,7 @@
* General Public License plus this exception.
*/
package
jpwr.jop
;
package
jpwr.jop
g
;
public
class
CcmStringvar
{
public
CcmStringvar
()
{
...
...
java/jpwr/jop/src/CcmSysFunc.java
→
java/jpwr/jop
g
/src/CcmSysFunc.java
View file @
94e7ebf3
...
...
@@ -34,7 +34,7 @@
* General Public License plus this exception.
*/
package
jpwr.jop
;
package
jpwr.jop
g
;
public
class
CcmSysFunc
{
public
String
name
;
...
...
java/jpwr/jop/src/CcmVariable.java
→
java/jpwr/jop
g
/src/CcmVariable.java
View file @
94e7ebf3
...
...
@@ -34,7 +34,7 @@
* General Public License plus this exception.
*/
package
jpwr.jop
;
package
jpwr.jop
g
;
public
class
CcmVariable
{
public
CcmVariable
()
{
...
...
java/jpwr/jop
/src/Jop
Ccm.java
→
java/jpwr/jop
g/src/Jopg
Ccm.java
View file @
94e7ebf3
...
...
@@ -34,16 +34,16 @@
* General Public License plus this exception.
*/
package
jpwr.jop
;
package
jpwr.jop
g
;
import
jpwr.rt.*
;
public
class
JopCcm
{
public
class
Jop
g
Ccm
{
Gdh
gdh
;
Ccm
ccm
;
CcmApplIfc
appl
;
public
JopCcm
(
CcmApplIfc
appl
,
Gdh
gdh
,
String
cmd
,
String
script
)
{
public
Jop
g
Ccm
(
CcmApplIfc
appl
,
Gdh
gdh
,
String
cmd
,
String
script
)
{
this
.
gdh
=
gdh
;
this
.
appl
=
appl
;
...
...
@@ -58,6 +58,7 @@ public class JopCcm {
ccm
.
registerFunction
(
new
CcmFuncGetChild
(
"GetChild"
));
ccm
.
registerFunction
(
new
CcmFuncGetNextSibling
(
"GetNextSibling"
));
ccm
.
registerFunction
(
new
CcmFuncGetAttribute
(
"GetAttribute"
));
ccm
.
registerFunction
(
new
CcmFuncSetAttribute
(
"SetAttribute"
));
ccm
.
registerFunction
(
new
CcmFuncMessageError
(
"MessageError"
));
ccm
.
registerFunction
(
new
CcmFuncMessageInfo
(
"MessageInfo"
));
ccm
.
registerFunction
(
new
CcmFuncConfirmDialog
(
"ConfirmDialog"
));
...
...
@@ -475,6 +476,153 @@ public class JopCcm {
}
}
public
class
CcmFuncSetAttribute
extends
CcmSysFunc
{
public
CcmFuncSetAttribute
(
String
name
)
{
super
(
name
);
}
public
CcmReturn
func
(
CcmFileCtx
filectx
,
CcmArg
[]
args
)
{
int
sts
;
CcmReturn
ret
=
new
CcmReturn
();
boolean
publicwrite
=
false
;
if
(
!(
args
.
length
==
2
||
args
.
length
==
3
))
{
ret
.
sts
=
Ccm
.
CCM__ARGMISM
;
return
ret
;
}
if
(
args
[
0
].
value_decl
!=
Ccm
.
K_DECL_STRING
)
{
ret
.
sts
=
Ccm
.
CCM__VARTYPE
;
return
ret
;
}
if
(
args
.
length
==
3
)
{
if
(
args
[
2
].
value_decl
!=
Ccm
.
K_DECL_INT
)
{
ret
.
sts
=
Ccm
.
CCM__ARGMISM
;
return
ret
;
}
if
(
args
[
2
].
value_int
==
1
)
publicwrite
=
true
;
}
// Check authorization
boolean
authorized
=
false
;
if
(
publicwrite
)
{
GdhrGetAttributeFlags
retf
=
gdh
.
getAttributeFlags
(
args
[
0
].
value_string
);
if
(
Ccm
.
EVEN
(
retf
.
sts
))
{
ret
.
decl
=
Ccm
.
K_DECL_INT
;
ret
.
rint
=
retf
.
sts
;
return
ret
;
}
if
(
(
retf
.
flags
&
Pwr
.
mAdef_publicwrite
)
!=
0
&&
gdh
.
isAuthorized
(
Pwr
.
mPrv_RtRead
|
Pwr
.
mPrv_RtWrite
|
Pwr
.
mPrv_System
|
Pwr
.
mPrv_Maintenance
|
Pwr
.
mPrv_Process
|
Pwr
.
mPrv_Operator1
|
Pwr
.
mPrv_Operator2
|
Pwr
.
mPrv_Operator3
|
Pwr
.
mPrv_Operator4
|
Pwr
.
mPrv_Operator5
|
Pwr
.
mPrv_Operator6
|
Pwr
.
mPrv_Operator7
|
Pwr
.
mPrv_Operator8
|
Pwr
.
mPrv_Operator9
|
Pwr
.
mPrv_Operator10
))
authorized
=
true
;
}
else
{
if
(
gdh
.
isAuthorized
(
Pwr
.
mPrv_RtWrite
|
Pwr
.
mPrv_System
))
authorized
=
true
;
}
if
(
!
authorized
)
{
ret
.
decl
=
Ccm
.
K_DECL_INT
;
ret
.
rint
=
0
;
return
ret
;
}
GdhrGetAttributeChar
retc
=
gdh
.
getAttributeChar
(
args
[
0
].
value_string
);
if
(
Ccm
.
EVEN
(
retc
.
sts
))
{
ret
.
decl
=
Ccm
.
K_DECL_INT
;
ret
.
rint
=
retc
.
sts
;
return
ret
;
}
PwrtStatus
rsts
=
null
;
switch
(
args
[
1
].
value_decl
)
{
case
Ccm
.
K_DECL_STRING
:
{
rsts
=
gdh
.
setObjectInfo
(
args
[
0
].
value_string
,
args
[
1
].
value_string
);
break
;
}
case
Ccm
.
K_DECL_INT
:
{
switch
(
retc
.
typeId
)
{
case
Pwr
.
eType_Int8
:
case
Pwr
.
eType_Int16
:
case
Pwr
.
eType_Int32
:
case
Pwr
.
eType_Int64
:
case
Pwr
.
eType_UInt8
:
case
Pwr
.
eType_UInt16
:
case
Pwr
.
eType_UInt32
:
case
Pwr
.
eType_UInt64
:
case
Pwr
.
eType_Enum
:
case
Pwr
.
eType_Mask
:
case
Pwr
.
eType_Status
:
case
Pwr
.
eType_NetStatus
:
{
int
val
=
args
[
1
].
value_int
;
System
.
out
.
println
(
"setObjectInfo val "
+
val
);
rsts
=
gdh
.
setObjectInfo
(
args
[
0
].
value_string
,
val
);
System
.
out
.
println
(
"setObjectInfo sts "
+
rsts
.
getSts
());
break
;
}
case
Pwr
.
eType_Float32
:
case
Pwr
.
eType_Float64
:
{
float
val
=
args
[
1
].
value_int
;
rsts
=
gdh
.
setObjectInfo
(
args
[
0
].
value_string
,
val
);
break
;
}
case
Pwr
.
eType_Boolean
:
{
boolean
val
=
(
args
[
1
].
value_int
==
0
?
false
:
true
);
rsts
=
gdh
.
setObjectInfo
(
args
[
0
].
value_string
,
val
);
break
;
}
}
break
;
}
case
Ccm
.
K_DECL_FLOAT
:
{
switch
(
retc
.
typeId
)
{
case
Pwr
.
eType_Int8
:
case
Pwr
.
eType_Int16
:
case
Pwr
.
eType_Int32
:
case
Pwr
.
eType_Int64
:
case
Pwr
.
eType_UInt8
:
case
Pwr
.
eType_UInt16
:
case
Pwr
.
eType_UInt32
:
case
Pwr
.
eType_UInt64
:
case
Pwr
.
eType_Enum
:
case
Pwr
.
eType_Mask
:
case
Pwr
.
eType_Status
:
case
Pwr
.
eType_NetStatus
:
{
int
val
=
(
int
)
args
[
1
].
value_float
;
rsts
=
gdh
.
setObjectInfo
(
args
[
0
].
value_string
,
val
);
break
;
}
case
Pwr
.
eType_Float32
:
case
Pwr
.
eType_Float64
:
{
float
val
=
args
[
1
].
value_float
;
rsts
=
gdh
.
setObjectInfo
(
args
[
0
].
value_string
,
val
);
break
;
}
case
Pwr
.
eType_Boolean
:
{
boolean
val
=
(
args
[
1
].
value_float
==
0
?
false
:
true
);
rsts
=
gdh
.
setObjectInfo
(
args
[
0
].
value_string
,
val
);
break
;
}
}
break
;
}
}
ret
.
decl
=
Ccm
.
K_DECL_INT
;
if
(
rsts
==
null
)
ret
.
rint
=
0
;
else
ret
.
rint
=
rsts
.
getSts
();
return
ret
;
}
}
public
class
CcmFuncMessageError
extends
CcmSysFunc
{
public
CcmFuncMessageError
(
String
name
)
{
super
(
name
);
...
...
java/jpwr/jopg/src/os_templ/hw_templ/makefile
View file @
94e7ebf3
include
$(pwre_dir_symbols)
local_java_sources
:=
\
CcmApplIfc.java,
\
CcmFloatvar.java,
\
CcmIntvar.java,
\
CcmStringvar.java,
\
CcmLine.java,
\
CcmReturn.java,
\
CcmFileReturn.java,
\
CcmArg.java,
\
CcmVariable.java,
\
CcmFunc.java,
\
CcmOperand.java,
\
CcmFuncCtx.java,
\
CcmFileCtx.java,
\
CcmRowCtx.java,
\
CcmSysFunc.java,
\
Ccm.java,
\
JopgCcm.java,
\
Glow.java,
\
PrintfFormat.java,
\
GlowCFormat.java,
\
...
...
java/jpwr/rt/src/Gdh.java
View file @
94e7ebf3
...
...
@@ -642,6 +642,12 @@ public class Gdh {
*/
public
native
GdhrGetAttributeChar
getAttributeChar
(
String
attributeName
);
/**
Get the flags of an attribute, given
its name and the class it belongs to.
*/
public
native
GdhrGetAttributeFlags
getAttributeFlags
(
String
attributeName
);
/**
Get information of all attributes in a class.
*/
...
...
java/jpwr/rt/src/GdhServer.java
View file @
94e7ebf3
...
...
@@ -112,6 +112,8 @@ public class GdhServer
public
final
static
int
GET_OBJECT_INFO_INT_ARRAY
=
58
;
public
final
static
int
GET_CIRCBUFF_INFO
=
59
;
public
final
static
int
UPDATE_CIRCBUFF_INFO
=
60
;
public
final
static
int
GET_ATTRIBUTE_FLAGS
=
61
;
public
final
static
int
CLASSNAME_TO_ID
=
62
;
public
final
static
int
PORT
=
4445
;
...
...
@@ -1249,6 +1251,23 @@ public class GdhServer
System
.
out
.
println
(
"getAttrRefTid: IO exception"
);
}
break
;
case
CLASSNAME_TO_ID:
try
{
String
name
=
in
.
readUTF
();
CdhrClassId
ret
=
gdh
.
classNameToId
(
name
);
out
.
writeInt
(
ret
.
getSts
());
if
(
ret
.
oddSts
())
{
out
.
writeInt
(
ret
.
classId
);
}
out
.
flush
();
}
catch
(
IOException
e
)
{
System
.
out
.
println
(
"classNameToId: IO exception"
);
}
break
;
case
GET_CLASS_LIST:
try
{
...
...
@@ -1404,6 +1423,24 @@ public class GdhServer
System
.
out
.
println
(
"getAttributeChar: IO exception"
);
}
break
;
case
GET_ATTRIBUTE_FLAGS:
try
{
String
attrName
=
in
.
readUTF
();
GdhrGetAttributeFlags
ret
=
gdh
.
getAttributeFlags
(
attrName
);
out
.
writeInt
(
ret
.
getSts
());
out
.
flush
();
if
(
ret
.
oddSts
())
{
out
.
writeInt
(
ret
.
flags
);
out
.
flush
();
}
}
catch
(
IOException
e
)
{
System
.
out
.
println
(
"getAttributeFlags: IO exception"
);
}
break
;
case
CREATE_INSTANCE_FILE:
try
{
...
...
java/jpwr/rt/src/GdhrGetAttributeFlags.java
0 → 100644
View file @
94e7ebf3
/*
* Proview Open Source Process Control.
* Copyright (C) 2005-2015 SSAB EMEA AB.
*
* This file is part of Proview.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Proview. If not, see <http://www.gnu.org/licenses/>
*
* Linking Proview statically or dynamically with other modules is
* making a combined work based on Proview. Thus, the terms and
* conditions of the GNU General Public License cover the whole
* combination.
*
* In addition, as a special exception, the copyright holders of
* Proview give you permission to, from the build function in the
* Proview Configurator, combine Proview with modules generated by the
* Proview PLC Editor to a PLC program, regardless of the license
* terms of these modules. You may copy and distribute the resulting
* combined work under the terms of your choice, provided that every
* copy of the combined work is accompanied by a complete copy of
* the source code of Proview (the version used to produce the
* combined work), being distributed under the terms of the GNU
* General Public License plus this exception.
*/
package
jpwr.rt
;
import
java.io.Serializable
;
/**
Return class for functions returning attribute characteristics.
Contains a return status and attribute characteristics.
*/
public
class
GdhrGetAttributeFlags
implements
Serializable
{
public
int
flags
;
public
int
sts
;
public
GdhrGetAttributeFlags
(
int
flags
,
int
sts
)
{
this
.
flags
=
flags
;
this
.
sts
=
sts
;
}
/** Check if status is even. */
public
boolean
evenSts
()
{
return
(
sts
%
2
==
0
);}
/** Check if status is odd. */
public
boolean
oddSts
()
{
return
(
sts
%
2
==
1
);}
/** Get the status. */
public
int
getSts
()
{
return
sts
;}
}
java/jpwr/rt/src/Pwr.java
View file @
94e7ebf3
...
...
@@ -192,7 +192,7 @@ public class Pwr {
public
static
final
int
mAdef_rtvirtual
=
1
<<
6
;
/* 64 */
public
static
final
int
mAdef_devbodyref
=
1
<<
7
;
/* 128 */
public
static
final
int
mAdef_dynamic
=
1
<<
8
;
/* 256 */
public
static
final
int
mAdef_
objidself
=
1
<<
9
;
/* 512 */
public
static
final
int
mAdef_
publicwrite
=
1
<<
9
;
/* 512 */
public
static
final
int
mAdef_noedit
=
1
<<
10
;
/* 1024 */
public
static
final
int
mAdef_invisible
=
1
<<
11
;
/* 2048 */
public
static
final
int
mAdef_refdirect
=
1
<<
12
;
/* 4096 If an AttrRef should not give alue pointed to */
...
...
java/jpwr/rt/src/os_templ/hw_templ/makefile
View file @
94e7ebf3
...
...
@@ -29,6 +29,7 @@ local_java_sources = \
RtSecurity.java
\
GdhrRefObjectInfo.java
\
GdhrGetAttributeChar.java
\
GdhrGetAttributeFlags.java
\
GdhrGetXttObj.java
\
CdhrObjAttr.java
\
PwrsParInfo.java
\
...
...
java/jpwr/rt_client/src/Gdh.java
View file @
94e7ebf3
...
...
@@ -100,6 +100,8 @@ public class Gdh
public
final
static
int
GET_OBJECT_INFO_INT_ARRAY
=
58
;
public
final
static
int
GET_CIRCBUFF_INFO
=
59
;
public
final
static
int
UPDATE_CIRCBUFF_INFO
=
60
;
public
final
static
int
GET_ATTRIBUTE_FLAGS
=
61
;
public
final
static
int
CLASSNAME_TO_ID
=
62
;
...
...
@@ -1326,6 +1328,27 @@ public class Gdh
}
}
public
CdhrClassId
classNameToId
(
String
name
)
{
try
{
out
.
writeInt
(
CLASSNAME_TO_ID
);
out
.
writeUTF
(
name
);
out
.
flush
();
int
sts
=
in
.
readInt
();
if
(
sts
%
2
==
0
)
{
return
new
CdhrClassId
(
0
,
sts
);
}
int
classId
=
in
.
readInt
();
return
new
CdhrClassId
(
classId
,
sts
);
}
catch
(
IOException
e
)
{
return
new
CdhrClassId
(
0
,
__IO_EXCEPTION
);
}
}
private
void
getDefaultPrivilege
()
{
CdhrObjid
oretSec
=
getClassList
(
Pwrs
.
cClass_Security
);
...
...
@@ -1613,7 +1636,7 @@ public class Gdh
int
sts
=
in
.
readInt
();
if
(
sts
%
2
==
0
)
{
return
new
GdhrGetAttributeChar
(
0
,
0
,
0
,
0
,
sts
);
return
new
GdhrGetAttributeChar
(
0
,
0
,
0
,
0
,
sts
);
}
int
typeId
=
in
.
readInt
();
...
...
@@ -1624,7 +1647,30 @@ public class Gdh
}
catch
(
IOException
e
)
{
return
new
GdhrGetAttributeChar
(
0
,
0
,
0
,
0
,
__IO_EXCEPTION
);
return
new
GdhrGetAttributeChar
(
0
,
0
,
0
,
0
,
__IO_EXCEPTION
);
}
}
public
GdhrGetAttributeFlags
getAttributeFlags
(
String
attributeName
)
{
try
{
out
.
writeInt
(
GET_ATTRIBUTE_FLAGS
);
out
.
writeUTF
(
attributeName
);
out
.
flush
();
int
sts
=
in
.
readInt
();
if
(
sts
%
2
==
0
)
{
return
new
GdhrGetAttributeFlags
(
0
,
sts
);
}
int
flags
=
in
.
readInt
();
return
new
GdhrGetAttributeFlags
(
flags
,
sts
);
}
catch
(
IOException
e
)
{
return
new
GdhrGetAttributeFlags
(
0
,
__IO_EXCEPTION
);
}
}
...
...
src/doc/man/en_us/man_opg.dat
View file @
94e7ebf3
...
...
@@ -2778,6 +2778,7 @@ tolower() <LINK> tolower()
<h2>Database functions
GetAttribute() <LINK> getattribute()
SetAttribute() <LINK> setattribute()
GetChild() <LINK> getchild()
GetParent() <LINK> getparent()
GetNextSibling() <LINK> getnextsibling()
...
...
@@ -3748,6 +3749,7 @@ Database functions
<b>Function <t>Description
GetAttribute() <t>Get attribute value. <LINK> getattribute()
SetAttribute() <t>SGet attribute value. <LINK> setattribute()
GetChild() <t>Get object child. <LINK> getchild()
GetParent() <t>Get object parent. <LINK> getparent()
GetNextSibling()<t>Get object sibling. <LINK> getnextsibling()
...
...
@@ -3786,6 +3788,40 @@ int <t>status <t>status of operation. Returned. If zero, the
<c> say("Could not find motor on attribute!");
</TOPIC>
<TOPIC> setattribute() <style> function
SetAttribute()
int SetAttribute( string name, (arbitrary type)value [, int publicwrite])
<b>Description
Set the value of the specified attribute.
To set the value of a normal attribute the RtWrite privilege is required. It is
though possible to write to attributes defined as PublicWrite without this
privilege, if the publicwrite argument is added. PublicWrite attribute can be
found in the PublicAv, PublicIv and PublicDv classes.
Returns the status of the operation.
<b>Arguments
string <t>name <t>name of the attribute to write to.
<arbitrary type)<t>value <t>the value to set.
int <t>publicwrite <t>if 1, write to and attribute defined as PublicWrite
<t> <t>is allowed also without the RtWrite privilege.
<b>Example
<c> float value = 22.2;
<c> int sts;
<c> sts = SetAttribute("Roller-Motor-Reference.ActualValue", value);
<c> if ( !(sts & 1))
<c> printf( "SetAttribute error %d\n", sts);
<c> endif
</TOPIC>
<TOPIC> getchild() <style> function
GetChild()
...
...
src/doc/man/sv_se/man_opg.dat
View file @
94e7ebf3
...
...
@@ -2551,6 +2551,7 @@ tolower() <LINK> tolower()
<h2>Databas funktioner
GetAttribute() <LINK> getattribute()
SetAttribute() <LINK> setattribute()
GetChild() <LINK> getchild()
GetParent() <LINK> getparent()
GetNextSibling() <LINK> getnextsibling()
...
...
@@ -3511,6 +3512,7 @@ Databas funktioner
<b>Function <t>Description
GetAttribute() <t>Hämta värde för ett attribut. <LINK> getattribute()
SetAttribute() <t>Sätt värde på ett attribut. <LINK> setattribute()
GetChild() <t>Hämta barn till ett objekt. <LINK> getchild()
GetParent() <t>Hämta föräder till ett objekt. <LINK> getparent()
GetNextSibling()<t>Hämta syskon för ett objekt. <LINK> getnextsibling()
...
...
@@ -3549,6 +3551,40 @@ int <t>status <t>status f
<c> say("Could not find motor on attribute!");
</TOPIC>
<TOPIC> setattribute() <style> function
SetAttribute()
int SetAttribute( string name, (arbitrary type)value [, int publicwrite])
<b>Beskrivning
Sätt värdet på angivet attribut.
För att sätta värdet på ett vanligt attribut krävs RtWrite privilegiet. Det är
dock möjligt skriva till attribute som är definierade som PublicWrite även utan
detta privilegie, om publicwrite argumentet anges. PublicWrite attribut can bl a
hittas i klasserna PublicAv, PublicIv och PublicDv.
Returnerar status av operationen.
<b>Argument
string <t>name <t>namn på attributet som ska sättas.
<godtycklig typ)<t>value <t>värde som ska sättas.
int <t>publicwrite <t>om 1, skrivning till ett attribut definierad som PublicWrite
<t> <t>är tillåtet även utan RtWrite privilegiet.
<b>Exempel
<c> float value = 22.2;
<c> int sts;
<c> sts = SetAttribute("Roller-Motor-Reference.ActualValue", value);
<c> if ( !(sts & 1))
<c> printf( "SetAttribute error %d\n", sts);
<c> endif
</TOPIC>
<TOPIC> getchild() <style> function
GetChild()
...
...
src/exe/co_convert/src/cnv_readwbl.cpp
View file @
94e7ebf3
...
...
@@ -1327,7 +1327,7 @@ char *CnvReadWbl::flags_to_string( int value)
if
(
value
&
pwr_mAdef_rtvirtual
)
strcat
(
str
,
"Rtvirtual|"
);
if
(
value
&
pwr_mAdef_devbodyref
)
strcat
(
str
,
"Devbodyref|"
);
if
(
value
&
pwr_mAdef_dynamic
)
strcat
(
str
,
"Dynamic|"
);
if
(
value
&
pwr_mAdef_
objidself
)
strcat
(
str
,
"Objidself
|"
);
if
(
value
&
pwr_mAdef_
publicwrite
)
strcat
(
str
,
"PubicWrite
|"
);
if
(
value
&
pwr_mAdef_noedit
)
strcat
(
str
,
"Noedit|"
);
if
(
value
&
pwr_mAdef_invisible
)
strcat
(
str
,
"Invisible|"
);
if
(
value
&
pwr_mAdef_refdirect
)
strcat
(
str
,
"Refdirect|"
);
...
...
src/exp/inc/src/pwr_class.h
View file @
94e7ebf3
...
...
@@ -713,7 +713,7 @@ union pwr_m_Adef {
pwr_Bits
(
devbodyref
,
1
),
pwr_Bits
(
dynamic
,
1
),
pwr_Bits
(
objidself
,
1
),
pwr_Bits
(
publicwrite
,
1
),
pwr_Bits
(
noedit
,
1
),
pwr_Bits
(
invisible
,
1
),
pwr_Bits
(
refdirect
,
1
),
...
...
@@ -744,7 +744,7 @@ union pwr_m_Adef {
#define pwr_mAdef_rtvirtual pwr_Bit(6)
/* 64 */
#define pwr_mAdef_devbodyref pwr_Bit(7)
/* 128 */
#define pwr_mAdef_dynamic pwr_Bit(8)
/* 256 */
#define pwr_mAdef_
objidself
pwr_Bit(9)
/* 512 */
#define pwr_mAdef_
publicwrite
pwr_Bit(9)
/* 512 */
#define pwr_mAdef_noedit pwr_Bit(10)
/* 1024 */
#define pwr_mAdef_invisible pwr_Bit(11)
/* 2048 */
#define pwr_mAdef_refdirect pwr_Bit(12)
/* 4096 If an AttrRef should not give alue pointed to */
...
...
@@ -772,8 +772,7 @@ union pwr_m_Adef {
#define PWR_MASK_RTVIRTUAL pwr_mAdef_rtvirtual
#define PWR_MASK_DEVBODYREF pwr_mAdef_devbodyref
#define PWR_MASK_DYNAMIC pwr_mAdef_dynamic
#define PWR_MASK_OBJDIDSELF pwr_mAdef_objidself
#define PWR_MASK_OBJIDSELF pwr_mAdef_objidself
#define PWR_MASK_PUBLICWRITE pwr_mAdef_publicwrite
#define PWR_MASK_NOEDIT pwr_mAdef_noedit
#define PWR_MASK_INVISIBLE pwr_mAdef_invisible
#define PWR_MASK_REFDIRECT pwr_mAdef_refdirect
...
...
src/wbl/pwrb/src/pwrb_c_asup.wb_load
View file @
94e7ebf3
...
...
@@ -665,7 +665,6 @@ SObject pwrb:Class
!*/
Object TimerObjDId $Intern 35
Body SysBody
Attr Flags |= PWR_MASK_OBJDIDSELF
Attr Flags |= PWR_MASK_INVISIBLE
Attr TypeRef = "pwrs:Type-$Objid"
EndBody
...
...
src/wbl/pwrb/src/pwrb_c_asupcomp.wb_load
View file @
94e7ebf3
...
...
@@ -647,7 +647,6 @@ SObject pwrb:Class
!*/
Object TimerObjDId $Attribute 38
Body SysBody
Attr Flags |= PWR_MASK_OBJDIDSELF
Attr Flags |= PWR_MASK_INVISIBLE
Attr TypeRef = "pwrs:Type-$Objid"
EndBody
...
...
src/wbl/pwrb/src/pwrb_c_cyclesup.wb_load
View file @
94e7ebf3
...
...
@@ -612,7 +612,6 @@ SObject pwrb:Class
Object TimerObjDId $Attribute 42
Body SysBody
Attr TypeRef = "pwrs:Type-$Objid"
Attr Flags |= PWR_MASK_OBJDIDSELF
Attr Flags |= PWR_MASK_INVISIBLE
EndBody
EndObject
...
...
src/wbl/pwrb/src/pwrb_c_dorder.wb_load
View file @
94e7ebf3
...
...
@@ -114,7 +114,6 @@ SObject pwrb:Class
EndObject
Object TimerObjDId $Intern 9
Body SysBody
Attr Flags |= PWR_MASK_OBJDIDSELF
Attr Flags |= PWR_MASK_INVISIBLE
Attr TypeRef = "pwrs:Type-$Objid"
EndBody
...
...
src/wbl/pwrb/src/pwrb_c_drive.wb_load
View file @
94e7ebf3
...
...
@@ -589,7 +589,6 @@ SObject pwrb:Class
!*/
Object TimerObjDId $Intern 28
Body SysBody
Attr Flags |= PWR_MASK_OBJDIDSELF
Attr Flags |= PWR_MASK_INVISIBLE
Attr TypeRef = "pwrs:Type-$Objid"
EndBody
...
...
src/wbl/pwrb/src/pwrb_c_dsup.wb_load
View file @
94e7ebf3
...
...
@@ -627,7 +627,6 @@ SObject pwrb:Class
!*/
Object TimerObjDId $Intern 32
Body SysBody
Attr Flags |= PWR_MASK_OBJDIDSELF
Attr Flags |= PWR_MASK_INVISIBLE
Attr TypeRef = "pwrs:Type-$Objid"
EndBody
...
...
src/wbl/pwrb/src/pwrb_c_dsupcomp.wb_load
View file @
94e7ebf3
...
...
@@ -610,7 +610,6 @@ SObject pwrb:Class
!*/
Object TimerObjDId $Attribute 35
Body SysBody
Attr Flags |= PWR_MASK_OBJDIDSELF
Attr Flags |= PWR_MASK_INVISIBLE
Attr TypeRef = "pwrs:Type-$Objid"
EndBody
...
...
src/wbl/pwrb/src/pwrb_c_inc3p.wb_load
View file @
94e7ebf3
...
...
@@ -307,7 +307,6 @@ SObject pwrb:Class
!*/
Object TimerObjDId $Intern 16
Body SysBody
Attr Flags |= PWR_MASK_OBJDIDSELF
Attr Flags |= PWR_MASK_INVISIBLE
Attr TypeRef = "pwrs:Type-$Objid"
EndBody
...
...
src/wbl/pwrb/src/pwrb_c_lorder.wb_load
View file @
94e7ebf3
...
...
@@ -112,7 +112,6 @@ SObject pwrb:Class
EndObject
Object TimerObjDId $Intern 9
Body SysBody
Attr Flags |= PWR_MASK_OBJDIDSELF
Attr Flags |= PWR_MASK_INVISIBLE
Attr TypeRef = "pwrs:Type-$Objid"
EndBody
...
...
src/wbl/pwrb/src/pwrb_c_mvalve.wb_load
View file @
94e7ebf3
...
...
@@ -706,7 +706,6 @@ SObject pwrb:Class
!*/
Object TimerObjDId $Intern 37
Body SysBody
Attr Flags |= PWR_MASK_OBJDIDSELF
Attr Flags |= PWR_MASK_INVISIBLE
Attr TypeRef = "pwrs:Type-$Objid"
EndBody
...
...
src/wbl/pwrb/src/pwrb_c_nodelinksup.wb_load
View file @
94e7ebf3
...
...
@@ -571,7 +571,6 @@ SObject pwrb:Class
!*/
Object TimerObjDId $Intern 37
Body SysBody
Attr Flags |= PWR_MASK_OBJDIDSELF
Attr Flags |= PWR_MASK_INVISIBLE
Attr TypeRef = "pwrs:Type-$Objid"
EndBody
...
...
src/wbl/pwrb/src/pwrb_c_pos3p.wb_load
View file @
94e7ebf3
...
...
@@ -296,7 +296,6 @@ SObject pwrb:Class
!*/
Object TimerObjDId $Intern 16
Body SysBody
Attr Flags |= PWR_MASK_OBJDIDSELF
Attr Flags |= PWR_MASK_INVISIBLE
Attr TypeRef = "pwrs:Type-$Objid"
EndBody
...
...
src/wbl/pwrb/src/pwrb_c_posit.wb_load
View file @
94e7ebf3
...
...
@@ -347,7 +347,6 @@ SObject pwrb:Class
!*/
Object TimerObjDId $Intern 19
Body SysBody
Attr Flags |= PWR_MASK_OBJDIDSELF
Attr Flags |= PWR_MASK_INVISIBLE
Attr TypeRef = "pwrs:Type-$Objid"
EndBody
...
...
src/wbl/pwrb/src/pwrb_c_publicav.wb_load
0 → 100644
View file @
94e7ebf3
!
! Proview Open Source Process Control.
! Copyright (C) 2005-2015 SSAB EMEA AB.
!
! This file is part of Proview.
!
! This program is free software; you can redistribute it and/or
! modify it under the terms of the GNU General Public License as
! published by the Free Software Foundation, either version 2 of
! the License, or (at your option) any later version.
!
! This program is distributed in the hope that it will be useful
! but WITHOUT ANY WARRANTY; without even the implied warranty of
! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
! GNU General Public License for more details.
!
! You should have received a copy of the GNU General Public License
! along with Proview. If not, see <http://www.gnu.org/licenses/>
!
! Linking Proview statically or dynamically with other modules is
! making a combined work based on Proview. Thus, the terms and
! conditions of the GNU General Public License cover the whole
! combination.
!
! In addition, as a special exception, the copyright holders of
! Proview give you permission to, from the build function in the
! Proview Configurator, combine Proview with modules generated by the
! Proview PLC Editor to a PLC program, regardless of the license
! terms of these modules. You may copy and distribute the resulting
! combined work under the terms of your choice, provided that every
! copy of the combined work is accompanied by a complete copy of
! the source code of Proview (the version used to produce the
! combined work), being distributed under the terms of the GNU
! General Public License plus this exception.
!
! pwrb_c_publicav.wb_load -- Defines the class PublicAv.
!
SObject pwrb:Class
!/**
! @Version 1.0
! @Group Signals
! @Summary Analog value with public write access.
! Analog value with public write access.
!*/
Object PublicAv $ClassDef 677
Body SysBody
Attr Editor = pwr_eEditor_AttrEd
Attr Method = pwr_eMethod_Standard
EndBody
Object RtBody $ObjBodyDef 1
Body SysBody
Attr StructName = "PublicAv"
EndBody
!/**
! Optional description.
!*/
Object Description $Attribute 1
Body SysBody
Attr TypeRef = "pwrs:Type-$String80"
EndBody
EndObject
!/**
! Analog value.
!*/
Object ActualValue $Attribute 2
Body SysBody
Attr TypeRef = "pwrs:Type-$Float32"
Attr Flags |= PWR_MASK_PUBLICWRITE
EndBody
EndObject
EndObject
EndObject
EndSObject
src/wbl/pwrb/src/pwrb_c_publicdv.wb_load
0 → 100644
View file @
94e7ebf3
!
! Proview Open Source Process Control.
! Copyright (C) 2005-2015 SSAB EMEA AB.
!
! This file is part of Proview.
!
! This program is free software; you can redistribute it and/or
! modify it under the terms of the GNU General Public License as
! published by the Free Software Foundation, either version 2 of
! the License, or (at your option) any later version.
!
! This program is distributed in the hope that it will be useful
! but WITHOUT ANY WARRANTY; without even the implied warranty of
! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
! GNU General Public License for more details.
!
! You should have received a copy of the GNU General Public License
! along with Proview. If not, see <http://www.gnu.org/licenses/>
!
! Linking Proview statically or dynamically with other modules is
! making a combined work based on Proview. Thus, the terms and
! conditions of the GNU General Public License cover the whole
! combination.
!
! In addition, as a special exception, the copyright holders of
! Proview give you permission to, from the build function in the
! Proview Configurator, combine Proview with modules generated by the
! Proview PLC Editor to a PLC program, regardless of the license
! terms of these modules. You may copy and distribute the resulting
! combined work under the terms of your choice, provided that every
! copy of the combined work is accompanied by a complete copy of
! the source code of Proview (the version used to produce the
! combined work), being distributed under the terms of the GNU
! General Public License plus this exception.
!
! pwrb_c_publicdv.wb_load -- Defines the class PublicDv.
!
SObject pwrb:Class
!/**
! @Version 1.0
! @Group Signals
! @Summary Digital value with public write access.
! Digital value with public write access.
!*/
Object PublicDv $ClassDef 678
Body SysBody
Attr Editor = pwr_eEditor_AttrEd
Attr Method = pwr_eMethod_Standard
EndBody
Object RtBody $ObjBodyDef 1
Body SysBody
Attr StructName = "PublicDv"
EndBody
!/**
! Optional description.
!*/
Object Description $Attribute 1
Body SysBody
Attr TypeRef = "pwrs:Type-$String80"
EndBody
EndObject
!/**
! Analog value.
!*/
Object ActualValue $Attribute 2
Body SysBody
Attr TypeRef = "pwrs:Type-$Boolean"
Attr Flags |= PWR_MASK_PUBLICWRITE
EndBody
EndObject
EndObject
EndObject
EndSObject
src/wbl/pwrb/src/pwrb_c_publiciv.wb_load
0 → 100644
View file @
94e7ebf3
!
! Proview Open Source Process Control.
! Copyright (C) 2005-2015 SSAB EMEA AB.
!
! This file is part of Proview.
!
! This program is free software; you can redistribute it and/or
! modify it under the terms of the GNU General Public License as
! published by the Free Software Foundation, either version 2 of
! the License, or (at your option) any later version.
!
! This program is distributed in the hope that it will be useful
! but WITHOUT ANY WARRANTY; without even the implied warranty of
! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
! GNU General Public License for more details.
!
! You should have received a copy of the GNU General Public License
! along with Proview. If not, see <http://www.gnu.org/licenses/>
!
! Linking Proview statically or dynamically with other modules is
! making a combined work based on Proview. Thus, the terms and
! conditions of the GNU General Public License cover the whole
! combination.
!
! In addition, as a special exception, the copyright holders of
! Proview give you permission to, from the build function in the
! Proview Configurator, combine Proview with modules generated by the
! Proview PLC Editor to a PLC program, regardless of the license
! terms of these modules. You may copy and distribute the resulting
! combined work under the terms of your choice, provided that every
! copy of the combined work is accompanied by a complete copy of
! the source code of Proview (the version used to produce the
! combined work), being distributed under the terms of the GNU
! General Public License plus this exception.
!
! pwrb_c_publiciv.wb_load -- Defines the class PublicIv.
!
SObject pwrb:Class
!/**
! @Version 1.0
! @Group Signals
! @Summary Integer value with public write access.
! Integer value with public write access.
!*/
Object PublicIv $ClassDef 679
Body SysBody
Attr Editor = pwr_eEditor_AttrEd
Attr Method = pwr_eMethod_Standard
EndBody
Object RtBody $ObjBodyDef 1
Body SysBody
Attr StructName = "PublicIv"
EndBody
!/**
! Optional description.
!*/
Object Description $Attribute 1
Body SysBody
Attr TypeRef = "pwrs:Type-$String80"
EndBody
EndObject
!/**
! Integer value.
!*/
Object ActualValue $Attribute 2
Body SysBody
Attr TypeRef = "pwrs:Type-$Int32"
Attr Flags |= PWR_MASK_PUBLICWRITE
EndBody
EndObject
EndObject
EndObject
EndSObject
src/wbl/pwrb/src/pwrb_c_publicsv.wb_load
0 → 100644
View file @
94e7ebf3
!
! Proview Open Source Process Control.
! Copyright (C) 2005-2015 SSAB EMEA AB.
!
! This file is part of Proview.
!
! This program is free software; you can redistribute it and/or
! modify it under the terms of the GNU General Public License as
! published by the Free Software Foundation, either version 2 of
! the License, or (at your option) any later version.
!
! This program is distributed in the hope that it will be useful
! but WITHOUT ANY WARRANTY; without even the implied warranty of
! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
! GNU General Public License for more details.
!
! You should have received a copy of the GNU General Public License
! along with Proview. If not, see <http://www.gnu.org/licenses/>
!
! Linking Proview statically or dynamically with other modules is
! making a combined work based on Proview. Thus, the terms and
! conditions of the GNU General Public License cover the whole
! combination.
!
! In addition, as a special exception, the copyright holders of
! Proview give you permission to, from the build function in the
! Proview Configurator, combine Proview with modules generated by the
! Proview PLC Editor to a PLC program, regardless of the license
! terms of these modules. You may copy and distribute the resulting
! combined work under the terms of your choice, provided that every
! copy of the combined work is accompanied by a complete copy of
! the source code of Proview (the version used to produce the
! combined work), being distributed under the terms of the GNU
! General Public License plus this exception.
!
! pwrb_c_publicsv.wb_load -- Defines the class PublicSv.
!
SObject pwrb:Class
!/**
! @Version 1.0
! @Group Signals
! @Summary String value with public write access.
! String value with public write access.
!*/
Object PublicSv $ClassDef 680
Body SysBody
Attr Editor = pwr_eEditor_AttrEd
Attr Method = pwr_eMethod_Standard
EndBody
Object RtBody $ObjBodyDef 1
Body SysBody
Attr StructName = "PublicSv"
EndBody
!/**
! Optional description.
!*/
Object Description $Attribute 1
Body SysBody
Attr TypeRef = "pwrs:Type-$String80"
EndBody
EndObject
!/**
! String value.
!*/
Object ActualValue $Attribute 2
Body SysBody
Attr TypeRef = "pwrs:Type-$String80"
Attr Flags |= PWR_MASK_PUBLICWRITE
EndBody
EndObject
EndObject
EndObject
EndSObject
src/wbl/pwrb/src/pwrb_c_pulse.wb_load
View file @
94e7ebf3
...
...
@@ -194,7 +194,6 @@ SObject pwrb:Class
!*/
Object TimerObjDId $Intern 10
Body SysBody
Attr Flags |= PWR_MASK_OBJDIDSELF
Attr Flags |= PWR_MASK_INVISIBLE
Attr TypeRef = "pwrs:Type-$Objid"
EndBody
...
...
src/wbl/pwrb/src/pwrb_c_timer.wb_load
View file @
94e7ebf3
...
...
@@ -190,7 +190,6 @@ SObject pwrb:Class
!*/
Object TimerObjDId $Intern 10
Body SysBody
Attr Flags |= PWR_MASK_OBJDIDSELF
Attr Flags |= PWR_MASK_INVISIBLE
Attr TypeRef = "pwrs:Type-$Objid"
EndBody
...
...
src/wbl/pwrb/src/pwrb_c_valve.wb_load
View file @
94e7ebf3
...
...
@@ -557,7 +557,6 @@ SObject pwrb:Class
!*/
Object TimerObjDId $Intern 28
Body SysBody
Attr Flags |= PWR_MASK_OBJDIDSELF
Attr Flags |= PWR_MASK_INVISIBLE
Attr TypeRef = "pwrs:Type-$Objid"
EndBody
...
...
src/wbl/pwrb/src/pwrb_c_wait.wb_load
View file @
94e7ebf3
...
...
@@ -187,7 +187,6 @@ SObject pwrb:Class
!*/
Object TimerObjDId $Intern 10
Body SysBody
Attr Flags |= PWR_MASK_OBJDIDSELF
Attr Flags |= PWR_MASK_INVISIBLE
Attr TypeRef = "pwrs:Type-$Objid"
EndBody
...
...
src/wbl/pwrb/src/pwrb_c_waith.wb_load
View file @
94e7ebf3
...
...
@@ -230,7 +230,6 @@ SObject pwrb:Class
!*/
Object TimerObjDId $Intern 12
Body SysBody
Attr Flags |= PWR_MASK_OBJDIDSELF
Attr Flags |= PWR_MASK_INVISIBLE
Attr TypeRef = "pwrs:Type-$Objid"
EndBody
...
...
src/wbl/pwrs/src/pwrs_td_adefflags.wb_load
View file @
94e7ebf3
...
...
@@ -152,12 +152,12 @@ SObject pwrs:Type
EndBody
EndObject
!/**
! The attrib
tute contains the objects own objid
.
! The attrib
ute can be written without write privileges
.
!*/
Object
ObjidSelf
$Bit
Object
PublicWrite
$Bit
Body SysBody
Attr PgmName = "
objidself
"
Attr Text = "
ObjidSelf
"
Attr PgmName = "
publicwrite
"
Attr Text = "
PublicWrite
"
Attr Value = 512
EndBody
EndObject
...
...
wb/lib/wb/src/wb_wblnode.cpp
View file @
94e7ebf3
...
...
@@ -314,8 +314,7 @@ static wbl_sSym attr_flags[] =
,{
"PWR_MASK_RTVIRTUAL"
,
PWR_MASK_RTVIRTUAL
}
,{
"PWR_MASK_DEVBODYREF"
,
PWR_MASK_DEVBODYREF
}
,{
"PWR_MASK_DYNAMIC"
,
PWR_MASK_DYNAMIC
}
,{
"PWR_MASK_OBJDIDSELF"
,
PWR_MASK_OBJDIDSELF
}
,{
"PWR_MASK_OBJIDSELF"
,
PWR_MASK_OBJIDSELF
}
,{
"PWR_MASK_PUBLICWRITE"
,
PWR_MASK_PUBLICWRITE
}
,{
"PWR_MASK_NOEDIT"
,
PWR_MASK_NOEDIT
}
,{
"PWR_MASK_INVISIBLE"
,
PWR_MASK_INVISIBLE
}
,{
"PWR_MASK_REFDIRECT"
,
PWR_MASK_REFDIRECT
}
...
...
xtt/lib/xtt/src/xtt_xnav_command.cpp
View file @
94e7ebf3
This diff is collapsed.
Click to expand it.
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