OOPic Programmer's Guide

Chapter 9. - Virtual Circuits

Contents:


What is a Virtual Circuit?

 A Virtual Circuit is a circuit in an OOPic that appears to be a physical discrete electronic circuit, but is actually the OOPic operating system emulating the functionality of the circuit.

A Virtual Circuit can be comprised of any number of any kind of Objects so long as at least one Processing Object is included. Each individual part of the Virtual Circuit can be manipulated or evaluated by the program providing total computerized control of the entire circuit.


How are Virtual Circuit made?

 Virtual Circuits are created by progmatically linking together a set of Objects in the same methodology as one would physically link together a set of electronic components to assemble an electronic circuit. The application's program can assemble, disassemble, or reconfigure the structure of a Virtual Circuit at any time during the execution of the program.

The Objects that are used to link together the Virtual Circuits retrieve their input values and store their output values in the properties of other Objects. These Objects are referred to as Processing Objects. These Objects encapsulate various mathematical, logical and other data manipulation functions. When they are linked to other Objects, their encapsulated function is performed on the "Linked" Objects. The Link that specifies what Objects are used, is done with a special Object Property called a Pointer.


Linking Objects

 To progmatically link together the Objects of a Virtual Circuit, The Link method is used in conjunction with the Objects and properties that are to be connected. This method creates a link between a two Objects. Once a link is created, the linking Object will use the linked property's value.

While other methods are used to instruct Objects to perform operations, the Link method is used to instruct a Pointer Property to point to another Object's property. The syntax for the Link method is as follows;

baseobject.pointerproperty.Link(linkobject.propertytolink)

The Link method is only available on properties that are designated as a Pointer Property.


Pointer Properties

 A Pointer Property is an Object's Property that tells that Object where to find information in another Object. It does not store the information itself, instead each time the information is needed, the Pointer Property is used to identify where to retrieve the information from.  

The Object's property that a Pointer Property is linked to can be changed at any time during the execution of the applications program.

Two types of Pointer Properties exist;

  1. A Pointer to the target Object's Default property. referred to as an Object-Pointer
  2. A Pointer to one of the target Object's Flag properties. referred to as a Flag-Pointer

When Linking Pointer Properties to Objects properties, the Pointer Property's type and the Object property's type must always match.


Object Pointers

 An Object-Pointer is used to link a Processing Object to the Default Property of another Object. When linking a Pointer Property of this type, The argument that is expected inside a set of parentheses after the link method is the Target Object's Name plus a period and the Target Object's Default Property or just the Target Object's Name 

The Default Property of an Object is the property that will be used if none is specified when referring to that Object. To find out which Object's properties are Default Properties, refer to the Object's Technical Information where each property's Data-Type is specified

The following example shows the Object-Pointers of the oMath Object being linked to the default properties of two other Objects.


Flag Pointers

 A Flag-Pointer is used to link a Processing Object to a Flag-type Property of another Object.  When linking a Pointer Property of this type, The argument that is expected inside a set of parentheses after the link method is the Target Object's Name plus a period and the desired Target Object's Flag-type Property. 

A Flag-type Property is a property that consists of 1-bit and is configured in such a way to be able to be linked to. To find out which Object's properties are Flag-type Properties, refer to the Object's Technical Information where each property's Data-Type is specified

The following example shows the Flag-Pointers of the oGate Object being linked to the Flag-type properties of two other Objects.