Commit c333d55a authored by claes's avatar claes

pwre config argument --version added to set fix loadfile version

parents 6aa46494 9dc551bf
......@@ -90,7 +90,7 @@ void sev_dbms_env::passwd(const char *passwd)
if (!passwd)
return;
m_passwd = (char *)realloc(m_passwd, strlen(passwd));
m_passwd = (char *)realloc(m_passwd, strlen(passwd)+1);
strcpy(m_passwd, passwd);
}
......
......@@ -872,7 +872,7 @@ int rt_sevhistmon::send_itemlist( pwr_tNid nid)
size += objectitem_cnt * (sizeof(sev_sHistItem) - sizeof(sev_sHistAttr)) + histobjectsize;
}
else {
size += (objectitem_cnt - 1) * (sizeof(sev_sHistItem) - sizeof(sev_sHistAttr)) + histobjectsize;
size += sizeof(sev_sMsgHistItems) + (objectitem_cnt - 1) * (sizeof(sev_sHistItem) - sizeof(sev_sHistAttr)) + histobjectsize;
}
......
......@@ -478,7 +478,7 @@ errh_CErrLog (
args[argno] = NULL;
s = get_header(get_severity(sts), string);
msg_vsprintf(s, msg, args, NULL);
msg_vsprintf(s, msg, args, (va_list)NULL);
errh_send(string, get_severity(sts), sts, errh_eMsgType_Log);
}
......
......@@ -444,3 +444,34 @@ void StoIpPtr_exec( plc_sThread *tp,
*o->Ptr = *o->InP;
}
/*_*
ENUMTOSTR
@aref enumtostr ENUMTOSTR
*/
void EnumToStr_init( pwr_sClass_EnumToStr *o)
{
if ( EVEN( gdh_GetEnumValueDef( o->TypeId, (gdh_sValueDef **)&o->EnumDefP, (int *)&o->EnumDefRows)))
o->EnumDefP = 0;
}
void EnumToStr_exec( plc_sThread *tp,
pwr_sClass_EnumToStr *o)
{
int i;
int found = 0;
if ( !o->EnumDefP)
return;
for ( i = 0; i < o->EnumDefRows; i++) {
if ( ((gdh_sValueDef *)o->EnumDefP)[i].Value->Value == *o->InP) {
strncpy( o->ActVal, ((gdh_sValueDef *)o->EnumDefP)[i].Value->Text, sizeof(o->ActVal));
found = 1;
break;
}
}
if ( !found)
strcpy( o->ActVal, "");
}
......@@ -18,6 +18,7 @@ export pwr_obj=$pwrb_root/obj
export pwr_inc=$pwrb_root/inc
export pwr_load=$pwrb_root/load
export pwr_lis=$pwrb_root/lis
export pwr_doc=$pwrb_root/doc
export pwrp_exe=$pwrp_root/x86_linux/exe
export pwrp_lib=$pwrp_root/x86_linux/lib
......@@ -30,8 +31,13 @@ export pwrp_db=$pwrp_root/common/db
export pwrp_web=$web_dir
export pwra_db=/usr/pwrp/adm/db
jdk=`eval ls /usr/local | grep ^jre`
export jdk_home=/usr/local/$jdk/bin
jdk=`eval ls -t /usr/local | grep -m 1 ^jdk`
if [ "$jdk" == "" ]; then
jdk=`eval ls -t /usr/local | grep -m 1 ^jre`
fi
export jdk=/usr/local/$jdk
export jdk_home=$jdk/bin
PATH=$PATH:$pwr_exe:$pwrp_exe:$jdk_home
#Set display to remote computer
......@@ -44,8 +50,6 @@ alias pwr_start="/etc/init.d/pwr start"
alias pwr="/etc/init.d/pwr"
alias boot="/usr/bin/sudo /sbin/reboot"
if [ -e $pwrp_exe/profile ]; then
source $pwrp_exe/profile
fi
......@@ -31,11 +31,13 @@ export pwrp_db=$pwrp_root/common/db
export pwrp_web=$web_dir
export pwra_db=/usr/pwrp/adm/db
jdk=`eval ls /usr/local | grep ^jre`
jdk=`eval ls -t /usr/local | grep -m 1 ^jdk`
if [ "$jdk" == "" ]; then
jdk=`eval ls /usr/local | grep ^jdk`
jdk=`eval ls -t /usr/local | grep -m 1 ^jre`
fi
export jdk_home=/usr/local/$jdk/bin
export jdk=/usr/local/$jdk
export jdk_home=$jdk/bin
PATH=$PATH:$pwr_exe:$pwrp_exe:$jdk_home
#Set display to remote computer
......@@ -51,8 +53,3 @@ alias boot="/usr/bin/sudo /sbin/reboot"
if [ -e $pwrp_exe/profile ]; then
source $pwrp_exe/profile
fi
......@@ -18,11 +18,12 @@ export pwr_obj=$pwrb_root/obj
export pwr_inc=$pwrb_root/inc
export pwr_load=$pwrb_root/load
export pwr_lis=$pwrb_root/lis
export pwr_doc=$pwrb_root/doc
export pwrp_exe=$pwrp_root/x86_64_linux/exe
export pwrp_lib=$pwrp_root/x86_64_linux/lib
export pwrp_obj=$pwrp_root/x86_64_linux/obj
export pwrp_lis=$pwrp_root/x86_64_linux/lis
export pwrp_exe=$pwrp_root/x86_linux/exe
export pwrp_lib=$pwrp_root/x86_linux/lib
export pwrp_obj=$pwrp_root/x86_linux/obj
export pwrp_lis=$pwrp_root/x86_linux/lis
export pwrp_inc=$pwrp_root/common/inc
export pwrp_load=$pwrp_root/common/load
export pwrp_log=$pwrp_root/common/log
......@@ -30,8 +31,13 @@ export pwrp_db=$pwrp_root/common/db
export pwrp_web=$web_dir
export pwra_db=/usr/pwrp/adm/db
jdk=`eval ls /usr/local | grep ^jre`
export jdk_home=/usr/local/$jdk/bin
jdk=`eval ls -t /usr/local | grep -m 1 ^jdk`
if [ "$jdk" == "" ]; then
jdk=`eval ls -t /usr/local | grep -m 1 ^jre`
fi
export jdk=/usr/local/$jdk
export jdk_home=$jdk/bin
PATH=$PATH:$pwr_exe:$pwrp_exe:$jdk_home
#Set display to remote computer
......@@ -44,8 +50,6 @@ alias pwr_start="/etc/init.d/pwr start"
alias pwr="/etc/init.d/pwr"
alias boot="/usr/bin/sudo /sbin/reboot"
if [ -e $pwrp_exe/profile ]; then
source $pwrp_exe/profile
fi
......@@ -20,10 +20,10 @@ export pwr_load=$pwrb_root/load
export pwr_lis=$pwrb_root/lis
export pwr_doc=$pwrb_root/doc
export pwrp_exe=$pwrp_root/x86_64_linux/exe
export pwrp_lib=$pwrp_root/x86_64_linux/lib
export pwrp_obj=$pwrp_root/x86_64_linux/obj
export pwrp_lis=$pwrp_root/x86_64_linux/lis
export pwrp_exe=$pwrp_root/x86_linux/exe
export pwrp_lib=$pwrp_root/x86_linux/lib
export pwrp_obj=$pwrp_root/x86_linux/obj
export pwrp_lis=$pwrp_root/x86_linux/lis
export pwrp_inc=$pwrp_root/common/inc
export pwrp_load=$pwrp_root/common/load
export pwrp_log=$pwrp_root/common/log
......@@ -31,11 +31,13 @@ export pwrp_db=$pwrp_root/common/db
export pwrp_web=$web_dir
export pwra_db=/usr/pwrp/adm/db
jdk=`eval ls /usr/local | grep ^jre`
jdk=`eval ls -t /usr/local | grep -m 1 ^jdk`
if [ "$jdk" == "" ]; then
jdk=`eval ls /usr/local | grep ^jdk`
jdk=`eval ls -t /usr/local | grep -m 1 ^jre`
fi
export jdk_home=/usr/local/$jdk/bin
export jdk=/usr/local/$jdk
export jdk_home=$jdk/bin
PATH=$PATH:$pwr_exe:$pwrp_exe:$jdk_home
#Set display to remote computer
......@@ -51,8 +53,3 @@ alias boot="/usr/bin/sudo /sbin/reboot"
if [ -e $pwrp_exe/profile ]; then
source $pwrp_exe/profile
fi
......@@ -18,6 +18,7 @@ export pwr_obj=$pwrb_root/obj
export pwr_inc=$pwrb_root/inc
export pwr_load=$pwrb_root/load
export pwr_lis=$pwrb_root/lis
export pwr_doc=$pwrb_root/doc
export pwrp_exe=$pwrp_root/x86_linux/exe
export pwrp_lib=$pwrp_root/x86_linux/lib
......@@ -30,8 +31,13 @@ export pwrp_db=$pwrp_root/common/db
export pwrp_web=$web_dir
export pwra_db=/usr/pwrp/adm/db
jdk=`eval ls /usr/local | grep ^jre`
export jdk_home=/usr/local/$jdk/bin
jdk=`eval ls -t /usr/local | grep -m 1 ^jdk`
if [ "$jdk" == "" ]; then
jdk=`eval ls -t /usr/local | grep -m 1 ^jre`
fi
export jdk=/usr/local/$jdk
export jdk_home=$jdk/bin
PATH=$PATH:$pwr_exe:$pwrp_exe:$jdk_home
#Set display to remote computer
......@@ -44,8 +50,6 @@ alias pwr_start="/etc/init.d/pwr start"
alias pwr="/etc/init.d/pwr"
alias boot="/usr/bin/sudo /sbin/reboot"
if [ -e $pwrp_exe/profile ]; then
source $pwrp_exe/profile
fi
......@@ -31,8 +31,13 @@ export pwrp_db=$pwrp_root/common/db
export pwrp_web=$web_dir
export pwra_db=/usr/pwrp/adm/db
jdk=`eval ls /usr/local | grep ^jre`
export jdk_home=/usr/local/$jdk/bin
jdk=`eval ls -t /usr/local | grep -m 1 ^jdk`
if [ "$jdk" == "" ]; then
jdk=`eval ls -t /usr/local | grep -m 1 ^jre`
fi
export jdk=/usr/local/$jdk
export jdk_home=$jdk/bin
PATH=$PATH:$pwr_exe:$pwrp_exe:$jdk_home
#Set display to remote computer
......@@ -48,8 +53,3 @@ alias boot="/usr/bin/sudo /sbin/reboot"
if [ -e $pwrp_exe/profile ]; then
source $pwrp_exe/profile
fi
......@@ -18,6 +18,7 @@ export pwr_obj=$pwrb_root/obj
export pwr_inc=$pwrb_root/inc
export pwr_load=$pwrb_root/load
export pwr_lis=$pwrb_root/lis
export pwr_doc=$pwrb_root/doc
export pwrp_exe=$pwrp_root/x86_linux/exe
export pwrp_lib=$pwrp_root/x86_linux/lib
......@@ -30,8 +31,13 @@ export pwrp_db=$pwrp_root/common/db
export pwrp_web=$web_dir
export pwra_db=/usr/pwrp/adm/db
jdk=`eval ls /usr/local | grep ^jre`
export jdk_home=/usr/local/$jdk/bin
jdk=`eval ls -t /usr/local | grep -m 1 ^jdk`
if [ "$jdk" == "" ]; then
jdk=`eval ls -t /usr/local | grep -m 1 ^jre`
fi
export jdk=/usr/local/$jdk
export jdk_home=$jdk/bin
PATH=$PATH:$pwr_exe:$pwrp_exe:$jdk_home
#Set display to remote computer
......@@ -44,8 +50,6 @@ alias pwr_start="/etc/init.d/pwr start"
alias pwr="/etc/init.d/pwr"
alias boot="/usr/bin/sudo /sbin/reboot"
if [ -e $pwrp_exe/profile ]; then
source $pwrp_exe/profile
fi
......@@ -31,8 +31,13 @@ export pwrp_db=$pwrp_root/common/db
export pwrp_web=$web_dir
export pwra_db=/usr/pwrp/adm/db
jdk=`eval ls /usr/local | grep ^jre`
export jdk_home=/usr/local/$jdk/bin
jdk=`eval ls -t /usr/local | grep -m 1 ^jdk`
if [ "$jdk" == "" ]; then
jdk=`eval ls -t /usr/local | grep -m 1 ^jre`
fi
export jdk=/usr/local/$jdk
export jdk_home=$jdk/bin
PATH=$PATH:$pwr_exe:$pwrp_exe:$jdk_home
#Set display to remote computer
......@@ -48,8 +53,3 @@ alias boot="/usr/bin/sudo /sbin/reboot"
if [ -e $pwrp_exe/profile ]; then
source $pwrp_exe/profile
fi
......@@ -18,6 +18,7 @@ export pwr_obj=$pwrb_root/obj
export pwr_inc=$pwrb_root/inc
export pwr_load=$pwrb_root/load
export pwr_lis=$pwrb_root/lis
export pwr_doc=$pwrb_root/doc
export pwrp_exe=$pwrp_root/x86_linux/exe
export pwrp_lib=$pwrp_root/x86_linux/lib
......@@ -30,8 +31,13 @@ export pwrp_db=$pwrp_root/common/db
export pwrp_web=$web_dir
export pwra_db=/usr/pwrp/adm/db
jdk=`eval ls /usr/local | grep ^jre`
export jdk_home=/usr/local/$jdk/bin
jdk=`eval ls -t /usr/local | grep -m 1 ^jdk`
if [ "$jdk" == "" ]; then
jdk=`eval ls -t /usr/local | grep -m 1 ^jre`
fi
export jdk=/usr/local/$jdk
export jdk_home=$jdk/bin
PATH=$PATH:$pwr_exe:$pwrp_exe:$jdk_home
#Set display to remote computer
......@@ -44,8 +50,6 @@ alias pwr_start="/etc/init.d/pwr start"
alias pwr="/etc/init.d/pwr"
alias boot="/usr/bin/sudo /sbin/reboot"
if [ -e $pwrp_exe/profile ]; then
source $pwrp_exe/profile
fi
......@@ -31,8 +31,13 @@ export pwrp_db=$pwrp_root/common/db
export pwrp_web=$web_dir
export pwra_db=/usr/pwrp/adm/db
jdk=`eval ls /usr/local | grep ^jre`
export jdk_home=/usr/local/$jdk/bin
jdk=`eval ls -t /usr/local | grep -m 1 ^jdk`
if [ "$jdk" == "" ]; then
jdk=`eval ls -t /usr/local | grep -m 1 ^jre`
fi
export jdk=/usr/local/$jdk
export jdk_home=$jdk/bin
PATH=$PATH:$pwr_exe:$pwrp_exe:$jdk_home
#Set display to remote computer
......@@ -48,8 +53,3 @@ alias boot="/usr/bin/sudo /sbin/reboot"
if [ -e $pwrp_exe/profile ]; then
source $pwrp_exe/profile
fi
......@@ -18,6 +18,7 @@ export pwr_obj=$pwrb_root/obj
export pwr_inc=$pwrb_root/inc
export pwr_load=$pwrb_root/load
export pwr_lis=$pwrb_root/lis
export pwr_doc=$pwrb_root/doc
export pwrp_exe=$pwrp_root/x86_linux/exe
export pwrp_lib=$pwrp_root/x86_linux/lib
......@@ -30,8 +31,13 @@ export pwrp_db=$pwrp_root/common/db
export pwrp_web=$web_dir
export pwra_db=/usr/pwrp/adm/db
jdk=`eval ls /usr/local | grep ^jre`
export jdk_home=/usr/local/$jdk/bin
jdk=`eval ls -t /usr/local | grep -m 1 ^jdk`
if [ "$jdk" == "" ]; then
jdk=`eval ls -t /usr/local | grep -m 1 ^jre`
fi
export jdk=/usr/local/$jdk
export jdk_home=$jdk/bin
PATH=$PATH:$pwr_exe:$pwrp_exe:$jdk_home
#Set display to remote computer
......@@ -44,8 +50,6 @@ alias pwr_start="/etc/init.d/pwr start"
alias pwr="/etc/init.d/pwr"
alias boot="/usr/bin/sudo /sbin/reboot"
if [ -e $pwrp_exe/profile ]; then
source $pwrp_exe/profile
fi
......@@ -31,8 +31,13 @@ export pwrp_db=$pwrp_root/common/db
export pwrp_web=$web_dir
export pwra_db=/usr/pwrp/adm/db
jdk=`eval ls /usr/local | grep ^jre`
export jdk_home=/usr/local/$jdk/bin
jdk=`eval ls -t /usr/local | grep -m 1 ^jdk`
if [ "$jdk" == "" ]; then
jdk=`eval ls -t /usr/local | grep -m 1 ^jre`
fi
export jdk=/usr/local/$jdk
export jdk_home=$jdk/bin
PATH=$PATH:$pwr_exe:$pwrp_exe:$jdk_home
#Set display to remote computer
......@@ -48,8 +53,3 @@ alias boot="/usr/bin/sudo /sbin/reboot"
if [ -e $pwrp_exe/profile ]; then
source $pwrp_exe/profile
fi
......@@ -28,7 +28,7 @@ SObject pwrb:Class
! @image orm_dtostr_fo.gif
!
! The DtoStr object converts the value of the digital input to
! at string stored in ActVal.
! a string stored in ActVal.
!
! Note that an erroneous format specification may cause the
! plcprogram to terminate. The size of the output of the conversion should
......
!
! Proview $Id: pwrb_c_dtostr.wb_load,v 1.9 2005-09-01 14:58:01 claes Exp $
! Copyright (C) 2005 SSAB Oxelsund AB.
!
! 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 the program, if not, write to the Free Software
! Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
!
! pwrb_c_enumtostr.wb_load -- Defines the class EnumToStr.
!
SObject pwrb:Class
!/**
! @Version 1.0
! @Code rt_plc_io.c
! @Group Plc,PlcString,PlcConversion
! @Summary Convert enumeration value to string
! Convert enumeration value to string.
! @image orm_enumtostr_fo.png
!
! The EnumToStr object converts the value of the enumeration input to
! the associated string.
!
! The enumeration value can be fetched as an integer, eg with a GetIp
! connected to the input pin.
!
! The enumeration type is specified in the TypeId attribute.
!*/
Object EnumToStr $ClassDef 543
Body SysBody
Attr Editor = pwr_eEditor_PlcEd
Attr Method = pwr_eMethod_Connections
Attr PopEditor = 2
EndBody
Object RtBody $ObjBodyDef 1
Body SysBody
Attr StructName = "EnumToStr"
EndBody
!/**
! Emumeration input that will be converted to string.
!*/
Object In $Input 1
Body SysBody
Attr TypeRef = "pwrs:Type-$Int32"
Attr Flags |= PWR_MASK_STATE
Attr Flags |= PWR_MASK_RTVIRTUAL
Attr Flags |= PWR_MASK_NOEDIT
Attr Flags |= PWR_MASK_NOREMOVE
Attr GraphName = "In"
EndBody
EndObject
!/**
! Enumeration type id, eg pwrb:Type-PIDModeEnum.
!*/
Object TypeId $Intern 2
Body SysBody
Attr TypeRef = "pwrs:Type-$TypeId"
EndBody
EndObject
!/**
! Pointer to the enum definition.
!*/
Object EnumDefP $Intern 3
Body SysBody
Attr Flags |= PWR_MASK_POINTER
Attr Flags |= PWR_MASK_PRIVATE
Attr Flags |= PWR_MASK_STATE
Attr Flags |= PWR_MASK_NOEDIT
Attr TypeRef = "pwrs:Type-$Float32"
EndBody
EndObject
!/**
! Size of enum definition.
!*/
Object EnumDefRows $Intern 4
Body SysBody
Attr Flags |= PWR_MASK_STATE
Attr Flags |= PWR_MASK_NOEDIT
Attr TypeRef = "pwrs:Type-$UInt32"
EndBody
EndObject
!/**
! Output that contains the string.
!*/
Object ActVal $Output 5
Body SysBody
Attr Flags |= PWR_MASK_STATE
Attr Flags |= PWR_MASK_NOEDIT
Attr TypeRef = "pwrs:Type-$String80"
Attr GraphName = "Val"
EndBody
EndObject
EndObject
Object DevBody $ObjBodyDef 2
Object PlcNode $Buffer 1
Body SysBody
Attr Class = pwr_eClass_PlcNode
Attr Flags |= PWR_MASK_INVISIBLE
EndBody
EndObject
EndObject
Object GraphPlcNode $GraphPlcNode
Body SysBody
Attr object_type = 11
Attr parameters[0] = 1
Attr parameters[1] = 3
Attr parameters[2] = 1
Attr parameters[3] = 0
Attr subwindows = 0
Attr graphmethod = 1
Attr graphindex = 0
Attr default_mask[0] = 1
Attr default_mask[1] = 1
Attr segname_annotation = 1
Attr compmethod = 35
Attr compindex = 0
Attr tracemethod = 0
Attr traceindex = 0
Attr executeordermethod = 2
Attr objname = "EnumToStr"
Attr graphname = "EnumToStr"
EndBody
EndObject
Object Template EnumToStr
Body RtBody
EndBody
EndObject
EndObject
EndSObject
......@@ -874,6 +874,7 @@ palette PlcEditorPalette
class DtoEnum
class DtoStr
class EnumToD
class EnumToStr
class Float64ToA
class Gray
class Int64toI
......
......@@ -39,7 +39,8 @@ typedef enum {
typedef enum {
crrgen_eTable_,
crrgen_eTable_Object,
crrgen_eTable_Signal
crrgen_eTable_Signal,
crrgen_eTable_SimSignal
} crrgen_eTable;
typedef struct sCrrKey
......@@ -133,7 +134,16 @@ static crrgen_tRefList reflist[] = {
{ pwr_cClass_Ao, "RtBody", "SigChanCon", crrgen_eType_Ref, crrgen_eTable_Object, 0},
{ pwr_cClass_Ii, "RtBody", "SigChanCon", crrgen_eType_Ref, crrgen_eTable_Object, 0},
{ pwr_cClass_Io, "RtBody", "SigChanCon", crrgen_eType_Ref, crrgen_eTable_Object, 0},
{ pwr_cClass_Co, "RtBody", "SigChanCon", crrgen_eType_Ref, crrgen_eTable_Object, 0} };
{ pwr_cClass_Co, "RtBody", "SigChanCon", crrgen_eType_Ref, crrgen_eTable_Object, 0},
{ pwr_cClass_resdi, "DevBody", "DiObject", crrgen_eType_Write, crrgen_eTable_SimSignal, 0},
{ pwr_cClass_setdi, "DevBody", "DiObject", crrgen_eType_Write, crrgen_eTable_SimSignal, 0},
{ pwr_cClass_stodi, "DevBody", "DiObject", crrgen_eType_Write, crrgen_eTable_SimSignal, 0},
{ pwr_cClass_toggledi, "DevBody", "DiObject", crrgen_eType_Write, crrgen_eTable_SimSignal, 0},
{ pwr_cClass_stopi, "DevBody", "CoObject", crrgen_eType_Write, crrgen_eTable_SimSignal, 0},
{ pwr_cClass_cstoai, "DevBody", "AiObject", crrgen_eType_Write, crrgen_eTable_SimSignal, 0},
{ pwr_cClass_stoai, "DevBody", "AiObject", crrgen_eType_Write, crrgen_eTable_SimSignal, 0},
{ pwr_cClass_cstoii, "DevBody", "IiObject", crrgen_eType_Write, crrgen_eTable_SimSignal, 0},
{ pwr_cClass_stoii, "DevBody", "IiObject", crrgen_eType_Write, crrgen_eTable_SimSignal, 0}};
static crrgen_tRefList codelist[] = {
{ pwr_cClass_dataarithm, "DevBody", "Code", crrgen_eType_, crrgen_eTable_, 0},
......@@ -234,12 +244,15 @@ wb_crrgen::~wb_crrgen()
tree_DeleteTable(&sts, m_signal_th);
}
void wb_crrgen::load( pwr_tStatus *rsts)
void wb_crrgen::load( pwr_tStatus *rsts, int sim)
{
pwr_tStatus sts;
for ( int i = 0; i < int(sizeof(reflist)/sizeof(reflist[0])); i++) {
if ( !sim && reflist[i].table == crrgen_eTable_SimSignal)
continue;
for ( wb_object o = m_sp->object( reflist[i].cid); o; o = o.next()) {
pwr_tAttrRef aref;
......@@ -276,6 +289,7 @@ void wb_crrgen::load( pwr_tStatus *rsts)
key.type = reflist[i].type;
switch ( reflist[i].table) {
case crrgen_eTable_Signal:
case crrgen_eTable_SimSignal:
tree_Insert(&sts, m_signal_th, &key);
break;
case crrgen_eTable_Object:
......
......@@ -36,7 +36,7 @@ class wb_crrgen {
public:
wb_crrgen( wb_session *sp);
~wb_crrgen();
void load( pwr_tStatus *sts);
void load( pwr_tStatus *sts, int sim = 0);
void write( pwr_tStatus *sts);
void write_code( pwr_tStatus *rsts);
};
......
......@@ -274,7 +274,8 @@ dcli_tCmdTable wnav_command_table[] = {
"/CLASS", "/DEBUG", "/NODECONFIG",
"/NAME", "/IDENTITY", "/FILES", "/OUT", "/IGNORE",
"/DIRECTORY", "/DATABASE", "/SERVER",
"/PLCPGM", "/HIERARCHY", "/FROM_PLCPGM", "/TEMPLATE", ""}
"/PLCPGM", "/HIERARCHY", "/FROM_PLCPGM", "/TEMPLATE",
"/SIMULATION", ""}
},
{
"NEW",
......@@ -4003,8 +4004,11 @@ static int wnav_create_func( void *client_data,
sts = wnav_wccm_get_ldhsession_cb( wnav, &wnav->ldhses);
if ( EVEN(sts)) return sts;
int simulate = ODD( dcli_get_qualifier( "/SIMULATION", 0, 0));
wb_crrgen crrgen( (wb_session *)wnav->ldhses);
crrgen.load( &sts);
crrgen.load( &sts, simulate);
crrgen.write( &sts);
crrgen.write_code( &sts);
}
......
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