Difference between revisions of "API Scope.AddOp"
From Flowcode Help
Jump to navigationJump to search (XML import) |
(XML import) |
||
Line 16: | Line 16: | ||
:An operation to perform on the input | :An operation to perform on the input | ||
''Typical values for this parameter:'' | ''Typical values for this parameter:'' | ||
− | {| class="wikitable" |-width="20%"|Type | + | {| class="wikitable" width="75%" |
− | |-LONG|Op_Scale| | + | |- |
− | |-LONG|Op_Xor| | + | ! width="20%" |Type |
− | |-LONG|Op_AndNot| | + | ! width="30%" |Name |
− | |-LONG|Op_And| | + | ! width="50%" |Description |
− | |-LONG|Op_Orr| | + | |- |
− | |-LONG|Op_Not| | + | |LONG |
− | |-LONG|Op_Add| | + | |Op_Bound |
− | |-LONG|Op_Sub| | + | |Bound the current value to the expected range of the input |
− | |-LONG|Op_Mul| | + | |- |
− | |-LONG|Op_Div| | + | |LONG |
− | |-LONG|Op_Pow| | + | |Op_Scale |
− | |-LONG|Op_Neg| | + | |Divide the current value to the expected range of the input |
− | |-LONG|Op_Recip| | + | |- |
− | |-LONG|Op_Sqrt| | + | |LONG |
− | |-LONG|Op_Ln| | + | |Op_Xor |
− | |-LONG|Op_Ln2| | + | |Exclusive-or with the provided integer argument |
− | |-LONG|Op_Cos| | + | |- |
− | |-LONG|Op_Sin| | + | |LONG |
− | |-LONG|Op_Tan| | + | |Op_AndNot |
− | |-LONG|Op_Int| | + | |Clear the bits in the provided integer argument |
+ | |- | ||
+ | |LONG | ||
+ | |Op_And | ||
+ | |Isolate only the bits in the provided integer argument | ||
+ | |- | ||
+ | |LONG | ||
+ | |Op_Orr | ||
+ | |Set the bits in the provided integer argument | ||
+ | |- | ||
+ | |LONG | ||
+ | |Op_Not | ||
+ | |Invert (ones-compliment) the current input | ||
+ | |- | ||
+ | |LONG | ||
+ | |Op_Add | ||
+ | |Add the argument to the current input | ||
+ | |- | ||
+ | |LONG | ||
+ | |Op_Sub | ||
+ | |Subtract the argument from the current input | ||
+ | |- | ||
+ | |LONG | ||
+ | |Op_Mul | ||
+ | |Multiply the argument by the current input | ||
+ | |- | ||
+ | |LONG | ||
+ | |Op_Div | ||
+ | |Divide the current input by the argument | ||
+ | |- | ||
+ | |LONG | ||
+ | |Op_Pow | ||
+ | |Raise the input to the power of the argument | ||
+ | |- | ||
+ | |LONG | ||
+ | |Op_Neg | ||
+ | |Negate (twos compliment) the current input | ||
+ | |- | ||
+ | |LONG | ||
+ | |Op_Recip | ||
+ | |Perform the reciprocal on the current input | ||
+ | |- | ||
+ | |LONG | ||
+ | |Op_Sqrt | ||
+ | |Perform a square root on the current input | ||
+ | |- | ||
+ | |LONG | ||
+ | |Op_Ln | ||
+ | |Perform a natural logarithm on the current input | ||
+ | |- | ||
+ | |LONG | ||
+ | |Op_Ln2 | ||
+ | |Perform a base-2 logarithm on the current input | ||
+ | |- | ||
+ | |LONG | ||
+ | |Op_Cos | ||
+ | |Convert the input to its cosine value (input is in radians) | ||
+ | |- | ||
+ | |LONG | ||
+ | |Op_Sin | ||
+ | |Convert the input to its sine value (input is in radians) | ||
+ | |- | ||
+ | |LONG | ||
+ | |Op_Tan | ||
+ | |Convert the input to its tangent value (input is in radians) | ||
+ | |- | ||
+ | |LONG | ||
+ | |Op_Int | ||
+ | |Convert the input from a float to an integer (using the floor function) | ||
|} | |} | ||
Revision as of 21:17, 12 May 2013
<sidebar>API contents</sidebar> Adds an operation to act on the inputs of the stream
Contents
Parameters
HANDLE StreamH
- A handle to a previously created datascope stream
ULONG FuncOp
- An operation to perform on the input
Typical values for this parameter:
Type | Name | Description |
---|---|---|
LONG | Op_Bound | Bound the current value to the expected range of the input |
LONG | Op_Scale | Divide the current value to the expected range of the input |
LONG | Op_Xor | Exclusive-or with the provided integer argument |
LONG | Op_AndNot | Clear the bits in the provided integer argument |
LONG | Op_And | Isolate only the bits in the provided integer argument |
LONG | Op_Orr | Set the bits in the provided integer argument |
LONG | Op_Not | Invert (ones-compliment) the current input |
LONG | Op_Add | Add the argument to the current input |
LONG | Op_Sub | Subtract the argument from the current input |
LONG | Op_Mul | Multiply the argument by the current input |
LONG | Op_Div | Divide the current input by the argument |
LONG | Op_Pow | Raise the input to the power of the argument |
LONG | Op_Neg | Negate (twos compliment) the current input |
LONG | Op_Recip | Perform the reciprocal on the current input |
LONG | Op_Sqrt | Perform a square root on the current input |
LONG | Op_Ln | Perform a natural logarithm on the current input |
LONG | Op_Ln2 | Perform a base-2 logarithm on the current input |
LONG | Op_Cos | Convert the input to its cosine value (input is in radians) |
LONG | Op_Sin | Convert the input to its sine value (input is in radians) |
LONG | Op_Tan | Convert the input to its tangent value (input is in radians) |
LONG | Op_Int | Convert the input from a float to an integer (using the floor function) |
FLOAT Arg
- An optional argument that may be used by the FuncOp
- The default value for this parameter is: 0
Return value
No additional information
Detailed description
No additional information
Examples
Calling in a calculation
- Declare a variable 'result' of type BOOL
- Add to a calculation icon:
result = ::Scope.AddOp(streamh, ::Scope.Op_Bound, arg)
No additional information