Files
sics/multichan.h
Douglas Clowes 9298401846 Add MultiChannelController a controller with multiple channels or units on a single network connection.
r1487 | dcl | 2007-02-15 07:53:09 +1100 (Thu, 15 Feb 2007) | 2 lines
2012-11-15 12:58:59 +11:00

36 lines
1.0 KiB
C

/*
* M U L T I C H A N
*
* This module manages communications on a multi-channel controller.
*
* A multi-channel controller is one where multiple channels or units are on a
* single controller and share a single command channel.
*
* Douglas Clowes, February 2007
*
*/
#ifndef SICSMULTICHAN
#define SICSMULTICHAN
typedef struct __MultiChan MultiChan, *pMultiChan;
int MultiChanCreate(const char* controller, pMultiChan* handle);
int MultiChanDestroy(pMultiChan handle);
int MultiChanReconnect(pMultiChan handle);
mkChannel* MultiChanGetSocket(pMultiChan handle);
typedef (*MCC_Transmit)(void* context);
typedef (*MCC_Receive)(void* context, int ch);
int MultiChanEnque(pMultiChan unit, void* context, MCC_Transmit tx, MCC_Receive rx);
typedef (*MCC_Notify)(void* context, int event);
void MultiChanSetNotify(pMultiChan unit, void* context, MCC_Notify notify);
#define MCC_DISCONNECT 101
#define MCC_RECONNECT 102
int MultiChanGetTimeout(pMultiChan unit);
int MultiChanSetTimeout(pMultiChan unit, int timeout);
#endif /* SICSMULTICHAN */