DiffAmp

class DiffAmp

A difference amplifier. Output is the difference between the total plus inputs and the total minus inputs multiplied by gain. Gain can be set statically as a field or can be a destination message and thus dynamically determined by the output of another object. Same as GENESIS diffamp object.

proc

void (shared message field) This is a shared message to receive Process messages from the scheduler objects.The first entry in the shared msg is a MsgDest for the Process operation. It has a single argument, ProcInfo, which holds lots of information about current time, thread, dt and so on. The second entry is a MsgDest for the Reinit operation. It also uses ProcInfo.

setGain()

(destination message field) Assigns field value.

getGain()

(destination message field) Requests field value. The requesting Element must provide a handler for the returned value.

setSaturation()

(destination message field) Assigns field value.

getSaturation()

(destination message field) Requests field value. The requesting Element must provide a handler for the returned value.

getOutputValue()

(destination message field) Requests field value. The requesting Element must provide a handler for the returned value.

gainIn()

(destination message field) Destination message to control gain dynamically.

plusIn()

(destination message field) Positive input terminal of the amplifier. All the messages connected here are summed up to get total positive input.

minusIn()

(destination message field) Negative input terminal of the amplifier. All the messages connected here are summed up to get total positive input.

process()

(destination message field) Handles process call, updates internal time stamp.

reinit()

(destination message field) Handles reinit call.

output

double (source message field) Current output level.

gain

double (value field) Gain of the amplifier. The output of the amplifier is the difference between the totals in plus and minus inputs multiplied by the gain. Defaults to 1

saturation

double (value field) Saturation is the bound on the output. If output goes beyond the +/-saturation range, it is truncated to the closer of +saturation and -saturation. Defaults to the maximum double precision floating point number representable on the system.

outputValue

double (value field) Output of the amplifier, i.e. gain * (plus - minus).