TalkBack Read
Add-On Required: This feature requires the Simulink Support Package for Android Devices add-on.
Libraries:
Simulink Support Package for Android Devices /
Communication
Description
The TalkBack Read block reads command(s) from a TalkBack ID on the ThingSpeak TalkBack server. The command(s) are read and executed from the TalkBack queue in the first-in first-out (FIFO) order and are removed from the queue once executed.
Ports
Output
command string — Input TalkBack string command
scalar
TalkBack command of type string, specified as a scalar.
Dependencies
To enable this port, set Command type to
String
.
Data Types: string
ascii command — Input TalkBack ASCII command
vector
Converted uint8
vector TalkBack command of ASCII characters,
specified as a vector.
Dependencies
To enable this port, set Command type to
ASCII vector
.
Data Types: uint8
status — Status of TalkBack commands
0
| 1
| 2
| 3
Status of the last executed command. The status output on the port is for the
option selected in the TalkBack API parameter. For
example, if the TalkBack API parameter is set to
Last executed command
, the output would indicate the
status for the Last executed command
option.
0
– Indicates a failure in the TalkBack command execution or no TalkBack command present in the queue.1
– Indicates a successful TalkBack command execution.2
– Indicates the command string is truncated.3
– Indicates the command string is appended with zeros only when the Command type parameter is set toASCII vector
.
Data Types: int8
Parameters
TalkBack API — Operation to be performed on TalkBack command
Execute next command
(default) | Last executed command
Select the operation to be performed on the TalkBack command in the TalkBack queue.
Execute next command
– Indicates the TalkBack server to execute next command in the TalkBack queue. This value can be an ASCII vector or a string depending on the option set in the Command type parameter. If no command is present in the TalkBack queue, the block outputs zeros for the Command type parameter set toASCII vector
and an empty string for the Command type parameter set toString
.Last executed command
– Indicates the TalkBack server to output the last executed command from the TalkBack queue on the command output port. This value can be a string or an ASCII vector depending on the option set in the Command type parameter. If no command is present in the TalkBack queue, the block outputs zeros for the Command type parameter set toASCII vector
and an empty string for the Command type parameter set toString
.
TalkBack ID — TalkBack app identification number
123456 (default) | positive integer
Enter the identification number for the TalkBack app. This identification number is auto generated by the TalkBack server. To know the TalkBack ID for your ThingSpeak™ TalkBack:
In the ThingSpeak website, select Apps > TalkBack.
Click New TalkBack.
Add a new command to the TalkBack queue and copy the TalkBack ID.
Open the TalkBack Write block in your Simulink® model and paste the value into the TalkBack ID parameter.
API key — Auto-generated API key for ThingSpeak TalkBack
ABCDEFGHIJKLMNOP (default) | character vector of API key | string scalar of API key
Enter the 16-digit API key for the specific instance of TalkBack that allows you to read from a ThingSpeak TalkBack. This API key is auto generated by the TalkBack server. This key allows you to read commands from ThingSpeak TalkBack. To know the API key for your ThingSpeak TalkBack:
In the ThingSpeak website, select Apps > TalkBack.
Click New TalkBack.
Add a new command to the TalkBack queue and copy the 16-digit API key.
Open the TalkBack Read block in your Simulink model and paste the value into the API key parameter.
Command type — Type of TalkBack command input added to TalkBack queue
String
(default) | ASCII vector
Select the type of TalkBack command output to be added to the TalkBack queue.
String
– TalkBack command in string format.ASCII vector
– TalkBack command in ASCII format.
Command length — Length of command string
1 (default) | 255
Enter the length of the command in the TalkBack queue. If the name of the command is less than the value entered in this parameter, the command is appended with zeros to match the length. And, if the name of the command is more than the value entered in this parameter, the length is truncated to the value entered in this parameter.
Sample time — Time interval at which block reads data from TalkBack
5 (default) | scalar
Enter the time interval (in seconds) at which the block reads data from the
ThingSpeak TalkBack. When you set this parameter to -1
,
Simulink determines the best sample time for the block based on the block context
within the model.
Version History
Introduced in R2021b
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)