Printer Device and Framework Status helper functions.
More...
◆ caps_drv_is_printing()
int caps_drv_is_printing |
( |
struct caps_drv * |
cdrv | ) |
|
Check if the libcapsdriver framework is printing
- Parameters
-
[in] | cdrv | libcapsdriver handle |
- Return values
-
1 | (true) Framework is printing (e.g. printer device is busy) |
0 | (false) Framework and printer is idling |
◆ caps_drv_is_offline()
int caps_drv_is_offline |
( |
struct caps_drv * |
cdrv | ) |
|
Check if the printer is offline
- Parameters
-
[in] | cdrv | libcapsdriver handle |
- Return values
-
1 | (true) The printer is already offline |
0 | (false) The printer is online, a communication is still possible |
- Attention
- This call isn't fully reliable, e.g. an already gone printer device can still be reported as online. Refer fd_is_valid() for details
◆ caps_drv_is_empty()
int caps_drv_is_empty |
( |
struct caps_drv * |
cdrv | ) |
|
Check if the printer is empty (e.g. out of paper)
- Parameters
-
[in] | cdrv | libcapsdriver handle |
- Return values
-
1 | (true) The printer's paper tray is empty and it cannot continue |
0 | (false) The printer is ready |
- Precondition
- Monitoring the printer must be enabled, e.g. CAPS_TWEAK_SKIP_STATUS isn't set, else always 0 ('false') is returned.
◆ caps_drv_is_fault_state()
int caps_drv_is_fault_state |
( |
struct caps_drv * |
cdrv | ) |
|
Check if the printer is in an error/fault state
- Parameters
-
[in] | cdrv | libcapsdriver handle |
- Return values
-
1 | (true) The printer is in an error/fault state |
0 | (false) The printer is ready |
A printer in an error/fault state means most of the time a paper jam.
- Precondition
- Monitoring the printer must be enabled, e.g. CAPS_TWEAK_SKIP_STATUS isn't set, else always 0 ('false') is returned.