Skip to content

Commit f40b7d2

Browse files
committed
fixed issue with usage of LastDPActionTime() which is only valid for
channels and not for datapoints where LastTimestamp() should be used instead. This fixes #76.
1 parent b76e520 commit f40b7d2

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

xmlapi/state.cgi

+5-2
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,10 @@ if {[info exists sid] && [check_session $sid]} {
9595

9696
Write("<channel name='");
9797
WriteXML( oChannel.Name() );
98-
Write("' ise_id='" # sChnId # "'>");
98+
Write("' ise_id='" # sChnId);
99+
Write("' lastdpactiontime='" # oChannel.LastDPActionTime().ToInteger());
100+
Write("'>");
101+
99102

100103
foreach(sDPId, oChannel.DPs().EnumUsedIDs()) {
101104
object oDP = dom.GetObject(sDPId);
@@ -114,7 +117,7 @@ if {[info exists sid] && [check_session $sid]} {
114117
Write("' valuetype='" # oDP.ValueType());
115118
Write("' valueunit='" # oDP.ValueUnit());
116119
Write("' timestamp='" # oDP.Timestamp().ToInteger());
117-
Write("' lastdpactiontime='" # oDP.LastDPActionTime().ToInteger());
120+
Write("' lasttimestamp='" # oDP.LastTimestamp().ToInteger());
118121
Write("' />");
119122
}
120123
}

0 commit comments

Comments
 (0)