Commit cc6b8836 authored by Claes Sjofors's avatar Claes Sjofors

User object removed, and integrated with WebHandler object

parent df2a1d6b
......@@ -273,9 +273,14 @@ mh_OutunitConnect (
break;
case pwr_cClass_OpPlace:
type = mh_eOutunitType_Operator;
l.pSelL = (void *)&((pwr_sClass_OpPlace*) p)->SelectList[0];
l.pSelL = (void *)&((pwr_sClass_OpPlace*) p)->EventSelectList[0];
l.SelectListIsUpdated = (pwr_tBoolean *)&((pwr_sClass_OpPlace*) p)->SelectListIsUpdated;
break;
case pwr_cClass_WebHandler:
type = mh_eOutunitType_Operator;
l.pSelL = (void *)&((pwr_sClass_WebHandler*) p)->EventSelectList[0];
l.SelectListIsUpdated = NULL;
break;
case pwr_cClass_EventPrinter:
type = mh_eOutunitType_Printer;
l.pSelL = (void *)&((pwr_sClass_EventPrinter*) p)->SelectList[0];
......
......@@ -107,6 +107,7 @@ conbackup <Backup connected to invalid attribute> /error
replaced <Symbol replaced> /info
nomodif <Nothing is modified> /info
compileparent <Compile parent window> /info
disabled <Object is disabled> /error
.facility FOE,280 /prefix = FOE__ ! Function object editor
......
......@@ -216,11 +216,11 @@ SObject pwrb:Class
! A message created by an ASup or DSup object gets the
! same identity as the supervised object. Messages
! produced in an application by means of mh_ApplMessage
! (see PROVIEW/R Programmer's Reference Manual) get an
! (see Proview Programmer's Reference Manual) get an
! identity according to the calling parameter EventName.
!
! SelectList specifies the hierarchies from which
! messages are to be sent to the user. Up to 8 different
! messages are to be sent to the user. Up to 20 different
! hierarchies can be specified. If messages from e.g. a
! Watchdog object in a node will be received, then the
! name of the node will be specified.
......@@ -228,7 +228,7 @@ SObject pwrb:Class
! Note! If the SelectList is left blank no message at all is
! sent to the user.
!*/
Object SelectList $Attribute 41
Object EventSelectList $Attribute 41
Body SysBody
Attr TypeRef = "pwrs:Type-$String80"
Attr Flags |= PWR_MASK_ARRAY
......@@ -254,11 +254,24 @@ SObject pwrb:Class
Attr TypeRef = "pwrs:Type-$String80"
EndBody
EndObject
!/**
! Obsolete from V4.7.0.
!*/
Object OpNumber $Attribute 2
Body SysBody
Attr TypeRef = "pwrs:Type-$Int32"
Attr Flags |= PWR_MASK_INVISIBLE
Attr Flags |= PWR_MASK_RTHIDE
EndBody
EndObject
EndObject
Object Template OpPlace
Body RtBody
Attr AlarmBell = 1
Attr BellDelay = 2
Attr OpWindPop = 3
Attr MaxNoOfAlarms = 200
Attr MaxNoOfEvents = 500
EndBody
EndObject
Object PostCreate $DbCallBack
......
......@@ -106,26 +106,6 @@ SObject pwrb:Class
Attr DefaultVMSNode = ""
EndBody
EndObject
Object PostCreate $DbCallBack
Body SysBody
Attr MethodName = "RttConfig-PostCreate"
EndBody
EndObject
Object ConfiguratorPoson $Menu
Object Pointed $Menu
Object Connect $MenuButton
Body SysBody
Attr ButtonName = "Connect User"
Attr MethodName = "$Objid-Connect"
Attr MethodArguments[0] = "UserObject"
Attr MethodArguments[1] = "User"
Attr FilterName = "$Objid-IsOkConnect"
Attr FilterArguments[0] = "UserObject"
Attr FilterArguments[1] = "User"
EndBody
EndObject
EndObject
EndObject
EndObject
EndSObject
......
......@@ -138,11 +138,13 @@ SObject pwrb:Class
EndBody
EndObject
!/**
! User object with data for the alarm and eventlist.
! Obsolete since V4.7.0.
!*/
Object UserObject $Attribute 10
Body SysBody
Attr TypeRef = "pwrs:Type-$Objid"
Attr Flags |= PWR_MASK_INVISIBLE
Attr Flags |= PWR_MASK_RTHIDE
EndBody
EndObject
!/**
......@@ -180,6 +182,62 @@ SObject pwrb:Class
Attr TypeRef = "pwrs:Type-$String256"
EndBody
EndObject
!/**
! A message created by an ASup or DSup object gets the
! same identity as the supervised object. Messages
! produced in an application by means of mh_ApplMessage
! (see Proview Programmer's Reference Manual) get an
! identity according to the calling parameter EventName.
!
! SelectList specifies the hierarchies from which
! messages are to be sent to the user. Up to 20 different
! hierarchies can be specified. If messages from e.g. a
! Watchdog object in a node will be received, then the
! name of the node will be specified.
!
! Note! If the SelectList is left blank no message at all is
! sent to the user.
!*/
Object EventSelectList $Attribute 41
Body SysBody
Attr TypeRef = "pwrs:Type-$String80"
Attr Flags |= PWR_MASK_ARRAY
Attr Elements = 20
EndBody
EndObject
!/**
! Specifies the maximum number of contemporary alarms in
! the user's alarm list.
! The number should exceed the maximum number of
! concurrent alarms in the system.
! If the limit is exceeded, alarms might be lost.
!*/
Object MaxNoOfAlarms $Attribute 38
Body SysBody
Attr TypeRef = "pwrs:Type-$UInt32"
EndBody
EndObject
!/**
! Specifies the maximum number of contemporary events in
! the user's event list, i.e. the skyline of the events.
! When the number of events exceeds MaxNoOfEvents the
! oldest event disappears from the list.
! To this list events are sent from the message handler
! in respective node. In each node the message handler
! has its own skyline of events (also named MaxNoOfEvents)
! defined by a MessageHandler object. In principle, the
! User object's skyline of events should be selected as å
! MaxNoOfEvents, added up over MaxNoOfEvents in the
! MessageHandler objects in all nodes throughout the
! PROVIEW/R system, or make it simple and assign the
! attribute e.g. 200.
!*/
Object MaxNoOfEvents $Attribute 39
Body SysBody
Attr TypeRef = "pwrs:Type-$UInt32"
Attr Flags = 0
EndBody
EndObject
EndObject
!
! Template for WebHandler
......@@ -188,6 +246,8 @@ SObject pwrb:Class
Body RtBody
Attr FileName = "index.html"
Attr MaxConnections = 50
Attr MaxNoOfAlarms = 200
Attr MaxNoOfEvents = 500
EndBody
EndObject
Object PostCreate $DbCallBack
......@@ -250,21 +310,6 @@ SObject pwrb:Class
EndObject
EndObject
EndObject
Object ConfiguratorPoson $Menu
Object Pointed $Menu
Object Connect $MenuButton
Body SysBody
Attr ButtonName = "Connect User"
Attr MethodName = "$Objid-Connect"
Attr MethodArguments[0] = "UserObject"
Attr MethodArguments[1] = "User"
Attr FilterName = "$Objid-IsOkConnect"
Attr FilterArguments[0] = "UserObject"
Attr FilterArguments[1] = "User"
EndBody
EndObject
EndObject
EndObject
EndObject
EndSObject
......
......@@ -137,3 +137,6 @@
090701 cs plc Env variable PWR_EXT_INC added to plc compile command. Replaces pwrp_cmn.
090803 cs wb Bugfix in loading wbload file with objects containing object attributes.
090804 cs wb Version check at package generation disabled for detached classvolumes.
090902 cs plc Compile error for reference to disabled signal (not in template code).
090909 cs wb Bugfix in Connect wb method, couldn't handle array element attributes.
090909 cs wb Limitation of wb_load files in one directory changed from 500 to 1000.
......@@ -312,9 +312,7 @@ palette NavigatorPalette
menu Operator
{
class OpPlace
class User
class XttGraph
class RttConfig
class WebBrowserConfig
}
class Application
......
......@@ -47,8 +47,7 @@ static pwr_tStatus PostCreate (
sts = ldh_ClassNameToId(Session, &cid, "OpPlace");
sts = ldh_CreateObject(Session, &oid, "Op", cid, Object, ldh_eDest_IntoLast);
sts = ldh_CreateObject(Session, &oid, "Maintenance", cid, Object, ldh_eDest_IntoLast);
sts = ldh_ClassNameToId(Session, &cid, "RttConfig");
sts = ldh_CreateObject(Session, &oid, "RttConfig", cid, Object, ldh_eDest_IntoLast);
sts = ldh_CreateObject(Session, &oid, "OpDefault", cid, Object, ldh_eDest_IntoLast);
sts = ldh_ClassNameToId(Session, &cid, "PlcProcess");
sts = ldh_CreateObject(Session, &oid, "Plc", cid, Object, ldh_eDest_IntoLast);
......
......@@ -19,6 +19,7 @@
/* wb_c_opplace.c -- work bench methods of the OpPlace class. */
#include <string.h>
#include "wb_pwrs.h"
#include "wb_pwrs_msg.h"
#include "wb_ldh.h"
......@@ -29,54 +30,22 @@ static pwr_tStatus PostCreate (
pwr_tOid Father,
pwr_tCid Class
) {
pwr_tOid oid;
pwr_tCid cid;
pwr_tStatus sts;
pwr_tInt32 *number;
pwr_tInt32 max_number = 0;
pwr_tObjName name;
pwr_tMask value = 1;
int size;
sts = ldh_ClassNameToId(Session, &cid, "OpPlace");
sts = ldh_ObjidToName( Session, Object, ldh_eName_Object,
name, sizeof(name), &size);
if ( EVEN(sts)) return sts;
// Get next OpNumber
sts = ldh_GetClassList(Session, cid, &oid);
while ( ODD(sts)) {
sts = ldh_GetObjectPar(Session, oid, "RtBody", "OpNumber", (char **)&number,
&size);
if ( EVEN(sts)) return sts;
if ( *number > max_number)
max_number = *number;
free( (char *) number);
sts = ldh_GetNextObject(Session, oid, &oid);
}
sts = ldh_ClassNameToId(Session, &cid, "User");
if ( EVEN(sts)) return sts;
sts = ldh_GetClassList(Session, cid, &oid);
while ( ODD(sts)) {
sts = ldh_GetObjectPar(Session, oid, "RtBody", "OpNumber", (char **)&number,
&size);
if ( strcmp( name, "OpDefault") == 0) {
// Set OpHide in OpWindLayout
sts = ldh_SetObjectPar( Session, Object, "RtBody",
"OpWindLayout", (char *) &value, sizeof(value));
if ( EVEN(sts)) return sts;
if ( *number > max_number)
max_number = *number;
free( (char *) number);
sts = ldh_GetNextObject(Session, oid, &oid);
}
max_number++;
sts = ldh_CreateObject(Session, &oid, "User", cid, Object, ldh_eDest_IntoLast);
if ( EVEN(sts)) return sts;
sts = ldh_SetObjectPar(Session, Object, "RtBody", "OpNumber", (char *)&max_number,
sizeof(max_number));
if ( EVEN(sts)) return sts;
sts = ldh_SetObjectPar(Session, oid, "RtBody", "OpNumber", (char *)&max_number,
sizeof(max_number));
if ( EVEN(sts)) return sts;
return PWRS__SUCCESS;
}
......
......@@ -56,55 +56,7 @@ static pwr_tStatus PostCreate (
pwr_tOid Father,
pwr_tCid Class
) {
pwr_tOid oid;
pwr_tCid cid;
pwr_tStatus sts;
pwr_tInt32 *number;
pwr_tInt32 max_number = 0;
int size;
sts = ldh_ClassNameToId(Session, &cid, "OpPlace");
if ( EVEN(sts)) return sts;
// Get next OpNumber
sts = ldh_GetClassList(Session, cid, &oid);
while ( ODD(sts)) {
sts = ldh_GetObjectPar(Session, oid, "RtBody", "OpNumber", (char **)&number,
&size);
if ( EVEN(sts)) return sts;
if ( *number > max_number)
max_number = *number;
free( (char *) number);
sts = ldh_GetNextObject(Session, oid, &oid);
}
sts = ldh_ClassNameToId(Session, &cid, "User");
if ( EVEN(sts)) return sts;
sts = ldh_GetClassList(Session, cid, &oid);
while ( ODD(sts)) {
sts = ldh_GetObjectPar(Session, oid, "RtBody", "OpNumber", (char **)&number,
&size);
if ( EVEN(sts)) return sts;
if ( *number > max_number)
max_number = *number;
free( (char *) number);
sts = ldh_GetNextObject(Session, oid, &oid);
}
max_number++;
sts = ldh_CreateObject(Session, &oid, "User", cid, Object, ldh_eDest_IntoLast);
if ( EVEN(sts)) return sts;
sts = ldh_SetObjectPar(Session, oid, "RtBody", "OpNumber", (char *)&max_number,
sizeof(max_number));
if ( EVEN(sts)) return sts;
sts = ldh_SetObjectPar(Session, Object, "RtBody", "UserObject", (char *)&oid,
sizeof(oid));
if ( EVEN(sts)) return sts;
// Nothing to do from V4.7.0 ...
return PWRB__SUCCESS;
}
......
......@@ -51,7 +51,6 @@ pwr_dImport pwr_BindMethods(Io);
pwr_dImport pwr_BindMethods(XttGraph);
pwr_dImport pwr_BindMethods(WebGraph);
pwr_dImport pwr_BindMethods(OpPlace);
pwr_dImport pwr_BindMethods(RttConfig);
pwr_dImport pwr_BindMethods(WebHandler);
pwr_dImport pwr_BindMethods(PlcProcess);
pwr_dImport pwr_BindMethods(PlcThread);
......@@ -90,7 +89,6 @@ pwr_dExport pwr_BindClasses(Base) = {
pwr_BindClass(XttGraph),
pwr_BindClass(WebGraph),
pwr_BindClass(OpPlace),
pwr_BindClass(RttConfig),
pwr_BindClass(WebHandler),
pwr_BindClass(PlcProcess),
pwr_BindClass(PlcThread),
......
......@@ -309,6 +309,8 @@ static wbl_sSym attr_flags[] =
,{ "PWR_MASK_BUFFER", PWR_MASK_BUFFER }
,{ "PWR_MASK_NOWBL", PWR_MASK_NOWBL }
,{ "PWR_MASK_ALWAYSWBL", PWR_MASK_ALWAYSWBL }
,{ "PWR_MASK_DISABLEATTR", PWR_MASK_DISABLEATTR }
,{ "PWR_MASK_RTHIDE", PWR_MASK_RTHIDE }
,{ "pwr_mClassDef_DevOnly", pwr_mClassDef_DevOnly }
,{ "pwr_mClassDef_System", pwr_mClassDef_System }
......
......@@ -136,4 +136,12 @@
090601 cs ge New action: SetValue to set a specified value into an attribute.
090625 cs xtt Bugfix in eventlist, adding event in a full list could cause segfault.
090625 cs xtt Blocklist window title was wrong.
090811 cs xtt Command 'create item' with null destination creaets item on toplevel.
\ No newline at end of file
090810 cs xtt Blockwindow: checkbuttons changed to radiobuttons.
090811 cs xtt Command 'create item' with null destination creaets item on toplevel.
090828 cs xtt Help menu links updated to new Operator's Guide.
090902 cs ge Dynamic Invisible works for Int64 and UInt64.
090902 cs flow Bugfix in flow, if two objects overlapped, both were moved by the move event.
090916 cs xtt New operator window layout with menu and status bar.
090916 cs xtt Alarm time viewed in operator window.
090916 cs xtt New xtt command 'show objectlist /class='.
090916 cs xtt New xtt commands 'create opmenuitem' and 'delete opmenuitem' to modify operator window menu..
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