Utility
[EDT DMA Library]


Detailed Description

Utility functions.


Defines

#define edt_is_dv_multichannel(edt_p)   (edt_is_dvcl(edt_p) || edt_is_dvfox(edt_p) || edt_p->devid == PDVAERO_ID)
#define edt_is_dvcl(edt_p)   (ID_IS_DVCL(edt_p->devid))
#define edt_is_dvcl2(edt_p)   (ID_IS_DVCL2(edt_p->devid))
#define edt_is_dvfox(edt_p)   (ID_IS_DVFOX(edt_p->devid))
#define edt_is_pcd(edt_p)   (ID_IS_PCD(edt_p->devid))
#define edt_is_pdv(edt_p)   (ID_IS_PDV(edt_p->devid))

Functions

int edt_access (char *fname, int perm)
 Determines file access, independent of operating system.
uchar_t * edt_alloc (int size)
 Convenience routine to allocate memory in a system-independent way.
void edt_back_to_fwd (char *str)
 back_to_fwd: for use by edt_correct_slashes
int edt_check_version (EdtDev *edt_p)
 compares version strings between library and driver, returns 0 if they aren't the same
void edt_closedir (DIRHANDLE h)
 Cross platform function to close a directory handle.
void edt_correct_slashes (char *str)
 change the slashes from forward to back or vice versa depending on whether it's Wind*ws or Un*x
int edt_device_id (EdtDev *edt_p)
 Gets the device ID of the specified device.
double edt_dtime (void)
 return time in seconds since last call
double edt_elapsed (u_char reset)
 Like edt_dtime, but doesn't reset start time unless requested.
u_int edt_errno (void)
 Returns an operating system-dependent error number.
int edt_find_xpn (char *partnum, char *xilinx)
 ` Reads file 'edt_parts.xpn', comparing entries with part number, returns matching xilinx in argument 'xilinx' if match is found.
int edt_fix_millennium (char *str, int rollover)
 given a date string in the format yy/mm/dd or yyy/mm/dd or yyyy/mm/dd, correct for the millenium.
char * edt_fmt_pn (char *pn, char *pn_str)
 Takes a part number portion of the embedded infrormation string, as retrieved from the PCI xilinx information header via edt_get_sns; reformats and returns it in a "human readable" form (dashes added).
void edt_free (uchar_t *ptr)
 Convenience routine to free the memory allocated with edt_alloc.
void edt_fwd_to_back (char *str)
 fwd_to_back: for use by edt_correct_slashes
int edt_get_bitpath (EdtDev *edt_p, char *bitpath, int size)
 Obtains pathname to the currently loaded interface bitfile from the driver.
u_int edt_get_board_id (EdtDev *edt_p)
 Gets the mezzanine id.
u_int edt_get_dma_info (EdtDev *edt_p, edt_dma_info *dmainfo)
 Gets information about active dma.
int edt_get_driver_buildid (EdtDev *edt_p, char *build, int size)
 Gets the full build ID of the EDT library.
int edt_get_driver_version (EdtDev *edt_p, char *versionstr, int size)
 Gets the version of the EDT driver.
void edt_get_esn (EdtDev *edt_p, char *esn)
 Retrieve the board's embedded information string from the PCI xilinx information header.
u_int edt_get_full_board_id (EdtDev *edt_p, int *extended_n, int *rev_id, u_int *extended_data)
 Gets the mezzanine id including extended data.
char * edt_get_last_bitpath (EdtDev *edt_p)
int edt_get_library_buildid (EdtDev *edt_p, char *build, int size)
 Gets the full build ID of the EDT library.
int edt_get_library_version (EdtDev *edt_p, char *versionstr, int size)
 Gets the version (number and date) of the EDT library.
int edt_get_mezz_bitpath (EdtDev *edt_p, char *bitpath, int size)
 Obtains pathname to the currently loaded mezzanine bitfile from the driver.
int edt_get_mezz_chan_bitpath (EdtDev *edt_p, char *bitpath, int size, int channel)
 Obtains pathname to the currently loaded mezzanine bitfile from the driver.
void edt_get_osn (EdtDev *edt_p, char *osn)
 Retrieve the board OEM's embedded information string from the PCI xilinx information header.
void edt_get_sns (EdtDev *edt_p, char *esn, char *osn)
 Retrieve the board's manufacturer and OEM embedded information strings strings from the PCI xilinx information header.
void edt_get_sns_sector (EdtDev *edt_p, char *esn, char *osn, int sector)
char * edt_idstr (int id)
 Converts the board ID returned by edt_device_id to a human readable form.
void edt_msleep (int msecs)
 Causes the process to sleep for the specified number of milliseconds.
DIRHANDLE edt_opendir (char *dirname)
 Cross platform function to open a directory for reading.
uint_t edt_overflow (EdtDev *edt_p)
int edt_parse_esn (char *str, Edt_embinfo *ei)
 Parse the board's embedded information string.
int edt_parse_unit (const char *str, char *dev, const char *default_dev)
 Parses an EDT device name string.
int edt_parse_unit_channel (const char *str, char *dev, const char *default_dev, int *channel)
 parse -u argument returning the device and unit.
void edt_perror (char *str)
 Formats and prints a system error.
int edt_readdir (DIRHANDLE h, char *name)
 Cross platform function to read the next directory entry.
int edt_set_bitpath (EdtDev *edt_p, const char *bitpath)
 Sets pathname to the currently loaded user interface bitfile in the driver.
int edt_set_mezz_bitpath (EdtDev *edt_p, const char *bitpath)
 Sets pathname to the currently loaded mezzanine bitfile in the driver.
int edt_set_mezz_chan_bitpath (EdtDev *edt_p, const char *bitpath, int channel)
 Sets pathname to the currently loaded mezzanine bitfile in the driver.
int edt_system (const char *cmdstr)
 Performs a UNIX-like system() call which passes the argument strings to a shell or command interpreter, then returns the exit status of the command or the shell so that errors can be detected.
double edt_timestamp (void)
 Gets the seconds + fractional seconds since the Epoch, OS independent.
char * edt_timestring (u_int *timep)
void edt_usec_busywait (u_int usec)
void edt_usleep (int usecs)
 causes process to sleep for specified number of microseconds


Function Documentation

int edt_access ( char *  fname,
int  perm 
)

Determines file access, independent of operating system.

This a convenience routine that maps to access() on Unix/Linux systems and _access() on Windows systems.

Parameters:
fname path name of file to check access permissions
perm permission flag(s) to test for. See documentation for access() (Unix/Linux) or _access() (Windows) for valid values.
Example
 if(edt_access("file.ras", F_OK))
     printf("Warning: overwriting file %s\n", "file.ras");

Returns:
0 on success, -1 on failure

Definition at line 7230 of file libedt.c.

uchar_t* edt_alloc ( int  size  ) 

Convenience routine to allocate memory in a system-independent way.

The buffer returned is page aligned. Uses VirtualAlloc on Windows NT systems, valloc on UNIX-based systems.

Parameters:
size,: number of bytes of memory to allocate.
Returns:
The address of the allocated memory, or NULL on error. If NULL, use edt_perror to print the error.

Definition at line 774 of file libedt.c.

int edt_device_id ( EdtDev edt_p  ) 

Gets the device ID of the specified device.

The board ID can be compared to specific board IDs listed in edtreg.h. To check if the specific board is part of a broader type, like PCD or PDV, macros such as edt_is_pcd and edt_is_pdv can be used.

Parameters:
edt_p pointer to edt device structure returned by edt_open or edt_open_channel

Definition at line 7619 of file libedt.c.

double edt_elapsed ( u_char  reset  ) 

Like edt_dtime, but doesn't reset start time unless requested.

Parameters:
reset true if start time should be reset.

Definition at line 4828 of file libedt.c.

u_int edt_errno ( void   ) 

Returns an operating system-dependent error number.

Returns:
32-bit integer representing the operating system-dependent error number generated by an error.
Example
 if ((edt_p = edt_open("pcd", 0)) == NULL) 
 {
     edt_perror("edt_open failed");
     exit(edt_errno());
 }

Definition at line 2793 of file libedt.c.

int edt_find_xpn ( char *  part_number,
char *  xilinx 
)

` Reads file 'edt_parts.xpn', comparing entries with part number, returns matching xilinx in argument 'xilinx' if match is found.

File should be ASCII text, space delimited, one line per entry, as follows:

part_number xilinx description

anything after the second space is ignored, and can be blank but should be the description (name of the device)

Parameters:
part_number should be 8 or 10 digits. The last 2 digits of 10 digit part number are rev number. If a match with a 10-digit number is found, return immediately. If no 10-digit match is found but an 8-digit is found, returns with that. That way we can have some numbers return a match regardless of rev, and others that cover a specific rev that takes precedence.
xilinx is a character array into which the xilinx type will be stored (e.g. 'xc2s100e' will be returned for the part_number '01901933'). An array of 128 bytes will be more than enough for the foreseeable future.
Returns:
1 if found 8 or 10 digit match, 0 if not

Definition at line 8592 of file libedt.c.

int edt_fix_millennium ( char *  str,
int  rollover 
)

given a date string in the format yy/mm/dd or yyy/mm/dd or yyyy/mm/dd, correct for the millenium.

Will only work for the next 100 years or less, depending on rollover.

Returns:
0 on success, -1 if format error

Definition at line 2581 of file edt_xilinx.c.

char* edt_fmt_pn ( char *  pn,
char *  str 
)

Takes a part number portion of the embedded infrormation string, as retrieved from the PCI xilinx information header via edt_get_sns; reformats and returns it in a "human readable" form (dashes added).

A simple subroutine mainly for use by pciload and other EDT utility programs, but available for use by user apps if desired.

The string returned is valid until the next invocation of this function.

Parameters:
pn the part number without dashes.
str the output string, which should be at least 13 characters long
See also:
edt_get_esn, edt_parse_esn

Definition at line 192 of file edt_xilinx.c.

void edt_free ( uchar_t *  ptr  ) 

Convenience routine to free the memory allocated with edt_alloc.

Parameters:
ptr Address of memory buffer to free.
Returns:
0 if sucessful, -1 if unsuccessful.

Definition at line 813 of file libedt.c.

int edt_get_bitpath ( EdtDev edt_p,
char *  bitpath,
int  size 
)

Obtains pathname to the currently loaded interface bitfile from the driver.

The program bitload sets this string in the driver when an interface bitfile is successfully loaded.

Parameters:
edt_p pointer to edt device structure returned by edt_open or edt_open_channel
bitpath address of a character buffer of at least 128 bytes
size number of bytes in the above character buffer
Returns:
0 on success, -1 on failure.
See also:
edt_set_bitpath

Definition at line 8168 of file libedt.c.

u_int edt_get_board_id ( EdtDev edt_p  ) 

Gets the mezzanine id.

Parameters:
edt_p 
Returns:
mezzanine id
This function works on SS and GS boards to read the mezzanine board ids. It actually calls edt_get_full_board_id and ignores the extended data and rev_id returned from that function.

Definition at line 9152 of file libedt.c.

u_int edt_get_dma_info ( EdtDev edt_p,
edt_dma_info dmainfo 
)

Gets information about active dma.

Use this function to determine whether this or another open process has enabled DMA or image acquisition on any channel of a specific board (unit)

Parameters:
edt_p pointer to edt device structure returned by edt_open or edt_open_channel
dmainfo pointer to struct of type edt_dma_info (defined in libedt.h ), which has three fields containing hex values, with each bit in a field representing a channel that has been used, allocated or is currently active, as follows:
 typedef struct
 {
     uint_t     used_dma ;   // which channels have started dma within current open/close 
     uint_t     alloc_dma ;  // which channels have has allocated > 1 ring buffer
     uint_t     active_dma ; // which channels have dma active right now
 } edt_dma_info ;
Example
 // this code checks whether this or some other process has done or is
 // currently doing DMA on a given unit / channel, and prints out a warning
 // if there is a possibility of a conflict based on the results
 
 edt_dma_info tmpinfo ;
 EdtDev *edt_p = edt_open_channel(EDT_INTERFACE, unit, channel);
 u_int tmpmask = edt_get_dma_info(edt_p, &tmpinfo);

 if (tmpinfo.active_dma & (1 << channel))
 {
     printf("Warning: DMA is currently active on unit %d ch. %d.\n", unit, channel);
     printf("It is not safe to start another DMA on this unit/channel at this time.\n");
 }
 if (tmpinfo.used_dma & 1 << channel))
 {
     printf("Warning: this or another process has already opened and done DMA on unit %d channel %d.\n", unit, channel);
     printf("It may not be safe to start DMA on this unit/channel outside the currently opened process.\n");
 }

Returns:
mask of all of the above or'd together
See also:
setdebug.c Utility for example of use

Definition at line 8554 of file libedt.c.

int edt_get_driver_buildid ( EdtDev edt_p,
char *  build,
int  size 
)

Gets the full build ID of the EDT library.

The build ID string is the same format as that returned by edt_get_library_buildid.

Parameters:
edt_p pointer to edt device structure returned by edt_open or edt_open_channel
build a string large enough to hold the build information (128 bytes is sufficient).
size the size, in bytes, of the user-allocated string
See also:
edt_get_library_buildid

Definition at line 8228 of file libedt.c.

int edt_get_driver_version ( EdtDev edt_p,
char *  version,
int  size 
)

Gets the version of the EDT driver.

The version string is the same format as that returned by edt_get_library_version.

Parameters:
edt_p pointer to edt device structure returned by edt_open or edt_open_channel
version a string large enough to hold the version information (64 bytes is sufficient).
size the size, in bytes, of the user-allocated string

Definition at line 8204 of file libedt.c.

void edt_get_esn ( EdtDev edt_p,
char *  esn 
)

Retrieve the board's embedded information string from the PCI xilinx information header.

The EDT manufacturer's part numbers is embedded in an unused area of the Xilinx FPGA PROM, and is preserved across reloads (via pciload, hubload, etc.) unless options to overwrite are invoked in one of those utilities. This subroutine retrieves the EDT serial number portion of that information.

The data is an ASCII string, with the following colon-separated fields:

serial number:part number:clock speed:options:revision:interface xilinx:

(To see the information string, run pciload with no arguments.)

Note:
Information embedding was implemented in Sept. 2004; boards shipped before that time will yield a string with all NULLS unless the board's FPGA has since been updated with the embedded information.
Parameters:
edt_p pointer to edt device structure returned by edt_open
esn the EDT part number without dashes.
See also:
edt_get_sns, edt_get_osn, edt_parse_esn, edt_fmt_pn

Definition at line 2400 of file edt_xilinx.c.

u_int edt_get_full_board_id ( EdtDev edt_p,
int *  extended_n,
int *  rev_id,
u_int *  extended_data 
)

Gets the mezzanine id including extended data.

Parameters:
edt_p 
extended_n pointer to int to receive the number of extended data elements
rev_id pointer to int to fill in with the mezzanine rev_id
extended_data pointer to array to fill in with extended data elements
Returns:
mezzanine id
This function works on SS and GS boards to read the mezzanine board ids. If the id is an "extended" id, it reads the eeprom on the mezzanine including the extended data array.

The following values could be returned instead of the mezzanine id, if the mezzanine id couldn't be determined:
MEZZ_ERR_NO_BITFILE Indicates that no UI bitfile is loaded, so the mezzanine id couldn't be determined.

MEZZ_ERR_BAD_BITSTREAM Indicates an error while looking up the extended board info. Before EDT ticket #95 is fixed, this could also result when the ui bitfile is pciss4test and the mezz. board is 3X3G.

MEZZ_ERR_NO_REGISTER Indicates that a bitfile has been loaded into the UI which doesn't support the extended board id register. All EDT UI bitfiles should support this, so contact EDT if this occurs.

MEZZ_UNKN_EXTBDID Indicates that the board id is extended but the UI bitfile doesn't support this functionality. This is also unlikely - contact EDT if you see this.

If any of those values are returned, load a bitfile which supports the extended board id register, such as pciss1test, pciss4test, or pciss16test (depending on channels), or 3x3g.bit for the 3X3G board.

Definition at line 8972 of file libedt.c.

int edt_get_library_buildid ( EdtDev edt_p,
char *  build,
int  size 
)

Gets the full build ID of the EDT library.

Parameters:
edt_p pointer to edt device structure returned by edt_open or edt_open_channel
build a string large enough to hold the build information (128 bytes is sufficient).
size the size, in bytes, of the user-allocated string
See also:
edt_get_driver_buildid

Definition at line 8268 of file libedt.c.

int edt_get_library_version ( EdtDev edt_p,
char *  version,
int  size 
)

Gets the version (number and date) of the EDT library.

Parameters:
edt_p pointer to edt device structure returned by edt_open or edt_open_channel
version a string large enough to hold the version information (64 bytes is sufficient).
size the size, in bytes, of the user-allocated string
See also:
edt_get_driver_version

Definition at line 8252 of file libedt.c.

int edt_get_mezz_bitpath ( EdtDev edt_p,
char *  bitpath,
int  size 
)

Obtains pathname to the currently loaded mezzanine bitfile from the driver.

The edt_bitload sets this string in the driver when a mezzanine bitfile is successfully loaded.

Parameters:
edt_p pointer to edt device structure returned by edt_open or edt_open_channel
bitpath address of a character buffer of at least 128 bytes
size number of bytes in the above character buffer
Returns:
0 on success, -1 on failure.
See also:
edt_get_bitpath

Definition at line 8080 of file libedt.c.

int edt_get_mezz_chan_bitpath ( EdtDev edt_p,
char *  bitpath,
int  size,
int  channel 
)

Obtains pathname to the currently loaded mezzanine bitfile from the driver.

The edt_bitload sets this string in the driver when a mezzanine bitfile is successfully loaded.

Parameters:
edt_p pointer to edt device structure returned by edt_open or edt_open_channel
bitpath address of a character buffer of at least 128 bytes
size number of bytes in the above character buffer
Returns:
0 on success, -1 on failure.
See also:
edt_get_bitpath

Definition at line 7977 of file libedt.c.

void edt_get_osn ( EdtDev edt_p,
char *  osn 
)

Retrieve the board OEM's embedded information string from the PCI xilinx information header.

Some OEMs embed part number or other information about the board in an unused area of the Xilinx FPGA PROM. This information is preserved across reloads (via pciload, hubload, etc.) unless options to overwrite are invoked in one of those utilities. This subroutine retrieves the OEM serial number portion of that information.

Note:
Information embedding was implemented in Sept. 2004; boards shipped before that time will yield a string with all NULLS unless the board's FPGA has since been updated with the embedded information.
Parameters:
edt_p pointer to edt device structure returned by edt_open
osn the OEM's part number, if present.
See also:
edt_get_sns, edt_get_esn, edt_fmt_pn

Definition at line 2422 of file edt_xilinx.c.

void edt_get_sns ( EdtDev edt_p,
char *  esn,
char *  osn 
)

Retrieve the board's manufacturer and OEM embedded information strings strings from the PCI xilinx information header.

Certain information about the board, including manufacturer's part number, serial number, clock speed, Xilinx FPGA, and options, is embedded in an unused area of the Xilinx FPGA PROM at the time of manufacture. This information is preserved across reloads (via pciload, hubload, etc.) unless options overwrite are invoked in the utility. This subroutine retrieves EDT and OEM (if present) information. The data is an ASCII string, with the following colon-separated fields:

serial number:part number:clock speed:options:revision:interface xilinx:

(To see the information string, run pciload with no arguments.)

Note:
Information embedding was implemented in Sept. 2004; boards shipped before that time will yield a string with all NULLS unless the board's FPGA has since been updated with the embedded information.
Parameters:
edt_p pointer to edt device structure returned by edt_open
esn the EDT part number without dashes.
osn the OEM's part number, if present.
See also:
edt_get_esn, edt_get_osn, edt_parse_esn, edt_fmt_pn

Definition at line 2539 of file edt_xilinx.c.

void edt_msleep ( int  msecs  ) 

Causes the process to sleep for the specified number of milliseconds.

Parameters:
msecs The number of milliseconds for the process to sleep.
Returns:
0 on success, -1 on failure. If an error occurs, call edt_perror to get the system error message.

Definition at line 4848 of file libedt.c.

DIRHANDLE edt_opendir ( char *  dirname  ) 

Cross platform function to open a directory for reading.

Parameters:
dirname the name of the directory to open.

Definition at line 8691 of file libedt.c.

int edt_parse_esn ( char *  str,
Edt_embinfo ei 
)

Parse the board's embedded information string.

During manufacturing programming, EDT embeds selected information is embedded into an unused area of the Xilinx FPGA PROM. This information is preserved across reloads (via pciload, hubload, etc.) unless options to overwrite are invoked in one of those utilities. This subroutine takes as an argument the full information string, as retrieved from edt_get_esn, edt_get_osn or edt_get_sns, into the fields indicated by the Edt_embinfo structure.

(To see the information string, run pciload with no arguments.)

Note:
Information embedding was implemented in Sept. 2004; boards shipped before that time will yield a string with all NULLS unless the board's FPGA has since been updated with the embedded information.
Parameters:
str embedded inforamtion string, with information from one of the serial number retrieval subroutines (edt_get_esn, etc.)
ei Edt_embinfo structure into which the the parsed information will be put
See also:
edt_get_esn, edt_fmt_pn

Definition at line 2461 of file edt_xilinx.c.

int edt_parse_unit ( const char *  str,
char *  dev,
const char *  default_dev 
)

Parses an EDT device name string.

Fills in the name of the device, with the default_device if specified, or a default determined by the package, and returns a unit number. Designed to facilitate a flexible device/unit command line argument scheme for application programs. Most EDT example/utility programs use this susubroutine to allow users to specify either a unit number alone or a device/unit number concatenation.

For example, if you are using a PCI CD, then either xtest -u 0 or xtest -u pcd0 could both be used, since xtest sends the argument to edt_parse_unit, and the subroutine parses the string and returns the device and unit number separately.

Parameters:
str device name string from command line. Should be either a unit number ("0" - "8") or device/unit concantenation ("pcd0," "pcd1," etc.)
dev array to hold the device device string; filled in by ths routine.
default_dev device name to use if none is given in the str argument. If NULL, will be filled in by the default device for the package in use. For example, if the code base is from a PCI CD package, the default_dev will be set to "pcd."
Returns:
Unit number, or -1 on error. The first device is unit 0.
See also:
example/utility programs xtest.c, initcam.c, simple_take.c.

Definition at line 6732 of file libedt.c.

int edt_parse_unit_channel ( const char *  instr,
char *  dev,
const char *  default_dev,
int *  channel_ptr 
)

parse -u argument returning the device and unit.

Returns:
unit or -1 on failure (as well as device in dev, and channel in channel_ptr).
Parameters:
instr The input string. The argument of the -u option (like "0" or "pcd0" for example).
dev An array large enough to hold the device name, which is set by this function.
default_dev The default device to copy to dev if instr doesn't specify device. If NULL, EDT_INTERFACE will be used (which is "pcd" for pcd boards, "pdv" for dv boards, etc.).
channel_ptr The channel specified in instr, or 0 (set by this function). If channel_ptr is NULL or -1, it is ignored and unchanged.

Definition at line 6601 of file libedt.c.

void edt_perror ( char *  errstr  ) 

Formats and prints a system error.

Parameters:
errstr Error string to include in printed error output.
See also:
edt_errno for an example

Definition at line 2755 of file libedt.c.

int edt_readdir ( DIRHANDLE  dirphandle,
char *  name 
)

Cross platform function to read the next directory entry.

Parameters:
dirphandle a handle for the directory, returned by edt_opendir
name a pointer to a string into which the name of the next file in the directory will be written. The string must be allocated by the caller to at least 256 bytes.

Definition at line 8697 of file libedt.c.

int edt_set_bitpath ( EdtDev edt_p,
const char *  bitpath 
)

Sets pathname to the currently loaded user interface bitfile in the driver.

Parameters:
edt_p pointer to edt device structure returned by edt_open or edt_open_channel
bitpath address of a character buffer of at most 128 bytes
Returns:
0 on success, -1 on failure.
See also:
edt_get_bitpath, edt_set_mezz_bitpath

Definition at line 8115 of file libedt.c.

int edt_set_mezz_bitpath ( EdtDev edt_p,
const char *  bitpath 
)

Sets pathname to the currently loaded mezzanine bitfile in the driver.

Parameters:
edt_p pointer to edt device structure returned by edt_open or edt_open_channel
bitpath address of a character buffer of at most 128 bytes
Returns:
0 on success, -1 on failure.
See also:
edt_get_mezz_bitpath, edt_set_bitpath

Definition at line 8032 of file libedt.c.

int edt_set_mezz_chan_bitpath ( EdtDev edt_p,
const char *  bitpath,
int  channel 
)

Sets pathname to the currently loaded mezzanine bitfile in the driver.

Parameters:
edt_p pointer to edt device structure returned by edt_open or edt_open_channel
bitpath address of a character buffer of at most 128 bytes
channel which of two channels (0 or 1) this refers to
Returns:
0 on success, -1 on failure.
See also:
edt_get_mezz_bitpath, edt_set_bitpath

Definition at line 7908 of file libedt.c.

int edt_system ( const char *  cmdstr  ) 

Performs a UNIX-like system() call which passes the argument strings to a shell or command interpreter, then returns the exit status of the command or the shell so that errors can be detected.

In WINDOWS spawnl() must be used instead of system() for this purpose.

Definition at line 7740 of file libedt.c.

double edt_timestamp ( void   ) 

Gets the seconds + fractional seconds since the Epoch, OS independent.

Accuracy is OS dependent.

Returns:
the timestamp in seconds; a double value with tenths/hundredths/etc on the right of the decimal point.

Definition at line 4742 of file libedt.c.

void edt_usleep ( int  usecs  ) 

causes process to sleep for specified number of microseconds

Parameters:
usecs,: number of microseconds for process to sleep
Returns:
0 on success; -1 on error

Definition at line 4904 of file libedt.c.


Generated on Mon May 12 16:39:08 2008 by  doxygen 1.5.1