ASAP 2.7 Extension Manual

Implementing the ASAP Extension in an Application
HP NonStop ASAP Extension Manual425265-004
4-23
ASAP_OPSTATE_
OpState
INT:value
is a valid OEM state corresponding to the operational status of the domain.
OEM states range from 1 (existence) to 8 (down).
Usage Consideration
Use this procedure to have your applications control the status text displayed for each
domain. You might want to do this for failure conditions, reliance on outside resources,
and so on.
Usage Examples
Proc Update^Text(Text:Len,State,Offset);
String .ext Text; -- Status text
Int Len -- Its length
,State -- Corresponding Operational State
,.ext Offset -- Shared memory offset from ASAP_REGISTER_
;
begin
Int Error := 0
,Error^Detail := 0
,.ext ErD
;
@ErD := $XADR(Error^Detail);
if (Error := ASAP_OPSTATE_( Offset,ErD,Text:Len,State)) <> 0
then begin
-- handle error
-- check Error^Detail for errors: –2 (parameter) and –3
(file system).
end;
Return;
End; -- of proc Update^Text
Syntax for C Programmers
/*#pragma ASAP_OPSTATE_ */
_tal _extensible short ASAP_OPSTATE_ (
long , /* IN REQUIRED */
/* Shared memory segment offset for this domain */
short _far *, /* OUT OPTIONAL */
/* Detailed error*/
const char _far *,/* IN REQUIRED */
/* 1-15 byte Operational status to display */
short , /* IN REQUIRED */
/* Length of Operational Status text */
short , /* IN REQUIRED */
/* Operational state, a valid OEM state (1-8) */
);