Function that returns the status of the Application Diagnostic's bits of a safety island.
|
i32 safe_appl_diag (i32 nIsle [, i32 what=0])
|
|
Number of the island (1-:-31)
|
|
Parameter to select the bits group. (optional, default 0)
|
|
0
|
Receive all 32 bits
|
1
|
Receive the first 16 bits
|
2
|
Receive the last 16 bits
|
|
|
Returns:
|
|
|
what = 0
|
> 0, Application Diagnostic (bit 0 -:- 31)
|
Positive result
|
0
|
Negative result
|
what = 1
|
> 0, Application Diagnostic (bit 0 -:- 15)
|
Positive result
|
-1
|
Illegal parameters
|
-2
|
Illegal nIsle
|
-4
|
Non-existent island
|
what = 2
|
> 0, Application Diagnostic (bit 16 -:- 31)
|
Positive result
|
-1
|
Illegal parameters
|
-2
|
Illegal nIsle
|
-4
|
Non-existent island
|
|
|
Rule, Task
|
|
RTE 34.20.1
|
|
|
Example of use:
int esito
esito = safe_appl_diag(1)
esito = safe_appl_diag(1, 1)
esito = safe_appl_diag(1, 2)
|
|