Home
last modified time | relevance | path

Searched refs:ucMBFrame (Results 1 – 6 of 6) sorted by relevance

/hal_espressif-3.4.0/components/freemodbus/modbus/functions/
Dmbfuncholding_m.c103 UCHAR *ucMBFrame; in eMBMasterReqWriteHoldingRegister() local
110 vMBMasterGetPDUSndBuf(&ucMBFrame); in eMBMasterReqWriteHoldingRegister()
112 ucMBFrame[MB_PDU_FUNC_OFF] = MB_FUNC_WRITE_REGISTER; in eMBMasterReqWriteHoldingRegister()
113 ucMBFrame[MB_PDU_REQ_WRITE_ADDR_OFF] = usRegAddr >> 8; in eMBMasterReqWriteHoldingRegister()
114 ucMBFrame[MB_PDU_REQ_WRITE_ADDR_OFF + 1] = usRegAddr; in eMBMasterReqWriteHoldingRegister()
115 ucMBFrame[MB_PDU_REQ_WRITE_VALUE_OFF] = usRegData >> 8; in eMBMasterReqWriteHoldingRegister()
116 ucMBFrame[MB_PDU_REQ_WRITE_VALUE_OFF + 1] = usRegData ; in eMBMasterReqWriteHoldingRegister()
173 UCHAR *ucMBFrame; in eMBMasterReqWriteMultipleHoldingRegister() local
181 vMBMasterGetPDUSndBuf(&ucMBFrame); in eMBMasterReqWriteMultipleHoldingRegister()
183 ucMBFrame[MB_PDU_FUNC_OFF] = MB_FUNC_WRITE_MULTIPLE_REGISTERS; in eMBMasterReqWriteMultipleHoldingRegister()
[all …]
Dmbfunccoils_m.c91 UCHAR *ucMBFrame; in eMBMasterReqReadCoils() local
98 vMBMasterGetPDUSndBuf(&ucMBFrame); in eMBMasterReqReadCoils()
100 ucMBFrame[MB_PDU_FUNC_OFF] = MB_FUNC_READ_COILS; in eMBMasterReqReadCoils()
101 ucMBFrame[MB_PDU_REQ_READ_ADDR_OFF] = usCoilAddr >> 8; in eMBMasterReqReadCoils()
102 ucMBFrame[MB_PDU_REQ_READ_ADDR_OFF + 1] = usCoilAddr; in eMBMasterReqReadCoils()
103 ucMBFrame[MB_PDU_REQ_READ_COILCNT_OFF ] = usNCoils >> 8; in eMBMasterReqReadCoils()
104 ucMBFrame[MB_PDU_REQ_READ_COILCNT_OFF + 1] = usNCoils; in eMBMasterReqReadCoils()
116 UCHAR *ucMBFrame; in eMBMasterFuncReadCoils() local
131 vMBMasterGetPDUSndBuf(&ucMBFrame); in eMBMasterFuncReadCoils()
132 usRegAddress = ( USHORT )( ucMBFrame[MB_PDU_REQ_READ_ADDR_OFF] << 8 ); in eMBMasterFuncReadCoils()
[all …]
Dmbfuncinput_m.c74 UCHAR *ucMBFrame; in eMBMasterReqReadInputRegister() local
81 vMBMasterGetPDUSndBuf(&ucMBFrame); in eMBMasterReqReadInputRegister()
83 ucMBFrame[MB_PDU_FUNC_OFF] = MB_FUNC_READ_INPUT_REGISTER; in eMBMasterReqReadInputRegister()
84 ucMBFrame[MB_PDU_REQ_READ_ADDR_OFF] = usRegAddr >> 8; in eMBMasterReqReadInputRegister()
85 ucMBFrame[MB_PDU_REQ_READ_ADDR_OFF + 1] = usRegAddr; in eMBMasterReqReadInputRegister()
86 ucMBFrame[MB_PDU_REQ_READ_REGCNT_OFF] = usNRegs >> 8; in eMBMasterReqReadInputRegister()
87 ucMBFrame[MB_PDU_REQ_READ_REGCNT_OFF + 1] = usNRegs; in eMBMasterReqReadInputRegister()
98 UCHAR *ucMBFrame; in eMBMasterFuncReadInputRegister() local
112 vMBMasterGetPDUSndBuf(&ucMBFrame); in eMBMasterFuncReadInputRegister()
113 usRegAddress = ( USHORT )( ucMBFrame[MB_PDU_REQ_READ_ADDR_OFF] << 8 ); in eMBMasterFuncReadInputRegister()
[all …]
Dmbfuncdisc_m.c75 UCHAR *ucMBFrame; in eMBMasterReqReadDiscreteInputs() local
82 vMBMasterGetPDUSndBuf(&ucMBFrame); in eMBMasterReqReadDiscreteInputs()
84 ucMBFrame[MB_PDU_FUNC_OFF] = MB_FUNC_READ_DISCRETE_INPUTS; in eMBMasterReqReadDiscreteInputs()
85 ucMBFrame[MB_PDU_REQ_READ_ADDR_OFF] = usDiscreteAddr >> 8; in eMBMasterReqReadDiscreteInputs()
86 ucMBFrame[MB_PDU_REQ_READ_ADDR_OFF + 1] = usDiscreteAddr; in eMBMasterReqReadDiscreteInputs()
87 ucMBFrame[MB_PDU_REQ_READ_DISCCNT_OFF ] = usNDiscreteIn >> 8; in eMBMasterReqReadDiscreteInputs()
88 ucMBFrame[MB_PDU_REQ_READ_DISCCNT_OFF + 1] = usNDiscreteIn; in eMBMasterReqReadDiscreteInputs()
102 UCHAR *ucMBFrame; in eMBMasterFuncReadDiscreteInputs() local
114 vMBMasterGetPDUSndBuf(&ucMBFrame); in eMBMasterFuncReadDiscreteInputs()
115 usRegAddress = ( USHORT )( ucMBFrame[MB_PDU_REQ_READ_ADDR_OFF] << 8 ); in eMBMasterFuncReadDiscreteInputs()
[all …]
/hal_espressif-3.4.0/components/freemodbus/modbus/
Dmb_m.c306 static UCHAR *ucMBFrame = NULL; in eMBMasterPoll() local
336 vMBMasterGetPDUSndBuf( &ucMBFrame ); in eMBMasterPoll()
337 …ESP_LOG_BUFFER_HEX_LEVEL("POLL transmit buffer", (void*)ucMBFrame, usMBMasterGetPDUSndLength(), ES… in eMBMasterPoll()
338 …eStatus = peMBMasterFrameSendCur( ucMBMasterGetDestAddress(), ucMBFrame, usMBMasterGetPDUSndLength… in eMBMasterPoll()
346 …ESP_LOG_BUFFER_HEX_LEVEL("POLL sent buffer", (void*)ucMBFrame, usMBMasterGetPDUSndLength(), ESP_LO… in eMBMasterPoll()
349 eStatus = peMBMasterFrameReceiveCur( &ucRcvAddress, &ucMBFrame, &usLength); in eMBMasterPoll()
357 …ESP_LOG_BUFFER_HEX_LEVEL("POLL receive buffer", (void*)ucMBFrame, (uint16_t)usLength, ESP_LOG_DEBU… in eMBMasterPoll()
368 if ( !ucMBFrame ) in eMBMasterPoll()
373 ucFunctionCode = ucMBFrame[MB_PDU_FUNC_OFF]; in eMBMasterPoll()
378 eException = (eMBException)ucMBFrame[MB_PDU_DATA_OFF]; in eMBMasterPoll()
[all …]
Dmb.c335 static UCHAR *ucMBFrame = NULL; in eMBPoll() local
363 eStatus = peMBFrameReceiveCur( &ucRcvAddress, &ucMBFrame, &usLength ); in eMBPoll()
370 … ESP_LOG_BUFFER_HEX_LEVEL(MB_PORT_TAG, &ucMBFrame[MB_PDU_FUNC_OFF], usLength, ESP_LOG_DEBUG); in eMBPoll()
376 if ( !ucMBFrame ) { in eMBPoll()
380 ucFunctionCode = ucMBFrame[MB_PDU_FUNC_OFF]; in eMBPoll()
391 eException = xFuncHandlers[i].pxHandler( ucMBFrame, &usLength ); in eMBPoll()
404 ucMBFrame[usLength++] = ( UCHAR )( ucFunctionCode | MB_FUNC_ERROR ); in eMBPoll()
405 ucMBFrame[usLength++] = eException; in eMBPoll()
411 eStatus = peMBFrameSendCur( ucMBAddress, ucMBFrame, usLength ); in eMBPoll()