Table of Contents Previous Chapter Chapter 24: Permissive
The permissive record is for communication between a server and a client. An example is a sequence program client and an operator interface server. Two fields are used VAL and WFLG. The method of use is as follows:
- Initially both VAL and WFLG are 0, which means OFF.
- When the server is ready to accept a request, it sets WFLG equal to 1, which means ON.
- The client monitors WFLG. Until it turns ON, the client must not change VAL.
- When the client wants to notify the server it turns VAL ON.
- The server notices that VAL is ON. He sets both WFLG and VAL OFF. Performs whatever action is associated with this permissive (a private matter server and client), and when ready to accept a new request sets WFLG ON.
By using multiple permissive records a sequence program can communicate its current state to a client.
-----------------------------------------------------------
Field Type DCT Initial Access Modify Rec Proc PP
Monitor
-----------------------------------------------------------
LABL STRING Yes Null Yes Yes No Yes
VAL USHORT No 0 Yes Yes Yes Yes
OVAL USHORT No 0 Yes No No
WFLG USHORT No 0 Yes Yes Yes Yes
OFLG USHORT No 0 Yes No No
-----------------------------------------------------------
-----------------------------------------------------------------------------------
Name Summary Description
-----------------------------------------------------------------------------------
LABL Label A descriptive string.
VAL Value Client sets this field when it wants service from server.
Only the client should set this field. The server clears it.
OVAL Old Value Used to decide if monitors should be triggered. Value
change monitors are invoked if OVAL is not equal to VAL.
WFLG Watchdog Flag Server sets this field when it is ready to accept a request.
Only the server should modify this field.
OFLG Old Flag Value Used to decide if monitors should be triggered.
-----------------------------------------------------------------------------------
Two record support routines are provided: process, and get_value.
process
process sets UDF to FALSE, triggers monitors on VAL and WFLG when they change, and scans the forward link if necessary.
get_value
get_value fills in struct valueDes so that it refers to VAL.
Table of Contents Next Chapter