8
Contr ol Updat e Proce ss Q U E SNL Updat e Proce ss Q U E Contr ol Exec Scan Task Scan Task : : SNL Exec I/O Drive r I/O Drive r I/O Drive r Redundancy Monitor Process Scan Task SNL Program Context SNL Program Context SNL Program Context Primary Redundancy Task

Control Update Proces s QUEQUE SNL Update Proces s QUEQUE Control Exec Scan Task Scan Task :::: SNL Exec I/O Driver I/O Driver I/O Driver Redundancy Monitor

Embed Size (px)

Citation preview

Page 1: Control Update Proces s QUEQUE SNL Update Proces s QUEQUE Control Exec Scan Task Scan Task :::: SNL Exec I/O Driver I/O Driver I/O Driver Redundancy Monitor

ControlUpdateProces

s

QUE

SNLUpdateProces

s

QUE

ControlExec

ScanTask

ScanTask

::

SNLExec

I/ODriver

I/ODriver

I/ODriver

Redundancy MonitorProcess

ScanTask

SNLProgramContext

SNLProgramContext

SNLProgramContext

Primary Redundancy Task

Page 2: Control Update Proces s QUEQUE SNL Update Proces s QUEQUE Control Exec Scan Task Scan Task :::: SNL Exec I/O Driver I/O Driver I/O Driver Redundancy Monitor

ControlUpdateProcess

QUE

SNLUpdateProcess

QUE

ControlExec

Database

SNLProgramContext

SNLProgramContext

SNLProgramContext

::

SNLExec

Redundancy MonitorProcess

I/ODriver

I/ODriver

I/ODriver

I/O

LANBackup Redundancy Task

Page 3: Control Update Proces s QUEQUE SNL Update Proces s QUEQUE Control Exec Scan Task Scan Task :::: SNL Exec I/O Driver I/O Driver I/O Driver Redundancy Monitor

On Initialization – Read the database

• getCurrentRedundState () as a variant of dbDumpRecords• NOTE: This example is similar but not identical to the actual dbDumpRecords routine.• void dbDumpRecords(DBBASE *pdbbase)• {• DBENTRY *pdbentry;• long status;• pdbentry = dbAllocEntry(pdbbase);• status = dbFirstRecordType(pdbentry);• if(status) {printf("No record descriptions\n");return;}• while(!status) {• printf("record type: %s",dbGetRecordTypeName(pdbentry));• status = dbFirstRecord(pdbentry);• if(status) printf(" No Records\n");• else printf("\n Record:%s\n",dbGetRecordName(pdbentry));• while(!status) {• status = dbFirstField(pdbentry,TRUE);• if(status) printf(" No Fields\n");• while(!status) {• printf(" %s:%s",dbGetFieldName(pdbentry),• dbGetString(pdbentry));• status=dbNextField(pdbentry,TRUE);• }• status = dbNextRecord(pdbentry);• }• status = dbNextRecordType(pdbentry);• }• printf("End of all Records\n");• dbFreeEntry(pdbentry);• }

Page 4: Control Update Proces s QUEQUE SNL Update Proces s QUEQUE Control Exec Scan Task Scan Task :::: SNL Exec I/O Driver I/O Driver I/O Driver Redundancy Monitor

Posting Data For Servers – V4

Scan Task

“PS01:SCAN”, “1 Sec”“PS01.DTYP”,”.ECPSC”“PS01.I”,”PS01:I”“PS01.V”.”PS01:V”

“PS01:SCAN”, “1 Sec”“PS01.DTYP”,”.ECPSC”“PS01.I”,”PS01:I”“PS01.V”.”PS01:V”

Database Monitor Queue

Time stamp?

Event Data

Trigger Data

“PS01:VAL”,”On”“PS01:I:VAL”,”.5”“PS01:I:SEVR”,”Minor”“PS01:V:VAL”,”9”“PS01:V:SEVR”,”Major”

“PS02:VAL”,”Fault”“PS02:SEVR”,”Major”“PS02:OVRTMP”,”True”

“BPM1:X.VAL”, “.05”

Synch Start

Synch Stop

dbPostEvent

Page 5: Control Update Proces s QUEQUE SNL Update Proces s QUEQUE Control Exec Scan Task Scan Task :::: SNL Exec I/O Driver I/O Driver I/O Driver Redundancy Monitor

Monitor Task to the Continuous Control Executive (Redundancy)

Monitor Queue

Cont Cntrl Exec

Time stamp?

Event Data

Trigger Data

“PS01:VAL”,”On”“PS01:I:VAL”,”.5”“PS01:I:SEVR”,”Minor”“PS01:V:VAL”,”9”“PS01:V:SEVR”,”Major”

“PS02:VAL”,”Fault”“PS02:SEVR”,”Major”“PS02:OVRTMP”,”True”

“BPM1:X.VAL”, “0.05”

Synch Start

Synch Stop

PS1

VAL Changed On

I Changed .5

V Changed 9

SEVR Not Changed ok

PS1:I

VAL Changed .5

SEVR Changed Minor

PS1:V

VAL Changed 9

SEVR Changed Major

Redundancy BackupAll fields ever changedFlag since last backup

.

.

Page 6: Control Update Proces s QUEQUE SNL Update Proces s QUEQUE Control Exec Scan Task Scan Task :::: SNL Exec I/O Driver I/O Driver I/O Driver Redundancy Monitor

Field Update Structure• Outgoing Cache

– Red_Record_List• Pointer Point to local Record• Short Local Point Type• Pointer First Field• Character Sent Once (Cleared on New Session)• Int Handle

– Red_Field_List• Short Field Number• Pointer Next Field or 0• Char Needs to be Sent• Pointer Local Address of Field• Pointer Address of Field Descriptor• Short Number of elements• Short Type• Short Size in Bytes of Data• Character Field Data Buffer[Size]

• Incoming Field Update List (Cleared on New Session)– Array of Red_in_Msg Structures– Red_in_Msg Structure

• Int Partner Handle• Pointer Local Cache Pointer• Short Error Code• Pointer Pointer to Name

Page 7: Control Update Proces s QUEQUE SNL Update Proces s QUEQUE Control Exec Scan Task Scan Task :::: SNL Exec I/O Driver I/O Driver I/O Driver Redundancy Monitor

Diagnostic Data

• Maximum Time a send update took

• Maximum Number of records in a send update not in a traverse

• Maximum Number of fields in a send update not in a traverse

• Maximum Number of bytes in a send update not in a traverse

Page 8: Control Update Proces s QUEQUE SNL Update Proces s QUEQUE Control Exec Scan Task Scan Task :::: SNL Exec I/O Driver I/O Driver I/O Driver Redundancy Monitor

ControlUpdateProces

s

QUE

ControlExec

ScanTask

ScanTask

::

ScanTask

Continuous Control Exec - Status

ControlUpdateProcess

QUE

ControlExec

Database

Primary

Backup