OVP VMI View Function Reference

Similar documents
OVP Guide to Using Processor Models. Model specific information for ALTERA Nios II F

Imperas Software Limited Imperas Buildings, North Weston, Thame, Oxfordshire, OX9 2HA, UK

egui Eclipse User Guide

Imperas Guide to using Virtual Platforms. Platform / Module Specific Information for imperas.ovpworld.org / ArmuKernelDual. Imperas Software Limited

Imperas Guide to using Virtual Platforms. Platform / Module Specific Information for mips.ovpworld.org / BareMetalMipsSingle. Imperas Software Limited

Imperas Peripheral Model Guide. Model Specific Information for xilinx.ovpworld.org / zynq_7000-ddrc. Imperas Software Limited

OVP VMI Run Time Function Reference

MBP. TMI Aging Model Application. Application Note

OVP Peripheral Modeling Guide

IBM. Networking INETD. IBM i. Version 7.2

OVP Guide to Using Processor Models. Model specific information for riscv RV32I

odynamo MagTek Common Message Structure (MTCMS) Programmer s Reference Manual (C++) May 2018 Manual Part Number: D

OVP Guide to Using Processor Models. Model specific information for ARM Cortex-M3

If the firmware version indicated is earlier than the "Version 1.06", please update the unit s firmware.

Tokens, Expressions and Control Structures

Tivoli Policy Director for MQSeries Version 3.8. GuidetoGlobalSecurityToolkit(GSKIT) Messages 3.8 GC

Configuration Manager

Role Based Access Control

Terms of Use. Changes. General Use.

HUAWEI H30-U10. Quick Start Guide

Input And Output of C++

CS240: Programming in C

Using OVP Models in SystemC TLM2.0 Platforms

ComAPI+ API Documentation

Aimetis Symphony Mobile Bridge. 2.7 Installation Guide

Short Notes of CS201

Oracle Alert Documentation Updates

AP COMPUTER SCIENCE JAVA CONCEPTS IV: RESERVED WORDS

CS201 - Introduction to Programming Glossary By

Rocket UniVerse. GCI Guide. Version November 2013 UNV-112-GCI-1

Adaptive Risk Manager Challenge Question Cleanup 10g ( ) December 2007

IPv6 Classification. PacketShaper 11.8

Exclaimer Mail Disclaimers 1.0 Release Notes

Oracle Fusion Middleware Oracle Stream Analytics Release Notes. 12c Release ( )

New Features in Primavera Professional 15.2

Daniel MeterLink Software v1.40

The OpenVX User Data Object Extension

Primavera Portfolio Management Reporting Views for SQL Server databases

Multi-byte Character Support Oracle FLEXCUBE Universal Banking Release [May] [2018]

Aimetis Mobile Bridge. 2.7 Release Notes

Open Source Used In c1101 and c1109 Cisco IOS XE Fuji

One 32-bit counter that can be free running or generate periodic interrupts

ARM. Streamline. Performance Analyzer. Using ARM Streamline. Copyright 2010 ARM Limited. All rights reserved. ARM DUI 0482A (ID100210)

System i. Networking RouteD. Version 5 Release 4

VP-UML Installation Guide

How Do I: Find the Highest Elevation within an Area

ABSOFT Corporation Software License Agreement. Specifically for IMSL FORTRAN 5.0 BUNDLED WITH FORTRAN COMPILERS FROM ABSOFT FOR WINDOWS OR OS X

Crit-bit Trees. Adam Langley (Version )

Tivoli SecureWay Policy Director Authorization ADK. Developer Reference. Version 3.8

Oracle Utilities Meter Data Management Release Utility Reference Model Maintain Generic Usage Subscription

ST-C700 Firmware Update service

PDF Document structure, that need for managing of PDF file. It uses in all functions from EMF2PDF SDK.

GO-GLOBAL. Client Process Manager API. Version 4.8.2

End User License Agreement

MegaStat Installation Instructions

Networking Bootstrap Protocol

MobiControl v13: Package Rules to Profiles Migration Guide. January 2016

Development tools System i5 Debugger

Object oriented programming. Instructor: Masoud Asghari Web page: Ch: 3

Tivoli Management Solution for Microsoft SQL. Statistics Builder. Version 1.1

Oracle Enterprise Manager Ops Center. Overview. What You Need. Create Oracle Solaris 10 Zones 12c Release 3 ( )

Document Reference Library User Guide

Oracle GoldenGate for Flat File

Siebel Application Deployment Manager Guide. Version 8.0, Rev. A April 2007

Symantec Validation and ID Protection. VIP Credential Development Kit Release Notes. Version January 2017

Managing Zone Configuration

P.G.TRB - COMPUTER SCIENCE. c) data processing language d) none of the above

What's New. Features introduced in New Features in Primavera Gateway 17


Objectives. Introduce static keyword examine syntax describe common uses

x10data Smart Client 7.0 for Windows Mobile Installation Guide

Auto / Account Reconciler 2013

EMBEDDED SYSTEMS PROGRAMMING Language Basics

Mile Terms of Use. Effective Date: February, Version 1.1 Feb 2018 [ Mile ] Mileico.com

DC Detective. User Guide

Networking Trivial File Transfer Protocol

Copyright 1998, 2009, Oracle and/or its affiliates. All rights reserved.

0WebMaker 3.0 Release Notes

Solution Explorer Guide Release 9.2

CHAPTER : 9 FLOW OF CONTROL

Oracle Utilities Mobile Workforce Management. Plug-Ins Guide Release

CERTIFIED MAIL LABELS TERMS OF USE and PRIVACY POLICY Agreement

Nimsoft Monitor. proxy Guide. v3.1 series

PEOPLESOFT FINANCIALS/SUPPLY CHAIN MANAGEMENT 9 MAINTENANCE PACK 13 DELTA

Call-back API. Polyhedra Ltd

Release Notes for Oracle GoldenGate for Big Data 12c ( )

Legal Notices Oracle Primavera The P6 Extended Schema Copyright 1997, 2012, Oracle and/or its affiliates. All rights reserved. Oracle and Java are reg

Aimetis Symphony Mobile ios Mobile Application

Exclaimer Signature Manager 2.0 Release Notes

MyCreditChain Terms of Use

Aimetis People Counter. 2.1 User Guide

Exclaimer Mail Disclaimers 1.0 Release Notes

ios 9 support in IBM MobileFirst Platform Foundation IBM

PROGRAMMING FUNDAMENTALS

Oracle Information Rights Management Oracle IRM Windows Authentication Extension Guide 10gR3 August 2008

Variables Data types Variable I/O. C introduction. Variables. Variables 1 / 14

Creating Python Scripts for ArcGIS STUDENT EDITION

[ITED STANDARD EDITION] International Telephone Exchange Database reference manual. Quentin Sager Consulting, Inc.

Oracle Standard Management Pack

Technical Manual Inepro EveryonePrint Gateway

Transcription:

Imperas Software Limited Imperas Buildings, North Weston, Thame, Oxfordshire, OX9 2HA, UK docs@imperas.com Author: Imperas Software Limited Version: 2.0.11 Filename: OVP_VMI_View_Function_Reference.doc Project: OVP VMI View Function Reference Last Saved: Monday, 19 January 2015 Keywords: 2015 Imperas Software Limited www.ovpworld.org Page 1 of 16

Copyright Notice Copyright 2015 Imperas Software Limited All rights reserved. This software and documentation contain information that is the property of Imperas Software Limited. The software and documentation are furnished under a license agreement and may be used or copied only in accordance with the terms of the license agreement. No part of the software and documentation may be reproduced, transmitted, or translated, in any form or by any means, electronic, mechanical, manual, optical, or otherwise, without prior written permission of Imperas Software Limited, or as expressly provided by the license agreement. Right to Copy Documentation The license agreement with Imperas permits licensee to make copies of the documentation for its internal use only. Each copy shall include all copyrights, trademarks, service marks, and proprietary rights notices, if any. Destination Control Statement All technical data contained in this publication is subject to the export control laws of the United States of America. Disclosure to nationals of other countries contrary to United States law is prohibited. It is the reader s responsibility to determine the applicable regulations and to comply with them. Disclaimer IMPERAS SOFTWARE LIMITED, AND ITS LICENSORS MAKE NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS MATERIAL, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 2015 Imperas Software Limited www.ovpworld.org Page 2 of 16

Table of Contents 1 Introduction.. 4 2 View User Interface. 5 2.1 VMIVIEWADDVIEWOBJECTNOTIFICATIONCALLBACK.. 5 2.2 VMIVIEWREMOVEVIEWOBJECTNOTIFICATIONCALLBACK.. 5 2.3 VMIVIEWADDVIEWEVENTNOTIFICATIONCALLBACK 6 2.4 VMIVIEWREMOVEVIEWEVENTNOTIFICATIONCALLBACK 6 2.5 VMIVIEWADDVIEWEVENTLISTENER.. 7 2.6 VMIVIEWREMOVEVIEWEVENTLISTENER. 7 2.7 VMIVIEWGETVIEWOBJECTNAME. 8 2.8 VMIVIEWGETVIEWOBJECTDESCRIPTION. 8 2.9 VMIVIEWGETVIEWOBJECTPATH.. 9 2.10 VMIVIEWGETVIEWOBJECTVALUE 10 2.11 VMIVIEWGETVIEWOBJECTVALUESTRING 11 2.12 VMIVIEWGETVIEWOBJECTPARENT.. 12 2.13 VMIVIEWGETVIEWOBJECTCHILD. 13 2.14 VMIVIEWGETVIEWOBJECTSIBLING.. 13 2.15 VMIVIEWGETVIEWEVENTNAME 14 2.16 VMIVIEWGETVIEWEVENTDESCRIPTION. 14 2.17 VMIVIEWGETVIEWEVENTPATH. 15 2.18 VMIVIEWGETVIEWEVENTPARENT 15 2015 Imperas Software Limited www.ovpworld.org Page 3 of 16

1 Introduction This is reference documentation for version 2.0.11 of the VMI view function interface, defined in ImpPublic/include/host/vmi/vmiView.h. The functions in this interface are generally used within native code execution. Functions in the run time interface have the prefix vmiview. 2015 Imperas Software Limited www.ovpworld.org Page 4 of 16

2 View User Interface This section describes functions to use the view events and objects. 2.1 vmiviewaddviewobjectnotificationcallback void vmiviewaddviewobjectnotificationcallback( vmiviewobjectnotifyfn notifycb, void *userdata ); Install a callback to be invoked each time a view object is created or deleted static VMI_VIEW_OBJECT_NOTIFY_FN(objectNotify) { vmiviewaddviewobjectnotificationcallback(objectnotify, (void*) 0x12345678); 2.2 vmiviewremoveviewobjectnotificationcallback void vmiviewremoveviewobjectnotificationcallback( vmiviewobjectnotifyfn notifycb, void *userdata ); Remove callback which is invoked each time a view object is created or deleted vmiviewremoveviewobjectnotificationcallback(objectnotify, (void*) 0x12345678); 2015 Imperas Software Limited www.ovpworld.org Page 5 of 16

2.3 vmiviewaddvieweventnotificationcallback void vmiviewaddvieweventnotificationcallback( vmivieweventnotifyfn notifycb, void *userdata ); Install a callback to be invoked each time a view event is created or deleted static VMI_VIEW_EVENT_NOTIFY_FN(eventNotify) { vmiviewaddvieweventnotificationcallback(eventnotify, (void*) -1); 2.4 vmiviewremovevieweventnotificationcallback void vmiviewremovevieweventnotificationcallback( vmivieweventnotifyfn notifycb, void *userdata ); Remove callback which is invoked each time a view event is created or deleted #include vmi/vmiview.h vmiviewremovevieweventnotificationcallback(eventnotify, (void*) -1); 2015 Imperas Software Limited www.ovpworld.org Page 6 of 16

2.5 vmiviewaddvieweventlistener void vmiviewaddvieweventlistener( vmivieweventp event, vmivieweventlistenerfn listenercb, void *userdata ); Install a callback to be invoked each time a particular view event occurs static VMI_VIEW_EVENT_LISTENER_FN(eventTrigger) { vmiviewaddvieweventlistener(event, eventtrigger, (void*) -123); 2.6 vmiviewremovevieweventlistener void vmiviewremovevieweventlistener( vmivieweventp event, vmivieweventlistenerfn listenercb, void *userdata ); Remove callback which is invoked each time a particular view event occurs vmiviewremovevieweventlistener(event, eventtrigger, (void*) -123); 2015 Imperas Software Limited www.ovpworld.org Page 7 of 16

2.7 vmiviewgetviewobjectname const char *vmiviewgetviewobjectname(vmiviewobjectp object); Return a view object's name (e.g. "registera") inline static vmiviewobjectp getviewobjectchildbyname( vmiviewobjectp object, const char * name) { if(!object){ return NULL; // iterate across children looking for 'name' field vmiviewobjectp child; for ( child = vmiviewgetviewobjectchild(object) ; child ; child = vmiviewgetviewobjectsibling(child) ) { const char *thisname = vmiviewgetviewobjectname(child); if(strcmp(thisname, name) == 0){ return child; return NULL; 2.8 vmiviewgetviewobject const char *vmiviewgetviewobject(vmiviewobjectp object); Return a view object's description string (or NULL if none available) 2015 Imperas Software Limited www.ovpworld.org Page 8 of 16

const char *desc = vmiviewgetviewobject(object); 2.9 vmiviewgetviewobjectpath const char *vmiviewgetviewobjectpath(vmiviewobjectp object); Return a view object's full path (e.g. "/platform/peripheral0/registera") const char *path = vmiviewgetviewobjectpath(object); 2015 Imperas Software Limited www.ovpworld.org Page 9 of 16

2.10 vmiviewgetviewobjectvalue vmiviewvaluetype vmiviewgetviewobjectvalue( vmiviewobjectp object, void *buffer, Uns32 *buffersize ); Return a view object's value. The caller passes in a buffer and the buffer size in bytes. If the buffer is large enough the value is written to the buffer and the value type is returned, otherwise VMI_VVT_NOSPACE is returned and buffersize is updated with the size required. VMI_VVT_ERROR is returned if no value is available for an object. Return Value The vmiviewobject has the following values Return Value VMI_VVT_NOSPACE VMI_VVT_ERROR VMI_VVT_BOOL VMI_VVT_SCHAR VMI_VVT_UCHAR VMI_VVT_INT8 VMI_VVT_UNS8 VMI_VVT_INT16 VMI_VVT_UNS16 VMI_VVT_INT32 VMI_VVT_UNS32 VMI_VVT_INT64 VMI_VVT_UNS64 VMI_VVT_ADDR VMI_VVT_FLT64 VMI_VVT_STRING VMI_VVT_MULTILINE No value returned. The buffer supplied is not large enough. No value returned Primitive types Signed character Unsigned character 8-bit signed value 8-bit unsigned value 16-bit signed value 16-bit unsigned value 32-bit signed value 32-bit unsigned value 64-bit signed value 64-bit unsigned value Address type 64-bit floating point Single line string Multi line string static void printvalue(vmiviewobjectp object, Uns32 buffersize, int depth) { const char *path = vmiviewgetviewobjectpath(object); 2015 Imperas Software Limited www.ovpworld.org Page 10 of 16

Uns32 n = buffersize; char buff[n+1]; Uns32 buffsize = n; buff[n] = (char)0xfe; vmiviewvaluetype t = vmiviewgetviewobjectvalue(object, buff, &buffsize); VMI_ASSERT(buff[n] == (char)0xfe, "data after value buffer clobbered"); void *p = buff; switch (t) { case VMI_VVT_ERROR: vmiprintf("%s: %s: OBJECT %s NO VALUE\n", TAG, func, path); break; case VMI_VVT_NOSPACE: VMI_ASSERT(depth == 0, "vmiviewgetviewobjectvalue() failed with requested buffer size"); printvalue(object, buffsize, depth+1); break; case VMI_VVT_BOOL: if(logfile) { fprintf(logfile, "%s\t%s\n", path, *(Bool*) p? "True" : "False"); else { vmiprintf("%s: %s: OBJECT %s Uns8 VALUE %s\n", TAG, func, path, *(Bool*) p? "True" : "False"); break; case VMI_VVT_UNS8: if(logfile) { fprintf(logfile, "%s\t%u\n", path, *(Uns8*) p); else { vmiprintf("%s: %s: OBJECT %s Uns8 VALUE %u\n", TAG, func, path, *(Uns8*) p); break; case VMI_VVT_UNS32: if(logfile) { fprintf(logfile, "%s\t%u 0x%08x\n", path, *(Uns32*) p, *(Uns32*) p); else { vmiprintf("%s: %s: OBJECT %s Uns32 VALUE %u 0x%08x\n", TAG, func, path, *(Uns32*) p, *(Uns32*) p); break; case VMI_VVT_STRING: if(logfile) { fprintf(logfile, "%s\t%s\n", path, (char*)p); else { vmiprintf("%s: %s: OBJECT %s STRING VALUE %s\n", TAG, func, path, (char*)p); break; default: VMI_ASSERT(0, "unhandled value type %u\n", t); break; 2.11 vmiviewgetviewobjectvaluestring const char *vmiviewgetviewobjectvaluestring( 2015 Imperas Software Limited www.ovpworld.org Page 11 of 16

); vmiviewobjectp void Uns32 object, *buffer, *buffersize Return a view object's value as a string The caller passes in a buffer and the buffer size in bytes. If the buffer is large enough the value string is written to the buffer and a pointer to the string is returned, otherwise NULL is returned and buffersize is updated with the size required. NULL is returned with buffersize of zero if no value is available for an object. // Get value string. // Try first with a tiny buffer. Uns32 n = 2; char buff[n+1]; Uns32 buffsize = n; buff[n] = (char)0xcd; const char *value = vmiviewgetviewobjectvaluestring(object, buff, &buffsize); VMI_ASSERT(buff[n] == (char)0xcd, "data after value string buffer clobbered"); if ( value ) { vmiprintf("%s: %s: OBJECT %s VALUE STRING %s\n", TAG, func, opath, buff); else { if ( buffsize == 0 ) { vmiprintf("%s: %s: OBJECT %s NO VALUE\n", TAG, func, opath); else { // Too big for small buffer. Try again with one of the requested size. VMI_ASSERT(buffSize < 1024, "requested buffer too big"); 2.12 vmiviewgetviewobjectparent vmiviewobjectp vmiviewgetviewobjectparent(vmiviewobjectp object); Return a view object's parent object 2015 Imperas Software Limited www.ovpworld.org Page 12 of 16

// Walk up the object tree, printing any values we find. vmiviewobjectp object; for ( object = vmiviewgetvieweventparent(event) ; object ; object = vmiviewgetviewobjectparent(object) ) { const char *opath = vmiviewgetviewobjectpath(object); // Now get the value as a typed entity. printvalue(object, 1, 0); 2.13 vmiviewgetviewobjectchild vmiviewobjectp vmiviewgetviewobjectchild(vmiviewobjectp object); Return a view object's child object for(object = vmiviewgetviewobjectchild(object); object ; object = vmiviewgetviewobjectsibling(object)){ if(vmiviewgetviewobjectchild(object)){ // if there is a child iterate printall(object); else { // else just print this object printvalue(object, 4, 0); 2.14 vmiviewgetviewobjectsibling 2015 Imperas Software Limited www.ovpworld.org Page 13 of 16

vmiviewobjectp vmiviewgetviewobjectsibling(vmiviewobjectp object); Return a view object's sibling object // iterate across children looking for 'name' field vmiviewobjectp child; for ( child = vmiviewgetviewobjectchild(object) ; child ; child = vmiviewgetviewobjectsibling(child) ) { const char *thisname = vmiviewgetviewobjectname(child); if(strcmp(thisname, name) == 0){ return child; TBD 2.15 vmiviewgetvieweventname const char *vmiviewgetvieweventname(vmivieweventp event); Return a view event's name (e.g. "read") const char *name = vmiviewgetvieweventname(event); 2.16 vmiviewgetviewevent const char *vmiviewgetviewevent(vmivieweventp event); 2015 Imperas Software Limited www.ovpworld.org Page 14 of 16

Return a view event's description string (or NULL if none available) const char *desc = vmiviewgetviewevent(event); 2.17 vmiviewgetvieweventpath const char *vmiviewgetvieweventpath(vmivieweventp event); Return a view event's full path (e.g. "/platform/peripheral0/registera/read") const char *path = vmiviewgetvieweventpath(event); 2.18 vmiviewgetvieweventparent vmiviewobjectp vmiviewgetvieweventparent(vmivieweventp event); Return a view event's parent object vmiviewobjectp pobject = vmiviewgetvieweventparent(event); 2015 Imperas Software Limited www.ovpworld.org Page 15 of 16

## 2015 Imperas Software Limited www.ovpworld.org Page 16 of 16