Modified version of ModbusTCP

Dependencies:   EthernetNetIf mbed

Committer:
paleskyjp
Date:
Tue Mar 13 09:11:49 2012 +0000
Revision:
0:62be54b8975d
The first modification of ModbusTCP

Who changed what in which revision?

UserRevisionLine numberNew contents of line
paleskyjp 0:62be54b8975d 1 /*
paleskyjp 0:62be54b8975d 2 * FreeModbus Libary: A portable Modbus implementation for Modbus ASCII/RTU.
paleskyjp 0:62be54b8975d 3 * Copyright (c) 2006 Christian Walter <wolti@sil.at>
paleskyjp 0:62be54b8975d 4 * All rights reserved.
paleskyjp 0:62be54b8975d 5 *
paleskyjp 0:62be54b8975d 6 * Redistribution and use in source and binary forms, with or without
paleskyjp 0:62be54b8975d 7 * modification, are permitted provided that the following conditions
paleskyjp 0:62be54b8975d 8 * are met:
paleskyjp 0:62be54b8975d 9 * 1. Redistributions of source code must retain the above copyright
paleskyjp 0:62be54b8975d 10 * notice, this list of conditions and the following disclaimer.
paleskyjp 0:62be54b8975d 11 * 2. Redistributions in binary form must reproduce the above copyright
paleskyjp 0:62be54b8975d 12 * notice, this list of conditions and the following disclaimer in the
paleskyjp 0:62be54b8975d 13 * documentation and/or other materials provided with the distribution.
paleskyjp 0:62be54b8975d 14 * 3. The name of the author may not be used to endorse or promote products
paleskyjp 0:62be54b8975d 15 * derived from this software without specific prior written permission.
paleskyjp 0:62be54b8975d 16 *
paleskyjp 0:62be54b8975d 17 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
paleskyjp 0:62be54b8975d 18 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
paleskyjp 0:62be54b8975d 19 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
paleskyjp 0:62be54b8975d 20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
paleskyjp 0:62be54b8975d 21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
paleskyjp 0:62be54b8975d 22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
paleskyjp 0:62be54b8975d 23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
paleskyjp 0:62be54b8975d 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
paleskyjp 0:62be54b8975d 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
paleskyjp 0:62be54b8975d 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
paleskyjp 0:62be54b8975d 27 *
paleskyjp 0:62be54b8975d 28 * File: $Id: mbfunc.h,v 1.12 2006/12/07 22:10:34 wolti Exp $
paleskyjp 0:62be54b8975d 29 */
paleskyjp 0:62be54b8975d 30
paleskyjp 0:62be54b8975d 31 #ifndef _MB_FUNC_H
paleskyjp 0:62be54b8975d 32 #define _MB_FUNC_H
paleskyjp 0:62be54b8975d 33
paleskyjp 0:62be54b8975d 34 #ifdef __cplusplus
paleskyjp 0:62be54b8975d 35 PR_BEGIN_EXTERN_C
paleskyjp 0:62be54b8975d 36 #endif
paleskyjp 0:62be54b8975d 37 #if MB_FUNC_OTHER_REP_SLAVEID_BUF > 0
paleskyjp 0:62be54b8975d 38 eMBException eMBFuncReportSlaveID( UCHAR * pucFrame, USHORT * usLen );
paleskyjp 0:62be54b8975d 39 #endif
paleskyjp 0:62be54b8975d 40
paleskyjp 0:62be54b8975d 41 #if MB_FUNC_READ_INPUT_ENABLED > 0
paleskyjp 0:62be54b8975d 42 eMBException eMBFuncReadInputRegister( UCHAR * pucFrame, USHORT * usLen );
paleskyjp 0:62be54b8975d 43 #endif
paleskyjp 0:62be54b8975d 44
paleskyjp 0:62be54b8975d 45 #if MB_FUNC_READ_HOLDING_ENABLED > 0
paleskyjp 0:62be54b8975d 46 eMBException eMBFuncReadHoldingRegister( UCHAR * pucFrame, USHORT * usLen );
paleskyjp 0:62be54b8975d 47 #endif
paleskyjp 0:62be54b8975d 48
paleskyjp 0:62be54b8975d 49 #if MB_FUNC_WRITE_HOLDING_ENABLED > 0
paleskyjp 0:62be54b8975d 50 eMBException eMBFuncWriteHoldingRegister( UCHAR * pucFrame, USHORT * usLen );
paleskyjp 0:62be54b8975d 51 #endif
paleskyjp 0:62be54b8975d 52
paleskyjp 0:62be54b8975d 53 #if MB_FUNC_WRITE_MULTIPLE_HOLDING_ENABLED > 0
paleskyjp 0:62be54b8975d 54 eMBException eMBFuncWriteMultipleHoldingRegister( UCHAR * pucFrame, USHORT * usLen );
paleskyjp 0:62be54b8975d 55 #endif
paleskyjp 0:62be54b8975d 56
paleskyjp 0:62be54b8975d 57 #if MB_FUNC_READ_COILS_ENABLED > 0
paleskyjp 0:62be54b8975d 58 eMBException eMBFuncReadCoils( UCHAR * pucFrame, USHORT * usLen );
paleskyjp 0:62be54b8975d 59 #endif
paleskyjp 0:62be54b8975d 60
paleskyjp 0:62be54b8975d 61 #if MB_FUNC_WRITE_COIL_ENABLED > 0
paleskyjp 0:62be54b8975d 62 eMBException eMBFuncWriteCoil( UCHAR * pucFrame, USHORT * usLen );
paleskyjp 0:62be54b8975d 63 #endif
paleskyjp 0:62be54b8975d 64
paleskyjp 0:62be54b8975d 65 #if MB_FUNC_WRITE_MULTIPLE_COILS_ENABLED > 0
paleskyjp 0:62be54b8975d 66 eMBException eMBFuncWriteMultipleCoils( UCHAR * pucFrame, USHORT * usLen );
paleskyjp 0:62be54b8975d 67 #endif
paleskyjp 0:62be54b8975d 68
paleskyjp 0:62be54b8975d 69 #if MB_FUNC_READ_DISCRETE_INPUTS_ENABLED > 0
paleskyjp 0:62be54b8975d 70 eMBException eMBFuncReadDiscreteInputs( UCHAR * pucFrame, USHORT * usLen );
paleskyjp 0:62be54b8975d 71 #endif
paleskyjp 0:62be54b8975d 72
paleskyjp 0:62be54b8975d 73 #if MB_FUNC_READWRITE_HOLDING_ENABLED > 0
paleskyjp 0:62be54b8975d 74 eMBException eMBFuncReadWriteMultipleHoldingRegister( UCHAR * pucFrame, USHORT * usLen );
paleskyjp 0:62be54b8975d 75 #endif
paleskyjp 0:62be54b8975d 76
paleskyjp 0:62be54b8975d 77 #ifdef __cplusplus
paleskyjp 0:62be54b8975d 78 PR_END_EXTERN_C
paleskyjp 0:62be54b8975d 79 #endif
paleskyjp 0:62be54b8975d 80 #endif