71 lines
1.8 KiB
C
71 lines
1.8 KiB
C
/*
|
|
************************************************************************
|
|
**
|
|
** Copyright (c) 2013 by
|
|
** Core|Vision B.V.
|
|
** Cereslaan 10b
|
|
** 5384 VT Heesch
|
|
** The Netherlands
|
|
**
|
|
** All Rights Reserved
|
|
**
|
|
************************************************************************
|
|
*/
|
|
/*
|
|
************************************************************************
|
|
**
|
|
** Project name: Dual Inventive: TCP Server
|
|
** Filename: server-port.h
|
|
** Author: Jack Weeland
|
|
** Date: February 5, 2013
|
|
** File version: $Revision: 1.2 $
|
|
** $Date: 2013/04/15 15:31:46 $
|
|
**
|
|
************************************************************************
|
|
*/
|
|
/*
|
|
************************************************************************
|
|
**
|
|
** TCP-server; communication with the ZKL3000
|
|
** Server port, which provides token parsing in the downstream (front-end
|
|
** to back-end) communication as an opposite for the client list
|
|
**
|
|
************************************************************************
|
|
*/
|
|
|
|
#ifndef _SERVER_PORT_H
|
|
#define _SERVER_PORT_H
|
|
|
|
/*
|
|
** Definitions
|
|
*/
|
|
|
|
// the server port
|
|
typedef struct SERVER_PORT *serverport_t;
|
|
|
|
/*
|
|
** Exported functions
|
|
*/
|
|
|
|
// attach fifo to the server port
|
|
int serverport_attach(serverport_t, cp3000_device_t fifo);
|
|
|
|
// forward token to the server side
|
|
int serverport_forward_token(serverport_t, token_info_t);
|
|
|
|
// process data from the server; 'p_devices' is the list with devices,
|
|
// returned by 'cp3000_select()'
|
|
// (this function is a bit silly, but it is provided to provide
|
|
// some sort of symmetry with the client list)
|
|
int serverport_process_data(
|
|
serverport_t,
|
|
const cp3000_device_t *p_device,
|
|
int n_devices
|
|
);
|
|
|
|
// initialization/destruction
|
|
serverport_t serverport_init(cp3000_device_t);
|
|
void serverport_destroy(serverport_t);
|
|
|
|
#endif /* _SERVER_PORT_H */
|