代码拉取完成,页面将自动刷新
/******************************************************************************
* Copyright (c) 2013, NULL, All rights reserved.
*
* File Name : main.c
* Description:
* Author : jiangfeng.zhang(retries@126.com)
* Date : 2018/12/18
* Version : 1.0
*
* Change Logs:
* 2018/12/18 jiangfeng.zhang : Create file.
******************************************************************************/
#ifndef _USMART_DRIVER_MODBUS_TCP_H
#define _USMART_DRIVER_MODBUS_TCP_H
#ifndef TRUE
#define TRUE 1
#endif
#ifndef FALSE
#define FALSE 0
#endif
//0x01
int ModbusTcpReadBits(int iFd,unsigned short * pusTranID,
unsigned char ucDevAddr,
int iAddr,
int iLen,
unsigned char *dest);
//0x02
int ModbusTcpReadInputBits(int iFd,unsigned short*pusTranID,
unsigned char ucDevAddr,
int iAddr,
int iLen,
unsigned char *dest);
//0x03
int ModbusTcpReadRegisters(int iFd,unsigned short * pusTranID,
unsigned char ucDevAddr,
int iAddr,
int iLen,
unsigned short *usDest);
//0x04
int ModbusTcpReadInputRegisters(int iFd,unsigned short * pusTranID,
unsigned char ucDevAddr,
int iAddr,
int iLen,
unsigned short *usDest);
//0x05
int ModbusTcpWriteBit(int iFd,unsigned short * pusTranID,
unsigned char ucDevAddr,
int iCoilAddr,
int status);
//0x06
int ModbusTcpWriteRegister(int iFd,unsigned short * pusTranID,
unsigned char ucDevAddr,
int reg_addr,
int value);
//0x0f
int ModbusTcpWriteBits(int iFd,unsigned short * pusTranID,
unsigned char ucDevAddr,
int iAddr,
int iLen,
const unsigned char *pucSrc);
//0x10
int ModbusWriteRegisters(int iFd,unsigned short * pusTranID,
unsigned char ucDevAddr,
int iAddr,
int iLen,
const unsigned short *pusSrc);
#endif
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。