亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? mb.h

?? 此為modbus/rtu 通信 ,在atmega128上調(diào)試通過,本人想做modbus/tcp的,多多交流
?? H
?? 第 1 頁 / 共 2 頁
字號:
 * \brief The main pooling loop of the Modbus protocol stack.
 *
 * This function must be called periodically. The timer interval required
 * is given by the application dependent Modbus slave timeout. Internally the
 * function calls xMBPortEventGet() and waits for an event from the receiver or
 * transmitter state machines. 
 *
 * \return If the protocol stack is not in the enabled state the function
 *   returns eMBErrorCode::MB_EILLSTATE. Otherwise it returns 
 *   eMBErrorCode::MB_ENOERR.
 */
eMBErrorCode    eMBPoll( void );

/*! \ingroup modbus
 * \brief Configure the slave id of the device.
 *
 * This function should be called when the Modbus function <em>Report Slave ID</em>
 * is enabled ( By defining MB_FUNC_OTHER_REP_SLAVEID_ENABLED in mbconfig.h ).
 *
 * \param ucSlaveID Values is returned in the <em>Slave ID</em> byte of the
 *   <em>Report Slave ID</em> response.
 * \param xIsRunning If TRUE the <em>Run Indicator Status</em> byte is set to 0xFF.
 *   otherwise the <em>Run Indicator Status</em> is 0x00.
 * \param pucAdditional Values which should be returned in the <em>Additional</em>
 *   bytes of the <em> Report Slave ID</em> response.
 * \param usAdditionalLen Length of the buffer <code>pucAdditonal</code>.
 *
 * \return If the static buffer defined by MB_FUNC_OTHER_REP_SLAVEID_BUF in
 *   mbconfig.h is to small it returns eMBErrorCode::MB_ENORES. Otherwise
 *   it returns eMBErrorCode::MB_ENOERR.
 */
eMBErrorCode    eMBSetSlaveID( UCHAR ucSlaveID, BOOL xIsRunning,
                               UCHAR const *pucAdditional,
                               USHORT usAdditionalLen );

/*! \ingroup modbus
 * \brief Registers a callback handler for a given function code.
 *
 * This function registers a new callback handler for a given function code.
 * The callback handler supplied is responsible for interpreting the Modbus PDU and
 * the creation of an appropriate response. In case of an error it should return
 * one of the possible Modbus exceptions which results in a Modbus exception frame
 * sent by the protocol stack. 
 *
 * \param ucFunctionCode The Modbus function code for which this handler should
 *   be registers. Valid function codes are in the range 1 to 127.
 * \param pxHandler The function handler which should be called in case
 *   such a frame is received. If \c NULL a previously registered function handler
 *   for this function code is removed.
 *
 * \return eMBErrorCode::MB_ENOERR if the handler has been installed. If no
 *   more resources are available it returns eMBErrorCode::MB_ENORES. In this
 *   case the values in mbconfig.h should be adjusted. If the argument was not
 *   valid it returns eMBErrorCode::MB_EINVAL.
 */
eMBErrorCode    eMBRegisterCB( UCHAR ucFunctionCode, 
                               pxMBFunctionHandler pxHandler );

/* ----------------------- Callback -----------------------------------------*/

/*! \defgroup modbus_registers Modbus Registers
 * \code #include "mb.h" \endcode
 * The protocol stack does not internally allocate any memory for the
 * registers. This makes the protocol stack very small and also usable on
 * low end targets. In addition the values don't have to be in the memory
 * and could for example be stored in a flash.<br>
 * Whenever the protocol stack requires a value it calls one of the callback
 * function with the register address and the number of registers to read
 * as an argument. The application should then read the actual register values
 * (for example the ADC voltage) and should store the result in the supplied
 * buffer.<br>
 * If the protocol stack wants to update a register value because a write
 * register function was received a buffer with the new register values is
 * passed to the callback function. The function should then use these values
 * to update the application register values.
 */

/*! \ingroup modbus_registers
 * \brief Callback function used if the value of a <em>Input Register</em>
 *   is required by the protocol stack. The starting register address is given
 *   by \c usAddress and the last register is given by <tt>usAddress +
 *   usNRegs - 1</tt>.
 *
 * \param pucRegBuffer A buffer where the callback function should write
 *   the current value of the modbus registers to.
 * \param usAddress The starting address of the register. Input registers
 *   are in the range 1 - 65535.
 * \param usNRegs Number of registers the callback function must supply.
 *
 * \return The function must return one of the following error codes:
 *   - eMBErrorCode::MB_ENOERR If no error occurred. In this case a normal
 *       Modbus response is sent.
 *   - eMBErrorCode::MB_ENOREG If the application can not supply values
 *       for registers within this range. In this case a 
 *       <b>ILLEGAL DATA ADDRESS</b> exception frame is sent as a response.
 *   - eMBErrorCode::MB_ETIMEDOUT If the requested register block is
 *       currently not available and the application dependent response
 *       timeout would be violated. In this case a <b>SLAVE DEVICE BUSY</b>
 *       exception is sent as a response.
 *   - eMBErrorCode::MB_EIO If an unrecoverable error occurred. In this case
 *       a <b>SLAVE DEVICE FAILURE</b> exception is sent as a response.
 */
eMBErrorCode    eMBRegInputCB( UCHAR * pucRegBuffer, USHORT usAddress,
                               USHORT usNRegs );

/*! \ingroup modbus_registers
 * \brief Callback function used if a <em>Holding Register</em> value is
 *   read or written by the protocol stack. The starting register address
 *   is given by \c usAddress and the last register is given by
 *   <tt>usAddress + usNRegs - 1</tt>.
 *
 * \param pucRegBuffer If the application registers values should be updated the
 *   buffer points to the new registers values. If the protocol stack needs
 *   to now the current values the callback function should write them into
 *   this buffer.
 * \param usAddress The starting address of the register.
 * \param usNRegs Number of registers to read or write.
 * \param eMode If eMBRegisterMode::MB_REG_WRITE the application register 
 *   values should be updated from the values in the buffer. For example
 *   this would be the case when the Modbus master has issued an 
 *   <b>WRITE SINGLE REGISTER</b> command.
 *   If the value eMBRegisterMode::MB_REG_READ the application should copy 
 *   the current values into the buffer \c pucRegBuffer.
 *
 * \return The function must return one of the following error codes:
 *   - eMBErrorCode::MB_ENOERR If no error occurred. In this case a normal
 *       Modbus response is sent.
 *   - eMBErrorCode::MB_ENOREG If the application can not supply values
 *       for registers within this range. In this case a 
 *       <b>ILLEGAL DATA ADDRESS</b> exception frame is sent as a response.
 *   - eMBErrorCode::MB_ETIMEDOUT If the requested register block is
 *       currently not available and the application dependent response
 *       timeout would be violated. In this case a <b>SLAVE DEVICE BUSY</b>
 *       exception is sent as a response.
 *   - eMBErrorCode::MB_EIO If an unrecoverable error occurred. In this case
 *       a <b>SLAVE DEVICE FAILURE</b> exception is sent as a response.
 */
eMBErrorCode    eMBRegHoldingCB( UCHAR * pucRegBuffer, USHORT usAddress,
                                 USHORT usNRegs, eMBRegisterMode eMode );

/*! \ingroup modbus_registers
 * \brief Callback function used if a <em>Coil Register</em> value is
 *   read or written by the protocol stack. If you are going to use
 *   this function you might use the functions xMBUtilSetBits(  ) and
 *   xMBUtilGetBits(  ) for working with bitfields.
 *
 * \param pucRegBuffer The bits are packed in bytes where the first coil
 *   starting at address \c usAddress is stored in the LSB of the
 *   first byte in the buffer <code>pucRegBuffer</code>.
 *   If the buffer should be written by the callback function unused
 *   coil values (I.e. if not a multiple of eight coils is used) should be set
 *   to zero.
 * \param usAddress The first coil number.
 * \param usNCoils Number of coil values requested.
 * \param eMode If eMBRegisterMode::MB_REG_WRITE the application values should
 *   be updated from the values supplied in the buffer \c pucRegBuffer.
 *   If eMBRegisterMode::MB_REG_READ the application should store the current
 *   values in the buffer \c pucRegBuffer.
 *
 * \return The function must return one of the following error codes:
 *   - eMBErrorCode::MB_ENOERR If no error occurred. In this case a normal
 *       Modbus response is sent.
 *   - eMBErrorCode::MB_ENOREG If the application does not map an coils
 *       within the requested address range. In this case a 
 *       <b>ILLEGAL DATA ADDRESS</b> is sent as a response.
 *   - eMBErrorCode::MB_ETIMEDOUT If the requested register block is
 *       currently not available and the application dependent response
 *       timeout would be violated. In this case a <b>SLAVE DEVICE BUSY</b>
 *       exception is sent as a response.
 *   - eMBErrorCode::MB_EIO If an unrecoverable error occurred. In this case
 *       a <b>SLAVE DEVICE FAILURE</b> exception is sent as a response.
 */
eMBErrorCode    eMBRegCoilsCB( UCHAR * pucRegBuffer, USHORT usAddress,
                               USHORT usNCoils, eMBRegisterMode eMode );

/*! \ingroup modbus_registers
 * \brief Callback function used if a <em>Input Discrete Register</em> value is
 *   read by the protocol stack.
 *
 * If you are going to use his function you might use the functions
 * xMBUtilSetBits(  ) and xMBUtilGetBits(  ) for working with bitfields.
 *
 * \param pucRegBuffer The buffer should be updated with the current
 *   coil values. The first discrete input starting at \c usAddress must be
 *   stored at the LSB of the first byte in the buffer. If the requested number
 *   is not a multiple of eight the remaining bits should be set to zero.
 * \param usAddress The starting address of the first discrete input.
 * \param usNDiscrete Number of discrete input values.
 * \return The function must return one of the following error codes:
 *   - eMBErrorCode::MB_ENOERR If no error occurred. In this case a normal
 *       Modbus response is sent.
 *   - eMBErrorCode::MB_ENOREG If no such discrete inputs exists.
 *       In this case a <b>ILLEGAL DATA ADDRESS</b> exception frame is sent 
 *       as a response.
 *   - eMBErrorCode::MB_ETIMEDOUT If the requested register block is
 *       currently not available and the application dependent response
 *       timeout would be violated. In this case a <b>SLAVE DEVICE BUSY</b>
 *       exception is sent as a response.
 *   - eMBErrorCode::MB_EIO If an unrecoverable error occurred. In this case
 *       a <b>SLAVE DEVICE FAILURE</b> exception is sent as a response.
 */
eMBErrorCode    eMBRegDiscreteCB( UCHAR * pucRegBuffer, USHORT usAddress,
                                  USHORT usNDiscrete );

#ifdef __cplusplus
PR_END_EXTERN_C
#endif
#endif

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
一区二区在线电影| 美国三级日本三级久久99 | 日韩午夜在线播放| 国产蜜臀av在线一区二区三区| 一区二区三区四区不卡视频| 国产一区二区三区在线看麻豆| 欧美午夜精品久久久久久孕妇| 国产偷国产偷精品高清尤物| 日韩精品午夜视频| 欧美图区在线视频| 亚洲欧美视频在线观看| 国产成人亚洲综合a∨婷婷图片| 欧美一区二区三区婷婷月色| 亚洲国产精品自拍| 92国产精品观看| 最新国产の精品合集bt伙计| 国产精品1区2区| 久久久不卡影院| 极品尤物av久久免费看| 日韩美女视频在线| 久久精品国产亚洲5555| 久久精品视频一区二区三区| 激情都市一区二区| 亚洲在线观看免费| 色综合天天性综合| 欧美国产精品一区二区三区| 麻豆视频观看网址久久| 51午夜精品国产| 日韩一区精品视频| 91精品国产免费| 热久久免费视频| 日韩午夜小视频| 韩国欧美一区二区| 国产偷国产偷精品高清尤物| 国产成人av在线影院| 欧美激情一区二区三区在线| 成人听书哪个软件好| 中文字幕中文字幕中文字幕亚洲无线| 国产精品中文字幕日韩精品| 国产丝袜在线精品| 国产成人丝袜美腿| 亚洲美女屁股眼交| 欧美精品一二三区| 精品一区二区免费在线观看| 国产欧美一区二区精品性| 99在线精品视频| 亚洲国产精品天堂| 欧美va日韩va| 国产精品1024| 亚洲国产毛片aaaaa无费看| 91精品在线免费观看| 久久99九九99精品| 国产精品国产三级国产aⅴ无密码| 91年精品国产| 国产成人免费高清| 一区二区三区在线看| 制服丝袜日韩国产| 狠狠色丁香婷婷综合| 亚洲欧洲99久久| 欧美美女一区二区| www.一区二区| 日日夜夜免费精品| 国产三级一区二区| 欧美老年两性高潮| 高清不卡一二三区| 亚洲不卡一区二区三区| 久久久美女毛片| 欧美日韩在线播放一区| 国产乱码精品一区二区三区五月婷| 专区另类欧美日韩| 欧美电视剧免费观看| 97se亚洲国产综合在线| 毛片av一区二区三区| 欧美一区二区三区免费观看视频| 亚洲精品日产精品乱码不卡| 另类小说欧美激情| 99久久久久久99| 亚洲精品视频在线| 2022国产精品视频| 欧美视频一区二区在线观看| 国产精品69毛片高清亚洲| 午夜成人免费电影| 中文字幕日韩精品一区| 欧美精品一区男女天堂| 欧美日韩色综合| 99视频有精品| 国产精品亚洲人在线观看| 日本怡春院一区二区| 一区二区三区不卡在线观看| 久久久久综合网| 欧美一区二区三区电影| 色国产综合视频| av午夜精品一区二区三区| 国内精品视频666| 久久av中文字幕片| 婷婷中文字幕一区三区| 怡红院av一区二区三区| 欧美国产一区在线| 久久夜色精品国产噜噜av| 欧美电影一区二区三区| 色婷婷久久久亚洲一区二区三区| 不卡一区二区在线| 国产精华液一区二区三区| 国产在线国偷精品产拍免费yy| 日韩中文字幕亚洲一区二区va在线| 一区二区在线观看不卡| 亚洲欧美日韩电影| 亚洲人成在线观看一区二区| 成人免费在线观看入口| 日韩理论电影院| 亚洲精选免费视频| 一区二区三区四区中文字幕| 中文字幕日韩av资源站| 亚洲天堂2014| 亚洲乱码国产乱码精品精的特点 | 欧美精品三级日韩久久| 色悠久久久久综合欧美99| 99久久婷婷国产| 91久久人澡人人添人人爽欧美| 成人91在线观看| 色综合天天综合色综合av| 一本久久a久久免费精品不卡| 色噜噜狠狠一区二区三区果冻| 色哟哟国产精品| 欧美日韩在线一区二区| 欧美精品乱码久久久久久| 91麻豆精品国产91久久久更新时间| 在线电影院国产精品| 欧美大白屁股肥臀xxxxxx| 精品成人一区二区三区四区| 久久久久97国产精华液好用吗| 久久久久97国产精华液好用吗| 欧美极品另类videosde| 亚洲男人天堂av网| 日韩国产在线观看一区| 精品一区二区免费| 99亚偷拍自图区亚洲| 欧美日韩视频在线一区二区| 精品国产区一区| 综合色中文字幕| 日韩国产精品久久| 福利一区在线观看| 在线亚洲精品福利网址导航| 日韩三级视频在线观看| 欧美韩国日本一区| 五月综合激情婷婷六月色窝| 久久99国产精品尤物| www.欧美日韩| 欧美精品1区2区| 久久久美女毛片| 欧美日韩视频在线观看一区二区三区| 精品福利二区三区| 亚洲一区欧美一区| 欧美tk—视频vk| 国产精品视频看| 不卡在线观看av| 欧美精品成人一区二区三区四区| 久久精品男人的天堂| 亚洲国产精品精华液网站| 黄色资源网久久资源365| 在线精品亚洲一区二区不卡| 久久综合精品国产一区二区三区| 一区二区三区中文字幕精品精品| 蜜臀av国产精品久久久久| 97精品久久久午夜一区二区三区 | 国产激情偷乱视频一区二区三区| 色综合天天综合网国产成人综合天 | 成人黄色电影在线| 69久久夜色精品国产69蝌蚪网| 国产精品护士白丝一区av| 麻豆成人免费电影| 欧美曰成人黄网| 国产精品久久久久久久久动漫 | 精品国产成人系列| 亚洲综合色视频| 99久久伊人精品| 欧美国产综合色视频| 韩国成人福利片在线播放| 欧美日韩国产另类一区| 亚洲九九爱视频| 91在线视频18| 青青草国产精品97视觉盛宴| 欧洲精品中文字幕| 一区二区三区中文在线| voyeur盗摄精品| 国产欧美日韩久久| 日本91福利区| 国产亚洲成年网址在线观看| 不卡的av电影在线观看| 亚洲乱码日产精品bd| 国产精品久久久一本精品| 国产在线国偷精品免费看| 56国语精品自产拍在线观看| 亚洲国产综合色| 欧美剧在线免费观看网站| 午夜影视日本亚洲欧洲精品| 欧美色老头old∨ideo| 午夜视频一区二区| 欧美日韩国产另类不卡| 日韩高清不卡在线|