Caller-owned session, initialized to zero before opening. More...
#include <lwir_device.h>

Data Fields | |
| const volatile sig_atomic_t * | cancelled |
| char | serial [64] |
| enum lwir_frame_layout | layout |
| int | video_fd |
| bool | video_open |
| bool | video_streaming |
| bool | video_have_sequence |
| bool | video_failed |
| unsigned | video_count |
| unsigned | video_width |
| unsigned | video_height |
| uint32_t | video_last_sequence |
| uint64_t | video_sequence |
| uint64_t | video_good_arrival_us |
| unsigned | video_good_frames |
| bool | video_power_ready |
| char | video_power_key [160] |
| char | video_power_port [64] |
| unsigned | video_usb_bus |
| unsigned | video_usb_address |
| size_t | video_bytes |
| struct lwir_video_buffer | video_buffers [LWIR_VIDEO_BUFFERS] |
Detailed Description
Caller-owned session, initialized to zero before opening.
Handles belong only to the driver. Keeping their storage here avoids a Sensoraia allocation; callers use the functions below, not backend handles directly.
Definition at line 125 of file lwir_device.h.
Field Documentation
◆ cancelled
| const volatile sig_atomic_t* lwir_device::cancelled |
Borrowed from the options at open; may be NULL.
Definition at line 126 of file lwir_device.h.
◆ layout
| enum lwir_frame_layout lwir_device::layout |
Combined Tiny1-C or image-only TDK, fixed by USB identity.
Definition at line 128 of file lwir_device.h.
◆ serial
| char lwir_device::serial[64] |
USB serial read from sysfs, empty when the device reports none.
Definition at line 127 of file lwir_device.h.
◆ video_buffers
| struct lwir_video_buffer lwir_device::video_buffers[LWIR_VIDEO_BUFFERS] |
Mappings; only the first video_count are used.
Definition at line 159 of file lwir_device.h.
◆ video_bytes
| size_t lwir_device::video_bytes |
Expected bytesused per frame (sizeimage) for the layout.
Definition at line 158 of file lwir_device.h.
◆ video_count
| unsigned lwir_device::video_count |
video_count: buffers granted by REQBUFS (2..LWIR_VIDEO_BUFFERS). video_width / video_height: per-plane geometry, not transport height.
Definition at line 139 of file lwir_device.h.
◆ video_failed
| bool lwir_device::video_failed |
Sticky poison after a fatal kernel/protocol error; every later call fails with EIO until close and reopen.
Definition at line 136 of file lwir_device.h.
◆ video_fd
| int lwir_device::video_fd |
V4L2 descriptor holding the exclusive flock; -1 once closed.
Definition at line 129 of file lwir_device.h.
◆ video_good_arrival_us
| uint64_t lwir_device::video_good_arrival_us |
Host MONOTONIC arrival of the last qualifying frame.
Definition at line 144 of file lwir_device.h.
◆ video_good_frames
| unsigned lwir_device::video_good_frames |
Consecutive good frames, saturating at eight. Once eight is reached it latches for the rest of the USB power instance.
Definition at line 147 of file lwir_device.h.
◆ video_have_sequence
| bool lwir_device::video_have_sequence |
Definition at line 133 of file lwir_device.h.
◆ video_height
| unsigned lwir_device::video_height |
Definition at line 139 of file lwir_device.h.
◆ video_last_sequence
| uint32_t lwir_device::video_last_sequence |
Last raw 32-bit V4L2 sequence number seen.
Definition at line 140 of file lwir_device.h.
◆ video_open
| bool lwir_device::video_open |
video_streaming is set just before STREAMON so close always issues STREAMOFF, even after a partially failed start. video_have_sequence says whether video_last_sequence holds a real kernel sequence yet.
Definition at line 133 of file lwir_device.h.
◆ video_power_key
| char lwir_device::video_power_key[160] |
"bootid:sysfs-inode:busnum:devnum"; changes whenever the camera re-enumerates, which is the only observable power boundary on Linux.
Definition at line 153 of file lwir_device.h.
◆ video_power_port
| char lwir_device::video_power_port[64] |
Physical USB port name (for example 1-1.2) used to name the marker.
Definition at line 154 of file lwir_device.h.
◆ video_power_ready
| bool lwir_device::video_power_ready |
True when this USB power instance already completed startup qualification, either now or according to the runtime marker.
Definition at line 150 of file lwir_device.h.
◆ video_sequence
| uint64_t lwir_device::video_sequence |
64-bit extension of the kernel sequence; skipped kernel numbers also advance it, so gaps stay visible to consumers.
Definition at line 143 of file lwir_device.h.
◆ video_streaming
| bool lwir_device::video_streaming |
Definition at line 133 of file lwir_device.h.
◆ video_usb_address
| unsigned lwir_device::video_usb_address |
Definition at line 157 of file lwir_device.h.
◆ video_usb_bus
| unsigned lwir_device::video_usb_bus |
USB bus and address used to reach the same device through usbfs for vendor state/control requests.
Definition at line 157 of file lwir_device.h.
◆ video_width
| unsigned lwir_device::video_width |
Definition at line 139 of file lwir_device.h.
The documentation for this struct was generated from the following file:
- modules/lwir_cam/lwir_device.h