@@ -196,6 +196,7 @@ int getAvailableData() const;
196196 * timing out. A value of 0 means no timeout (blocking).
197197 *
198198 * @param timeout Timeout in milliseconds
199+ * @throws SerialException if setting cannot be applied
199200 */
200201void setReadTimeout (unsigned int timeout);
201202
@@ -206,14 +207,87 @@ void setReadTimeout(unsigned int timeout);
206207 * timing out. A value of 0 means no timeout (blocking).
207208 *
208209 * @param timeout Timeout in milliseconds
210+ * @throws SerialException if setting cannot be applied
209211 */
210212void setWriteTimeout (unsigned int timeout);
211213
212- // Future planned methods (not yet implemented):
213- // void setNumberBits(NumBits num_bits);
214- // void setParity(Parity parity);
215- // void setStopBits(StopBits stop_bits);
214+ /* *
215+ * @brief Sets the number of data bits per byte
216+ *
217+ * Configures the number of data bits used in each byte of serial
218+ * communication.
219+ *
220+ * @param nbits The desired number of data bits (5, 6, 7, or 8)
221+ * @throws SerialException if number of bits cannot be set
222+ */
223+ void setDataLength (DataLength nbits);
224+
225+ /* *
226+ * @brief Sets the parity configuration
227+ *
228+ * Configures the parity checking mechanism for serial communication.
229+ *
230+ * @param parity The desired parity setting (ENABLE or DISABLE)
231+ * @throws SerialException if parity cannot be set
232+ */
233+ void setParity ([[maybe_unused]] Parity parity);
234+
235+ /* *
236+ * @brief Sets the stop bits configuration
237+ *
238+ * Configures the number of stop bits used in serial communication.
239+ *
240+ * @param stop_bits The desired stop bits setting (ONE, ONE_AND_HALF, or TWO)
241+ * @throws SerialException if stop bits cannot be set
242+ */
243+ void setStopBits ([[maybe_unused]] StopBits stop_bits);
244+
245+ /* *
246+ * @brief Sets the flow control configuration
247+ *
248+ * Configures the flow control mechanism for serial communication.
249+ *
250+ * @param flow_control The desired flow control setting (HARDWARE or SOFTWARE)
251+ * @throws SerialException if flow control cannot be set
252+ */
253+ void setFlowControl ([[maybe_unused]] FlowControl flow_control);
254+
255+ /* *
256+ * @brief Sets canonical mode for input processing
257+ *
258+ * Configures whether the input is processed in canonical (line-based)
259+ * mode or non-canonical (raw) mode.
260+ *
261+ * @param canonical_mode The desired canonical mode setting (ENABLE or DISABLE)
262+ * @throws SerialException if canonical mode cannot be set
263+ */
264+ void setCanonicalMode ([[maybe_unused]] CanonicalMode canonical_mode);
265+
266+ /* *
267+ * @brief Sets the terminator character for readUntil operations
268+ *
269+ * Configures the character that signals the end of a readUntil operation.
270+ *
271+ * @param term The desired terminator character
272+ * @throws SerialException if terminator cannot be set
273+ */
274+ void setTerminator ([[maybe_unused]] Terminator term);
216275
276+ /* *
277+ * @brief Sets the read timeout in deciseconds
278+ *
279+ * @param time Timeout in deciseconds
280+ * @throws SerialException if setting cannot be applied
281+ */
282+ void setTimeOut ([[maybe_unused]] int time);
283+
284+ /* *
285+ * @brief Sets the minimum number of characters to read
286+ *
287+ * @param num Minimum number of characters to read
288+ * @throws SerialException if setting cannot be applied
289+ */
290+ void setMinNumberCharRead ([[maybe_unused]] int num);
217291
218292private:
219293/* *
0 commit comments