view api reference guide - ca...

32
View API Reference Guide Document 9030491-02 Customization Titlepage

Upload: duongkhanh

Post on 28-Apr-2018

220 views

Category:

Documents


0 download

TRANSCRIPT

View API Reference Guide

Document 9030491-02

Customization

Titlepage

View API Reference Guide Page 2

Copyright Notice

Document 9030491-02. Copyright © November 2001 by Aprisma Management Technologies, Inc. All rights reserved worldwide. Use, duplication, or disclosure by the United States government is subject to the restrictions set forth in DFARS 252.227-7013(c)(1)(ii) and FAR 52.227-19.

Liability Disclaimer

Aprisma Management Technologies, Inc. (“Aprisma”) reserves the right to make changes in specifications and other information contained in this document without prior notice. In all cases, the reader should contact Aprisma to inquire if any changes have been made.

The hardware, firmware, or software described in this manual is subject to change without notice.

IN NO EVENT SHALL APRISMA, ITS EMPLOYEES, OFFICERS, DIRECTORS, AGENTS, OR AFFILIATES BE LIABLE FOR ANY INCIDENTAL, INDIRECT, SPECIAL, OR CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING BUT NOT LIMITED TO LOST PROFITS) ARISING OUT OF OR RELATED TO THIS MANUAL OR THE INFORMATION CONTAINED IN IT, EVEN IF APRISMA HAS BEEN ADVISED OF, HAS KNOWN, OR SHOULD HAVE KNOWN, THE POSSIBILITY OF SUCH DAMAGES.

Trademark, Service Mark, and Logo Information

SPECTRUM, IMT, and the SPECTRUM IMT/VNM logo are registered trademarks of Aprisma Management Technologies, Inc., or its affiliates. APRISMA, APRISMA MANAGEMENT TECHNOLOGIES, the APRISMA MANAGEMENT TECHNOLOGIES logo, MANAGE WHAT MATTERS, DCM, VNM, SpectroGRAPH, SpectroSERVER, Inductive Modeling Technology, Device Communications Manager, SPECTRUM Security Manager, and Virtual Network Machine are unregistered trademarks of Aprisma Management Technologies, Inc., or its affiliates. For a complete list of Aprisma trademarks, service marks, and trade names, go tohttp://www.aprisma.com/manuals/trademark-list.htm.

All referenced trademarks, service marks, and trade names identified in this document, whether registered or unregistered, are the intellectual property of their respective owners. No rights are granted by Aprisma Management Technologies, Inc., to use such marks, whether by implication, estoppel, or otherwise. If you have comments or concerns about trademark or copyright references, please send an e-mail to [email protected]; we will do our best to help.

View API Reference Guide Page 3

Restricted Rights Notice

(Applicable to licenses to the United States government only.)

This software and/or user documentation is/are provided with RESTRICTED AND LIMITED RIGHTS. Use, duplication, or disclosure by the government is subject to restrictions as set forth in FAR 52.227-14 (June 1987) Alternate III(g)(3) (June 1987), FAR 52.227-19 (June 1987), or DFARS 52.227-7013(c)(1)(ii) (June 1988), and/or in similar or successor clauses in the FAR or DFARS, or in the DOD or NASA FAR Supplement, as applicable. Contractor/manufacturer is Aprisma Management Technologies, Inc. In the event the government seeks to obtain the software pursuant to standard commercial practice, this software agreement, instead of the noted regulatory clauses, shall control the terms of the government's license.

Virus Disclaimer

Aprisma makes no representations or warranties to the effect that the licensed software is virus-free.

Aprisma has tested its software with current virus-checking technologies. However, because no antivirus system is 100 percent effective, we strongly recommend that you write-protect the licensed software and verify (with an antivirus system in which you have confidence) that the licensed software, prior to installation, is virus-free.

Contact Information

Aprisma Management Technologies, Inc.

273 Corporate Drive

Portsmouth, NH 03801

Phone: 603-334-2100

U.S. toll-free: 877-468-1448

Web site: http://www.aprisma.com

View API Reference Guide Page 4

ContentsIntroduction 6

View API .......................................................................................................................6Mandatory Resources ..................................................................................................7Application Integration ..................................................................................................7Development Environment ...........................................................................................7

View API Classes Synopsis 8

Introduction ..................................................................................................................8

CsModelInfo 10CsModelInfo ( ) .......................................................................................................12get_m_handle ( ) ....................................................................................................12get_m_t_handle ( ) .................................................................................................12set_m_handle ( ) .....................................................................................................13

CsUIServerHandle 14CsUIServerHandle ( ) .............................................................................................16check_window ( ), check_window_async ( ) ...........................................................16create_model ( ), create_model_async ( ) ..............................................................17new_view ( ), new_view_async ( ) ..........................................................................18read_matcher ( ), read_matcher_async ( ) .............................................................19set_busy ( ), set_busy_async ( ) .............................................................................20write_matcher ( ), write_matcher_async ( ) ............................................................21

CsViewInfo 22CsViewInfo ( ) .........................................................................................................24get_f_name ( ) ........................................................................................................25get_instance_id ( ) ..................................................................................................26get_m_handle ( ) ....................................................................................................26get_ok_verify_mh ( ) ...............................................................................................26get_view_type ( ) ....................................................................................................26get_window_height ( ), get_window_width ( ) .........................................................27set_ok_verify_mh ( ) ...............................................................................................27set_window_height ( ), set_window_width ( ) .........................................................27get_scroll_to_mh ( ) ................................................................................................28set_scroll_to_mh ( ) ................................................................................................28

Contents Contents

View API Reference Guide Page 5

CsViewWindow 29CsViewWindow ( ) ..................................................................................................30get_window_busy ( ) ...............................................................................................30get_window_busy_set ( ) ........................................................................................30get_window_id ( ) ...................................................................................................31set_window_busy ( ) ...............................................................................................31set_window_id ( ) ....................................................................................................31

Index 32

Introduct ion

View API Reference Guide Page 6

Introduction

This section provides a brief introduction to the ViewAPI toolkit.

View API

The SPECTRUM View API Reference Guide is an extension of the SPECTRUM Asynchronous SpectroSERVER API. The View API provides a set of interfaces used to make requests of SpectroGRAPH. The View API interfaces are classes and methods that allow external application developers access to existing functionality within SpectroGRAPH. Applications developed using the interfaces provided with the View API will appear to be an integrated part of SpectroGRAPH. A discussion of how the View API can be used is provided in the section View API Classes Synopsis.

The interfaces that are part of the View API allow applications to make the following requests of SpectroGRAPH:

• Add an external application as an extension to SpectroGRAPH. This extension can then be integrated with the SpectroGRAPH user interface.

• Copy, cut, and paste models between applications. This copying, cutting, and pasting, consists of just the reading and writing of model handles between applications, and can be executed regardless of whether the applications are View API applications or SpectroGRAPH itself. The SpectroGRAPH copy/cut/paste buffer is used as intermediate storage area for the passing of models between applications.

• Request SpectroGRAPH to add a new model to the SpectroSERVER database.

• Request SpectroGRAPH to open a view of a specified model.

Introduct ionMandatory Resources

View API Reference Guide Page 7

Mandatory Resources

The following are the command line parameters that an application must supply to make a connection with SpectroGRAPH.

• -vnmname A mandatory command line parameter that is read from the app-defaults/spectrum file as the variable vnmname.

• -vnmsocket A mandatory command line parameter that is read from the app-defaults/spectrum file as the variable vnmsocketnumber.

• -uisocket A mandatory command line parameter that is read from the app-defaults/spectrum file as the variable uisocketnumber.

• externalprocess path A variable in the app-defaults/spectrum file that defines the path to where the application processes are stored.

Application Integration

After the external application has been developed, it has to be packaged for installation at other SPECTRUM sites. This packaging process is accomplished using the SPECTRUM Extension Integration Toolkit. By using the custom install process provided by the SPECTRUM Extension Integration Toolkit, a developer is assured that the application will be properly installed at any SPECTRUM site. See the SPECTRUM Extensions Integration Toolkit Developer’s Guide.

Development Environment

The SPECTRUM Level II Developer’s Tools are designed to be used with a platform-specific version of C++ (or C, in the case of the EPI). Refer to the SPECTRUM Software Release Notice (SSRN) for more information on release-specific requirements.

View API Classes Synopsis

View API Reference Guide Page 8

View API Classes Synopsis

This section provides a synopsis of the View API Reference classes and interfaces.

Introduction

The View API provides developers with two types of functionality:

• The ability for an external application to connect with SpectroGRAPH.• The ability to make requests of SpectroGRAPH.

The connection mechanism is a SpectroSERVER API CsMailService class method that is explained in the SpectroSERVER API Reference Guide.

Once a connection has been established, there are four interfaces that an external application can use to make requests of SpectroGRAPH:

• Create Views• Create Models• Read Models• Write Models

The request interfaces use four corresponding View API classes and several others that are part of the SpectroSERVER API and the VnmParmBlock API (VPAPI). To create models and views, four View API classes are used:

• CsUIServerHandle• CsViewInfo• CsModelInfo• CsViewWindow

The handle class CsUIServerHandle is used in the same manner as the handle classes of the SpectroSERVER API. CsViewInfo, CsViewWindow, and CsModelInfo are used exclusively with CsUIServerHandle.

View API Classes Synopsis

View API Reference Guide Page 9

To read and write model information, the Cut/Copy/Paste buffer of SpectroGRAPH is used for intermediate storage of the model handles.

The create model interface causes a creation view for the model type to appear in SpectroGRAPH. The required view information must be supplied to complete the creation process. Each section that describes these interfaces provides full details about their functionality and what developers should consider before using these interfaces to make calls to SpectroGRAPH.

CsModel Info

View API Reference Guide Page 10

CsModelInfo

Class Hierarchy

Include FileCsModelInfo.h

DescriptionThe create model methods provided by the View API pass information within the class CsModelInfo. CsModelInfo also provides access methods for data setting and retrieval.

See Also:

CsModelHandle and CsMTypeHandle in the VnmParmBlock Reference.

VnmParmBlock

CsMyTypeHandle

CsModelInfo

CsModel Info

View API Reference Guide Page 11

Public MethodsTable 1: CsModelInfo Methods

Method Description

CsModelInfo ( ) (Page 12)

A copy constructor that creates a CsModelInfo object that stores a specified model type handle.

get_m_handle ( ) (Page 12)

Retrieves the CsModelInfo object model handle.

get_m_t_handle ( ) (Page 12)

Retrieves the CsModelInfo object model type handle.

set_m_handle ( ) (Page 13)

Sets the CsModelInfo object model handle.

CsModel InfoCsModelInfo ( )

View API Reference Guide Page 12

CsModelInfo ( )CsModelInfo (CsMTypeHandle mth);

Constructs a CsModelInfo object that stores a model type handle.

See Also:

CsVnmParmBlock and CsMTypeHandle in the VnmParmBlock Reference.

get_m_handle ( )const CsModelHandle & get_m_handle() void const;

This method retrieves the CsModelInfo object model handle.

See Also:

CsVnmParmBlock and CsModelHandle in the VnmParmBlock Reference.

get_m_t_handle ( )const CsMTypeHandle & get_m_t_handle() void const;

This method retrieves the CsModelInfo object model type handle. This method returns a CsMTypeHandle reference.

See Also:

CsMTypeHandle in the VnmParmBlock Reference.

Argument Description

mth The model type handle to be stored.

CsModel Infoset_m_handle ( )

View API Reference Guide Page 13

set_m_handle ( )void set_m_handle (const CsModelHandle& mh);

This method sets the CsModelInfo object model handle.

See Also:

CsVnmParmBlock and CsModelHandle in the VnmParmBlock Reference.

Argument Description

mh The CsModelInfo object model handle.

CsUIServerHandle

View API Reference Guide Page 14

CsUIServerHandle

Class Hierarchy

Include FileCsUISrvHndl.h

DescriptionView API request interfaces are accessed through CsUIServerHandle. This handle class provides the interface to the SpectroSERVER API for requests that are sent to SpectroGRAPH. For an application to make a request of SpectroGRAPH, it must create a CsUIServerHandle. CsUIServerHandle methods are paired exactly like those of the SpectroSERVER API handle classes. The first member of the pair, or the “initiator”, is identified with the “_async” suffix and initiates a request. The second method of the pair, or the “retriever,” has the same name, but does not end with the “_async” suffix, and retrieves the request. As an input parameter, the second method always takes the response id returned by the first method.

CsUIServerHandle

CsUIServerHandle

View API Reference Guide Page 15

Public Methods

Table 2: CsUIServerHandle Functions

Method Description

CsUIServerHandle ( ) (Page 16)

Constructs a CsUIServerHandle object which routes messages to the UI server.

check_window ( ), check_window_async ( ) (Page 16)

This method pair checks the validity of a Window ID in a CsViewWindow object.

create_model ( ), create_model_async ( ) (Page 17)

This method pair controls requests of SpectroGRAPH to display a Creation View.

new_view ( ), new_view_async ( ) (Page 18)

This method pair controls requests of SpectroGRAPH for an integrated view.

read_matcher ( ), read_matcher_async ( ) (Page 19)

This method pair requests SpectroGRAPH to read from the copy/cut/paste buffer.

set_busy ( ), set_busy_async ( ) (Page 20)

This method pair controls the setting of the cursor, (watch cursor) of the specified window, to indicate a busy status, or to reset the watch cursor to indicate a ready status.

write_matcher ( ), write_matcher_async ( ) (Page 21)

This method pair controls request of SpectroGRAPH to write to the copy/cut/paste buffer.

CsUIServerHandleCsUIServerHandle ( )

View API Reference Guide Page 16

CsUIServerHandle ( )CsUIServerHandle (const CsHostAddress & host_address);

This constructor creates a handle class that is capable of routing messages to the UI server on the given host.

check_window ( ), check_window_async ( )CsVnmParmBlock * check_window (CsTresponseid resp_id);

CsTresponseid check_window_async (CsViewWindow * what, CsMailClient * who);

This method pair requests and retrieves the validity of the Window ID in the CsViewWindow object. The check_window () method returns the result of a check_window_async() call. The returned value is a VnmParmBlock object that can be queried for error. A return value of CsError::SUCCESS indicates that the Window ID checked is still valid. A return value of CsError::FAILURE indicates that the Window ID checked is not valid.

Argument Description

resp_id The same CsTresponseid returned by the check_window_async() call.

what A CsViewWindow object that contains the Window ID to be validated.

who A pointer to the CsMailClient object to be notified when the request completes.

CsUIServerHandlecreate_model ( ) , create_model_async ( )

View API Reference Guide Page 17

create_model ( ), create_model_async ( )create_model (CsTresponseid resp_id);

CsTresponseid create_model_async (CsModelInfo * what, CsMailClient * who);

This method pair requests and retrieves the information needed to construct a Creation view. The create_model() method returns the results of the create_model_async call. A CsModelInfo object is returned by this method. The CsModelInfo object can be queried for errors as well as the CsModelTypeHandle of the created model type.

See Also:

CsModelInfo and CsError in the VnmParmBlock Reference.

Argument Description

resp_id The same CsTresponseid returned by the create_model_async() call.

what A CsModelInfo object that contains the type of the model to be created. The CsUIServerHandle object assumes ownership of the CsModelInfo input.

who A pointer to the CsMailClient object to be notified when the request completes.

Note:Note:

The CsModelInfo object returned by this call is owned and should be deleted by the caller.

CsUIServerHandlenew_view ( ) , new_view_async ( )

View API Reference Guide Page 18

new_view ( ), new_view_async ( )CsViewWindow * new_view( CsTresponseid resp_id );

CsTresponseid new_view_async (CsViewInfo * what, CsMailClient * who);

This method pair sets and retrieves the information required by SpectroGRAPH to create a new view. The new_view() method returns a pointer to a CsViewWindow object. The caller of new_view() must delete the returned CsViewWindow object. The CsViewWindow can be queried for error and the X Window ID. The X Window ID is the ID of the window containing the SpectroGRAPH view presenting the model. The external application may use this Window to draw on the newly created view. The external application may NOT, however, call XDestroyWindow with this window ID, because SpectroGRAPH, which created this Window, will not be notified that the Window was destroyed. The next time it tries to use the Window, an X Error results and SpectroGRAPH exits. The new_view_async() method requests SpectroGRAPH to generate a SpectroGRAPH view. The CsUIServerHandle object assumes ownership of the CsViewInfo input.

Successful creation of a new view returns CsError::SUCCESS and a non-zero window ID. Unsuccessful creation of a new view returns the error

Argument Description

resp_id The same CsTresponseid returned by the new_view_async() call.

what A CsViewInfo object that contains the information that SpectroGRAPH needs to create the view. The CsViewInfo object must contain the model handle and the view type. For GENERIC views, the CsViewInfo object must also contain the name of the GIB file name and the Instance ID.

who A pointer to the CsMailClient object to be notified when the request completes.

CsUIServerHandleread_matcher ( ) , read_matcher_async ( )

View API Reference Guide Page 19

resulting from the model verification by SpectroGRAPH and zero for the window ID. Model verification refers to SpectroGRAPH verifying the model handle with SpectroSERVER.

See Also:

CsViewInfo and CsViewWindow.

CsError in the VnmParmBlock Reference.

read_matcher ( ), read_matcher_async ( )CsModelDescList * read_matcher(CsTresponseid resp_id);

CsTresponseid read_matcher_async (CsMailClient * who);

This method pair requests and retrieves a list of models in the SpectroGRAPH Copy/Cut/Paste buffer. The returned CsModelDescList can be queried for errors and each CsExpModelDesc contained in the list. The

Note:Note:

Toolkit Widget IDs cannot be passed across process boundaries and retain their meanings; they simply become numbers. Unlike X Window IDs, which exist on the X server and can be shared across processes using the same X server, Xtoolkit Widget IDs exist on the client and are exclusive to one process, even if multiple processes use the same X server. If one process creates a Widget and passes it to another process, and that second process attempts to use the Widget, a fault results.

Argument Description

resp_id The same CsTresponseid returned by the read_matcher_async() call.

who A pointer to the CsMailClient object to be notified when the request completes.

CsUIServerHandleset_busy ( ) , set_busy_async ( )

View API Reference Guide Page 20

caller of read_matcher() must delete the returned CsModelDescList object.

See Also:

CsError, CsModelDescList, CsExpModelDesc, and CsModelDesc in the VnmParmBlock Reference.

set_busy ( ), set_busy_async ( )set_busy (CsTresponseid resp_id);

set_busy_async (class CsViewWindow * what, class CsMailClient * who);

This method pair controls the setting of the cursor (watch cursor), of the specified window, to indicate a busy status, or to reset the watch cursor to indicate a ready status. The return is a CsVNMParmBlock. The VnmParmBlock object can be queried for an error. A CsError::SUCCESS indicates that the specified window ID is valid. A CSError::FAILURE indicates that the specified window ID is not valid.

Argument Description

resp_id The same CsTresponseid returned by the read_matcher_async() call.

what A CsViewWindow object that contains the Window ID to be set.

who A pointer to the CsMailClient object to be notified when the request completes.

CsUIServerHandlewri te_matcher ( ) , wr i te_matcher_async ( )

View API Reference Guide Page 21

write_matcher ( ), write_matcher_async ( )CsModelDescList * write_matcher (CsTresponseid resp_id);

CsTresponseid write_matcher_async ( CsModelDescList * what, CsMailClient * who );

This method pair controls writing the list of models into the SpectroGRAPH Copy/Cut/Paste buffer. The write_matcher() method returns the results of the write_matcher_async() call. The returned CsModelDescList object can be queried for error, model type handle, and model handle. The caller of write_ matcher() must delete the returned CsModelDescList object.

See Also:

CsError, CsModelDescList, CsExpModelDesc, and CsModelDesc in the VnmParmBlock Reference.

Argument Description

resp_id The same CsTresponseid returned by the write_matcher_async() call.

what A CsModelDescList object that contains a list of model handles to be written to the buffer.

who A pointer to the CsMailClient object to be notified when the request completes.

CsViewInfowri te_matcher ( ) , wr i te_matcher_async ( )

View API Reference Guide Page 22

CsViewInfo

Class Hierarchy

Include FileCsViewInfo.h

DescriptionThe new view methods provided by the View API pass information within the class CsViewInfo. CsViewInfo provides access methods for data setting and retrieval.

CsVnmParmBlock

CsViewInfo

CsViewInfowri te_matcher ( ) , wr i te_matcher_async ( )

View API Reference Guide Page 23

Public MethodsTable 3: CsViewInfo Functions

Method Description

CsViewInfo ( ) (Page 24)

Constructs a CsViewInfo object with user-specified arguments.

get_f_name ( ) (Page 25)

Retrieves the file name in the CsViewInfo object.

get_instance_id ( ) (Page 26)

Retrieves the instance ID in the CsViewInfo object.

get_m_handle ( ) (Page 26)

Retrieves the model handle in the CsViewInfo object.

get_ok_verify_mh ( ) (Page 26)

Retrieves the ok_verify_mh CsTboolean.

get_view_type ( ) (Page 26)

Retrieves the view type in the CsViewInfo object.

get_window_height ( ), get_window_width ( ) (Page 27)

Obtain the pixel size of the window in which the view will be displayed.

set_ok_verify_mh ( ) (Page 27)

Sets the CsTboolean ok_verify_mh.

set_window_height ( ), set_window_width ( ) (Page 27)

Set the pixel size of the window in which the view will be displayed.

get_scroll_to_mh ( ) (Page 28)

Returns the model handle to which the view has to scroll.

set_scroll_to_mh ( ) (Page 28)

Sets the model handle to which to scroll when the view opens.

CsViewInfoCsViewInfo ( )

View API Reference Guide Page 24

CsViewInfo ( )CsViewInfo (CsModelHandle mh, CsBuffer * vt, CsBuffer * fn = 0,

CsObjectID * oid = 0);

Constructs a CsViewInfo object for a new view request. Only the following types of SpectroGRAPH views can be requested:

ALARM Any model type

CABLEWALK Segment model types

DALARM Any model type

DEVICE Device model types only

DEVTOP Device model types, boards, and ports

DEVTOP1 Device model types and ports

EVENT Any model type

FINDVIEW Any model type

FIRST Any model type

GENERIC Any model type

Argument Description

mh‘ The model Handle of the view SpectroGRAPH is to present

vt A pointer to a CsBuffer object that contains the view type.

fn For GENERIC view types, the name of the GIB file that creates the view.

oid For GENERIC view types, the Instance ID if one exists.

CsViewInfoget_f_name ( )

View API Reference Guide Page 25

LOCATION Location model types

LOSTFOUND LostFound model type of LostFound

MIBWALK Any model type

RESOURCE PC or workstation model types

TOPOLOGICAL Network topological model types

See Also:

CsBuffer and CsObjectID in the Global Classes Reference, and CsVnmParmBlock and CsModelHandle in the VnmParmBlock Reference.

get_f_name ( )CsBuffer * get_f_name(void);

This method retrieves the file name in the CsViewInfo object. The file name is returned in a CsBuffer object. (To retrieve the file name as a string, use CsBuffer::makestr().)

See Also:

CsBuffer in the Global Classes Reference.

Note:Note:

Event and Alarm View are not based on models. To create these views, developers must indicate that SPECTRUM should not check if a model handle exists for them. set_ok_verify_mh() and get_ok_verify_mh() provide this functionality.

Note:Note:The caller should not delete the CsBuffer object.

CsViewInfoget_instance_id ( )

View API Reference Guide Page 26

get_instance_id ( )CsObjectID * get_instance_id (void);

This method retrieves the instance ID in the CsViewInfo object. The instance ID is returned in a CsObjectID object; the access methods of CsObjectID are used to retrieve the instance ID.

See Also:

CsObjectID in the Global Classes Reference.

get_m_handle ( )CsModelHandle & get_m_handle (void);

This method retrieves the model handle in the CsViewInfo object.

get_ok_verify_mh ( )CsTboolean get_ok_verify_mh();

This method retrieves the value of the CsTboolean variable ok_verify_mh.

get_view_type ( )CsBuffer * get_view_type (void);

This method retrieves the view type in the CsViewInfo object. The view type is returned in a CsBuffer object. (To retrieve the view type as a string, use CsBuffer::makestr().)

See Also:

CsBuffer in the Global Classes Reference.

Note:Note:The caller should not delete the returned CsBuffer object.

CsViewInfoget_window_height ( ) , get_window_width ( )

View API Reference Guide Page 27

get_window_height ( ), get_window_width ( )CsTulong get_window_height ()const;

CsTulong get_window_width ()const;

These methods obtain the pixel size of the window in which the view will be displayed.

See Also:

set_window_height() and set_window_width().

set_ok_verify_mh ( )void set_ok_verify_mh (CsTboolean state = TRUE);

This method sets the value of the CsTboolean variable ok_verify_mh. ok_verify_mh indicates whether to verify if the model exists. If this method is called with no parameters, the default state is set and ok_verify_mh is TRUE.

set_window_height ( ), set_window_width ( )void set_window_height (CsTulong height);

void set_window_width (CsTulong width);

Note:Note:

The ok_verify_mh must be set, or corrupted responses will occur.

Argument Description

height Height of the window, in pixels.

width Width of the window, in pixels.

CsViewInfoget_scrol l_ to_mh ( )

View API Reference Guide Page 28

These methods set the pixel size of the window that the view will be displayed in. The actual window size cannot exceed the size of the display. The following types of views have default creation sizes:

• GIB views are created at the size of their background.

• Alarm views are created at 750x560 pixels.

• Event views are created at 600x600 pixels.

• Other views are created at 600x600 pixels if you do not use set_window_height() and set_window_width() to specify a window size.

See Also:

get_window_height() and get_window_width().

get_scroll_to_mh ( )CsTulong get_scroll_to_mh() const;

Returns the model handle to which the view has to scroll.

set_scroll_to_mh ( )void_set_scroll_to_mh (CsTulong mh);

Sets the model handle to which to scroll when the view opens.

Note:Note:Settings of less than 100 pixels are ignored.

CsViewWindowset_scrol l_ to_mh ( )

View API Reference Guide Page 29

CsViewWindow

Class Hierarchy

Include FileCsViewWind.h

DescriptionThe new view methods provided by the View API pass information within the class CsViewWindow. CsViewWindow provides access methods for data setting and retrieval. This class passes an X Window ID between SpectroGRAPH and the application.

CsVnmParmBlock

CsViewWindow

CsViewWindowCsViewWindow ( )

View API Reference Guide Page 30

Public Methods

CsViewWindow ( )CsViewWindow (unsigned long window = 0);

Constructs a CsViewWindow object and stores a specified X Window ID.

get_window_busy ( )CsTboolean get_window_busy ( ) const;

Returns the busy value.

get_window_busy_set ( )CsTboolean get_window_busy_set ( ) const;

Returns TRUE if the window_busy value was set via set_window_busy().

Table 4: CsViewWindow Functions

Method Description

CsViewWindow ( ) (Page 30)

Constructs a CsViewWindow object with a specified X Window ID.

get_window_busy ( ) (Page 30)

returns the busy value.

get_window_busy_set ( ) (Page 30)

Returns TRUE if the window_busy value was set via set_window_busy().

get_window_id ( ) (Page 31)

Returns the X Window ID stored in the CsViewWindow object.

set_window_busy ( ) (Page 31)

Sets the X Window’s watch cursor to busy or not busy.

set_window_id ( ) (Page 31)

Sets the X Window ID stored in the CsViewWindow object.

CsViewWindowget_window_id ( )

View API Reference Guide Page 31

get_window_id ( )unsigned long get_window_id(void);

This method returns the X Window ID stored in the CsViewWindow object.

set_window_busy ( )void set_window_busy(CsTboolean busy);

Set the window’s status to “busy” or “not busy”.

set_window_id ( )unsigned long set_window_id (unsigned long Window);

This method sets the X Window ID in the CsViewWindow object.

Argument Description

window The X window to be set.

View API Reference Guide Page 32

Index

Aapplication

integration 7mandatory resources 7

Application Integration 7

CConnecting To Spectrograph 10CsModelInfo

CsModelInfo ( ) 12get_m_handle ( ) 12get_m_t_handle ( ) 12PublicMethods 11set_m_handle ( ) 13

CsUIServerHandlecheck_window ( ),

check_window_async ( ) 16create_model ( ),

create_model_async ( ) 17new_view ( ), new_view_async ( ) 18new_view_async() 19Public Methods 15read_matcher ( ),

read_matcher_async ( ) 19set_busy ( ), set_busy_async ( ) 20write_matcher ( ),

write_matcher_async ( ) 21CsViewInfo

CsViewInfo ( ) 24get_f_name ( ) 25get_instance_id ( ) 26get_m_handle ( ) 26

get_ok_verify_mh ( ) 26get_scroll_to_mh ( ) 28get_view_type ( ) 26get_window_height() 27get_window_width() 27Public Methods 23set_ok_verify_mh ( ) 27set_scroll_to_mh ( ) 28set_window_height ( ),

set_window_width ( ) 27CsViewWindow

get_window_busy_set ( ) 30get_window_id ( ) 31Public Methods 30set_window_busy ( ) 31set_window_id() 31

DDevelopment Environment 7

MMandatory Resources 7

VView API 6

see View Application Programming Interface

View Application Programming Interface (View API)

product overview 6