FirmataRequestMessageFormatter.cs Unit Tests

The group of FirmataRequestMessageFormatter methods do not perform any sort of parameter validation because it is intended to be used for future versions of the Arduino board which may have different capabilities (and we already know that some do). Therefore, we do not need to test the parameter validation; we only need to test that the methods function as expected.

A line through the test indicates that it has been written and checked in to the source repository.

GenerateReportAnalogPinRequest(int pinNumber, bool enable) - Requests analog pin notifications. GenerateReportDigitalPortRequest(int port, bool enable) - Requests digital pin notifications. GenerateSystemResetRequest() - Requests a remote Firmata system reset (not Arduino reset). GenerateSetPinModeRequest(int pinNumber, PinMode state) - Sets the pin to the desired pin mode. GenerateProtocolVersionRequest() - Requests the Firmata protocol version being used on the connected Arduino. GenerateSetSamplingIntervalRequest(int milliseconds) - Changes the remote polling interval. GenerateAnalogWriteRequest(int pinNumber, int value) - Writes an analog value (PWM on digital pin) GenerateDigitalWriteRequest(int portNumber, int value) - Writes a digital value to a port (group of pins) GenerateServoConfigRequest(int pinNumber, int minPulse, int maxPulse, int angle) - Configures Firmata for a connected servo. GenerateServoPositionRequest(int pinNumber, int value) - Requests a change in the servo position.