Pointer Objects

Back to top of page Description:
 A Pointer Object is used to specify where to find information in another Object. It does not store the information itself, instead each time the information is needed, the Pointer is used to identify where to retrieve the information from or store the information to.  

A Pointer can be changed at any time during the execution of the applications program allowing the source or destination of the data flow to change dynamically.

All of the predefined ooPIC objects use two types of pointers.

  1. A pointer to an oValue Object.  Typically the target Object's Default property is an oValue property or has an oValue property in its default path.  These type of pointers are referred to as an oValue Pointer (example: oBus has two oValue pointers.  One for its input and one for its output.)
  2. A pointer to an oLogic Object.  Often, the target Object will have a number of oLogic properties.  These type of pointers are referred to as an oLogic Pointer. (example: oGate has oLogic Pointers).
 The following table lists the size and availability of the Pointer Objects.
 ObjectSizeDescriptionA1A2B1B2C1
oValuePtrI1 ByteA pointer to an oValue Object who's value will be used as an input.xxxxx
oValuePtrO1 ByteA pointer to an oValue Object who's value will be used as an output.xxxxx
oLogicPtrI1 ByteA pointer to an oLogic Object who's value will be used as an input.xxxxx
oLogicPtrO1 ByteA pointer to an oLogic Object who's value will be used as an output.xxxxx
Back to top of page Operation:
 The Pointer property holds the actual address of the object that is being pointed to.  During the operation of a Virtual Circuit, this property is used to identify where to retrieve the information from or store the information to.  

A Link Method is provided to automate the assignment of the Pointer property to the address of an object.

Back to top of pageProperties:

The following table lists the properties of the Pointer Object:

Property

Description

Pointer
The memory address of an oValue Object.
Object Class: oVar7 Value Range: 0 - 127
Data Type: Pointer Default Value: 0
Address
Returns a pointer to the address of the Pointer Object instance.
Object Class: oAddress Value Range: 0 - 127
Data Type:Pointer (Read Only) Default Value: Address of Object

Back to top of pageMethods

The following table lists the properties of the Pointer Object:

Methods

Description

Link
Sets the Pointer property to the address of the given Object.
Clear
Clears the Pointer property to null. (0)

Back to top of page Example:

For examples, see the oWire and oBus objects.

Back to top of page Related Items:

 See Chapter 8 of the ooPIC Programmers Guide for information of using pointers in Virtual Circuits.
Back to top of page Version History and Bug List:
 Firmware Ver A1: Introduced.

Bugs: No known bugs.


ooPIC Compiler Ver 6.0 (c) Copyright 1997 - 2007 Savage Innovations, LLC.