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
6934ff89
Commit
6934ff89
authored
Jun 18, 2009
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More 64 bit corrections
parent
a6142d98
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
89 additions
and
77 deletions
+89
-77
bcomp/lib/rt/src/rt_plc_bcomp.c
bcomp/lib/rt/src/rt_plc_bcomp.c
+1
-1
java/exe/jpwr_rt_gdh/src/jpwr_rt_gdh.c
java/exe/jpwr_rt_gdh/src/jpwr_rt_gdh.c
+2
-0
java/exe/jpwr_rt_gdh/src/jpwr_rt_hist.cpp
java/exe/jpwr_rt_gdh/src/jpwr_rt_hist.cpp
+8
-8
java/exe/jpwr_rt_gdh/src/jpwr_rt_mh.c
java/exe/jpwr_rt_gdh/src/jpwr_rt_mh.c
+13
-11
othermanu/wbl/mcomp/src/othermanufacturer.wb_load
othermanu/wbl/mcomp/src/othermanufacturer.wb_load
+11
-5
src/exe/rt_elog/src/os_linux/rt_elog.c
src/exe/rt_elog/src/os_linux/rt_elog.c
+2
-2
src/exe/rt_emon/src/rt_emon.c
src/exe/rt_emon/src/rt_emon.c
+12
-12
src/lib/rt/src/rt_mh_outunit.c
src/lib/rt/src/rt_mh_outunit.c
+1
-1
src/lib/rt/src/rt_plc_macro_sup.h
src/lib/rt/src/rt_plc_macro_sup.h
+4
-4
wb/lib/wb/src/wb_build.cpp
wb/lib/wb/src/wb_build.cpp
+10
-8
xtt/lib/xtt/src/xtt_evlist.cpp
xtt/lib/xtt/src/xtt_evlist.cpp
+25
-25
No files found.
bcomp/lib/rt/src/rt_plc_bcomp.c
View file @
6934ff89
...
@@ -391,7 +391,7 @@ void CompOnOffBurnerFo_exec( plc_sThread *tp,
...
@@ -391,7 +391,7 @@ void CompOnOffBurnerFo_exec( plc_sThread *tp,
pwr_tFloat32
Cnt
;
pwr_tFloat32
Cnt
;
zono
=
(
pwr_sClass_CompOnOffZoneFo
*
)
zono
=
(
pwr_sClass_CompOnOffZoneFo
*
)
((
char
*
)
o
->
InP
-
sizeof
(
pwr_tAttrRef
)
-
24
);
((
char
*
)
o
->
InP
-
(
sizeof
(
pwr_sClass_CompOnOffZoneFo
)
-
pwr_AlignLW
(
sizeof
(
pwr_tFloat32
)))
);
zonco
=
(
pwr_sClass_CompOnOffZone
*
)
zono
->
PlcConnectP
;
zonco
=
(
pwr_sClass_CompOnOffZone
*
)
zono
->
PlcConnectP
;
if
(
!
co
||
!
zonco
)
if
(
!
co
||
!
zonco
)
...
...
java/exe/jpwr_rt_gdh/src/jpwr_rt_gdh.c
View file @
6934ff89
...
@@ -50,8 +50,10 @@ typedef struct {
...
@@ -50,8 +50,10 @@ typedef struct {
pwr_tRefId
refid
;
pwr_tRefId
refid
;
}
sJid
;
}
sJid
;
#if defined OS_LINUX && defined HW_X86_64
static
tree_sTable
*
jid_table
=
0
;
static
tree_sTable
*
jid_table
=
0
;
static
int
jid_next
=
1
;
static
int
jid_next
=
1
;
#endif
static
int
gdh_ExtractNameSuffix
(
char
*
Name
,
static
int
gdh_ExtractNameSuffix
(
char
*
Name
,
char
**
Suffix
);
char
**
Suffix
);
...
...
java/exe/jpwr_rt_gdh/src/jpwr_rt_hist.cpp
View file @
6934ff89
...
@@ -530,8 +530,8 @@ jobject convertAlarmOrInfoToMhrEvent( mh_sMessage *MsgP)
...
@@ -530,8 +530,8 @@ jobject convertAlarmOrInfoToMhrEvent( mh_sMessage *MsgP)
char
birthTime_str
[
40
];
char
birthTime_str
[
40
];
pwr_tObjid
objid
=
MsgP
->
Info
.
Object
;
pwr_tObjid
objid
=
MsgP
->
Info
.
Object
;
pwr_tTime
time
=
MsgP
->
Info
.
EventTime
;
pwr_tTime
time
=
net_NetTimeToTime
(
&
MsgP
->
Info
.
EventTime
)
;
pwr_tTime
birthTime
=
MsgP
->
Info
.
Id
.
BirthTime
;
pwr_tTime
birthTime
=
net_NetTimeToTime
(
&
MsgP
->
Info
.
Id
.
BirthTime
)
;
//hmta enviormentpekaren
//hmta enviormentpekaren
jvm
->
AttachCurrentThread
((
void
**
)
&
env
,
NULL
);
jvm
->
AttachCurrentThread
((
void
**
)
&
env
,
NULL
);
...
@@ -618,9 +618,9 @@ jobject convertReturnToMhrEvent( mh_sReturn *MsgP)
...
@@ -618,9 +618,9 @@ jobject convertReturnToMhrEvent( mh_sReturn *MsgP)
char
birthTime_str
[
40
];
char
birthTime_str
[
40
];
pwr_tObjid
objid
=
MsgP
->
Info
.
Object
;
pwr_tObjid
objid
=
MsgP
->
Info
.
Object
;
pwr_tTime
time
=
MsgP
->
Info
.
EventTime
;
pwr_tTime
time
=
net_NetTimeToTime
(
&
MsgP
->
Info
.
EventTime
)
;
pwr_tTime
birthTime
=
MsgP
->
Info
.
Id
.
BirthTime
;
pwr_tTime
birthTime
=
net_NetTimeToTime
(
&
MsgP
->
Info
.
Id
.
BirthTime
)
;
pwr_tTime
targetBirthTime
=
MsgP
->
TargetId
.
BirthTime
;
pwr_tTime
targetBirthTime
=
net_NetTimeToTime
(
&
MsgP
->
TargetId
.
BirthTime
)
;
//hmta enviormentpekaren
//hmta enviormentpekaren
jvm
->
AttachCurrentThread
((
void
**
)
&
env
,
NULL
);
jvm
->
AttachCurrentThread
((
void
**
)
&
env
,
NULL
);
...
@@ -710,9 +710,9 @@ jobject convertAckToMhrEvent( mh_sAck *MsgP)
...
@@ -710,9 +710,9 @@ jobject convertAckToMhrEvent( mh_sAck *MsgP)
char
birthTime_str
[
40
];
char
birthTime_str
[
40
];
pwr_tObjid
objid
=
MsgP
->
Info
.
SupObject
;
pwr_tObjid
objid
=
MsgP
->
Info
.
SupObject
;
pwr_tTime
time
=
MsgP
->
Info
.
EventTime
;
pwr_tTime
time
=
net_NetTimeToTime
(
&
MsgP
->
Info
.
EventTime
)
;
pwr_tTime
birthTime
=
MsgP
->
Info
.
Id
.
BirthTime
;
pwr_tTime
birthTime
=
net_NetTimeToTime
(
&
MsgP
->
Info
.
Id
.
BirthTime
)
;
pwr_tTime
targetBirthTime
=
MsgP
->
TargetId
.
BirthTime
;
pwr_tTime
targetBirthTime
=
net_NetTimeToTime
(
&
MsgP
->
TargetId
.
BirthTime
)
;
//hmta enviormentpekaren
//hmta enviormentpekaren
jvm
->
AttachCurrentThread
((
void
**
)
&
env
,
NULL
);
jvm
->
AttachCurrentThread
((
void
**
)
&
env
,
NULL
);
...
...
java/exe/jpwr_rt_gdh/src/jpwr_rt_mh.c
View file @
6934ff89
...
@@ -76,6 +76,7 @@ JNIEXPORT jobject JNICALL Java_jpwr_rt_Mh_outunitAck
...
@@ -76,6 +76,7 @@ JNIEXPORT jobject JNICALL Java_jpwr_rt_Mh_outunitAck
jfieldID
idx_fid
;
jfieldID
idx_fid
;
jfieldID
birthTime_fid
;
jfieldID
birthTime_fid
;
jclass
mhrsEventId_class
;
jclass
mhrsEventId_class
;
pwr_tTime
t
;
jclass
pwrtStatus_id
=
NULL
;
jclass
pwrtStatus_id
=
NULL
;
static
jmethodID
pwrtStatus_cid
=
NULL
;
static
jmethodID
pwrtStatus_cid
=
NULL
;
...
@@ -145,7 +146,8 @@ JNIEXPORT jobject JNICALL Java_jpwr_rt_Mh_outunitAck
...
@@ -145,7 +146,8 @@ JNIEXPORT jobject JNICALL Java_jpwr_rt_Mh_outunitAck
sts
=
-
1
;
//out of memory
sts
=
-
1
;
//out of memory
}
}
time_AsciiToA
(
str_copy
,
&
eventId
.
BirthTime
);
t
=
net_NetTimeToTime
(
&
eventId
.
BirthTime
);
time_AsciiToA
(
str_copy
,
&
t
);
sts
=
mh_OutunitAck
(
&
eventId
);
sts
=
mh_OutunitAck
(
&
eventId
);
(
*
env
)
->
ReleaseStringUTFChars
(
env
,
jstr
,
str_copy
);
(
*
env
)
->
ReleaseStringUTFChars
(
env
,
jstr
,
str_copy
);
...
@@ -319,9 +321,9 @@ pwr_tStatus ev_mh_ack_bc( mh_sAck *MsgP)
...
@@ -319,9 +321,9 @@ pwr_tStatus ev_mh_ack_bc( mh_sAck *MsgP)
char
birthTime_str
[
40
];
char
birthTime_str
[
40
];
pwr_tObjid
objid
=
MsgP
->
Info
.
SupObject
;
pwr_tObjid
objid
=
MsgP
->
Info
.
SupObject
;
pwr_tTime
time
=
MsgP
->
Info
.
EventTime
;
pwr_tTime
time
=
net_NetTimeToTime
(
&
MsgP
->
Info
.
EventTime
)
;
pwr_tTime
birthTime
=
MsgP
->
Info
.
Id
.
BirthTime
;
pwr_tTime
birthTime
=
net_NetTimeToTime
(
&
MsgP
->
Info
.
Id
.
BirthTime
)
;
pwr_tTime
targetBirthTime
=
MsgP
->
TargetId
.
BirthTime
;
pwr_tTime
targetBirthTime
=
net_NetTimeToTime
(
&
MsgP
->
TargetId
.
BirthTime
)
;
//hmta enviormentpekaren
//hmta enviormentpekaren
(
*
jvm
)
->
AttachCurrentThread
(
jvm
,(
void
**
)
&
env
,
NULL
);
(
*
jvm
)
->
AttachCurrentThread
(
jvm
,(
void
**
)
&
env
,
NULL
);
...
@@ -406,9 +408,9 @@ pwr_tStatus ev_mh_return_bc( mh_sReturn *MsgP)
...
@@ -406,9 +408,9 @@ pwr_tStatus ev_mh_return_bc( mh_sReturn *MsgP)
char
birthTime_str
[
40
];
char
birthTime_str
[
40
];
pwr_tObjid
objid
=
MsgP
->
Info
.
Object
;
pwr_tObjid
objid
=
MsgP
->
Info
.
Object
;
pwr_tTime
time
=
MsgP
->
Info
.
EventTime
;
pwr_tTime
time
=
net_NetTimeToTime
(
&
MsgP
->
Info
.
EventTime
)
;
pwr_tTime
birthTime
=
MsgP
->
Info
.
Id
.
BirthTime
;
pwr_tTime
birthTime
=
net_NetTimeToTime
(
&
MsgP
->
Info
.
Id
.
BirthTime
)
;
pwr_tTime
targetBirthTime
=
MsgP
->
TargetId
.
BirthTime
;
pwr_tTime
targetBirthTime
=
net_NetTimeToTime
(
&
MsgP
->
TargetId
.
BirthTime
)
;
//hmta enviormentpekaren
//hmta enviormentpekaren
(
*
jvm
)
->
AttachCurrentThread
(
jvm
,(
void
**
)
&
env
,
NULL
);
(
*
jvm
)
->
AttachCurrentThread
(
jvm
,(
void
**
)
&
env
,
NULL
);
...
@@ -491,8 +493,8 @@ pwr_tStatus ev_mh_alarm_bc( mh_sMessage *MsgP)
...
@@ -491,8 +493,8 @@ pwr_tStatus ev_mh_alarm_bc( mh_sMessage *MsgP)
char
birthTime_str
[
40
];
char
birthTime_str
[
40
];
pwr_tObjid
objid
=
MsgP
->
Info
.
Object
;
pwr_tObjid
objid
=
MsgP
->
Info
.
Object
;
pwr_tTime
time
=
MsgP
->
Info
.
EventTime
;
pwr_tTime
time
=
net_NetTimeToTime
(
&
MsgP
->
Info
.
EventTime
)
;
pwr_tTime
birthTime
=
MsgP
->
Info
.
Id
.
BirthTime
;
pwr_tTime
birthTime
=
net_NetTimeToTime
(
&
MsgP
->
Info
.
Id
.
BirthTime
)
;
//hmta enviormentpekaren
//hmta enviormentpekaren
(
*
jvm
)
->
AttachCurrentThread
(
jvm
,(
void
**
)
&
env
,
NULL
);
(
*
jvm
)
->
AttachCurrentThread
(
jvm
,(
void
**
)
&
env
,
NULL
);
...
@@ -569,8 +571,8 @@ pwr_tStatus ev_mh_info_bc( mh_sMessage *MsgP)
...
@@ -569,8 +571,8 @@ pwr_tStatus ev_mh_info_bc( mh_sMessage *MsgP)
char
birthTime_str
[
40
];
char
birthTime_str
[
40
];
pwr_tObjid
objid
=
MsgP
->
Info
.
Object
;
pwr_tObjid
objid
=
MsgP
->
Info
.
Object
;
pwr_tTime
time
=
MsgP
->
Info
.
EventTime
;
pwr_tTime
time
=
net_NetTimeToTime
(
&
MsgP
->
Info
.
EventTime
)
;
pwr_tTime
birthTime
=
MsgP
->
Info
.
Id
.
BirthTime
;
pwr_tTime
birthTime
=
net_NetTimeToTime
(
&
MsgP
->
Info
.
Id
.
BirthTime
)
;
//hmta enviormentpekaren
//hmta enviormentpekaren
(
*
jvm
)
->
AttachCurrentThread
(
jvm
,(
void
**
)
&
env
,
NULL
);
(
*
jvm
)
->
AttachCurrentThread
(
jvm
,(
void
**
)
&
env
,
NULL
);
...
...
othermanu/wbl/mcomp/src/othermanufacturer.wb_load
View file @
6934ff89
...
@@ -1064,9 +1064,11 @@ Volume OtherManufacturer $ClassVolume 0.0.250.1
...
@@ -1064,9 +1064,11 @@ Volume OtherManufacturer $ClassVolume 0.0.250.1
! A pointer to the status word in the profibus module object.
! A pointer to the status word in the profibus module object.
!*/
!*/
Object IoStatus $Attribute 38 03-OCT-2007 10:47:30.26
Object IoStatus $Attribute 38 03-OCT-2007 10:47:30.26
Body SysBody
08-OCT-2007 13:05:34.49
Body SysBody
16-JUN-2009 17:16:40.60
Attr PgmName = "IoStatus"
Attr PgmName = "IoStatus"
Attr Size = 4
Attr Flags = 1041
Attr Flags = 1041
Attr ParamIndex = 48
Attr TypeRef = "pwrs:Type-$Status"
Attr TypeRef = "pwrs:Type-$Status"
EndBody
EndBody
EndObject
EndObject
...
@@ -11349,7 +11351,7 @@ XS : activa alarms
...
@@ -11349,7 +11351,7 @@ XS : activa alarms
EndObject
EndObject
Object GetIpPtr27 GetIpPtr 1258 04-OCT-2007 13:18:38.36
Object GetIpPtr27 GetIpPtr 1258 04-OCT-2007 13:18:38.36
Body RtBody 04-OCT-2007 13:18:55.87
Body RtBody 04-OCT-2007 13:18:55.87
Attr IpPtrObject = "$PlcMain:OtherManufacturer-Class-Eurotherm_TC3001
.IoStatus
"
Attr IpPtrObject = "$PlcMain:OtherManufacturer-Class-Eurotherm_TC3001"
EndBody
EndBody
Body DevBody 12-OCT-2007 16:51:57.96
Body DevBody 12-OCT-2007 16:51:57.96
Buffer PlcNode
Buffer PlcNode
...
@@ -14884,7 +14886,7 @@ else
...
@@ -14884,7 +14886,7 @@ else
EndObject
EndObject
Object StoIpPtr3 StoIpPtr 1324 05-OCT-2007 10:52:49.91
Object StoIpPtr3 StoIpPtr 1324 05-OCT-2007 10:52:49.91
Body RtBody 05-OCT-2007 10:53:15.22
Body RtBody 05-OCT-2007 10:53:15.22
Attr IpPtrObject = "$PlcMain:OtherManufacturer-Class-Eurotherm_TC3001
.IoStatus
"
Attr IpPtrObject = "$PlcMain:OtherManufacturer-Class-Eurotherm_TC3001"
EndBody
EndBody
Body DevBody 11-OCT-2007 17:14:19.59
Body DevBody 11-OCT-2007 17:14:19.59
Buffer PlcNode
Buffer PlcNode
...
@@ -24063,9 +24065,11 @@ Eurotherm TC3001 Aggregate
...
@@ -24063,9 +24065,11 @@ Eurotherm TC3001 Aggregate
EndBody
EndBody
EndObject
EndObject
Object IoStatus $Attribute 36 26-MAR-2007 09:07:46.99
Object IoStatus $Attribute 36 26-MAR-2007 09:07:46.99
Body SysBody
26-MAR-2007 09:08:20.20
Body SysBody
16-JUN-2009 17:22:48.85
Attr PgmName = "IoStatus"
Attr PgmName = "IoStatus"
Attr Size = 4
Attr Flags = 1
Attr Flags = 1
Attr ParamIndex = 40
Attr TypeRef = "pwrs:Type-$Status"
Attr TypeRef = "pwrs:Type-$Status"
EndBody
EndBody
EndObject
EndObject
...
@@ -24461,9 +24465,11 @@ Eurotherm TC3001 Aggregate
...
@@ -24461,9 +24465,11 @@ Eurotherm TC3001 Aggregate
EndBody
EndBody
EndObject
EndObject
Object IoStatus $Attribute 44 30-MAR-2007 14:36:26.29
Object IoStatus $Attribute 44 30-MAR-2007 14:36:26.29
Body SysBody
30-MAR-2007 14:36:26.29
Body SysBody
16-JUN-2009 17:23:25.33
Attr PgmName = "IoStatus"
Attr PgmName = "IoStatus"
Attr Size = 4
Attr Flags = 1
Attr Flags = 1
Attr ParamIndex = 48
Attr TypeRef = "pwrs:Type-$Status"
Attr TypeRef = "pwrs:Type-$Status"
EndBody
EndBody
EndObject
EndObject
src/exe/rt_elog/src/os_linux/rt_elog.c
View file @
6934ff89
...
@@ -235,7 +235,7 @@ Insert (
...
@@ -235,7 +235,7 @@ Insert (
memset
(
&
data
,
0
,
sizeof
(
data
));
memset
(
&
data
,
0
,
sizeof
(
data
));
eventKey
.
Id
=
ip
->
Id
;
eventKey
.
Id
=
ip
->
Id
;
eventKey
.
EventTime
=
ip
->
EventTime
;
eventKey
.
EventTime
=
net_NetTimeToTime
(
&
ip
->
EventTime
)
;
/* copy the data do the DBT-structs*/
/* copy the data do the DBT-structs*/
key
.
data
=
(
void
*
)
&
eventKey
;
key
.
data
=
(
void
*
)
&
eventKey
;
...
@@ -426,7 +426,7 @@ CopyEvent (
...
@@ -426,7 +426,7 @@ CopyEvent (
sp
=
malloc
(
sizeof
(
sEvent
));
sp
=
malloc
(
sizeof
(
sEvent
));
sp
->
EventType
=
ip
->
EventType
;
sp
->
EventType
=
ip
->
EventType
;
sp
->
EventTime
=
ip
->
EventTime
;
sp
->
EventTime
=
net_NetTimeToTime
(
&
ip
->
EventTime
)
;
switch
(
ip
->
EventType
)
{
switch
(
ip
->
EventType
)
{
case
mh_eEvent_Alarm
:
case
mh_eEvent_Alarm
:
...
...
src/exe/rt_emon/src/rt_emon.c
View file @
6934ff89
...
@@ -276,19 +276,19 @@ struct s_SupActive {
...
@@ -276,19 +276,19 @@ struct s_SupActive {
};
};
struct
s_ASup
{
struct
s_ASup
{
pwr_tFloat32
*
InP
;
pwr_tFloat32
*
InP
pwr_dAlignLW
;
pwr_tFloat32
In
;
pwr_tFloat32
In
pwr_dAlignLW
;
sSup
Sup
;
sSup
Sup
pwr_dAlignLW
;
mh_sASupInfo
Info
;
mh_sASupInfo
Info
pwr_dAlignW
;
sTimer
Timer
;
sTimer
Timer
pwr_dAlignLW
;
};
};
struct
s_DSup
{
struct
s_DSup
{
pwr_tBoolean
*
InP
;
pwr_tBoolean
*
InP
pwr_dAlignLW
;
pwr_tBoolean
In
;
pwr_tBoolean
In
pwr_dAlignLW
;
sSup
Sup
;
sSup
Sup
pwr_dAlignLW
;
mh_sDSupInfo
Info
;
mh_sDSupInfo
Info
pwr_dAlignW
;
sTimer
Timer
;
sTimer
Timer
pwr_dAlignLW
;
};
};
struct
s_ApplActive
{
struct
s_ApplActive
{
...
@@ -2843,7 +2843,7 @@ isValidApplication (
...
@@ -2843,7 +2843,7 @@ isValidApplication (
}
else
{
}
else
{
ap
=
LstObj
(
al
);
ap
=
LstObj
(
al
);
if
(
memcmp
(
&
ap
->
birthTime
,
&
hp
->
birthTime
,
sizeof
(
ap
->
birthTime
))
!=
0
)
{
if
(
ap
->
birthTime
.
tv_sec
!=
hp
->
birthTime
.
tv_sec
)
{
/* Different times, i.e. the application is restarted */
/* Different times, i.e. the application is restarted */
ap
->
link
.
source
=
mh_eSource_Application
;
ap
->
link
.
source
=
mh_eSource_Application
;
ap
->
link
.
qid
=
hp
->
qid
;
ap
->
link
.
qid
=
hp
->
qid
;
...
@@ -2906,7 +2906,7 @@ isValidOutunit (
...
@@ -2906,7 +2906,7 @@ isValidOutunit (
}
else
{
}
else
{
op
=
LstObj
(
ol
);
op
=
LstObj
(
ol
);
if
(
memcmp
(
&
op
->
birthTime
,
&
hp
->
birthTime
,
sizeof
(
op
->
birthTime
))
!=
0
)
{
if
(
op
->
birthTime
.
tv_sec
!=
hp
->
birthTime
.
tv_sec
)
{
/* Different times, i.e. the outunit is restarted */
/* Different times, i.e. the outunit is restarted */
op
->
link
.
source
=
mh_eSource_Outunit
;
op
->
link
.
source
=
mh_eSource_Outunit
;
op
->
link
.
qid
=
hp
->
qid
;
op
->
link
.
qid
=
hp
->
qid
;
...
...
src/lib/rt/src/rt_mh_outunit.c
View file @
6934ff89
...
@@ -939,7 +939,7 @@ isValidHandler (
...
@@ -939,7 +939,7 @@ isValidHandler (
}
else
{
}
else
{
hp
=
LstObj
(
hl
);
hp
=
LstObj
(
hl
);
if
(
memcmp
(
&
hp
->
birthTime
,
&
p
->
birthTime
,
sizeof
(
hp
->
birthTime
))
!=
0
)
{
if
(
hp
->
birthTime
.
tv_sec
!=
p
->
birthTime
.
tv_sec
)
{
/* Different times, i.e. the handler is restarted */
/* Different times, i.e. the handler is restarted */
hp
->
birthTime
=
net_NetTimeToTime
(
&
p
->
birthTime
);
hp
->
birthTime
=
net_NetTimeToTime
(
&
p
->
birthTime
);
hp
->
qid
=
p
->
qid
;
hp
->
qid
=
p
->
qid
;
...
...
src/lib/rt/src/rt_plc_macro_sup.h
View file @
6934ff89
...
@@ -74,7 +74,7 @@
...
@@ -74,7 +74,7 @@
) { \
) { \
if (o->Action) o->Action = FALSE; \
if (o->Action) o->Action = FALSE; \
if (o->ReturnCheck) { \
if (o->ReturnCheck) { \
clock_gettime(CLOCK_REALTIME,
&o->ReturnTime); \
time_GetTime(
&o->ReturnTime); \
o->ReturnCheck = FALSE; \
o->ReturnCheck = FALSE; \
o->ReturnSend = TRUE; \
o->ReturnSend = TRUE; \
} \
} \
...
@@ -90,7 +90,7 @@
...
@@ -90,7 +90,7 @@
if (o->DetectCheck) { \
if (o->DetectCheck) { \
o->ActualValue = In; \
o->ActualValue = In; \
timer_in(tp, o); \
timer_in(tp, o); \
clock_gettime(CLOCK_REALTIME, &o->DetectTime);
\
time_GetTime(&o->DetectTime);
\
o->DetectCheck = FALSE; \
o->DetectCheck = FALSE; \
} \
} \
if (!o->TimerFlag) { \
if (!o->TimerFlag) { \
...
@@ -135,7 +135,7 @@
...
@@ -135,7 +135,7 @@
if (In != o->CtrlPosition) { \
if (In != o->CtrlPosition) { \
if (o->Action) o->Action = FALSE; \
if (o->Action) o->Action = FALSE; \
if (o->ReturnCheck) { \
if (o->ReturnCheck) { \
clock_gettime(CLOCK_REALTIME, &o->ReturnTime);
\
time_GetTime( &o->ReturnTime);
\
o->ReturnCheck = FALSE; \
o->ReturnCheck = FALSE; \
o->ReturnSend = TRUE; \
o->ReturnSend = TRUE; \
} \
} \
...
@@ -149,7 +149,7 @@
...
@@ -149,7 +149,7 @@
if (o->DetectCheck) { \
if (o->DetectCheck) { \
o->ActualValue = In; \
o->ActualValue = In; \
timer_in(tp, o); \
timer_in(tp, o); \
clock_gettime(CLOCK_REALTIME,
&o->DetectTime); \
time_GetTime(
&o->DetectTime); \
o->DetectCheck = FALSE; \
o->DetectCheck = FALSE; \
} \
} \
if (!o->TimerFlag) { \
if (!o->TimerFlag) { \
...
...
wb/lib/wb/src/wb_build.cpp
View file @
6934ff89
...
@@ -87,6 +87,7 @@ void wb_build::node( char *nodename, void *volumelist, int volumecnt)
...
@@ -87,6 +87,7 @@ void wb_build::node( char *nodename, void *volumelist, int volumecnt)
int
rebuild
=
1
;
int
rebuild
=
1
;
pwr_tStatus
status
;
pwr_tStatus
status
;
char
currentnode
[
80
];
char
currentnode
[
80
];
char
node
[
80
];
pwr_tStatus
sumsts
;
pwr_tStatus
sumsts
;
printf
(
"Build node %s
\n
"
,
nodename
);
printf
(
"Build node %s
\n
"
,
nodename
);
...
@@ -118,6 +119,7 @@ void wb_build::node( char *nodename, void *volumelist, int volumecnt)
...
@@ -118,6 +119,7 @@ void wb_build::node( char *nodename, void *volumelist, int volumecnt)
if
(
EVEN
(
status
))
{
if
(
EVEN
(
status
))
{
rebuild
=
1
;
rebuild
=
1
;
}
}
strcpy
(
node
,
vlist
[
i
].
p2
);
}
}
if
(
vlist
[
i
].
volume_id
==
m_session
.
vid
())
{
if
(
vlist
[
i
].
volume_id
==
m_session
.
vid
())
{
...
@@ -156,14 +158,14 @@ void wb_build::node( char *nodename, void *volumelist, int volumecnt)
...
@@ -156,14 +158,14 @@ void wb_build::node( char *nodename, void *volumelist, int volumecnt)
syi_NodeName
(
&
m_sts
,
currentnode
,
sizeof
(
currentnode
));
syi_NodeName
(
&
m_sts
,
currentnode
,
sizeof
(
currentnode
));
if
(
cdh_NoCaseStrcmp
(
node
name
,
currentnode
)
==
0
)
{
if
(
cdh_NoCaseStrcmp
(
node
,
currentnode
)
==
0
)
{
pwr_tFileName
src_fname
,
dest_fname
;
pwr_tFileName
src_fname
,
dest_fname
;
pwr_tCmd
cmd
;
pwr_tCmd
cmd
;
pwr_tTime
dest_time
,
src_time
;
pwr_tTime
dest_time
,
src_time
;
// Copy xtt_help.dat from $pwrp_cnf to $pwrp_exe
// Copy xtt_help.dat from $pwrp_cnf to $pwrp_exe
sprintf
(
src_fname
,
"$pwrp_cnf/%s/xtt_help.dat"
,
node
name
);
sprintf
(
src_fname
,
"$pwrp_cnf/%s/xtt_help.dat"
,
node
);
dcli_translate_filename
(
src_fname
,
src_fname
);
dcli_translate_filename
(
src_fname
,
src_fname
);
m_sts
=
dcli_file_time
(
src_fname
,
&
src_time
);
m_sts
=
dcli_file_time
(
src_fname
,
&
src_time
);
if
(
evenSts
())
{
if
(
evenSts
())
{
...
@@ -195,7 +197,7 @@ void wb_build::node( char *nodename, void *volumelist, int volumecnt)
...
@@ -195,7 +197,7 @@ void wb_build::node( char *nodename, void *volumelist, int volumecnt)
sumsts
=
m_sts
;
sumsts
=
m_sts
;
// Copy pwrp_alias.dat from $pwrp_cnf to $pwrp_load
// Copy pwrp_alias.dat from $pwrp_cnf to $pwrp_load
sprintf
(
src_fname
,
"$pwrp_cnf/%s/pwrp_alias.dat"
,
node
name
);
sprintf
(
src_fname
,
"$pwrp_cnf/%s/pwrp_alias.dat"
,
node
);
dcli_translate_filename
(
src_fname
,
src_fname
);
dcli_translate_filename
(
src_fname
,
src_fname
);
m_sts
=
dcli_file_time
(
src_fname
,
&
src_time
);
m_sts
=
dcli_file_time
(
src_fname
,
&
src_time
);
if
(
evenSts
())
{
if
(
evenSts
())
{
...
@@ -224,26 +226,26 @@ void wb_build::node( char *nodename, void *volumelist, int volumecnt)
...
@@ -224,26 +226,26 @@ void wb_build::node( char *nodename, void *volumelist, int volumecnt)
if
(
sumsts
==
PWRB__NOBUILT
&&
m_sts
!=
PWRB__NOBUILT
)
if
(
sumsts
==
PWRB__NOBUILT
&&
m_sts
!=
PWRB__NOBUILT
)
sumsts
=
m_sts
;
sumsts
=
m_sts
;
// Copy ld_appl_...txt from $pwrp_cnf to $pwrp_
exe
// Copy ld_appl_...txt from $pwrp_cnf to $pwrp_
load
sprintf
(
src_fname
,
load_cNameAppl
,
"$pwrp_cnf"
,
node
name
,
bussid
);
sprintf
(
src_fname
,
load_cNameAppl
,
"$pwrp_cnf"
,
node
,
bussid
);
dcli_translate_filename
(
src_fname
,
src_fname
);
dcli_translate_filename
(
src_fname
,
src_fname
);
m_sts
=
dcli_file_time
(
src_fname
,
&
src_time
);
m_sts
=
dcli_file_time
(
src_fname
,
&
src_time
);
if
(
evenSts
())
{
if
(
evenSts
())
{
char
dir
[
80
];
char
dir
[
80
];
strcpy
(
dir
,
"$pwrp_cnf/"
);
strcpy
(
dir
,
"$pwrp_cnf/"
);
sprintf
(
src_fname
,
load_cNameAppl
,
dir
,
node
name
,
bussid
);
sprintf
(
src_fname
,
load_cNameAppl
,
dir
,
node
,
bussid
);
dcli_translate_filename
(
src_fname
,
src_fname
);
dcli_translate_filename
(
src_fname
,
src_fname
);
m_sts
=
dcli_file_time
(
src_fname
,
&
src_time
);
m_sts
=
dcli_file_time
(
src_fname
,
&
src_time
);
}
}
if
(
oddSts
())
{
if
(
oddSts
())
{
sprintf
(
dest_fname
,
load_cNameAppl
,
"$pwrp_
exe/"
,
nodenam
e
,
bussid
);
sprintf
(
dest_fname
,
load_cNameAppl
,
"$pwrp_
load/"
,
nod
e
,
bussid
);
dcli_translate_filename
(
dest_fname
,
dest_fname
);
dcli_translate_filename
(
dest_fname
,
dest_fname
);
m_sts
=
dcli_file_time
(
dest_fname
,
&
dest_time
);
m_sts
=
dcli_file_time
(
dest_fname
,
&
dest_time
);
if
(
opt
.
force
||
evenSts
()
||
src_time
.
tv_sec
>
dest_time
.
tv_sec
)
{
if
(
opt
.
force
||
evenSts
()
||
src_time
.
tv_sec
>
dest_time
.
tv_sec
)
{
sprintf
(
cmd
,
"cp %s %s"
,
src_fname
,
dest_fname
);
sprintf
(
cmd
,
"cp %s %s"
,
src_fname
,
dest_fname
);
system
(
cmd
);
system
(
cmd
);
sprintf
(
cmd
,
"Build: %s -> $pwrp_
exe
"
,
src_fname
);
sprintf
(
cmd
,
"Build: %s -> $pwrp_
load
"
,
src_fname
);
MsgWindow
::
message
(
'I'
,
cmd
,
msgw_ePop_No
);
MsgWindow
::
message
(
'I'
,
cmd
,
msgw_ePop_No
);
m_sts
=
PWRB__SUCCESS
;
m_sts
=
PWRB__SUCCESS
;
}
}
...
...
xtt/lib/xtt/src/xtt_evlist.cpp
View file @
6934ff89
...
@@ -413,7 +413,7 @@ void EvList::event_info( mh_sMessage *msg)
...
@@ -413,7 +413,7 @@ void EvList::event_info( mh_sMessage *msg)
return
;
return
;
if
(
type
!=
ev_eType_HistList
)
{
if
(
type
!=
ev_eType_HistList
)
{
sts
=
get_destination
(
event
->
Info
.
EventTime
,
(
void
**
)
&
dest
);
sts
=
get_destination
(
net_NetTimeToTime
(
&
event
->
Info
.
EventTime
)
,
(
void
**
)
&
dest
);
if
(
EVEN
(
sts
))
{
if
(
EVEN
(
sts
))
{
dest_code
=
flow_eDest_IntoLast
;
dest_code
=
flow_eDest_IntoLast
;
dest_node
=
NULL
;
dest_node
=
NULL
;
...
@@ -429,12 +429,12 @@ void EvList::event_info( mh_sMessage *msg)
...
@@ -429,12 +429,12 @@ void EvList::event_info( mh_sMessage *msg)
}
}
new
ItemAlarm
(
this
,
"Alarm"
,
new
ItemAlarm
(
this
,
"Alarm"
,
event
->
Info
.
EventTime
,
event
->
Msg
.
EventText
,
net_NetTimeToTime
(
&
event
->
Info
.
EventTime
)
,
event
->
Msg
.
EventText
,
event
->
Info
.
EventName
,
event
->
Info
.
EventFlags
,
event
->
Info
.
EventName
,
event
->
Info
.
EventFlags
,
event
->
Info
.
EventPrio
,
event
->
Info
.
Id
,
event
->
Info
.
EventPrio
,
event
->
Info
.
Id
,
event
->
Info
.
Object
,
&
event
->
Msg
.
EventSound
,
event
->
Info
.
Object
,
&
event
->
Msg
.
EventSound
,
event
->
Msg
.
EventMoreText
,
msg
->
Status
,
event
->
Msg
.
EventMoreText
,
msg
->
Status
,
evlist_eEventType_Info
,
dest_node
,
dest_code
);
evlist_eEventType_Info
,
dest_node
,
dest_code
);
size
++
;
size
++
;
}
}
...
@@ -458,7 +458,7 @@ void EvList::event_alarm( mh_sMessage *msg)
...
@@ -458,7 +458,7 @@ void EvList::event_alarm( mh_sMessage *msg)
return
;
return
;
}
}
if
(
type
!=
ev_eType_HistList
)
{
if
(
type
!=
ev_eType_HistList
)
{
sts
=
get_destination
(
event
->
Info
.
EventTime
,
(
void
**
)
&
dest
);
sts
=
get_destination
(
net_NetTimeToTime
(
&
event
->
Info
.
EventTime
)
,
(
void
**
)
&
dest
);
if
(
EVEN
(
sts
))
{
if
(
EVEN
(
sts
))
{
dest_code
=
flow_eDest_IntoLast
;
dest_code
=
flow_eDest_IntoLast
;
dest_node
=
NULL
;
dest_node
=
NULL
;
...
@@ -474,12 +474,12 @@ void EvList::event_alarm( mh_sMessage *msg)
...
@@ -474,12 +474,12 @@ void EvList::event_alarm( mh_sMessage *msg)
}
}
new
ItemAlarm
(
this
,
"Alarm"
,
new
ItemAlarm
(
this
,
"Alarm"
,
event
->
Info
.
EventTime
,
event
->
Msg
.
EventText
,
net_NetTimeToTime
(
&
event
->
Info
.
EventTime
)
,
event
->
Msg
.
EventText
,
event
->
Info
.
EventName
,
event
->
Info
.
EventFlags
,
event
->
Info
.
EventName
,
event
->
Info
.
EventFlags
,
event
->
Info
.
EventPrio
,
event
->
Info
.
Id
,
event
->
Info
.
EventPrio
,
event
->
Info
.
Id
,
event
->
Info
.
Object
,
&
event
->
Msg
.
EventSound
,
event
->
Info
.
Object
,
&
event
->
Msg
.
EventSound
,
event
->
Msg
.
EventMoreText
,
msg
->
Status
,
event
->
Msg
.
EventMoreText
,
msg
->
Status
,
evlist_eEventType_Alarm
,
dest_node
,
dest_code
);
evlist_eEventType_Alarm
,
dest_node
,
dest_code
);
size
++
;
size
++
;
}
}
...
@@ -504,7 +504,7 @@ void EvList::event_block( mh_sBlock *msg)
...
@@ -504,7 +504,7 @@ void EvList::event_block( mh_sBlock *msg)
brow_DeleteNode
(
brow
->
ctx
,
item
->
node
);
brow_DeleteNode
(
brow
->
ctx
,
item
->
node
);
size
--
;
size
--
;
}
}
sts
=
get_destination
(
event
->
Info
.
EventTime
,
(
void
**
)
&
dest
);
sts
=
get_destination
(
net_NetTimeToTime
(
&
event
->
Info
.
EventTime
)
,
(
void
**
)
&
dest
);
if
(
EVEN
(
sts
))
{
if
(
EVEN
(
sts
))
{
dest_code
=
flow_eDest_IntoLast
;
dest_code
=
flow_eDest_IntoLast
;
dest_node
=
NULL
;
dest_node
=
NULL
;
...
@@ -523,7 +523,7 @@ void EvList::event_block( mh_sBlock *msg)
...
@@ -523,7 +523,7 @@ void EvList::event_block( mh_sBlock *msg)
strcpy
(
text
,
"Unknown"
);
strcpy
(
text
,
"Unknown"
);
new
ItemAlarm
(
this
,
"Alarm"
,
new
ItemAlarm
(
this
,
"Alarm"
,
event
->
Info
.
EventTime
,
event
->
Info
.
EventName
,
net_NetTimeToTime
(
&
event
->
Info
.
EventTime
)
,
event
->
Info
.
EventName
,
text
,
event
->
Info
.
EventFlags
,
text
,
event
->
Info
.
EventFlags
,
event
->
Info
.
EventPrio
,
event
->
Info
.
Id
,
event
->
Info
.
EventPrio
,
event
->
Info
.
Id
,
event
->
Info
.
Object
,
0
,
0
,
0
,
evlist_eEventType_Block
,
event
->
Info
.
Object
,
0
,
0
,
0
,
evlist_eEventType_Block
,
...
@@ -579,7 +579,7 @@ void EvList::event_block( mh_sBlock *msg)
...
@@ -579,7 +579,7 @@ void EvList::event_block( mh_sBlock *msg)
dest_node
=
NULL
;
dest_node
=
NULL
;
ItemAlarm
*
item
=
new
ItemAlarm
(
this
,
"Alarm"
,
ItemAlarm
*
item
=
new
ItemAlarm
(
this
,
"Alarm"
,
event
->
Info
.
EventTime
,
text
,
net_NetTimeToTime
(
&
event
->
Info
.
EventTime
)
,
text
,
event
->
Info
.
EventName
,
event
->
Info
.
EventFlags
,
event
->
Info
.
EventName
,
event
->
Info
.
EventFlags
,
event
->
Info
.
EventPrio
,
event
->
Info
.
Id
,
event
->
Info
.
EventPrio
,
event
->
Info
.
Id
,
event
->
Info
.
Object
,
0
,
0
,
0
,
evlist_eEventType_Block
,
event
->
Info
.
Object
,
0
,
0
,
0
,
evlist_eEventType_Block
,
...
@@ -649,7 +649,7 @@ void EvList::event_ack( mh_sAck *msg)
...
@@ -649,7 +649,7 @@ void EvList::event_ack( mh_sAck *msg)
if
(
type
==
ev_eType_EventList
||
type
==
ev_eType_HistList
)
{
if
(
type
==
ev_eType_EventList
||
type
==
ev_eType_HistList
)
{
if
(
type
==
ev_eType_EventList
)
{
if
(
type
==
ev_eType_EventList
)
{
sts
=
get_destination
(
event
->
Info
.
EventTime
,
(
void
**
)
&
dest
);
sts
=
get_destination
(
net_NetTimeToTime
(
&
event
->
Info
.
EventTime
)
,
(
void
**
)
&
dest
);
if
(
EVEN
(
sts
))
{
if
(
EVEN
(
sts
))
{
dest_code
=
flow_eDest_IntoLast
;
dest_code
=
flow_eDest_IntoLast
;
dest_node
=
NULL
;
dest_node
=
NULL
;
...
@@ -664,7 +664,7 @@ void EvList::event_ack( mh_sAck *msg)
...
@@ -664,7 +664,7 @@ void EvList::event_ack( mh_sAck *msg)
dest_node
=
NULL
;
dest_node
=
NULL
;
}
}
new
ItemAlarm
(
this
,
"Alarm"
,
new
ItemAlarm
(
this
,
"Alarm"
,
event
->
Info
.
EventTime
,
""
,
net_NetTimeToTime
(
&
event
->
Info
.
EventTime
)
,
""
,
event
->
Info
.
EventName
,
event
->
Info
.
EventFlags
,
event
->
Info
.
EventName
,
event
->
Info
.
EventFlags
,
event
->
Info
.
EventPrio
,
event
->
Info
.
Id
,
event
->
Info
.
EventPrio
,
event
->
Info
.
Id
,
event
->
Info
.
Object
,
0
,
0
,
0
,
evlist_eEventType_Ack
,
event
->
Info
.
Object
,
0
,
0
,
0
,
evlist_eEventType_Ack
,
...
@@ -712,7 +712,7 @@ void EvList::event_return( mh_sReturn *msg)
...
@@ -712,7 +712,7 @@ void EvList::event_return( mh_sReturn *msg)
if
(
type
==
ev_eType_EventList
||
type
==
ev_eType_HistList
)
{
if
(
type
==
ev_eType_EventList
||
type
==
ev_eType_HistList
)
{
if
(
type
==
ev_eType_EventList
)
{
if
(
type
==
ev_eType_EventList
)
{
sts
=
get_destination
(
event
->
Info
.
EventTime
,
(
void
**
)
&
dest
);
sts
=
get_destination
(
net_NetTimeToTime
(
&
event
->
Info
.
EventTime
)
,
(
void
**
)
&
dest
);
if
(
EVEN
(
sts
))
{
if
(
EVEN
(
sts
))
{
dest_code
=
flow_eDest_IntoLast
;
dest_code
=
flow_eDest_IntoLast
;
dest_node
=
NULL
;
dest_node
=
NULL
;
...
@@ -727,11 +727,11 @@ void EvList::event_return( mh_sReturn *msg)
...
@@ -727,11 +727,11 @@ void EvList::event_return( mh_sReturn *msg)
dest_node
=
NULL
;
dest_node
=
NULL
;
}
}
new
ItemAlarm
(
this
,
"Alarm"
,
new
ItemAlarm
(
this
,
"Alarm"
,
event
->
Info
.
EventTime
,
event
->
Msg
.
EventText
,
net_NetTimeToTime
(
&
event
->
Info
.
EventTime
)
,
event
->
Msg
.
EventText
,
event
->
Info
.
EventName
,
event
->
Info
.
EventFlags
,
event
->
Info
.
EventName
,
event
->
Info
.
EventFlags
,
event
->
Info
.
EventPrio
,
event
->
Info
.
Id
,
event
->
Info
.
EventPrio
,
event
->
Info
.
Id
,
event
->
Info
.
Object
,
0
,
0
,
0
,
evlist_eEventType_Return
,
event
->
Info
.
Object
,
0
,
0
,
0
,
evlist_eEventType_Return
,
dest_node
,
dest_code
);
dest_node
,
dest_code
);
size
++
;
size
++
;
}
}
...
...
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