1*10465441SEvalZero /* 2*10465441SEvalZero * FreeModbus Libary: A portable Modbus implementation for Modbus ASCII/RTU. 3*10465441SEvalZero * Copyright (c) 2006 Christian Walter <[email protected]> 4*10465441SEvalZero * All rights reserved. 5*10465441SEvalZero * 6*10465441SEvalZero * Redistribution and use in source and binary forms, with or without 7*10465441SEvalZero * modification, are permitted provided that the following conditions 8*10465441SEvalZero * are met: 9*10465441SEvalZero * 1. Redistributions of source code must retain the above copyright 10*10465441SEvalZero * notice, this list of conditions and the following disclaimer. 11*10465441SEvalZero * 2. Redistributions in binary form must reproduce the above copyright 12*10465441SEvalZero * notice, this list of conditions and the following disclaimer in the 13*10465441SEvalZero * documentation and/or other materials provided with the distribution. 14*10465441SEvalZero * 3. The name of the author may not be used to endorse or promote products 15*10465441SEvalZero * derived from this software without specific prior written permission. 16*10465441SEvalZero * 17*10465441SEvalZero * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 18*10465441SEvalZero * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 19*10465441SEvalZero * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 20*10465441SEvalZero * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 21*10465441SEvalZero * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 22*10465441SEvalZero * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23*10465441SEvalZero * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24*10465441SEvalZero * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25*10465441SEvalZero * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26*10465441SEvalZero * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27*10465441SEvalZero * 28*10465441SEvalZero * File: $Id: mbtcp.h,v 1.2 2006/12/07 22:10:34 wolti Exp $ 29*10465441SEvalZero */ 30*10465441SEvalZero 31*10465441SEvalZero #ifndef _MB_TCP_H 32*10465441SEvalZero #define _MB_TCP_H 33*10465441SEvalZero 34*10465441SEvalZero #ifdef __cplusplus 35*10465441SEvalZero PR_BEGIN_EXTERN_C 36*10465441SEvalZero #endif 37*10465441SEvalZero 38*10465441SEvalZero /* ----------------------- Defines ------------------------------------------*/ 39*10465441SEvalZero #define MB_TCP_PSEUDO_ADDRESS 255 40*10465441SEvalZero 41*10465441SEvalZero /* ----------------------- Function prototypes ------------------------------*/ 42*10465441SEvalZero eMBErrorCode eMBTCPDoInit( USHORT ucTCPPort ); 43*10465441SEvalZero void eMBTCPStart( void ); 44*10465441SEvalZero void eMBTCPStop( void ); 45*10465441SEvalZero eMBErrorCode eMBTCPReceive( UCHAR * pucRcvAddress, UCHAR ** pucFrame, 46*10465441SEvalZero USHORT * pusLength ); 47*10465441SEvalZero eMBErrorCode eMBTCPSend( UCHAR _unused, const UCHAR * pucFrame, 48*10465441SEvalZero USHORT usLength ); 49*10465441SEvalZero 50*10465441SEvalZero #ifdef __cplusplus 51*10465441SEvalZero PR_END_EXTERN_C 52*10465441SEvalZero #endif 53*10465441SEvalZero #endif 54