Moxa V2416-W7E [61/88] V2416 linux user s manual programming guide

Moxa V2416-T-XPE [61/88] V2416 linux user s manual programming guide
V2416 Linux User's Manual Programming Guide
4-7
Function int swtd_ack(int fd)
Description Acknowledge software watchdog.
When software watchdog is enabled, application should execute swtd_ack() periodically
within user predefined time.
Input <fd>
the file handle from swtd_open() return value.
Output None
Return On success, 0 is returned. Otherwise, an error number is return
Function int swtd_close(int fd)
Description Close the file handle.
Input <fd> the file handle from swtd_open() return value.
Output None
Return On success, 0 is returned. Otherwise, an error number is return
Special Note
When you kill the application with -9” or kill without optionor Ctrl+cthe kernel will change to auto ack the
software watchdog.
When your application enables the software watchdog and does not ack, your application may have a logical
error, or your application has generated a core dump. The kernel will not change to auto ack. This can cause
your system to reboot again and again.
Examples
The example file watchdog.c and Makefile are put in the folder \example\swatchdog\ on the CD.
Hot-swapping Hard Disk
A development library is provided to help you develop your applications. All of the code can be found at
/example/hotswap in the CD
Define Documentation
#define mxhtsp_close(fd) close(fd)
Description Close the hotswap devices.
Parameters fd: the open port
Returns None
Function Documentation
int mxhtsp_check_partition_usage (const char * partition_name)
Description Get what percentage of a partition is in use.
Parameters partition_name: the name of the partition being checked. In linux, it should be
/media/diskxpx
Returns None

Содержание

Похожие устройства

Скачать