ref_cyc

iref_cyc

Outline

Reference cyclic handler state.

C format

 ER      ref_cyc (ID cycid, T_RCYC *pk_rcyc);
 ER      iref_cyc (ID cycid, T_RCYC *pk_rcyc);
Parameter(s)

I/O

Parameter

Description

I

 ID      cycid;
ID number of the cyclic handler to be referenced.

O

 T_RCYC  *pk_rcyc;
Pointer to the packet returning the cyclic handler state.



[Cyclic handler state packet: T_RCYC]

 typedef struct  t_rcyc {
     STAT    cycstat;        /*Current state*/
     RELTIM  lefttim;        /*Time left before the next activation*/
     ATR     cycatr;         /*Attribute*/
     RELTIM  cyctim;         /*Activation cycle*/
     RELTIM  cycphs;         /*Activation phase*/
 } T_RCYC;


Explanation

Stores cyclic handler state packet (current state, time left before the next activation, etc.) of the cyclic handler specified by parameter cycid in the area specified by parameter pk_rcyc.

Note For details about the cyclic handler state packet, refer to "15.2.12 Cyclic handler state packet".

Return value

Macro

Value

Description

E_OK

0

Normal completion.

E_ID

-18

Invalid ID number.

- cycid < 0x0

- cycid > Maximum ID number

E_CTX

-25

Context error.

- This service call was issued in the CPU locked state.

E_NOEXS

-42

Non-existent object.

- Specified cyclic handler is not registered.