Document number
205065
Version
Rev. N
Issue date
2019-02-04
Sirius OBC and TCM User Manual
Page
68
of
174
Return value
Description
>0
Received size of the actual
packet. Can be less than
nbytes
.
0
Packet size is 0, or buffer size
was lower than received
packet size, with errno value is
set to EOVERFLOW.
-1
see
errno
values
errno values
EBADF
The file descriptor
fd
is not an
open file descriptor.
EINVAL
Packet size is larger than
SPWN_MAX_PACKET_SIZE
, or
buffer is NULL.
EIO
Internal RTEMS resource
error.
EBUSY
Receive descriptor not
currently available.
EOVERFLOW
Packet size overflow occurred
on reception.
ETIMEDOUT
Timeout received. Received
packet is incomplete.
5.7.2.4. ssize_t write
(…)
Transmits a packet.
Note!
This call is blocked till the package is transmitted.
Argument name
Type
Direction Description
fd
int
in
File descriptor received at
open
.
buf
void *
in
Character buffer containing the packet.
nbytes
size_t
in
Packet size in bytes. Must be between 0 and
SPWN_MAX_PACKET_SIZE
bytes.
Return value
Description
>=0
Number of bytes that were
transmitted.
<0
see
errno
values