Vector Block Models
Generic_Batcher
Generic Batcher
File: general_blocks/All.sim
Description
Generic_Batcher creates a batch (a vector; specifically, a Generic Vector or gvec) of Envelopes from the incoming Envelopes. The batch is sent out when the vector has been filled or when a timeout occurs.
The Generic_Batcher and Generic_UnBatcher are blocks intended to dramatically simplify assembly and disassembly of gvecs, eliminating the synchronization and pointer issues often encountered when trying to implement batching and unbatching using the Access_GVector, Setup_GVElem, GVCreate and GVLen blocks.
Ports
Input Ports
- in Data Type: ANY DATA STRUCTURE (Envelope)
Output Ports
- out Data Type: GVec
Parameters
Vector_Size Data Type: INTEGER
Specifies the maximum number of Envelopes
assembled into a batch
Timeout_Value Data Type: REAL
Specifies the maximum time allowed for
assembling a batch. Empty batches are
not sent out (they are skipped).
Start_Time Data Type: REAL
Specifies the time to start batching. If
a negative time is specified (i.e. -1.0)
batching is triggered by the first
message received.
Generic_UnBatcher
Generic UnBatcher
File: general_blocks/All.sim
Description
Generic_UnBatcher extracts Envelopes from the received batch (GVec).
The Generic_Batcher and Generic_UnBatcher are blocks intended to dramatically simplify assembly and disassembly of gvecs, eliminating the synchronization and pointer issues often encountered when trying to implement batching and unbatching using the Access_GVector, Setup_GVElem, GVCreate and GVLen blocks.
Ports
Input Ports
- in Data Type: GVec
Output Ports
- out Data Type: ANY DATA STRUCTURE
Parameters ( none )
Access_GVector
Access GVector
File: general_blocks/.sim
Description
The model receives a GVec at the in port, and the index
of the data structure to be accessed at the indx port.
The accessed data structure is sent out of the elem port,
The incr and decr inputs increment and decrement the
and the GVec is sent out the out port.
Ports
Input Ports
- in Data Type: GVec
- indx Data Type: Integer
Output Ports
- out Data Type:GVec
- elem Data Type:Envelope
Setup_GVElem
Setup GVElem
File: general_blocks/.sim
Description
The model inserts a data structure into a general vector
(GVec) of data structures. The indx input specifies into
which position in the vector the data structure is to be
inserted. The incoming data structure must be of the
correct kind (8001) and must be correctly formed.
Ports
Input Ports
- in Data Type: GVec
- elem Data Type: Envelope
- indx Data Type: Integer
Output Ports
- out Data Type:GVec
GVCreate
File: general_blocks/.sim
Description
This model generates a GVec (general vector). The vector
length is received at the indx port, and the GVec is sent
out the out port.
Ports
Input Ports
- indx Data Type: Integer
Output Ports
- out Data Type:GVec
GVLen
File: general_blocks/.sim
Description
This model receives a GVec (general vector) at its in
port. It extracts the length of the GVec and sends the
value out of the len port. The GVec is sent out the out port.
Ports
Input Ports
- in Data Type: GVec
Output Ports
- len Data Type:Integer
- out Data Type:GVec
Access_Vector
Access GVector
File: general_blocks/.sim
Description
The model receives a Vec at the in port, and the index
of the data structure to be accessed at the indx port.
The accessed data structure is sent out of the elem port,
The incr and decr inputs increment and decrement the
and the Vec is sent out the out port.
Ports
Input Ports
- in Data Type: GVec
- indx Data Type: Integer
Output Ports
- out Data Type:GVec
- elem Data Type:Envelope
Setup_VElem
Setup GVElem
File: general_blocks/.sim
Description
The model inserts a data structure into a vector of data structures. The indx input specifies into which position in the vector the data structure is to be inserted. The incoming data structure must be of the correct kind (7001) and must be correctly formed.
Ports
Input Ports
- in Data Type: Vec
- elem Data Type: Envelope
- indx Data Type: Integer
Output Ports
- out Data Type:Vec
VCreate
GVCreate
File: general_blocks/.sim
Description
This model generates an empty Vec (vector). The vector length is received at the indx port, and the Vec is sent out the out port.
Ports
Input Ports
- indx Data Type: Integer
Output Ports
- out Data Type:Vec
VLen
GVLen
File: general_blocks/.sim
Description
This model receives a Vec (vector) at its in
port. It extracts the length of the Vec and sends the
value out of the len port. The Vec is sent out the out port.
Ports
Input Ports
- in Data Type: Vec
Output Ports
- len Data Type:Integer
- out Data Type:Vec