CAN_DEVCTL_GET_PRIO
QNX SDP8.0Devctl and Ioctl CommandsDeveloper
Get the priority for transmitted messages
Synopsis:
#include <sys/can_dcmd.h>
#define CAN_DEVCTL_GET_PRIO __DIOF(_DCMD_MISC, CAN_CMD_CODE + 4, uint32_t)
Arguments to devctl():
Argument | Value |
---|---|
filedes | A file descriptor that you obtained by opening the device. This must be for a transmit mailbox (e.g., /dev/can1/tx3). |
dcmd | CAN_DEVCTL_GET_PRIO |
dev_data_ptr | A pointer to a uint32_t |
n_bytes | sizeof(uint32_t) |
dev_info_ptr | NULL |
Description:
This command gets the priority of messages for a transmit mailbox.
Input:
None.
Output:
The priority.
Example:
int ret;
uint32_t val;
if( (fd = open( "/dev/can1/tx3", O_RDWR)) == -1 )
{
printf("open of %s failed \n", devname);
exit(EXIT_FAILURE);
}
if(EOK != (ret = devctl(fd, CAN_DEVCTL_GET_PRIO, &val, sizeof(val), NULL)))
{
fprintf(stderr, "devctl CAN_DEVCTL_GET_PRIO: %s\n", strerror(ret));
} else {
printf("GET_PRIO = %u\n", val);
}
See also:
devctl() in the QNX OS C Library Reference
canctl in the Utilities Reference
Page updated: