ref_alm

iref_alm

Outline

Reference alarm handler state.

C format

 ER      ref_alm (ID almid, T_RALM *pk_ralm);
 ER      iref_alm (ID almid, T_RALM *pk_ralm);
Parameter(s)

I/O

Parameter

Description

I

 ID      almid;
ID number of the alarm handler.

O

 T_RALM  *pk_ralm;
Pointer to the packet returning the alarm handler state.



[Alarm handler state packet: T_RALM]

 typedef struct  t_ralm {
     STAT    almstat;        /*Current state*/
     RELTIM  lefttim;        /*Time left before the next activation*/
 } T_RALM;


Explanation

Stores alarm handler state packet (current state, time until the next activation, etc.) of the alarm handler specified by parameter almid in the area specified by parameter pk_ralm.

- almstat
Store the current state.

TALM_STP: Non-operational state

TALM_STA: Operational state

- lefttim
Stores the time until the next activation (in millisecond). When the target alarm handler is in the non-operational state, lefttim is undefined.

Return value

Macro

Value

Description

E_OK

0

Normal completion.

E_PAR

-17

Parameter error.

- pk_ralm == NULL

E_ID

-18

Invalid ID number.

- almid < 0

- almid > VTMAX_ALH

E_CTX

-25

Context error.

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

- This service call was issued in the status "PSW.IPL > kernel interrupt mask level".

Note When the iref_alm is issued from task or the ref_alm is issued from non-task, the context error is not detected and normal operation of the system is not guaranteed.

E_MACV

-26

Memory access violation. (only for ref_alm)

- The operand-write access to the area indicated by pk_ralm has not been permitted to the invoking task.

E_NOEXS

-42

Non-existent object.

- The alarm handler specified by almid does not exist.