1- /*
1+ /*
22 * FreeModbus Libary: A portable Modbus implementation for Modbus ASCII/RTU.
33 * Copyright (c) 2006 Christian Walter <[email protected] > 44 * All rights reserved.
@@ -71,7 +71,7 @@ PR_BEGIN_EXTERN_C
7171/*! \ingroup modbus
7272 * \brief Use the default Modbus TCP port (502)
7373 */
74- #define MB_TCP_PORT_USE_DEFAULT 0
74+ #define MB_TCP_PORT_USE_DEFAULT 0
7575
7676/* ----------------------- Type definitions ---------------------------------*/
7777
@@ -97,7 +97,7 @@ PR_BEGIN_EXTERN_C
9797 * registers should be updated and reading means that the modbus protocol
9898 * stack needs to know the current register values.
9999 *
100- * \see eMBRegHoldingCB( ), eMBRegCoilsCB( ), eMBRegDiscreteCB( ) and
100+ * \see eMBRegHoldingCB( ), eMBRegCoilsCB( ), eMBRegDiscreteCB( ) and
101101 * eMBRegInputCB( ).
102102 */
103103typedef enum
@@ -142,7 +142,7 @@ typedef enum
142142 *
143143 * \return If no error occurs the function returns eMBErrorCode::MB_ENOERR.
144144 * The protocol is then in the disabled state and ready for activation
145- * by calling eMBEnable( ). Otherwise one of the following error codes
145+ * by calling eMBEnable( ). Otherwise one of the following error codes
146146 * is returned:
147147 * - eMBErrorCode::MB_EINVAL If the slave address was not valid. Valid
148148 * slave addresses are in the range 1 - 247.
@@ -171,10 +171,10 @@ eMBErrorCode eMBTCPInit( USHORT usTCPPort );
171171 * \brief Release resources used by the protocol stack.
172172 *
173173 * This function disables the Modbus protocol stack and release all
174- * hardware resources. It must only be called when the protocol stack
175- * is disabled.
174+ * hardware resources. It must only be called when the protocol stack
175+ * is disabled.
176176 *
177- * \note Note all ports implement this function. A port which wants to
177+ * \note Note all ports implement this function. A port which wants to
178178 * get an callback must define the macro MB_PORT_HAS_CLOSE to 1.
179179 *
180180 * \return If the resources where released it return eMBErrorCode::MB_ENOERR.
@@ -189,8 +189,8 @@ eMBErrorCode eMBClose( void );
189189 * This function enables processing of Modbus frames. Enabling the protocol
190190 * stack is only possible if it is in the disabled state.
191191 *
192- * \return If the protocol stack is now in the state enabled it returns
193- * eMBErrorCode::MB_ENOERR. If it was not in the disabled state it
192+ * \return If the protocol stack is now in the state enabled it returns
193+ * eMBErrorCode::MB_ENOERR. If it was not in the disabled state it
194194 * return eMBErrorCode::MB_EILLSTATE.
195195 */
196196eMBErrorCode eMBEnable ( void );
@@ -200,7 +200,7 @@ eMBErrorCode eMBEnable( void );
200200 *
201201 * This function disables processing of Modbus frames.
202202 *
203- * \return If the protocol stack has been disabled it returns
203+ * \return If the protocol stack has been disabled it returns
204204 * eMBErrorCode::MB_ENOERR. If it was not in the enabled state it returns
205205 * eMBErrorCode::MB_EILLSTATE.
206206 */
@@ -212,10 +212,10 @@ eMBErrorCode eMBDisable( void );
212212 * This function must be called periodically. The timer interval required
213213 * is given by the application dependent Modbus slave timeout. Internally the
214214 * function calls xMBPortEventGet() and waits for an event from the receiver or
215- * transmitter state machines.
215+ * transmitter state machines.
216216 *
217217 * \return If the protocol stack is not in the enabled state the function
218- * returns eMBErrorCode::MB_EILLSTATE. Otherwise it returns
218+ * returns eMBErrorCode::MB_EILLSTATE. Otherwise it returns
219219 * eMBErrorCode::MB_ENOERR.
220220 */
221221eMBErrorCode eMBPoll ( void );
@@ -249,7 +249,7 @@ eMBErrorCode eMBSetSlaveID( UCHAR ucSlaveID, BOOL xIsRunning,
249249 * The callback handler supplied is responsible for interpreting the Modbus PDU and
250250 * the creation of an appropriate response. In case of an error it should return
251251 * one of the possible Modbus exceptions which results in a Modbus exception frame
252- * sent by the protocol stack.
252+ * sent by the protocol stack.
253253 *
254254 * \param ucFunctionCode The Modbus function code for which this handler should
255255 * be registers. Valid function codes are in the range 1 to 127.
@@ -262,7 +262,7 @@ eMBErrorCode eMBSetSlaveID( UCHAR ucSlaveID, BOOL xIsRunning,
262262 * case the values in mbconfig.h should be adjusted. If the argument was not
263263 * valid it returns eMBErrorCode::MB_EINVAL.
264264 */
265- eMBErrorCode eMBRegisterCB ( UCHAR ucFunctionCode ,
265+ eMBErrorCode eMBRegisterCB ( UCHAR ucFunctionCode ,
266266 pxMBFunctionHandler pxHandler );
267267
268268/* ----------------------- Callback -----------------------------------------*/
@@ -300,7 +300,7 @@ eMBErrorCode eMBRegisterCB( UCHAR ucFunctionCode,
300300 * - eMBErrorCode::MB_ENOERR If no error occurred. In this case a normal
301301 * Modbus response is sent.
302302 * - eMBErrorCode::MB_ENOREG If the application can not supply values
303- * for registers within this range. In this case a
303+ * for registers within this range. In this case a
304304 * <b>ILLEGAL DATA ADDRESS</b> exception frame is sent as a response.
305305 * - eMBErrorCode::MB_ETIMEDOUT If the requested register block is
306306 * currently not available and the application dependent response
@@ -324,18 +324,18 @@ eMBErrorCode eMBRegInputCB( UCHAR * pucRegBuffer, USHORT usAddress,
324324 * this buffer.
325325 * \param usAddress The starting address of the register.
326326 * \param usNRegs Number of registers to read or write.
327- * \param eMode If eMBRegisterMode::MB_REG_WRITE the application register
327+ * \param eMode If eMBRegisterMode::MB_REG_WRITE the application register
328328 * values should be updated from the values in the buffer. For example
329- * this would be the case when the Modbus master has issued an
329+ * this would be the case when the Modbus master has issued an
330330 * <b>WRITE SINGLE REGISTER</b> command.
331- * If the value eMBRegisterMode::MB_REG_READ the application should copy
331+ * If the value eMBRegisterMode::MB_REG_READ the application should copy
332332 * the current values into the buffer \c pucRegBuffer.
333333 *
334334 * \return The function must return one of the following error codes:
335335 * - eMBErrorCode::MB_ENOERR If no error occurred. In this case a normal
336336 * Modbus response is sent.
337337 * - eMBErrorCode::MB_ENOREG If the application can not supply values
338- * for registers within this range. In this case a
338+ * for registers within this range. In this case a
339339 * <b>ILLEGAL DATA ADDRESS</b> exception frame is sent as a response.
340340 * - eMBErrorCode::MB_ETIMEDOUT If the requested register block is
341341 * currently not available and the application dependent response
@@ -370,7 +370,7 @@ eMBErrorCode eMBRegHoldingCB( UCHAR * pucRegBuffer, USHORT usAddress,
370370 * - eMBErrorCode::MB_ENOERR If no error occurred. In this case a normal
371371 * Modbus response is sent.
372372 * - eMBErrorCode::MB_ENOREG If the application does not map an coils
373- * within the requested address range. In this case a
373+ * within the requested address range. In this case a
374374 * <b>ILLEGAL DATA ADDRESS</b> is sent as a response.
375375 * - eMBErrorCode::MB_ETIMEDOUT If the requested register block is
376376 * currently not available and the application dependent response
@@ -399,7 +399,7 @@ eMBErrorCode eMBRegCoilsCB( UCHAR * pucRegBuffer, USHORT usAddress,
399399 * - eMBErrorCode::MB_ENOERR If no error occurred. In this case a normal
400400 * Modbus response is sent.
401401 * - eMBErrorCode::MB_ENOREG If no such discrete inputs exists.
402- * In this case a <b>ILLEGAL DATA ADDRESS</b> exception frame is sent
402+ * In this case a <b>ILLEGAL DATA ADDRESS</b> exception frame is sent
403403 * as a response.
404404 * - eMBErrorCode::MB_ETIMEDOUT If the requested register block is
405405 * currently not available and the application dependent response
0 commit comments