Broker help/TOC

From VistApedia
Jump to: navigation, search
This is a conversion of the Broker.hlp file to mediawiki format using the helpdeco converter program converted to vistapedia.net by Ignacio Valdes of Astronaut, LLC The original formatting such as Table of Contents linking and screen shots is not present.
Base broker.hlp>main
Title RPC Broker Developer's Guide

RPC Broker V. 1.1 Developer's Guide

Contents

Overview

Introduction

The RPC Broker is a client/server system within VA's Veterans Health Information Systems and Technology Architecture (VISTA) environment. It enables client applications to communicate and exchange data with M Servers.

This manual describes the development features of the RPC Broker. The emphasis is on using the RPC Broker in conjunction with Borland's Delphi software. However, the RPC Broker supports other development environments.

This manual provides a complete reference for development with the RPC Broker. For an overview of development with the RPC Broker component, see the "RPC Broker V. 1.1 Getting Started with the Broker Development Kit" manual.

This document is intended for the VISTA development community and Information Resource Management (IRM) staff. A wider audience of technical personnel engaged in operating and maintaining the Department of Veterans Affairs (VA) software might also find it useful as a reference.

Broker Overview

For the latest RPC Broker product information, please refer to the RPC Broker Home Page on the web at: http://vista.med.va.gov/broker/index.html.


Orientation

About this Version of the RPC Broker

This version of the Broker provides programmers with the capability to develop new VISTA client/server software using the Broker Delphi component (i.e., TRPCBroker) in the 32-bit environment.

What's New in the BDK

What’s New Through May 2002?

Support for Delphi V. 6.0

As of Patch XWB*1.1*13, the BDK supports Delphi V. 6.0.


Developer Considerations

Application Issues

Silent Login

Context-sensitive Help for the TRPCBroker Component

RPC Broker Components and Classes

TRPCBroker Component

New TRPCBroker Component Properties

As of Patch XWB*1.1*13, the following properties are new with this version of the RPC Broker:

  • Property
  • CurrentContext (Public)
  • KerneLogIn (Published)
  • LogIn (Public)
  • OnRPCBFailure (Public)
  • RPCBError (Public)
  • ShowErrorMsgs (Published)
  • User (Public)

TXWBRichEdit Component

TMult Class

TParamRecord Class

TParams Class

TVistaLogin Class

TVistaUser Class

EBrokerError Exception

Units

Hash Unit

LoginFrm Unit

MFunStr Unit

RPCConf1 Unit

RpcSLogin Unit

SplVista Unit

TRPCB Unit

TVCEdit Unit

Remote Procedure Calls (RPCs)

Overview

What Makes a Good RPC?

Creating RPCs

Using an Existing M API

M Entry Point for an RPC

Relationship Between an M Entry Point and an RPC

First Input Parameter

Return Value Types

Input Parameters

Examples

RPC Entry in the Remote Procedure File

RPC Entry in the Remote Procedure File

RPC Version in the Remote Procedure File

Blocking an RPC in the Remote Procedure File

Cleanup after RPC Execution

Documenting RPCs

Executing RPCs from Clients

How to Execute an RPC from a Client

RPC Security: How to Register an RPC

RPC Limits

BrokerExample Online Code Example

Other RPC Broker APIs

Overview

Encryption Functions

GetServerInfo Function

M Emulation Functions

VistA Splash Screen Procedures

$$BROKER^XWBLIB

$$RTRNFMT^XWBLIB

XWB ARE RPCS AVAILABLE

XWB IS RPC AVAILABLE

XWB GET VARIABLE VALUE RPC

Running RPCs on a Remote Server

Options For Running RPCs on a Remote Server

Checking RPC Availability on a Remote Server

XWB DIRECT RPC

XWB REMOTE RPC

XWB REMOTE STATUS CHECK

XWB REMOTE GETDATA

XWB REMOTE CLEAR

Deferred RPCs

Overview of Deferred RPCs

XWB DEFERRED RPC

XWB DEFERRED STATUS

XWB DEFERRED GETDATA

XWB DEFERRED CLEAR

XWB DEFERRED CLEARALL

Debugging and Troubleshooting

Overview

How to Debug Your Application

RPC Error Trapping

Identifying the Listener Process on the Server

Identifying the Handler Process on the Server

Testing Your RPC Broker Connection

Client Timeout and Buffer Clearing

Memory Leaks

Developer Utilities

RPC Broker Programmer Preferences

Tutorial

Introduction

Advanced Preparation

Step 1: Create Application with an RPC Broker Component

Step 2: Get Server/Port

Step 3: Establish Broker Connection

Step 4: RPC Routine to List Terminal Types

Step 5: RPC to List Terminal Types

Step 6: Call the ZxxxTT LIST RPC

Step 7: Associate IENs

Step 8: Routine to Retrieve Terminal Types =

Step 9: RPC to Retrieve Terminal Types

Step 10: Call Zxxx RETRIEVE RPC

Step 11: Register RPCs

See Also: FileMan Delphi Components (FMDC)

Tutorial Source Code

DLL Interface

Introduction

DLL Special Issues

RPC Results from DLL Calls

GetServerInfo Function and the DLL

DLL Exported Functions

RPCBCall

RPCBCreate

RPCBCreateContext

RPCBFree

RPCBMultItemGet

RPCBMultPropGet

RPCBMultSet

RPCBMultSortedSet

RPCBParamGet

RPCBParamSet

RPCBPropGet

RPCBPropSet

Guidelines for C++

Overview

TRPCBroker C++ Class Methods

Initialize the Class

Create Broker Instances

Connect to the Server

Execute RPCs

Destroy Broker Instances

Guidelines for C

Overview

Initialize—LoadLibrary and GetProcAddress

Create Broker Components

Connect to the Server

Execute RPCs

Destroy Broker Components

Guidelines for Visual Basic

Overview

Initialize

Create Broker Components

Connect to the Server

Execute RPCs

Destroy Broker Components