Document number
205065
Version
Rev. N
Issue date
2019-02-04
Sirius OBC and TCM User Manual
Page
85
of
174
Return value
Description
0 or greater
number of bytes that were
read.
- 1
see
errno
values
errno values
EIO
A read operation is not
supported on the device.
5.9.5.13.
int ioctl(…)
The devices provided by the CCSDS driver support different IOCTL’s.
Argument name
Type
Direction Description
fd
int
in
File descriptor received at
open
cmd
int
in
Command to send
val
void *
in
The parameter to pass is depended on which
IOCTL is called. Is described in table below.
Command table
Device
Parameter type
Description
CCSDS_SET_TM_CONFIG
/dev/ccsds-tm
tm_config_t
Sets a configuration
of the TM path.
CCSDS_GET_TM_CONFIG
/dev/ccsds-tm
tm_config_t *
Returns the
configuration of the
TM path.
CCSDS_SET_TC_CONFIG
/dev/ccsds-tc
tc_config_t
Sets a configuration
of the TC path.
CCSDS_GET_TC_CONFIG
/dev/ccsds-tc
tc_config_t *
Returns the
configuration of the
TC path.
CCSDS_GET_RADIO_STATUS
/dev/ccsds
radio_status_t
Gets radio status.
CCSDS_GET_TM_STATUS
/dev/ccsds-tm
tm_status_t*
Gets status of TM
path.
CCSDS_GET_TM_ERR_CNT
/dev/ccsds-tm
tm_error_cnt_t*
Gets the TM error
counter.
CCSDS_GET_TC_ERR_CNT
/dev/ccsds-tc
tc_error_cnt_t*
Gets the TC error
counter.
CCSDS_GET_TC_STATUS
/dev/ccsds-tc
tc_status_t*
Gets status of TC
path.
CCSDS_SET_TC_FRAME_CTRL
/dev/ccsds-tc
uint32_t
Set the TC frame
control register.
Bit 2-31 unused.
Bit 1:
0
–
No effect
1
–
Set to signal for
the CCSDS IP a
telecommand frame
has been read.
Bit 0:
0
–
No effect
1
–
Reset the buffer
function in the
CCSDS IP.
CCSDS_ENABLE_TM
/dev/ccsds-tm
N.A
Enable TM
CCSDS_DISABLE_TM
/dev/ccsds-tm
N.A
Disable TM.