
Development Tools User’s Guide
261
Intel
®
IXP2400/IXP2800 Network Processors
Simulator APIs
9.3.2
XACT_get_handle
This function returns a handle to a transactor state, based on a transactor state name. If a handle
corresponding to the specified state exists and is currently valid, it will be returned; otherwise, a
unique handle will be created and returned. Note that the specified state name is case-sensitive.
For non-array states, the value of the array_index
MUST
be -1. For arrayed states, the array index
specifies the particular element in the array that will correspond to the handle. If a value of -1 is
specified for an array state, a handle is returned corresponding to the array, but which is not
associated to a particular array element.
Synopsis
XACTAPI_NORET XACT_HANDLE XACT_get_handle(char
*state_name, int array_index)
Returns
INVALID XACT HANDLE if the function failed
9.3.3
XACT_delete_handle
This function deletes the specified handle. This deletion operation disassociates the handle from
the previously specified state and invalidates the handle value thereby causing a subsequent
reference to that handle to fail. However, once deleted, the value of that handle may be reused
when a subsequent handle is generated by a call to
XACT_get_handle().
Synopsis
XACTAPI XACT_delete_handle(XACT_HANDLE handle)
Returns
TRUE if successful
FALSE if not successful
9.3.4
XACT_get_state_info
This function returns information about the state referenced by the specified handle
Synopsis
XACTTAPI XACT_get_state_info(XACT_HANDLE
state_handle, char *state_name, int *width, int
*array_length)
Parameters
state_name
: name of state
width:
width of state (
NOTE
: a width of 0 implies that the state is not
directly readable/writeable by the XACT API.)
array_length
: indicates the length of array ranging from 0 to
array_length - 1
. If this
array_length
is -1, the state is a non-
array state. If this
array_length
is < -1, it indicates that the state
represents a FIFO object of length
-array_length
(this precludes
FIFOs from being defined with length 1).
Returning each of the 3 pieces of state information is suppressed when that argument is NULL.
Note that when using a handle corresponding to an array, the function returns information
corresponding to the whole array even if the handle corresponds to a particular element of an array.
Returns
1 if function is successful
0 if function is unsuccessful