Document number
204911
Version
Rev. K
Issue date
2016-10-11
Sirius Breadboard User Manual
www.aacmicrotec.com
Page
63
of
106
5.10.2.7.
int open(…)
Opens the devices provided by the CCSDS RTEMS driver. The device 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. Shall be CCSDS_NAME,
CCSDS_NAME_TM or CCSDS_NAME_TC
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
≥0
A file descriptor for the device
on success
- 1
see
errno
values
errno values
EBUSY
If device already opened
EPERM
If wrong permissions
ENOENT
Bad file descriptor
5.10.2.8.
int close(…)
Closes access to the device.
Argument name
Type
Direction Description
Fd
int
in
File descriptor received at
open
Return value
Description
0
Device closed successfully
-1
see
errno
values
errno values
ENOENT
Bad file descriptor
5.10.2.9.
size_t write(…)
To send a Telemetry Transfer frame a write-
operation on device “/dev/ccsds-tm” shall be
used. The TM frame to send is passed as a pointer to a variable of type tm_frame_t.
Argument name
Type
Direction Description
Fd
int
in
File descriptor received at
open
Buf
void *
in
Character buffer to read data from
Nbytes
size_t
in
Number of bytes to write to the device.