Difference between revisions of "Component: Input CSV (DSP)"

From Flowcode Help
Jump to navigationJump to search
(XML import)
 
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
+
{| style="width:50%"
 
 
{| width="50%"
 
 
|-
 
|-
| width="20%" style="color: gray;" | Author
+
| width="20%" style="color:gray;" | Author
 
| Matrix Ltd
 
| Matrix Ltd
 
|-
 
|-
| width="20%" style="color: gray;" | Version
+
| width="20%" style="color:gray;" | Version
| 1.2 (Release)
+
| 1.2
 
|-
 
|-
| width="20%" style="color: gray;" | Category
+
| width="20%" style="color:gray;" | Category
 
| DSP
 
| DSP
 
|}
 
|}
 +
 +
 +
==Input CSV component==
 +
Allows the values from a buffer to be collected directly from a CSV file. Either a value at a time or from an array.
 +
 +
==Component Pack==
 +
 +
DSP
 +
 +
==Detailed description==
 +
 +
 +
 +
  
  
  
==[[File:Component Icon 73c1c565_8d04_44dd_ab78_1997d5e3c641.png|Image]] Input CSV component==
 
Allows the values from a buffer to be collected directly from a CSV file.
 
Either a value at a time or from an array.
 
  
==Examples==
 
''<span style="color:red;">No additional examples</span>''
 
  
  
==Downloadable macro reference==
 
  
===<span style="font-weight: normal;"><u><tt>ReadArray</tt></u></span>===
+
''No detailed description exists yet for this component''
Reads an array of values to fill up the specified buffer.
 
  
Auto increments current location.
+
==Examples==
  
FAT component must be initialised before calling this macro.
 
  
'''Parameters'''
 
  
:''This macro has no parameters''
 
  
  
'''Return value'''
 
  
:''This call does not return a value''
 
  
  
  
==Simulation macro reference==
 
  
''This component does not contain any simulation macros''
 
  
  
==Property reference==
+
''<span style="color:red;">No additional examples</span>''
<span style="font-weight: normal;"><u>Buffer Size</u></span>
 
  
This property is of type ''Unsigned integer'' and can be referenced with the variable name ''BuffSize''.
 
  
Number of individual elements the buffer can store, default 1.
+
==Downloadable macro reference==
  
<span style="font-weight: normal;"><u>Buffer Type</u></span>
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''CloseFile'''
 +
|-
 +
| colspan="2" | Closes a file&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''BuffType''.
 
  
Sets the buffer data type, data is automatically scaled to fit and make full use of the data type.
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''OpenFile'''
 +
|-
 +
| colspan="2" | Opens a file ready for reading. Returns 1 if file opened correctly. Automatically called by the ReadValue/ReadArray macros with the default values set by the component properties if not already called by the program.&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
 +
| width="90%" | Filename
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-bool-icon.png]] - BOOL
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
<span style="font-weight: normal;"><u>FAT Component</u></span>
 
  
This property is of type ''Panel object'' and can be referenced with the variable name ''FATComponent''.
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadArray'''
 +
|-
 +
| colspan="2" | Reads an array of values to fill up the specified buffer. Auto increments current location. FAT component must be initialised before calling this macro.&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-bool-icon.png]] - BOOL
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
Points to the FAT filesystem component to allow access to file system and embedded SD card.
 
  
<span style="font-weight: normal;"><u>Filename</u></span>
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadValue'''
 +
|-
 +
| colspan="2" | Reads a value from the current position in the CSV file. FAT component must be initialised before calling this macro. Returns 0 when we are at the end of the file, else returns 1.&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-bool-icon.png]] - BOOL
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
This property is of type ''Line of text'' and can be referenced with the variable name ''Filename''.
 
  
Name of the file to read DSP data from.
 
  
<span style="font-weight: normal;"><u>Layout</u></span>
 
  
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''Layout''.
+
==Property reference==
  
Dictates if the data is read from a single column or a single row.
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
 +
| width="90%" | Buffer Size
 +
|-
 +
| colspan="2" | Number of individual elements the buffer can store, default 1.&nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 +
| width="90%" | Buffer Type
 +
|-
 +
| colspan="2" | Sets the buffer data type, data is automatically scaled to fit and make full use of the data type.&nbsp;
 +
|-
 +
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
 +
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | CSV File
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-type-17-icon.png]]
 +
| width="90%" | FAT Component
 +
|-
 +
| colspan="2" | Points to the FAT filesystem component to allow access to file system and embedded SD card.&nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-type-10-icon.png]]
 +
| width="90%" | Filename
 +
|-
 +
| colspan="2" | Name of the file to read DSP data from.&nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 +
| width="90%" | End of File
 +
|-
 +
| colspan="2" | Determines what happens when we hit the end of the input file. The return value from the ReadValue/ReadArray can be checked to allow the file end to be caught and actioned.&nbsp;
 +
|}

Latest revision as of 17:19, 9 November 2022

Author Matrix Ltd
Version 1.2
Category DSP


Input CSV component

Allows the values from a buffer to be collected directly from a CSV file. Either a value at a time or from an array.

Component Pack

DSP

Detailed description

No detailed description exists yet for this component

Examples

No additional examples


Downloadable macro reference

Fc9-comp-macro.png CloseFile
Closes a file 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png OpenFile
Opens a file ready for reading. Returns 1 if file opened correctly. Automatically called by the ReadValue/ReadArray macros with the default values set by the component properties if not already called by the program. 
Fc9-string-icon.png - STRING Filename
 
Fc9-bool-icon.png - BOOL Return


Fc9-comp-macro.png ReadArray
Reads an array of values to fill up the specified buffer. Auto increments current location. FAT component must be initialised before calling this macro. 
Fc9-bool-icon.png - BOOL Return


Fc9-comp-macro.png ReadValue
Reads a value from the current position in the CSV file. FAT component must be initialised before calling this macro. Returns 0 when we are at the end of the file, else returns 1. 
Fc9-bool-icon.png - BOOL Return



Property reference

Fc9-prop-icon.png Properties
Fc9-type-21-icon.png Buffer Size
Number of individual elements the buffer can store, default 1. 
Fc9-type-16-icon.png Buffer Type
Sets the buffer data type, data is automatically scaled to fit and make full use of the data type. 
Fc9-conn-icon.png CSV File
Fc9-type-17-icon.png FAT Component
Points to the FAT filesystem component to allow access to file system and embedded SD card. 
Fc9-type-10-icon.png Filename
Name of the file to read DSP data from. 
Fc9-type-16-icon.png End of File
Determines what happens when we hit the end of the input file. The return value from the ReadValue/ReadArray can be checked to allow the file end to be caught and actioned.