Admnet api functions – ProSoft Technology MVI69-ADMNET User Manual

Page 64

Advertising
background image

Application Development Function Library - ADMNET API

MVI-ADMNET ♦ 'C' Programmable

Developer's Guide

'C' Programmable Application Development Module with Ethernet

Page 64 of 122

ProSoft Technology, Inc.

February 20, 2013

5.1

ADMNET API Functions

This section provides detailed programming information for each of the ADMNET
API library functions. The calling convention for each API function is shown in 'C'
format.

The same set of API functions is supported for all of the modules in the MVI
family.

API library routines are categorized according to functionality.

Function Category

Function Name

Description

Initialize Socket

ADM_init_socket

Initialize number of sockets used on
each port number and assign name to
each port.

ADM_open_sk

Open and reopen each socket
separately after socket is initialized or
closed.

ADM_init_UDP_buffer

Attaches a user supplied buffer to the
UDP socket for storing the received
messages. Since the buffer is user
supplied, the user can adjust the size
to suit the application.

Release Socket

ADM_release_sockets

Release all sockets that have been
initialized using ADM_init_socket.

ADM_close_sk

Close each socket separately without
release socket.

Send Socket

ADM_send_socket

Send socket according to name assign
throughout initialization process as
either UDP or TCP. This function also
takes care of opening socket
connection.

ADM_send_sk

Send socket with previously open with
function ADM_open_sk.

Receive Socket

ADM_receive_socket

Receive socket according to name
assigned throughout initialization
process as either UDP or TCP. This
function also takes care of opening
socket connection.

ADM_receive_sk

Receive socket with previously open
with function ADM_open_sk.

ADM_receive_buffered_UDP_s
k

This function is used to receive
messages when ADM_init_UDP_buffer
is used. Received messages will be
placed in the buffer pointed to by
holdRecPtr. The parameter readLen
will be updated with the length of the
received message. The client’s IP
address will be placed in fromIP.

Miscellaneous

ADM_NET_GetVersionInfo

Get ADMNET API version information.

ADM_is_sk_open

Test if the socket is still open.

Advertising