// Private methods void MeetAndroid::processCommand(){ if(buffer[0]-FunctionBufferOffset < FunctionBufferLenght){ void (*H_FuncPtr)(uint8_t, uint8_t) = intFunc[buffer[0]-FunctionBufferOffset]; if (H_FuncPtr != 0) { H_FuncPtr(buffer[0], getArrayLength()); } else { send("Flag not registered: "); send(buffer[0]); } } else { if (customErrorFunc) errorFunc(buffer[0], getArrayLength()); else { send("Flag out of bounds: "); send(buffer[0]); } } }
// Private methods void SerialHandler::ProcessCommand(){ if(Buffer[0] < FunctionBufferLenght){ void (*H_FuncPtr)(uint8_t[]) = intFunc[Buffer[0]]; H_FuncPtr(Buffer); } else ErrorFunc(Buffer); }