Introduction

Network Enabler Control Interface (NECI) is a tool kit for Network Enabler management. To use this library, please follow the procedure:

1. dsc_EnumSearch à get DS_INFO, include broadcast and specify ip address.

2. DS_INFO à dsc_Attach à get DS_HANDLE

3. DS_HANDLE à dsc_GetXXX to retrieve settings.

4. DS_HANDLE & password à dsc_Login à you can use dsc_SetXXX function to set new settings
 à dsc_SaveAndRestart à go to 2
 à or dsc_Logout to ignore change.

5. DS_HANDLE à dsc_Detach à go to 2.

¡@

1-30-2003 11:49

¡@

¡@


dsc_EnumSearch

Get a Network Enabler List on network. Each List contain Network Enabler basic information; you can use these basic information to get more control to Network Enabler.

C/C++
int dsc_EnumSearch(DWORD server_ip, WNDENUMSEARCHPROC lpenumsearchproc)

Visual Basic
(Available soon)

Delphi
(Available soon)

Arguments

server_ip

[in] Network Enabler IP address, or INADDR_BROADCAST for broadcast searching. If the Network Enabler is in the different subnet, user must fill this argument with Network Enabler IP address. Broadcast searching is only available for LAN.

lpenumsearchproc

[out] Pointer to an application-defined callback function. For more information, see EnumSearchProc.

Return Values

Status | Value
Succeed. | DSC_OK
Fail. DSC_SOCKET
DSC_TOUT (Only for server_ip is not INADDR_BROADCAST case)
DSC_USER_BREAK

Remarks

This function uses UDP package to communicate to Network Enabler UDP port 4800. Please make sure this UDP port can be used between Host and Network Enabler before using this function.

¡@


dsc_Attach

Attach to the specified Network Enabler and get the handle for retrieving the Network Enabler detail information. Before using this function, user must call dsc_EnumSearch to get DS_INFO structure.

C/C++
int dsc_Attach(PDS_INFO info, DS_HANDLE *dshandle)

Visual Basic
(Available soon)

Delphi
(Available soon)

Arguments

info

[in] Pointer to the DS_INFO structure. User must get this structure from dsc_EnumSearch function.

dshandle

[out] Pointer to the DS_HANDLE to receive the handle of the Network Enabler. This handle is used for other library function.

Return Values

Status | Value
Succeed. | DSC_OK
Fail. DSC_MAX_LIMIT
DSC_PARAM

Remarks


dsc_Detach

Detach the specified Network Enabler from the library. User can't access the Network Enabler with this handle any more.

C/C++
int dsc_Detach(DS_HANDLE dshandle)

Visual Basic
(Available soon)

Delphi
(Available soon)

Arguments

dshandle

[in] Handle identifying the Network Enabler returned from dsc_Attach.

Return Values

Status | Value
Succeed. | DSC_OK
Fail. DSC_PARAM
DSC_NOT_LOGIN

Remarks


dsc_Login

Login Network Enabler console. Before using some dsc_SetXXX function, user must call this function to get right to change the Network Enabler setting.

C/C++
int dsc_Login(DS_HANDLE dshandle, char *password)

Visual Basic
(Available soon)

Delphi
(Available soon)

Arguments

dshandle

[in] Handle identifying the Network Enabler. This handle must be get from dsc_Attach.

password

[in] Network Enabler password, specified by null terminated string. Ex: "password". If no password protected, set this argument to empty string (not NULL).

Return Values

Status | Value
Succeed. | DSC_OK
Fail. DSC_SOCKET
DSC_TOUT
DSC_PARAM
DSC_FAIL

Remarks

This function uses TCP package to communicate to Network Enabler TCP port 4900. Please make sure this TCP port can be used between Host and Network Enabler before using this function.


dsc_Logout

Logout Network Enabler console. User can't use dsc_SetXXX function with this handle any more.

C/C++
int dsc_Logout(DS_HANDLE dshandle)

Visual Basic
(Available soon)

Delphi
(Available soon)

Arguments

dshandle

[in] Handle identifying the Network Enabler. This handle must be get from dsc_Attach.

Return Values

Status | Value
Succeed. | DSC_OK
Fail. DSC_PARAM
 DSC_NOT_LOGIN

Remarks

This function uses TCP package to communicate to Network Enabler TCP port 4900. Please make sure this TCP port can be used between Host and Network Enabler before using this function.


EnumProc

EnumSearchProc

The EnumSearchProc function is an application-defined callback function used with the dsc_EnumSearch function. It receives DS_INFO structure. The WNDENUMSEARCHPROC type defines a pointer to this callback function. EnumSearchProc is a placeholder for the application-defined function name.

C/C++
int CALLBACK EnumSearchProc(PDS_INFO dsinfo)

Visual Basic
(Available soon)

Delphi
(Available soon)

Arguments

dsinfo

[out] Pointer to a DS_INFO structure. NULL pointer means no new Network Enabler found and timeout happened. User can not record this structure pointer. This pointer will be invalid after the dsc_EnumSearch returned, so user must copy the structure content to local variable.

Return Values

To continue enumeration, the callback function must return TRUE; to stop enumeration, it must return FALSE

Enumeration | Value
Continue | TRUE
Stop | FALSE

Remarks

This callback will be called if any new Network Enabler found or timeout happened before dsc_EnumSearch returned.


dsc_GetKernelInfo

Get the Network Enabler kernel/firmware information.

C/C++
int dsc_GetKernelInfo(DS_HANDLE dshandle, PKERNELINFO info)

Visual Basic
(Available soon)

Delphi
(Available soon)

Arguments

dshandle

[in] Handle identifying the Network Enabler returned from dsc_Attach.

info

[out] Pointer to a KERNELINFO structure to kernel/firmware information.

typedef struct _KERNELINFO {
DWORD firm_version;
DWORD bios_version;
DWORD serial_no;
DWORD flag;
} KERNELINFO , *PKERNELINFO;

firm_version

Firmware version.

bios_version

BIOS version.

serial_no

Serial number.

flag

Kernel firmware flag. 0x01 for password enabled.

Return Values

Status | Value
Succeed. | DSC_OK
Fail. DSC_SOCKET
DSC_TOUT
DSC_USER_BREAK
DSC_PARAM
DSC_FAIL

Remarks

This function uses UDP package to communicate to Network Enabler UDP port 4800. Please make sure this UDP port can be used between Host and Network Enabler before using this function.


dsc_GetIPFilter

Get the IP filter.

C/C++
int dsc_GetIPFilter(DS_HANDLE dshandle, int idx, int *enable_filter, PACCESSIPINFO info)

Visual Basic
(Available soon)

Delphi
(Available soon)

Arguments

dshandle

[in] Handle identifying the Network Enabler returned from dsc_Attach.

idx

[in] index number. 1 for 1st index of IP filter, 2 for 2nd index of IP filter, and so on. 0 for all index, and info (PACCESSIPINFO) size must match the index number.

enable_filter

[out] 0 for this IP filter disabled. 1 for this IP filter enabled.

info

[out] Pointer to ACCESSIPINFO to receive IP filter information.

typedef struct _ACCESSIPINFO{
DWORD mode;
DWORD ip_addr;
DWORD mask;
}ACCESSIPINFO, *PACCESSIPINFO;

mode

0 for this index of IP filter disabled. 1 for this index of IP filter enabled.

ip_addr

IP filter address.

mask

Netmask.

Return Values

Status | Value
Succeed. | DSC_OK
Fail. DSC_SOCKET
DSC_TOUT
DSC_USER_BREAK
DSC_PARAM
DSC_FAIL

Remarks

This function uses UDP package to communicate to Network Enabler UDP port 4800. Please make sure this UDP port can be used between Host and Network Enabler before using this function.


dsc_SetIPFilter

Set IP filter. User must call dsc_SaveAndRestart to make the change active.

C/C++
int dsc_SetIPFilter(DS_HANDLE dshandle, int enable_ipfilter, PACCESSIPINFO info)

Visual Basic
(Available soon)

Delphi
(Available soon)

Arguments

dshandle

[in] Handle identifying the Network Enabler returned from dsc_Attach.

enable_ipfilter

[in] 0 for this IP filter disabled. 1 for this IP filter enabled.

info

[in] New IP filter information.

typedef struct _ACCESSIPINFO{
DWORD mode;
DWORD ip_addr;
DWORD mask;
}ACCESSIPINFO, *PACCESSIPINFO;

mode

0 for this IP filter disabled. 1 for this IP filter enabled.

ip_addr

IP filter address.

mask

New netmask.

Password Protected

This function is password protected. Please call dsc_Login before using this function.

Return Values

Status | Value
Succeed. | DSC_OK
Fail. DSC_SOCKET
DSC_TOUT
DSC_USER_BREAK
DSC_PARAM
DSC_FAIL
DSC_NOT_LOGIN

Remarks

This function uses TCP package to communicate to Network Enabler TCP port 4900. Please make sure this TCP port can be used between Host and Network Enabler before using this function.


dsc_GetConsole

Get console setting.

C/C++
int dsc_GetConsole(DS_HANDLE dshandle, int *settings)

Visual Basic
(Available soon)

Delphi
(Available soon)

Arguments

dshandle

[in] Handle identifying the Network Enabler. This handle must be get from dsc_Attach.

settings

[out] Pointer to integer to receive the console setting.

Data | Define | Value | Operation
Web console | CON_WEB | 1h, bit 0 | 1 for on, 0 for off
Telnet console | CON_TELNET | 2h, bit 1 | 1 for on, 0 for off

Return Values

Status | Value
Succeed. | DSC_OK
Fail. DSC_SOCKET
DSC_TOUT
DSC_USER_BREAK
DSC_PARAM
DSC_FAIL

Remarks

This function uses UDP package to communicate to Network Enabler UDP port 4800. Please make sure this UDP port can be used between Host and Network Enabler before using this function.


dsc_SetConsole

Set console mode. User must call dsc_SaveAndRestart to make the change active.

C/C++
int dsc_SetConsole(DS_HANDLE dshandle, int settings)

Visual Basic
(Available soon)

Delphi
(Available soon)

Arguments

dshandle

[in] Handle identifying the Network Enabler returned from dsc_Attach.

settings

[in] Enable/disable web and telnet console.

Data | Define | Value | Operation
Web console | CON_WEB | 1h, bit 0 | 1 for on, 0 for off
Telnet console | CON_TELNET | 2h, bit 1 | 1 for on, 0 for off

Password Protected

This function is password protected. Please call dsc_Login before using this function.

Return Values

Status | Value
Succeed. | DSC_OK
Fail. DSC_SOCKET
DSC_TOUT
DSC_USER_BREAK
DSC_PARAM
DSC_FAIL
DSC_NOT_LOGIN

Remarks

This function uses TCP package to communicate to Network Enabler TCP port 4900. Please make sure this TCP port can be used between Host and Network Enabler before using this function.


dsc_SetPassword

Modify the Network Enabler console password. User must call dsc_SaveAndRestart to make the change active.

C/C++
int dsc_SetPassword(DS_HANDLE dshandle, char *password)

Visual Basic
(Available soon)

Delphi
(Available soon)

Arguments

dshandle

[in] Handle identifying the Network Enabler returned from dsc_Attach.

password

[in] New password, specified by null terminated string. The maximum length is 16 including null terminated character. If clear password protected, set this argument to empty string (not NULL).

Password Protected

This function is password protected. Please call dsc_Login before using this function.

Return Values

Status | Value
Succeed. | DSC_OK
Fail. DSC_SOCKET
DSC_TOUT
DSC_USER_BREAK
DSC_FAIL
DSC_NOT_LOGIN

Remarks

This function uses TCP package to communicate to Network Enabler TCP port 4900. Please make sure this TCP port can be used between Host and Network Enabler before using this function.


dsc_GetName

Get Network Enabler server name.

C/C++
int dsc_GetName(DS_HANDLE dshandle, char *name)

Visual Basic
(Available soon)

Delphi
(Available soon)

Arguments

dshandle

[in] Handle identifying the Network Enabler returned from dsc_Attach.

name

[out] Pointer to string to receive server name, null terminated string. Maximum length is 40, null terminated char included.

Return Values

Status | Value
Succeed. | DSC_OK
Fail. DSC_SOCKET
DSC_TOUT
DSC_USER_BREAK
DSC_PARAM
DSC_FAIL

Remarks

This function uses UDP package to communicate to Network Enabler UDP port 4800. Please make sure this UDP port can be used between Host and Network Enabler before using this function.


dsc_SetName

Set Network Enabler server name. User must call dsc_SaveAndRestart to make the change active.

C/C++
int dsc_SetName(DS_HANDLE dshandle, char * name)

Visual Basic
(Available soon)

Delphi
(Available soon)

Arguments

dshandle

[in] Handle identifying the Network Enabler returned from dsc_Attach.

name

[in] New server name, null terminated string. Maximum length is 40, null terminated char included.

Password Protected

This function is password protected. Please call dsc_Login before using this function.

Return Values

Status | Value
Succeed. | DSC_OK
Fail. DSC_SOCKET
DSC_TOUT
DSC_USER_BREAK
DSC_PARAM
DSC_FAIL
DSC_NOT_LOGIN

Remarks

This function uses TCP package to communicate to Network Enabler TCP port 4900. Please make sure this TCP port can be used between Host and Network Enabler before using this function.


dsc_Locate

Try to locate the specified Network Enabler. When you start to locate the specified Network Enabler, Network Enabler will start to response (blinking the ready light, turn on the LCM or turn on the beep) to locate the position. Please refer the manual to check the response.

C/C++
int dsc_Locate(DS_HANDLE ds_handle, int sw)

Visual Basic
(Available soon)

Delphi
(Available soon)

Arguments

dshandle

[in] Handle identifying the Network Enabler returned from dsc_Attach.

sw

[in] 1 for start, 0 for stop.

Return Values

Status | Value
Succeed. | DSC_OK
Fail. DSC_SOCKET
DSC_TOUT
DSC_USER_BREAK
DSC_PARAM
DSC_FAIL

Remarks

This function uses UDP package to communicate to Network Enabler UDP port 4800. Please make sure this UDP port can be used between Host and Network Enabler before using this function.


dsc_SaveAndRestart

Save the new settings and restart the Network Enabler. After calling this function, Network Enabler will be restared. User can not use dsc_SetXXX function any more with the dshandle and must call dsc_Logout immediately. To use dsc_SetXXX function again, user must call dsc_Login again.
This function will cause the Network Enabler to be rebooted. Before contacting Network Enabler again, please wait 3~5 seconds to make sure the Network Enabler is ready.

C/C++
int dsc_SaveAndRestart(DS_HANDLE dshandle)

Visual Basic
(Available soon)

Delphi
(Available soon)

Arguments

dshandle

[in] Handle identifying the Network Enabler. This handle must be get from dsc_Attach.

Password Protected

This function is password protected. Please call dsc_Login before using this function.

Return Values

Status | Value
Succeed. | DSC_OK
Fail. DSC_SOCKET
DSC_TOUT
DSC_USER_BREAK
DSC_PARAM
DSC_FAIL
DSC_NOT_LOGIN

Remarks

This function uses TCP package to communicate to Network Enabler TCP port 4900. Please make sure this TCP port can be used between Host and Network Enabler before using this function.


dsc_GetTime

Get system time.

C/C++
int dsc_GetTime(DS_HANDLE dshandle, PSYSTEMTIME systm)

Visual Basic
(Available soon)

Delphi
(Available soon)

Arguments

dshandle

[in] Handle identifying the Network Enabler returned from dsc_Attach.

systm

[out] Pointer to a SYSTEMTIME structure to receive system time. (Please reference to Microsoft MSDN)

typedef struct _SYSTEMTIME {
WORD wYear;
WORD wMonth;
WORD wDayOfWeek;
WORD wDay;
WORD wHour;
WORD wMinute;
WORD wSecond;
WORD wMilliseconds;
} SYSTEMTIME, *PSYSTEMTIME

Return Values

Status | Value
Succeed. | DSC_OK
Fail. DSC_SOCKET
DSC_TOUT
DSC_USER_BREAK
DSC_PARAM
DSC_FAIL

Remarks

This function uses UDP package to communicate to Network Enabler UDP port 4800. Please make sure this UDP port can be used between Host and Network Enabler before using this function.


dsc_SetTime

Set system time. User must call dsc_SaveAndRestart to make the change active.

C/C++
int dsc_SetTime(DS_HANDLE dshandle, PSYSTEMTIME systm)

Visual Basic
(Available soon)

Delphi
(Available soon)

Arguments

dshandle

[in] Handle identifying the Network Enabler returned from dsc_Attach.

info

[in] New system time. (Please reference to Microsoft MSDN)

typedef struct _SYSTEMTIME {
WORD wYear;
WORD wMonth;
WORD wDayOfWeek;
WORD wDay;
WORD wHour;
WORD wMinute;
WORD wSecond;
WORD wMilliseconds;
} SYSTEMTIME, *PSYSTEMTIME

Password Protected

This function is password protected. Please call dsc_Login before using this function.

Return Values

Status | Value
Succeed. | DSC_OK
Fail. DSC_SOCKET
DSC_TOUT
DSC_USER_BREAK
DSC_PARAM
DSC_FAIL
DSC_NOT_LOGIN

Remarks

This function uses TCP package to communicate to Network Enabler TCP port 4900. Please make sure this TCP port can be used between Host and Network Enabler before using this function.


dsc_GetTimeServer

Get time server.

C/C++
int dsc_GetTimeServer(DS_HANDLE dshandle, char *tmsvr)

Visual Basic
(Available soon)

Delphi
(Available soon)

Arguments

dshandle

[in] Handle identifying the Network Enabler returned from dsc_Attach.

tmsvr

[out] Pointer to string to receive time server.

Return Values

Status | Value
Succeed. | DSC_OK
Fail. DSC_SOCKET
DSC_TOUT
DSC_USER_BREAK
DSC_PARAM
DSC_FAIL

Remarks

This function uses UDP package to communicate to Network Enabler UDP port 4800. Please make sure this UDP port can be used between Host and Network Enabler before using this function.


dsc_SetTimeServer

Set time server. User must call dsc_SaveAndRestart to make the change active.

C/C++
int dsc_SetTimeServer(DS_HANDLE dshandle, char *tmsvr)

Visual Basic
(Available soon)

Delphi
(Available soon)

Arguments

dshandle

[in] Handle identifying the Network Enabler returned from dsc_Attach.

tmsvr

[in] New time server.

Password Protected

This function is password protected. Please call dsc_Login before using this function.

Return Values

Status | Value
Succeed. | DSC_OK
Fail. DSC_SOCKET
DSC_TOUT
DSC_USER_BREAK
DSC_PARAM
DSC_FAIL
DSC_NOT_LOGIN

Remarks

This function uses TCP package to communicate to Network Enabler TCP port 4900. Please make sure this TCP port can be used between Host and Network Enabler before using this function.


dsc_GetTimeZone

Get the current time zone.

C/C++
int dsc_GetTimeZone(DS_HANDLE dshandle, LONG *time_zone, DWORD *time_zone_idx)

Visual Basic
(Available soon)

Delphi
(Available soon)

Arguments

dshandle

[in] Handle identifying the Network Enabler returned from dsc_Attach.

time_zone, time_zone_idx

time_zone_idx | time_zone | Status
1 | -43200 | (GMT-12:00)Eniwetok, Kwajalein
2 | -39600 | (GMT-11:00)Midway Island, Samoa
3 | -36000 | (GMT-10:00)Hawaii
4 | -32400 | (GMT-09:00)Alaska
5 | -28800 | (GMT-08:00)Pacific Time (US & Canada); Tijuana
6 | -25200 | (GMT-07:00)Arizona
7 | -25200 | (GMT-07:00)Mountain Time (US & Canada)
8 | -21600 | (GMT-06:00)Central Time (US & Canada)
9 | -21600 | (GMT-06:00)Mexico City, Tegucigalpa
10 | -21600 | (GMT-06:00)Saskatchewan
11 | -18000 | (GMT-05:00)Bogota, Lima, Quito
12 | -18000 | (GMT-05:00)Eastern Time (US & Canada)
13 | -18000 | (GMT-05:00)Indiana (East)
14 | -14400 | (GMT-04:00)Atlantic Time (Canada)
15 | -14400 | (GMT-04:00)Caracas, La Paz
16 | -14400 | (GMT-04:00)Santiago
17 | -12600 | (GMT-03:30)Newfoundland
18 | -10800 | (GMT-03:00)Brasilia
19 | -10800 | (GMT-03:00)Buenos Aires, Georgetown
20 | -7200 | (GMT-02:00)Mid-Atlantic
21 | -3600 | (GMT-01:00)Azores, Cape Verde Is.
22 | 0 | (GMT)Casablanca, Monrovia
23 | 0 | (GMT)Greenwich Mean Time: Dublin, Edinburgh, Lisbon, London
24 | 3600 | (GMT+01:00)Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna
25 | 3600 | (GMT+01:00)Belgrade, Bratislava, Budapest, Ljubljana, Pragu
26 | 3600 | (GMT+01:00)Brussels, Copenhagen, Madrid, Paris, Vilnius
27 | 3600 | (GMT+01:00)Sarajevo, Skopje, Sofija, Warsaw, Zagreb
28 | 7200 | (GMT+02:00)Athens, Istanbul, Minsk
29 | 7200 | (GMT+02:00)Buchares
30 | 7200 | (GMT+02:00)Cairo
31 | 7200 | (GMT+02:00)Harare, Pretoria
32 | 7200 | (GMT+02:00)Helsinki, Riga, Tallinn
33 | 7200 | (GMT+02:00)Jerusalem
34 | 10800 | (GMT+03:00)Baghdad, Kuwait, Riyadh
35 | 10800 | (GMT+03:00)Moscow, St. Petersburg, Volgograd
36 | 10800 | (GMT+03:00)Mairobi
37 | 12600 | (GMT+03:30)Tehran
38 | 14400 | (GMT+04:00)Abu Dhabi, Muscat
39 | 14400 | (GMT+04:00)Baku, Tbilisi
40 | 16200 | (GMT+04:30)Kabul
41 | 18000 | (GMT+05:00)Ekaterinburg
42 | 18000 | (GMT+05:00)Islamabad, Karachi, Tashkent
43 | 19800 | (GMT+05:30)Bombay, Calcutta, Madras, New Delhi
44 | 21600 | (GMT+06:00)Astana, Almaty, Dhaka
45 | 21600 | (GMT+06:00)Colombo
46 | 25200 | (GMT+07:00)Bangkok, Hanoi, Jakarta
47 | 28800 | (GMT+08:00)Beijing, Chongqing, Hong Kong, Urumqi
48 | 28800 | (GMT+08:00)Perth
49 | 28800 | (GMT+08:00)Singapore
50 | 28800 | (GMT+08:00)Taipei
51 | 32400 | (GMT+09:00)Osaka, Sapporo, Tokyo
52 | 32400 | (GMT+09:00)Seoul
53 | 32400 | (GMT+09:00)Yakutsk
54 | 34200 | (GMT+09:30)Adelaide
55 | 34200 | (GMT+09:30)Darwin
56 | 36000 | (GMT+10:00)Brisbane
57 | 36000 | (GMT+10:00)Canberra, Melbourne, Sydney
58 | 36000 | (GMT+10:00)Guam, Port Moresby
59 | 36000 | (GMT+10:00)Hobart
60 | 36000 | (GMT+10:00)Vladivostok
61 | 39600 | (GMT+11:00)Magadan, Solomon Is., New Caledonia
62 | 43200 | (GMT+12:00)Auckland, Wllington
63 | 43200 | (GMT+12:00)Fiji, Kamchatka, Marshall Is.

Return Values

Status | Value
Succeed. | DSC_OK
Fail. DSC_SOCKET
DSC_TOUT
DSC_USER_BREAK
DSC_PARAM
DSC_FAIL

Remarks

This function uses UDP package to communicate to Network Enabler UDP port 4800. Please make sure this UDP port can be used between Host and Network Enabler before using this function.


dsc_SetTimeZone

Set time zone. User must call dsc_SaveAndRestart to make the change active.

C/C++
int dsc_SetTimeZone(DS_HANDLE dshandle, LONG time_zone, DWORD time_zone_idx)

Visual Basic
(Available soon)

Delphi
(Available soon)

Arguments

dshandle

[in] Handle identifying the Network Enabler returned from dsc_Attach.

time_zone, time_zone_idx

time_zone_idx | time_zone | Status
1 | -43200 | (GMT-12:00)Eniwetok, Kwajalein
2 | -39600 | (GMT-11:00)Midway Island, Samoa
3 | -36000 | (GMT-10:00)Hawaii
4 | -32400 | (GMT-09:00)Alaska
5 | -28800 | (GMT-08:00)Pacific Time (US & Canada); Tijuana
6 | -25200 | (GMT-07:00)Arizona
7 | -25200 | (GMT-07:00)Mountain Time (US & Canada)
8 | -21600 | (GMT-06:00)Central Time (US & Canada)
9 | -21600 | (GMT-06:00)Mexico City, Tegucigalpa
10 | -21600 | (GMT-06:00)Saskatchewan
11 | -18000 | (GMT-05:00)Bogota, Lima, Quito
12 | -18000 | (GMT-05:00)Eastern Time (US & Canada)
13 | -18000 | (GMT-05:00)Indiana (East)
14 | -14400 | (GMT-04:00)Atlantic Time (Canada)
15 | -14400 | (GMT-04:00)Caracas, La Paz
16 | -14400 | (GMT-04:00)Santiago
17 | -12600 | (GMT-03:30)Newfoundland
18 | -10800 | (GMT-03:00)Brasilia
19 | -10800 | (GMT-03:00)Buenos Aires, Georgetown
20 | -7200 | (GMT-02:00)Mid-Atlantic
21 | -3600 | (GMT-01:00)Azores, Cape Verde Is.
22 | 0 | (GMT)Casablanca, Monrovia
23 | 0 | (GMT)Greenwich Mean Time: Dublin, Edinburgh, Lisbon, London
24 | 3600 | (GMT+01:00)Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna
25 | 3600 | (GMT+01:00)Belgrade, Bratislava, Budapest, Ljubljana, Pragu
26 | 3600 | (GMT+01:00)Brussels, Copenhagen, Madrid, Paris, Vilnius
27 | 3600 | (GMT+01:00)Sarajevo, Skopje, Sofija, Warsaw, Zagreb
28 | 7200 | (GMT+02:00)Athens, Istanbul, Minsk
29 | 7200 | (GMT+02:00)Buchares
30 | 7200 | (GMT+02:00)Cairo
31 | 7200 | (GMT+02:00)Harare, Pretoria
32 | 7200 | (GMT+02:00)Helsinki, Riga, Tallinn
33 | 7200 | (GMT+02:00)Jerusalem
34 | 10800 | (GMT+03:00)Baghdad, Kuwait, Riyadh
35 | 10800 | (GMT+03:00)Moscow, St. Petersburg, Volgograd
36 | 10800 | (GMT+03:00)Mairobi
37 | 12600 | (GMT+03:30)Tehran
38 | 14400 | (GMT+04:00)Abu Dhabi, Muscat
39 | 14400 | (GMT+04:00)Baku, Tbilisi
40 | 16200 | (GMT+04:30)Kabul
41 | 18000 | (GMT+05:00)Ekaterinburg
42 | 18000 | (GMT+05:00)Islamabad, Karachi, Tashkent
43 | 19800 | (GMT+05:30)Bombay, Calcutta, Madras, New Delhi
44 | 21600 | (GMT+06:00)Astana, Almaty, Dhaka
45 | 21600 | (GMT+06:00)Colombo
46 | 25200 | (GMT+07:00)Bangkok, Hanoi, Jakarta
47 | 28800 | (GMT+08:00)Beijing, Chongqing, Hong Kong, Urumqi
48 | 28800 | (GMT+08:00)Perth
49 | 28800 | (GMT+08:00)Singapore
50 | 28800 | (GMT+08:00)Taipei
51 | 32400 | (GMT+09:00)Osaka, Sapporo, Tokyo
52 | 32400 | (GMT+09:00)Seoul
53 | 32400 | (GMT+09:00)Yakutsk
54 | 34200 | (GMT+09:30)Adelaide
55 | 34200 | (GMT+09:30)Darwin
56 | 36000 | (GMT+10:00)Brisbane
57 | 36000 | (GMT+10:00)Canberra, Melbourne, Sydney
58 | 36000 | (GMT+10:00)Guam, Port Moresby
59 | 36000 | (GMT+10:00)Hobart
60 | 36000 | (GMT+10:00)Vladivostok
61 | 39600 | (GMT+11:00)Magadan, Solomon Is., New Caledonia
62 | 43200 | (GMT+12:00)Auckland, Wllington
63 | 43200 | (GMT+12:00)Fiji, Kamchatka, Marshall Is.

Password Protected

This function is password protected. Please call dsc_Login before using this function.

Return Values

Status | Value
Succeed. | DSC_OK
Fail. DSC_SOCKET
DSC_TOUT
DSC_USER_BREAK
DSC_PARAM
DSC_FAIL
DSC_NOT_LOGIN

Remarks

This function uses TCP package to communicate to Network Enabler TCP port 4900. Please make sure this TCP port can be used between Host and Network Enabler before using this function.

¡@

Enable DHCP or BOOTP will cause the IP address to be changed next restart.


dsc_GetOpMode

Get operate mode setting.

C/C++
int dsc_GetOpMode(DS_HANDLE dshandle, int port, int *mode)

Visual Basic
(Available soon)

Delphi
(Available soon)

Arguments

dshandle

[in] Handle identifying the Network Enabler returned from dsc_Attach.

port

[in] Port number. 1 for 1st port, 2 for 2nd port, and so on. 0 for all ports.

mode

[out] Pointer to integer to receive operate mode setting.

OP mode | Define | Value
Driver mode | DRV_MODE | 0
TCP server mode | TCPSVR_MODE | 1
TCP client mode | TCPCLI_MODE | 2
UDP mode | UDP_MODE | 3

Return Values

Status | Value
Succeed. | DSC_OK
Fail. DSC_SOCKET
DSC_TOUT
DSC_USER_BREAK
DSC_PARAM
DSC_FAIL

Remarks

This function uses UDP package to communicate to Network Enabler UDP port 4800. Please make sure this UDP port can be used between Host and Network Enabler before using this function.


dsc_SetOPMode

Set operate mode. User must call dsc_SaveAndRestart to make the change active.

C/C++
int dsc_SetOPMode(DS_HANDLE dshandle, int port, int mode)

Visual Basic
(Available soon)

Delphi
(Available soon)

Arguments

dshandle

[in] Handle identifying the Network Enabler returned from dsc_Attach.

port

[in] Port number. 1 for 1st port, 2 for 2nd port, and so on. 0 for all ports.

mode

[in] New operate mode.

OP mode | Define | Value
Driver mode | DRV_MODE | 0
TCP server mode | TCPSVR_MODE | 1
TCP client mode | TCPCLI_MODE | 2
UDP mode | UDP_MODE | 3

Password Protected

This function is password protected. Please call dsc_Login before using this function.

Return Values

Status | Value
Succeed. | DSC_OK
Fail. DSC_SOCKET
DSC_TOUT
DSC_USER_BREAK
DSC_PARAM
DSC_FAIL
DSC_NOT_LOGIN

Remarks

This function uses TCP package to communicate to Network Enabler TCP port 4900. Please make sure this TCP port can be used between Host and Network Enabler before using this function.


dsc_GetDataPacking

Get data Packing.

C/C++
int dsc_GetDataPacking(DS_HANDLE dshandle, int port, PDATAPACKINGINFO info)

Visual Basic
(Available soon)

Delphi
(Available soon)

Arguments

dshandle

[in] Handle identifying the Network Enabler returned from dsc_Attach.

port

[in] Port number. 1 for 1st port, 2 for 2nd port, and so on. 0 for all ports, and info (PDATAPACKINGINFO) size must match the port number.

info

[out] Pointer to DATAPACKINGINFO to receive data packing.

typedef struct _DATAPACKINGINFO{
BYTE enabled;
BYTE ch1;
BYTE ch2;
BYTE reserved;
DWORD force_tx;
}DATAPACKINGINFO, *PDATAPACKINGINFO;

enabled

Enabled delimiter character.

Data | Value | Operation
ch1 (first character) | 1h, bit 0 | 1 for on, 0 for off
ch2 (second character) | 2h, bit 1 | 1 for on, 0 for off

ch1

Delimiter ch1: Define a character used to separate, or mark the start and end of string.

ch2

Delimiter ch2: Define a character used to separate, or mark the start and end of string.

force_tx

Force transmit timeout (0-65535ms).

Return Values

Status | Value
Succeed. | DSC_OK
Fail. DSC_SOCKET
DSC_TOUT
DSC_USER_BREAK
DSC_PARAM
DSC_FAIL

Remarks

This function uses UDP package to communicate to Network Enabler UDP port 4800. Please make sure this UDP port can be used between Host and Network Enabler before using this function.


dsc_SetDataPacking

Set data packing parameter. User must call dsc_SaveAndRestart to make the change active.

C/C++
int dsc_SetDataPacking(DS_HANDLE dshandle, int port, PDATAPACKINGINFO info)

Visual Basic
(Available soon)

Delphi
(Available soon)

Arguments

dshandle

[in] Handle identifying the Network Enabler returned from dsc_Attach.

port

[in] Port number. 1 for 1st port, 2 for 2nd port, and so on. 0 for all ports.

info

[in] New data packing

typedef struct _DATAPACKINGINFO{
BYTE enabled;
BYTE ch1;
BYTE ch2;
BYTE reserved;
DWORD force_tx;
}DATAPACKINGINFO, *PDATAPACKINGINFO;

enabled

Enabled delimiter character.

Data | Value | Operation
ch1 (first character) | 1h, bit 0 | 1 for on, 0 for off
ch2 (second character) | 2h, bit 1 | 1 for on, 0 for off

ch1

Delimiter ch1: Define a character used to separate, or mark the start and end of string.

ch2

Delimiter ch2: Define a character used to separate, or mark the start and end of string.

force_tx

Force transmit timeout (0-65535ms).

Password Protected

This function is password protected. Please call dsc_Login before using this function.

Return Values

Status | Value
Succeed. | DSC_OK
Fail. DSC_SOCKET
DSC_TOUT
DSC_USER_BREAK
DSC_PARAM
DSC_FAIL
DSC_NOT_LOGIN

Remarks

This function uses TCP package to communicate to Network Enabler TCP port 4900. Please make sure this TCP port can be used between Host and Network Enabler before using this function.


dsc_GetInactivityTime

Get the inactivity timeout.

C/C++
int dsc_GetInactivityTime(DS_HANDLE dshandle, int port, WORD *inact_tm)

Visual Basic
(Available soon)

Delphi
(Available soon)

Arguments

dshandle

[in] Handle identifying the Network Enabler returned from dsc_Attach.

port

[in] Port number. 1 for 1st port, 2 for 2nd port, and so on. 0 for all ports, and inact_tm size must match the port number.

inact_tm

[out] Pointer to DWORD to receive the inactivity timeout.

Return Values

Status | Value
Succeed. | DSC_OK
Fail. DSC_SOCKET
DSC_TOUT
DSC_USER_BREAK
DSC_PARAM
DSC_FAIL

Remarks

This function uses UDP package to communicate to Network Enabler UDP port 4800. Please make sure this UDP port can be used between Host and Network Enabler before using this function.


dsc_SetInactivityTime

Set inactivity timeout. User must call dsc_SaveAndRestart to make the change active.

C/C++
int dsc_SetInactivityTime(DS_HANDLE dshandle, int port, WORD inact_time)

Visual Basic
(Available soon)

Delphi
(Available soon)

Arguments

dshandle

[in] Handle identifying the Network Enabler returned from dsc_Attach.

port

[in] Port number. 1 for 1st port, 2 for 2nd port, and so on. 0 for all ports.

inact_time

[in] New inactivity timeout.

Password Protected

This function is password protected. Please call dsc_Login before using this function.

Return Values

Status | Value
Succeed. | DSC_OK
Fail. DSC_SOCKET
DSC_TOUT
DSC_USER_BREAK
DSC_PARAM
DSC_FAIL
DSC_NOT_LOGIN

Remarks

This function uses TCP package to communicate to Network Enabler TCP port 4900. Please make sure this TCP port can be used between Host and Network Enabler before using this function.


dsc_GetDriverMode

Get driver mode state.

C/C++
int dsc_GetDriverMode(DS_HANDLE dshandle, int port, PDRVMODEINFO info)

Visual Basic
(Available soon)

Delphi
(Available soon)

Arguments

dshandle

[in] Handle identifying the Network Enabler returned from dsc_Attach.

port

[in] Port number. 1 for 1st port, 2 for 2nd port, and so on. 0 for all ports, and info (DRVMODEINFO) size must match the port number.

info

[out] Pointer to DRVMODEINFO to receive driver mode information.

typedef struct _DRVMODEINFO{
BYTE max_connection;
}DRVMODEINFO, *PDRVMODEINFO;

max_connection

Maximum connection:The maximum value of the range for connection.

Return Values

Status | Value
Succeed. | DSC_OK
Fail. DSC_SOCKET
DSC_TOUT
DSC_USER_BREAK
DSC_PARAM
DSC_FAIL

Remarks

This function uses UDP package to communicate to Network Enabler UDP port 4800. Please make sure this UDP port can be used between Host and Network Enabler before using this function.


dsc_SetDriverMode

Set the driver mode parameter. User must call dsc_SaveAndRestart to make the change active.

C/C++
int dsc_SetDriverMode(DS_HANDLE dshandle, int port, PDRVMODEINFO info)

Visual Basic
(Available soon)

Delphi
(Available soon)

Arguments

dshandle

[in] Handle identifying the Network Enabler returned from dsc_Attach.

port

[in] Port number. 1 for 1st port, 2 for 2nd port, and so on. 0 for all ports.

info

[in] New driver mode information.

typedef struct _DRVMODEINFO{
BYTE max_connection;
}DRVMODEINFO, *PDRVMODEINFO;

max_connection

Maximum connection:The maximum value of the range for connection.

Password Protected

This function is password protected. Please call dsc_Login before using this function.

Return Values

Status | Value
Succeed. | DSC_OK
Fail. DSC_SOCKET
DSC_TOUT
DSC_USER_BREAK
DSC_PARAM
DSC_FAIL
DSC_NOT_LOGIN

Remarks

This function uses TCP package to communicate to Network Enabler TCP port 4900. Please make sure this TCP port can be used between Host and Network Enabler before using this function.


dsc_GetTCPClientMode

Get TCP client mode information.

C/C++
int dsc_GetTCPClientMode(DS_HANDLE dshandle, int port, PTCPCLIINFO info)

Visual Basic
(Available soon)

Delphi
(Available soon)

Arguments

dshandle

[in] Handle identifying the Network Enabler returned from dsc_Attach.

port

[in] Port number. 1 for 1st port, 2 for 2nd port, and so on. 0 for all ports, and info (TCPCLIINFO) size must match the port number.

info

[out] Pointer to TCPCLIINFO to receive TCP client mode information.

typedef struct _TCPCLI_ITEM{
char dest_svr[MAXMULTISESSION][HOSTNAMELEN];
WORD dest_port[MAXMULTISESSION];
}TCPCLIITEM;

dest_svr

Destination server IP/name.

dest_port

Destination server port.

typedef struct _TCPCLIINFO{
TCPCLIITEM tcpcli_item;
WORD conn_mode;
WORD reserved;
}TCPCLIINFO, *PTCPCLIINFO;

tcpcli_item

Destination server and server port.

conn_mode

Connect mode. 0 is startup, 1 is any character.

Return Values

Status | Value
Succeed. | DSC_OK
Fail. DSC_SOCKET
DSC_TOUT
DSC_USER_BREAK
DSC_PARAM
DSC_FAIL

Remarks

This function uses UDP package to communicate to Network Enabler UDP port 4800. Please make sure this UDP port can be used between Host and Network Enabler before using this function.


dsc_SetTCPCliMode

Set the TCP client mode parameter. User must call dsc_SaveAndRestart to make the change active.

C/C++
int dsc_SetTCPCliMode(DS_HANDLE dshandle, int port, PTCPCLIINFO info)

Visual Basic
(Available soon)

Delphi
(Available soon)

Arguments

dshandle

[in] Handle identifying the Network Enabler returned from dsc_Attach.

port

[in] Port number. 1 for 1st port, 2 for 2nd port, and so on. 0 for all ports.

info

[in] Pointer to TCPCLIINFO to receive TCP client mode information.

typedef struct _TCPCLI_ITEM{
char dest_svr[MAXMULTISESSION][HOSTNAMELEN];
WORD dest_port[MAXMULTISESSION];
}TCPCLIITEM;

dest_svr

Destination server IP/name.

dest_port

Destination server port.

typedef struct _TCPCLIINFO{
TCPCLIITEM tcpcli_item;
WORD conn_mode;
WORD reserved;
}TCPCLIINFO, *PTCPCLIINFO;

tcpcli_item

Destination server name and server port.

conn_mode

Connect mode. 0 is startup, 1 is any character.

Password Protected

This function is password protected. Please call dsc_Login before using this function.

Return Values

Status | Value
Succeed. | DSC_OK
Fail. DSC_SOCKET
DSC_TOUT
DSC_USER_BREAK
DSC_PARAM
DSC_FAIL
DSC_NOT_LOGIN

Remarks

This function uses TCP package to communicate to Network Enabler TCP port 4900. Please make sure this TCP port can be used between Host and Network Enabler before using this function.


dsc_GetTCPAliveTime

Get TCP alive check timeout.

C/C++
int dsc_GetTCPAliveTime(DS_HANDLE dshandle, int port, WORD *alive_tm);

Visual Basic
(Available soon)

Delphi
(Available soon)

Arguments

dshandle

[in] Handle identifying the Network Enabler returned from dsc_Attach.

port

[in] Port number. 1 for 1st port, 2 for 2nd port, and so on. 0 for all ports, and alive_tm size must match the port number.

alive_tm

[out] Pointer to WORD to receive the TCP check alive timeout.

Return Values

Status | Value
Succeed. | DSC_OK
Fail. DSC_SOCKET
DSC_TOUT
DSC_USER_BREAK
DSC_PARAM
DSC_FAIL

Remarks

This function uses UDP package to communicate to Network Enabler UDP port 4800. Please make sure this UDP port can be used between Host and Network Enabler before using this function.


dsc_SetTCPAlive

Set TCP alive check timeout. User must call dsc_SaveAndRestart to make the change active.

C/C++
int dsc_SetTCPAlive(DS_HANDLE dshandle, int port, WORD alive_tm)

Visual Basic
(Available soon)

Delphi
(Available soon)

Arguments

dshandle

[in] Handle identifying the Network Enabler returned from dsc_Attach.

port

[in] Port number. 1 for 1st port, 2 for 2nd port, and so on. 0 for all ports.

alive_tm

[out] New TCP alive check timeout.

Password Protected

This function is password protected. Please call dsc_Login before using this function.

Return Values

Status | Value
Succeed. | DSC_OK
Fail. DSC_SOCKET
DSC_TOUT
DSC_USER_BREAK
DSC_PARAM
DSC_FAIL
DSC_NOT_LOGIN

Remarks

This function uses TCP package to communicate to Network Enabler TCP port 4900. Please make sure this TCP port can be used between Host and Network Enabler before using this function.


dsc_GetTCPServerMode

Get TCP server mode information.

C/C++
int dsc_GetTCPServerMode(DS_HANDLE dshandle, int port, PTCPSVRINFO info)

Visual Basic
(Available soon)

Delphi
(Available soon)

Arguments

dshandle

[in] Handle identifying the Network Enabler returned from dsc_Attach.

port

[in] Port number. 1 for 1st port, 2 for 2nd port, and so on. 0 for all ports, and info (TCPSVRINFO) size must match the port number.

info

[out] Pointer to TCPSVRINFO to receive TCP server mode information.

typedef struct _TCPSVRINFO{
WORD cmd_port;
WORD listen_port;
DWORD max_connection;
}TCPSVRINFO, *PTCPSVRINFO;

cmd_port

Command port.

listen_port

TCP server listen port.

max_connection

Maximum connection. The maximum value is 4.

Return Values

Status | Value
Succeed. | DSC_OK
Fail. DSC_SOCKET
DSC_TOUT
DSC_USER_BREAK
DSC_PARAM
DSC_FAIL

Remarks

This function uses UDP package to communicate to Network Enabler UDP port 4800. Please make sure this UDP port can be used between Host and Network Enabler before using this function.


dsc_SetTCPSvrMode

Set the TCP server mode parameter. User must call dsc_SaveAndRestart to make the change active.

C/C++
int dsc_SetTCPSvrMode(DS_HANDLE dshandle, int port, PTCPSVRINFO info)

Visual Basic
(Available soon)

Delphi
(Available soon)

Arguments

dshandle

[in] Handle identifying the Network Enabler returned from dsc_Attach.

port

[in] Port number. 1 for 1st port, 2 for 2nd port, and so on. 0 for all ports.

info

[in] New TCP server mode information.

typedef struct _TCPSVRINFO{
WORD cmd_port;
WORD listen_port;
DWORD max_connection;
}TCPSVRINFO, *PTCPSVRINFO;

cmd_port

Command port.

listen_port

TCP server listen port.

max_connection

Maximum connection. The maximum value is 4.

Password Protected

This function is password protected. Please call dsc_Login before using this function.

Return Values

Status | Value
Succeed. | DSC_OK
Fail. DSC_SOCKET
DSC_TOUT
DSC_USER_BREAK
DSC_PARAM
DSC_FAIL
DSC_NOT_LOGIN

Remarks

This function uses TCP package to communicate to Network Enabler TCP port 4900. Please make sure this TCP port can be used between Host and Network Enabler before using this function.


dsc_GetUDPMode

Get UDP mode information.

C/C++
int dsc_GetUDPMode(DS_HANDLE dshandle, int port, UDP_INFO info[MAXPORT])

Visual Basic
(Available soon)

Delphi
(Available soon)

Arguments

dshandle

[in] Handle identifying the Network Enabler returned from dsc_Attach.

port

[in] Port number. 1 for 1st port, 2 for 2nd port, and so on. 0 for all ports, and info (TCPCLIINFO) size must match the port number.

info

[out] Pointer to UDP_INFO to receive UDP mode information.

typedef struct _UDP_ITEM{
DWORD ip[2];
WORD port;
}UDP_ITEM;

ip

IP area, ip[0] is begin UDP IP, ip[1] is end UDP IP.

port

UDP port.

typedef struct _UDP_INFO{
UDP_ITEM udpitem[4];
WORD port;
}UDP_INFO, *PUDP_INFO;

udpitem

UDP mode setting.

port

Local listen port.

Return Values

Status | Value
Succeed. | DSC_OK
Fail. DSC_SOCKET
DSC_TOUT
DSC_USER_BREAK
DSC_PARAM
DSC_FAIL

Remarks

This function uses UDP package to communicate to Network Enabler UDP port 4800. Please make sure this UDP port can be used between Host and Network Enabler before using this function.


dsc_SetUDPMode

Set the UDP mode parameter. User must call dsc_SaveAndRestart to make the change active.

C/C++
int dsc_SetUDPMode(DS_HANDLE dshandle, int port, PUDP_INFO info)

Visual Basic
(Available soon)

Delphi
(Available soon)

Arguments

dshandle

[in] Handle identifying the Network Enabler returned from dsc_Attach.

port

[in] Port number. 1 for 1st port, 2 for 2nd port, and so on. 0 for all ports.

info

[in] New UDP mode information.

typedef struct _UDP_ITEM{
DWORD ip[2];
WORD port;
}UDP_ITEM;

ip

UDP area, ip[0] is begin UDP IP, ip[1] is end UDP IP.

port

UDP port.

typedef struct _UDP_INFO{
UDP_ITEM udpitem[4];
WORD port;
}UDP_INFO, *PUDP_INFO;

udpitem

UDP mode setting.

port

Local listen port.

Password Protected

This function is password protected. Please call dsc_Login before using this function.

Return Values

Status | Value
Succeed. | DSC_OK
Fail. DSC_SOCKET
DSC_TOUT
DSC_USER_BREAK
DSC_PARAM
DSC_FAIL
DSC_NOT_LOGIN

Remarks

This function uses TCP package to communicate to Network Enabler TCP port 4900. Please make sure this TCP port can be used between Host and Network Enabler before using this function.


dsc_GetSNMP

Get SNMP.

C/C++
int dsc_GetSNMP(DS_HANDLE dshandle, PSNMPINFO snmpinfo)

Visual Basic
(Available soon)

Delphi
(Available soon)

Arguments

dshandle

[in] Handle identifying the Network Enabler returned from dsc_Attach.

snmpinfo

[out] Pointer to a PSNMPINFO structure to receive SNMP information.

typedef struct _SNMPINFO{
BYTE is_enabled;
BYTE reserved[3];
char community[HOSTNAMELEN];
char contact[HOSTNAMELEN];
char location[HOSTNAMELEN];
char trap_host[HOSTNAMELEN];
}SNMPINFO, *PSNMPINFO;

is_enabled

1 is enabled, 0 is disabled.

community

New snmp read-only community string.

contact

Contact string.

location

Location string.

trap_host

Trap sever host name.

Return Values

Status | Value
Succeed. | DSC_OK
Fail. DSC_SOCKET
DSC_TOUT
DSC_USER_BREAK
DSC_PARAM
DSC_FAIL

Remarks

This function uses UDP package to communicate to Network Enabler UDP port 4800. Please make sure this UDP port can be used between Host and Network Enabler before using this function.


dsc_SetSNMP

Set SNMP. User must call dsc_SaveAndRestart to make the change active.

C/C++
int dsc_SetSNMP(DS_HANDLE dshandle, PSNMPINFO snmpinfo)

Visual Basic
(Available soon)

Delphi
(Available soon)

Arguments

dshandle

[in] Handle identifying the Network Enabler returned from dsc_Attach.

snmpinfo

[in] Pointer to a PSNMPINFO structure to receive SNMP information.

typedef struct _SNMPINFO{
BYTE is_enabled;
BYTE reserved[3];
char community[HOSTNAMELEN];
char contact[HOSTNAMELEN];
char location[HOSTNAMELEN];
char trap_host[HOSTNAMELEN];
}SNMPINFO, *PSNMPINFO;

is_enabled

1 is enabled, 0 is disabled.

community

SNMP read-only community string.

contact

Contact string.

location

Location string.

trap_host

Trap sever host name.

Password Protected

This function is password protected. Please call dsc_Login before using this function.

Return Values

Status | Value
Succeed. | DSC_OK
Fail. DSC_SOCKET
DSC_TOUT
DSC_USER_BREAK
DSC_PARAM
DSC_FAIL
DSC_NOT_LOGIN

Remarks

This function uses TCP package to communicate to Network Enabler TCP port 4900. Please make sure this TCP port can be used between Host and Network Enabler before using this function.


dsc_GetDNS

Get the specified network interface DNS.

C/C++
int dsc_GetDNS(DS_HANDLE dshandle, int ifid, DWORD *dns1, DWORD *dns2)

Visual Basic
(Available soon)

Delphi
(Available soon)

Arguments

dshandle

[in] Handle identifying the Network Enabler returned from dsc_Attach.

ifid

[in] Network interface id. Set to 0xff to get the network interface attached to local host. To get the other network interface IP address, call dsc_GetIfConfig to get the correct ifid.

dns1

[out] Pointer to DWORD to receive the DNS server 1.

dns2

[out] Pointer to DWORD to receive the DNS server 2.

Return Values

Status | Value
Succeed. | DSC_OK
Fail. DSC_SOCKET
DSC_TOUT
DSC_USER_BREAK
DSC_PARAM
DSC_FAIL

Remarks

This function uses UDP package to communicate to Network Enabler UDP port 4800. Please make sure this UDP port can be used between Host and Network Enabler before using this function.


dsc_SetDNS

Set the specified network interface DNS. User must call dsc_SaveAndRestart to make the change active.

C/C++
int dsc_SetDNS(DS_HANDLE dshandle, int ifid, DWORD dns1, DWORD dns2)

Visual Basic
(Available soon)

Delphi
(Available soon)

Arguments

dshandle

[in] Handle identifying the Network Enabler returned from dsc_Attach.

ifid

[in] Network interface id. Set to 0xff to set the network interface attached to local host. To set the other network interface IP address, call dsc_GetIfConfig to get the correct ifid.

dns1

[in] New DNS server 1.

dns2

[in] New DNS server 2.

Password Protected

This function is password protected. Please call dsc_Login before using this function.

Return Values

Status | Value
Succeed. | DSC_OK
Fail. DSC_SOCKET
DSC_TOUT
DSC_USER_BREAK
DSC_PARAM
DSC_FAIL
DSC_NOT_LOGIN

Remarks

This function uses TCP package to communicate to Network Enabler TCP port 4900. Please make sure this TCP port can be used between Host and Network Enabler before using this function.

To attach the Network Enabler again, use can use dsc_EnumSearch to get new DS_INFO, or fill the old DS_INFO real_ip_addr and pseudo_ip_addr field with new IP address, then attach with new DS_INFO.


dsc_GetIP

Get the specified network interface IP address.

C/C++
int dsc_GetIP(DS_HANDLE dshandle, int ifid, DWORD *ip)

Visual Basic
(Available soon)

Delphi
(Available soon)

Arguments

dshandle

[in] Handle identifying the Network Enabler returned from dsc_Attach.

ifid

[in] Network interface id. Set to 0xff to get the network interface attached to local host. To get the other network interface IP address, call dsc_GetIfConfig to get the correct ifid.

ip

[out] Pointer to DWORD to receive the IP address.

Return Values

Status | Value
Succeed. | DSC_OK
Fail. DSC_SOCKET
DSC_TOUT
DSC_USER_BREAK
DSC_PARAM
DSC_FAIL

Remarks

This function uses UDP package to communicate to Network Enabler UDP port 4800. Please make sure this UDP port can be used between Host and Network Enabler before using this function.


dsc_SetIP

Set the specified network interface IP address. User must call dsc_SaveAndRestart to make the change active.

C/C++
int dsc_SetIP(DS_HANDLE ds_handle, int ifid, DWORD ip)

Visual Basic
(Available soon)

Delphi
(Available soon)

Arguments

dshandle

[in] Handle identifying the Network Enabler returned from dsc_Attach.

ifid

[in] Network interface id. Set to 0xff to set the network interface attached to local host. To set the other network interface IP address, call dsc_GetIfConfig to get the correct ifid.

ip

[in] New IP address.

Password Protected

This function is password protected. Please call dsc_Login before using this function.

Return Values

Status | Value
Succeed. | DSC_OK
Fail. DSC_SOCKET
DSC_TOUT
DSC_USER_BREAK
DSC_PARAM
DSC_FAIL
DSC_NOT_LOGIN

Remarks

This function uses TCP package to communicate to Network Enabler TCP port 4900. Please make sure this TCP port can be used between Host and Network Enabler before using this function.

To attach the Network Enabler again, use can use dsc_EnumSearch to get new DS_INFO, or fill the old DS_INFO real_ip_addr and pseudo_ip_addr field with new IP address, then attach with new DS_INFO.


dsc_GetNetmask

Get the specified network interface netmask.

C/C++
int dsc_GetNetmask(DS_HANDLE dshandle, int ifid, DWORD *netmask)

Visual Basic
(Available soon)

Delphi
(Available soon)

Arguments

dshandle

[in] Handle identifying the Network Enabler returned from dsc_Attach.

ifid

[in] Network interface id. Set to 0xff to get the network interface attached to local host. To get the other network interface netmask, call dsc_GetIfConfig to get the correct ifid.

netmask

[out] Pointer to DWORD to receive the netmask.

Return Values

Status | Value
Succeed. | DSC_OK
Fail. DSC_SOCKET
DSC_TOUT
DSC_USER_BREAK
DSC_PARAM
DSC_FAIL

Remarks

This function uses UDP package to communicate to Network Enabler UDP port 4800. Please make sure this UDP port can be used between Host and Network Enabler before using this function.


dsc_SetIP

dsc_SetNetmask

Set the specified network interface netmask. User must call dsc_SaveAndRestart to make the change active.

C/C++
int dsc_SetNetmask(DS_HANDLE dshandle, int ifid, DWORD netmask)

Visual Basic
(Available soon)

Delphi
(Available soon)

Arguments

dshandle

[in] Handle identifying the Network Enabler returned from dsc_Attach.

ifid

[in] Network interface id. Set to 0xff to set the network interface attached to local host. To set the other network interface netmask, call dsc_GetIfConfig to get the correct ifid.

netmask

[in] New netmask.

Password Protected

This function is password protected. Please call dsc_Login before using this function.

Return Values

Status | Value
Succeed. | DSC_OK
Fail. DSC_SOCKET
DSC_TOUT
DSC_USER_BREAK
DSC_PARAM
DSC_FAIL
DSC_NOT_LOGIN

Remarks

This function uses TCP package to communicate to Network Enabler TCP port 4900. Please make sure this TCP port can be used between Host and Network Enabler before using this function.


dsc_GetGateway

Get the specified network interface gateway.

C/C++
int dsc_GetGateway(DS_HANDLE dshandle, int ifid, DWORD *gateway)

Visual Basic
(Available soon)

Delphi
(Available soon)

Arguments

dshandle

[in] Handle identifying the Network Enabler. This handle must be get from dsc_Attach.

ifid

[in] Network interface id. Set to 0xff to get the network interface attached to local host. To get the other network interface gateway, call dsc_GetIfConfig to get the correct ifid.

gateway

[out] Pointer to string to receive gateway IP address of Network Enabler.

Return Values

Status | Value
Succeed. | DSC_OK
Fail. DSC_SOCKET
DSC_TOUT
DSC_USER_BREAK
DSC_PARAM
DSC_FAIL

Remarks

This function uses UDP package to communicate to Network Enabler UDP port 4800. Please make sure this UDP port can be used between Host and Network Enabler before using this function.


dsc_SetGateway

Set Network Enabler gateway address. User must call dsc_SaveAndRestart to make the change active.

C/C++
int dsc_SetGateway(DS_HANDLE dshandle, int ifid, DWORD gateway)

Visual Basic
(Available soon)

Delphi
(Available soon)

Arguments

dshandle

[in] Handle identifying the Network Enabler returned from dsc_Attach.

ifid

[in] Network interface id. Set to 0xff to set the network interface attached to local host. To set the other network interface gateway, call dsc_GetIfConfig to get the correct ifid.

gateway

[in] New gateway IP address of Network Enabler.

Password Protected

This function is password protected. Please call dsc_Login before using this function.

Return Values

Status | Value
Succeed. | DSC_OK
Fail. DSC_SOCKET
DSC_TOUT
DSC_USER_BREAK
DSC_PARAM
DSC_FAIL
DSC_NOT_LOGIN

Remarks

This function uses TCP package to communicate to Network Enabler TCP port 4900. Please make sure this TCP port can be used between Host and Network Enabler before using this function.


dsc_GetIPConfig

Get the IP configuration settings.

C/C++
int dsc_GetIPConfig(DS_HANDLE dshandle, int ifid, int *setting)

Visual Basic
(Available soon)

Delphi
(Available soon)

Arguments

dshandle

[in] Handle identifying the Network Enabler returned from dsc_Attach.

ifid

[in] Network interface id. Set to 0xff to get the network interface attached to local host. To get the other network interface IP configuration, call dsc_GetIfConfig to get the correct ifid.

setting

[out] Pointer to integer to receive the IP configuration. 0 for Static IP address, user must set up manually. 1 for DHCP, 2 for BOOTP client, 3 for DHCP and BOOTP.

¡@

Return Values

Status | Value
Succeed. | DSC_OK
Fail. DSC_SOCKET
DSC_TOUT
DSC_USER_BREAK
DSC_PARAM
DSC_FAIL

Remarks

This function uses UDP package to communicate to Network Enabler UDP port 4800. Please make sure this UDP port can be used between Host and Network Enabler before using this function.


dsc_SetIPConfig

Define how to get the IP address, netmask and gateway. User must call dsc_SaveAndRestart to make the change active.

C/C++
int dsc_SetIPConfig(DS_HANDLE dshandle, int ifid, int cfg)

Visual Basic
(Available soon)

Delphi
(Available soon)

Arguments

dshandle

[in] Handle identifying the Network Enabler returned from dsc_Attach.

ifid

[in] Network interface id. Set to 0xff to get the network interface attached to local host. To get the other network interface IP configuration, call dsc_GetIfConfig to get the correct ifid.

cfg

[in] Define how to get the IP address, netmask and gateway. 0 for Static IP address, user must set up manually. 1 for DHCP, 2 for DHCP and BOOTP, 3 for BOOTP client.

Password Protected

This function is password protected. Please call dsc_Login before using this function.

Return Values

Status | Value
Succeed. | DSC_OK
Fail. DSC_SOCKET
DSC_TOUT
DSC_USER_BREAK
DSC_PARAM
DSC_FAIL
DSC_NOT_LOGIN

Remarks

This function uses TCP package to communicate to Network Enabler TCP port 4900. Please make sure this TCP port can be used between Host and Network Enabler before using this function.

¡@

Enable DHCP or BOOTP will cause the IP address to be changed next restart.


dsc_GetNetstat

Get the socket information.

C/C++
int dsc_GetNetstat(DS_HANDLE dshandle, int maxsocket, int *retcnt, PNETSTATINFO info)

Visual Basic
(Available soon)

Delphi
(Available soon)

Arguments

dshandle

[in] Handle identifying the Network Enabler returned from dsc_Attach.

maxsocket

[in] Max buffer count. The info (PNETSTATINFO) size must match this count.

retcnt

[out] Returned NETSTATINFO data count.

info

[out] Pointer to a NETSTATINFO structure to receive connection information.

typedef struct _NETSTATINFO {
DWORD remote_ip;
DWORD local_ip;
WORD remote_port;
WORD local_port;
BYTE socket_type;
BYTE connect_status;
BYTE reverse[2];
} NETSTATINFO, *PNETSTATINFO;

remote_ip

Remote IP address.

local_ip

Local IP address.

remote_port

Remote port.

local_ip

Local port.

socket_type

The socket type. 0 for UDP, 1 for TCP.

connect_status

(TCP only) The TCP connection status.

State | Define | Value
CLOSED | ST_CLOSED | 0
LISTEN | ST_LISTEN | 1
SYN_RCVD | ST_SYN_RCVD | 2
SYN_SEND | ST_SYN_SEND | 3
ESTABLISHED | ST_ESTABLISHED | 4
FIN_WAIT1 | ST_FIN_WAIT1 | 5
FIN_WAIT2 | ST_FIN_WAIT2 | 6
CLOSE_WAIT | ST_CLOSE_WAIT | 7
CLOSING | ST_CLOSING | 8
LAST_ACK | ST_LAST_ACK | 9
TIME_WAIT | ST_TIME_WAIT | 10

Return Values

Status | Value
Succeed. | DSC_OK
Fail. DSC_SOCKET
DSC_TOUT
DSC_USER_BREAK
DSC_PARAM
DSC_FAIL

Remarks

This function uses UDP package to communicate to Network Enabler UDP port 4800. Please make sure this UDP port can be used between Host and Network Enabler before using this function.


dsc_GetNetstat_ex

Get the socket information.

C/C++
int dsc_GetNetstat_ex(DS_HANDLE dshandle, int maxsocket, int *retcnt, PNETSTATINFO info)

Visual Basic
(Available soon)

Delphi
(Available soon)

Arguments

dshandle

[in] Handle identifying the Network Enabler returned from dsc_Attach.

maxsocket

[in] Max buffer count. The info (NETSTATINFO) size must match this count.

retcnt

[out] Returned NETSTATINFO data count.

info

[out] Pointer to a NETSTATINFO structure to receive connection information.

typedef struct _NETSTATINFO {
DWORD remote_ip;
DWORD local_ip;
WORD remote_port;
WORD local_port;
BYTE socket_type;
BYTE connect_status;
BYTE reverse[2];
} NETSTATINFO, *PNETSTATINFO;

remote_ip

Remote IP address.

local_ip

Local IP address.

remote_port

Remote port.

local_ip

Local port.

socket_type

The socket type. 0 for UDP, 1 for TCP.

connect_status

(TCP only) The TCP connection status.

State | Define | Value
CLOSED | ST_CLOSED | 0
LISTEN | ST_LISTEN | 1
SYN_RCVD | ST_SYN_RCVD | 2
SYN_SEND | ST_SYN_SEND | 3
ESTABLISHED | ST_ESTABLISHED | 4
FIN_WAIT1 | ST_FIN_WAIT1 | 5
FIN_WAIT2 | ST_FIN_WAIT2 | 6
CLOSE_WAIT | ST_CLOSE_WAIT | 7
CLOSING | ST_CLOSING | 8
LAST_ACK | ST_LAST_ACK | 9
TIME_WAIT | ST_TIME_WAIT | 10

Return Values

Status | Value
Succeed. | DSC_OK
Fail. DSC_SOCKET
DSC_TOUT
DSC_USER_BREAK
DSC_PARAM
DSC_FAIL

Remarks

This function uses UDP package to communicate to Network Enabler UDP port 4800. Please make sure this UDP port can be used between Host and Network Enabler before using this function.


dsc_GetIfConfig

Get the network interface information.

C/C++
int dsc_GetIfConfig(DS_HANDLE dshandle, int maxif, int *retcnt, PIFCONFIGINFO info)

Visual Basic
(Available soon)

Delphi
(Available soon)

Arguments

dshandle

[in] Handle identifying the Network Enabler returned from dsc_Attach.

maxif

[in] Max buffer count. The info (PIFCONFIGINFO) size must match this count.

retcnt

[out] Returned IFCONFIGINFO data count.

info

[out] Pointer to a IFCONFIGINFO structure to receive connection information.

typedef struct _IFCONFIGINFO {
WORD ifid;
WORD flag;
DWORD ipaddr;
DWORD netmask;
char gateway[HOSTNAMELEN];
} IFCONFIGINFO , *PIFCONFIGINFO;

ifid

Network interface id.

flag

Network interface flag. 0x01 means this interface is attached to local host.

ipaddr

IP address.

netmask

Netmask

Gateway

Gateway IP address.

Return Values

Status | Value
Succeed. | DSC_OK
Fail. DSC_SOCKET
DSC_TOUT
DSC_USER_BREAK
DSC_PARAM
DSC_FAIL

Remarks

This function uses UDP package to communicate to Network Enabler UDP port 4800. Please make sure this UDP port can be used between Host and Network Enabler before using this function.


dsc_GetSerialPortName

Get Network Enabler serial port name.

C/C++
int dsc_GetSerialPortName(DS_HANDLE dshandle, int port, char name[MAXPORT][PORTNAMELEN])

Visual Basic
(Available soon)

Delphi
(Available soon)

Arguments

dshandle

[in] Handle identifying the Network Enabler returned from dsc_Attach.

port

[in] Port number. 1 for 1st port, 2 for 2nd port, and so on. 0 for all ports.

name

[out] Pointer to string to receive serial port name, null terminated string. Maximum length is 16, null terminated char included.

Return Values

Status | Value
Succeed. | DSC_OK
Fail. DSC_SOCKET
DSC_TOUT
DSC_USER_BREAK
DSC_PARAM
DSC_FAIL

Remarks

This function uses UDP package to communicate to Network Enabler UDP port 4800. Please make sure this UDP port can be used between Host and Network Enabler before using this function.


dsc_SetSerialPortName

Set serial port name. User must call dsc_SaveAndRestart to make the change active.

C/C++
int dsc_SetSerialPortName(DS_HANDLE dshandle, int port, char *portname)

Visual Basic
(Available soon)

Delphi
(Available soon)

Arguments

dshandle

[in] Handle identifying the Network Enabler returned from dsc_Attach.

port

[in] Port number. 1 for 1st port, 2 for 2nd port, and so on. 0 for all ports.

portname

[in] New port name, null terminated string. Maximum length is 16, null terminated char included.

Password Protected

This function is password protected. Please call dsc_Login before using this function.

Return Values

Status | Value
Succeed. | DSC_OK
Fail. DSC_SOCKET
DSC_TOUT
DSC_USER_BREAK
DSC_PARAM
DSC_FAIL
DSC_NOT_LOGIN

Remarks

This function uses TCP package to communicate to Network Enabler TCP port 4900. Please make sure this TCP port can be used between Host and Network Enabler before using this function.


dsc_GetSerialIOCtl

Get serial port parameter.

C/C++
int dsc_GetSerialIOCtl(DS_HANDLE dshandle, int port, int mode, PSERPARMITEM info)

Visual Basic
(Available soon)

Delphi
(Available soon)

Arguments

dshandle

[in] Handle identifying the Network Enabler returned from dsc_Attach.

port

[in] Port number. 1 for 1st port, 2 for 2nd port, and so on. 0 for all ports, and info (PSERPARMITEM) size must match the port number.

mode

[in] define the return data mode. 0 for current settings, 1 for initial settings. Current settings usually mean the user application's settings.

info

[out] Pointer to SERPARMITEM to receive serial settings.
¡@

typedef struct _SERPARMITEM {
DWORD baud;
BYTE mode;
BYTE flowctrl;
BYTE reserve[2];
} SERPARMITEM , *PSERPARMITEM ;

baud

Baud rate. Ex: if the baud rate is 9600bps, this filed is filled with 9600.

mode

Data bits, stop bits and parity settings.

(Data bits) OR (Stop bits) OR (Parity)

Data bits (bit 0, 1)

0x00 = 5

0x01 = 6

0x02 = 7

0x03 = 8

Stop bits (bit 2)

0x00 = 1

0x04 = 2

Parity (bit 3,4,5)

0x00 = None

0x18 = Even

0x08 = Odd

0x28 = Mark
0x38 = Space

flowctrl

Flow control. 0 for none, 1 for RTS/CTR, 2 for XON/XOFF, 3 for DTR/DSR

Return Values

Status | Value
Succeed. | DSC_OK
Fail. DSC_SOCKET
DSC_TOUT
DSC_USER_BREAK
DSC_PARAM
DSC_FAIL

Remarks

This function uses UDP package to communicate to Network Enabler UDP port 4800. Please make sure this UDP port can be used between Host and Network Enabler before using this function.


dsc_SetSerialIOCtl

Set serial port parameter. User must call dsc_SaveAndRestart to make the change active.

C/C++
int dsc_SetSerialIOCtl(DS_HANDLE dshandle, int port, BYTE baud, BYTE mode, BYTE flowctrl)

Visual Basic
(Available soon)

Delphi
(Available soon)

Arguments

dshandle

[in] Handle identifying the Network Enabler returned from dsc_Attach.

port

[in] Port number. 1 for 1st port, 2 for 2nd port, and so on. 0 for all ports.

baud

[in] Baud rate index.
¡@

Baud Rate | Define | Value
50 | B50 | 0x00
75 | B75 | 0x01
110 | B110 | 0x02
134 | B134 | 0x03
150 | B150 | 0x04
300 | B300 | 0x05
600 | B600 | 0x06
1200 | B1200 | 0x07
1800 | B1800 | 0x08
2400 | B2400 | 0x09
4800 | B4800 | 0x0A
7200 | B7200 | 0x0B
9600 | B9600 | 0x0C
19200 | B19200 | 0x0C
38400 | B38400 | 0x0E
57600 | B57600 | 0x0F
115200 | B115200 | 0x10
230400 | B230400 | 0x11

mode

[in] Data bits, stop bits and parity settings.

(Data bits) OR (Stop bits) OR (Parity)

Data bits (bit 0, 1)

0x00 = 5

0x01 = 6

0x02 = 7

0x03 = 8

Stop bits (bit 2)

0x00 = 1

0x04 = 2

Parity (bit 3,4,5)

0x00 = None

0x18 = Even

0x08 = Odd

0x28 = Mark
0x38 = Space

flowctrl

[in] Flow control. 0 for none, 1 for RTS/CTR, 2 for XON/XOFF, 3 for DTR/DSR

Password Protected

This function is password protected. Please call dsc_Login before using this function.

Return Values

Status | Value
Succeed. | DSC_OK
Fail. DSC_SOCKET
DSC_TOUT
DSC_USER_BREAK
DSC_PARAM
DSC_FAIL
DSC_NOT_LOGIN

Remarks

This function uses TCP package to communicate to Network Enabler TCP port 4900. Please make sure this TCP port can be used between Host and Network Enabler before using this function.


dsc_GetSerialFIFO

Get the serial port FIFO settings.

C/C++
int dsc_GetSerialFIFO(DS_HANDLE dshandle, int port, int mode, LPBYTE info)

Visual Basic
(Available soon)

Delphi
(Available soon)

Arguments

dshandle

[in] Handle identifying the Network Enabler returned from dsc_Attach.

port

[in] Port number. 1 for 1st port, 2 for 2nd port, and so on. 0 for all ports, and info (LPBYTE) size must match the port number.

mode

[in] define the return data mode. 0 for current settings, 1 for initial settings. Current settings usually mean the user application's settings.

info

[out] Pointer to BYTE to receive FIFO settings. 1 for enable, 0 for disable.

Return Values

Status | Value
Succeed. | DSC_OK
Fail. DSC_SOCKET
DSC_TOUT
DSC_USER_BREAK
DSC_PARAM
DSC_FAIL

Remarks

This function uses UDP package to communicate to Network Enabler UDP port 4800. Please make sure this UDP port can be used between Host and Network Enabler before using this function.


dsc_SetSerialFIFO

Set the serial port FIFO settings. User must call dsc_SaveAndRestart to make the change active.

C/C++
int dsc_SetSerialFIFO(DS_HANDLE dshandle, int port, int set)

Visual Basic
(Available soon)

Delphi
(Available soon)

Arguments

dshandle

[in] Handle identifying the Network Enabler returned from dsc_Attach.

port

[in] Port number. 1 for 1st port, 2 for 2nd port, and so on. 0 for all ports.

set

[in] 1 for enable, 0 for disable.

Password Protected

This function is password protected. Please call dsc_Login before using this function.

Return Values

Status | Value
Succeed. | DSC_OK
Fail. DSC_SOCKET
DSC_TOUT
DSC_USER_BREAK
DSC_PARAM
DSC_FAIL
DSC_NOT_LOGIN

Remarks

This function uses TCP package to communicate to Network Enabler TCP port 4900. Please make sure this TCP port can be used between Host and Network Enabler before using this function.

¡@


dsc_GetSerialInterface

Get the serial port interface settings.

C/C++
int dsc_GetSerialInterface(DS_HANDLE ds_handle, int port, int mode, LPBYTE info)

Visual Basic
(Available soon)

Delphi
(Available soon)

Arguments

dshandle

[in] Handle identifying the Network Enabler returned from dsc_Attach.

mode

[in] define the return data mode. 0 for current settings, 1 for initial settings. Current settings usually mean the user application's settings.

port

[in] Port number. 1 for 1st port, 2 for 2nd port, and so on. 0 for all ports, and info (LPBYTE) size must match the port number.

info

[out] Pointer to a BYTE to receive new serial interface.

Interface | Define | Value
RS-232 | IF_RS232 | 0
RS-422 | IF-RS422 | 1
RS-485, 2wire | IF_RS4852W | 2
RS-485, 4wire | IF_RS4854W | 3

Return Values

Status | Value
Succeed. | DSC_OK
Fail. DSC_SOCKET
DSC_TOUT
DSC_USER_BREAK
DSC_PARAM
DSC_FAIL

Remarks

This function uses UDP package to communicate to Network Enabler UDP port 4800. Please make sure this UDP port can be used between Host and Network Enabler before using this function.


dsc_SetSerialInterface

Set the serial port interface. This function will be active immediately. Restart is not needed.

C/C++
int dsc_SetSerialInterface(DS_HANDLE dshandle, int port, int set)

Visual Basic
(Available soon)

Delphi
(Available soon)

Arguments

dshandle

[in] Handle identifying the Network Enabler returned from dsc_Attach.

port

[in] Port number. 1 for 1st port, 2 for 2nd port, and so on. 0 for all ports.

set

[out] New serial interface.

Interface | Define | Value
RS-232 | IF_RS232 | 0
RS-422 | IF_RS422 | 1
RS-485, 2wire | IF_RS4852W | 2
RS-485, 4wire | IF_RS4854W | 3

Password Protected

This function is password protected. Please call dsc_Login before using this function.

Return Values

Status | Value
Succeed. | DSC_OK
Fail. DSC_SOCKET
DSC_TOUT
DSC_USER_BREAK
DSC_PARAM
DSC_FAIL
DSC_NOT_LOGIN

Remarks

This function uses TCP package to communicate to Network Enabler TCP port 4900. Please make sure this TCP port can be used between Host and Network Enabler before using this function.


dsc_GetSerialLineStatus

Get the serial port line status.

C/C++
int dsc_GetSerialLineStatus(DS_HANDLE dshandle, int port, LPBYTE info)

Visual Basic
(Available soon)

Delphi
(Available soon)

Arguments

dshandle

[in] Handle identifying the Network Enabler returned from dsc_Attach.

port

[in] Port number. 1 for 1st port, 2 for 2nd port, and so on. 0 for all ports, and info (LPBYTE) size must match the port number.

info

[out] Pointer to BYTE to receive line status.

Data | Define | Value | Operation
RTS | L_RTS | 1h, bit 0 | 1 for on, 0 for off
DTR | L_DTR | 2h, bit 1 | 1 for on, 0 for off
CTS | L_CTS | 10h, bit 4 | 1 for on, 0 for off
DSR | L_DSR | 20h, bit 5 | 1 for on, 0 for off
DCD | L_DCD | 80h, bit 7 | 1 for on, 0 for off

Return Values

Status | Value
Succeed. | DSC_OK
Fail. DSC_SOCKET
DSC_TOUT
DSC_USER_BREAK
DSC_PARAM
DSC_FAIL

Remarks

This function uses UDP package to communicate to Network Enabler UDP port 4800. Please make sure this UDP port can be used between Host and Network Enabler before using this function.


dsc_GetSerailDataCnt

dsc_GetSerialDataCnt

Get the serial port tx/rx data count.

C/C++
int dsc_GetSerialDataCnt(DS_HANDLE dshandle, int port, int mode, PSERDATACNT data)

Visual Basic
(Available soon)

Delphi
(Available soon)

Arguments

dshandle

[in] Handle identifying the Network Enabler returned from dsc_Attach.

port

[in] Port number. 1 for 1st port, 2 for 2nd port, and so on. 0 for all ports, and data(PSERDATACNT) size must match the port number.

mode

[in] define the return data mode. 0 for current settings, 1 for initial settings. Current settings usually mean the user application's settings.

data

[out] Pointer to a PSERDATACNT structure to receive tx/rx data count.

typedef struct _SERDATACNT {
unsigned long tx;
unsigned long rx;
unsigned long total_tx;
unsigned long total_rx;
} SERDATACNT , *PSERDATACNT;

tx

The transmitted serial data count from this opened.

rx

The received serial data count from this opened.

total_tx

The transmitted serial data count from this booted.

total_rx

The received serial data count from this booted.

Return Values

Status | Value
Succeed. | DSC_OK
Fail. DSC_SOCKET
DSC_TOUT
DSC_USER_BREAK
DSC_PARAM
DSC_FAIL

Remarks

This function uses UDP package to communicate to Network Enabler UDP port 4800. Please make sure this UDP port can be used between Host and Network Enabler before using this function.


dsc_GetIP

dsc_GetMaxDIO

Get the number of DIO .

C/C++
int dsc_GetMaxDIO(DS_HANDLE dshandle, int* max)

Visual Basic
(Available soon)

Delphi
(Available soon)

Arguments

dshandle

[in] Handle identifying the Network Enabler returned from dsc_Attach.

max

[out] Pointer to int to receive the number of DIO.

¡@

Return Values

Status | Value
Succeed. | DSC_OK
Fail. DSC_SOCKET
DSC_TOUT
DSC_USER_BREAK
DSC_PARAM
DSC_FAIL

Remarks

This function uses UDP package to communicate to Network Enabler UDP port 4800. Please make sure this UDP port can be used between Host and Network Enabler before using this function.


dsc_GetIP

dsc_GetDIOMode

Get the specified DIO Mode.

C/C++
int dsc_GetDIOMode(DS_HANDLE dshandle, int start, int no, int* mode)

Visual Basic
(Available soon)

Delphi
(Available soon)

Arguments

dshandle

[in] Handle identifying the Network Enabler returned from dsc_Attach.

start

[in] First DIO number you will get.

no

[in] The number of DIO you will get.

mode

[out] Pointer to int to receive the DIO mode. Here, one DIO occupies a integer space.

1(hex) means that the mode of DIO is output and 0 is input.

ex, The mode of DIO_start is saved in mode[0].

¡@

Return Values

Status | Value
Succeed. | DSC_OK
Fail. DSC_SOCKET
DSC_TOUT
DSC_USER_BREAK
DSC_PARAM
DSC_FAIL

Remarks

This function uses UDP package to communicate to Network Enabler UDP port 4800. Please make sure this UDP port can be used between Host and Network Enabler before using this function.


dsc_GetIP

dsc_GetDIOState

Get the specified DIO State.

C/C++
int dsc_GetDIOState(DS_HANDLE dshandle, int start, int no, int* state)

Visual Basic
(Available soon)

Delphi
(Available soon)

Arguments

dshandle

[in] Handle identifying the Network Enabler returned from dsc_Attach.

start

[in] First DIO number you will get.

no

[in] The number of DIO you will get.

state

[out] Pointer to int to receive the DIO state. Here, one DIO occupies an integer space.

1(hex) means that the state of DIO is high and 0 is low.

ex, The state of DIO_start is saved in state[0].

¡@

Return Values

Status | Value
Succeed. | DSC_OK
Fail. DSC_SOCKET
DSC_TOUT
DSC_USER_BREAK
DSC_PARAM
DSC_FAIL

Remarks

This function uses UDP package to communicate to Network Enabler UDP port 4800. Please make sure this UDP port can be used between Host and Network Enabler before using this function.


dsc_GetIP

dsc_SetDIOMode

Set the specified DIO Mode.

C/C++
int dsc_SetDIOMode(DS_HANDLE dshandle, int start, int no, int* mode)

Visual Basic
(Available soon)

Delphi
(Available soon)

Arguments

dshandle

[in] Handle identifying the Network Enabler returned from dsc_Attach.

start

[in] First DIO number you will set.

no

[in] The number of DIO you will set.

mode

[in] Pointer to int to send the DIO mode. Here, one DIO occupies a integer space.

1(hex) means that the mode of DIO is output and 0 is input.

ex, The mode of DIO_start is saved in mode[0].

¡@

Return Values

Status | Value
Succeed. | DSC_OK
Fail. DSC_SOCKET
DSC_TOUT
DSC_USER_BREAK
DSC_PARAM
DSC_FAIL

Remarks

This function uses TCP package to communicate to Network Enabler TCP port 4900. Please make sure this TCP port can be used between Host and Network Enabler before using this function.

¡@


dsc_GetIP

dsc_SetDIOState

Set the specified DIO State.

C/C++
int dsc_SetDIOState(DS_HANDLE dshandle, int start, int no, int* state)

Visual Basic
(Available soon)

Delphi
(Available soon)

Arguments

dshandle

[in] Handle identifying the Network Enabler returned from dsc_Attach.

start

[in] First DIO number you will set.

no

[in] The number of DIO you will set.

state

[in] Pointer to int to send the DIO state. Here, one DIO occupies an integer space.

1(hex) means that the state of DIO is high and 0 is low.

ex, The state of DIO_start is saved in state[0].

¡@

Return Values

Status | Value
Succeed. | DSC_OK
Fail. DSC_SOCKET
DSC_TOUT
DSC_USER_BREAK
DSC_PARAM
DSC_FAIL

Remarks

This function uses TCP package to communicate to Network Enabler TCP port 4900. Please make sure this TCP port can be used between Host and Network Enabler before using this function.

¡@


dsc_GetAlert

Get alert(event, mail and trap).

C/C++
int dsc_GetAlert(DS_HANDLE dshandle, PALERTINFO info)

Visual Basic
(Available soon)

Delphi
(Available soon)

Arguments

dshandle

[in] Handle identifying the Network Enabler. This handle must be get from dsc_Attach.

info

[out] Pointer to a ALERTINFO structure to receive alert information.

typedef struct _ALERTINFO{
WORD event;
WORD mail;
WORD trap;
WORD reserved;
}ALERTINFO, *PALERTINFO;

Event, Mail, Trap | Define | Value
Cold start | EVT_COLD_START | 1
Warm start | EVT_WARM_START | 2
Authentication fail | EVT_ATUEH_FAIL | 3
IP changed | EVT_IP_CHANGED | 4
Password changed | EVT_PASS_CHANGED | 5

Return Values

Status | Value
Succeed. | DSC_OK
Fail. DSC_SOCKET
DSC_TOUT
DSC_USER_BREAK
DSC_PARAM
DSC_FAIL

Remarks

This function uses UDP package to communicate to Network Enabler UDP port 4800. Please make sure this UDP port can be used between Host and Network Enabler before using this function.


dsc_SetAlert

Set Network Enabler IP Location function. User must call dsc_SaveAndRestart to make the change active.

C/C++
int dsc_SetAlert(DS_HANDLE dshandle, PALERTINFO info)

Visual Basic
(Available soon)

Delphi
(Available soon)

Arguments

dshandle

[in] Handle identifying the Network Enabler returned from dsc_Attach.

info

[in] New alert information settings

typedef struct _ALERTINFO{
WORD event;
WORD mail;
WORD trap;
WORD reserved;
}ALERTINFO, *PALERTINFO;

Event, Mail, Trap | Define | Value
Cold start | EVT_COLD_START | 1
Warm start | EVT_WARM_START | 2
Authentication fail | EVT_ATUEH_FAIL | 3
IP changed | EVT_IP_CHANGED | 4
Password changed | EVT_PASS_CHANGED | 5

Password Protected

This function is password protected. Please call dsc_Login before using this function.

Return Values

Status | Value
Succeed. | DSC_OK
Fail. DSC_SOCKET
DSC_TOUT
DSC_USER_BREAK
DSC_PARAM
DSC_FAIL
DSC_NOT_LOGIN

Remarks

This function uses TCP package to communicate to Network Enabler TCP port 4900. Please make sure this TCP port can be used between Host and Network Enabler before using this function.


dsc_GetPortAlert

Get port alert.

C/C++
dsc_GetPortAlert(DS_HANDLE dshandle, int port, PPORTALERTINFO info)

Visual Basic
(Available soon)

Delphi
(Available soon)

Arguments

dshandle

[in] Handle identifying the Network Enabler returned from dsc_Attach.

port

[in] Port number. 1 for 1st port, 2 for 2nd port, and so on. 0 for all ports, and info (PORTALERTINFO) size must match the port number.

info

[out] Pointer to PORTALERTINFO to receive serial settings.

typedef struct _PORTALERTINFO{
BYTE event;
BYTE mail;
BYTE trap;
BYTE reserved;
}PORTALERTINFO, *PPORTALERTINFO;

event, mail, trap

DCD is 0x01, DSR is 0x02.

Return Values

Status | Value
Succeed. | DSC_OK
Fail. DSC_SOCKET
DSC_TOUT
DSC_USER_BREAK
DSC_PARAM
DSC_FAIL

Remarks

This function uses UDP package to communicate to Network Enabler UDP port 4800. Please make sure this UDP port can be used between Host and Network Enabler before using this function.


dsc_SetPortAlert

Set port alert. User must call dsc_SaveAndRestart to make the change active.

C/C++
int dsc_SetPortAlert(DS_HANDLE dshandle, int port, PPORTALERTINFO info)

Visual Basic
(Available soon)

Delphi
(Available soon)

Arguments

dshandle

[in] Handle identifying the Network Enabler returned from dsc_Attach.

port

[in] Port number. 1 for 1st port, 2 for 2nd port, and so on. 0 for all ports.

info

[in] New port alert.

typedef struct _PORTALERTINFO{
BYTE event;
BYTE mail;
BYTE trap;
BYTE reserved;
}PORTALERTINFO, *PPORTALERTINFO;

event, mail, trap

DCD is 0x01, DSR is 0x02, DCD/DSR is 0x03.

Password Protected

This function is password protected. Please call dsc_Login before using this function.

Return Values

Status | Value
Succeed. | DSC_OK
Fail. DSC_SOCKET
DSC_TOUT
DSC_USER_BREAK
DSC_PARAM
DSC_FAIL
DSC_NOT_LOGIN

Remarks

This function uses TCP package to communicate to Network Enabler TCP port 4900. Please make sure this TCP port can be used between Host and Network Enabler before using this function.


dsc_GetMailAlert

Get mail alert.

C/C++
int dsc_GetMailAlert(DS_HANDLE dshandle, PMAILINFO mailinfo)

Visual Basic
(Available soon)

Delphi
(Available soon)

Arguments

dshandle

[in] Handle identifying the Network Enabler returned from dsc_Attach.

mailinfo

[out] Pointer to a MAILINFO structure to receive mail alert information.

typedef struct _MAILINFO{
char mail_svr[HOSTNAMELEN];
DWORD auth_enable;
char from_addr[MAILADDRLEN];
char to_addr1[MAILADDRLEN];
char to_addr2[MAILADDRLEN];
char to_addr3[MAILADDRLEN];
char to_addr4[MAILADDRLEN];
}MAILINFO, *PMAILINFO;

mail_svr

Mail server for send mail (mail server of from_addr).

auth_enable

0 for disable authentication of mail server. 1 for enable authentication of mail server. The default value is 0.

from_addr

send alerts to mail address of to_addr.

to_addr1

receive alerts from mail address of from_addr.

to_addr2

receive alerts from mail address of from_addr.

to_addr3

receive alerts from mail address of from_addr.

to_addr4

receive alerts from mail address of from_addr.

Return Values

Status | Value
Succeed. | DSC_OK
Fail. DSC_SOCKET
DSC_TOUT
DSC_USER_BREAK
DSC_PARAM
DSC_FAIL

Remarks

This function uses UDP package to communicate to Network Enabler UDP port 4800. Please make sure this UDP port can be used between Host and Network Enabler before using this function.


dsc_SetMailAlert

Set mail alert. User must call dsc_SaveAndRestart to make the change active.

C/C++
int dsc_SetMailAlert(DS_HANDLE dshandle, PMAILINFO mailinfo)

Visual Basic
(Available soon)

Delphi
(Available soon)

Arguments

dshandle

[in] Handle identifying the Network Enabler returned from dsc_Attach.

mailinfo

[in] New mail alert information.

typedef struct _MAILINFO{
char mail_svr[HOSTNAMELEN];
DWORD auth_enable;
char from_addr[MAILADDRLEN];
char to_addr1[MAILADDRLEN];
char to_addr2[MAILADDRLEN];
char to_addr3[MAILADDRLEN];
char to_addr4[MAILADDRLEN];
}MAILINFO, *PMAILINFO;

mail_svr

Mail server for send mail (mail server of from_addr).

auth_enable

0 for disable authentication of mail server. 1 for enable authentication of mail server. The default value is 0.

from_addr

send alerts to mail address of to_addr.

to_addr1

receive alerts from mail address of from_addr.

to_addr2

receive alerts from mail address of from_addr.

to_addr3

receive alerts from mail address of from_addr.

to_addr4

receive alerts from mail address of from_addr.

Password Protected

This function is password protected. Please call dsc_Login before using this function.

Return Values

Status | Value
Succeed. | DSC_OK
Fail. DSC_SOCKET
DSC_TOUT
DSC_USER_BREAK
DSC_PARAM
DSC_FAIL
DSC_NOT_LOGIN

Remarks

This function uses TCP package to communicate to Network Enabler TCP port 4900. Please make sure this TCP port can be used between Host and Network Enabler before using this function.


dsc_RetriveMailAcount

Retrieve Mail account.

C/C++
int dsc_RetriveMailAcount(DS_HANDLE dshandle, char *username, char *password)

Visual Basic
(Available soon)

Delphi
(Available soon)

Arguments

dshandle

[in] Handle identifying the Network Enabler returned from dsc_Attach.

username

[out] Pointer to string to receive mail server username, specified by null terminated string. The maximum length is 16 including null terminated character.

password

[out] Pointer to string to receive mail server password, specified by null terminated string. The maximum length is 16 including null terminated character.

Return Values

Status | Value
Succeed. | DSC_OK
Fail. DSC_SOCKET
DSC_TOUT
DSC_USER_BREAK
DSC_PARAM
DSC_FAIL

Remarks

This function uses UDP package to communicate to Network Enabler UDP port 4800. Please make sure this UDP port can be used between Host and Network Enabler before using this function.


dsc_SetMailAcount

Set mail account. User must call dsc_SaveAndRestart to make the change active.

C/C++
int dsc_SetMailAcount(DS_HANDLE dshandle, char *username, char *password)

Visual Basic
(Available soon)

Delphi
(Available soon)

Arguments

dshandle

[in] Handle identifying the Network Enabler returned from dsc_Attach.

username

[in] Login mail server username, specified by null terminated string. The maximum length is 16 including null terminated character.

password

[in] Login mail server password, specified by null terminated string. The maximum length is 16 including null terminated character.

Password Protected

This function is password protected. Please call dsc_Login before using this function.

Return Values

Status | Value
Succeed. | DSC_OK
Fail. DSC_SOCKET
DSC_TOUT
DSC_USER_BREAK
DSC_PARAM
DSC_FAIL
DSC_NOT_LOGIN

Remarks

This function uses TCP package to communicate to Network Enabler TCP port 4900. Please make sure this TCP port can be used between Host and Network Enabler before using this function.


dsc_GetIPLocation

Get Network Enabler IP Location setting.

C/C++
int dsc_GetIPLocation(DS_HANDLE dshandle, int ifid, PIPLOCATIONINFO info)

Visual Basic
(Available soon)

Delphi
(Available soon)

Arguments

dshandle

[in] Handle identifying the Network Enabler returned from dsc_Attach.

ifid

[in] Network interface id. Set to 0xff to get the network interface attached to local host. To get the other network interface IP configuration, call dsc_GetIfConfig to get the correct ifid.

info

[in] Pointer to a IPLOCATIONINFO structure to receive IP location settings.

typedef struct _IPLOCATIONINFO

char loc_server[HOSTNAMELEN];

WORD loc_port;

WORD loc_period;

}IPLOCATIONINFO, *PIPLOCATIONINFO;
¡@

loc_server

IP address or DNS host name of the IP Location server. If user want Network Enabler to send the IP Location information to specified server, user must setup the IP Location server. For IP Location function, please refer to the manual.

loc_port

Specify the IP Location server listen port. Please check the IP Location server settings to get the correct value.

loc_period

Setup the IP Location report period. The unit is second. For example, if the period is 5 seconds, the IP Location information will be sent to loc_server:loc_port every 5 seconds.

Return Values

Status | Value
Succeed. | DSC_OK
Fail. DSC_SOCKET
DSC_TOUT
DSC_USER_BREAK
DSC_PARAM
DSC_FAIL

Remarks

This function uses UDP package to communicate to Network Enabler UDP port 4800. Please make sure this UDP port can be used between Host and Network Enabler before using this function.


dsc_SetIPLocation

Set Network Enabler IP Location function. User must call dsc_SaveAndRestart to make the change active.

C/C++
int dsc_SetIPLocation(DS_HANDLE dshandle, PIPLOCATIONINFO info)

Visual Basic
(Available soon)

Delphi
(Available soon)

Arguments

dshandle

[in] Handle identifying the Network Enabler returned from dsc_Attach.

info

[in] New IP location settings

typedef struct _IPLOCATIONINFO

char loc_server[HOSTNAMELEN];

WORD loc_port;

WORD loc_period;

}IPLOCATIONINFO, *PIPLOCATIONINFO;
¡@

loc_server

IP address or DNS host name of the IP Location server. If user want to send the IP Location information to specified server, user must setup the IP Location server. For IP Location function, please refer to the manual.

loc_port

Specify the IP Location server listen port. Please check the IP Location server settings to get the correct value.

loc_period

Setup the IP Location report period. The unit is second. For example, if the period is 5 seconds, the IP Location information will be sent to loc_server:loc_port every 5 seconds.

Password Protected

This function is password protected. Please call dsc_Login before using this function.

Return Values

Status | Value
Succeed. | DSC_OK
Fail. DSC_SOCKET
DSC_TOUT
DSC_USER_BREAK
DSC_PARAM
DSC_FAIL
DSC_NOT_LOGIN

Remarks

This function uses TCP package to communicate to Network Enabler TCP port 4900. Please make sure this TCP port can be used between Host and Network Enabler before using this function.


dsc_IPLocationStart

Start to wait the IP Location packet. This enables the running program to be a IP Location server.

C/C++
int dsc_IPLocationStart(IPLHANDLE *ipl_handle, DWORD local_ip, int port);

Visual Basic
(Available soon)

Delphi
(Available soon)

Arguments

ipl_handle

[out] Pointer to IPLHANDLE to receive handle for IPLocation.

local_ip

[in] IP address the local host. Specify which local network interface will be the IP Location server. This is useful to a multiple IP addresses host. For only one IP address host, this argument is optional and can be empty string ("", not NULL).

port

[in] Specify the local listen port.

Return Values

Status | Value
Succeed. | DSC_OK
Fail. | DSC_SOCKET

Remarks


dsc_IPLocationPoll

Try to check if any queued IP Location packet.

C/C++
int dsc_IPLocationPoll(IPLHANDLE ipl_handle, PIPLOCATION_DATA ipl_data);

Visual Basic
(Available soon)

Delphi
(Available soon)

Arguments

ipl_handle

[in] Handle returned by dev_IPLocationStart() function.

ipl_data

[out] Pointer to a IPLOCATION_DATA to receive the IP Location data.

typedef struct _IPLOCATION_DATA {
char
        name[SVRNAMELEN];
DWORD   apid;
WORD     hwid;
BYTE       mac[MACLEN];
DWORD   serialno;
DWORD   ip;
WORD     port;
WORD     reserve;
} IPLOCATION_DATA, *PIPLOCATION_DATA;

name

Pointer to string to receive server name, null terminated string. Maximum length is 40, null terminated char included.

apid

Application ID. This is to identify the firmware version.

hwid

Hardware ID. This is to identify the Network Enabler hardware version.

mac

6 bytes MAC address. If the MAC address is "00-90-E8-01-02-03", the MAC[0] is 0, MAC[1] is 0x90(hex), MAC[2] is 0xE8(hex), and so on. MACLEN is defined by 6.

serialno

Network Enabler serial number.

ip

Network Enabler IP address

port

Total port number of this Network Enabler.

Return Values

Status | Value
Succeed. | DSC_OK
Fail. DSC_SOCKET
DSC_FAIL

Remarks


dsc_IPLocationEnd

Stop to wait the IP Location packet.

C/C++
int dsc_IPLocationEnd(IPLHANDLE ipl_handle )

Visual Basic
(Available soon)

Delphi
(Available soon)

Arguments

ipl_handle

[in] Handle returned by dev_IPLocationStart() function.

Return Values

Status | Value
Succeed. | DSC_OK
Fail. ¡@

Remarks


dsc_Upgrade

Upgrade the firmware. Network Enabler will restart immediately while finished. This function is only for Network Enabler product, not for DE-511/SDK.

C/C++
int dsc_Upgrade(DS_HANDLE dshandle, char *filename)

Visual Basic
(Available soon)

Delphi
(Available soon)

Arguments

dshandle

[in] Handle identifying the Network Enabler returned from dsc_Attach.

filename

[in] String of the firmware file name.

Password Protected

This function is password protected. Please call dsc_Login before using this function.

Return Values

Status | Value
Succeed. | DSC_OK
Fail. DSC_SOCKET
DSC_TOUT
DSC_USER_BREAK
DSC_FAIL
DSC_PARAM
DSC_NOT_LOGIN
DSC_FOPEN_FAIL
DSC_FLASH_LEN
DSC_FILE_FORMAT

Remarks

This function uses TCP package to communicate to Network Enabler TCP port 4900. Please make sure this TCP port can be used between Host and Network Enabler before using this function.


dsc_Upgrade_WebKernel

Upgrade the web and kernel. Network Enabler will restart immediately while finished.

C/C++
int dsc_Upgrade_WebKernel(DS_HANDLE dshandle, char *filename, PFSINFO fsinfo)

Visual Basic
(Available soon)

Delphi
(Available soon)

Arguments

dshandle

[in] Handle identifying the Network Enabler returned from dsc_Attach.

filename

[in] String of the web file name.

fsinfo

[in] File system information return from dsc_GetFsInfo.

Password Protected

This function is password protected. Please call dsc_Login before using this function.

Return Values

Status | Value
Succeed. | DSC_OK
Fail. DSC_SOCKET
DSC_TOUT
DSC_USER_BREAK
DSC_FAIL
DSC_PARAM
DSC_NOT_LOGIN
DSC_FOPEN_FAIL
DSC_FLASH_LEN
DSC_FILE_FORMAT

Remarks

This function uses TCP package to communicate to Network Enabler TCP port 4900. Please make sure this TCP port can be used between Host and Network Enabler before using this function.


dsc_GetDSINFO

Get basic Network Enabler information.

C/C++
int dsc_GetDSINFO(DS_HANDLE dshandle, PDS_INFO dsinfo)

Visual Basic
(Available soon)

Delphi
(Available soon)

Arguments

dshandle

[in] Handle identifying the Network Enabler. This handle must be get from dsc_Attach.

dsinfo

[out] Pointer to the DS_INFO structure.

Return Values

Status | Value
Succeed. | DSC_OK
Fail. DSC_SOCKET
DSC_TOUT
DSC_USER_BREAK
DSC_PARAM
DSC_FAIL

Remarks

This function uses UDP package to communicate to Network Enabler UDP port 4800. Please make sure this UDP port can be used between Host and Network Enabler before using this function.


dsc_LibSetProc

Use this function to set callback function to the specified dshandle. DSCI library will call this function if dsc_XXX function need to be blocked for waiting timeout.

C/C++
int dsc_LibSetProc(DS_HANDLE dshandle, WNDLIBPROC lplibproc, LPVOID lpparam)

Visual Basic
(Available soon)

Delphi
(Available soon)

Arguments

dshandle

[in] Handle identifying the Network Enabler returned from dsc_Attach.

lplibproc

[out] Pointer to an application-defined callback function. For more information, see WndLibProc.

lpparam

[out] Pointer to VOID buffer to pass to lplibproc. DSCI library will pass this parameter when calling WndLibProc.

Return Values

Status | Value
Succeed. | DSC_OK


dsc_LibSetTimeout

Use this function to set the DSCI function processing timeout value (dsc_EnumSearch is not included).

C/C++
int dsc_LibSetTimeout(DS_HANDLE dshandle, int timeout, int retrycnt)

Visual Basic
(Available soon)

Delphi
(Available soon)

Arguments

dshandle

[in] Handle identifying the Network Enabler returned from dsc_Attach.

timeout

[in] Timeout value in millisecond for each retry.

retrycnt

[in] Retry count.

Return Values

Status | Value
Succeed. | DSC_OK


dsc_LibSetUpgTimeout

Use this function to set dsc_UpgradeXXX processing timeout value.

C/C++
int dsc_LibSetUpgTimeout(DS_HANDLE dshandle, DWORD timeout)

Visual Basic
(Available soon)

Delphi
(Available soon)

Arguments

dshandle

[in] Handle identifying the Network Enabler returned from dsc_Attach.

timeout

[in] Timeout value in millisecond for each retry.

Return Values

Status | Value
Succeed. | DSC_OK
Fail. | DSC_PARAM


dsc_SetSearchOpt

Use this function to set the dsc_EnumSearch processing timeout value.

C/C++
void dsc_SetSearchOpt(int timeout, int retrycnt)

Visual Basic
(Available soon)

Delphi
(Available soon)

Arguments

timeout

[in] Timeout value in millisecond for each retry.

retrycnt

[in] Retry count.


WndLibProc

The WndLibProc function is an application-defined callback function used with the all dsc_XXXX function. It receives several parameter to identify the function completed status. The WNDLIBPROC type defines a pointer to this callback function. WndLibProc is a placeholder for the application-defined function name.

C/C++
int CALLBACK WndLibProc(int func, int step, int value, LPVOID lpparam)

Visual Basic
(Available soon)

Delphi
(Available soon)

Arguments

func

[in] Identify this call back function is called within which DSCI function. The function code is defined by FUNC_SETXXX or FUNC_GETXXX in DSCI include file.

step

[in] Identify this call back function is called within which step (Connecting, transferring...). This is only used by dsc_upgradeXXX function and the value is defined by DW_XXXX in DSCI include file.

value

[in] This value is only used by ds_upgradeXXX function and the value is within 0..100. This value is to identify the complete percentage according to this step.

lpparam

[in] Pointer to VOID buffer to receive data passed from dsc_LibSetProc.

Return Values

To continue, the callback function must return non-zero value; or return zero.

Enumeration | Value
Continue | non-zero
Stop | zero

Remarks

This callback will be called if dsc_XXX function is called and blocked for waiting completion. if dsc_LibSetProc is not called after dsc_Attach or NULL callback function is set, this function will not be called.


IP address of the argument

This argument is null-terminated character string representing a number expressed in the Internet standard ".'' (dotted) notation. For Example: "192.168.1.3".


IP address or DNS host name of the argument

For IP address, this argument is null-terminated character string representing a number expressed in the Internet standard ".'' (dotted) notation. For Example: "192.168.1.3".

For DNS host name, this argument is a null-terminated string representing the time server DNS host name. For Example: "time.nist.gov". To use DNS host name in this argument, user must set the DNS server correctly with set_DNS() function.


Return Code

Value |  | Meaning | Sloution
DSC_OK | 1 | OK. | ¡@
DSC_FAIL | -1 | Fatal error. For dsc_IPLocationPoll, this means no packet received. | Reload user program.
DSC_TOUT | -2 | Timeout. | Check the target.
DSC_SOCKET | -3 | Socket fail. | Check network. Do not call WSACleanup while using DSCI Library.
DSC_USER_BREAK | -4 | User break. | ¡@
DSC_PARAM | -5 | Parameter invalid. | Check the argument. Check the dshandle.
DSC_FOPEN_FAIL | -6 | Open file failed. | Check firmware file path.
DSC_FLASH_LEN | -7 | File length error. | Check firmware file.
DSC_FIRM_FORMAT | -9 | File format error. | Check firmware file.
DSC_MAX_LIMIT | -10 | Exceed the maximum limit. | The number of Network Enabler on LAN exceeds 256.
DSC_MEM_ALLOC | -11 | Allocate memory fail. | Close unused program to get more system resource.
DSC_NOT_LOGIN | -12 | Please call dsc_Login first. | ¡@


DS_INFO

The DS_INFO structure includes the basic Network Enabler information. Including application ID, hardware ID, IP address, MAC address.

typedef struct _DS_INFO{
DWORD apid;
WORD hwid;
WORD flag;
DWORD real_ip_addr;
DWORD pseudo_ip_addr;
DWORD host_ip_addr;
BYTE MAC[MACLEN];
}DS_INFO, *PDS_INFO;

Member

apid

Application ID. This is to identify the firmware version.

hwid

Hardware ID. This is to identify the Network Enabler hardware version.

flag

Reserved for internal use. Don't modify this field.

real_ip_addr

Real IP address of the Network Enabler. In general use, user can ignore this field.

pseudo_ip_addr

Pseudo IP address of the Network Enabler. Use this address to communicate with Network Enabler.
If the Network Enabler is in the NAT private network, this is pseudo IP address assigned by NAT server. If the Network Enabler is not in the NAT environment, this filed is the same as real_ip_addr.

local_ip_addr

Local IP address of the local host. Use this filed to know Network Enabler is connected to which local IP address. This is useful on multiple-NICs host.

MAC

6 bytes MAC address. If the MAC address is "00-90-E8-01-02-03", the MAC[0] is 0, MAC[1] is 0x90(hex), MAC[2] is 0xE8(hex), and so on. MACLEN is defined by 6.

Remarks

To identify the Network Enabler model, {hwid, apid} must be checked at the same time. That is, use {hwid, apid} to identify the unique Network Enabler model.


DS_HANDLE

Handle identifying the Network Enabler returned from dsc_Attach.


dsc_GetFsInfo

Get Network Enabler file system information.

C/C++
int dsc_GetFsInfo(DS_HANDLE dshandle, PFSINFO fsinfo)

Visual Basic
(Available soon)

Delphi
(Available soon)

Arguments

dshandle

[in] Handle identifying the Network Enabler. This handle must be get from dsc_Attach.

fsinfo

[out] Pointer to FSINFO to receive file system.

typedef struct _FSINFO{
BYTE havefs;
BYTE reserved[3];
char name[FSNAME];
DWORD ver;
DWORD time;
DWORD size;
}FSINFO, *PFSINFO;

havefs

File system. 0 for no file system, 1 for has file system.

name

Name of this file system.

ver

Version of this file system.

time

This file system create time.

size

Size of this file system.

Return Values

Status | Value
Succeed. | DSC_OK
Fail. DSC_SOCKET
DSC_TOUT
DSC_USER_BREAK
DSC_PARAM
DSC_FAIL

Remarks

This function uses UDP package to communicate to Network Enabler UDP port 4800. Please make sure this UDP port can be used between Host and Network Enabler before using this function.