Skip to content

AhmedMagedx/SpeedControl_TDD

Repository files navigation

SpeedControl using TDD concept.

This project is an implementation of a simple speed control module for vacuum cleaner developed using the Test-Driven Development (TDD) concept.

Design notes:

System Static Architecture

Static Architecture

System Block Diagram

Block Diagram

State Machine for Speed Control Module

statemachine

Sequence diagram for setting the callback.

in the real and fake motor, so as to let the SpeedControl module set the callback in both the Real and Fake Motor module without knowing the existance of the fake motor module:

sequance

APIs for modules

  • Switch

    • SWITCH_init
    • SWITCH_update
    • SWITCH_GetPressedSwitch
  • SpeedControl module

    • SpeedControl_init
    • SpeedControl_update
    • SpeedControl_GetSpeedState
    • SpeedControl_GetAngle
  • Motor

    • MOTOR_init
    • MOTOR_update
    • MOTOR_SetSharedAngleGetter
  • OS

    • YO_eInit
    • YO_vCreateTask
    • YO_vStartScheduler

Timing Analysis

All analysis assume that there is no blocking points in the system.

Approach 1

Timing1

Average CPU load = (3)/15= 20%

Max sleep time = 4ms

Adv: Faster

Schedulability Check

sched

Approach 2

Timing1

Average CPU load = (4)/20= 20%

Max sleep time = 9 ms

Adv: longer life time (! maybe)

Schedulability Check

sched

Testing Notes:

1-state coverage

1statecover

EP for time

EPfortime

EP for switches state

EPSwitches

EP composing with invalid

EP composing with invalid

BVA for time

BVA for time

EP for switch names

EP for switch names

Result:

Result

IMPORTANT NOTE: I`M TOTALLY NOT SURE ABOUT ANYTHING WRITTEN ABOVE, THEY MAYBE RIGHT OR WRONG!

About

This project is an implementation of a simple speed control module for vacuum developed using the Test-Driven Development (TDD) concept.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors