Represents a single device connection.
More...
#include <libpict.h>
|
uint8_t | io_kill_switch |
| Set to 1 when it is no longer safe to send any data to the device (socket closed, device unplugged)
|
|
uint8_t | operation_kill_switch |
| Set to 1 when it is no longer safe to run operations (device is unresponsive, pipe issues)
|
|
uint8_t | connection_type |
| One of enum PtpConnType.
|
|
int | transaction |
| Current transaction ID.
|
|
int | session |
| Current session ID.
|
|
uint8_t * | data |
| Global buffer for data reading and writing.
|
|
unsigned int | data_length |
| Size of data in bytes.
|
|
unsigned int | data_filled_length |
| Size of valid PTP data in data in bytes.
|
|
unsigned int | max_packet_size |
|
struct PtpDeviceInfo * | di |
| Info about current connection, used to detect camera type, supported opodes, etc.
|
|
unsigned int | data_phase_length |
| For Windows compatibility, this is set to indicate lenth for a data packet that will be sent after a command packet. Will be set to zero when ptp_send_packet is called.
|
|
void * | comm_backend |
| For session comm/io structures (holds backend instance pointers)
|
|
void * | userdata |
| Free pointer to hold per ptp session information.
|
|
pthread_mutex_t * | mutex |
| Optional (see PTP_DONT_USE_MUTEX)
|
|
uint8_t | wait_for_response |
| Optionally wait up to 256 seconds for a response. Some PTP operations require this, such as EOS capture.
|
|
uint8_t | response_wait_default |
| Default value for wait_for_response.
|
|
struct PtpPropAvail * | avail |
| For devices that implement it, this will hold a linked list of properties and an array of their supported values. generic_ functions will reject set property calls if an invalid value is written.
|
|
FILE * | comm_dump |
| If non-NULL, all reads/writes will be logged to this file.
|
|
void * | oc |
|
Represents a single device connection.
Definition at line 114 of file libpict.h.
◆ avail
For devices that implement it, this will hold a linked list of properties and an array of their supported values. generic_ functions will reject set property calls if an invalid value is written.
- Note
- : Optional
Definition at line 170 of file libpict.h.
◆ comm_backend
void* PtpRuntime::comm_backend |
For session comm/io structures (holds backend instance pointers)
Definition at line 152 of file libpict.h.
◆ comm_dump
FILE* PtpRuntime::comm_dump |
If non-NULL, all reads/writes will be logged to this file.
Definition at line 173 of file libpict.h.
◆ connection_type
uint8_t PtpRuntime::connection_type |
◆ data
uint8_t* PtpRuntime::data |
Global buffer for data reading and writing.
- Note
- This buffer is reallocated during runtime to grow as needed
Definition at line 133 of file libpict.h.
◆ data_filled_length
unsigned int PtpRuntime::data_filled_length |
Size of valid PTP data in data in bytes.
Definition at line 137 of file libpict.h.
◆ data_length
unsigned int PtpRuntime::data_length |
Size of data in bytes.
Definition at line 135 of file libpict.h.
◆ data_phase_length
unsigned int PtpRuntime::data_phase_length |
For Windows compatibility, this is set to indicate lenth for a data packet that will be sent after a command packet. Will be set to zero when ptp_send_packet is called.
Definition at line 149 of file libpict.h.
◆ di
Info about current connection, used to detect camera type, supported opodes, etc.
- Note
- Set by ptp_parse_device_info. This should be NULL when this struct is created.
Definition at line 145 of file libpict.h.
◆ io_kill_switch
uint8_t PtpRuntime::io_kill_switch |
Set to 1 when it is no longer safe to send any data to the device (socket closed, device unplugged)
Definition at line 116 of file libpict.h.
◆ max_packet_size
unsigned int PtpRuntime::max_packet_size |
- Note
- Max size of a USB bulk transfer or max TCP packet size
- Todo
- need to have a max packet size for both IN and OUT
Definition at line 141 of file libpict.h.
◆ mutex
pthread_mutex_t* PtpRuntime::mutex |
Optional (see PTP_DONT_USE_MUTEX)
Definition at line 158 of file libpict.h.
◆ oc
◆ operation_kill_switch
uint8_t PtpRuntime::operation_kill_switch |
Set to 1 when it is no longer safe to run operations (device is unresponsive, pipe issues)
Definition at line 119 of file libpict.h.
◆ response_wait_default
uint8_t PtpRuntime::response_wait_default |
Default value for wait_for_response.
Definition at line 165 of file libpict.h.
◆ session
Current session ID.
Definition at line 129 of file libpict.h.
◆ transaction
int PtpRuntime::transaction |
Current transaction ID.
- Note
- The transaction ID and session ID is managed by the packet generator functions
Definition at line 127 of file libpict.h.
◆ userdata
void* PtpRuntime::userdata |
Free pointer to hold per ptp session information.
Definition at line 155 of file libpict.h.
◆ wait_for_response
uint8_t PtpRuntime::wait_for_response |
Optionally wait up to 256 seconds for a response. Some PTP operations require this, such as EOS capture.
- Note
- Not thread safe. Will be reset after each operation.
Definition at line 162 of file libpict.h.
The documentation for this struct was generated from the following file: