30.12.2013 Views

T-Kernel Specification (1.B0.02)

T-Kernel Specification (1.B0.02)

T-Kernel Specification (1.B0.02)

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

4.7. TIME MANAGEMENT FUNCTIONS 175<br />

tk ref cyc<br />

Reference Cyclic Handler Status<br />

[C Language Interface]<br />

ER ercd = tk_ref_cyc ( ID cycid, T_RCYC *pk_rcyc ) ;<br />

[Parameters]<br />

ID cycid Cyclic handler ID<br />

T RCYC* pk rcyc Address of packet for returning status information<br />

[Return Parameters]<br />

ER ercd Error code<br />

pk rcyc detail:<br />

VP exinf Extended information<br />

RELTIM lfttim Time remaining until the next start time<br />

UINT cycstat Cyclic handler activation state<br />

(Other implementation-dependent parameters may be added beyond this point.)<br />

[Error Codes]<br />

E OK<br />

E ID<br />

E NOEXS<br />

E PAR<br />

Normal completion<br />

Invalid ID number (cycid is invalid or cannot be used)<br />

Object does not exist (the cyclic handler designated in cycid does not exist)<br />

Parameter error (the return parameter packet address cannot be used)<br />

[Description]<br />

References the status of the cyclic handler designated in cycid, passing in return parameters the cyclic<br />

handler activation state cycstat, the time remaining until the next start lfttim, and extended information<br />

exinf.<br />

The following information is returned in cycstat.<br />

cycstat:= (TCYC_STP | TCYC_STA)<br />

TCYC STP<br />

TCYC STA<br />

The cyclic handler is inactive<br />

The cyclic handler is active<br />

#define TCYC_STP 0x00 /* cyclic handler is inactive */<br />

#define TCYC_STA 0x01 /* cyclic handler is active */<br />

If the cyclic handler designated in cycid does not exist, error code E NOEXS is returned.<br />

Copyright c○ 2002, 2003 by T-Engine Forum<br />

T-<strong>Kernel</strong> <strong>1.B0.02</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!