Moxa Technologies UC-7420/7410 User Manual

Page 82

Advertising
background image

UC-7420/7410 User’s Manual

Programmer’s Guide

5-6

int swtd_disable(int fd)

Description:

Disable the application to ack sWatchDog. And the kernel will be auto ack it. User does
not to do it at periodic.

Input :

int fd - the file handle from swtd_open() return value.

Output:

OK will be zero. The other has some error, to get error code from errno.

int swtd_get(int fd, int *mode, unsigned long *time)

Description:

Get current setting values.

mode –

1 for user application enable sWatchDog: need to do ack.

0 for user application disable sWatchdog: does not need to do ack.

time – The time period to ack sWatchDog.

Input :

int fd - the file handle from swtd_open() return value.

int *mode - the function will be return the status enable or disable user application
need to do ack.

unsigned long *time – the function will return the current time period.

Output:

OK will be zero.

The other has some error, to get error code from errno().

int swtd_ack(int fd)

Description:

Acknowledge sWatchDog. When the user application enable sWatchDog. It need to call
this function periodically with user predefined time in the application program.

Input :

int fd - the file handle from swtd_open() return value.

Output:

OK will be zero.

The other has some error, to get error code from errno().

Advertising