oBus Object
An Object that copies one Object's Value property to another Object's Value property.
Description:
 A Processing Object that takes the Value property of the Object to which the Input property links and copies it to the Value property of the Object to which the Output property links.
Operation:
 

The normal operation of the oBus Object is to take the Value property of the Object to which the Input property links and copy it to the Value property of the Object to which the Output property links once every Object list loop.  The Mode property modifies the operation so that this function only occurs once each time the Operate property transitions from 0 to 1. 

If the property option "C" is used, then the operation is modified so that the copy function only occurs once each time the Flag-property to which  the ClockIn property points transitions in the manner specified by the InvertC property.

If the InvertIn property is set to 1, then the Value of the Input Object is negated before it is copied to the Output Object.

An 8-Bit signed Value property can be substituted for either the Input or the Output property by specifying the appropriate property options.

Property Options:
 The oBus Object has 6 variants which are selected with the 3 property options: I, O, and C.  
  • I specifies that the Input property is replaced with a Value property.
  • O specifies that the Output property is replaced with a Value property.
  • C specifies that the Mode property is replaced with the ClockIn and InvertC properties.
 Continuous
operation
Clocked
operation
Pointers for both input and output:oBusoBusC
Signed 8-Bit Value on input:oBusIoBusIC
Signed 8-Bit Value on output:oBusOoBusOC
Storage size & Availability:
 The following table lists the size and availability of the oBus Object and its variants:
ObjectSizeVersion
oBus3 BytesB.1.0
oBusI4 Bytes
oBusO
oBusC5 Bytes
oBusIC
oBusOC
Properties:
 The following table lists the Properties of the oBus Object:
PropertyDescription
AddressReturns a pointer to the address of the oBus Object instance.

Data-Type: Address, Read-Only

Data-Range: 0 - 127

ClockInA pointer to an Object's Flag property that will be used to determine when the oBus Object copies the value.

Data-Type: Flag-Pointer

Data-Range: 0 - 127

Availability: oBusC,  oBusIC,  oBusOC

InputA pointer to an Object whose Value property will be copied to the Output Object's Value property.

Data-Type: Object-Pointer

Data-Range: 0 - 127

Availability: oBus,  oBusC,  oBusO,  oBusOC

InvertCA value that specifies the active transition state of the Flag property to which ClockIn points.

Data-Type: Bit, Flag

Data-Range: 0 - 1

Availability: oBusC,  oBusIC,  oBusOC

The following table lists the values of the InvertC property:

InvertCConstantDescription
0cvFalseThe copy function is performed when the Flag property linked to by the ClockIn property transitions from 0 to 1 
1cvTrueThe copy function is performed when the Flag property linked to by the ClockIn property transitions from 1 to 0
InvertInA value that specifies if the value of the Input Object is negated before it is copied to the Output object.

Data-Type: Bit, Flag

Data-Range: 0 - 1

The following table lists the values of the InvertIn property:

InvertInConstantDescription
0cvFalseThe value of the Input Object is not negated before it is copied to the Output Object.
1cvTrueThe value of the Input Object is negated before it is copied to the Output Object.
ModeA value that specifies if the copy function is performed continuously or only when the Operate property transitions from 0 to 1.

Data-Type: Bit

Data-Range: 0 - 1

Availability: oBus,  oBusI,  oBusO

The following table lists the values of the Mode property:

ModeDescription
0The value of the Input Object is continuously copied to the Output Object.
1The value of the Input Object is copied to the Output Object only when Operate property transitions from 0 to 1.
OperateA value that specifies whether or not the operation is performed.

Data-Type: Bit, Flag

Data-Range: 0 - 1

The following table lists the values of the Operate property:

OperateConstantDescription
0cvFalseThe copy function is not performed.
1cvTrueThe copy function is performed.
OutputA pointer to an Object whose Value property is set with a value copied from the input Object's Value property.

Data-Type: Object-Pointer

Data-Range: 0 - 127

Availability: oBus,  oBusC,  oBusI,  oBusIC

ValueA signed 8-Bit value that can be on either the input or the output side of the oBus Object.

Data-Type: Byte

Data-Range: -128 to +127

Availability: oBusI,  oBusIC,  oBusO,  oBusOC

Example:
 In the following example, a Virtual Circuit is made that uses the oBus Object to copy the value of an oA2DX Object to the value of an oServoX Object allowing a potentiometer to position a RC Servo.
Dim A as new oA2DX
Dim S as new oServoX
Dim B as new oBus

Sub Main()
  A.IOLine = 1
  A.Operate = cvTrue
  S.IOLine = 31
  S.Operate = cvTrue
  B.Input.Link(A)
  B.Output.Link(S)
  B.Operate = cvTrue
End Sub
See Also:
 oMath Object - Modifies a value as it copies.
oChanged Object - Detects if a value has changed as it copies.
oDDELink Object - Copies values between two Objects in two different OOPics.
oWire Object - Copies a Boolean value.