Document number
205065
Version
Rev. N
Issue date
2019-02-04
Sirius OBC and TCM User Manual
Page
84
of
174
5.9.5.11. ssize_t write
(…)
To send data on virtual channel 0-6, the device descriptor described 5.9.5 shall be used. TM
needs to enabled to successfully send telemetry. If the device is opened in blocking mode,
the write operation will wait until all data has been transferred before returning. For devices
opened in blocking mode and data has not been transferred within 1500 msec, the write call
is aborted and an error is reported. The timeout value is based on expected time of writing
2
17
bytes at lowest TM Bitrate. For devices opened in non-blocking mode, the write call
returns immediately and the status of the transfer is returned by a message available in a
message queue of the driver. See 5.9.2
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 (0-65535) to write to the
device.
Return value
Description
0 or greater
number of bytes that were
written.
- 1
see
errno
values
errno values
EIO
Device not ready for write or
write operation is not supported
on device
ETIMEDOUT
A write to a device in blocking
mode did not get a response
from IP within expected time.
ENOSYS
TM is not enabled
5.9.5.12. ssize_t read
(…)
To read a Telecommand Transfer frame a read-operat
ion on device “/dev/ccsds
-
tc0”
shall
be used. The read Telecommand Transfer frame is passed as a pointer to a variable of type
tc_frame_t. This call is blocking until a Telecommand Transfer Frame is received.
Argument name
Type
Direction Description
fd
int
in
File descriptor received at
open
buf
void *
in
Character buffer where read data is returned
nbytes
size_t
in
Number of bytes to write from the