Jump to content

Component: DSPBufferRef (DSP): Difference between revisions

From Flowcode Help
Created page with "{| style="width:50%" |- | width="20%" style="color:gray;" | Author | Matrix TSL |- | width="20%" style="color:gray;" | Version | 1.0 |- | width="20%" style="color:gray..."
 
No edit summary
Line 16: Line 16:


==Detailed description==
==Detailed description==


''No detailed description exists yet for this component''
''No detailed description exists yet for this component''


==Examples==
==Examples==


''<span style="color:red;">No additional examples</span>''
''<span style="color:red;">No additional examples</span>''
Line 169: Line 173:
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''IsPlaying'''
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Uninit'''
|-
|-
| colspan="2" | Checks to see if the last played track is still playing&nbsp;
| colspan="2" | Un-initialize the UART and release the resources&nbsp;
|-
|-
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:]] -  
| 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''
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
|}
Line 182: Line 186:
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetReplyByte'''
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReceiveByteArray'''
|-
|-
| colspan="2" | Reads a single byte from the last reply. Each reply contains 4 bytes starting with the command code.&nbsp;
| colspan="2" | Receives an array of bytes and returns the number of bytes received.&nbsp;
|-
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Index
| width="90%" | Data
|-
|-
| colspan="2" | Range: 0-3 / 0=Command, 1=Feedback, 2=Data MSB, 3=Data LSB&nbsp;
| colspan="2" | A byte array variable to hold the received data&nbsp;
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" style="border-top: 2px solid #000;" | ''Return''
| width="90%" | NumBytes
|}
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| colspan="2" | Maximum number of bytes to try and receive&nbsp;
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SkipTrack'''
|-
|-
| colspan="2" | Jump to the next or previous track&nbsp;
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | Timeout
|-
|-
| colspan="2" | Max amount of time in ms to wait between bytes&nbsp;
|-
|-
| width="10%" align="center" | [[File:]] -
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | Direction
|-
| colspan="2" | 0=Next, 1=Previous&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''
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
|}
Line 218: Line 214:
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''PlayTrack'''
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReceiveString'''
|-
|-
| colspan="2" | Plays track from the selected folder. MP3 & Advert folder track numbers should be 4 characters long e.g. 0001 any name.mp3, Other folder track numbers should be 3 characters long e.g. 001 Any name.mp3, Root the Track played in placement order.&nbsp;
| colspan="2" | Receives a string of bytes and returns the number of bytes received.&nbsp;
|-
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
| width="90%" | Directory
| width="90%" | StringData
|-
|-
| colspan="2" | 0=Root, 1=Folder "01" - 99=Folder "99", 100=MP3, 101=Advert&nbsp;
| colspan="2" | &nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | Track
| width="90%" | NumBytes
|-
|-
| colspan="2" | Track number 1="001*.MP3" / "0001*.MP3", 100="100*.MP3" / "0100*.MP3"&nbsp;
| colspan="2" | Maximum number of bytes to try and receive&nbsp;
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" style="border-top: 2px solid #000;" | ''Return''
| width="90%" | Timeout
|}
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| colspan="2" | Max amount of time in ms to wait between bytes&nbsp;
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise'''
|-
|-
| colspan="2" | Sets up the UART and does some housekeeping. Must be called before calling any of the other component macros.&nbsp;
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
|-
|-
| 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''
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
|}
Line 254: Line 242:
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadAnalogAsInt'''
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Start'''
|-
|-
| colspan="2" | Reads one of the analogue components as an Integer value&nbsp;
| colspan="2" | Startup routine required by the hardware device. Automatically clears the display after initialising.&nbsp;
|-
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" | Channel
|-
| colspan="2" | 0 = LDR, 1 = POT&nbsp;
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:]] -  
| width="90%" style="border-top: 2px solid #000;" | ''Return''
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
|}
Line 272: Line 255:
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''RemapCharacter'''
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetLEDState'''
|-
|-
| colspan="2" | Assigns a remap character allowing the PrintString function to automatically swap between pre-defined characters.  The characters can be custom (in the range 0-9) or can point to an existing character in the LCD character map.&nbsp;
| colspan="2" | Sets the state of a single LED&nbsp;
|-
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | RemapIdx
| width="90%" | Port
|-
|-
| colspan="2" | Remap Index, Range: 0 to (Remap Characters - 1)&nbsp;
| colspan="2" | 0 = PortA, 1 = PortB&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | SearchCharacter
| width="90%" | LED
|-
|-
| colspan="2" | Character to look for a replace&nbsp;
| colspan="2" | 0 = LED0, 7 = LED7&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | ReplacementCharacter
| width="90%" | State
|-
| colspan="2" | New character value to use in place of the search character.&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''
|}
 
 
{| 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;" | '''Start'''
|-
| colspan="2" | Startup routine required by the hardware device. Automatically clears the display after initialising.&nbsp;
|-
|-
| colspan="2" | &nbsp;
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 313: Line 283:
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetLEDState'''
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetRxIdent'''
|-
|-
| colspan="2" | Sets the state of a single LED&nbsp;
| colspan="2" | Gets the Rx ID as a Integer Standard and Extended IDs.&nbsp;
|-
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Port
| width="90%" | Buffer
|-
| colspan="2" | 0 = PortA, 1 = PortB&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | LED
|-
| colspan="2" | 0 = LED0, 7 = LED7&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | State
|-
|-
| colspan="2" | &nbsp;
| colspan="2" | &nbsp;
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u32-icon.png]] - ULONG
| width="90%" style="border-top: 2px solid #000;" | ''Return''
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
|}

Revision as of 10:35, 17 November 2021

Author Matrix TSL
Version 1.0
Category DSP


DSPBufferRef component

Reference and access to a specific DSP buffer inside another DSP component. Used for a DSP component input buffer.

Detailed description

No detailed description exists yet for this component

Examples

No additional examples

Downloadable macro reference

Prv_PutPropStr
 
- UINT Idx
 
- UINT Val
 
- VOID Return


Prv_PutConsole
 
- UINT Idx
 
- ULONG Val
 
- VOID Return


get
 
- UINT Idx
 
[[File:]] - Return


put
 
- UINT Idx
 
[[File:]] - Val
 
- VOID Return


Prv_GetPropStr
 
- UINT Idx
 
- UINT Return


Prv_GetConsole
 
- UINT Idx
 
- ULONG Return


SetHandle
 
[[File:]] - Handle
 
- VOID Return


Uninit
Un-initialize the UART and release the resources 
- VOID Return


ReceiveByteArray
Receives an array of bytes and returns the number of bytes received. 
- BYTE Data
A byte array variable to hold the received data 
- UINT NumBytes
Maximum number of bytes to try and receive 
- UINT Timeout
Max amount of time in ms to wait between bytes 
- UINT Return


ReceiveString
Receives a string of bytes and returns the number of bytes received. 
- STRING StringData
 
- UINT NumBytes
Maximum number of bytes to try and receive 
- UINT Timeout
Max amount of time in ms to wait between bytes 
- BYTE Return


Start
Startup routine required by the hardware device. Automatically clears the display after initialising. 
- VOID Return


SetLEDState
Sets the state of a single LED 
- BYTE Port
0 = PortA, 1 = PortB 
- BYTE LED
0 = LED0, 7 = LED7 
- BYTE State
 
- VOID Return


GetRxIdent
Gets the Rx ID as a Integer Standard and Extended IDs. 
- BYTE Buffer
 
- ULONG Return


Initialise
Must be called before any other CAN component macros to enable and initialise the CAN peripheral.  
- VOID Return



Property reference

Properties
Link To
 
Subname
 
Subhandle
 
Buffer Size
 
Buffer Type
 
Console Handle
 
Color
 
Outline
 
Text
 
Orientation
 
Connections
Simulations