mbrtu.h
Upload User: kongshuqi
Upload Date: 2013-10-09
Package Size: 59k
Code Size: 2k
Category:

Communication

Development Platform:

Visual C++

  1.  /*
  2.   * FreeModbus Libary: A portable Modbus implementation for Modbus ASCII/RTU.
  3.   * Copyright (C) 2006 Christian Walter <wolti@sil.at>
  4.   *
  5.   * This library is free software; you can redistribute it and/or
  6.   * modify it under the terms of the GNU Lesser General Public
  7.   * License as published by the Free Software Foundation; either
  8.   * version 2.1 of the License, or (at your option) any later version.
  9.   *
  10.   * This library is distributed in the hope that it will be useful,
  11.   * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12.   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  13.   * Lesser General Public License for more details.
  14.   *
  15.   * You should have received a copy of the GNU Lesser General Public
  16.   * License along with this library; if not, write to the Free Software
  17.   * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  18.   *
  19.   * File: $Id: mbrtu.h,v 1.7 2006/06/18 09:57:03 wolti Exp $
  20.   */
  21. #ifndef _MB_RTU_H
  22. #define _MB_RTU_H
  23. #ifdef __cplusplus
  24. PR_BEGIN_EXTERN_C
  25. #endif
  26. eMBErrorCode    eMBRTUInit( UCHAR slaveAddress, UCHAR ucPort, ULONG ulBaudRate,
  27.                            eMBParity eParity );
  28. void            eMBRTUStart( void );
  29. void            eMBRTUStop( void );
  30. eMBErrorCode    eMBRTUReceive( UCHAR * pucRcvAddress, UCHAR ** pucFrame,
  31.                                USHORT * pusLength );
  32. eMBErrorCode    eMBRTUSend( UCHAR slaveAddress, const UCHAR * pucFrame,
  33.                             USHORT usLength );
  34. BOOL            xMBRTUReceiveFSM( void );
  35. BOOL            xMBRTUTransmitFSM( void );
  36. BOOL            xMBRTUTimerT15Expired( void );
  37. BOOL            xMBRTUTimerT35Expired( void );
  38. #ifdef __cplusplus
  39. PR_END_EXTERN_C
  40. #endif
  41. #endif