LAD Communication Interfaces

Data Structures

struct  LAD_DspStatus

Defines

#define LAD_MAXLENGTHIMAGENAME   512
#define LAD_MAXLENGTHCONFIGNAME   32

Typedefs

typedef Uns LAD_ClientHandle

Enumerations

enum  LAD_Status {
  LAD_SUCCESS = 0,
  LAD_FAILURE,
  LAD_INVALIDARG,
  LAD_ACCESSDENIED,
  LAD_ALREADYRUNNING,
  LAD_STILLRUNNING,
  LAD_IOFAILURE,
  LAD_NOTCONNECTED,
  LAD_INVALIDVERSION
}
enum  LAD_DspState {
  LAD_UNKNOWN = 0,
  LAD_SETUP,
  LAD_LOADED,
  LAD_STARTED,
  LAD_STOPPED,
  LAD_IDLE,
  LAD_RESET,
  LAD_UNAVAILABLE
}

Functions

LAD_Status LAD_connect (LAD_ClientHandle *handle)
 Connect to LAD.
LAD_Status LAD_disconnect (LAD_ClientHandle handle)
 Disconnect from LAD.
LAD_Status LAD_getDspStatus (LAD_ClientHandle handle, Int cpuId, LAD_DspStatus *statusInfo)
 Get DSP status from LAD.
LAD_Status LAD_releaseDsp (LAD_ClientHandle handle)
 Release control of the DSP. This call is only appropriate if the client previously made a successful call to LAD_startupDsp().
LAD_Status LAD_startupDsp (LAD_ClientHandle handle, Int cpuId, String linkConfigName, String imageName)
 Load and start the DSP running.

Define Documentation

#define LAD_MAXLENGTHIMAGENAME   512

max size for DSP server path name

#define LAD_MAXLENGTHCONFIGNAME   32

max size Link config name


Typedef Documentation

typedef Uns LAD_ClientHandle

handle for communicating with LAD


Enumeration Type Documentation

enum LAD_Status
Enumerator:
LAD_SUCCESS 

success

LAD_FAILURE 

general failure

LAD_INVALIDARG 

invalid argument

LAD_ACCESSDENIED 

the request was denied

LAD_ALREADYRUNNING 

success; DSP was already running

LAD_STILLRUNNING 

success; DSP still running

LAD_IOFAILURE 

communication failure

LAD_NOTCONNECTED 

not connected to LAD yet

LAD_INVALIDVERSION 

unsupported communication protocol

Enumerator:
LAD_UNKNOWN 

state is unknown

LAD_SETUP 

setup state

LAD_LOADED 

loaded state

LAD_STARTED 

running state

LAD_STOPPED 

stopped state

LAD_IDLE 

idle state

LAD_RESET 

reset state

LAD_UNAVAILABLE 

state is unavailable


Function Documentation

LAD_Status LAD_connect ( LAD_ClientHandle handle  ) 

Connect to LAD.

Parameters:
[out] handle The new client handle, as defined by LAD.
Return values:
LAD_SUCCESS Success.
LAD_INVALIDARG The handle pointer is NULL.
LAD_ACCESSDENIED Returned on either of two conditions: this client is trying to establish a second active connection to LAD, and the request is denied; or, the total number of simultaneous client connections to LAD has been reached, and no more client handles are available.
LAD_IOFAILURE Unable to communicate with LAD, due to an OS-level I/O failure. A full system reboot may be necessary.
LAD_INVALIDVERSION Unable to communicate with LAD due to a mismatch in the communication protocol between the client and LAD.
See also:
LAD_disconnect().
LAD_Status LAD_disconnect ( LAD_ClientHandle  handle  ) 

Disconnect from LAD.

Parameters:
[in] handle The client handle, as returned from previous call to LAD_connect().
Return values:
LAD_SUCCESS Success.
LAD_INVALIDARG Invalid client handle.
LAD_NOTCONNECTED Not currently connected to LAD.
LAD_STILLRUNNING This client has previously started the DSP via a call to LAD_startupDsp, and must call LAD_releaseDsp before attempting to disconnect from LAD.
LAD_IOFAILURE Unable to communicate with LAD, due to an OS-level I/O failure, or timeout. A full system reboot may be necessary.
See also:
LAD_connect().
LAD_Status LAD_getDspStatus ( LAD_ClientHandle  handle,
Int  cpuId,
LAD_DspStatus statusInfo 
)

Get DSP status from LAD.

Parameters:
[in] handle The client handle, as returned from previous call to LAD_connect().
[in] cpuId The CPU for which status is to be returned.
[out] statusInfo The DSP status structure to be filled in by LAD.
Return values:
LAD_SUCCESS Success.
LAD_INVALIDARG Invalid handle or statusInfo pointer.
LAD_NOTCONNECTED Not currently connected to LAD.
LAD_FAILURE Failure occurred when querying DSP state.
LAD_IOFAILURE Unable to communicate with LAD, due to an OS-level I/O failure. A full system reboot may be necessary.
See also:
LAD_connect().
LAD_Status LAD_releaseDsp ( LAD_ClientHandle  handle  ) 

Release control of the DSP. This call is only appropriate if the client previously made a successful call to LAD_startupDsp().

Parameters:
[in] handle The client handle, as returned from LAD_connect().
Return values:
LAD_SUCCESS Success, the DSP has been stopped.
LAD_STILLRUNNING Success, the DSP is continuing to run due to other client connection(s).
LAD_INVALIDARG Invalid client handle.
LAD_NOTCONNECTED Not currently connected to LAD.
LAD_ACCESSDENIED This client not allowed to stop the DSP because it didn't successfully start it.
LAD_FAILURE LAD was unable to stop and detach from the DSP.
LAD_IOFAILURE Unable to communicate with LAD, due to an OS-level I/O failure. A full system reboot may be necessary.
See also:
LAD_startupDsp().
LAD_Status LAD_startupDsp ( LAD_ClientHandle  handle,
Int  cpuId,
String  linkConfigName,
String  imageName 
)

Load and start the DSP running.

Parameters:
[in] handle The client handle, as returned from LAD_connect().
[in] cpuId The DSP to be loaded and started.
[in] linkConfigName The pre-defined Link configuration known to LAD.
[in] imageName The name to the DSP server executable. If an environment variable named "LAD_SERVERPATH" is defined, indicting a repository for server executable files, then this path will be pre-pended to the imageName to form the location of the DSP executable file; if "LAD_SERVERPATH" is not defined, then imageName will be considered to be the full path name of the DSP executable file.
Return values:
LAD_SUCCESS Success, DSP has been started.
LAD_ALREADYRUNNING Success, the DSP was already running with the same Link configuration and server executable.
LAD_INVALIDARG Invalid client handle, cpuId, or linkConfigName.
LAD_NOTCONNECTED Not currently connected to LAD.
LAD_ACCESSDENIED LAD has refused the request because the DSP is already running, with a linkConfigName or imageName that does not match this request.
LAD_FAILURE LAD is unable to start the DSP.
LAD_IOFAILURE Unable to communicate with LAD, due to an OS-level I/O failure. A full system reboot may be necessary.
See also:
LAD_releaseDsp().
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines

Copyright 2010, Texas Instruments Incorporated