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
c64f5ec8
Commit
c64f5ec8
authored
Sep 12, 2012
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Xtt operator log configured in OpPlace object, attribute Options
parent
d1102104
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
122 additions
and
3 deletions
+122
-3
src/wbl/pwrb/src/pwrb_c_opplace.wb_load
src/wbl/pwrb/src/pwrb_c_opplace.wb_load
+12
-0
src/wbl/pwrb/src/pwrb_td_opplaceoptionsmask.wb_load
src/wbl/pwrb/src/pwrb_td_opplaceoptionsmask.wb_load
+79
-0
xtt/lib/xtt/src/xtt_log.h
xtt/lib/xtt/src/xtt_log.h
+1
-1
xtt/lib/xtt/src/xtt_xnav.cpp
xtt/lib/xtt/src/xtt_xnav.cpp
+9
-0
xtt/lib/xtt/src/xtt_xnav_command.cpp
xtt/lib/xtt/src/xtt_xnav_command.cpp
+21
-2
No files found.
src/wbl/pwrb/src/pwrb_c_opplace.wb_load
View file @
c64f5ec8
...
...
@@ -206,6 +206,18 @@ SObject pwrb:Class
EndBody
EndObject
!/**
! Operatorplace options.
! - OperatorLog will turn on the operator logging when rt_xtt is started.
! The logging is stored in $pwrp_log/xtt_'opplace'.log
! - OperatorExendedLog will also store all mouse and motion events in the
! logfile.
!*/
Object Options $Attribute 47
Body SysBody
Attr TypeRef = "pwrb:Type-OpPlaceOptionsMask"
EndBody
EndObject
!/**
! Specifies the maximum number of contemporary alarms in
! the user's alarm list.
! The number should exceed the maximum number of
...
...
src/wbl/pwrb/src/pwrb_td_opplaceoptionsmask.wb_load
0 → 100644
View file @
c64f5ec8
!
! Proview Open Source Process Control.
! Copyright (C) 2005-2012 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_opplaceoptionsmask.wb_load -- Defines the mask type OpPlaceOptionsMask
!
SObject pwrb:Type
!/**
! @Version 1.0
! @Group Types
! Bitmask for opplace options.
!
! @b See also
! @classlink OpPlace pwrb_opplace.html
!*/
Object OpPlaceOptionsMask $TypeDef 66
Body SysBody
Attr Type = pwr_eType_Mask
Attr Size = 4
Attr TypeRef = "pwrs:Type-$Mask"
Attr Elements = 1
EndBody
!/**
! Activate operator log
!*/
Object OperatorLog $Bit
Body SysBody
Attr PgmName = "OperatorLog"
Attr Text = "OperatorLog"
Attr Value = 1
EndBody
EndObject
!/**
! Also store mouse and motion events in the operator log.
!*/
Object OperatorExtendedLog $Bit
Body SysBody
Attr PgmName = "OperatorExtendedLog"
Attr Text = "OperatorExtendedLog"
Attr Value = 2
EndBody
EndObject
EndObject
EndSObject
xtt/lib/xtt/src/xtt_log.h
View file @
c64f5ec8
...
...
@@ -40,7 +40,7 @@
#include "pwr.h"
#include "cow_log.h"
#define xttlog_cLogFile "$pwrp_log/xtt.log"
#define xttlog_cLogFile "$pwrp_log/xtt
_%s
.log"
typedef
enum
{
xttlog_eCategory_
,
...
...
xtt/lib/xtt/src/xtt_xnav.cpp
View file @
c64f5ec8
...
...
@@ -3675,6 +3675,15 @@ int XNav::init_brow_base_cb( FlowCtx *fctx, void *client_data)
else
xnav
->
login
();
if
(
xnav
->
opplace_p
&&
(
xnav
->
opplace_p
->
Options
&
pwr_mOpPlaceOptionsMask_OperatorLog
||
xnav
->
opplace_p
->
Options
&
pwr_mOpPlaceOptionsMask_OperatorExtendedLog
))
{
pwr_tCmd
cmd
;
strcpy
(
cmd
,
"oplog start"
);
if
(
xnav
->
opplace_p
->
Options
&
pwr_mOpPlaceOptionsMask_OperatorExtendedLog
)
strcat
(
cmd
,
" /event"
);
xnav
->
command
(
cmd
);
}
// Execute the setup script
xnav
->
gbl
.
setupscript_exec
(
xnav
);
...
...
xtt/lib/xtt/src/xtt_xnav_command.cpp
View file @
c64f5ec8
...
...
@@ -6047,6 +6047,7 @@ static int xnav_oplog_func(void *client_data,
char
arg1_str
[
80
];
int
arg1_sts
;
pwr_tCmd
cmd
;
arg1_sts
=
dcli_get_qualifier
(
"dcli_arg1"
,
arg1_str
,
sizeof
(
arg1_str
));
...
...
@@ -6056,7 +6057,18 @@ static int xnav_oplog_func(void *client_data,
int
event
=
ODD
(
dcli_get_qualifier
(
"/EVENT"
,
0
,
0
));
if
(
EVEN
(
dcli_get_qualifier
(
"/FILE"
,
file_str
,
sizeof
(
file_str
))))
{
strcpy
(
file_str
,
xttlog_cLogFile
);
char
*
s
;
if
(
(
s
=
strrchr
(
xnav
->
opplace_name
,
'-'
)))
s
++
;
else
s
=
xnav
->
opplace_name
;
sprintf
(
file_str
,
xttlog_cLogFile
,
cdh_Low
(
s
));
// Save any previous file with this name
sprintf
(
cmd
,
"pwrp_env.sh save file %s"
,
file_str
);
system
(
cmd
);
}
if
(
event
)
...
...
@@ -6083,7 +6095,14 @@ static int xnav_oplog_func(void *client_data,
int
pid
;
if
(
EVEN
(
dcli_get_qualifier
(
"/FILE"
,
file_str
,
sizeof
(
file_str
))))
{
strcpy
(
file_str
,
xttlog_cLogFile
);
char
*
s
;
if
(
(
s
=
strrchr
(
xnav
->
opplace_name
,
'-'
)))
s
++
;
else
s
=
xnav
->
opplace_name
;
sprintf
(
file_str
,
xttlog_cLogFile
,
cdh_Low
(
s
));
}
if
(
ODD
(
dcli_get_qualifier
(
"/SPEED"
,
speed_str
,
sizeof
(
speed_str
))))
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment