User`s manual

http://www.adtechcn.com 36
Chapter V Definitions of ADT8840's Library Functions
) 1. Basic parameters setup
1.1 DeviceAddr_init( )
Name void DeviceAddr_init(void)
Definition Initialization of device interface’s address
Input parameter None
Output
parameter
None
Return value None
Note Initialization should be first performed before the motion function is used
1.2 TCP_Conn ( )
Name int TCP_Conn(char *ip_addr,char *,int *err)
Definition TCP network connection
Input parameter
ip_addr IP address
mac_addr MAC address (MAC=media access control)
Output
parameter
err: to receive the wrong code; 0:OK, 1: existing connection; 2: exceed the max.
connection number
Return value Successful use of device No. (0-63); (-1): use failure
Note Network connection should be performed before the motion function is used
1.3 Close_netconn ( )
Name void Close_netconn(int dev_num)
Definition Close network connection
Input parameter dev_num: device number
Output
parameter
None
Return value
None
1.4 Close_all ( )
Name void Close_all(void)
Definition Close network connection and resources
Input parameter None
Output
parameter
None
Return value None