Commit 5541f8e8 authored by Claes Sjofors's avatar Claes Sjofors

EventSelectList added to RttConfig object

parent 0269ee4c
...@@ -281,6 +281,11 @@ mh_OutunitConnect ( ...@@ -281,6 +281,11 @@ mh_OutunitConnect (
l.pSelL = (void *)&((pwr_sClass_WebHandler*) p)->EventSelectList[0]; l.pSelL = (void *)&((pwr_sClass_WebHandler*) p)->EventSelectList[0];
l.SelectListIsUpdated = NULL; l.SelectListIsUpdated = NULL;
break; break;
case pwr_cClass_RttConfig:
type = mh_eOutunitType_Operator;
l.pSelL = (void *)&((pwr_sClass_RttConfig*) p)->EventSelectList[0];
l.SelectListIsUpdated = NULL;
break;
case pwr_cClass_EventPrinter: case pwr_cClass_EventPrinter:
type = mh_eOutunitType_Printer; type = mh_eOutunitType_Printer;
l.pSelL = (void *)&((pwr_sClass_EventPrinter*) p)->SelectList[0]; l.pSelL = (void *)&((pwr_sClass_EventPrinter*) p)->SelectList[0];
......
...@@ -457,51 +457,48 @@ static int rtt_rttconfig() ...@@ -457,51 +457,48 @@ static int rtt_rttconfig()
{ {
pwr_tObjid objid; pwr_tObjid objid;
pwr_tOName hiername; pwr_tOName hiername;
int found;
int sts; int sts;
pwr_tFileName filename; pwr_tFileName filename;
pwr_sClass_OpPlace *opplace_p; pwr_sClass_RttConfig *conf_p;
if ( rtt_ConfigureObject[0]) if ( rtt_ConfigureObject[0]) {
{
strcpy( hiername, rtt_ConfigureObject); strcpy( hiername, rtt_ConfigureObject);
sts = gdh_NameToObjid ( hiername, &objid); sts = gdh_NameToObjid ( hiername, &objid);
if ( EVEN(sts)) return sts; if ( EVEN(sts)) return sts;
} }
else else {
{ // Look for rttconfig object
// Look for default opplace
pwr_tOid oid; pwr_tOid oid;
pwr_tOName name; pwr_tOName name;
found = 0; sts = gdh_GetClassList( pwr_cClass_RttConfig, &oid);
for ( sts = gdh_GetClassList( pwr_cClass_OpPlace, &oid); if ( EVEN(sts))
ODD(sts); return RTT__OBJNOTFOUND;
sts = gdh_GetNextObject( oid, &oid)) {
sts = gdh_ObjidToName( oid, name, sizeof(name), cdh_mName_object); sts = gdh_ObjidToName( oid, name, sizeof(name), cdh_mName_path | cdh_mName_object);
if ( ODD(sts) && cdh_NoCaseStrcmp( name, "opdefault") == 0) {
sts = gdh_ObjidToName( oid, name, sizeof(name), cdh_mNName);
if ( EVEN(sts)) exit(sts); if ( EVEN(sts)) exit(sts);
strncpy( rtt_ConfigureObject, name, sizeof(rtt_ConfigureObject)); strncpy( rtt_ConfigureObject, name, sizeof(rtt_ConfigureObject));
found = 1;
break;
}
}
if ( found == 0)
return RTT__OBJNOTFOUND;
} }
sts = gdh_NameToPointer( rtt_ConfigureObject, (void **)&opplace_p); sts = gdh_NameToPointer( rtt_ConfigureObject, (void **)&conf_p);
if ( EVEN(sts)) return sts; if ( EVEN(sts)) return sts;
sts = gdh_NameToObjid( rtt_ConfigureObject, &rtt_UserObject); sts = gdh_NameToObjid( rtt_ConfigureObject, &rtt_UserObject);
if ( EVEN(sts)) return sts; if ( EVEN(sts)) return sts;
rtt_AlarmBeep = opplace_p->AlarmBell; rtt_AlarmBeep = conf_p->AlarmBeep;
rtt_AlarmReturn = (opplace_p->EventListEvents & pwr_mEventListMask_AlarmReturn) != 0; rtt_AlarmReturn = (conf_p->EventListEvents & pwr_mEventListMask_AlarmReturn) != 0;
rtt_AlarmAck = (opplace_p->EventListEvents & pwr_mEventListMask_AlarmAck) != 0; rtt_AlarmAck = (conf_p->EventListEvents & pwr_mEventListMask_AlarmAck) != 0;
strncpy( rtt_symbolfilename, opplace_p->SetupScript, sizeof(rtt_symbolfilename)); rtt_AlarmReturn = (conf_p->EventListEvents & pwr_mEventListMask_AlarmReturn) != 0;
rtt_AlarmAck = (conf_p->EventListEvents & pwr_mEventListMask_AlarmAck) != 0;
rtt_AlarmAutoLoad = conf_p->AlarmAutoLoad;
rtt_AlarmMessage = conf_p->AlarmMessage;
rtt_description_on = conf_p->DescriptionOff ? 0 : 1;
strncpy( rtt_default_directory, conf_p->DefaultDirectory, sizeof(rtt_default_directory));
if ( conf_p->ScanTime > 0.1)
rtt_scantime = conf_p->ScanTime;
strncpy( rtt_symbolfilename, conf_p->SymbolFileName, sizeof(rtt_symbolfilename));
/* Execute the symbolfile */ /* Execute the symbolfile */
if ( strcmp(rtt_symbolfilename, "") != 0) if ( strcmp(rtt_symbolfilename, "") != 0)
......
...@@ -42,59 +42,103 @@ SObject pwrb:Class ...@@ -42,59 +42,103 @@ SObject pwrb:Class
! !
! Parameter Description ! Parameter Description
! !
Object DefaultVMSNode $Attribute 1 Object AlarmAutoLoad $Attribute 3
Body SysBody Body SysBody
Attr TypeRef = "pwrs:Type-$String40" Attr TypeRef = "pwrs:Type-$UInt32"
EndBody EndBody
EndObject EndObject
Object UserObject $Attribute 2 Object AlarmMessage $Attribute 4
Body SysBody Body SysBody
Attr TypeRef = "pwrs:Type-$Objid" Attr TypeRef = "pwrs:Type-$UInt32"
EndBody EndBody
EndObject EndObject
Object AlarmAutoLoad $Attribute 3 Object AlarmBeep $Attribute 5
Body SysBody Body SysBody
Attr TypeRef = "pwrs:Type-$UInt8" Attr TypeRef = "pwrs:Type-$UInt32"
EndBody EndBody
EndObject EndObject
Object AlarmMessage $Attribute 4 Object DescriptionOff $Attribute 8
Body SysBody Body SysBody
Attr TypeRef = "pwrs:Type-$UInt8" Attr TypeRef = "pwrs:Type-$Boolean"
EndBody EndBody
EndObject EndObject
Object AlarmBeep $Attribute 5 Object DefaultDirectory $Attribute 9
Body SysBody Body SysBody
Attr TypeRef = "pwrs:Type-$UInt8" Attr TypeRef = "pwrs:Type-$String80"
EndBody EndBody
EndObject EndObject
Object AlarmReturn $Attribute 6 Object SymbolFileName $Attribute 10
Body SysBody Body SysBody
Attr TypeRef = "pwrs:Type-$UInt8" Attr TypeRef = "pwrs:Type-$String80"
EndBody EndBody
EndObject EndObject
Object AlarmAck $Attribute 7 Object ScanTime $Attribute 11
Body SysBody Body SysBody
Attr TypeRef = "pwrs:Type-$UInt8" Attr TypeRef = "pwrs:Type-$Float32"
EndBody EndBody
EndObject EndObject
Object DescriptionOff $Attribute 8 !/**
! 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 12
Body SysBody Body SysBody
Attr TypeRef = "pwrs:Type-$Boolean" Attr TypeRef = "pwrs:Type-$UInt32"
EndBody EndBody
EndObject EndObject
Object DefaultDirectory $Attribute 9 !/**
! 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 13
Body SysBody Body SysBody
Attr TypeRef = "pwrs:Type-$String80" Attr TypeRef = "pwrs:Type-$UInt32"
Attr Flags = 0
EndBody EndBody
EndObject EndObject
Object SymbolFileName $Attribute 10 !/**
! 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 14
Body SysBody Body SysBody
Attr TypeRef = "pwrs:Type-$String80" Attr TypeRef = "pwrs:Type-$String80"
Attr Flags |= PWR_MASK_ARRAY
Attr Elements = 20
EndBody EndBody
EndObject EndObject
Object ScanTime $Attribute 11 !/**
! Specifies the type of events viewed in the eventlist.
!*/
Object EventListEvents $Attribute 15
Body SysBody Body SysBody
Attr TypeRef = "pwrs:Type-$Float32" Attr TypeRef = "pwrb:Type-EventListMask"
EndBody EndBody
EndObject EndObject
EndObject EndObject
...@@ -103,7 +147,8 @@ SObject pwrb:Class ...@@ -103,7 +147,8 @@ SObject pwrb:Class
! !
Object Template RttConfig Object Template RttConfig
Body RtBody Body RtBody
Attr DefaultVMSNode = "" Attr MaxNoOfAlarms = 200
Attr MaxNoOfEvents = 500
EndBody EndBody
EndObject EndObject
EndObject EndObject
......
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