ProSoft Technology MVI69-ADMNET User Manual
Page 6
Contents
MVI-ADMNET ♦ 'C' Programmable
Developer's Guide
'C' Programmable Application Development Module with Ethernet
Page 6 of 122
ProSoft Technology, Inc.
February 20, 2013
4.1.2
Header File ............................................................................................................. 56
4.1.3
Sample Code .......................................................................................................... 56
4.1.4
Multi-threading Considerations ............................................................................... 57
4.2
Development Tools ................................................................................................. 58
4.3
Theory of Operation ................................................................................................ 59
4.3.1
ADM API ................................................................................................................. 59
4.3.2
ADMNET API Architecture ...................................................................................... 59
4.4
ADM API Files......................................................................................................... 60
4.4.1
ADM Interface Structure ......................................................................................... 60
5
Application Development Function Library - ADMNET API
63
5.1
ADMNET API Functions ......................................................................................... 64
5.2
ADMNET API Initialize Functions ........................................................................... 65
ADM_init_socket ......................................................................................................................... 65
ADM_open_sk ............................................................................................................................. 66
ADM_init_UDP_buffer ................................................................................................................. 67
5.3
ADMNET API Release Socket Functions ............................................................... 68
ADM_release_sockets ................................................................................................................ 68
ADM_close_sk ............................................................................................................................ 69
5.4
ADMNET API Send Socket Functions .................................................................... 70
ADM_send_socket ...................................................................................................................... 70
ADM_send_sk ............................................................................................................................. 71
5.5
ADMNET API Receive Socket Functions ............................................................... 72
ADM_receive_socket .................................................................................................................. 72
ADM_receive_sk ......................................................................................................................... 73
ADM_receive_buffered_UDP_sk ................................................................................................ 74
5.6
ADMNET API Miscellaneous Functions ................................................................. 75
ADM_NET_GetVersionInfo ......................................................................................................... 75
ADM_is_sk_open ........................................................................................................................ 76
6
WATTCP API Functions
77
6.1
WATTCP API Functions ......................................................................................... 78
6.2
ADMNET API Initialize Functions ........................................................................... 80
sock_init ....................................................................................................................................... 80
6.3
ADMNET API System Functionality ....................................................................... 81
tcp_tick ........................................................................................................................................ 81
tcp_open ...................................................................................................................................... 82
tcp_open_fast .............................................................................................................................. 83
udp_open..................................................................................................................................... 84
udp_open_fast ............................................................................................................................. 85
resolve ......................................................................................................................................... 86
sock_mode .................................................................................................................................. 87
sock_established ......................................................................................................................... 88
ip_timer_init ................................................................................................................................. 89
ip_timer_expired .......................................................................................................................... 90
set_timeout .................................................................................................................................. 91
chk_timeout ................................................................................................................................. 92
sockerr ......................................................................................................................................... 93
sockstate ..................................................................................................................................... 94
gethostid ...................................................................................................................................... 95
6.4
ADMNET API Release Socket Functions ............................................................... 96