© 2002 page 1 itug summit 2002 27—31 october san jose, california asap extension api...

48
© 2002 page 1 ITUG Summit 2002 27—31 October San Jose, California ASAP Extension API [email protected]

Upload: antonio-prowse

Post on 14-Dec-2015

213 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: © 2002 page 1 ITUG Summit 2002 27—31 October San Jose, California ASAP Extension API joe.davis@hp.com

© 2002 page 1

ITUG Summit 200227—31 October

San Jose, California

ASAP ExtensionAPI

[email protected]

Page 2: © 2002 page 1 ITUG Summit 2002 27—31 October San Jose, California ASAP Extension API joe.davis@hp.com

© 2002 page 2

A Brief Overview of ASAP

An Availability Monitoring Infrastructure for HP NonStop™ Servers

• Engineered specifically for NonStop Server Architecture

• Includes NonStop Server Agents, Process-pairs, and Relational Stats & SLO Databases

• Components automatically Restart and Reconfigure, even when CPUs or devices go up/down

Page 3: © 2002 page 1 ITUG Summit 2002 27—31 October San Jose, California ASAP Extension API joe.davis@hp.com

© 2002 page 3

What ASAP is not

ASAP is not an Enterprise Management Framework

• HP OpenView

• CA Unicenter

• Tivoli Netview

ASAP only provides an availability monitoring infrastructure

However ASAP does provide:

• System and subsystem agents

• Published interfaces for custom agents

• Adapter interfaces to Enterprise Management Frameworks

Page 4: © 2002 page 1 ITUG Summit 2002 27—31 October San Jose, California ASAP Extension API joe.davis@hp.com

© 2002 page 4

What ASAP monitors

System Objects

•CPUs, Disks, Expand LHs, Nodes, Systems, Tape Drives,..

Subsystem Domains

•Busy Processes, Files, Selected Processes, RDF, Spooler, TMF, ...

Application Domains

•ATMs, Accounts, Customers, Orders, or anything else...

Page 5: © 2002 page 1 ITUG Summit 2002 27—31 October San Jose, California ASAP Extension API joe.davis@hp.com

© 2002 page 5

What ASAP does with its

information

Generates Alerts

•EMS events

•SNMP traps

Stores data in a relational database

Displays data on ASAP Client

Forwards data to Enterprise Management Frameworks

Page 6: © 2002 page 1 ITUG Summit 2002 27—31 October San Jose, California ASAP Extension API joe.davis@hp.com

page 6© 2002

ASAP Alerts

02-06-17 11:42:01 \CENTDIV.$ZOOK *TANDEM.226.V02 004000 ASAP ALERT Expandip $Ipisl Status Connecting

02-06-17 11:42:01 \CENTDIV.$ZOOT *TANDEM.226.V02 004000 ASAP ALERT Process $Joe Status Down

02-06-17 11:42:02 \CENTDIV.$ZOOJ *TANDEM.226.V02 004000 ASAP ALERT Disk $Rtool1 Status Mirror Disk Reviving

02-06-17 11:49:02 \CENTDIV.$ZOOH2 *TANDEM.226.V02 004000 ASAP ALERT Funds Transfer\$Y077 Status Lost Trans

02-06-17 11:49:02 \CENTDIV.$ZOOH3 *TANDEM.226.V02 004000 ASAP ALERT Atm Chicago\East\$Atm2 Status Cash Low

Page 7: © 2002 page 1 ITUG Summit 2002 27—31 October San Jose, California ASAP Extension API joe.davis@hp.com

page 7© 2002

ASAP ClientBrowsing paradigm for access to objects

Graph and Grid views

Tree View

•Object navigation

•Accesses many objects

•Drives Graph/Grid

State Information:

•Propagated upward

•“always visible” state

Page 8: © 2002 page 1 ITUG Summit 2002 27—31 October San Jose, California ASAP Extension API joe.davis@hp.com

page 8© 2002

Availability VectorsIllustrates host-based analysis engine

Availability is determined by:

•Pre-defined rules (SLO)

•Analysis of each property of an object

•Aggregation of data

Status, Performance and SLO information presented uniformly

Page 9: © 2002 page 1 ITUG Summit 2002 27—31 October San Jose, California ASAP Extension API joe.davis@hp.com

page 9© 2002

Registering an Application

error=ASAP_REGISTER_ (

domain^name:name^len

, seg^offset

, [ error^detail ]

, [ segment^id ]

, [ segment^base ]

, [ version ]

, [ asap^id:id^len ]

, [ flags ]

, [ timeout ]

) extensible;

Shared Memory

Data Items

Boundary Tag

Boundary Tag

Checksum

Control Info

ASAPXMONRegistration Request

Page 10: © 2002 page 1 ITUG Summit 2002 27—31 October San Jose, California ASAP Extension API joe.davis@hp.com

page 10© 2002

Updating In-Memory Data

Shared Memory

Data Items

Boundary Tag

Boundary Tag

Checksum

Control Info

ASAPXMONerror=ASAP_UPDATE_(

seg^offset

, [ error^detail ]

, data^item

, value

, [ math ]

) extensible;

000001 “Enabled” 007703

“Trams A” 021005 “Broken”

Data can be: - Counters - Time Units - Constants - Numeric - Text

Page 11: © 2002 page 1 ITUG Summit 2002 27—31 October San Jose, California ASAP Extension API joe.davis@hp.com

page 11© 2002

Shared-Memory Architecture

Shared Memory

Data Items

Boundary Tag

Boundary Tag

Checksum

Control Info

ASAPXMON

000001 “Enabled” 007703

“Trams A” 021005 “Broken”

Non-Blocking Architecture

•No inter-process messages

•No semaphores

Ultra-High Performance

•Memory updates only

•No App computations/feeds

Memory Fully Protected

•Checksums

•Boundary tags

Page 12: © 2002 page 1 ITUG Summit 2002 27—31 October San Jose, California ASAP Extension API joe.davis@hp.com

page 12© 2002

Shared-Memory ArchitectureExte

nsib

le

Shared MemorySegment

ASAPXMONASAPXMONASAPXMON ASAPXMON ASAPXMONASAPXMON

CPU 0 CPU 1 CPU 2 CPU 3 CPU 4 CPU 5

ASAPXSGP ASAPAggregates

Atm\Server\Authenticate\# 12 Domains

Page 13: © 2002 page 1 ITUG Summit 2002 27—31 October San Jose, California ASAP Extension API joe.davis@hp.com

page 13© 2002

Data-Gathering and Computation

Data Items

Boundary Tag

Boundary Tag

Checksum

Control Info

000001 “Enabled” 007703

“Trams A” 021005 “Broken”

EntityDefinitions

ASAP/X

02-06-17 11:42:01 \CENTDIV.$ZOOK *TANDEM.226.V02 004000 ASAP ALERT Expandip $Ipisl Status Connecting

02-06-17 11:42:01 \CENTDIV.$ZOOT *TANDEM.226.V02 004000 ASAP ALERT Process $Joe Status Down

02-06-17 11:42:02 \CENTDIV.$ZOOJ *TANDEM.226.V02 004000 ASAP ALERT Disk $Rtool1 Status Mirror Disk Reviving

02-06-17 11:49:02 \CENTDIV.$ZOOH2 *TANDEM.226.V02 004000 ASAP ALERT Funds Transfer\$Y077 Status Lost Trans

02-06-17 11:49:02 \CENTDIV.$ZOOH3 *TANDEM.226.V02 004000 ASAP ALERT Atm Chicago\East\$Atm2 Status Cash Low

Objectives

Data

Form

ulas

Obje

ctiv

es

Alerts

ASAP DB

Records

Page 14: © 2002 page 1 ITUG Summit 2002 27—31 October San Jose, California ASAP Extension API joe.davis@hp.com

page 14© 2002

Computing Transaction Rate

Data Items

Boundary Tag

Boundary Tag

Checksum

Control Info

000001 “Enabled”007703“Trams A” 021005 “Broken”

DataItem Type: IMetricRule: #2/SFormat: F5.3Heading: TransRateObjective: > 9.0 Critical

7703 7219 484

484/60 = 8.067

If (8.067 > 9.000) False -> State NOT OK

Current SamplePrevious Sample#2 ResultMetricRule FormulaFormat

Objective Compare

ASAP Sampling Interval: 1 minute

TransRate: 8.067TransRateState: AlertGenerate EMS Critical Event

Page 15: © 2002 page 1 ITUG Summit 2002 27—31 October San Jose, California ASAP Extension API joe.davis@hp.com

page 15© 2002

Representing an Application

ATM

DepositsWithdrawalsTransfersInquiries

Devices

Requesters

Servers

Database

Chicago

Phoenix

Seattle

Atlanta

Page 16: © 2002 page 1 ITUG Summit 2002 27—31 October San Jose, California ASAP Extension API joe.davis@hp.com

page 16© 2002

Application Name Space

Business Service Developer

Page 17: © 2002 page 1 ITUG Summit 2002 27—31 October San Jose, California ASAP Extension API joe.davis@hp.com

© 2002 page 17

Determining What to Measure

Availability/Health Metrics

•Transaction Rates

•Error Rates

•Response Time

•Status Indicators

Capacity/Historical Metrics

•Wait times

•Busy percentages

•Usage information

Page 18: © 2002 page 1 ITUG Summit 2002 27—31 October San Jose, California ASAP Extension API joe.davis@hp.com

page 18© 2002

Consider Multiple ASAP Environments

Shared Memory

Rate 1 minute

Health Monitor

ASAPXMONerror=ASAP_UPDATE_(

seg^offset

, [ error^detail ]

, data^item

, value

, [ math ]

) extensible;

Shared Memory

Rate 1 hour

Capacity Monitor

ASAPXMON

Capacity DataHealth Data

Page 19: © 2002 page 1 ITUG Summit 2002 27—31 October San Jose, California ASAP Extension API joe.davis@hp.com

page 19© 2002

Implementation Example

Determine Application Name Space •Service View

•Example: Atm\Dallas\East\ParkSt

Determine What to Measure •Cash in ATM

•Success Percent

•Response Time

•Card Reject Count

DataItems

Transaction count (I)

Error count (I)

Processing time (U)

Cash remaining (C)

Card rejects (I)

I - integerS,M,U - time unitsC - constant

0

1

2

3

4

Page 20: © 2002 page 1 ITUG Summit 2002 27—31 October San Jose, California ASAP Extension API joe.davis@hp.com

page 20© 2002

Define the Application in ASAP EDL

First copy APP EDL file from ASAP2APP EDL file

Save and modify new file to create the Application EDL• ENTITY ATM

• Command "APP\*ATM,DETAIL,RAW,TAB,STATE,AGGREGATE"

• Detail "APP^,TAB,STATE,DETAIL”

• DataItems "0 C, 1 I, 2 I, 3 U, 4 I"

• Enabled YES

• Help “ATM Application”

• MaxObjectives 200

• Version 1.00000;

Page 21: © 2002 page 1 ITUG Summit 2002 27—31 October San Jose, California ASAP Extension API joe.davis@hp.com

page 21© 2002

Define all Metrics in ASAP EDL

Add custom metric (EDL Attribute) definitions to the end of new EDL file, copy Error and ErrorState attribute pairs.• AT Cash Grid YES Graph NO GraphMax 3000

• Format “I6”

• Help ”Cash remaining in ATM"

• StatePair YES StateRule UseStateGraphState

• MetricRule “#0"

• TypeData REAL64;

• AT S0 Grid NO Graph NO GraphMax 9 Help "State of Cash ";

Do not modify any of the other original Attribute definitions from the original APP EDL file.

Page 22: © 2002 page 1 ITUG Summit 2002 27—31 October San Jose, California ASAP Extension API joe.davis@hp.com

page 22© 2002

Example EDL File

ENTITY ATM

CI ASAP

Command "APP\*ATM,DETAIL,RAW,TAB,STATE,AGGREGATE"

Detail "APP^,TAB,STATE,DETAIL"

DataItems "0 C, 1 I, 2 I, 3 U, 4 I"

Enabled YES ErrorState ErrorState

Help "My application description"

KeyForNode NodeName KeyForObj Domain

KeyForRow "Dateymd Time" MaxObjectives 200

SGPFile ASAPXSGP SGPManaged YES SGPSuffix H

Reserved NO Version 1.00000;”

Page 23: © 2002 page 1 ITUG Summit 2002 27—31 October San Jose, California ASAP Extension API joe.davis@hp.com

page 23© 2002

Required Header Attributes

AT NodeName Grid YES Graph NO GraphMax 0

Help "NSK System Name";

AT Sysnum Grid NO Graph NO GraphMax 0 Help "System Number";

AT Domain Grid YES Graph NO GraphMax 0 Help "Domain Name";

AT Status Grid YES Graph YES GraphMax 0 Help "Operational Status”

StatePair YES StateIsOp YES StateRule UseStateGraphState

TypeData CHAR15;

AT OpState Grid NO Graph NO GraphMax 9

Help "Operational State";

AT Dateymd Grid NO Graph NO GraphMax 0 Help "Date of Stats";

AT Time Grid YES Graph YES GraphMax 0 Help "Time of Stats";

Page 24: © 2002 page 1 ITUG Summit 2002 27—31 October San Jose, California ASAP Extension API joe.davis@hp.com

page 24© 2002

Required Header Attributes

AT Valid Grid NO Graph NO GraphMax 0 Help "Validity Flag";

AT ET Grid NO Graph NO GraphMax 0

Help "Elapsed Time in Minutes";

AT CT Grid NO Graph NO GraphMax 0 Help "Count of Attributes";\

AT Error Grid YES Graph NO GraphMax 0 Format I4

Help "Collection Error” StatePair YES StateRule UseStateGraphState

TypeData INT64;

AT ErrorState Grid NO Graph NO GraphMax 9 Help "State of Error";

[ Custom attributes go after the Error and ErrorState Attribute Pair ]

Page 25: © 2002 page 1 ITUG Summit 2002 27—31 October San Jose, California ASAP Extension API joe.davis@hp.com

page 25© 2002

Custom Attributes

AT Cash Grid YES Graph NO GraphMax 3000 Format "I6”

Help "Cash remaining in ATM” StatePair YES

StateRule UseStateGraphState

MetricRule "#0" TypeData REAL64;

AT S0 Grid NO Graph NO GraphMax 9 Help "State of Cash ";

AT Success Grid YES Graph NO GraphMax 10000 Format "F6.2”

Help ”Success Percent” StatePair YES

StateRule UseStateGraphState MetricRule "#1/(#1 + #2) * C100"

TypeData REAL64;

AT S1 Grid NO Graph NO GraphMax 9 Help "State of Success";

Page 26: © 2002 page 1 ITUG Summit 2002 27—31 October San Jose, California ASAP Extension API joe.davis@hp.com

page 26© 2002

Custom Attributes

AT RespTime Grid YES Graph NO GraphMax 10 Format "F10.7”

Help "Server response time” StatePair YES StateRule

UseStateGraphState MetricRule "#3/(#1 + #2)" TypeData REAL64;

AT S2 Grid NO Graph NO GraphMax 9 Help "State of RespTime ";

AT Rejects Grid YES Graph NO GraphMax 100 Format "I3"

Help "Card rejects" StatePair YES StateRule UseStateGraphState

MetricRule "#4" TypeData REAL64;

AT S3 Grid NO Graph NO GraphMax 9 Help "State of Rejects";

Page 27: © 2002 page 1 ITUG Summit 2002 27—31 October San Jose, California ASAP Extension API joe.davis@hp.com

page 27© 2002

Complete EDL File

ENTITY ATM

CI ASAP

Command "APP\*ATM,DETAIL,RAW,TAB,STATE,AGGREGATE"

Detail "APP^,TAB,STATE,DETAIL"

DataItems "0 C, 1 I, 2 I, 3 U, 4 I"

Enabled YES ErrorState ErrorState

Help "My application description"

KeyForNode NodeName KeyForObj Domain

KeyForRow "Dateymd Time" MaxObjectives 200

SGPFile ASAPXSGP SGPManaged YES SGPSuffix H

Reserved NO Version 1.00000;

AT NodeName Grid YES Graph NO GraphMax 0

Help "NSK System Name";

AT Sysnum Grid NO Graph NO GraphMax 0 Help "System Number";

AT Domain Grid YES Graph NO GraphMax 0 Help "Domain Name";

AT Status Grid YES Graph YES GraphMax 0

Help "Operational Status" StatePair YES StateIsOp YES

StateRule UseStateGraphState TypeData CHAR15;

AT OpState Grid NO Graph NO GraphMax 9

Help "Operational State";

AT Dateymd Grid NO Graph NO GraphMax 0 Help "Date of Stats";

AT Time Grid YES Graph YES GraphMax 0 Help "Time of Stats";

AT Valid Grid NO Graph NO GraphMax 0 Help "Validity Flag";

AT ET Grid NO Graph NO GraphMax 0 Help "Elapsed Time in Minutes";

AT CT Grid NO Graph NO GraphMax 0 Help "Count of Attributes";

AT Error Grid YES Graph NO GraphMax 0 Format I4

Help "Collection Error" StatePair YES StateRule UseStateGraphState

TypeData INT64;

AT ErrorState Grid NO Graph NO GraphMax 9 Help "State of Error";

AT Cash Grid YES Graph NO GraphMax 3000 Format "I6"

Help "Cash remaining in ATM" StatePair YES StateRule

UseStateGraphState MetricRule "#0" TypeData REAL64;

AT S0 Grid NO Graph NO GraphMax 9 Help "State of Cash ";

AT Success Grid YES Graph NO GraphMax 10000 Format "F6.2”

Help ”Success Percent" StatePair YES StateRule UseStateGraphState

MetricRule "#1/(#1 + #2) * C100" TypeData REAL64;

AT S1 Grid NO Graph NO GraphMax 9 Help "State of TotalRate ";

AT RespTime Grid YES Graph NO GraphMax 10 Format "F10.7”

Help "Server response time" StatePair YES StateRule UseStateGraphState

MetricRule "#3/(#1 + #2)" TypeData REAL64;

AT S2 Grid NO Graph NO GraphMax 9 Help "State of RespTime ";

AT Rejects Grid YES Graph NO GraphMax 100 Format "I3”

Help "Card rejects" StatePair YES StateRule UseStateGraphState

MetricRule "#4" TypeData REAL64;

AT S3 Grid NO Graph NO GraphMax 9 Help "State of Rejects";

Page 28: © 2002 page 1 ITUG Summit 2002 27—31 October San Jose, California ASAP Extension API joe.davis@hp.com

© 2002 page 28

What Next?

Load EDL onto NSK Servers

•Add Include statement to ASAPUSER file

Load EDL onto ASAP Client workstations• C:\Program Files\Tandem\Asap\

Edl

• Install using Client IDE

Test EDL using ASAPXTST API test program

•Located in ASAPX ISV

Implement ASAP API in the Application

Page 29: © 2002 page 1 ITUG Summit 2002 27—31 October San Jose, California ASAP Extension API joe.davis@hp.com

page 29© 2002

Enabling the Client IDE

Click here to bring up the Properties sheet

Page 30: © 2002 page 1 ITUG Summit 2002 27—31 October San Jose, California ASAP Extension API joe.davis@hp.com

page 30© 2002

Enabling Import/Export EDL

Double click here to bring up the EDL Properties sheet

Turn on the IDE to enable File - Import/Export EDL

Page 31: © 2002 page 1 ITUG Summit 2002 27—31 October San Jose, California ASAP Extension API joe.davis@hp.com

page 31© 2002

Client IDE

First, click on your EDL file

Then click the compile button

Page 32: © 2002 page 1 ITUG Summit 2002 27—31 October San Jose, California ASAP Extension API joe.davis@hp.com

page 32© 2002

ASAPXTST

ASAPXTST

1+ register

please enter: domain^name(): atm\test

segment^id():

segment^base():

version():

asap^id:id^len("$ZOO":4):

flags():

timeout():

error: 0

error^detail: 0

result: domain registered

2+

The procedure declaration(not shown) is output here.

Page 33: © 2002 page 1 ITUG Summit 2002 27—31 October San Jose, California ASAP Extension API joe.davis@hp.com

page 33© 2002

ASAPXTST

2+ update

Domains Currently Registered

Dmn# Seg^Offset A^ID F Vs Domain Name

----------- ---------------------------- -------------- -- --- ----------------------------------------------------

0 1308361202 $ZOO 0 ATM\TEST

select a domain to update(): 0

seg^offset(1308361202):

data^item(): 0

value(): 10

math():

error: 0

error^detail: 0

result: domain updated

The procedure declaration(not shown) is output here.

Page 34: © 2002 page 1 ITUG Summit 2002 27—31 October San Jose, California ASAP Extension API joe.davis@hp.com

page 34© 2002

Java

public class ASAPX extends java.lang.Object

{

static

{

System.loadLibrary("ASAPXJNI");

} // Initializer

public static final native short AsapRegister(java.lang.String Domain,

int[] SegmentOffset,

short[] ErrorDetail);

Page 35: © 2002 page 1 ITUG Summit 2002 27—31 October San Jose, California ASAP Extension API joe.davis@hp.com

page 35© 2002

Java

public static final native short AsapUpdate (int SegmentOffset,

short[] ErrorDetail,

short DataItem,

long Value,

short Math);

public static final native short AsapRemove (int SegmentOffset,

short[] ErrorDetail,

short SegmentID,

short Flags);

} // class ASAPX

Page 36: © 2002 page 1 ITUG Summit 2002 27—31 October San Jose, California ASAP Extension API joe.davis@hp.com

page 36© 2002

Java

public class MainClass extends java.lang.Object

{

public static void main(java.lang.String[] args)

{

java.lang.String MyAppDomainName = "CreditCard\\Chicago";

int[] SegmentOffset = new int[1];

short[] ErrorDetail = new short[1];

short ReturnCode;

ReturnCode = ASAPX.AsapRegister(MyAppDomainName,

SegmentOffset,

ErrorDetail);

if (ReturnCode != 0)

Page 37: © 2002 page 1 ITUG Summit 2002 27—31 October San Jose, California ASAP Extension API joe.davis@hp.com

page 37© 2002

Java

{

System.out.println("Error: Could not register " + MyAppDomainName);

System.out.println("Detailed error number: " + ErrorDetail[0]);

System.out.println("Exiting...");

return;

}

while (true)

{

ReturnCode = ASAPX.AsapUpdate(SegmentOffset[0], ErrorDetail, (short)0, 1L, (short)0);

if (ReturnCode != 0)

{

System.out.println("Error: Could not update ASAPX”);

System.out.println(“Detailed error number: " + ErrorDetail[0]);

break;

}

Page 38: © 2002 page 1 ITUG Summit 2002 27—31 October San Jose, California ASAP Extension API joe.davis@hp.com

page 38© 2002

Java

// Get next request

} // while loop

ReturnCode = ASAPX.AsapRemove(SegmentOffset[0], ErrorDetail, (short)0, (short)1);

if (ReturnCode != 0)

{

// Error removing our domain

System.out.println("Error: Could not remove " + MyAppDomainName);

System.out.println("Detailed error number: " + ErrorDetail[0]);

System.out.println("Exiting...");

}

} // main

} // class MainClass

Page 39: © 2002 page 1 ITUG Summit 2002 27—31 October San Jose, California ASAP Extension API joe.davis@hp.com

page 39© 2002

C++

#ifndef __ASAPBASEH

#define __ASAPBASEH

#include "zaspxc.h”

class AsapBase

{

public:

AsapBase();

virtual ~AsapBase();

short AsapRegister(short flags=0);

short AsapUpdate(short dataItem, long long val, short math=0);

protected:

bool Connected; long long LastTime;

char Domain[64]; long SegmentOffset;

};

#endif // __ASAPBASEH

Page 40: © 2002 page 1 ITUG Summit 2002 27—31 October San Jose, California ASAP Extension API joe.davis@hp.com

page 40© 2002

C++

#include “ASAPBASE.h”#include <asapxh>

short AsapBase::AsapRegister(short flags)

{

short Error, ErrorDetail;

long long

ThisTime = JULIANTIMESTAMP() - LastTime,

RetryTime = 5000000;

if(Connected) return 0;

if(ThisTime < RetryTime) return 0;

LastTime = JULIANTIMESTAMP();

strcopy(Domain,”Test\\Domain”);

error = ASAP_REGISTER_(Domain, strlen(Domain), &SegmentOffset,&ErrorDetail);

if(error == 0)

Connected = true;

else { <error handling logic>

Page 41: © 2002 page 1 ITUG Summit 2002 27—31 October San Jose, California ASAP Extension API joe.davis@hp.com

page 41© 2002

C++

short AsapBase::AsapUpdate(short dataItem, long long value, short math)

{

short Error, ErrorDetail;

short Flags = 0;

if(!Connected)

{

error = AsapRegister(Flags);

if (error != 0) return error;

if (!Connected) return -1;

}

error = ASAP_UPDATE_(SegmentOffset, &ErrorDetail, dataItem, value, math);

if (error != 0)

{

<error logic goes here>

}

}

Page 42: © 2002 page 1 ITUG Summit 2002 27—31 October San Jose, California ASAP Extension API joe.davis@hp.com

page 42© 2002

pTAL

int(32) asap^offset := 0d, .ext asap^offset2;

?nolist, source zaspxtal

?nolist, source $system.system.asapxdec

?library $system.system.asapxlib

proc do^asap(ditem,val,math) extensible; int ditem; int(64) val; int math; forward;

proc do^asap(ditem,val,math) extensible;

int ditem; int(64) val; int math;

begin

string .dname[0:11] := ["NONSTOP\DEMO"];

int err := 0, err^dtl := 0;

if asap^offset = 0d then begin

@asap^offset2 := $xadr(asap^offset);

if (err := asap_register_(dname:12, asap^offset2, err^dtl)) <> 0 then asap^offset := 0d;

end;

if asap^offset = 0d then return;

Page 43: © 2002 page 1 ITUG Summit 2002 27—31 October San Jose, California ASAP Extension API joe.davis@hp.com

page 43© 2002

pTAL

if (err := asap_update_(asap^offset,err^dtl,ditem,val, $optional($param(math),math))) <> 0 then begin

err := asap_remove_(asap^offset,err^dtl,,1);

asap^offset := 0d;

end;

end; -- of proc do^asap

Page 44: © 2002 page 1 ITUG Summit 2002 27—31 October San Jose, California ASAP Extension API joe.davis@hp.com

© 2002 page 44

ASAPX Feature Review

Conversion to ASAP DOTs

Multiple Entity/EDL support

Built-in attributes

Aggregation

Status/OpState API

Text constants

Register timeout

Page 45: © 2002 page 1 ITUG Summit 2002 27—31 October San Jose, California ASAP Extension API joe.davis@hp.com

© 2002 page 45

ASAPX Futures

DataItems increased and configurable

In-Memory record retrieval

DataItem aggregation control

No History mode

Java Package

C++ Class Library

HP OpenView integration

Page 46: © 2002 page 1 ITUG Summit 2002 27—31 October San Jose, California ASAP Extension API joe.davis@hp.com

© 2002 page 46

Information Resources

www.NonStopASAP.com

•Presentations

•Papers, FAQs

•Online demonstration

Education

•TUT CD #30 Oct. 2001

Manuals

•TIM Independent Products CD

Email

[email protected]

Page 47: © 2002 page 1 ITUG Summit 2002 27—31 October San Jose, California ASAP Extension API joe.davis@hp.com
Page 48: © 2002 page 1 ITUG Summit 2002 27—31 October San Jose, California ASAP Extension API joe.davis@hp.com