Overview
As shown below, there are 3 main components of an Audio Weaver system that require communication in order to tune an audio system. The Designer GUI will generate text based tuning commands (AWS) based on the layout and any user tuning commands. These commands are sent to AWE Server, which in turn compiles the AWS commands into binary commands (AWB) that can be sent to the target running the AWE Core. The target processes the AWB commands and then generates a reply message that is sent back to the AWE Server.
...
Code Block | ||
---|---|---|
| ||
import socket import time TCP_IP = 'localhost' TCP_PORT = 15001 BUFFER_SIZE = 1024 # Open a TCP socket s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect((TCP_IP, TCP_PORT)) # Read the value of the scaler s.send('get_value,ScalerDB1.gainDB\n') data = s.recv(BUFFER_SIZE) print data # Attenuate channel 1 s.send('set_value,ScalerDB1.gainDB\n,-40\n') data = s.recv(BUFFER_SIZE) print data |
INI file settings
Colors may be customized in the INI file as follows:
[InspectorColors]
TileEdge — default 180,180,180, the color the edges of meter and slider controls are drawn.
...
By default none are specified in the INI file, so the given defaults are used.
Commands
All commands are sent by TCP/IP. All commands are of the form:
...
Expand | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
add_module
Syntax:
add_module,layout_instance_name,offset,module1, ... ,moduleN
...
On success the reply is:
success
add_symbol_id
Syntax:
add_symbol_id,name,className,ID
...
failed, instance name already defined
audio_pump (BSP)
Syntax:
audio_pump [, file_name [,record=record_file] ]
...
If the server is connected to a target, the file_name argument is not permitted. If the file is not found as specified, and does not have an absolute path, it is searched for in the audio path. See set_path.
audio_stop (BSP)
Syntax
audio_stop
Unconditionally terminates the audio pump if running. The reply is always:
...
If the server is connected to a target, the target DMA and rendering is halted.
bind_wire
Syntax
bind_wire,wireName,pinName
...
success,heap1,heap2,heap3
clear_credentials (Windows)
Syntax:
clear_credentials
Unconditionally removes the user credentials and if it exists the off-line license from the INI file. The command has effect on Windows only and does not involve the target in any way.
The reply is:
success
clear_symbols (Windows, Linux)
Syntax:
clear_symbols
Empties the server symbol table. This does not involve the target in any way.
The reply is:
success
close_input (BSP)
Syntax:
close_input,devIndex
When several device are merged for audio input (numbered 0 - N-1) close one of these devices by its index, causing zero samples to be generated in its place. This command is a specialized command for users that need to disconnect from a device that is about to be reconfigured. See reopen_input.
close_output (BSP)
Syntax:
close_output,devIndex
When several device are merged for audio output (numbered 0 - N-1) close one of these devices by its index. Samples being written to that device are discarded. This command is a specialized command for users that need to disconnect from a device that is about to be reconfigured. See reopen_output,
cmd
Syntax:
cmd,opcode [,arg1, ... ,argN]
...
or a normal failure code.
compile (BSP)
Syntax:
compile,flags,source_file,destination_file [, target_buffer_size ]
...
There are many possible reasons for failure.
connect (BSP)
Syntax:
connect,client_name,port
...
This command is for legacy purposes only, and does nothing.
create_active (BSP, GUI only)
Syntax:
create_active,dialog,left,top,moduleName [, bgnd_color [, text_color]]
...
On choosing a radio button, all modules (if there are several semicolon separated names) will be set to the new state.
create_bitmap (BSP, GUI only)
Syntax:
create_bitmap,dialog,left,top,width,height,fileName
...
If the height or width are negative (usefully –1), then only the [top,left] position is used – the size of the rectangle is obtained from the image; otherwise the image is stretched or shrunk as needed in both axes to fit the rectangle specified.
create_button (BSP, GUI only)
Syntax:
create_button,dialog,left,top,width,height,caption,script_file
...
RemoveBitmaps – deletes all the images created by create_bitmap.
create_checkbox (BSP, GUI only)
Syntax:
create_checkbox,dialog,left,top,width,height,legend,attributes,dot-expression
...
Creates a checkbox control on the dialog of the specified size. On clicking the checkbox (causing its state to toggle) the new check state is assigned to the dot-expression. As with all assignments, the Set() function of the appropriate module is called after the assignment. At a rate of 5Hz, the expression is examined: if it changes the check mark is updated.
create_dialog (BSP, GUI only)
Syntax:
create_dialog,dialogName,left,top,width,height,width2,height2,caption[ ,bgnd_color [, combo_color [, text_color]]]
...
Creates a new dialog with the given name and caption. Dialogs and all their child controls are destroyed either by destroy or specifically by destroy_dialog.
create_droplist (BSP, GUI only)
Syntax:
create_droplist, dialog,left,top,width,height,nameValueList,caption,attributes,dot-expression
...
Creates a droplist control on the dialog of the specified size. On selecting an item in the droplist associated value is assigned to the dot-expression. As with all assignments, the Set() function of the appropriate module is called after the assignment. At a rate of 5Hz, the variable is examined: if it has changed, the selection is updated.
create_awslist (BSP, GUI only)
Syntax:
create_awslist, dialog,left,top,width,height,nameValueList,caption,attributes
...
Creates a droplist control on the dialog of the specified size. On selecting an item in the droplist the associated file is executed as an AWS script file.
create_edit (BSP, GUI only)
Syntax:
create_edit,dialog,caption,left,top,attributes,caption,dot-expression [,in-expression]
...
readonly – 0 or 1, default 0; when set prevents the user editing the value
create_filelist (BSP, GUI only)
Syntax:
create_filelist,dialog,name,left,top,height,buffer_expression,buffer_size_expression,async_expression, type_expression[,filepath[,rate]]
...
Code Block |
---|
mp3 0x00 0x33 0x50 0x4D '3' 'P' 'M' |
create_graph (BSP, GUI only)
Syntax:
create_graph,dialog,left,top,width,height,attributes,dot-expression,count
...
This command creates a graph object of the specified size. The width of the object is divided by count to give the width of each stripe. 10 times a second, the target array is queried for count values, and those values used to display the graph stripes. If numbers is set, then the top 16 pixels of the graph is used to display the numeric value of each element according to the format specified. The width of each strip needs to be 25 or more when displaying numbers to avoid truncation of the text.
create_grid (BSP, GUI only)
Syntax:
create_grid,dialog,left,top,width,height,attributes,dot-expression,count1[,count2]
...
The command creates a grid control of the specified size. If count2 is given, the control as count2+1 columns, the first being the index, otherwise the control has 2 columns, the first being the index. The control operates as a very simple spreadsheet. On changing the value of any cell, the underlying array element is assigned, and the corresponding module’s set member is called. At 5Hz intervals, the grid will repaint itself if any element has changed value.
create_layout
Syntax:
create_layout,layout_instance_name,divider,nModules
...
success, heap1,heap2,heap3,layout_instance_name=instanceID
create_led (BSP, GUI only)
Syntax:
create_led, dialog,left,top,width,height legend,dot-expression
...
Creates an LED control. If the value described by dot-expression is non-zero, the LED is shown bright green, otherwise dark green. The expression is evaluated every 200mSec.
create_lookup
Syntax:
create_lookup, maxId
...
Creates a lookup table that handles IDs in the range 1..maxID by providing a fast O(1) lookup table. If no table is specified, lookups are O(N/2).
update_lookup
Syntax:
update_lookup
This command is for legacy purposes, and does nothing.
create_meter (BSP, GUI only)
Syntax:
create_meter, dialog,left,top,attributes,dot-expression
...
height=val – default is natural control height, values larger than default stretch the control vertically downwards
create_module
Syntax:
create_module,module_instance_name,className,nInputs,nOutputs,nScratch,[wires],args...
...
success, heap1,heap2,heap3,module_instance_name=instanceID
create_slider (BSP, GUI only)
Syntax:
create_slider, dialog,left,top,attributes,dot-expression[,read-expression]
...
muteonmin=[0|1] – default 0, when 1 the underlying variable is set to 0 when the knob is turned to its minimum value. This is useful for dB controls which should mute when turned all the way down.
create_spline (BSP, GUI only)
Syntax:
create_spline, dialog,left,top,width,height,attributes,instanceName
...
If the instanceName is empty, the control is stand-alone with 10 points y=sqrt(x), x=0..9 and not connected to the DSP. In this mode, the operation of the spline control may be tested.
create_text (BSP, GUI only)
Syntax:
create_text, dialog,left,top,widh,height,legend
...
Creates a static text control of the specified size, and sets its text to legend. Any occurrence of ‘\n’ in the legend will cause the legend to wrap.
create_wire
Syntax:
create_wire,wireName,sampleRate,nChannels,blockSize,complex,maxBlockSize
...
success, heap1,heap2,heap3,wire_instance_name=instanceID
deferred_process
Syntax:
deferred_process
During operation, a number of audio modules may set up actions to be performed later. These are referred to as delayed actions. This command causes one pass through the object list executing these actions. It is only needed for test since normal audio pumping calls this on every pump cycle.
delete_file (BSP)
Syntax:
delete_file,filename
...
Note that deleting a FLASH file only marks its directory entry deleted, it does not release the storage used by the file or its directory entry. Repeated creating and deleting FLASH files will consume all storage eventually. You can return the file system to its initial state with erase_all.
destroy (BSP)
Syntax:
destroy
This command unconditionally destroys all objects. On success, the reply is:
success,heap1,heap2,heap3
destroy_dialog (BSP, GUI only)
Syntax:
destroy_dialog,dialog
...
This command destroys the named dialog.
dialog_state (BSP, GUI only)
Syntax:
dialog_state,dialog,state
...
On success, the reply is:
success
erase_all (BSP)
Syntax:
erase_all
This command erases all files on the target file system, restoring it to the initial empty state. It fails if the target does not have a file system.
Erasing a large FLASH chip can take some time.
end_binary (BSP)
Syntax:
end_binary
Terminates logging of binary commands and writes the file. This command works in conjunction with make_binary.
exists_dialog (BSP, GUI only)
Syntax:
exists_dialog,name
...
failed, argument count (Incorrect number of arguments to the function)
exit (BSP)
Syntax:
exit
This command destroys the server.
fast_audio_pump (BSP)
Syntax:
fast_audio_pump,input_file [ ,record_file ]
...
The command does not complete until all input samples have been processed. With long files, this may take a while.
fast_read (Matlab)
Syntax:
fast_read,expression,count
Reads the specified number of float elements in an array of data and returns the result as binary data rather than as text. This command is only supported through the MATLAB AWEClient.dll and is not for general use. The format of the binary reply packet is described in Internal Binary Packets.
fast_read_int (Matlab)
Syntax:
fast_read_int,expression,count
Reads the specified number of integer elements in an array of data and returns the result as binary data rather than as text. This command is only supported through the MATLAB AWEClient.dll and is not for general use. The format of the binary reply packet is described in Internal Binary Packets.
fast_write (Matlab)
Syntax:
fast_write,expression
Writes the float array passed by Matlab to the target layout starting at the address given. This command is only supported through the MATLAB AWEClient.dll and is not for general use. It causes the AWE server to receive a binary packet containing the Matlab array values as documented in Internal Binary Packets.
fast_write_int (Matlab)
Syntax:
fast_write_int,expression
Writes the integer array passed by Matlab to the target layout starting at the address given. This command is only supported through the MATLAB AWEClient.dll and is not for general use. It causes the AWE server to receive a binary packet containing the Matlab array values as documented in Internal Binary Packets.
fast_write_partial (Matlab)
Syntax:
fast_write_partial,expression
...
The final set call performed by fast_write is suppressed.
fast_write_int_partial (Matlab)
Syntax:
fast_write_int_partial,expression
...
The final set call performed by fast_write_int is suppressed.
file_exists (BSP)
Syntax:
file_exists,file
Tests to see if the specified file or directory can be found.
...
The search order is that specified by the search path always looking in '.' first. If there are multiple hits, the first match is reported.
file_logging (BSP)
Syntax:
file_logging,full, filename
...
On success, the reply is:
success
file_to_pin (BSP) NOT IMPLEMENTED
Syntax:
File_to_pin,pin_name,file_path
...
failed, argument count // needs 2 arguments
failed, no target // must be connected
failed, duplicate pin name // can't bind the same pin more than once
failed, name undefined // pin name not defined
failed, not a pin // pin named is not a pin
failed, can't be Input // can't bind to pin Input
failed, not an input pin // pin must be an input
failed,' not in core %d // pin name not in the core
failed,' not a public pin // only public pins can be bound
foreground (BSP, GUI only)
Syntax:
foreground
Brings Audio Weaver Server window to the foreground (top most in Z-order). Make the window visible if it were behind other windows.
On success, the reply is:
success
framework (BSP)
Syntax:
framework,proxyIndex
...
failed,can't create framework %d: old connection %d restored
success
getini
Syntax:
getini,section,key
...
A return value of '0,no such key' indicates the INI file does not contain the specified key.
get_call
Syntax:
get_call,module_name,mask
...
success,module_name=instanceID
get_filesystem_info (BSP)
Syntax:
get_filesystem_info
...
Note that the file system does not release storage from deleted files – that storage is lost. Repeatedly creating and deleting files will consume all storage. The file system can be restored to its initial empty state with erase_all.
get_first_core (BSP)
Syntax:
get_first_core
Returns the target info for the first core in the system which should have ID zero. See get_target_info.
get_next_core (BSP)
Syntax:
get_next_core,prevCoreID
Returns the target info for the core following prevCoreID in the system. If there is no successor core, it fails. See get_target_info.
get_cores (BSP)
Syntax:
get_cores
Returns the number of cores (or instances) defined by the target.
success,numberOfCores
get_core_list (BSP)
Syntax:
get_core_list
Returns the number of cores (or instances) defined by the target, and all their IDs. See also get_instance_table below which is an alias.
success,number of cores, <list of core IDs>
get_instance_table (BSP)
Syntax:
get_instance_table
...
success,number of cores, <list of core IDs>
get_first_file (BSP)
Syntax:
get_first_file
This command gets information about the first file in the target file system. On success the reply is either:
...
Several failures are possible, including failures due to the target not having a file system.
get_next_file (BSP)
Syntax:
get_next_file
This command may only be used after first having used get_first_file. It returns information about successive files. On success the reply is either:
...
Several failures are possible, including failures due to the target not having a file system.
read_file (BSP)
Syntax:
read_file,filename
This command reads the specified file from the target file system, and writes the file as AWE_directory/filename to your hard drive, in which case it reports success. There are many possible failures including file not found and the target not having a file system.
reopen_input (BSP)
Syntax:
reopen_input,devIndex
...
This command is intended for rare cases where a device has to be reconfigured but can't be while AWE has an open handle on it.
reopen_output (BSP)
Syntax:
reopen_output,devIndex
...
This command is intended for rare cases where a device has to be reconfigured, but can't be while AWE has an open handle on it.
write_file (BSP)
Syntax:
write_file,filename,attribute
...
When you next reset the target, the layout should be running. Note that the AWS and AWB extensions are convention only, you can use anything you like.
get_extended_info
Syntax:
get_extended_info
This command returns user version followed by 12 undefined words
success,user_version,<12 undefined words>
get_first_io
Syntax:
get_first_io
This command returns the first I/O object, as in this example:
...
For more information on these fields see Framework.h.
See get_next_io.
get_first_object
Syntax:
get_first_object
get_first_object,1
...
Where members are inherited from a base class, each inherited member is listed.
get_heap_count
Syntax:
get_heap_count
This command returns:
...
Currently this value is always 3.
get_heap_size
Syntax:
get_heap_size
On success the reply is:
...
All sizes are in 32-bit words.
get_executable_dir (BSP)
Syntax:
get_executable_dir
...
success,c:\Program Files\DSP Concepts\Audio Weaver Designer\Bin
get_module_state
Syntax:
get_module_state,module_instance_name
...
When first created, modules are active. See set_module_state.
get_moduleclass_count
Syntax:
get_moduleclass_count
...
module_class_count is the number of module classes in the framework.
get_moduleclass_info
Syntax:
get_moduleclass_info,module_class_index
...
DLLname is the library the module is found in.
get_next_io
Syntax:
get_next_io
Returns the next I/O object in the form described in get_first_io, or:
...
if there are no more I/O objects to enumerate.
get_next_object
Syntax:
get_next_object
get_next_object,1
...
if there are no more objects to enumerate.
get_object_byname
Syntax:
get_object_byname,instanceName
...
failed, 'instanceName' is undefined
get_rate
Syntax:
get_rate,filename
This command opens an audio file and returns its rate, channels, and duration. On Windows it can open any file type for which a codec is installed in the OS (as a minimum always supports MP3). On Linux it supports only WAV files. The file is closed after reading its properties.
...
The command fails if the file can’t be found or if the format is not a supported audio file. The reported duration is in seconds as floating point.
get_schema (BSP)
Syntax:
get_schema,className
...
Note that unlike get_first_object/get_next_object, the inherited members from base classes are not displayed.
get_target_info
Syntax:
get_target_info
Reply:
...
featureBits - usually 0, reserved for DSP Concepts internal use
get_type (BSP)
Syntax:
get_type,expression
...
8 - pointer to fract
9 - pointer to object
get_value
Syntax:
get_value,expression
...
failed, no such member of 'class' as 'string'
get_version (BSP)
Syntax:
get_version
Returns version information about the currently connected server. The reply is of the form:
...
where the first value is empty, and the rest of the string is the build date and time.
gui_logging (BSP)
Syntax:
gui_logging,0
gui_logging,1
...
where the value is 1 if display is enabled, otherwise 0.
kill_pump (BSP)
Syntax:
kill_pump
This command is only supported on Windows and Linux server in Native. It causes the audio pump thread to terminate. The error message “Server response: "failed,not playing" will appear if audio pump thread doesn’t exist. Otherwise it will report success. It is intended only for test.
make_binary (BSP)
Syntax:
make_binary,filename
...
write_fract_array
write_int_array
open_web_page (BSP, GUI only)
Syntax:
open_web_page,URL
Displays a web page in a browser. URL is a string specifying the address of the page to display. If URL starts with "http://", "file://", or "www.", the URL is used as-is. Otherwise, the program determines if a script is currently running, and URL is a relative path, in which case the file to open is taken relative to the script path, otherwise if no script is running and the URL is a relative path, the file is taken relative to the executable (AWE_Server.exe) path. Only file names ending in ".htm" or ".html" are considered candidates for relative pathing, otherwise the URL is used as-is.
pin_to_file (NOT IMPLEMENTED)
Syntax:
pin_to_file,pin_name,file_name
...
failed, argument count // needs 2 arguments
failed, no target // must be connected
failed, duplicate pin name // can't bind the same pin more than once
failed, name undefined // pin name not defined
failed, not a pin // pin named is not a pin
failed, can't be Output // can't bind to pin Output
failed, not an output pin // pin must be an output
failed, not in core %d // pin name not in the core
failed, not a public pin // only public pins can be bound
pump
Syntax:
pump
This command causes all current layouts to be pumped. Layouts that have dividers of 1 are pumped on every call, layouts with larger values are pumped on every Nth call.
...
This call is intended to be used with the command write_pump_read for testing. See also fast_write and fast_read.
pump_layout
Syntax:
pump_layout,layout_instance_name [,pump cycles]
...
failed,argument count // must be one [or two] arguments only
failed,no target // must be connected to target
failed,instance name not identifier // must be identifier
failed,name undefined // layout name must be defined
pump_module
Syntax:
pump_module,module_instance_name
...
failed,argument count; // must be only one argument
failed,no target; // must be connected to target
failed,instance name not identifier; // must be identifier
failed,name undefined; // module name must be defined
query_pin
Syntax:
query_pin,pin_name
...
On success, the reply is as described in get_first_io.
query_pump (BSP)
Syntax:
query_pump
This command reports the audio pump status as an integer. The possible values are:
...
This command is intended for use by an external monitoring process which watches for the pump dying by transitioning from 3 to 1, which usually indicates an I/O error on audio hardware which can only happen on Linux systems.
query_wire
Syntax:
query_wire,wireNname
...
failed,argument count // must have 1 argument
failed,no target // must be connected to a target
failed,instance name not identifier // name must be identifier
failed,instance name undefined // name must be defined
failed,instance name is not a wire // must name a wire
read_float_array
Syntax:
read_float_array,expression,count
...
There is no bounds checking - elements past the end of the array will report junk.
read_fract_array
Syntax:
read_fract_array,expression,count
...
There is no bounds checking - elements past the end of the array will report junk.
read_int_array
Syntax:
read_int_array,expression,count
...
There is no bounds checking - elements past the end of the array will report junk.
reboot_target (BSP)
Syntax:
reboot_target
Causes an embedded target to reboot as though by reset or power cycle. Not implemented for Windows or Linux server.
rename_pin (BSP) (NOT IMPLEMENTED)
Syntax:
rename_pin,oldPinName,newPinName
...
After renaming, you must refer to the pin by its new name.
script (BSP)
Syntax:
script,fileName
This command executes the commands stored in fileName. Generally, these files have an AWS extension, and are generated by Designer.
setini (BSP)
Syntax:
setini,section,key,value
...
Code Block |
---|
[section] key=value |
set_call
Syntax:
set_call,module_name,mask
...
success,module_name=address
select_core (BSP, Windows)
Syntax:
select_core,N
For Windows only, cause the server GUI to display the data for the specified core. The allowed range of N is 1 through cores where cores is as reported by get_cores.
set_core_description (BSP, Windows, Linux)
Syntax:
set_core_description,file
...
Any attempt to set the description file currently in use reports success,no change
. If the command succeeded in loading a new file (or reverting to SMP) the reply is success
.
set_cores (BSP, Windows, Linux)
Syntax:
set_cores,N
For SMP targets only, destroys all existing core objects, and creates N new ones. The allowed range is 1-16. The number of cores on server start is 2. The current number of cores can be found using get_cores. Embedded targets with multiple cores have a fixed number of physical cares and do not implement this command.
Warming: it is possible to create more core instances than the target has. Be aware that cores are simulated in the BSP by threads, and spawning more threads than physical core count - 1 can exceed the CPU bandwidth of the machine. Also be aware that Intel HyperThreading reports twice as many cores as physical cores, but the actual CPU bandwidth is not that high - you can end up with less computation than this number would lead you to expect.
set_instance_id
Syntax:
set_instance_id,object_name,id
As objects are created, they are assigned IDs starting at 1. If a layout needs to assign a new ID, it must be >= 30000, and not in use by another object. The object_name must be that of an existing object.
set_module_state
Syntax:
set_module_state,module_instance_name,state
...
See also get_module_state.
set_path (BSP)
Syntax:
set_path,path_item1 [, path_item2 ... ,path_itemN ]
...
When audio_pump is searching for a file, it works through this list in order, and uses the first match found.
set_pointer
Syntax:
set_pointer,destination_expression,pointer_expression
This command assigns the address of the pointer_expression to the location destination_expression which must be a pointer value. On success the reply is:
success
set_timeout (Matlab)
Syntax:
set_timeout,N
where:
...
On success the reply is:
success
set_value
Syntax:
set_value,expression,value [, expression,value]*
...
success,instanceID,type,value [,instanceID,type,value]*
show (BSP, GUI only)
Syntax:
show,[0|1]
If the server has any dialogs created by create_dialog, then show,0 causes the server dialog to be hidden. The dialog is un-hidden by destroy, using destroy_dialog to destroy the last child dialog, or by show,1. The show,0 command does nothing if there are no child dialogs.
target_execute (BSP)
Syntax:
target_execute,file
...
Loading may fail for a large number of reasons even if the file exists. Causes may range from the AWB file referring to cores the target does not have, to the file referring to audio modules not present in the target code, to lack of storage for the layout.
trace (BSP, Linux)
Syntax:
trace,message
Causes a Linux target to write to stdout the message. The message must be double quoted if it contains space or comma. The reply is always:
success
on all targets.
write_float_array
Syntax:
write_float_array,expression,val0,....,valN-1
...
Misuse of the command can corrupt storage, because there is no bounds checking for arrays.
write_float_aray_partial
Syntax:
write_float_array_partial,expression,val0,....,valN-1
As write_float_aray except the final set call is suppressed.
write_fract_array
Syntax:
write_fract_array,expression,val0,....,valN-1
...
Misuse of the command can corrupt storage, because there is no bounds checking for arrays.
write_fract_array_partial
Syntax:
write_fract_array_partial,expression,val0,....,valN-1
As write_fract_aray except the final set call is suppressed.
write_int_array
Syntax:
write_int_array,expression,val0,...,valN-1
...
Misuse of the command can corrupt storage, because there is no bounds checking for arrays.
write_int_array_partial
Syntax:
write_int_array_partial,expression,val0,...,valN-1
As write_int_aray except the final set call is suppressed.
write_pump_read
Syntax:
write_pump_read,layout,inputWire,outputWire,val1, ... ,valN
...
The input and output samples are raw values on the wire. The number provided should be the same as channels*blockSize. For example, if the wire is stereo 32 long, then 64 values must be provided in interleaved form. The assumption is input and output wire are the same, and so the number of output samples is the same as the number of input samples.
Error Messages
Commands can produce error messages from the following table:
Text | Description |
failed, heap type index range | A heap index was not in the range of heaps |
failed, awe_fwMalloc no more storage | The given heap does not have enough storage to satisfy the requested size |
failed, awe_fwMallocScratch no more storage | The scratch heap does not have enough storage to satisfy the requested size |
failed, constructor argument count | A create_xx call has an incorrect number of arguments |
failed, class index out of range | The given class index is not in the range of classes |
failed, class not found | The named class was not found in the symbol table |
failed, module already owned | An attempt was made to give a module to a layout when it is already in another layout |
failed, address outside heap | An attempt was made to assign to a location not in any heap |
failed, not a wire | A wire argument to create_module is not actually a wire |
failed, number of inputs and outputs must match | Some modules require that the number of inputs and outputs are the same |
failed, input pin types must be the same | Some modules require that the types of input and output pins be the same |
failed, module needs at least one input | Many modules require at least one input |
failed, module needs at least one output | Many modules require at least one output |
failed, inputs must match corresponding outputs | Some module require that each ith input have the same type as each ith output |
failed, not a module | An attempt was made to give an object not a module instance to add_module |
failed, I/O count error | The input/output count is not acceptable |
failed, parameter error | A parameter given to create_module is wrong for the specified module class |
failed, no more objects | There are no more objects for get_next_object to display |
failed, not object pointer | An expression expected to be of pointer type is not |
failed, not input pin | The pin must be an input pin. |
failed, I/O pin in use | An attempt was made to bind an I/O pin that was already bound with bind_wire |
failed, pin types not compatible | An attempt was made using bind_wire to bind a wire incompatible with the I/O pin |
failed, pin sizes not compatible | An attempt was made using bind_wire to bind a wire not an integer multiple of the I/O pin size |
failed, not output pin | The pin must be an output pin. |
failed, no more I/O pins | There are no more pin objects for get_next_io to display |
failed, no layouts to pump | 'pump' was called when no layouts exist |
failed, module must have only one output | Many modules require only one output |
failed, output wire must have only one sample | Some modules require that an output have only a single sample |
failed, incompatible block sizes | All contained modules must have the same block size |
failed, wire index out of range | A container wire vector indexed a wire out of range |
failed, unknown error %d | An unknown error occurred |
failed, argument count | A command had an invalid number of arguments |
failed, not implemented on target | The target does not implement the command |
failed, instance name '%s' not identifier | The argument must be an identifier |
failed, instance name '%s' is already used | The instance name has already been defined |
failed, class name '%s' is not defined | An attempt was made to use an undefined class name |
failed, class name '%s' has different classID than created instance | An object was created, but then found to have a different class than it should have |
failed, instance name '%s' is not a pin type | The argument must be a pin type |
failed, name '%s' undefined | A name was seen that has not been defined |
failed, expression error | The expression given to get_value or set_value had an error |
failed, wire name '%s' undefined | A supposed wire name given to create_module is not defined |
failed, wire name '%s' is not a Wire | A supposed wire name given to create_module is not of type Wire |
failed, module name '%s' undefined | A supposed module name given to add_module is undefined |
failed, '%s' is not a module | A supposed module name given to add_module is not a module |
failed, unknown argument | A command that takes a symbolic argument had an unknown string argument |
failed, open sound card for input returned an error | 'audio_pump' could not open the sound card for input |
failed, player create returned 0x%08x | 'audio_pump' could not open the sound card for output |
failed, renderer create returned 0x%08x | 'audio_pump' could not create output object |
failed, empty filename | A required filename was empty |
failed, unknown command '%s' | The command keyword is unknown |
failed, empty command | The command was empty |
failed, can't find instance class | An attempt to lookup the class of an instance failed |
failed, can't find instance | An attempt to lookup an instance failed |
failed, '%s' requires subscript | An expression requires a subscript |
failed, '%s' syntax error: missing ']' | Malformed subscript |
failed, '%s' subscript %d out of range | A subscript is outside the array bounds (static arrays only, very rare) |
failed, '%s' requires dot expression | An expression stopped early |
failed, no such member of '%s' as '%s' | The member name given is not a member |
failed, %s(%d): empty class name | Empty class name in schema file |
failed, %s(%d): syntax error in alias of class '%s' | Error while aliasing one class to another in schema file |
failed, %s(%d): unknown base class'%s' in alias of class '%s' | Reference to unknown base class while aliasing one class to another in schema file |
failed, %s(%d): comma expected in class '%s' | Missing comma in schema file |
failed, %s(%d): syntax error in derivation of class '%s' | Syntax error parsing derived class in schema file |
failed, %s(%d): unknown base class '%s' in alias of class '%s' | Attempt to derive a class from an unknown base in schema file |
failed, %s(%d): unexpected '{' in body of class %s | There can only be one level of bracing in schema files |
failed, %s(%d): empty member name in class %s | Member name is empty in schema file |
failed, %s(%d): non-numeric dimension in class %s | Array dimension has non-numeric subscript in schema file |
failed, %s(%d): expected ']' to close dimension in class %s | Missing close bracket in array dimension in schema file |
failed, %s(%d): empty type name in class %s | A type name is empty in schema file |
failed, %s(%d): unknown type name '%s' in class %s | A type name is undefined in schema file. |
failed, %s(%d): unexpected end of file in class %s | Unexpected end of file in schema file |
failed, no such core | A core ID was specified that the target does not have. |
failed, too many bound wires | An attempt was made to bind more than 17 times to an input pin |
Schema Files
Schema files provide a means for describing the layout of DSP storage that is compact and has a simple grammar, and does not need the complexity of the C/C++ type system.
...
can't be written, since an attempt is made to refer to B before it is declared.
Internal Binary Packets
Anchor | ||||
---|---|---|---|---|
|
There are occasions when text commands are too burdensome on bandwidth. These cases permit pumping raw audio samples into a layout for regression test, or for cases where the data is not coming from or going to a real audio device.
...
Currently, the only code that expects this reply is the MATLAB plugin DLL.
Supported Messages and External Binary Packets
The default target packet buffer is 4105 words - enough for the largest command header plus 4096 argument values. Targets are free to define the packet buffer as small as 16 words with a greatly increased transport overhead. A compromise used on many targets is 264 words - enough for the largest command header plus 256 argument values.
...