Style file for drawing timing diagrams in LaTeX, forked from https://github.com/glipari/rtsched
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556
  1. %% rtsched.sty
  2. %% Copyright 2005 Giuseppe Lipari
  3. %% Copyright 2015 Antoine Bertout <bertout.antoine@gmail.com> Transition from PSTricks to TikZ/PGF.
  4. % This work may be distributed and/or modified under the
  5. % conditions of the LaTeX Project Public License, either version 1.3
  6. % of this license or (at your option) any later version.
  7. % The latest version of this license is in
  8. % http://www.latex-project.org/lppl.txt
  9. % and version 1.3 or later is part of all distributions of LaTeX
  10. % version 2005/12/01 or later.
  11. %
  12. % This work has the LPPL maintenance status `maintained'.
  13. %
  14. % The Current Maintainer of this work is Giuseppe Lipari
  15. %
  16. % This work consists of the file rtsched.sty.
  17. \NeedsTeXFormat{LaTeX2e}[1995/12/01]
  18. \ProvidesPackage{rtsched}[2015/05/01]
  19. \typeout{'rtsched' style for Latex and TikZ/PGF}
  20. \typeout{Easily draw real-time schedules in TeX/Latex.}
  21. \typeout{(c) 2005, Giuseppe Lipari, Pisa, Italy (g.lipari@sssup.it)}
  22. \typeout{(c) 2015, Antoine Bertout (bertout.antoine@gmail.com)}
  23. \typeout{Version 2.0}
  24. \RequirePackage{tikz}
  25. \usetikzlibrary{shadows, patterns}
  26. \RequirePackage{keyval}
  27. \newcommand\rtfont{\usefont{T1}{phv}{m}{n}}
  28. %%
  29. %% These can be changed at any time
  30. %%
  31. \def\RTWindowLength{10cm} % window length
  32. \def\RTWindowHeight{0} % window height
  33. \def\RTNullWindowHeight{0} % nullwindow height
  34. \def\RTTaskLabelSize{\normalsize} % font size the task label
  35. \def\RTNumberLabelSize{\normalsize} % font size of the number labels
  36. \def\RTDefTaskSymbol{\tau}
  37. \def\RTDefNumberOffset{0}
  38. \def\RTDefTaskFill{solid}
  39. \def\RTDefTaskColor{gray}
  40. \def\RTDefLineColor{black}
  41. \def\RTDefXScale{1}
  42. \def\RTDefWriteSymbols{0}
  43. \def\RTDefGridInvisible{0}
  44. \def\RTDefNumbersInvisible{0}
  45. \def\RTDefRowLabelOffset{0pt}
  46. \def\RTDefAxisInvisible{0}
  47. \def\RTDefLineWidth{1pt}
  48. \def\RTDefLineStyle{solid}
  49. \def\RTDefExecHeight{1}
  50. \def\RTArrowStyle{stealth} %arrow style for deadlines, arrivals and horizontal axes
  51. % -{Triangle 45}[length=x] with length is a more modern arrow style but requires arrows.meta tikz library (available on latest texlive but rarely up to date on linux distribution)
  52. %-stealth is a predefined more classical arrow style
  53. \def\RTExecLabel{\ }
  54. \def\RTTaskSymbol{\RTDefTaskSymbol}
  55. \def\RTTaskFill{\RTDefTaskFill}
  56. \def\RTTaskColor{\RTDefTaskColor}
  57. \def\RTLineColor{\RTDefLineColor}
  58. \def\RTXScale{\RTDefXScale}
  59. \def\RTWriteSymbols{\RTDefWriteSymbols}
  60. \def\RTNumberOffset{\RTDefNumberOffset}
  61. \def\RTGridInvisible{\RTDefGridInvisible}
  62. \def\RTNumbersInvisible{\RTDefNumbersInvisible}
  63. \def\RTAxisInvisible{\RTDefAxisInvisible}
  64. \def\RTRowLabelOffset{\RTDefRowLabelOffset}
  65. \def\RTLineWidth{\RTDefLineWidth}
  66. \def\RTLineStyle{\RTDefLineStyle}
  67. \def\RTExecHeight{\RTDefExecHeight}
  68. \define@key{RT}{height}[\RTNullWindowHeight]{\def\RTWindowHeight{#1}}
  69. \define@key{RT}{width}[10]{\def\RTWindowLength{#1}}
  70. \define@key{RT}{labelsize}[\normalsize]{\def\RTTaskLabelSize{#1}}
  71. \define@key{RT}{numbersize}[\normalsize]{\def\RTNumberLabelSize{#1}}
  72. \define@key{RT}{color}[\RTDefTaskColor]{\def\RTTaskColor{#1}}
  73. \define@key{RT}{linecolor}[\RTDefLineColor]{\def\RTLineColor{#1}}
  74. \define@key{RT}{execlabel}[\ ]{\def\RTExecLabel{#1}}
  75. \define@key{RT}{fillstyle}[\RTDefTaskFill]{\def\RTTaskFill{#1}}
  76. \define@key{RT}{nocommand}{}
  77. \define@key{RT}{xscale}[\RTDefXScale]{\def\RTXScale{#1}}
  78. \define@key{RT}{symbol}[{\tau}]{\def\RTTaskSymbol{#1}}
  79. \define@key{RT}{nosymbols}[\RTDefWriteSymbols]{\def\RTWriteSymbols{#1}}
  80. \define@key{RT}{numoffset}[\RTDefNumberOffset]{\def\RTNumberOffset{#1}}
  81. \define@key{RT}{nogrid}[\RTDefGridInvisible]{\def\RTGridInvisible{#1}}
  82. \define@key{RT}{nonumbers}[\RTDefNumbersInvisible]{\def\RTNumbersInvisible{#1}}
  83. \define@key{RT}{labeloffset}[\RTDefRowLabelOffset]{\def\RTRowLabelOffset{#1}}
  84. \define@key{RT}{axis}[\RTDefAxisInvisible]{\def\RTAxisInvisible{#1}}
  85. \define@key{RT}{lw}[\RTDefLineWidth]{\def\RTLineWidth{#1}}
  86. \define@key{RT}{style}[\RTDefLineStyle]{\def\RTLineStyle{#1}}
  87. \define@key{RT}{exeheight}[\RTDefExecHeight]{\def\RTExecHeight{#1}}
  88. %%
  89. %% temporaries
  90. \newdimen\sx % slot length
  91. \newdimen\sy % slot height
  92. \newdimen\hy % frame height
  93. \newdimen\xx % x position
  94. \newdimen\yy % y position
  95. \newdimen\xxx % x position
  96. \newdimen\yyy % y position
  97. \newcount\nsx % number of horizontal slots
  98. \newcount\nsy % number of vertical slots
  99. \newcount\nhl % number of horizontal lines
  100. \newcount\nvl % number of vertical lines
  101. \newcount\ntasks % number of tasks
  102. \newcount\ntaskslessone %number of tasks less one
  103. \newcount\tmp % temp
  104. \newcounter{myLabel}
  105. \def\RTGrid{\@ifnextchar[\@mygrid@begin{\@mygrid@begin[]}}
  106. \def\RTGridBegin{\@ifnextchar[\@mygrid@begin{\@mygrid@begin[]}}
  107. \def\@mygrid@begin[#1]#2#3{\setkeys{RT}{#1}%
  108. %% get the number of tasks
  109. \ntasks = #2
  110. \ntaskslessone = \ntasks
  111. \advance \ntaskslessone by -1
  112. %% number of horizontal steps in the grid
  113. \nsx = #3 \advance \nsx by 2 %
  114. %% real length of the window (approx)
  115. \nvl = \nsx \advance \nvl by 1 %
  116. %% compute length of a step
  117. \sx = \RTWindowLength \divide \sx by \nsx %
  118. %% number of vertical steps in the grid
  119. \nsy = #2 \multiply \nsy by 3 \advance \nsy by 1 %
  120. %% compute length of a vertical step (if height is null, \sy is the
  121. %% same as \sx)
  122. \ifx\RTWindowHeight\RTNullWindowHeight%
  123. \sy = \sx%
  124. \hy = \sy \multiply \hy by \nsy %\advance \hy by \sy%
  125. \else
  126. \sy = \RTWindowHeight \divide \sy by \nsy %
  127. \hy = \RTWindowHeight %\advance \hy by \sy %
  128. \fi
  129. %% compute real height
  130. \nhl = \nsy \advance \nhl by 1 %
  131. \advance \nsy by -1 \advance \nsx by -1
  132. %% the picture
  133. \pgfdeclarelayer{foreground}
  134. \pgfsetlayers{main,foreground}
  135. \begin{tikzpicture}
  136. %% draw grid (if not invisible)
  137. \if\RTGridInvisible\RTDefGridInvisible
  138. \draw[lightgray, semithick] (0,0) grid[xstep = \sx,ystep=\sy ] (\RTWindowLength,\hy);
  139. %% draw border grid
  140. \draw [black, thick] (0,0) rectangle (\RTWindowLength,\hy);
  141. \else\relax
  142. \fi
  143. %% draw numbers (if not invisible)
  144. \if\RTNumbersInvisible\RTDefNumbersInvisible
  145. \foreach \i [evaluate = \i as \j using \i*\sx] in {0,...,#3}{
  146. \ifodd \i
  147. \else
  148. \pgfmathsetmacro\nbwithoffset{\i + \RTNumberOffset};
  149. \node[below, font=\RTNumberLabelSize \rtfont] at (\j +\sx , 0) {\pgfmathprintnumber[int trunc,/pgf/number format/assume math mode=true]{\nbwithoffset }};
  150. \fi
  151. }
  152. \else
  153. \relax
  154. \fi
  155. %% Task Names
  156. \if\RTWriteSymbols\RTDefWriteSymbols
  157. \foreach \i [evaluate = \i as \j using (\hy -3*\i*\sy)] in {0,...,\ntaskslessone}{
  158. \pgfmathsetmacro\task{\i + 1};
  159. \node[below, font=\rtfont] at (-\sx , \j-\sy) {\RTTaskLabelSize $\RTTaskSymbol_{\pgfmathprintnumber[int trunc]{\task}}$};
  160. }
  161. \else\relax
  162. \fi
  163. %% Horizontal axes
  164. \if\RTAxisInvisible\RTDefAxisInvisible
  165. \begin{pgfonlayer}{foreground}
  166. \foreach \i [evaluate = \i as \j using (\hy -3*\i*\sy)] in {0,...,\ntaskslessone}{
  167. \draw [very thick,-\RTArrowStyle] (\sx,\j-3*\sy) -- (\RTWindowLength - \sx,\j-3*\sy);
  168. }
  169. \end{pgfonlayer}
  170. \fi
  171. }
  172. \def\@RTDefaultValues{%
  173. \setkeys{RT}{height}%
  174. \setkeys{RT}{width}%
  175. \setkeys{RT}{labelsize}%
  176. \setkeys{RT}{numbersize}%
  177. \setkeys{RT}{symbol}%
  178. \setkeys{RT}{fillstyle}%
  179. \setkeys{RT}{color}
  180. \setkeys{RT}{linecolor}%
  181. \setkeys{RT}{xscale}%
  182. \setkeys{RT}{nosymbols}%
  183. }
  184. \def\@RTExecDefaultValues{
  185. \setkeys{RT}{color}%
  186. \setkeys{RT}{execlabel}%
  187. \setkeys{RT}{linecolor}%
  188. }
  189. \def\RTGridEnd{
  190. \end{tikzpicture}%
  191. \@RTDefaultValues%
  192. }
  193. \def\endRTGrid{
  194. \end{tikzpicture}%
  195. \@RTDefaultValues%
  196. }
  197. \newcommand{\RTSet}[1]{
  198. \setkeys{RT}{#1}
  199. }
  200. \newcommand{\RTSetDefault}{
  201. \@RTDefaultValues
  202. }
  203. %% internal
  204. \newcommand{\@compute@xx}[1]{
  205. \xx = #1\sx
  206. \divide \xx by \RTXScale
  207. \advance \xx by \sx
  208. }
  209. \newcommand{\@compute@xxx}[1]{
  210. \xxx = #1\sx
  211. \divide \xxx by \RTXScale
  212. \advance \xxx by \sx
  213. }
  214. \newcommand{\@compute@yy}[1]{
  215. \yy = -3\sy \multiply \yy by #1
  216. \advance \yy by \hy
  217. }
  218. \newcommand{\DrawTaskAxis}[2][nocommand=1]{%
  219. \setkeys{RT}{#1}%
  220. \@compute@yy{#2}
  221. \@compute@xx{0}
  222. \xxx = \RTWindowLength \advance \xxx by -\sx
  223. \draw [\RTLineColor,-\RTArrowStyle] (\xx,\yy) -- (\xx,\yyy);
  224. \@RTExecDefaultValues%
  225. }
  226. \newcommand{\DrawXYAxis}[3][nocommand=1]{%
  227. \setkeys{RT}{#1}%
  228. \@compute@yy{#2}
  229. \@compute@xx{0}
  230. \xxx = \RTWindowLength \advance \xxx by -\sx
  231. \draw [\RTLineColor,-\RTArrowStyle] (\xx,\yy) -- (\xxx,\yy);
  232. \yyy = 3\sy \multiply \yyy by #3 \advance \yyy by \yy
  233. \advance \yyy by -\sy
  234. \draw [\RTLineColor,-\RTArrowStyle] (\xx,\yy) -- (\xx,\yyy);
  235. \@RTExecDefaultValues%
  236. }
  237. \newcommand{\FLine}[5][nocommand=1]{%
  238. \setkeys{RT}{#1}%
  239. \@compute@xx{#2}
  240. \@compute@xxx{#4}
  241. \yy = #3\sy \advance \yy by 2\sy
  242. \yyy = #5\sy \advance \yyy by 2\sy
  243. \draw [\RTLineColor, line width=\RTLineWidth,\RTLineStyle] (\xx,\yy) -- (\xxx,\yyy);
  244. \@RTExecDefaultValues%
  245. }
  246. %% Task Arrival: draws an up arrow at the specified slot
  247. %% #1 : task number from 1 to n
  248. %% #2 : slot number from 0 to l-1
  249. \newcommand{\TaskArrival}[3][nocommand=1]{%
  250. \setkeys{RT}{#1}%
  251. \@compute@yy{#2}
  252. \@compute@xx{#3}
  253. \yyy = \yy \advance \yyy by 2\sy%
  254. \begin{pgfonlayer}{foreground}
  255. \draw [\RTLineColor, thick,-\RTArrowStyle] (\xx,\yy) -- (\xx,\yyy);
  256. \end{pgfonlayer}
  257. \@RTExecDefaultValues%
  258. }
  259. %% Task Arrival and deadline: draws an up arrow and a down arrow at the specified slots
  260. %% #1 : task number from 1 to n
  261. %% #2 : slot number from 0 to l-1
  262. %% #3 : relative deadline
  263. \newcommand{\TaskArrDead}[4][nocommand=1]{
  264. \setkeys{RT}{#1}%
  265. \@compute@yy{#2}
  266. \@compute@xx{#3}
  267. \yyy = \yy \advance \yyy by 2\sy
  268. \begin{pgfonlayer}{foreground}
  269. \draw [\RTLineColor, thick,-\RTArrowStyle] (\xx,\yy) -- (\xx,\yyy);
  270. \end{pgfonlayer}
  271. \advance \xx by #4\sx
  272. \begin{pgfonlayer}{foreground}
  273. \draw [\RTLineColor, thick, -\RTArrowStyle] (\xx,\yyy) -- (\xx,\yy);
  274. \end{pgfonlayer}
  275. \@RTExecDefaultValues
  276. }
  277. %% Task Deadline: draws a down arrow at the specified slot
  278. %% #1 : task number from 1 to n
  279. %% #2 : slot number from 0 to l-1
  280. \newcommand{\TaskDeadline}[3][nocommand=1]{
  281. \setkeys{RT}{#1}%
  282. \@compute@yy{#2}
  283. \@compute@xx{#3}
  284. \yyy = \yy \advance \yyy by 2\sy
  285. \begin{pgfonlayer}{foreground}
  286. \draw [\RTLineColor, thick, \RTArrowStyle-] (\xx,\yy) -- (\xx,\yyy);
  287. \end{pgfonlayer}
  288. \@RTExecDefaultValues
  289. }
  290. \newcommand{\TaskExecution}[4][nocommand=1]{
  291. \setkeys{RT}{#1}%
  292. \@compute@yy{#2}
  293. \@compute@xx{#3}
  294. \yyy = \yy \advance \yyy by \RTExecHeight\sy
  295. \@compute@xxx{#4}
  296. \draw [fill=\RTTaskColor,\RTTaskFill,draw=\RTLineColor, thick] (\xx,\yy) rectangle (\xxx,\yyy);
  297. \advance \xx by \xxx \xx = .5\xx
  298. \advance \yy by .5\RTExecHeight\sy
  299. \draw (\xx,\yy) node[font=\rtfont] {\RTNumberLabelSize \RTExecLabel};%\RTNumberLabelSize
  300. \@RTExecDefaultValues
  301. }
  302. %
  303. % Task Lock
  304. % par 1: task
  305. % par 2: time
  306. % par 3: resource
  307. %
  308. \newcommand{\TaskLock}[4][nocommand=1]{
  309. \setkeys{RT}{#1}%
  310. \@compute@yy{#2}
  311. \@compute@xx{#3}
  312. \yyy = \yy \advance \yyy by \sy
  313. \advance \yyy by .5\sy
  314. \node[font=\rtfont] at (\xx , \yyy) {\RTNumberLabelSize L(#4)}; %\RTNumberLabelSize
  315. \@RTExecDefaultValues
  316. }
  317. %
  318. % TaskUnlock
  319. % par 1: task
  320. % par 2: time
  321. % par 3: resource
  322. %
  323. \newcommand{\TaskUnlock}[4][nocommand=1]{
  324. \setkeys{RT}{#1}%
  325. \@compute@yy{#2}
  326. \@compute@xx{#3}
  327. \yyy = \yy \advance \yyy by \sy
  328. \advance \yyy by .5\sy
  329. \node[font=\rtfont] at (\xx , \yyy) {\RTNumberLabelSize U(#4)}; %\RTNumberLabelSize
  330. \@RTExecDefaultValues
  331. }
  332. %
  333. % Label
  334. % par 1: number of vertical slot
  335. % par 2: time
  336. % par 3: label
  337. %
  338. \newcommand{\Label}[4][nocommand=1]{
  339. \setkeys{RT}{#1}%
  340. %\@compute@yy{#2}
  341. \@compute@xx{#3}
  342. \yy = -\sy \multiply \yy by #2
  343. \advance \yy by \hy
  344. \yyy = \yy \advance \yyy by 2\sy %\yyy = \yy \advance \yyy by \sy
  345. \node[font=\rtfont, fill = white, draw=\RTLineColor, thin, drop shadow = {color = black}] at (\xx , \yyy) {\RTNumberLabelSize #4}; %\RTNumberLabelSize
  346. \@RTExecDefaultValues
  347. }
  348. %
  349. % Inherit
  350. % par 1: higher priority task (from)
  351. % par 2: lower priority task (to)
  352. % par 3: time
  353. %
  354. \newcommand{\Inherit}[4][nocommand=1]{
  355. \setkeys{RT}{#1}%
  356. \@compute@yy{#2}
  357. \@compute@xx{#4}
  358. \yyy = -3\sy \multiply \yyy by #3 \advance \yyy by \sy
  359. \advance \yyy by \hy \advance \yyy by -\sy % \RTWindowHeight
  360. \begin{pgfonlayer}{foreground}
  361. \draw [dashed, thick,-\RTArrowStyle] (\xx,\yy) -- (\xx,\yyy);
  362. \end{pgfonlayer}
  363. \@RTExecDefaultValues
  364. }
  365. %
  366. % Activation
  367. % par 1: activating task (from)
  368. % par 2: signal start time
  369. % par 3: activated task (to)
  370. % par 4: signal arrival time
  371. \newcommand{\Activation}[5][nocommand=1]{
  372. \setkeys{RT}{#1}%
  373. \@compute@yy{#2}
  374. \@compute@xx{#3}
  375. \yyy = -3\sy \multiply \yyy by #4 %\advance \yyy by \sy
  376. \advance \yyy by \hy %\advance \yyy by -\sy %\RTWindowHeight
  377. \xxx = #5\sx \advance \xxx by \sx
  378. \begin{pgfonlayer}{foreground}
  379. \draw [dashed, thick,-\RTArrowStyle] (\xx,\yy) -- (\xxx,\yyy);
  380. \end{pgfonlayer}
  381. }
  382. %
  383. % RTBox
  384. % par 1: time1
  385. % par 2: time2
  386. %
  387. \newcommand{\RTBox}[3][nocommand=1]{
  388. \setkeys{RT}{#1}%
  389. \yy = 0cm
  390. \advance \yy by \hy
  391. \yyy = 0cm % \yyy = \sy
  392. \@compute@xx{#2}
  393. \@compute@xxx{#3}
  394. \draw [pattern color=lightgray, draw=\RTLineColor, pattern=crosshatch, rounded corners, thin](\xx,\yy) rectangle (\xxx,\yyy);
  395. \@RTExecDefaultValues
  396. }
  397. %% %
  398. % % par 1: task
  399. % % par 2: first instant (arrival)
  400. % % par 3: second instant (deadline)
  401. % %
  402. % \newcommand{\Interval}[4][nocommand=1]{
  403. % \setkeys{RT}{#1}%
  404. % \@compute@yy{#2}
  405. % \advance \yy by 2.5\sy
  406. % \@compute@xx{#3}
  407. % \@compute@xxx{#4}
  408. % % da cambiare con psarc
  409. % \pscurve*[linecolor=\RTLineColor]{-}(\xx,\yy)(\xxx,\yy)
  410. % \@RTExecDefaultValues
  411. % }
  412. %
  413. %
  414. % RowLabel
  415. % par 1: task
  416. % par 2: label
  417. %
  418. \newcommand{\RowLabel}[3][nocommand=1]{
  419. \setkeys{RT}{#1}%
  420. \@compute@yy{#2}
  421. \advance \yy by 2\sy
  422. \xx = \RTRowLabelOffset %\advance \xx by \sx
  423. \node[below left,font=\rtfont] at (-\xx , \yy) {\RTTaskLabelSize #3};%\RTTaskLabelSize
  424. }
  425. %
  426. % TaskExecDelta
  427. % par 1: task
  428. % par 2: start time
  429. % par 3: delta
  430. %
  431. \newcommand{\TaskExecDelta}[4][nocommand=1]{
  432. \setkeys{RT}{#1}%
  433. \@compute@yy{#2}
  434. \@compute@xx{#3}
  435. \yyy = \yy \advance \yyy by \RTExecHeight \sy
  436. %\@compute@xxx{#4}
  437. \xxx = \xx \advance \xxx by #4\sx
  438. \draw [fill=\RTTaskColor,\RTTaskFill,draw=\RTLineColor, thick] (\xx,\yy) rectangle (\xxx,\yyy);
  439. \advance \xx by \xxx \xx = .5\xx
  440. \draw (\xx,\yy) node[above, font=\rtfont] {\RTTaskLabelSize \RTExecLabel}; %\RTNumberLabelSize
  441. \@RTExecDefaultValues
  442. }
  443. %
  444. % TaskRespTime
  445. % par 1: task
  446. % par 2: start time
  447. % par 3: finish time
  448. %
  449. \newcommand{\TaskRespTime}[4][nocommand=1]{
  450. \setkeys{RT}{#1}
  451. \@compute@yy{#2}
  452. \@compute@xx{#3}
  453. \yyy = \yy \advance \yyy by \sy
  454. \xxx = \xx \advance \xxx by #4\sx
  455. \draw [pattern color=\RTTaskColor,draw=\RTLineColor, pattern=crosshatch, thin] (\xx,\yy) rectangle (\xxx,\yyy);
  456. \@RTExecDefaultValues
  457. }
  458. \@ifclassloaded{beamer}{
  459. \renewcommand<>{\TaskArrival}[3][nocommand=1]{
  460. \only#4{\beameroriginal{\TaskArrival}[#1]{#2}{#3}}
  461. }
  462. \renewcommand<>{\TaskArrDead}[4][nocommand=1]{
  463. \only#5{\beameroriginal{\TaskArrDead}[#1]{#2}{#3}{#4}}
  464. }
  465. \renewcommand<>{\TaskDeadline}[3][nocommand=1]{
  466. \only#4{\beameroriginal{\TaskDeadline}[#1]{#2}{#3}}
  467. }
  468. \renewcommand<>{\TaskExecution}[4][nocommand=1]{
  469. \only#5{\beameroriginal{\TaskExecution}[#1]{#2}{#3}{#4}}
  470. }
  471. \renewcommand<>{\TaskExecDelta}[4][nocommand=1]{
  472. \only#5{\beameroriginal{\TaskExecDelta}[#1]{#2}{#3}{#4}}
  473. }
  474. \renewcommand<>{\TaskRespTime}[4][nocommand=1]{
  475. \only#5{\beameroriginal{\TaskRespTime}[#1]{#2}{#3}{#4}}
  476. }
  477. \renewcommand<>{\TaskLock}[4][nocommand=1]{
  478. \only#5{\beameroriginal{\TaskLock}[#1]{#2}{#3}{#4}}
  479. }
  480. \renewcommand<>{\TaskUnlock}[4][nocommand=1]{
  481. \only#5{\beameroriginal{\TaskUnlock}[#1]{#2}{#3}{#4}}
  482. }
  483. \renewcommand<>{\Label}[4][nocommand=1]{
  484. \only#5{\beameroriginal{\Label}[#1]{#2}{#3}{#4}}
  485. }
  486. \renewcommand<>{\Inherit}[4][nocommand=1]{
  487. \only#5{\beameroriginal{\Inherit}[#1]{#2}{#3}{#4}}
  488. }
  489. \renewcommand<>{\Activation}[5][nocommand=1]{
  490. \only#6{\beameroriginal{\Activation}[#1]{#2}{#3}{#4}{#5}}
  491. }
  492. \renewcommand<>{\RTBox}[3][nocommand=1]{
  493. \only#4{\beameroriginal{\RTBox}[#1]{#2}{#3}}
  494. }
  495. \renewcommand<>{\FLine}[5][nocommand=1]{
  496. \only#6{\beameroriginal{\FLine}[#1]{#2}{#3}{#4}{#5}}
  497. }
  498. }
  499. {\typeout{beamer not loaded}}
  500. \endinput