Here are sample codes to learn how to program in CPAL. You can browse the code examples using the index and execute them right away in the CPAL Playground.

  1. activation jitter :
  2. activation, state-dependent :
  3. activation, time-triggered :
  4. activation, triggered :
  5. annotation, period :
  6. annotation, priority :
  7. annotation, state :
  8. annotation, time :
  9. annotation, transition :
  10. architecture, diagram customisation :
  11. architecture, pattern :
  12. argument, unconstrained array :
  13. array, unconstrained :
  14. bit banging :
  15. block, common :
  16. block, named :
  17. channel :
  18. code in transition :
  19. collection :
  20. cruise control :
  21. csv :
  22. currying :
  23. declaration, variable :
  24. empty init :
  25. enum :
  26. enumeration :
  27. equality :
  28. execution order :
  29. execution time :
  30. exit :
  31. filter, low-pass :
  32. finally :
  33. frdm k64f :
  34. function :
  35. Generalized Multiframe Tasks :
  36. GPIO :
  37. guarded execution :
  38. identifier of process :
  39. IMU :
  40. init() function :
  41. introspection :
  42. LCD :
  43. linuxmbed :
  44. loop over :
  45. mode, real-time :
  46. mode, simulation :
  47. named block :
  48. next_activations :
  49. NPEDF :
  50. NPFP :
  51. observing automata :
  52. offset :
  53. order :
  54. partial init :
  55. periodic process :
  56. philosophers :
  57. pid :
  58. process characteristics :
  59. Process_State :
  60. protocol, communication :
  61. protocol, publish subscribe :
  62. pwm :
  63. PWM :
  64. queue :
  65. random :
  66. random, collection :
  67. random, enum :
  68. random, exponential distribution :
  69. random, gaussian distribution :
  70. random, pareto distribution :
  71. random, seed :
  72. random, time64 :
  73. random, uniform distribution :
  74. Raspberry Pi :
  75. scheduling :
  76. self, offset :
  77. self, period :
  78. self, pid :
  79. self.continue :
  80. serial port, tty :
  81. serial port, uart :
  82. servotester :
  83. simulation :
  84. sinusoid :
  85. sleep() :
  86. sorted queue :
  87. stack :
  88. state, common :
  89. string, as function argument :
  90. string, format data into string :
  91. string, size :
  92. structure :
  93. structure, complex :
  94. structure, definition :
  95. structure, static :
  96. sub-process :
  97. subprocess :
  98. system :
  99. task model :
  100. taylor series :
  101. time units :
  102. time64 :
  103. time64, type :
  104. time64.time() :
  105. timing annotation, deadline :
  106. timing annotation, jitter :
  107. timing annotation, period :
  108. timing annotation, scheduling :
  109. timing annotation, time :
  110. timing-accurate simulation :
  111. transition, boolean :
  112. transition, conditional :
  113. transition, timed :
  114. transition, timed and boolean :
  115. transition, timed and conditional :
  116. trigonometry :
  117. udp, network :
  118. variable, global :
  119. variable, initialisation :
  120. variable, local :
  121. variable, scope :
  122. variable, static :
  123. wakeup_at() :
  124. xbee :