Difference between revisions of "API Scope"
From Flowcode Help
Jump to navigationJump to search (XML import) |
(XML import API changes) |
||
Line 1: | Line 1: | ||
<sidebar>API contents</sidebar> | <sidebar>API contents</sidebar> | ||
Data scope additions | Data scope additions | ||
+ | |||
__TOC__ | __TOC__ | ||
Line 27: | Line 28: | ||
|width="35%"|[[API Scope.SetCustom|SetCustom]] | |width="35%"|[[API Scope.SetCustom|SetCustom]] | ||
|Sets one of 32 custom analog values for the group | |Sets one of 32 custom analog values for the group | ||
+ | |- | ||
+ | |width="35%"|[[API Scope.GetOutputBlock|GetOutputBlock]] | ||
+ | |Gets a block of the output stream with each input sample operated on, returns number of samples read | ||
+ | |- | ||
+ | |width="35%"|[[API Scope.FindOutput|FindOutput]] | ||
+ | |Searches back through the output history for a value, returns offset of found sample from TimeUS, 0 if not found | ||
|} | |} | ||
Line 142: | Line 149: | ||
|21 | |21 | ||
|Convert the input from a float to an integer (using the floor function) | |Convert the input from a float to an integer (using the floor function) | ||
+ | |- | ||
+ | |LONG | ||
+ | |Find_Lower | ||
+ | |1 | ||
+ | |Match a search when output is lower than the target value | ||
+ | |- | ||
+ | |LONG | ||
+ | |Find_Equal | ||
+ | |2 | ||
+ | |Match a search when output is equal to the target value | ||
+ | |- | ||
+ | |LONG | ||
+ | |Find_Higher | ||
+ | |4 | ||
+ | |Match a search when output is greater than the target value | ||
+ | |- | ||
+ | |LONG | ||
+ | |Find_LowHigh | ||
+ | |8 | ||
+ | |Match a search when output goes lower to higher than the target | ||
+ | |- | ||
+ | |LONG | ||
+ | |Find_HighLow | ||
+ | |16 | ||
+ | |Match a search when output goes higher to lower than the target | ||
|} | |} | ||
Revision as of 12:21, 14 May 2013
<sidebar>API contents</sidebar> Data scope additions
Contents
Functions provided for this class
AddGroup | Adds a group to the scope to which streams may be added |
AddStream | Adds a stream to the given group suitable for inputs and operations |
AddPort | Adds an input to the stream from a port |
AddAnalog | Adds an input to the stream from an analog channel |
AddCustom | Adds an input to the stream from a custom injection |
AddOp | Adds an operation to act on the inputs of the stream |
SetCustom | Sets one of 32 custom analog values for the group |
GetOutputBlock | Gets a block of the output stream with each input sample operated on, returns number of samples read |
FindOutput | Searches back through the output history for a value, returns offset of found sample from TimeUS, 0 if not found |
Constants provided for this class
Type | Name | Value | Description |
---|---|---|---|
LONG | Op_Bound | 1 | Bound the current value to the expected range of the input |
LONG | Op_Scale | 2 | Divide the current value to the expected range of the input |
LONG | Op_Xor | 3 | Exclusive-or with the provided integer argument |
LONG | Op_AndNot | 4 | Clear the bits in the provided integer argument |
LONG | Op_And | 5 | Isolate only the bits in the provided integer argument |
LONG | Op_Orr | 6 | Set the bits in the provided integer argument |
LONG | Op_Not | 7 | Invert (ones-compliment) the current input |
LONG | Op_Add | 8 | Add the argument to the current input |
LONG | Op_Sub | 9 | Subtract the argument from the current input |
LONG | Op_Mul | 10 | Multiply the argument by the current input |
LONG | Op_Div | 11 | Divide the current input by the argument |
LONG | Op_Pow | 12 | Raise the input to the power of the argument |
LONG | Op_Neg | 13 | Negate (twos compliment) the current input |
LONG | Op_Recip | 14 | Perform the reciprocal on the current input |
LONG | Op_Sqrt | 15 | Perform a square root on the current input |
LONG | Op_Ln | 16 | Perform a natural logarithm on the current input |
LONG | Op_Ln2 | 17 | Perform a base-2 logarithm on the current input |
LONG | Op_Cos | 18 | Convert the input to its cosine value (input is in radians) |
LONG | Op_Sin | 19 | Convert the input to its sine value (input is in radians) |
LONG | Op_Tan | 20 | Convert the input to its tangent value (input is in radians) |
LONG | Op_Int | 21 | Convert the input from a float to an integer (using the floor function) |
LONG | Find_Lower | 1 | Match a search when output is lower than the target value |
LONG | Find_Equal | 2 | Match a search when output is equal to the target value |
LONG | Find_Higher | 4 | Match a search when output is greater than the target value |
LONG | Find_LowHigh | 8 | Match a search when output goes lower to higher than the target |
LONG | Find_HighLow | 16 | Match a search when output goes higher to lower than the target |
Examples
No additional information
See also
No additional information