Resources | developer.brewmp.com Resources | developer.brewmp.com

Developer

resources

Validation of joystick

Porting Validation Suite (PVS) to verify device support for joystick.

Use these PVS OAT modules to validate device support for joystick on a mobile device

OAT Validation performed
JoyStick_GetParamIDTest.1 Tests the maximum allowed inactivity count. Tests the IJOYSTICK_GetParm() interface by getting the maximum allowed inactivity count by using the JOY_PARM_MAXCOUNT and testing it against the actual maximum allowed inactivity count.
JoyStick_GetParamIDTest.2 Tests the maximum allowed sampling frequency. Tests the IJOYSTICK_GetParm() interface by getting the maximum allowed inactivity count by using the JOY_PARM_MAXFREQ and testing it against the actual maximum sampling frequency.
JoyStick_InitTest.1 Tries to create an instance of the IJoystick interface. If it fails, it returns from the OAT test.
JoyStick_PositionTest.1 Moves the joystick to the upper left. Verifies that when the joystick is in the upper left corner, its coordinates are outside the range (-20000,20000).
JoyStick_PositionTest.2 Moves the joystick to the upper right. Verifies that when the joystick is in the upper right corner, its coordinates are outside the range (20000,20000).
JoyStick_PositionTest.3 Moves the joystick to the lower right. Verifies that when the joystick is in the lower right corner, its coordinates are outside the range (20000,-20000).
JoyStick_PositionTest.4 Moves the joystick to the lower left. Verifies that when the joystick is in the lower left corner, its coordinates are outside the range (-20000,-20000).
JoyStick_PositionTest.5 Moves the joystick to center. Verifies that when the joystick is in the center, its coordinates are (0,0).
JoyStick_ReadTest.1 Tests the IJOYSTICK_Read() interface. Sets the frequency to 10 Hz and reads the joystick consecutively every 50 msecs, 50 times, while the user keeps the joystick moving. The values that are read are then tested to see if every other value is different. If not, the failPercent is incremented. If the failure percentage is more than 20, the test fails.
JoyStick_SetParamIDTest.1 Tests the SetParm by setting the sampling frequency to 10 Hz. This function tests the IJOYSTICK_SetParm() interface by setting the sampling frequency to 10 Hz using the JOY_PARM_SAMPLEFREQ param ID.
JoyStick_SetParamIDTest.2 Tests the SetParm by setting the inactivity count to 10 msec. This function tests the IJOYSTICK_SetParm() interface by setting the inactivity count to 10 msecs using the JOY_PARM_INACTIVITY parameter ID.
JoyStick_SetParamIDTest.3 Tests the SetParm by setting the sampling frequency to 63 Hz and inactivity count to 65535 msecs. This function tests the IJOYSTICK_SetParm() interface by setting the sample frequency to 63 Hz and inactivity count to 65535 msec, both of which are the highest settings for each.
JoyStick_SetParamTest.1 Tests if the change in frequency is reflected in the lower layers into the joystick interface. Sets the sampling frequency to 20 Hz and starts reading the joystick every 50 msecs, 50 times, while the user is moving the joystick. It tests to see if each value is different from the previous value that is read. If two consecutive values read are the same, a failure counter is incremented. If the fail percentage is greater than 20%, the test fails.

Other documentation

See the PVS Test Case Reference for more information on the OAT modules.