Back to Aurora Vision Studio website
	
                
                    
		
	You are here: Start » Filter Reference » Data Flow » Loop Utils » LastMultipleObjects
| Module: | FoundationLite | 
|---|
Returns an array of most recent objects.
| Name | Type | Range | Description | |
|---|---|---|---|---|
![]()  | 
				inObject | <T> | ||
![]()  | 
				inMaxCount | Integer* | 0 - ![]()  | 
				Number of last objects that are remembered | 
![]()  | 
				inReset | Bool | Reset accumulator state | |
![]()  | 
				outObjectArray | <T>Array | Array of most recent objects | |
The type of this filter is defined using the type variable T which represents any valid type. Read more.
Examples
Description of usage of this filter can be found in examples and tutorial: IO Serial Port Communicator.
However, to implement basic example perform following steps:
inMaxCount= 1
[1, 2, 3] [1]
[1, 2, 3] [2]
[1, 2, 3] [3]
inMaxCount = 2
[1, 2, 3] [1]
[1, 2, 3] [1, 2]
[1, 2, 3] [2, 3]
inMaxCount = 3
[1, 2, 3] [1]
[1, 2, 3] [1, 2]
[1, 2, 3] [1, 2, 3]
However, to implement basic example perform following steps:
- Using CreateArray create 1x3 dimensional array [1, 2, 3].
 - Connect created vector to inObject input of the filter
 - LastMultipleObjects will iterate through each element in inObject and will return outObjectArray of previous elements for each element of inObject, with the size of smaller of the numbers:
 - Result will be as follows (red numbers are currently iterated elements, while green ones are result):
 
inMaxCount= 1
[1, 2, 3] [1]
[1, 2, 3] [2]
[1, 2, 3] [3]
inMaxCount = 2
[1, 2, 3] [1]
[1, 2, 3] [1, 2]
[1, 2, 3] [2, 3]
inMaxCount = 3
[1, 2, 3] [1]
[1, 2, 3] [1, 2]
[1, 2, 3] [1, 2, 3]
Complexity Level
This filter is available on Basic Complexity Level.

 Basic

