@@ -299,7 +299,7 @@ namespace qOS {
299299 /* *
300300 * @brief An AT-Command object
301301 */
302- class command : protected node {
302+ class command : protected node , private nonCopyable {
303303 private:
304304 commandCallback_t cmdCallback{ nullptr };
305305 options_t cmdOpt{ 0U };
@@ -313,10 +313,21 @@ namespace qOS {
313313 /* ! @cond */
314314 virtual ~command () {}
315315 /* ! @endcond */
316+ /* *
317+ * @brief Retrieve the command user-defined parameter.
318+ * @return @c A generic pointer to the user-defined parameter
319+ */
316320 inline void * getParam ( void ) noexcept
317321 {
318322 return param;
319323 }
324+ /* *
325+ * @brief Check if the byteBuffer instance has been initialized.
326+ * @return @c true if instance has been initialized
327+ */
328+ explicit operator bool () const noexcept {
329+ return ( nullptr != Text ) && ( nullptr != cmdCallback );
330+ }
320331 friend class qOS ::commandLineInterface;
321332 };
322333 /* * @}*/
@@ -330,7 +341,7 @@ namespace qOS {
330341 * The instance should be initialized using the commandLineInterface::setup()
331342 * method.
332343 */
333- class commandLineInterface : protected cli ::input {
344+ class commandLineInterface : protected cli ::input, private nonCopyable {
334345 private:
335346 list subscribed;
336347 cli::commandHandler handler;
@@ -462,6 +473,20 @@ namespace qOS {
462473 {
463474 handler.Data = pData;
464475 }
476+ /* *
477+ * @brief Check if the CLI instance has been initialized.
478+ * @return @c true if instance has been initialized
479+ */
480+ bool isInitialized ( void ) const {
481+ return ( nullptr != cli::input::storage );
482+ }
483+ /* *
484+ * @brief Check if the CLI instance has been initialized.
485+ * @return @c true if instance has been initialized
486+ */
487+ explicit operator bool () const noexcept {
488+ return isInitialized ();
489+ }
465490 friend class cli ::commandHandler;
466491 friend class core ;
467492 };
0 commit comments