Commit 9a50a70f authored by Claes's avatar Claes

Merge branch 'master' of 62.20.65.89:/data1/git/pwr

parents 962afb16 c333d55a
......@@ -706,7 +706,7 @@ short DevExitBoard( unsigned short usDevNumber)
{
DEVIO_EXITCMD tBuffer;
unsigned int lBytesReturned;
unsigned short usDrvOpenCount;
unsigned short usDrvOpenCount = 0;
short sRet = DRV_NO_ERROR;
if( hDevDrv == INVALID_HANDLE_VALUE) {
......@@ -1798,7 +1798,7 @@ short RunFirmwareDownload( unsigned short usDevNumber,
tSendMsg.rx = RCS_TASK;
tSendMsg.tx = MSG_SYSTEM_TX;
tSendMsg.ln = (unsigned char)lSendLen;
tSendMsg.nr = ++tSendMsg.nr;
tSendMsg.nr++; // tSendMsg.nr = ++tSendMsg.nr;
tSendMsg.a = 0;
tSendMsg.f = 0;
tSendMsg.b = RCS_B_LOADFKT;
......@@ -1838,7 +1838,7 @@ short RunFirmwareDownload( unsigned short usDevNumber,
case RCS_CONT_MSK:
tSendMsg.e = RCS_CONT_MSK;
tSendMsg.ln = (unsigned char)lSendLen;
tSendMsg.nr = ++tSendMsg.nr;
tSendMsg.nr++; // tSendMsg.nr = ++tSendMsg.nr;
// Send next message
memcpy ( &tSendMsg.data[0], &pabData[lActIdx], lSendLen);
......@@ -1871,7 +1871,7 @@ short RunFirmwareDownload( unsigned short usDevNumber,
case RCS_LAST_MSK:
tSendMsg.ln = (unsigned char)lSendLen;
tSendMsg.nr = ++tSendMsg.nr;
tSendMsg.nr++; // tSendMsg.nr = ++tSendMsg.nr;
tSendMsg.e = RCS_LAST_MSK;
memcpy ( &tSendMsg.data[0], &pabData[lActIdx] , lSendLen);
......@@ -1994,7 +1994,7 @@ short RunConfigDownload( unsigned short usDevNumber,
tSendMsg.rx = RCS_TASK;
tSendMsg.tx = MSG_SYSTEM_TX;
tSendMsg.ln = (unsigned char)lSendLen;
tSendMsg.nr = ++tSendMsg.nr;
tSendMsg.nr++; // tSendMsg.nr = ++tSendMsg.nr;
tSendMsg.a = 0;
tSendMsg.f = 0;
tSendMsg.b = RCS_B_LOADFKT;
......@@ -2031,7 +2031,7 @@ short RunConfigDownload( unsigned short usDevNumber,
tSendMsg.rx = RCS_TASK;
tSendMsg.tx = MSG_SYSTEM_TX;
tSendMsg.ln = (unsigned char)lSendLen;
tSendMsg.nr = ++tSendMsg.nr;
tSendMsg.nr++; // tSendMsg.nr = ++tSendMsg.nr;
tSendMsg.a = 0;
tSendMsg.f = 0;
tSendMsg.b = RCS_B_LOADFKT;
......
......@@ -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;
}
......
......@@ -67,10 +67,8 @@
# define SET_VERSION(a, b, c, d) ((pwr_tVersion)((a << 24) + (a << 16) + (a << 8) + a))
#endif
#define pwrv_cBuildTimeStr "14-JAN-2011 20:00:00"
#define pwrv_cPwrVersionStr "V4.8.1"
#define pwrv_cPwrVersion SET_VERSION('V', 4, 8, 1)
#define pwrv_cPwrVersionStr "V4.8.2"
#define pwrv_cPwrVersion SET_VERSION('V', 4, 8, 2)
#define pwrv_cWbdbVersionShortStr "V48"
#define pwrv_cPwrCopyright "Copyright (C) 2005-2011 SSAB Oxelsund"
......
......@@ -24,8 +24,10 @@
extern "C" {
#endif
/* co_ccm.h -- script interpreter */
#define CCM_DECL_STRING 1
#define CCM_DECL_INT 2
#define CCM_DECL_FLOAT 3
......@@ -120,7 +122,7 @@ typedef struct ccm_sFunc_ {
struct ccm_sFunc_ *next;
} ccm_sFunc;
typedef struct {
typedef struct ccm_sFileCtx_ {
ccm_sLine *main_start_line;
ccm_sLine *main_end_line;
int verify;
......@@ -160,7 +162,7 @@ typedef struct {
ccm_sOperand *list;
} *ccm_tRowCtx;
typedef struct {
typedef struct ccm_sFuncCtx_ {
char msg[80];
ccm_tFileCtx filectx;
ccm_sIntvar *locint_list;
......@@ -182,7 +184,7 @@ typedef struct {
} ccm_sSysFunc;
typedef struct {
typedef struct ccm_sSingeLineCtx_ {
ccm_tFuncCtx funcctx;
int result_decl;
ccm_tFloat result_float;
......
......@@ -83,7 +83,7 @@ int dcli_get_defaultfilename(
char *outname,
const char *ext);
#if defined (OS_LYNX) || defined(OS_LINUX) || defined(OS_MACOS) || defined OS_FREEBSD
int dcli_replace_env( char *str, char *newstr);
int dcli_replace_env( const char *str, char *newstr);
#endif
char *dcli_fgetname( FILE *fp, char *name, char *def_name);
int dcli_translate_filename( char *out, const char *in);
......
......@@ -150,7 +150,7 @@ int dcli_get_defaultfilename(
* will be detected.
*
**************************************************************************/
int dcli_replace_env( char *str, char *newstr)
int dcli_replace_env( const char *str, char *newstr)
{
char *s;
char *t;
......
......@@ -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);
}
......
......@@ -37,7 +37,7 @@
typedef struct s_ASupLstLink sASupLstLink;
typedef struct s_DSupLstLink sDSupLstLink;
typedef struct {
typedef struct io_sSupCtx_ {
sASupLstLink *TimerLstP;
sASupLstLink *ASupAnaLstP;
sDSupLstLink *DSupDigLstP;
......
......@@ -420,7 +420,7 @@ mh_OutunitReceive ()
return MH__QCOMGETMSG;
}
switch (msg.type.b) {
switch ((int)msg.type.b) {
case qcom_eBtype_qcom:
fromQcom(&msg);
......
......@@ -252,7 +252,7 @@ ConvertPut (
* Neth version 7 and later. If this is needed for more messages
* then a generic solution must be implemented.
*/
if (put->type.s == net_eMsg_volumes7) {
if (put->type.s == (qcom_eStype)net_eMsg_volumes7) {
put->type.s = net_eMsg_volumes;
fXdr = xdr_net_sVolumes7;
}
......@@ -303,7 +303,7 @@ ConvertGet (
* then a generic solution must be implemented.
*/
fXdr = func_xdr[(int)get->type.s];
if (get->type.s == net_eMsg_volumes) {
if (get->type.s == (qcom_eStype)net_eMsg_volumes) {
gdb_ScopeLock {
gnp = hash_Search(&lsts, gdbroot->nid_ht, &np->nid);
netver = gnp->netver;
......@@ -520,7 +520,7 @@ Request (
if (
get->type.b != net_cMsgClass ||
get->type.s != subtype
get->type.s != (qcom_eStype)subtype
) {
qcom_Free(NULL, gmp);
pwr_Return(NULL, sts, QCOM__WEIRD);
......
......@@ -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, "");
}
......@@ -1334,7 +1334,7 @@ void rt_procom::provideStatus( pwr_tStatus rsts)
{
pwr_tStatus sts;
switch( m_getmsg->type.s) {
switch( (int)m_getmsg->type.s) {
case net_eMsg_getObjectInfo: {
qcom_sPut put;
net_sGetObjectInfoR *rmp;
......
......@@ -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
Package: pwr48
Version: 4.8.1-2
Version: 4.8.2-1
Section: base
Priority: optional
Architecture: i386
Depends: libc6 (>= 2.12.1-0ubuntu6), libgtk2.0-0 (>= 2.22.0-0ubuntu1), libasound2 (>= 1.0.23-1ubuntu2), libdb4.8 (>=4.8.30-1), libdb4.8++ (>=4.8.30-1), libmysql++3 (>= 3.0.9-1ubuntu2), g++ (>= 4:4.4.4-1ubuntu2)
Depends: libc6 (>= 2.13-0ubuntu13), libgtk2.0-0 (>= 2.24.4-0ubuntu2), libasound2 (>= 1.0.24.1-0ubuntu5), libdb4.8 (>=4.8.30-5ubuntu2), libdb4.8++ (>=4.8.30-5ubuntu2), libmysql++3 (>= 3.0.9-1ubuntu2), g++ (>= 4:4.5.2-1ubuntu3), xfonts-100dpi
Replaces: pwrrt,pwr34,pwr39,pwr40,pwr41,pwr42,pwr43,pwr44,pwr45,pwr46,pwr47
Maintainer: Proview <postmaster@proview.se>
Description: Proview development and runtime environment package
......@@ -25,3 +25,8 @@ Description: Proview development and runtime environment package
- Wb object editor, Ctrl DoubleClick MB1 didn't work on attribute references.
- Flow alloc color problem fixed.
- wb locale fix for ubuntu.
4.8.2-1
- Support for Hilscher cifX boards.
- Support for Hilscher cifX Profinet Controller.
- UDP communication configured with IO objects.
- Support for USB joystick.
......@@ -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
Package: pwrdemo48
Version: 4.8.1-2
Version: 4.8.2-1
Section: base
Priority: optional
Architecture: i386
Depends: pwr48 (>= 4.8.1-2)
Depends: pwr48 (>= 4.8.2-1)
Replaces:
Maintainer: Proview <postmaster@proview.se>
Description: Proview Demo Project package
......
Package: pwrrt
Version: 4.8.1-2
Version: 4.8.2-1
Section: base
Priority: optional
Architecture: i386
Depends: libc6 (>= 2.12.1-0ubuntu6), libgtk2.0-0 (>= 2.22.0-0ubuntu1), libasound2 (>= 1.0.23-1ubuntu2), libdb4.8 (>=4.8.30-1)
Depends: libc6 (>= 2.13-0ubuntu13), libgtk2.0-0 (>= 2.24.4-0ubuntu2), libasound2 (>= 1.0.24.1-0ubuntu5), libdb4.8 (>=4.8.30-5ubuntu2), xfonts-100dpi
Replaces: pwr34,pwr39,pwr40,pwr41,pwr42,pwr43,pwr44,pwr45,pwr46,pwr47,pwr48
Maintainer: Proview <postmaster@proview.se>
Description:
......
......@@ -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
Package: pwrsev
Version: 4.8.1-2
Version: 4.8.2-1
Section: base
Priority: optional
Architecture: i386
Depends: libc6 (>= 2.12.1-0ubuntu6), libgtk2.0-0 (>= 2.22.0-0ubuntu1), libasound2 (>= 1.0.23-1ubuntu2), libdb4.8 (>=4.8.30-1), libmysql++3 (>= 3.0.9-1ubuntu2)
Depends: libc6 (>= 2.13-0ubuntu13), libgtk2.0-0 (>= 2.24.4-0ubuntu2), libasound2 (>= 1.0.24.1-0ubuntu5), libdb4.8 (>=4.8.30-5ubuntu2), libmysql++3 (>= 3.0.9-1ubuntu2), xfonts-100dpi
Replaces: pwr34,pwr39,pwr40,pwr41,pwr42,pwr43,pwr44,pwr45,pwr46,pwr47,pwr48
Maintainer: Proview <postmaster@proview.se>
Description:
......
Package: pwr48
Version: 4.8.1-2
Version: 4.8.2-1
Section: base
Priority: optional
Architecture: amd64
Depends: libc6 (>= 2.12.1-0ubuntu6), libgtk2.0-0 (>= 2.22.0-0ubuntu1), libasound2 (>= 1.0.23-1ubuntu2), libdb4.8 (>=4.8.30-1), libdb4.8++ (>=4.8.30-1), libmysql++3 (>= 3.0.9-1ubuntu2), g++ (>= 4:4.4.4-1ubuntu2)
Depends: libc6 (>= 2.13-0ubuntu13), libgtk2.0-0 (>= 2.24.4-0ubuntu2), libasound2 (>= 1.0.24.1-0ubuntu5), libdb4.8 (>=4.8.30-5ubuntu2), libdb4.8++ (>=4.8.30-5ubuntu2), libmysql++3 (>= 3.0.9-1ubuntu2), g++ (>= 4:4.5.2-1ubuntu3), xfonts-100dpi
Replaces: pwrrt,pwr34,pwr39,pwr40,pwr41,pwr42,pwr43,pwr44,pwr45,pwr46,pwr47
Maintainer: Proview <postmaster@proview.se>
Description: Proview development and runtime environment package
......@@ -25,3 +25,8 @@ Description: Proview development and runtime environment package
- Wb object editor, Ctrl DoubleClick MB1 didn't work on attribute references.
- Flow alloc color problem fixed.
- wb locale fix for ubuntu.
4.8.2-1
- Support for Hilscher cifX boards.
- Support for Hilscher cifX Profinet Controller.
- UDP communication configured with IO objects.
- Support for USB joystick.
......@@ -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
Package: pwrdemo48
Version: 4.8.1-2
Version: 4.8.2-1
Section: base
Priority: optional
Architecture: amd64
Depends: pwr48 (>= 4.8.1-2)
Depends: pwr48 (>= 4.8.2-1)
Replaces:
Maintainer: Proview <postmaster@proview.se>
Description: Proview Demo Project package
......
Package: pwrrt
Version: 4.8.1-2
Version: 4.8.2-1
Section: base
Priority: optional
Architecture: amd64
Depends: libc6 (>= 2.10.1-0ubuntu16), libgtk2.0-0 (>= 2.18.3-1ubuntu2.2), libasound2 (>= 1.0.20-3ubuntu6.1), libdb4.7 (>=4.7.25-7ubuntu2)
Depends: libc6 (>= 2.13-0ubuntu13), libgtk2.0-0 (>= 2.24.4-0ubuntu2), libasound2 (>= 1.0.24.1-0ubuntu5), libdb4.8 (>=4.8.30-5ubuntu2), xfonts-100dpi
Replaces: pwr34,pwr39,pwr40,pwr41,pwr42,pwr43,pwr44,pwr45,pwr46,pwr47
Maintainer: Proview <postmaster@proview.se>
Description:
......
......@@ -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
Package: pwrsev
Version: 4.8.1-2
Version: 4.8.2-1
Section: base
Priority: optional
Architecture: amd64
Depends: libc6 (>= 2.10.1-0ubuntu16), libgtk2.0-0 (>= 2.18.3-1ubuntu2.2), libasound2 (>= 1.0.20-3ubuntu6.1), libdb4.7 (>=4.7.25-7ubuntu2), libmysqlclient15off (>= 5.1.30really5.0.83-0ubuntu3)
Depends: libc6 (>= 2.13-0ubuntu13), libgtk2.0-0 (>= 2.24.4-0ubuntu2), libasound2 (>= 1.0.24.1-0ubuntu5), libdb4.8 (>=4.8.30-5ubuntu2), libmysql++3 (>= 3.0.9-1ubuntu2), xfonts-100dpi
Replaces: pwr34,pwr39,pwr40,pwr41,pwr42,pwr43,pwr44,pwr45,pwr46,pwr47
Maintainer: Proview <postmaster@proview.se>
Description:
......
......@@ -150,7 +150,7 @@ sub configure()
exit 1;
}
my $fname = $ENV{"pwre_bin"} . "/pwre_configure.sh";
my $fname = $ENV{"pwre_bin"} . "/pwre_configure.sh"." ".$_[0]." ".$_[1]." ".$_[2];
system( $fname);
}
......@@ -276,6 +276,7 @@ sub ebuild # args: pass flavour
my $build_opc = 0;
my $build_profibus = 0;
my $build_otherio = 0;
my $build_misc = 0;
my $build_ssabox = 0;
my $build_tlog = 0;
my $build_othermanu = 0;
......@@ -297,6 +298,7 @@ sub ebuild # args: pass flavour
elsif ( $value[0] eq "opc" && $value[1] eq "1" ) { $build_opc = 1; printf( "-- opc\n");}
elsif ( $value[0] eq "profibus" && $value[1] eq "1" ) { $build_profibus = 1; printf( "-- profibus\n");}
elsif ( $value[0] eq "otherio" && $value[1] eq "1" ) { $build_otherio = 1; printf( "-- otherio\n");}
elsif ( $value[0] eq "misc" && $value[1] eq "1" ) { $build_misc = 1; printf( "-- misc\n");}
elsif ( $value[0] eq "ssabox" && $value[1] eq "1" ) { $build_ssabox = 1; printf( "-- ssabox\n");}
elsif ( $value[0] eq "tlog" && $value[1] eq "1" ) { $build_tlog = 1; printf( "-- tlog\n");}
elsif ( $value[0] eq "othermanu" && $value[1] eq "1" ) { $build_othermanu = 1; printf( "-- othermanu\n");}
......@@ -367,6 +369,11 @@ sub ebuild # args: pass flavour
_build("lib", "rt", "src", "all");
merge();
}
if ( $build_misc == 1) {
_module("misc");
_build("lib", "misc", "src", "all");
merge();
}
if ( $build_ssabox == 1) {
_module("ssabox");
_build("lib", "rt", "src", "all");
......@@ -435,6 +442,10 @@ sub ebuild # args: pass flavour
_module("telemecanique");
merge();
}
if ( $build_misc == 1) {
_module("misc");
merge();
}
}
elsif ( $pass eq "op" ) {
_module("xtt");
......@@ -511,6 +522,11 @@ sub ebuild # args: pass flavour
_build("mmi", "*", "src", "copy");
merge();
}
if ( $build_misc == 1) {
_module("misc");
_build("mmi", "*", "src", "copy");
merge();
}
if ( $build_ssabox == 1) {
_module("ssabox");
_build("mmi", "*", "src", "copy");
......@@ -591,6 +607,9 @@ sub build_all_modules ()
_module("opc");
build_all( $flavour);
merge();
_module("misc");
build_all( $flavour);
merge();
_module("ssabox");
build_all( $flavour);
merge();
......@@ -689,6 +708,11 @@ sub build_all_wbl ()
system( "rm $load_dir/*.dbs");
_build("wbl", "bcomp", "src", "lib");
merge();
_module("misc");
my($load_dir) = $ENV{"pwr_load"};
system( "rm $load_dir/*.dbs");
_build("wbl", "misc", "src", "lib");
merge();
_module("ssabox");
my($load_dir) = $ENV{"pwr_load"};
system( "rm $load_dir/*.dbs");
......
#!/bin/bash
pwre_help()
{
cat <<EOF
pwre_configure.h
Arguments
--help Display help.
--version State fix version of loadfiles, eg
pwre configure --version "29-MAY-2011 16:00:00"
EOF
}
pwre_config_init()
{
d=`eval date +\"%F %X\"`
......@@ -115,6 +129,8 @@ pwre_config_check_lib()
conf_libmq=$conf_libmq" -l${lib%.*}"
elif test $4 == "wmq"; then
conf_libwmq=$conf_libwmq" -l${lib%.*}"
elif test $4 == "libusb"; then
conf_lib=$conf_lib" -lusb-1.0"
else
conf_lib=$conf_lib" -l${lib%%.*}"
fi
......@@ -213,7 +229,7 @@ conf_incdirgtk=""
let inc_cnt=0
let lib_cnt=0
let i=0
hwpl=`eval uname -i`
# Bash
if [ "$SHELL" != "/bin/bash" ] && [ "$SHELL" != "/usr/local/bin/bash" ]; then
......@@ -247,11 +263,26 @@ if test ! -e $pwre_croot; then
exit
fi
# Options
if [ "$1" = "--help" ]; then
pwre_help
exit
elif [ "$1" = "--version" ] && [ "$2" != "" ] && [ "$3" != "" ]; then
buildversion=$2" "$3
fi
pwre_create_blddir
pwre_create_makedir
pwre_config_init
if [ "$buildversion" != "" ]; then
echo "export PWRE_CONF_BUILDVERSION=\"$buildversion\"" >> $cfile
else
echo "export PWRE_CONF_BUILDVERSION=\"0\"" >> $cfile
fi
if test $pwre_hw == "hw_arm"; then
pwre_config_check_include jni JNI 1 $jdk/include/jni.h
......@@ -301,34 +332,40 @@ if test $pwre_hw == "hw_arm"; then
else
#Gtk
echo ""
echo "Mandatory :"
pwre_config_check_lib gtk GTK gtk gtk 0 /usr/lib/libgtk-x11-2.0.so
pwre_config_check_lib motif MRM motif motif 0 /usr/lib/libMrm.so
pwre_config_check_lib libantlr LIBANTLR lib wb 0 /usr/local/lib/libantlr.a
pwre_config_check_lib librpcsvc LIBRPCSVC lib lib 0 /usr/lib/librpcsvc.so:/usr/lib/librpcsvc.a
pwre_config_check_lib librpcsvc LIBRPCSVC lib lib 0 /usr/lib/librpcsvc.so:/usr/lib/librpcsvc.a:/usr/lib/$hwpl-linux-gnu/librpcsvc.a
pwre_config_check_lib libasound LIBASOUND lib lib 0 /usr/lib/libasound.so:/usr/lib/libasound.a
pwre_config_check_lib libpthread LIBPTHREAD lib lib 0 /usr/lib/libpthread.so:/usr/lib/libpthread.a
pwre_config_check_lib libm LIBM lib lib 0 /usr/lib/libm.so:/usr/lib/libm.a
pwre_config_check_lib libdb LIBDB lib lib 0 /usr/lib/libdb.so
pwre_config_check_lib libdb_cxx LIBDB_CXX lib wb 0 /usr/lib/libdb_cxx.so
pwre_config_check_lib libz LIBZ lib lib 0 /usr/lib/libz.so:/usr/lib/libz.a
pwre_config_check_lib libcrypt LIBCRYPT lib lib 0 /usr/lib/libcrypt.so:/usr/lib/libcrypt.a
pwre_config_check_lib libpthread LIBPTHREAD lib lib 0 /usr/lib/libpthread.so:/usr/lib/libpthread.a:/usr/lib/$hwpl-linux-gnu/libpthread.so
pwre_config_check_lib libm LIBM lib lib 0 /usr/lib/libm.so:/usr/lib/libm.a:/usr/lib/$hwpl-linux-gnu/libm.so
pwre_config_check_lib libdb LIBDB lib lib 0 /usr/lib/libdb.so:/usr/lib/$hwpl-linux-gnu/libdb.so
pwre_config_check_lib libdb_cxx LIBDB_CXX lib wb 0 /usr/lib/libdb_cxx.so:/usr/lib/$hwpl-linux-gnu/libdb_cxx.so
pwre_config_check_lib libz LIBZ lib lib 0 /usr/lib/libz.so:/usr/lib/libz.a:/usr/lib/$hwpl-linux-gnu/libz.so
pwre_config_check_lib libcrypt LIBCRYPT lib lib 0 /usr/lib/libcrypt.so:/usr/lib/libcrypt.a:/usr/lib/$hwpl-linux-gnu/libcrypt.so
pwre_config_check_lib librt LIBRT lib lib 0 /usr/lib/librt.so:/usr/lib/librt.a:/usr/lib/$hwpl-linux-gnu/librt.so
pwre_config_check_lib libfl LIBFL lib lib 0 /usr/lib/libfl.so:/usr/lib/libfl.a
pwre_config_check_lib libX11 LIBX11 lib lib 0 /usr/lib/libX11.so:/usr/lib/$hwpl-linux-gnu/libX11.so
pwre_config_check_include antlr ANTLR 1 /usr/local/include/antlr/CommonAST.hpp
pwre_config_check_include gtk GTK 1 /usr/local/include/gtk-2.0/gtk.h:/usr/local/include/gtk-2.0/gtk/gtk.h:/usr/include/gtk-2.0/gtk/gtk.h
pwre_config_check_include jni JNI 1 $jdk/include/jni.h
pwre_config_check_include jni JNI 0 $jdk/include/linux/jni_md.h
echo ""
echo "Optional :"
pwre_config_check_lib motif MRM motif motif 0 /usr/lib/libMrm.so
pwre_config_check_lib mysql MYSQL lib lib 1 /usr/lib/libmysqlclient.so:/usr/lib/mysql/libmysqlclient.so
pwre_config_check_lib mq MQ lib mq 1 /usr/lib/libdmq.so
pwre_config_check_lib wmq WMQ lib wmq 1 /usr/lib/libmqic.so
pwre_config_check_lib libpnioif PNAK lib lib 1 /usr/lib/libpnioif.a:/usr/local/lib/libpnioif.a
pwre_config_check_lib libusb LIBUSB lib lib 1 /usr/lib/libusb-1.0.so
pwre_config_check_lib libusb LIBUSB lib libusb 1 /usr/lib/libusb-1.0.so
pwre_config_check_lib libcifx LIBCIFX lib lib 1 /usr/lib/libcifx.so.1
pwre_config_check_lib librt LIBRT lib lib 0 /usr/lib/librt.so:/usr/lib/librt.a
pwre_config_check_lib libfl LIBFL lib lib 0 /usr/lib/libfl.so:/usr/lib/libfl.a
pwre_config_check_lib libX11 LIBX11 lib lib 0 /usr/lib/libX11.so
#set -o xtrace
pwre_config_check_include antlr ANTLR 1 /usr/local/include/antlr/CommonAST.hpp
pwre_config_check_include gtk GTK 1 /usr/local/include/gtk-2.0/gtk.h:/usr/local/include/gtk-2.0/gtk/gtk.h:/usr/include/gtk-2.0/gtk/gtk.h
pwre_config_check_include jni JNI 1 $jdk/include/jni.h
pwre_config_check_include jni JNI 0 $jdk/include/linux/jni_md.h
pwre_config_check_include wmq WMQ 1 /opt/mqm/inc/cmqc.h
pwre_config_check_include cifx CIFX 1 /usr/local/include/cifx/cifxlinux.h
......
......@@ -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
......@@ -352,7 +352,22 @@ elif [ $OpSys -eq $OpSys_X86_LINUX ]; then
Compile$FileTypeStr
exit $gcg_status
elif [ $CurrentOpSys -eq $OpSys_X86_64_LINUX ]; then
echo "-- Not built for x86_linux"
# echo "-- Trying to build for x86_linux"
export pwr_exe=$pwrb_root/os_linux/hw_x86/exp/exe
export pwr_lib=$pwrb_root/os_linux/hw_x86/exp/lib
export pwr_obj=$pwrb_root/os_linux/hw_x86/exp/obj
export pwrp_exe=$pwrp_root/bld/x86_linux/exe
export pwrp_lib=$pwrp_root/bld/x86_linux/lib
export pwrp_obj=$pwrp_root/bld/x86_linux/obj
cc_cmd="$cc -c -x c -w -m32 -fPIC $cc_debug -D_REENTRANT -DOS_LINUX -I$pwr_inc -I$pwrp_inc -I$pwrp_tmp $PWR_EXT_INC"
ldxx="g++ -m32 -fPIC"
FileTypeStr="`echo $vFileType| cut -f $FileTypeIdx -d ,`"
# Execute build command
Compile$FileTypeStr
exit $gcg_status
fi
elif [ $OpSys -eq $OpSys_X86_64_LINUX ]; then
......@@ -368,7 +383,22 @@ elif [ $OpSys -eq $OpSys_X86_64_LINUX ]; then
Compile$FileTypeStr
exit $gcg_status
elif [ $CurrentOpSys -eq $OpSys_X86_LINUX ]; then
echo "-- Not built for x86_64_linux"
# echo "-- Trying to build for x86_64_linux"
export pwr_exe=$pwrb_root/os_linux/hw_x86_64/exp/exe
export pwr_lib=$pwrb_root/os_linux/hw_x86_64/exp/lib
export pwr_obj=$pwrb_root/os_linux/hw_x86_64/exp/obj
export pwrp_exe=$pwrp_root/bld/x86_64_linux/exe
export pwrp_lib=$pwrp_root/bld/x86_64_linux/lib
export pwrp_obj=$pwrp_root/bld/x86_64_linux/obj
cc_cmd="$cc -c -x c -w -m64 -fPIC $cc_debug -D_REENTRANT -DOS_LINUX -I$pwr_inc -I$pwrp_inc -I$pwrp_tmp $PWR_EXT_INC"
ldxx="g++ -m64 -fPIC"
FileTypeStr="`echo $vFileType| cut -f $FileTypeIdx -d ,`"
# Execute build command
Compile$FileTypeStr
exit $gcg_status
fi
elif [ $OpSys -eq $OpSys_AXP_VMS ]; then
......
......@@ -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);
};
......
......@@ -273,8 +273,9 @@ dcli_tCmdTable wnav_command_table[] = {
"/LASTCHILD", "/VOLUME", "/ALL",
"/CLASS", "/DEBUG", "/NODECONFIG",
"/NAME", "/IDENTITY", "/FILES", "/OUT", "/IGNORE",
"/DIRECTORY", "/BUILDVERSION", "/DATABASE", "/SERVER",
"/PLCPGM", "/HIERARCHY", "/FROM_PLCPGM", "/TEMPLATE", ""}
"/DIRECTORY", "/DATABASE", "/SERVER",
"/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);
}
......@@ -4014,9 +4018,9 @@ static int wnav_create_func( void *client_data,
pwr_tFileName outstr;
char *outstr_p;
int ignore;
int buildversion;
pwr_tStatus sts;
pwr_tTime buildtime, *timep;
char *s;
// Command is "CREATE SNAPSHOT"
......@@ -4032,15 +4036,22 @@ static int wnav_create_func( void *client_data,
outstr_p = 0;
ignore = ODD( dcli_get_qualifier( "/IGNORE", 0, 0));
buildversion = ODD( dcli_get_qualifier( "/BUILDVERSION", 0, 0));
if ( buildversion) {
time_AsciiToA( pwrv_cBuildTimeStr, &buildtime);
if ( (s = getenv( "PWRE_CONF_BUILDVERSION"))) {
if ( strcmp( s, "") == 0 ||
strcmp( s, "0") == 0)
timep = 0;
else {
if ( ODD(time_AsciiToA( s, &buildtime)))
timep = &buildtime;
else {
wnav->message('E', "Syntax error in PWRE_CONF_BUILDVERSION");
return WNAV__SYNTAX;
}
}
}
else
timep = 0;
sts = wnav_wccm_get_wbctx_cb( wnav, &wnav->wbctx);
if ( EVEN(sts)) return 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