Commit 2e6a2037 authored by Esteban Blanc's avatar Esteban Blanc

Bugfix backports

See merge request !2
parents e326b090 d3e9ffd9
......@@ -17,6 +17,9 @@ project/pwrdemo/src/login/initvol.pwr_com
project/pwrtest01/bld
project/pwrtest01/src/login/initdir.pwr_com
project/pwrtest01/src/login/initvol.pwr_com
project/pwrtest02/bld
project/pwrtest02/src/login/initdir.pwr_com
project/pwrtest02/src/login/initvol.pwr_com
*.db
*.db.lock
*.gjl
......
include $(pwre_dir_symbols)
-include $(pwre_kroot)/tools/bld/src/$(type_name)_generic.mk
exe : $(doc_dir)/sv_se/orm/pwr_basecomponentclasses_h.html \
$(doc_dir)/en_us/orm/pwr_basecomponentclasses_h.html \
$(doc_dir)/sv_se/orm/pwr_basecomponentclasses_hpp.html \
$(doc_dir)/en_us/orm/pwr_basecomponentclasses_hpp.html
$(doc_dir)/sv_se/orm/pwr_basecomponentclasses_h.html : $(inc_dir)/pwr_basecomponentclasses.h
@ echo "Generating html files for struct sv_se..."
@ $(co_convert) -c -d $(doc_dir)/sv_se/orm "$(source)"
$(doc_dir)/en_us/orm/pwr_basecomponentclasses_h.html : $(inc_dir)/pwr_basecomponentclasses.h
@ echo "Generating html files for struct en_us..."
@ $(co_convert) -c -d $(doc_dir)/en_us/orm "$(source)"
$(doc_dir)/sv_se/orm/pwr_basecomponentclasses_hpp.html : $(inc_dir)/pwr_basecomponentclasses.hpp
@ echo "Generating html files for struct sv_se..."
@ $(co_convert) -c -d $(doc_dir)/sv_se/orm "$(source)"
$(doc_dir)/en_us/orm/pwr_basecomponentclasses_hpp.html : $(inc_dir)/pwr_basecomponentclasses.hpp
@ echo "Generating html files for struct en_us..."
@ $(co_convert) -c -d $(doc_dir)/en_us/orm "$(source)"
\ No newline at end of file
#!/bin/bash
set -e
exec > >(tee compilation_log.txt)
exec > >(tee build.log)
exec 2>&1
root=`eval pwd`
declare -i buildversion_set=0
if [ "$1" = "--version" ] && [ "$2" != "" ] && [ "$3" != "" ]; then
buildversion=$2" "$3
fi
if [ -e $root/src/exp/inc/src/pwr_version.h ]; then
verl=`eval cat $root/src/exp/inc/src/pwr_version.h | grep "\bpwrv_cPwrVersionStr\b" | awk '{print $3}'`
verl=${verl:1:6}
......@@ -92,9 +97,12 @@ pwre init $ename
# Build
mkdir -p $pwre_broot
if [ "$buildversion" != "" ]; then
pwre configure --version $buildversion
fi
pwre configure --parallel
pwre create_all_modules
pwre build_all_modules $gui
pwre build_all_modules $gui
#pwre build_kernel $gui
#pwre method_build $gui
......
This diff is collapsed.
......@@ -407,6 +407,30 @@ JNIEXPORT jint JNICALL Java_jpwr_rt_Gdh_getCircBuffInfo
JNIEXPORT jint JNICALL Java_jpwr_rt_Gdh_updateCircBuffInfo
(JNIEnv *, jobject, jobject, jint);
/*
* Class: jpwr_rt_Gdh
* Method: getDsTrend
* Signature: (Ljava/lang/String;III)Ljpwr/rt/GdhrGetDsTrend;
*/
JNIEXPORT jobject JNICALL Java_jpwr_rt_Gdh_getDsTrend
(JNIEnv *, jobject, jstring, jint, jint, jint);
/*
* Class: jpwr_rt_Gdh
* Method: getSevItemInfo
* Signature: (Ljava/lang/String;)Ljpwr/rt/GdhrSevItemInfo;
*/
JNIEXPORT jobject JNICALL Java_jpwr_rt_Gdh_getSevItemInfo
(JNIEnv *, jobject, jstring);
/*
* Class: jpwr_rt_Gdh
* Method: getSevItemData
* Signature: (Ljava/lang/String;Ljpwr/rt/PwrtObjid;Ljava/lang/String;FI)Ljpwr/rt/GdhrSevItemData;
*/
JNIEXPORT jobject JNICALL Java_jpwr_rt_Gdh_getSevItemData
(JNIEnv *, jobject, jstring, jobject, jstring, jfloat, jint);
#ifdef __cplusplus
}
#endif
......
......@@ -167,6 +167,6 @@ local_java_sources := \
exe : $(doc_dir)/en_us/jprm/index.html
$(doc_dir)/en_us/jprm/index.html :
@ echo "Generating javadoc for rt, jop and jopg"
@ $(log_gen)
@ if [ ! -e $(doc_dir)/en_us/jprm ]; then mkdir $(doc_dir)/en_us/jprm; fi
@ javadoc -Xdoclint:none -d $(doc_dir)/en_us/jprm $(pwre_sroot)/jpwr/rt/src/*.java $(pwre_sroot)/jpwr/jop/src/*.java $(pwre_sroot)/jpwr/jopg/src/*.java
......@@ -700,6 +700,21 @@ public class Gdh {
*/
public native int updateCircBuffInfo(CircBuffInfo[] info, int info_size);
// public native GdhrGetXttObj[] getAllXttChildrenNative(PwrtObjid objid);
/**
Get data from a DsTrend.
*/
public native GdhrGetDsTrend getDsTrend(String jstrend_object, int last_next_idx,
int last_buffer, int max_size);
/**
Get info of a sevhist object.
*/
public native GdhrSevItemInfo getSevItemInfo(String jsevhist_object);
/**
Get data from a sevhist item.
*/
public native GdhrSevItemData getSevItemData(String jserver, PwrtObjid oid,
String jattribute, float timerange,
int max_size);
}
......
This diff is collapsed.
/*
* ProviewR Open Source Process Control.
* Copyright (C) 2005-2020 SSAB EMEA AB.
*
* This file is part of ProviewR.
*
* 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 ProviewR. If not, see <http://www.gnu.org/licenses/>
*
* Linking ProviewR statically or dynamically with other modules is
* making a combined work based on ProviewR. 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
* ProviewR give you permission to, from the build function in the
* ProviewR Configurator, combine ProviewR with modules generated by the
* ProviewR 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 ProviewR (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 cicular buffer information.
Contains a return status and circular buffer information.
*/
public class GdhrGetDsTrend implements Serializable
{
private static final long serialVersionUID = -2632525127459438144L;
public int sts;
public int last_next_idx;
public int last_buffer;
public int size;
public float[] data;
public GdhrGetDsTrend(float[] data, int size, int last_next_idx, int last_buffer,
int sts)
{
this.data = data;
this.size = size;
this.last_next_idx = last_next_idx;
this.last_buffer = last_buffer;
this.sts = sts;
}
public boolean evenSts() { return (sts % 2 == 0);}
public boolean oddSts() { return (sts % 2 == 1);}
public int getSts() { return sts;}
}
/*
* ProviewR Open Source Process Control.
* Copyright (C) 2005-2020 SSAB EMEA AB.
*
* This file is part of ProviewR.
*
* 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 ProviewR. If not, see <http://www.gnu.org/licenses/>
*
* Linking ProviewR statically or dynamically with other modules is
* making a combined work based on ProviewR. 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
* ProviewR give you permission to, from the build function in the
* ProviewR Configurator, combine ProviewR with modules generated by the
* ProviewR 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 ProviewR (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 cicular buffer information.
Contains a return status and circular buffer information.
*/
public class GdhrSevItemData implements Serializable
{
private static final long serialVersionUID = -650888721059659030L;
public int size;
public float[] tbuf;
public Object vbuf;
public int vtype;
public int sts;
public GdhrSevItemData(int size, float[] tbuf, Object vbuf, int vtype, int sts)
{
this.size = size;
this.tbuf = tbuf;
this.vbuf = vbuf;
this.vtype = vtype;
this.sts = sts;
}
public boolean evenSts() { return (sts % 2 == 0);}
public boolean oddSts() { return (sts % 2 == 1);}
public int getSts() { return sts;}
}
/*
* ProviewR Open Source Process Control.
* Copyright (C) 2005-2020 SSAB EMEA AB.
*
* This file is part of ProviewR.
*
* 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 ProviewR. If not, see <http://www.gnu.org/licenses/>
*
* Linking ProviewR statically or dynamically with other modules is
* making a combined work based on ProviewR. 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
* ProviewR give you permission to, from the build function in the
* ProviewR Configurator, combine ProviewR with modules generated by the
* ProviewR 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 ProviewR (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 cicular buffer information.
Contains a return status and circular buffer information.
*/
public class GdhrSevItemInfo implements Serializable
{
private static final long serialVersionUID = 2932793763480084882L;
public PwrtObjid oid;
public String attr;
public String server;
public int sts;
public GdhrSevItemInfo(PwrtObjid oid, String attr, String server, int sts)
{
this.oid = oid;
this.attr = attr;
this.server = server;
this.sts = sts;
}
public boolean evenSts() { return (sts % 2 == 0);}
public boolean oddSts() { return (sts % 2 == 1);}
public int getSts() { return sts;}
}
......@@ -36,6 +36,9 @@ local_java_sources = \
GdhrsAttrDef.java \
CircBuffInfo.java \
GdhrCircBuffInfo.java \
GdhrGetDsTrend.java \
GdhrSevItemInfo.java \
GdhrSevItemData.java \
GdhApplIfc.java \
Gdh.java \
Sub.java \
......
This diff is collapsed.
......@@ -37,6 +37,8 @@ var Glow = {
eType_DynType2 : 22,
eType_ActionType2 : 23,
eType_AppMotion : 24,
eType_Float : 25,
eType_HorizDirection : 26,
eCtxType_Glow : 0,
eCtxType_Brow : 1,
......@@ -125,6 +127,9 @@ var Glow = {
eDirection_Up : 3,
eDirection_Down : 4,
eHorizDirection_Left : 0,
eHorizDirection_Right : 1,
eAdjustment_Center : 0,
eAdjustment_Right : 1,
eAdjustment_Left : 2,
......@@ -1260,16 +1265,17 @@ var Glow = {
eSave_GrowTrend_trace_data7 : 3223,
eSave_GrowTrend_trace_data8 : 3224,
eSave_GrowTrend_trace_data9 : 3225,
eSave_GrowTrend_trace_data10 : 3226,
eSave_GrowTrend_trace_data10 : 3226,
eSave_GrowTrend_access : 3227,
eSave_GrowTrend_cycle : 3228,
eSave_GrowTrend_cycle : 3228,
eSave_GrowTrend_ref_object : 3229,
eSave_GrowTrend_userdata_cb : 3230,
eSave_GrowTrend_x_max_value_0 : 3231,
eSave_GrowTrend_x_min_value_0 : 3232,
eSave_GrowTrend_x_max_value_1 : 3233,
eSave_GrowTrend_x_min_value_1 : 3234,
eSave_GrowTrend_mode : 3235,
eSave_GrowTrend_mode : 3235,
eSave_GrowTrend_direction : 3236,
eSave_GrowSlider_grownode_part : 3300,
eSave_GrowSlider_direction : 3301,
eSave_GrowSlider_max_value : 3302,
......@@ -9994,8 +10000,9 @@ function GrowTrend( ctx) {
this.x_mark2;
this.y_mark1;
this.y_mark2;
this.mark1_color;
this.mark2_color;
this.mark1_color = Glow.eDrawType_Inherit;
this.mark2_color = Glow.eDrawType_Inherit;
this.direction;
for ( var i = 0; i < Glow.TREND_MAX_CURVES; i++)
this.curve[i] = null;
......@@ -10069,6 +10076,9 @@ function GrowTrend( ctx) {
case Glow.eSave_GrowTrend_curve_width:
this.curve_width = parseInt(tokens[1], 10);
break;
case Glow.eSave_GrowTrend_direction:
this.direction = parseInt(tokens[1], 10);
break;
case Glow.eSave_GrowTrend_scan_time:
this.scan_time = parseFloat( tokens[1]);
break;
......@@ -10109,7 +10119,6 @@ function GrowTrend( ctx) {
if ( end)
break;
}
this.configure_curves();
return i;
};
......@@ -10267,7 +10276,7 @@ function GrowTrend( ctx) {
if ( xm2 >= ll_x && xm2 <= ur_x) {
drawtype = this.mark2_color;
if ( drawtype == Glow.eDrawType_Inherit)
drawtype = Glow.eDrawType_ColorYellow;
drawtype = Glow.eDrawType_ColorRed;
this.ctx.gdraw.line( xm2, ll_y, xm2, ur_y, drawtype, idx, 0);
}
}
......@@ -10293,12 +10302,14 @@ function GrowTrend( ctx) {
if ( ym2 >= ll_y && ym2 <= ur_y) {
drawtype = this.mark2_color;
if ( drawtype == Glow.eDrawType_Inherit)
drawtype = Glow.eDrawType_ColorYellow;
drawtype = Glow.eDrawType_ColorRed;
this.ctx.gdraw.line( ll_x, ym2, ur_x, ym2, drawtype, idx, 0);
}
}
if ( this.border !== 0) {
drawtype = GlowColor.get_drawtype( this.draw_type, Glow.eDrawType_LineHighlight,
highlight, colornode, 0, 0);
this.ctx.gdraw.rect( ll_x, ll_y, ur_x - ll_x, ur_y - ll_y, drawtype, idx, 0);
}
};
......@@ -10381,7 +10392,7 @@ function GrowTrend( ctx) {
this.y_mark1 = this.ur.y - (mark - min) / (max - min) * (this.ur.y - this.ll.y);
}
if ( this.display_y_mark2 !== 0) {
mark = this.y_min_value[0] - (this.y_mark2 - ur.y) *(this.y_max_value[0] - this.y_min_value[0]) / (this.ur.y - this.ll.y);
mark = this.y_min_value[0] - (this.y_mark2 - this.ur.y) *(this.y_max_value[0] - this.y_min_value[0]) / (this.ur.y - this.ll.y);
this.y_mark2 = this.ur.y - (mark - min) / (max - min) * (this.ur.y - this.ll.y);
}
}
......@@ -10463,6 +10474,100 @@ function GrowTrend( ctx) {
this.get_background_object_limits = function( t, type, x, y, bo) {
return 0;
};
this.get_direction = function() {
return this.direction;
};
this.set_data = function( tdata, vdata, curve_idx, data_points) {
var dt, dt_fill;
var points;
var cpoints;
var pointarray;
var point_p;
var i, j, idx;
this.no_of_points = Math.max( 2, this.no_of_points);
points = cpoints = Math.min( this.no_of_points, data_points);
if ( this.fill_curve !== 0)
cpoints += 2;
this.curve_width = Math.min( Glow.DRAW_TYPE_SIZE, Math.max( 1, this.curve_width));
pointarray = new Array(cpoints);
j = curve_idx;
for ( i = 0, idx = 0; i < cpoints; i++, idx++) {
point_p = pointarray[i] = new GlowPointX();
if ( this.fill_curve == 0) {
idx = i;
if ( this.y_max_value[j] != this.y_min_value[j])
point_p.y = this.ur.y - (vdata[idx] - this.y_min_value[j]) /
(this.y_max_value[j] - this.y_min_value[j]) * (this.ur.y - this.ll.y);
point_p.y = Math.max( this.ll.y, Math.min( point_p.y, this.ur.y));
if ( this.direction == Glow.eHorizDirection_Right)
point_p.x = this.ll.x
+ (tdata[idx] - tdata[0]) / (tdata[points - 1] - tdata[0])
* (this.ur.x - this.ll.x);
else
point_p.x = this.ur.x
- (tdata[idx] - tdata[0]) / (tdata[points - 1] - tdata[0])
* (this.ur.x - this.ll.x);
}
else {
if ( i == 0) {
if ( this.direction == Glow.eHorizDirection_Right)
point_p.x = this.ll.x;
else
point_p.x = this.ur.x;
point_p.y = this.ur.y;
idx--;
} else if (i == cpoints -1) {
if ( this.direction == Glow.eHorizDirection_Right)
point_p.x = this.ur.x;
else
point_p.x = this.ll.x;
point_p.y = this.ur.y;
} else {
if ( this.y_max_value[j] != this.y_min_value[j])
point_p.y = this.ur.y
- (vdata[idx] - this.y_min_value[j])
/ (this.y_max_value[j] - this.y_min_value[j]) * (this.ur.y - this.ll.y);
point_p.y = Math.max(this.ll.y, Math.min(point_p.y, this.ur.y));
if (this.direction == Glow.eHorizDirection_Right)
point_p.x = this.ll.x
+ (tdata[idx] - tdata[0]) / (tdata[points - 1] - tdata[0])
* (this.ur.x - this.ll.x);
else
point_p.x = this.ur.x
- (tdata[idx] - tdata[0]) / (tdata[points - 1] - tdata[0])
* (this.ur.x - this.ll.x);
}
}
point_p++;
}
if ( this.curve_drawtype[j] != Glow.eDrawType_Inherit)
dt = this.curve_drawtype[j];
else
dt = this.draw_type;
if ( this.curve_fill_drawtype[j] != Glow.eDrawType_Inherit)
dt_fill = this.curve_fill_drawtype[j];
else
dt_fill = this.draw_type;
this.ctx.nodraw++;
this.curve[j] = new GrowPolyline( ctx);
this.curve[j].init( "", pointarray, cpoints, dt,
this.curve_width,
0, this.fill_curve, 1, 0, dt_fill);
this.ctx.nodraw--;
this.draw();
};
}
GrowTrend.prototype = Object.create(GrowRect.prototype);
......
This diff is collapsed.
......@@ -6,9 +6,9 @@ copy : $(doc_dir)/sv_se/orm/misc_plc_c.html \
$(doc_dir)/en_us/orm/misc_plc_c.html
$(doc_dir)/sv_se/orm/misc_plc_c.html : misc_plc.c
@ echo "Generating html files for misc_plc sv_se..."
@ $(log_html)
@ $(co_convert) -c -d $(doc_dir)/sv_se/orm "$(source)"
$(doc_dir)/en_us/orm/misc_plc_c.html : misc_plc.c
@ echo "Generating html files for misc_plc en_us..."
@ $(log_html)
@ $(co_convert) -c -d $(doc_dir)/en_us/orm "$(source)"
......@@ -19,5 +19,5 @@ $(bld_dir)/stdsoap2.o : stdsoap2.cpp
$(inc_dir)/stdsoap2.h : stdsoap2.h
$(inc_dir)/Service.nsmap : Service.nsmap
@ echo "Export $(source)"
@ $(log_exp)
@ $(cp) $(cpflags) $(source) $(target)
......@@ -31,5 +31,5 @@ silent :
.SUFFIXES:
$(inc_dir)/objdict.h : objdict.h
@ echo "Copying objdict.h"
@ $(log_cp)
@ $(cp) $(cpflags) $(source) $(target)
......@@ -35,17 +35,17 @@ silent :
# @ $(cp) $(cpflags) $(source) $(target)
$(inc_dir)/libusbio.h : libusbio.h
@ echo "Copying libusbio.h"
@ $(log_cp)
@ $(cp) $(cpflags) $(source) $(target)
$(inc_dir)/openSocket.h : openSocket.h
@ echo "Copying openSocket.h"
@ $(log_cp)
@ $(cp) $(cpflags) $(source) $(target)
$(inc_dir)/setport.h : setport.h
@ echo "Copying setport.h"
@ $(log_cp)
@ $(cp) $(cpflags) $(source) $(target)
$(inc_dir)/pwr_arduino_uno.ino : pwr_arduino_uno.ino
@ echo "Copying pwr_arduino_uno.ino"
@ $(log_cp)
@ $(cp) $(cpflags) $(source) $(target)
......@@ -46,7 +46,7 @@ silent :
@ :
$(export_xdd) : $(exe_dir)/%.xdd : %.xdd
@ echo "Exporting $< ..."
@ $(log_exp)
@ $(cp) $(cpflags) $(source) $(target)
$(clean_xdd) : clean_%.xdd : %.xdd
......
......@@ -834,7 +834,7 @@ static pwr_tStatus IoRackInit(io_tCtx ctx, io_sAgent* ap, io_sRack* rp)
/* Create socket, store in local struct */
uid_t ruid;
ruid = getuid();
printf("ruid: %d\n", ruid);
//printf("ruid: %d\n", ruid);
local->s = socket(AF_INET, SOCK_STREAM, 0);
if (local->s < 0) {
......@@ -925,15 +925,15 @@ static pwr_tStatus mb_init_channels(io_tCtx ctx, io_sAgent* ap, io_sRack* rp)
local_card->input_area = (char *)local->inputs + card_input_area_offset;
local_card->output_area = (char *)local->outputs + card_output_area_offset;
io_bus_card_init( ctx, cardp, &input_area_offset, &input_area_chansize,
&output_area_offset, &output_area_chansize,
&output_area_offset, &output_area_chansize,
pwr_eByteOrderingEnum_BigEndian, io_eAlignment_Packed);
for (i = 0; i < cardp->ChanListSize; i++) {
chanp = &cardp->chanlist[i];
switch (chanp->ChanClass) {
switch (chanp->ChanClass) {
case pwr_cClass_ChanDi: {
pwr_sClass_ChanDi *chan_di = (pwr_sClass_ChanDi *) chanp->cop;
......@@ -971,7 +971,7 @@ static pwr_tStatus mb_init_channels(io_tCtx ctx, io_sAgent* ap, io_sRack* rp)
break;
}
}
}
}
local_card->input_size = input_area_offset + input_area_chansize;
local_card->output_size = output_area_offset + output_area_chansize;
......
......@@ -70,21 +70,21 @@ silent :
@ :
$(export_gsd) : $(exe_dir)/%.gsd : %.gsd
@ echo "Exporting $< ..."
@ $(log_exp)
@ $(cp) $(cpflags) $(source) $(target)
$(clean_gsd) : clean_%.gsd : %.gsd
@ rm $(exe_dir)/$*.gsd
$(export_gse) : $(exe_dir)/%.gse : %.gse
@ echo "Exporting $< ..."
@ $(log_exp)
@ $(cp) $(cpflags) $(source) $(target)
$(clean_gse) : clean_%.gse : %.gse
@ rm $(exe_dir)/$*.gse
$(export_xml) : $(exe_dir)/%.xml : %.xml
@ echo "Exporting $< ..."
@ $(log_exp)
@ $(cp) $(cpflags) $(source) $(target)
$(clean_xml) : clean_%.xml : %.xml
......
......@@ -80,16 +80,16 @@ $(exe_dir)/%.wav : %.wav
@ $(cp) $(cpflags) $(source) $(target)
$(exe_dir)/profibus_xtthelp.dat : profibus_xtthelp.dat
@ echo "Copying $(source)"
@ $(log_cp)
@ $(cp) $(cpflags) $(source) $(target)
@ $(co_convert) -t -d $(pwr_doc)/help $(source)
$(exe_dir)/%.gif : %.gif
@ echo "Copying $(source).gif exe"
@ $(log_cp)
@ $(cp) $(cpflags) $(source) $(target)
$(doc_dir)/help/%.gif : %.gif
@ echo "Copying $(source).gif doc/help"
@ $(log_cp)
@ $(cp) $(cpflags) $(source) $(target)
......
......@@ -31,9 +31,9 @@ silent :
.SUFFIXES:
$(exe_dir)/pb_module_classes.dat : pb_module_classes.dat
@ echo "Copying $(source)"
@ $(log_cp)
@ $(cp) $(cpflags) $(source) $(target)
$(exe_dir)/pn_module_classes.dat : pn_module_classes.dat
@ echo "Copying $(source)"
@ $(log_cp)
@ $(cp) $(cpflags) $(source) $(target)
......@@ -22,7 +22,7 @@ export_c := $(addprefix $(bld_dir)/, $(patsubst %.c, %.o, $(c_sources)))
lib : $(export_lib) export_lib_local
export_lib_local : $(export_c)
@ echo "Inserting local lib"
@ $(log_lib)
@ if [ "$(export_c)" != "" ]; then \
$(ar) -r $(export_lib) $(export_c); \
fi
......@@ -96,7 +96,7 @@ static pwr_tStatus IoRackInit(io_tCtx ctx, io_sAgent* ap, io_sRack* rp)
local->dp = 1;
sts = gdh_ObjidToName(rp->Objid, (char*)&name, sizeof(name), cdh_mNName);
errh_Info("Init of Profibus DP Slave and Modules %s", name);
errh_Info("PROFIBUS: Init of DP slave and modules %s", name);
op = (pwr_sClass_Pb_DP_Slave*)rp->op;
......@@ -203,7 +203,7 @@ static pwr_tStatus IoRackInit(io_tCtx ctx, io_sAgent* ap, io_sRack* rp)
GetChanSize(((pwr_sClass_ChanIi*)chanp->cop)->Representation);
break;
default:
errh_Error("Diagnostic channel class, card %s", cardp->Name);
errh_Error("PROFIBUS: Diagnostic channel class, card %s", cardp->Name);
}
continue;
}
......@@ -366,13 +366,13 @@ static pwr_tStatus IoRackRead(io_tCtx ctx, io_sAgent* ap, io_sRack* rp)
if (sp->ErrorCount == sp->ErrorSoftLimit)
{
errh_Error("IO Error soft limit reached on card '%s'", rp->Name);
errh_Error("PROFIBUS: IO Error soft limit reached on device '%s'", rp->Name);
ctx->IOHandler->CardErrorSoftLimit = 1;
ctx->IOHandler->ErrorSoftLimitObject = cdh_ObjidToAref(rp->Objid);
}
if (sp->ErrorCount == sp->ErrorHardLimit)
{
errh_Error("IO Error hard limit reached on card '%s', stall action %d",
errh_Error("PROFIBUS: IO Error hard limit reached on device '%s', stall action %d",
rp->Name, sp->StallAction);
ctx->IOHandler->CardErrorHardLimit = 1;
ctx->IOHandler->ErrorHardLimitObject = cdh_ObjidToAref(rp->Objid);
......
......@@ -225,7 +225,7 @@ static pwr_tStatus IoCardInit(io_tCtx ctx, io_sAgent* ap, io_sRack* rp,
if (local->output_area_size > 0)
local->output_area = calloc(1, local->output_area_size);
errh_Info("Init of Profibus FDL Data transfer '%s'", cp->Name);
errh_Info("PROFIBUS: Init of FDL Data transfer '%s'", cp->Name);
op->Status = PB__NORMAL;
......
......@@ -63,7 +63,7 @@ static pwr_tStatus IoRackInit(io_tCtx ctx, io_sAgent* ap, io_sRack* rp)
pwr_tStatus sts;
sts = gdh_ObjidToName(rp->Objid, (char*)&name, sizeof(name), cdh_mNName);
errh_Info("Init of Profibus FDL SAP %s", name);
errh_Info("PROFIBUS: Init of FDL SAP %s", name);
local = calloc(1, sizeof(*local));
rp->Local = local;
......
......@@ -62,12 +62,12 @@ static pwr_tStatus IoCardInit(io_tCtx ctx, io_sAgent* ap, io_sRack* rp,
if (rp->Class != pwr_cClass_Pb_DP_Slave)
{
errh_Info("Illegal object type %s", cp->Name);
errh_Info("PROFIBUS: Illegal object type %s", cp->Name);
return IO__SUCCESS;
}
if (op->Status < PB_MODULE_STATE_OPERATE)
errh_Info("Error initializing Pb module Ii %s", cp->Name);
errh_Info("PROFIBUS: Error initializing Pb module Ii %s", cp->Name);
return IO__SUCCESS;
}
......
......@@ -60,13 +60,13 @@ static pwr_tStatus IoCardInit(io_tCtx ctx, io_sAgent* ap, io_sRack* rp,
if (rp->Class != pwr_cClass_Pb_DP_Slave)
{
errh_Info("Illegal object type %s", cp->Name);
errh_Info("PROFIBUS: Illegal object type %s", cp->Name);
return IO__SUCCESS;
}
if (op->Status < PB_MODULE_STATE_OPERATE)
{
errh_Info("Error initializing Pb module Io %s", cp->Name);
errh_Info("PROFIBUS: Error initializing Pb module Io %s", cp->Name);
}
return IO__SUCCESS;
......
This diff is collapsed.
......@@ -301,8 +301,8 @@ static pwr_tStatus IoAgentWrite(io_tCtx ctx, io_sAgent* ap)
pack_write_req(&local->service_req_res,
local->device_data[ii]->device_ref, &sp->WriteReq);
sts = pnak_send_service_req_res(0, &local->service_req_res);
errh_Info("Profinet - Asynch write, dev: %d",
local->device_data[ii]->device_ref);
errh_Info("PROFINET: Async write, dev: %d",
local->device_data[ii]->device_ref);
break;
}
}
......@@ -327,30 +327,61 @@ static pwr_tStatus IoAgentWrite(io_tCtx ctx, io_sAgent* ap)
static pwr_tStatus IoAgentClose(io_tCtx ctx, io_sAgent* ap)
{
io_sAgentLocal* local;
pwr_tStatus sts = PB__NOTINIT;
int *exitcodep;
int error;
local = (io_sAgentLocal*)ap->Local;
/* Stop profistack */
// Stop the supervision thread before shutting down PROFINET.
local = (io_sAgentLocal*)ap->Local;
if (!local) return IO__SUCCESS;
pnak_init();
// Start taking the stack down. A PNAK_WAIT_OBJECT_CHANNEL_CLOSED event will
// be emitted and the supervision thread will exit
pnak_stop_stack(0);
sts = pnak_stop_profistack(0);
// Wait for the thread to exit
if ((error = pthread_join(local->handle_events, (void**)&exitcodep)))
errh_Warning("PROFINET: Unable to wait for supervision thread!");
else
errh_Info("PROFINET: Supervision thread has exited. PROFINET stopped...");
pnak_term();
free(local);
local = NULL;
/* Clean data areas .... */
return sts;
return IO__SUCCESS;
}
static pwr_tStatus IoAgentSwap(io_tCtx ctx, io_sAgent* ap, io_eEvent event)
{
switch (event) {
switch (event)
{
// For now we just shut down regardless of what EmergBreakSelect says...safety
// first :)
case io_eEvent_EmergencyBreak:
case io_eEvent_IoCommEmergencyBreak:
errh_Fatal("Emergency break detected shutting down profinet");
errh_Fatal("PROFINET: Emergency break detected! Shutting down PROFINET!");
IoAgentClose(ctx, ap);
// TODO We need a complete overhaul of EmergencyBreakTrue / EmergBreakSelect
// / IOReadWriteFlag
// switch (ctx->Node->EmergBreakSelect)
// {
// case pwr_eEmergBreakSelectEnum_StopIO:
// case pwr_eEmergBreakSelectEnum_Reboot:
// errh_Fatal("PROFINET: Emergency break action (StopIO/Reboot) shutting
// down PROFINET"); IoAgentClose(ctx, ap); break;
// case pwr_eEmergBreakSelectEnum_NoAction:
// errh_Warning("PROFINET: Emergency break action (NoAction).
// Continuing..."); break;
// case pwr_eEmergBreakSelectEnum_FixedOutputValues:
// errh_Warning("PROFINET: Behaviour of FixedOutputValues should be
// configured on device level"); errh_Fatal("PROFINET: Emergency break
// action (Fixed Output Values)."); break;
// }
break;
case io_eEvent_IoCommEmergencyBreak:
break;
default:
break;
......
This diff is collapsed.
This diff is collapsed.
......@@ -8,6 +8,6 @@ demo_modules = $(pwrp_exe)/ra_status
demo_all : $(demo_modules)
$(pwrp_exe)/ra_status : $(pwrp_appl)/ra_status.c
$(pwrp_exe)/ra_status : $(pwrp_appl)/ra_status.cpp
@ echo "Building ra_status"
@ g++ -g -o $(target) $(source) -I$(pwr_inc) -L$(pwr_lib) -lpwr_rt -lpwr_co -lpwr_msg_dummy -lrpcsvc -lpthread -lm -lrt
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -2,3 +2,4 @@ VolPwrTest01a 0.254.254.201 PwrTest01a pwrtest01a 999 128 0.000000 0
VolPwrTest01b 0.254.254.202 PwrTest01b pwrtest01b 999 128 0.000000 0
VolPwrTest01c 0.254.254.203 PwrTest01c pwrtest01c 999 128 0.000000 0
VolPwrTest01d 0.254.254.204 PwrTest01d pwrtest01d 999 128 0.000000 1
VolPwrTest01d 0.254.254.204 copper_arrow copper-arrow 998 128 0.000000 0
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment