Commit d78d3eda authored by Claes Sjofors's avatar Claes Sjofors

IO objects, PostCreate method to automatically insert ThreadObject

parent a5c0399d
......@@ -18,3 +18,5 @@ BaseFcPPO3
BaseFcPPO3MotorAggr
BaseFcPPO5
BaseFcPPO5MotorAggr
BaseIORack
BaseIOCard
\ No newline at end of file
/*
* Proview $Id$
* 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.
**/
/* wb_c_baseiocard.cpp -- work bench methods of the BaseIOCard class */
#include <stdio.h>
#include <string.h>
#include "wb_pwrs.h"
#include "wb_ldh_msg.h"
#include "wb_pwrb_msg.h"
#include "pwr_baseclasses.h"
#include "pwr_basecomponentclasses.h"
#include "wb_ldh.h"
#include "wb_wsx.h"
#include "wb_dbcb.h"
//
// Syntax check.
//
static pwr_tStatus SyntaxCheck (
ldh_tSesContext Session,
pwr_tAttrRef Object, /* current object */
int *ErrorCount, /* accumulated error count */
int *WarningCount /* accumulated waring count */
) {
return wsx_CheckIoDevice( Session, Object, ErrorCount, WarningCount, wsx_mCardOption_ErrorLimits);
}
static pwr_tStatus PostCreate (
ldh_tSesContext Session,
pwr_tOid Object,
pwr_tOid Father,
pwr_tCid Class
) {
return dbcb_InsertPlcThreadObject( Session, Object);
}
//
// Every method to be exported to the workbench should be registred here.
//
pwr_dExport pwr_BindMethods(BaseIOCard) = {
pwr_BindMethod(SyntaxCheck),
pwr_BindMethod(PostCreate),
pwr_NullMethod
};
/*
* Proview $Id$
* 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.
**/
/* wb_c_baseiorack.cpp -- work bench methods of the BaseIORack class */
#include <stdio.h>
#include <string.h>
#include "wb_pwrs.h"
#include "wb_ldh_msg.h"
#include "wb_pwrb_msg.h"
#include "pwr_baseclasses.h"
#include "pwr_basecomponentclasses.h"
#include "wb_ldh.h"
#include "wb_wsx.h"
#include "wb_dbcb.h"
//
// Syntax check.
//
static pwr_tStatus SyntaxCheck (
ldh_tSesContext Session,
pwr_tAttrRef Object, /* current object */
int *ErrorCount, /* accumulated error count */
int *WarningCount /* accumulated waring count */
) {
return wsx_CheckIoDevice( Session, Object, ErrorCount, WarningCount, wsx_mCardOption_ErrorLimits);
}
static pwr_tStatus PostCreate (
ldh_tSesContext Session,
pwr_tOid Object,
pwr_tOid Father,
pwr_tCid Class
) {
return dbcb_InsertPlcThreadObject( Session, Object);
}
//
// Every method to be exported to the workbench should be registred here.
//
pwr_dExport pwr_BindMethods(BaseIORack) = {
pwr_BindMethod(SyntaxCheck),
pwr_BindMethod(PostCreate),
pwr_NullMethod
};
Volume BaseComponent $ClassVolume 0.0.0.10
Body SysBody 01-JAN-1970 01:00:00.00
Attr NextOix = "_X11592"
Attr NextOix = "_X11595"
Attr NextCix = "_X198"
Attr NextTix[0] = "_X16"
EndBody
......@@ -173962,6 +173962,11 @@ OA2 = A4 + (OA1 - 5) / 90 * (A3 - A4);"
EndObject
EndObject
EndObject
Object PostCreate $DbCallBack 11593 05-OCT-2010 14:15:26.58
Body SysBody 05-OCT-2010 14:15:37.12
Attr MethodName = "BaseIORack-PostCreate"
EndBody
EndObject
Object Template BaseIORack 2191753216 01-JAN-1970 01:00:00.00
Body RtBody 30-MAY-2008 15:10:17.39
Attr Process = 1
......@@ -174116,6 +174121,11 @@ OA2 = A4 + (OA1 - 5) / 90 * (A3 - A4);"
EndObject
EndObject
EndObject
Object PostCreate $DbCallBack 11595 05-OCT-2010 14:16:53.73
Body SysBody 05-OCT-2010 14:16:53.73
Attr MethodName = "BaseIOCard-PostCreate"
EndBody
EndObject
Object Template BaseIOCard 2191491072 01-JAN-1970 01:00:00.00
Body RtBody 30-MAY-2008 15:10:41.04
Attr Process = 1
Volume OtherIO $ClassVolume 0.0.250.10
Body SysBody 01-JAN-1970 01:00:00.00
Attr NextOix = "_X122"
Attr NextOix = "_X136"
Attr NextCix = "_X15"
Attr NextTix[0] = "_X5"
EndBody
......@@ -394,6 +394,11 @@ Volume OtherIO $ClassVolume 0.0.250.10
EndBody
EndObject
EndObject
Object PostCreate $DbCallBack 123 05-OCT-2010 15:35:40.46
Body SysBody 05-OCT-2010 15:35:59.88
Attr MethodName = "BaseIORack-PostCreate"
EndBody
EndObject
Object Template MotionControl_USB 2147975168 01-JAN-1970 01:00:00.00
Body RtBody 15-NOV-2007 14:37:52.21
Attr Process = 1
......@@ -537,6 +542,11 @@ Volume OtherIO $ClassVolume 0.0.250.10
EndBody
EndObject
EndObject
Object PostCreate $DbCallBack 124 05-OCT-2010 15:36:18.64
Body SysBody 05-OCT-2010 15:36:27.11
Attr MethodName = "BaseIOCard-PostCreate"
EndBody
EndObject
Object Template MotionControl_USBIO 2148237312 01-JAN-1970 01:00:00.00
Body RtBody 15-NOV-2007 14:38:59.75
Attr Super.Specification = "Motion Control USB I/O"
......@@ -791,6 +801,11 @@ Volume OtherIO $ClassVolume 0.0.250.10
EndBody
EndObject
EndObject
Object PostCreate $DbCallBack 125 05-OCT-2010 15:36:59.75
Body SysBody 05-OCT-2010 15:36:59.75
Attr MethodName = "BaseIORack-PostCreate"
EndBody
EndObject
Object Template Modbus_TCP_Slave 2148499456 01-JAN-1970 01:00:00.00
Body RtBody 05-SEP-2008 11:08:41.87
Attr Process = 1
......@@ -961,7 +976,7 @@ Volume OtherIO $ClassVolume 0.0.250.10
! 4: The card is handled by an application program.
!*/
Object Process $Attribute 3 08-FEB-2008 11:19:22.97
Body SysBody 03-SEP-2008 16:02:36.20
Body SysBody 05-OCT-2010 12:36:41.90
Attr PgmName = "Process"
Attr TypeRef = "pwrb:Type-IoProcessMask"
EndBody
......@@ -1008,6 +1023,11 @@ Volume OtherIO $ClassVolume 0.0.250.10
EndBody
EndObject
EndObject
Object PostCreate $DbCallBack 126 05-OCT-2010 15:37:20.63
Body SysBody 05-OCT-2010 15:37:26.85
Attr MethodName = "BaseIOCard-PostCreate"
EndBody
EndObject
Object Template Modbus_Module 2148761600 01-JAN-1970 01:00:00.00
Body RtBody 16-MAR-2010 08:26:27.97
Attr Continous = 1
......@@ -1064,9 +1084,9 @@ Volume OtherIO $ClassVolume 0.0.250.10
! 4: The master is handled by an application program.
!*/
Object Process $Attribute 3 03-SEP-2008 16:02:28.05
Body SysBody 03-SEP-2008 16:02:46.70
Body SysBody 05-OCT-2010 12:36:50.82
Attr PgmName = "Process"
Attr TypeRef = "pwrs:Type-$UInt16"
Attr TypeRef = "pwrb:Type-IoProcessMask"
EndBody
EndObject
!/**
......@@ -1103,6 +1123,11 @@ Volume OtherIO $ClassVolume 0.0.250.10
EndBody
EndObject
EndObject
Object PostCreate $DbCallBack 127 05-OCT-2010 15:37:42.26
Body SysBody 05-OCT-2010 15:37:42.26
Attr MethodName = "BaseIORack-PostCreate"
EndBody
EndObject
Object Template Modbus_Master 2149023744 01-JAN-1970 01:00:00.00
Body RtBody 05-SEP-2008 11:07:48.32
Attr Process = 1
......@@ -1309,6 +1334,11 @@ Volume OtherIO $ClassVolume 0.0.250.10
EndBody
EndObject
EndObject
Object PostCreate $DbCallBack 128 05-OCT-2010 15:38:02.12
Body SysBody 05-OCT-2010 15:38:02.12
Attr MethodName = "BaseIORack-PostCreate"
EndBody
EndObject
Object Template Modbus_TCP_Server 2149285888 01-JAN-1970 01:00:00.00
Body RtBody 03-MAR-2010 16:51:13.57
Attr Process = 1
......@@ -1446,6 +1476,11 @@ Volume OtherIO $ClassVolume 0.0.250.10
EndBody
EndObject
EndObject
Object PostCreate $DbCallBack 129 05-OCT-2010 15:38:06.84
Body SysBody 05-OCT-2010 15:38:16.94
Attr MethodName = "BaseIOCard-PostCreate"
EndBody
EndObject
Object Template Modbus_TCP_ServerModule 2149548032 01-JAN-1970 01:00:00.00
Body RtBody 03-MAR-2010 16:49:58.18
Attr Process = 1
......@@ -1533,6 +1568,11 @@ Volume OtherIO $ClassVolume 0.0.250.10
EndBody
EndObject
EndObject
Object PostCreate $DbCallBack 130 05-OCT-2010 15:38:41.84
Body SysBody 05-OCT-2010 15:38:41.84
Attr MethodName = "BaseIORack-PostCreate"
EndBody
EndObject
Object Template GPIO 2149810176 01-JAN-1970 01:00:00.00
Body RtBody 15-APR-2010 21:57:21.82
Attr Process = 1
......@@ -1620,6 +1660,11 @@ Volume OtherIO $ClassVolume 0.0.250.10
EndBody
EndObject
EndObject
Object PostCreate $DbCallBack 131 05-OCT-2010 15:38:45.44
Body SysBody 05-OCT-2010 15:38:49.68
Attr MethodName = "BaseIOCard-PostCreate"
EndBody
EndObject
Object Template GPIO_Module 2150072320 01-JAN-1970 01:00:00.00
Body RtBody 15-APR-2010 21:57:34.91
Attr Process = 1
......@@ -1679,6 +1724,11 @@ Volume OtherIO $ClassVolume 0.0.250.10
EndObject
EndObject
EndObject
Object PostCreate $DbCallBack 132 05-OCT-2010 15:39:04.13
Body SysBody 05-OCT-2010 15:39:04.13
Attr MethodName = "BaseIORack-PostCreate"
EndBody
EndObject
Object Template OneWire 2151120896 01-JAN-1970 01:00:00.00
Body RtBody 06-JUN-2010 18:34:08.77
Attr Process = 1
......@@ -1752,6 +1802,11 @@ Volume OtherIO $ClassVolume 0.0.250.10
EndBody
EndObject
EndObject
Object PostCreate $DbCallBack 133 05-OCT-2010 15:39:14.21
Body SysBody 05-OCT-2010 15:39:20.09
Attr MethodName = "BaseIOCard-PostCreate"
EndBody
EndObject
Object Template Maxim_DS18B20 2151383040 01-JAN-1970 01:00:00.00
Body RtBody 06-JUN-2010 18:34:27.07
Attr Super.Specification = "Maxim 1-Wire temperature sensor DS18B10"
......@@ -1869,6 +1924,11 @@ Volume OtherIO $ClassVolume 0.0.250.10
EndBody
EndObject
EndObject
Object PostCreate $DbCallBack 134 05-OCT-2010 15:39:41.65
Body SysBody 05-OCT-2010 15:39:41.65
Attr MethodName = "BaseIORack-PostCreate"
EndBody
EndObject
Object Template USB_Agent 2150334464 01-JAN-1970 01:00:00.00
Body RtBody 23-MAY-2010 20:28:40.31
Attr Process = 1
......@@ -1960,6 +2020,11 @@ Volume OtherIO $ClassVolume 0.0.250.10
EndObject
EndObject
EndObject
Object PostCreate $DbCallBack 135 05-OCT-2010 15:39:49.27
Body SysBody 05-OCT-2010 15:39:49.27
Attr MethodName = "BaseIORack-PostCreate"
EndBody
EndObject
Object Template Velleman_K8055 2150596608 01-JAN-1970 01:00:00.00
Body RtBody 23-MAY-2010 20:28:30.66
Attr Process = 1
......
Volume Profibus $ClassVolume 0.0.250.7
Body SysBody 05-SEP-2005 17:51:40.00
Attr NextOix = "_X173"
Attr NextOix = "_X180"
Attr NextCix = "_X18"
Attr NextTix[0] = "_X9"
EndBody
......@@ -1353,6 +1353,11 @@ Volume Profibus $ClassVolume 0.0.250.7
EndBody
EndObject
EndObject
Object PostCreate $DbCallBack 175 05-OCT-2010 16:25:39.14
Body SysBody 05-OCT-2010 16:25:47.90
Attr MethodName = "BaseIORack-PostCreate"
EndBody
EndObject
Object Template Pb_DP_Slave 2149285888 01-JAN-1970 01:00:00.00
Body RtBody 01-JAN-1970 01:00:00.00
Attr Process = 1
......@@ -1683,6 +1688,11 @@ Volume Profibus $ClassVolume 0.0.250.7
EndBody
EndObject
EndObject
Object PostCreate $DbCallBack 174 05-OCT-2010 16:24:53.44
Body SysBody 05-OCT-2010 16:25:08.43
Attr MethodName = "BaseIOCard-PostCreate"
EndBody
EndObject
EndObject
!/**
! @Author Claes Jurstrand
......@@ -2062,6 +2072,11 @@ Volume Profibus $ClassVolume 0.0.250.7
EndBody
EndObject
EndObject
Object PostCreate $DbCallBack 176 05-OCT-2010 16:25:58.92
Body SysBody 05-OCT-2010 16:26:04.76
Attr MethodName = "BaseIORack-PostCreate"
EndBody
EndObject
EndObject
!/**
! @Author Ferdinand Hauck
......@@ -2391,6 +2406,11 @@ Volume Profibus $ClassVolume 0.0.250.7
EndBody
EndObject
EndObject
Object PostCreate $DbCallBack 177 05-OCT-2010 16:26:20.18
Body SysBody 05-OCT-2010 16:26:37.57
Attr MethodName = "BaseIORack-PostCreate"
EndBody
EndObject
Object Template Pb_Hilscher 2151383040 01-JAN-1970 01:00:00.00
Body RtBody 09-DEC-2008 13:24:06.12
Attr Process = 1
......@@ -2482,9 +2502,15 @@ Volume Profibus $ClassVolume 0.0.250.7
EndBody
EndObject
EndObject
Object PostCreate $DbCallBack 178 05-OCT-2010 16:26:44.04
Body SysBody 05-OCT-2010 16:26:50.55
Attr MethodName = "BaseIORack-PostCreate"
EndBody
EndObject
Object Template PnControllerSoftingPNAK 2151645184 01-JAN-1970 01:00:00.00
Body RtBody 27-AUG-2010 15:41:46.62
Body RtBody 05-OCT-2010 10:58:25.78
Attr EthernetDevice = "eth0"
Attr Process = 1
EndBody
EndObject
EndObject
......@@ -2726,8 +2752,14 @@ Volume Profibus $ClassVolume 0.0.250.7
EndBody
EndObject
EndObject
Object PostCreate $DbCallBack 179 05-OCT-2010 16:27:03.21
Body SysBody 05-OCT-2010 16:27:09.73
Attr MethodName = "BaseIORack-PostCreate"
EndBody
EndObject
Object Template PnDevice 2151907328 01-JAN-1970 01:00:00.00
Body RtBody 01-JAN-1970 01:00:00.00
Body RtBody 05-OCT-2010 10:58:35.33
Attr Process = 1
EndBody
EndObject
EndObject
......@@ -2822,6 +2854,11 @@ Volume Profibus $ClassVolume 0.0.250.7
EndBody
EndObject
EndObject
Object PostCreate $DbCallBack 180 05-OCT-2010 16:27:14.53
Body SysBody 05-OCT-2010 16:27:14.53
Attr MethodName = "BaseIOCard-PostCreate"
EndBody
EndObject
Object Template PnModule 2152169472 01-JAN-1970 01:00:00.00
Body RtBody 01-JAN-1970 01:00:00.00
EndBody
......
Volume SsabOx $ClassVolume 0.0.250.5
Body SysBody 01-JAN-1970 01:00:00.00
Attr NextOix = "_X175"
Attr NextOix = "_X182"
Attr NextCix = "_X33"
Attr NextTix[0] = "_X5"
EndBody
......@@ -206,7 +206,7 @@ Volume SsabOx $ClassVolume 0.0.250.5
Body SysBody 01-JAN-1970 01:00:00.00
Attr Editor = 0
Attr Method = 5
Attr Flags = 16464
Attr Flags = 49232
EndBody
Object RtBody $ObjBodyDef 1 06-OCT-2005 14:45:53.00
Body SysBody 01-JAN-1970 01:00:00.00
......@@ -371,6 +371,11 @@ Volume SsabOx $ClassVolume 0.0.250.5
EndObject
EndObject
EndObject
Object PostCreate $DbCallBack 177 05-OCT-2010 11:14:29.89
Body SysBody 05-OCT-2010 16:18:40.17
Attr MethodName = "BaseIOCard-PostCreate"
EndBody
EndObject
EndObject
!/**
! @Version 1.0
......@@ -574,6 +579,11 @@ Volume SsabOx $ClassVolume 0.0.250.5
EndBody
EndObject
EndObject
Object PostCreate $DbCallBack 178 05-OCT-2010 16:19:01.60
Body SysBody 05-OCT-2010 16:19:01.60
Attr MethodName = "BaseIOCard-PostCreate"
EndBody
EndObject
Object Template Ssab_BaseDiCard 2148499456 06-OCT-2005 14:45:53.00
Body RtBody 01-JAN-1970 01:00:00.00
Attr ErrorSoftLimit = 15
......@@ -848,6 +858,11 @@ Volume SsabOx $ClassVolume 0.0.250.5
EndBody
EndObject
EndObject
Object PostCreate $DbCallBack 179 05-OCT-2010 16:19:07.83
Body SysBody 05-OCT-2010 16:19:07.83
Attr MethodName = "BaseIOCard-PostCreate"
EndBody
EndObject
Object Template Ssab_BaseDoCard 2148761600 06-OCT-2005 14:45:53.00
Body RtBody 01-JAN-1970 01:00:00.00
Attr ErrorSoftLimit = 15
......@@ -1026,6 +1041,11 @@ Volume SsabOx $ClassVolume 0.0.250.5
EndObject
EndObject
EndObject
Object PostCreate $DbCallBack 180 05-OCT-2010 16:19:16.62
Body SysBody 05-OCT-2010 16:19:16.62
Attr MethodName = "BaseIOCard-PostCreate"
EndBody
EndObject
Object Template Ssab_BaseMCard 2155839488 01-JAN-1970 01:00:00.00
Body RtBody 01-JAN-1970 01:00:00.00
EndBody
......@@ -4412,6 +4432,11 @@ Volume SsabOx $ClassVolume 0.0.250.5
EndBody
EndObject
EndObject
Object PostCreate $DbCallBack 181 05-OCT-2010 16:19:35.86
Body SysBody 05-OCT-2010 16:19:35.86
Attr MethodName = "BaseIOCard-PostCreate"
EndBody
EndObject
EndObject
!/**
! @Version 1.0
......@@ -4588,6 +4613,11 @@ Volume SsabOx $ClassVolume 0.0.250.5
EndBody
EndObject
EndObject
Object PostCreate $DbCallBack 182 05-OCT-2010 16:19:58.63
Body SysBody 05-OCT-2010 16:19:58.63
Attr MethodName = "BaseIOCard-PostCreate"
EndBody
EndObject
Object Template Ssab_PIDuP 2155577344 01-JAN-1970 01:00:00.00
Body RtBody 02-APR-2009 08:35:02.91
Attr ErrorSoftLimit = 100
......
......@@ -278,6 +278,17 @@ palette NavigatorPalette
class Siemens_ET200M_IM153
}
}
menu Profinet
{
menu Controller
{
class PnControllerSoftingPNAK
}
menu Devices
{
class PnDevice
}
}
menu Modbus_TCP
{
class Modbus_Master
......@@ -289,10 +300,29 @@ palette NavigatorPalette
class Modbus_TCP_ServerModule
}
}
menu MotionControl_USBIO
menu GPIO
{
class MotionControl_USB
class MotionControl_USBIO
class GPIO
class GPIO_Module
}
menu OneWire
{
class OneWire
class Maxim_DS18B20
}
menu USB
{
class USB_Agent
menu Velleman_K8055
{
class Velleman_K8055
class Velleman_K8055_Board
}
menu MotionControl_USBIO
{
class MotionControl_USB
class MotionControl_USBIO
}
}
}
menu Remote
......
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