Definition in file edtinc.h.
#include "edtdef.h"
#include "edt_utils.h"
#include "pdv_dependent.h"
#include "edtreg.h"
#include "libedt.h"
#include "p16d.h"
#include "edt_ocm.h"
#include <time.h>
#include "edt_error.h"
#include "libpdv.h"
#include "libdvu.h"
#include "initcam.h"
#include "edt_bitload.h"
#include "libedt_timing.h"
#include "pdv_irig.h"
#include "edt_vco.h"
#include "edt_ocx.h"
#include "edt_optstring.h"
Go to the source code of this file.
Typedefs | |
typedef PdvDependent | Dependent |
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_alloc_aligned (int size) |
void | edt_back_to_fwd (char *str) |
back_to_fwd: for use by edt_correct_slashes | |
void | edt_close_datafile (HANDLE f) |
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 | |
int64_t | edt_disk_free (const char *path) |
Return the size in bytes of available free space for file systen containing directory name. | |
double | edt_dtime (void) |
Return the time in seconds since the last call to edt_dtime. | |
double | edt_elapsed (u_char reset) |
Like edt_dtime, but doesn't reset start time unless requested. | |
uint64_t | edt_file_seek (HANDLE f, uint64_t pos) |
void | edt_free (uchar_t *ptr) |
Convenience routine to free the memory allocated with edt_alloc. | |
void | edt_free_aligned (void *p) |
void | edt_fwd_to_back (char *str) |
fwd_to_back: for use by edt_correct_slashes | |
int | edt_get_datestr (char *s, int maxlen) |
uint64_t | edt_get_file_position (HANDLE f) |
uint64_t | edt_get_file_size (HANDLE f) |
void | edt_msleep (int msecs) |
Causes the process to sleep for the specified number of milliseconds. | |
HANDLE | edt_open_datafile (const char *path, const char *name, u_char writing, u_char direct, u_char truncate) |
DIRHANDLE | edt_opendir (const char *dirname) |
int | edt_read_datafile (HANDLE f, void *p, int bufsize) |
int | edt_readdir (DIRHANDLE h, char *name) |
Cross platform function to read the next directory entry. | |
double | edt_timestamp (void) |
Gets the seconds + fractional seconds since the Epoch, OS independent. | |
void | edt_usec_busywait (u_int usec) |
void | edt_usleep (int usecs) |
causes process to sleep for specified number of microseconds | |
u_char | edt_wait_for_console_input (char *line, const int input_timeout, const int maxlen) |
int | edt_write_datafile (HANDLE f, void *p, int bufsize) |
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.
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. |
if(edt_access("file.ras", F_OK)) printf("Warning: overwriting file %s\n", "file.ras");
Definition at line 452 of file edt_os_nt.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.
size,: | number of bytes of memory to allocate. |
Definition at line 337 of file edt_os_nt.c.
double edt_dtime | ( | void | ) |
Return the time in seconds since the last call to edt_dtime.
Each time edt_dtime is called, it returns the time delta since the last time it was called. Therefore the first time edt_dtime is called in a process the delta may be meaningless. Time is in seconds and fractions of a second.
This call uses system time, which is system dependent and may be too coarse for some applications. For more accurate time stamping consider the IRIG option and an external IRIG timestamp source, available with some EDT boards.
Definition at line 23 of file edt_os_nt.c.
double edt_elapsed | ( | u_char | reset | ) |
Like edt_dtime, but doesn't reset start time unless requested.
reset | true if start time should be reset. |
Definition at line 371 of file edt_os_nt.c.
void edt_free | ( | uchar_t * | ptr | ) |
Convenience routine to free the memory allocated with edt_alloc.
ptr | Address of memory buffer to free. |
Definition at line 356 of file edt_os_nt.c.
void edt_msleep | ( | int | msecs | ) |
Causes the process to sleep for the specified number of milliseconds.
msecs | The number of milliseconds for the process to sleep. |
Definition at line 78 of file edt_os_nt.c.
int edt_readdir | ( | DIRHANDLE | dirphandle, | |
char * | name | |||
) |
Cross platform function to read the next directory entry.
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 529 of file edt_os_lnx.c.
double edt_timestamp | ( | void | ) |
Gets the seconds + fractional seconds since the Epoch, OS independent.
Uses system time; accuracy is OS dependent.
Definition at line 50 of file edt_os_nt.c.
void edt_usleep | ( | int | usecs | ) |
causes process to sleep for specified number of microseconds
usecs,: | number of microseconds for process to sleep |
Definition at line 94 of file edt_os_nt.c.