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

EventSelectList added to RttConfig object

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