Document number
205065
Version
Rev. N
Issue date
2019-02-04
Sirius OBC and TCM User Manual
Page
29
of
174
5.3. Error Manager
5.3.1. Description
The error manager driver is a software abstraction layer meant to simplify the usage of the
error manager for the application writer.
This section describes the driver as one utility for accessing the error manager device
5.3.2. RTEMS API
This API represents t
he driver interface from a user application’s perspective for the RTEMS
driver.
The driver functionality is accessed through the RTEMS POSIX API for ease of use. In case
of failure on a function call, the
errno
value is set for determining the cause.
The error manager driver does not support writing nor reading to the device file. Instead,
register accesses are performed using ioctls.
The driver exposes a message queue for receiving interrupt driven events such as power
loss, non-fatal multiple errors generated by the RAM EDAC mechanism.
5.3.2.1.
int open(…)
Opens access to the device, it can only be opened once at a time.
Argument name
Type
Direction
Description
filename
char *
in
The absolute path to the file that is to be
opened. Error manager device is defined as
RTEMS_ERRMAN_DEVICE_NAME.
oflags
int
in
A bitwise 'or' separated list of values that
determine the method in which the file is to be
opened (whether it should be read only,
read/write, whether it should be cleared when
opened, etc). See a list of legal values for this
field at the end.
Return value
Description
fd
A file descriptor for the device on
success
-1
see
errno
values
errno values
EALREADY
Device already opened
5.3.2.2.
int close(…)
Closes access to the device.
Argument name
Type
Direction
Description
fd
int
in
File descriptor received at
open