MCPcopy Create free account
hub / github.com/dalathegreat/Battery-Emulator / checkData

Method checkData

Software/src/lib/eModbus-eModbus/ModbusMessage.cpp:418–428  ·  view source on GitHub ↗

1. no additional parameter (FCs 0x07, 0x0b, 0x0c, 0x11)

Source from the content-addressed store, hash-verified

416
417// 1. no additional parameter (FCs 0x07, 0x0b, 0x0c, 0x11)
418Error ModbusMessage::checkData(uint8_t serverID, uint8_t functionCode) {
419 Error returnCode = checkServerFC(serverID, functionCode);
420 if (returnCode == SUCCESS)
421 {
422 FCType ft = FCT::getType(functionCode);
423 if (ft != FC07_TYPE && ft != FCUSER && ft != FCGENERIC) {
424 returnCode = PARAMETER_COUNT_ERROR;
425 }
426 }
427 return returnCode;
428}
429
430// 2. one uint16_t parameter (FC 0x18)
431Error ModbusMessage::checkData(uint8_t serverID, uint8_t functionCode, uint16_t p1) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected