### Setup Method Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/PC/html/class_send_and_receive_arguments_1_1_send_and_receive_arguments.html Initializes the SendAndReceiveArguments class. This method should be called before starting the message loop. ```APIDOC ## Setup ### Description Initializes the SendAndReceiveArguments class. ### Method void ### Signature Setup() ``` -------------------------------- ### Setup() Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/PC/html/class_send_and_receive_1_1_send_and_receive-members.html Initializes the SendAndReceive instance. ```APIDOC ## Setup() ### Description Initializes the SendAndReceive instance. ### Method Method signature: Setup() ### Parameters None ### Response None ``` -------------------------------- ### Setup() Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/PC/html/class_send_and_receive_binary_arguments_1_1_send_and_receive_binary_arguments-members.html Initializes the SendAndReceiveBinaryArguments system. Defined in SendAndReceiveBinaryArguments.SendAndReceiveBinaryArguments. ```APIDOC ## Setup() ### Description Initializes the SendAndReceiveBinaryArguments system. ### Method (Not specified, likely a method call) ### Endpoint (Not applicable) ### Parameters (None specified) ### Request Example (Not applicable) ### Response (Not specified) ``` -------------------------------- ### Setup() Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/PC/html/class_receive_1_1_receive-members.html Initializes the receive process or prepares it for operation. ```APIDOC ## Setup() ### Description Initializes the receive process or prepares it for operation. ### Method (Implicitly called or invoked) ### Parameters None ### Response None ``` -------------------------------- ### Setup() Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/PC/html/class_send_and_receive_arguments_1_1_send_and_receive_arguments-members.html Defined in SendAndReceiveArguments.SendAndReceiveArguments. This method is part of the SendAndReceiveArguments class. ```APIDOC ## Setup() ### Description Initializes the SendAndReceiveArguments object. ### Method Method ### Parameters None ### Response None ### Request Example None ### Response Example None ``` -------------------------------- ### StartConnect Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/PC/html/class_command_messenger_1_1_connection_manager.html Start connect to device. ```APIDOC virtual void StartConnect() ``` -------------------------------- ### Setup Controller Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/PC/html/class_arduino_controller_1_1_arduino_controller.html Initializes the Arduino controller with a given form. ```APIDOC ## Setup ### Description Initializes the Arduino controller with the provided controller form. ### Method void ### Parameters #### Path Parameters - **controllerForm** (ControllerForm) - Description of the controller form object. ``` -------------------------------- ### Setup Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/PC/html/class_data_logging_1_1_temperature_control.html Initializes the TemperatureControl with a reference to the ChartForm. ```APIDOC ## Setup ### Description Initializes the TemperatureControl with a reference to the ChartForm. ### Method void ### Parameters #### Path Parameters - **chartForm** (ChartForm) - Description of the chartForm parameter. ``` -------------------------------- ### Setup Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/PC/html/class_data_logging_1_1_data_logging-members.html Sets up the DataLogging functionality with a ChartForm. ```APIDOC ## Setup(ChartForm chartForm) ### Description Sets up the DataLogging functionality with a ChartForm. ### Method void ### Parameters #### Path Parameters - **chartForm** (ChartForm) - Required - The ChartForm to use for setup. ``` -------------------------------- ### StartConnect Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/PC/html/class_command_messenger_1_1_connection_manager.html Starts the connection process to a device. ```APIDOC ## StartConnect ### Description Start connect to device. ### Method virtual void ### Endpoint StartConnect() ``` -------------------------------- ### StartTest Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/PC/html/class_command_messenger_tests_1_1_common-members.html Starts a new test. ```APIDOC ## StartTest(string testDescription) ### Description Starts a new test. ### Method static ### Parameters #### Path Parameters - **testDescription** (string) - Required - A description of the test. ``` -------------------------------- ### SetupConnection Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/PC/html/class_command_messenger_tests_1_1_setup_connection-members.html Initializes the connection setup for Command Messenger tests. ```APIDOC ## SetupConnection(systemSettings systemSettings, Enumerator command) ### Description Initializes the connection setup for Command Messenger tests. ### Method (Not specified, likely a constructor or setup method) ### Parameters * **systemSettings** (systemSettings) - Description not provided. * **command** (Enumerator) - Description not provided. ``` -------------------------------- ### sendCmdStart() Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/Arduino/html/functions_func.html Marks the start of a command transmission. ```APIDOC ## sendCmdStart() ### Description Marks the start of a command transmission. ### Method (Not specified, likely a member function) ### Parameters (Not specified in the provided text) ### Response (Not specified in the provided text) ``` -------------------------------- ### StartTestSet Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/PC/html/class_command_messenger_tests_1_1_common-members.html Starts a new test set. ```APIDOC ## StartTestSet(string testSetDescription) ### Description Starts a new test set. ### Method static ### Parameters #### Path Parameters - **testSetDescription** (string) - Required - A description of the test set. ``` -------------------------------- ### Setup Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/PC/html/class_receive_1_1_receive.html Initializes the receive functionality. This method should be called once before the main loop. ```APIDOC ## Setup ### Description Initializes the receive functionality. This method should be called once before the main loop. ### Signature `void Setup()` ``` -------------------------------- ### StartWatchDog Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/PC/html/class_command_messenger_1_1_connection_manager.html Starts the watchdog timer. The watchdog will check if the connection gets interrupted. ```APIDOC ## StartWatchDog ### Description Start watchdog. Will check if connection gets interrupted. ### Method virtual void ### Endpoint StartWatchDog() ``` -------------------------------- ### Setup Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/PC/html/class_send_and_receive_binary_arguments_1_1_send_and_receive_binary_arguments.html Initializes the SendAndReceiveBinaryArguments class. This method should be called once before the main loop. ```APIDOC ## Setup ### Description Initializes the SendAndReceiveBinaryArguments class. This method should be called once before the main loop. ### Method void ### Signature Setup() ``` -------------------------------- ### SetStartTime Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/PC/html/class_data_logging_1_1_temperature_control.html Sets the start time for data acquisition. ```APIDOC ## SetStartTime ### Description Sets the start time for data acquisition. ### Method void ### Parameters #### Path Parameters - **startTime** (float) - The time at which data acquisition should start. ``` -------------------------------- ### sendCmdStart(byte cmdId) Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/Arduino/html/class_cmd_messenger.html Starts sending a command, preparing for subsequent arguments. ```APIDOC ## sendCmdStart(byte cmdId) ### Description Starts sending a command, preparing for subsequent arguments. ### Parameters - **cmdId** (byte) - The ID of the command to start. ``` -------------------------------- ### Setup(ControllerForm controllerForm) Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/PC/html/class_arduino_controller_1_1_arduino_controller-members.html Sets up the ArduinoController with a ControllerForm. This method is defined in ArduinoController.ArduinoController. ```APIDOC ## Setup(ControllerForm controllerForm) ### Description Sets up the ArduinoController with a ControllerForm. ### Method void Setup(ControllerForm controllerForm) ### Parameters * **controllerForm** (ControllerForm) - The ControllerForm instance to use for setup. ### Response None ``` -------------------------------- ### RunTests Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/PC/html/class_command_messenger_tests_1_1_setup_connection-members.html Executes the defined tests for the Command Messenger setup. ```APIDOC ## RunTests() ### Description Executes the defined tests for the Command Messenger setup. ### Method (Not specified, likely a test execution method) ### Parameters None explicitly listed. ``` -------------------------------- ### Connect Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/PC/html/class_command_messenger_1_1_cmd_messenger.html Starts the serial port connection and begins listening for incoming commands. ```APIDOC ## Connect ### Description Starts serial port connection and start listening. ### Method bool ### Endpoint CommandMessenger.CmdMessenger.Connect() ### Returns true if it succeeds, false if it fails. ``` -------------------------------- ### Loop() Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/PC/html/class_send_and_receive_1_1_send_and_receive-members.html Starts the main loop for sending and receiving messages. ```APIDOC ## Loop() ### Description Starts the main loop for sending and receiving messages. ### Method Method signature: Loop() ### Parameters None ### Response None ``` -------------------------------- ### GoalTemperature Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/PC/html/class_data_logging_1_1_temperature_control.html Gets or sets the goal temperature. ```APIDOC ## GoalTemperature ### Description Gets or sets the goal temperature. ### Property - **GoalTemperature** (double) - `[get, set]` ### Returns - **double** - The goal temperature. ``` -------------------------------- ### Connect Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/PC/html/class_command_messenger_1_1_cmd_messenger.html Starts the serial port connection and begins listening for incoming messages. ```APIDOC ## Connect ### Description Starts serial port connection and start listening. ### Method `bool Connect()` ### Returns `true` if the connection was successful, `false` otherwise. ``` -------------------------------- ### Console Shell Interaction Example Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/README.md Demonstrates using CmdMessenger as a shell communicating via the Serial Console. This example differs as it has no PC counterpart, only receives commands, and uses Serial.Print for communication. It shows interaction with commands for listing available commands, setting LED state and brightness, and displaying LED status. ```text Available commands 0; - This command list 1,; - Set led. 0 = off, 1 = on 2,; - Set led brighness. 0 - 1000 3; - Show led state Command> 3; Led status: on Led brightness: 500 Command> 2,1000; Led status: on Led brightness: 1000 Command> 1,0; Led status: off Led brightness: 1000 ``` -------------------------------- ### StartScan Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/PC/html/class_command_messenger_1_1_connection_manager.html Starts scanning for devices. This is used to discover available devices. ```APIDOC ## StartScan ### Description Start scanning for devices. ### Method virtual void ### Endpoint StartScan() ``` -------------------------------- ### Arduino CmdMessenger Setup and Command Handling Source: https://context7.com/thijse/arduino-cmdmessenger/llms.txt Initializes the serial communication and CmdMessenger, sets output formatting, and defines a callback for generic commands. `printLfCr(true)` enables human-readable output with newlines. ```cpp void setup() { Serial.begin(115200); cmdMessenger.printLfCr(true); // human-readable output attachCommandCallbacks(); cmdMessenger.sendCmd(kAck, "Arduino ready"); } void OnGenericCommand() { uint8_t id = cmdMessenger.commandID(); // which command fired this callback? Serial.print("Handling command: "); Serial.println(id); while (cmdMessenger.available()) { // iterate remaining args char* arg = cmdMessenger.readStringArg(); if (cmdMessenger.isArgOk()) { Serial.println(arg); } } } ``` -------------------------------- ### Send Command Start Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/Arduino/html/class_cmd_messenger.html Initiates the sending of a command. This function makes it easier to send multiple arguments per command. ```cpp void CmdMessenger::sendCmdStart( byte _cmdId_ ) ``` -------------------------------- ### StartConnectionManager Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/PC/html/functions_func_0x73.html Starts the connection manager service. This function is part of CommandMessenger.ConnectionManager. ```APIDOC ## StartConnectionManager ### Description Activates and starts the main connection management service. ### Method Not specified (likely a function call within the library). ### Endpoint N/A ### Parameters N/A ### Request Example N/A ### Response N/A ``` -------------------------------- ### CmdMessenger::sendCmdStart Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/Arduino/html/class_cmd_messenger.html Sends the start of a command. This method is essential for sending multiple arguments within a single command. ```APIDOC ## CmdMessenger::sendCmdStart ### Description Sends start of command. This makes it easy to send multiple arguments per command. ### Method ```cpp void sendCmdStart(byte _cmdId_) ``` ### References - sendCmd() - sendCmdEnd() ``` -------------------------------- ### StartConnectionManager Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/PC/html/class_command_messenger_1_1_connection_manager.html Starts the connection manager. This method initiates the connection management process. ```APIDOC ## StartConnectionManager ### Description Starts connection manager. ### Method virtual void ### Endpoint StartConnectionManager() ``` -------------------------------- ### Read Sequentially Typed Arguments with Arduino CmdMessenger Source: https://context7.com/thijse/arduino-cmdmessenger/llms.txt Reads various typed arguments sequentially within a callback. `isArgOk()` should be checked after reading to ensure all arguments were received correctly. This example reads an ID, voltage, flag, character, and a string. ```cpp void OnMultiArg() { int16_t id = cmdMessenger.readInt16Arg(); float voltage = cmdMessenger.readFloatArg(); bool flag = cmdMessenger.readBoolArg(); char ch = cmdMessenger.readCharArg(); char label[32]; cmdMessenger.copyStringArg(label, sizeof(label)); // safe copy into buffer if (!cmdMessenger.isArgOk()) { cmdMessenger.sendCmd(kError, "Bad argument"); return; } // process id, voltage, flag, ch, label... ``` -------------------------------- ### Millis Property Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/PC/html/class_send_and_receive_binary_arguments_1_1_send_and_receive_binary_arguments.html Gets the number of milliseconds since the system started. This is a static property. ```APIDOC ## Millis ### Description Gets the number of milliseconds since the system started. This is a static property. ### Property Type long ### Access get ``` -------------------------------- ### Functions starting with 's' Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/PC/html/functions_func_0x73.html This section lists functions of the CmdMessenger class that start with the letter 's'. ```APIDOC ## Functions starting with 's' This section lists functions of the CmdMessenger class that start with the letter 's'. *No specific functions are detailed in the provided text. Refer to the full documentation for individual function signatures and descriptions.* ``` -------------------------------- ### SetUpConnection Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/PC/html/class_command_messenger_tests_1_1_acknowledge-members.html Sets up the connection. ```APIDOC ## SetUpConnection ### Description Sets up the connection. ### Method (Implicitly a method call, no HTTP method specified) ### Endpoint (Not applicable, as this appears to be a class method) ### Parameters None ### Request Body None ### Response (No specific response details provided) ``` -------------------------------- ### SetupChart() Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/PC/html/class_data_logging_1_1_chart_form-members.html Sets up the chart for data logging. ```APIDOC ## SetupChart() ### Description Sets up the chart for data logging. ### Method Method ### Parameters None ``` -------------------------------- ### SetUpConnection Method Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/PC/html/class_command_messenger_tests_1_1_acknowledge.html Configures and establishes the connection for testing purposes. ```APIDOC ## SetUpConnection ### Description Sets up the necessary connection for running acknowledgement tests. ### Method void ### Parameters None ``` -------------------------------- ### SetupConnection Constructor Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/PC/html/class_command_messenger_tests_1_1_setup_connection.html Initializes a new instance of the SetupConnection class. ```APIDOC ## SetupConnection ### Description Initializes a new instance of the SetupConnection class. ### Parameters * **systemSettings** (systemSettings) - Description of systemSettings parameter. * **command** (Enumerator) - Description of command parameter. ``` -------------------------------- ### SetupChart Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/PC/html/class_data_logging_1_1_chart_form.html Sets up the chart for data logging. ```APIDOC ## SetupChart ### Description Sets up the chart. ### Method void ### Parameters None ### Response None ### Request Example None ### Response Example None ``` -------------------------------- ### ControlToInvokeOn Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/PC/html/class_command_messenger_1_1_cmd_messenger-members.html Gets or sets the control to invoke on. ```APIDOC ## ControlToInvokeOn ### Description Gets or sets the control to invoke on. ### Method ControlToInvokeOn ### Parameters None ``` -------------------------------- ### SetUpConnection Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/PC/html/class_command_messenger_tests_1_1_clear_text_data-members.html Sets up the connection for the ClearTextData tests. ```APIDOC ## SetUpConnection() ### Description Sets up the connection. ### Method Method signature: SetUpConnection() ``` -------------------------------- ### RunLoop Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/PC/html/class_receive_1_1_receive-members.html Starts or continues the message processing loop. ```APIDOC ## RunLoop ### Description Starts or continues the message processing loop. ### Method (Implicitly called or invoked) ### Parameters None ### Response None ``` -------------------------------- ### SetUpConnection() Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/PC/html/class_command_messenger_tests_1_1_transfer_speed-members.html Sets up the connection. Defined in CommandMessengerTests.TransferSpeed. ```APIDOC ## SetUpConnection() ### Description Sets up the connection. ### Method (Not specified, likely a method call) ### Parameters None ### Response None specified ``` -------------------------------- ### SetUpConnection Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/PC/html/class_command_messenger_tests_1_1_multiple_arguments-members.html Sets up the connection. Defined in CommandMessengerTests.MultipleArguments. ```APIDOC ## SetUpConnection() ### Description Sets up the connection. ### Method (Not specified, likely a method call) ### Endpoint (Not applicable) ### Parameters (None specified) ### Request Example (None specified) ### Response (None specified) ``` -------------------------------- ### AckCmdId Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/PC/html/class_command_messenger_1_1_send_command.html Gets or sets the acknowledge command ID. ```APIDOC ## AckCmdId ### Description Gets or sets the acknowledge command ID. ### Properties - **AckCmdId** (int) - [get, set] ``` -------------------------------- ### LastReceivedCommandTimeStamp Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/PC/html/class_command_messenger_1_1_cmd_messenger-members.html Gets the timestamp of the last received command. ```APIDOC ## LastReceivedCommandTimeStamp ### Description Gets the timestamp of the last received command. ### Method LastReceivedCommandTimeStamp ### Parameters None ``` -------------------------------- ### SetupChart Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/PC/html/functions_func_0x73.html Sets up a chart. This function is part of DataLogging.ChartForm. ```APIDOC ## SetupChart ### Description Initializes and configures a chart for data visualization. ### Method Not specified (likely a function call within the library). ### Endpoint N/A ### Parameters N/A ### Request Example N/A ### Response N/A ``` -------------------------------- ### StartConnect Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/PC/html/class_command_messenger_1_1_connection_manager-members.html Initiates the connection process. ```APIDOC ## StartConnect ### Description Initiates the connection process. ### Modifiers `protected`, `virtual` ### Signature StartConnect() ### Defined In [CommandMessenger.ConnectionManager](class_command_messenger_1_1_connection_manager.html#a1b03209bc03e442743d65d68c5ae3d81) ``` -------------------------------- ### SetupChart Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/PC/html/functions_0x73.html Initializes or configures a chart. This function is part of the DataLogging.ChartForm class. ```APIDOC ## SetupChart ### Description Initializes or configures a chart. This function is part of the DataLogging.ChartForm class. ### Method Not specified (likely a method call within a class) ### Endpoint Not applicable (SDK/Library function) ### Parameters Not specified in the provided text. ### Request Example Not applicable. ### Response Not specified. ``` -------------------------------- ### SerialTransport CurrentSerialSettings Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/PC/html/functions_0x63.html Gets the current serial port settings. ```APIDOC ## CurrentSerialSettings ### Description Gets the current serial port settings. ### Method [Property Access] ### Endpoint N/A (SDK Property) ### Parameters N/A ### Response N/A ``` -------------------------------- ### StartAcquisition Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/PC/html/class_data_logging_1_1_temperature_control.html Initiates the data acquisition process. ```APIDOC ## StartAcquisition ### Description Initiates the data acquisition process. ### Method bool ### Returns - **bool** - True if acquisition started successfully, false otherwise. ``` -------------------------------- ### BluetoothTransport CurrentBluetoothDeviceInfo Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/PC/html/functions_0x63.html Gets information about the current Bluetooth device. ```APIDOC ## CurrentBluetoothDeviceInfo ### Description Gets information about the current Bluetooth device. ### Method [Property Access] ### Endpoint N/A (SDK Property) ### Parameters N/A ### Response N/A ``` -------------------------------- ### CommandQueue Count Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/PC/html/functions_0x63.html Gets the number of elements in the command queue. ```APIDOC ## Count ### Description Gets the number of elements in the command queue. ### Method [Property Access] ### Endpoint N/A (SDK Property) ### Parameters N/A ### Response N/A ``` -------------------------------- ### PortName Property Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/PC/html/functions_0x70.html Gets or sets the name of the serial port. ```APIDOC ## PortName ### Description Gets or sets the name of the serial port. ### Property `PortName` ### Class [CommandMessenger.Transport.Serial.SerialSettings](class_command_messenger_1_1_transport_1_1_serial_1_1_serial_settings.html#a9413d8c569841f49323bb24ff64d6031) ``` -------------------------------- ### Timeout Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/PC/html/class_command_messenger_1_1_send_command.html Gets or sets the time to wait for the acknowledge command. ```APIDOC ## Timeout ### Description Gets or sets the time we want to wait for the acknowledge command. ### Properties - **Timeout** (int) - [get, set] ``` -------------------------------- ### Connected Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/PC/html/class_command_messenger_tests_1_1_common-members.html Gets a value indicating whether the CmdMessenger is connected. ```APIDOC ## Connected ### Description Gets a value indicating whether the CmdMessenger is connected. ### Method static ``` -------------------------------- ### RawString Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/PC/html/class_command_messenger_1_1_received_command.html Gets or sets the raw input string of the command. ```APIDOC ## RawString ### Description Gets or sets the command input. ### Property Type string ### Access [get, set] ### Returns The raw string. ``` -------------------------------- ### sendCmdStart(), sendCmdArg(), sendCmdEnd() - Multi-Argument Command Sending Source: https://context7.com/thijse/arduino-cmdmessenger/llms.txt Provides a pattern for sending commands with multiple arguments. `sendCmdStart` initiates the command, `sendCmdArg` adds arguments, and `sendCmdEnd` finalizes the command and optionally waits for acknowledgment. ```APIDOC ## sendCmdStart(byte cmdId) / sendCmdArg(T arg) / sendCmdEnd(bool reqAc, byte ackCmdId, unsigned int timeout) ### Description Multi-argument command sending pattern. `sendCmdStart` opens the command frame, one or more `sendCmdArg` calls append typed arguments as text, and `sendCmdEnd` closes the frame (and optionally waits for an acknowledge). A float precision overload `sendCmdArg(T arg, unsigned int n)` controls decimal places. ### Method `sendCmdStart(byte cmdId)`, `sendCmdArg(T arg)`, `sendCmdEnd(bool reqAc, byte ackCmdId, unsigned int timeout)` ### Parameters #### Path Parameters - **cmdId** (byte) - Required - The ID of the command to start. - **arg** (T) - Required - The argument to send with the command. - **n** (unsigned int) - Optional - For float arguments, specifies the number of decimal places. - **reqAc** (bool) - Optional - Whether to require an acknowledgment. Defaults to false. - **ackCmdId** (byte) - Optional - The command ID to expect as an acknowledgment. - **timeout** (unsigned int) - Optional - The timeout in milliseconds to wait for acknowledgment. ### Request Example ```cpp enum { kAck = 0, kResult = 1 }; void OnFloatAddition() { float a = cmdMessenger.readFloatArg(); float b = cmdMessenger.readFloatArg(); // Respond with three arguments in one command cmdMessenger.sendCmdStart(kResult); cmdMessenger.sendCmdArg(a + b); // sum cmdMessenger.sendCmdArg(a - b); // difference cmdMessenger.sendCmdArg(a * b, 4); // product with 4 decimal places cmdMessenger.sendCmdEnd(); // sends: "1,,,." } ``` ``` -------------------------------- ### Connect() Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/PC/html/functions_func_0x63.html Establishes a connection. This function is overloaded and available in multiple classes. ```APIDOC ## Connect() ### Description Establishes a connection. ### Method Not specified. ### Classes CommandMessenger.CmdMessenger, CommandMessenger.CommunicationManager, CommandMessenger.Transport.Bluetooth.BluetoothTransport, CommandMessenger.Transport.Network.TcpTransport, CommandMessenger.Transport.ITransport, CommandMessenger.Transport.Serial.SerialTransport ``` -------------------------------- ### AcceptData Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/PC/html/class_data_logging_1_1_temperature_control.html Gets or sets a value indicating whether data should be accepted. ```APIDOC ## AcceptData ### Description Gets or sets a value indicating whether data should be accepted. ### Property - **AcceptData** (bool) - `[get, set]` ``` -------------------------------- ### CommandMessenger.BinaryConverter.StringEncoder Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/PC/html/class_command_messenger_1_1_binary_converter.html Sets and gets the string encoder used for binary conversions. ```APIDOC ## StringEncoder ### Description Sets the string encoder. ### Property Type `[set]` ### Returns The string encoder. ``` -------------------------------- ### Connect Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/PC/html/class_command_messenger_tests_1_1_common-members.html Connects to the system with the provided system settings. ```APIDOC ## Connect(systemSettings systemSettings) ### Description Connects to the system with the provided system settings. ### Method static ### Parameters #### Path Parameters - **systemSettings** (systemSettings) - Required - The system settings to use for connection. ``` -------------------------------- ### Connect Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/PC/html/class_command_messenger_1_1_cmd_messenger-members.html Establishes a connection. ```APIDOC ## Connect ### Description Establishes a connection. ### Method Connect ### Parameters None ``` -------------------------------- ### Command() Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/PC/html/functions_func_0x63.html Constructor for the Command class. ```APIDOC ## Command() ### Description Constructor for the Command class. ### Method Constructor. ### Class CommandMessenger.Command ``` -------------------------------- ### sendCmdStart, sendCmdEscArg, sendCmdfArg, sendCmdEnd Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/Arduino/html/_cmd_messenger_8h_source.html Functions for building and sending commands with arguments, including support for escaped and formatted arguments. ```APIDOC ## Command Sending with Multiple Arguments ### Description These functions are used to construct and send commands that include arguments. `sendCmdStart` initiates a command, `sendCmdEscArg` and `sendCmdfArg` add arguments (escaped and formatted respectively), and `sendCmdEnd` finalizes and sends the command. ### Functions * **`void sendCmdStart(byte cmdId)`**: Starts sending a command with the given ID. * **`void sendCmdEscArg(char *arg)`**: Adds an escaped argument to the current command. * **`void sendCmdfArg(char *fmt, ...)`**: Adds a formatted argument to the current command. * **`bool sendCmdEnd(bool reqAc = false, byte ackCmdId = 1, unsigned int timeout = DEFAULT_TIMEOUT)`**: Ends the command transmission and optionally waits for acknowledgment. ``` -------------------------------- ### Connect Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/PC/html/class_command_messenger_1_1_communication_manager-members.html Establishes a connection using the CommunicationManager. ```APIDOC ## Connect ### Description Establishes a connection using the CommunicationManager. ### Method Connect() ### Parameters None ``` -------------------------------- ### Timeout Property Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/PC/html/class_command_messenger_1_1_send_command.html Gets or sets the time we want to wait for the acknowledge command. ```APIDOC ## Timeout Property ### Description Gets or sets the time we want to wait for the acknowledge command. ### Property Type int ### Access [get, set] ``` -------------------------------- ### MaxEntriesInListBox Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/PC/html/class_tools_1_1_logging_view-members.html Gets or sets the maximum number of entries to display in the list box. ```APIDOC ## MaxEntriesInListBox ### Description Gets or sets the maximum number of entries to display in the list box. ### Property - **MaxEntriesInListBox** (int) - The maximum number of entries. ``` -------------------------------- ### sendCmdStart Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/Arduino/html/class_cmd_messenger-members.html Initiates sending a command with a specified command ID. ```APIDOC ## sendCmdStart(byte cmdId) ### Description Begins the process of sending a command by specifying its ID. Subsequent calls to `sendCmdArg` or `sendCmdBinArg` will append arguments to this command. ### Method `sendCmdStart` ### Parameters - **cmdId** (byte) - The ID of the command to start sending. ``` -------------------------------- ### AcquisitionStarted Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/PC/html/class_data_logging_1_1_temperature_control.html Gets a value indicating whether data acquisition is currently active. ```APIDOC ## AcquisitionStarted ### Description Gets a value indicating whether data acquisition is currently active. ### Property - **AcquisitionStarted** (bool) - `[get, set]` ``` -------------------------------- ### Send Multi-Argument Commands Source: https://context7.com/thijse/arduino-cmdmessenger/llms.txt Uses a pattern of `sendCmdStart`, `sendCmdArg`, and `sendCmdEnd` to construct commands with multiple arguments. `sendCmdArg` can specify precision for float arguments. ```cpp enum { kAck = 0, kResult = 1 }; void OnFloatAddition() { float a = cmdMessenger.readFloatArg(); float b = cmdMessenger.readFloatArg(); // Respond with three arguments in one command cmdMessenger.sendCmdStart(kResult); cmdMessenger.sendCmdArg(a + b); // sum cmdMessenger.sendCmdArg(a - b); // difference cmdMessenger.sendCmdArg(a * b, 4); // product with 4 decimal places cmdMessenger.sendCmdEnd(); // sends: "1,,,." } ``` -------------------------------- ### Initialization Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/Arduino/html/_cmd_messenger_8h_source.html Functions for initializing and configuring the CmdMessenger object. ```APIDOC ## CmdMessenger Constructor ### Description Initializes the CmdMessenger object with a Stream for communication and optional field, command, and escape characters. ### Method CmdMessenger ### Parameters - **comms** (Stream &) - The communication stream (e.g., Serial). - **fld_separator** (const char) - The character used to separate fields in a message. Defaults to ','. - **cmd_separator** (const char) - The character used to separate commands. Defaults to ';'. - **esc_character** (const char) - The character used for escaping special characters. Defaults to '/'. ### Endpoint N/A (Constructor) ``` ```APIDOC ## void printLfCr(bool addNewLine) ### Description Sends a carriage return and line feed, optionally with an added newline character, to the communication stream. ### Method void ### Parameters - **addNewLine** (bool) - If true, an additional newline character is sent. Defaults to true. ### Endpoint N/A (Method) ``` ```APIDOC ## void attach(messengerCallbackFunction newFunction) ### Description Attaches a default callback function that will be called for any incoming message that does not have a specific handler. ### Method void ### Parameters - **newFunction** (messengerCallbackFunction) - The callback function to attach. ### Endpoint N/A (Method) ``` ```APIDOC ## void attach(byte msgId, messengerCallbackFunction newFunction) ### Description Attaches a specific callback function to a given message ID. This function will be called when a message with the matching ID is received. ### Method void ### Parameters - **msgId** (byte) - The message ID to which the callback function should be attached. - **newFunction** (messengerCallbackFunction) - The callback function to attach. ### Endpoint N/A (Method) ``` -------------------------------- ### MaxEntriesInListBox Property Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/PC/html/class_tools_1_1_logging_view.html Gets or sets the maximum number of entries to display in the log list box. ```APIDOC ## MaxEntriesInListBox ### Description Gets or sets the maximum number of entries to display in the log list box. ### Property Type int ### Access Modifiers `[get, set]` ``` -------------------------------- ### Connected Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/PC/html/class_command_messenger_1_1_connection_manager.html Gets or sets a value indicating whether the connection manager is currently connected to a device. ```APIDOC ## Connected ### Description Is connection manager currently connected to device. ### Method bool `[get, set]` ### Endpoint Connected ``` -------------------------------- ### Connect Methods Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/PC/html/functions_0x63.html Establishes a connection using various transport methods. ```APIDOC ## Connect() ### Description Establishes a connection using various transport methods (Serial, TCP, Bluetooth, or general CommunicationManager/CmdMessenger). ### Method [Method Signature] ### Endpoint N/A (SDK Method) ### Parameters N/A ### Response N/A ``` -------------------------------- ### LoggingView Constructor Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/PC/html/class_tools_1_1_logging_view-members.html Initializes a new instance of the Tools.LoggingView class. ```APIDOC ## LoggingView() ### Description Initializes a new instance of the Tools.LoggingView class. ### Method Constructor ``` -------------------------------- ### LastReceivedCommandTimeStamp Property Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/PC/html/class_command_messenger_1_1_cmd_messenger.html Gets or sets the timestamp of the last received command. This can be used for timing-related logic or debugging. ```APIDOC ## long LastReceivedCommandTimeStamp ### Description Gets or sets the time stamp of the last command line received. ### Property Type long ### Accessors `[get]` ### Remarks The last line time stamp. ``` -------------------------------- ### CmdMessenger Properties Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/PC/html/functions_prop.html This section details various properties available within the CmdMessenger library, categorized by their starting letter. ```APIDOC ## Properties This page lists and describes the properties available for the CmdMessenger class and its related components. ### Properties by Alphabetical Order * **AckCmdId** * Description: Represents the acknowledgment command ID. * Class: `CommandMessenger.SendCommand` * **Arguments** * Description: Holds the arguments for a command. * Class: `CommandMessenger.Command` * **AvailableSerialPorts** * Description: Provides a list of available serial ports. * Class: `CommandMessenger.Transport.Serial.SerialConnectionManager` * **BaudRate** * Description: Specifies the baud rate for serial communication. * Class: `CommandMessenger.Transport.Serial.SerialSettings` * **BluetoothClient** * Description: The Bluetooth client used for communication. * Class: `CommandMessenger.Transport.Bluetooth.BluetoothTransport` * **CmdId** * Description: The unique identifier for a command. * Class: `CommandMessenger.Command` * **Command** * Description: Represents a command object. * Class: `CommandMessenger.Queue.CommandStrategy` * **CommandQueue** * Description: Manages the queue of commands. * Classes: `CommandMessenger.Queue.GeneralStrategy`, `CommandMessenger.Queue.CommandStrategy` * **CommandSeparator** * Description: The character used to separate commands. * Class: `CommandMessenger.CommunicationManager` * **Connected** * Description: Indicates whether the connection is active. * Class: `CommandMessenger.ConnectionManager` * **ControlToInvokeOn** * Description: The control object to invoke methods on. * Class: `CommandMessenger.CmdMessenger` * **Count** * Description: The number of items in a collection. * Class: `CommandMessenger.Queue.CommandQueue` * **CurrentBluetoothDeviceInfo** * Description: Information about the currently connected Bluetooth device. * Class: `CommandMessenger.Transport.Bluetooth.BluetoothTransport` * **CurrentSerialSettings** * Description: The current settings for serial communication. * Class: `CommandMessenger.Transport.Serial.SerialTransport` * **DataBits** * Description: The number of data bits for serial communication. * Class: `CommandMessenger.Transport.Serial.SerialSettings` * **DevicePins** * Description: Pins associated with a Bluetooth device. * Class: `CommandMessenger.Transport.Bluetooth.BluetoothConnectionManager` * **DeviceScanBaudRateSelection** * Description: Baud rate selection for device scanning. * Class: `CommandMessenger.Transport.Serial.SerialConnectionManager` * **DeviceScanEnabled** * Description: Enables or disables device scanning. * Class: `CommandMessenger.ConnectionManager` * **DtrEnable** * Description: Enables or disables the DTR signal for serial communication. * Class: `CommandMessenger.Transport.Serial.SerialSettings` * **EscapeCharacter** * Description: The character used for escaping. * Class: `CommandMessenger.CommunicationManager` * **FieldSeparator** * Description: The character used to separate fields within a message. * Class: `CommandMessenger.CommunicationManager` * **GeneralPins** * Description: General pins used for Bluetooth communication. * Class: `CommandMessenger.Transport.Bluetooth.BluetoothConnectionManager` * **GoalTemperature** * Description: The target temperature for a control system. * Class: `DataLogging.TemperatureControl` * **IsEmpty** * Description: Checks if a command queue is empty. * Class: `CommandMessenger.Queue.CommandQueue` ``` -------------------------------- ### RunLoop Property Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/PC/html/class_send_and_receive_binary_arguments_1_1_send_and_receive_binary_arguments.html Gets or sets a boolean value indicating whether the main loop of the SendAndReceiveBinaryArguments class should be running. ```APIDOC ## RunLoop ### Description Gets or sets a boolean value indicating whether the main loop of the SendAndReceiveBinaryArguments class should be running. ### Property Type bool ### Access get, set ``` -------------------------------- ### Open Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/PC/html/functions_func_0x6f.html Opens a connection using the Bluetooth transport. ```APIDOC ## Open() ### Description Opens a connection using the Bluetooth transport. ### Method N/A (This appears to be a method of the BluetoothTransport class) ### Endpoint N/A ### Parameters None explicitly listed. ### Response None explicitly listed, likely establishes a connection. ``` -------------------------------- ### StartScan Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/PC/html/class_command_messenger_1_1_connection_manager-members.html Initiates a scan for devices. ```APIDOC ## StartScan ### Description Initiates a scan for devices. ### Modifiers `protected`, `virtual` ### Signature StartScan() ### Defined In [CommandMessenger.ConnectionManager](class_command_messenger_1_1_connection_manager.html#a5533ab38dc4f8848f5e97c4c3b796702) ``` -------------------------------- ### ControlToInvokeOn Property Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/PC/html/class_command_messenger_1_1_cmd_messenger.html Gets or sets the control on which callback methods should be invoked. This property allows for dynamic control assignment. ```APIDOC ## Control ControlToInvokeOn ### Description The control to invoke the callback on. ### Property Type Control ### Accessors `[get, set]` ``` -------------------------------- ### ConnectionManagerProgressEventArgs Properties Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/PC/html/class_command_messenger_1_1_connection_manager_progress_event_args.html The ConnectionManagerProgressEventArgs class has two properties: Level (int) and Description (string), both of which are accessible for getting and setting. ```APIDOC ## Class: ConnectionManagerProgressEventArgs ### Description Provides data for connection progress events. ### Properties * **Level** (int) - `[get, set]` An integer representing the progress level. * **Description** (string) - `[get, set]` A string describing the current progress status. ``` -------------------------------- ### sendBinCmd() Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/Arduino/html/functions_func.html Sends a command with binary arguments. ```APIDOC ## sendBinCmd() ### Description Sends a command with binary arguments. ### Method (Not specified, likely a member function) ### Parameters (Not specified in the provided text) ### Response (Not specified in the provided text) ``` -------------------------------- ### Send Command with Binary Argument Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/Arduino/html/_cmd_messenger_8h_source.html Sends a command with a binary argument. Ensure that the `startCommand` flag is true before calling this method. It utilizes the `writeBin` function to serialize the argument. ```cpp template < class T > void [sendCmdBinArg](class_cmd_messenger.html#a4bc93989ec5e50712c728558664bf458)(T arg) { if (startCommand) { comms->print(field_separator); writeBin(arg); } } ``` -------------------------------- ### Command Queue Strategy Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/PC/html/functions_func_0x74.html This function initializes the TopCommandStrategy for the command queue. ```APIDOC ## TopCommandStrategy() ### Description Initializes the command queue with a strategy that prioritizes top commands. ### Method `TopCommandStrategy()` ### Parameters None ### Response - **TopCommandStrategy** - An instance of the TopCommandStrategy. ``` -------------------------------- ### FollowLastItem Property Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/PC/html/class_tools_1_1_logging_view.html Gets or sets a boolean value indicating whether the log view should automatically scroll to the last item. ```APIDOC ## FollowLastItem ### Description Gets or sets a boolean value indicating whether the log view should automatically scroll to the last item. ### Property Type bool ### Access Modifiers `[get, set]` ``` -------------------------------- ### sendCmdBinArg() Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/Arduino/html/functions_func.html Sends a command with binary arguments. ```APIDOC ## sendCmdBinArg() ### Description Sends a command with binary arguments. ### Method (Not specified, likely a member function) ### Parameters (Not specified in the provided text) ### Response (Not specified in the provided text) ``` -------------------------------- ### PrintLfCr Property Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/PC/html/class_command_messenger_1_1_cmd_messenger.html Gets or sets a boolean value indicating whether to print a line feed carriage return after each command. This affects command termination. ```APIDOC ## bool PrintLfCr ### Description Gets or sets a whether to print a line feed carriage return after each command. ### Property Type bool ### Accessors `[get, set]` ### Remarks true if print line feed carriage return, false if not. ``` -------------------------------- ### OnUnknownCommand Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/PC/html/class_command_messenger_tests_1_1_common-members.html Handles unknown commands. ```APIDOC ## OnUnknownCommand(ReceivedCommand arguments) ### Description Handles unknown commands. ### Method static ### Parameters #### Path Parameters - **arguments** (ReceivedCommand) - Required - The received command arguments. ``` -------------------------------- ### Send Binary Command Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/Arduino/html/_cmd_messenger_8h_source.html Sends a command with a binary argument. This is a specialized version of sendCmd for sending non-textual data. It follows the same pattern of starting, sending argument, and ending the command. ```cpp template < class T > bool [sendBinCmd](class_cmd_messenger.html#a6f1c1843fee27f53a5f275f4bbeb062a)(byte cmdId, T arg, bool reqAc = false, byte ackCmdId = 1, unsigned int timeout = DEFAULT_TIMEOUT) ``` -------------------------------- ### Send Command with Single Binary Argument Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/Arduino/html/class_cmd_messenger.html Sends a command with a single argument of any type in binary format. Requires sendCmdStart() to be called first. ```cpp template void CmdMessenger::sendCmdBinArg( T _arg_ ) `[inline]` ``` -------------------------------- ### Send Command with Argument Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/Arduino/html/_cmd_messenger_8h_source.html Sends a command with a single argument. This function handles the entire process of starting the command, sending the argument, and ending the command. It can optionally request an acknowledgment. ```cpp template < class T > bool [sendCmd](class_cmd_messenger.html#a87716ae89670a9429b09b594cbde686e)(byte cmdId, T arg, bool reqAc = false, byte ackCmdId = 1, unsigned int timeout = DEFAULT_TIMEOUT) { if (!startCommand) { [sendCmdStart](class_cmd_messenger.html#a7d942bf8759c5b4bd91ef66d12c5e76f)(cmdId); [sendCmdArg](class_cmd_messenger.html#a516cacd12a4e1b19d63614c4d7964105)(arg); return [sendCmdEnd](class_cmd_messenger.html#a9bcad5dbd7432ee49fa9849767c0090d)(reqAc, ackCmdId, timeout); } return false; } ``` -------------------------------- ### Acknowledge Constructor Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/PC/html/class_command_messenger_tests_1_1_acknowledge.html Initializes the Acknowledge test class with system settings and an enumerator for commands. ```APIDOC ## Acknowledge ### Description Initializes the Acknowledge test class. ### Parameters * **systemSettings** (systemSettings) - Description of system settings. * **command** (Enumerator) - The command enumerator to use. ``` -------------------------------- ### Initialize CmdMessenger in C# Source: https://context7.com/thijse/arduino-cmdmessenger/llms.txt Sets up the CmdMessenger object in C# using a `SerialTransport`. Configures serial port settings and board type. Connects to the Arduino and sets up event handlers for received and sent messages. ```csharp using CommandMessenger; using CommandMessenger.Transport.Serial; var transport = new SerialTransport { CurrentSerialSettings = { PortName = "COM3", BaudRate = 115200, DtrEnable = false } }; var messenger = new CmdMessenger(transport, BoardType.Bit16); messenger.PrintLfCr = false; messenger.NewLineReceived += (s, e) => Console.WriteLine("RX: " + e.Command.RawString); messenger.NewLineSent += (s, e) => Console.WriteLine("TX: " + e.Command.RawString); if (!messenger.Connect()) { Console.Error.WriteLine("Failed to connect"); } ``` -------------------------------- ### CmdMessenger::sendCmdBinArg Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/Arduino/html/class_cmd_messenger.html Sends a single argument in binary format. This method should only be called after sendCmdStart() has been invoked. ```APIDOC ## CmdMessenger::sendCmdBinArg ### Description Sends a single argument in binary format. Note that this will only succeed if a sendCmdStart has been issued first. ### Method ```cpp template void sendCmdBinArg(T _arg_) ``` ### References - sendCmd() - sendCmdEnd() - sendCmdStart() ``` -------------------------------- ### BluetoothConnectionStorer Constructor Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/PC/html/functions_0x62.html Initializes a new instance of the BluetoothConnectionStorer class. ```APIDOC ## BluetoothConnectionStorer Constructor ### Description Constructs a new BluetoothConnectionStorer. ### Remarks This constructor is part of the `BluetoothConnectionStorer` class within the `CommandMessenger.Transport.Bluetooth` namespace. ``` -------------------------------- ### Connect Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/PC/html/class_command_messenger_1_1_communication_manager.html Establishes a connection to the transport layer. ```APIDOC ## Connect ### Description Connects to a transport layer defined through the current settings. ### Method GET ### Endpoint /connect ### Returns - **bool**: True if the connection was successful, false otherwise. ``` -------------------------------- ### ConnectionManager.DoWorkConnect() Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/PC/html/class_command_messenger_1_1_connection_manager-members.html Performs the work required for establishing a connection. ```APIDOC ## DoWorkConnect() ### Description This is a pure virtual function that must be implemented by derived classes to perform the specific logic for establishing a connection. ### Method DoWorkConnect ``` -------------------------------- ### QueueCommand() Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/PC/html/functions_0x71.html Constructor for QueueCommand. This function is related to command queuing and can be found in CommandMessenger.CmdMessenger, CommandMessenger.Queue.SendCommandQueue, CommandMessenger.Queue.ReceiveCommandQueue, CommandMessenger.Queue.CommandQueue, and CommandMessenger.CmdMessenger. ```APIDOC ## QueueCommand() ### Description Constructor for the QueueCommand class, used for managing command queues. ### Method Constructor ### Related Classes - CommandMessenger.CmdMessenger - CommandMessenger.Queue.SendCommandQueue - CommandMessenger.Queue.ReceiveCommandQueue - CommandMessenger.Queue.CommandQueue ``` -------------------------------- ### Send Command with Arguments (Internal Logic) Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/Arduino/html/_cmd_messenger_8h_source.html Internal logic for sending commands with arguments. This snippet shows how `sendCmdStart`, `sendCmdBinArg`, and `sendCmdEnd` are used in sequence to transmit a command and its argument. ```cpp if (!startCommand) { [sendCmdStart](class_cmd_messenger.html#a7d942bf8759c5b4bd91ef66d12c5e76f)(cmdId); [sendCmdBinArg](class_cmd_messenger.html#a4bc93989ec5e50712c728558664bf458)(arg); return [sendCmdEnd](class_cmd_messenger.html#a9bcad5dbd7432ee49fa9849767c0090d)(reqAc, ackCmdId, timeout); } return false; ``` -------------------------------- ### available() Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/Arduino/html/class_cmd_messenger.html Checks if there is a command available to be processed. ```APIDOC ## available() ### Description Checks if there is a command available to be processed. ### Method bool ``` -------------------------------- ### DefineCommands Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/PC/html/class_command_messenger_tests_1_1_setup_connection.html Defines the commands for the connection. ```APIDOC ## DefineCommands ### Description Defines the commands for the connection. ### Method void ### Endpoint N/A (Method) ``` -------------------------------- ### ConnectionManager Constructor Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/PC/html/class_command_messenger_1_1_connection_manager-members.html Initializes a new instance of the ConnectionManager class. ```APIDOC ## ConnectionManager(CmdMessenger cmdMessenger, int identifyCommandId = 0, string uniqueDeviceId = null) ### Description Initializes a new instance of the ConnectionManager class with the specified CmdMessenger instance, identify command ID, and unique device ID. ### Parameters * **cmdMessenger** (CmdMessenger) - The CmdMessenger instance to associate with this connection manager. * **identifyCommandId** (int, optional) - The command ID used for device identification. Defaults to 0. * **uniqueDeviceId** (string, optional) - A unique identifier for the device. Defaults to null. ``` -------------------------------- ### System Settings Properties Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/PC/html/class_command_messenger_tests_1_1system_settings.html This class provides properties to manage various system settings for testing CommandMessenger, including description, transport, and speed configurations. ```APIDOC ## Class: CommandMessengerTests.systemSettings ### Description Provides access to system settings for testing purposes. ### Properties - **Description** (String) `[get, set]` - A descriptive string for the current settings. - **Transport** (ITransport) `[get, set]` - The transport mechanism used by the Command Messenger. - **MinReceiveSpeed** (float) `[get, set]` - The minimum allowed receive speed. - **MinSendSpeed** (float) `[get, set]` - The minimum allowed send speed. - **MinDirectSendSpeed** (float) `[get, set]` - The minimum allowed direct send speed. - **BoardType** (BoardType) `[get, set]` - The type of board being used. - **sendBufferMaxLength** (int) `[get, set]` - The maximum length of the send buffer. ``` -------------------------------- ### CmdMessenger Constructor Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/Arduino/html/functions.html Initializes a new instance of the CmdMessenger class. ```APIDOC ## CmdMessenger() ### Description Constructor for the CmdMessenger class. ### Method Constructor ### Parameters None ``` -------------------------------- ### Send Command with Single String Argument Source: https://github.com/thijse/arduino-cmdmessenger/blob/master/extras/documentation/Arduino/html/class_cmd_messenger.html Sends a command with a single argument of any type as a string. Requires sendCmdStart() to be called first. ```cpp template void CmdMessenger::sendCmdArg( T _arg_ ) `[inline]` ```