CHDK_DE Vorschauversion  Trunk Rev. 5641
 Alle Datenstrukturen Dateien Funktionen Variablen Typdefinitionen Aufzählungen Aufzählungswerte Makrodefinitionen
ptp.h-Dateireferenz
+ Dieser Graph zeigt, welche Datei direkt oder indirekt diese Datei enthält:

gehe zum Quellcode dieser Datei

Makrodefinitionen

#define PTP_CHDK_VERSION_MAJOR   2
 
#define PTP_CHDK_VERSION_MINOR   9
 
#define PTP_OC_CHDK   0x9999
 
#define PTP_CHDK_TD_DOWNLOAD   0x1
 
#define PTP_CHDK_TD_CLEAR   0x2
 
#define PTP_CHDK_SL_LUA   0
 
#define PTP_CHDK_SL_UBASIC   1
 
#define PTP_CHDK_SL_MASK   0xFF
 
#define PTP_CHDK_SCRIPT_FL_NOKILL   0x100
 
#define PTP_CHDK_SCRIPT_FL_FLUSH_CAM_MSGS   0x200
 
#define PTP_CHDK_SCRIPT_FL_FLUSH_HOST_MSGS   0x400
 
#define PTP_CHDK_SCRIPT_STATUS_RUN   0x1
 
#define PTP_CHDK_SCRIPT_STATUS_MSG   0x2
 
#define PTP_CHDK_SCRIPT_SUPPORT_LUA   0x1
 
#define PTP_CHDK_GETMEM_MODE_DIRECT   0x0
 
#define PTP_CHDK_GETMEM_MODE_BUFFER   0x1
 
#define PTP_CHDK_CAPTURE_JPG   0x1
 
#define PTP_CHDK_CAPTURE_RAW   0x2
 
#define PTP_CHDK_CAPTURE_DNGHDR   0x4
 
#define PTP_CHDK_CAPTURE_CRAW   0x8
 
#define PTP_CHDK_CAPTURE_NOTSET   0x10000000
 

Aufzählungen

enum  ptp_chdk_command {
  PTP_CHDK_Version = 0, PTP_CHDK_GetMemory, PTP_CHDK_SetMemory, PTP_CHDK_CallFunction,
  PTP_CHDK_TempData, PTP_CHDK_UploadFile, PTP_CHDK_DownloadFile, PTP_CHDK_ExecuteScript,
  PTP_CHDK_ScriptStatus, PTP_CHDK_ScriptSupport, PTP_CHDK_ReadScriptMsg, PTP_CHDK_WriteScriptMsg,
  PTP_CHDK_GetDisplayData, PTP_CHDK_RemoteCaptureIsReady, PTP_CHDK_RemoteCaptureGetData
}
 
enum  ptp_chdk_script_data_type {
  PTP_CHDK_TYPE_UNSUPPORTED = 0, PTP_CHDK_TYPE_NIL, PTP_CHDK_TYPE_BOOLEAN, PTP_CHDK_TYPE_INTEGER,
  PTP_CHDK_TYPE_STRING, PTP_CHDK_TYPE_TABLE
}
 
enum  ptp_chdk_script_msg_type { PTP_CHDK_S_MSGTYPE_NONE = 0, PTP_CHDK_S_MSGTYPE_ERR, PTP_CHDK_S_MSGTYPE_RET, PTP_CHDK_S_MSGTYPE_USER }
 
enum  ptp_chdk_script_error_type { PTP_CHDK_S_ERRTYPE_NONE = 0, PTP_CHDK_S_ERRTYPE_COMPILE, PTP_CHDK_S_ERRTYPE_RUN, PTP_CHDK_S_ERR_SCRIPTRUNNING = 0x1000 }
 
enum  ptp_chdk_script_msg_status { PTP_CHDK_S_MSGSTATUS_OK = 0, PTP_CHDK_S_MSGSTATUS_NOTRUN, PTP_CHDK_S_MSGSTATUS_QFULL, PTP_CHDK_S_MSGSTATUS_BADID }
 

Makro-Dokumentation

#define PTP_CHDK_CAPTURE_CRAW   0x8

Definiert in Zeile 178 der Datei ptp.h.

#define PTP_CHDK_CAPTURE_DNGHDR   0x4

Definiert in Zeile 172 der Datei ptp.h.

#define PTP_CHDK_CAPTURE_JPG   0x1

Definiert in Zeile 146 der Datei ptp.h.

#define PTP_CHDK_CAPTURE_NOTSET   0x10000000

Definiert in Zeile 181 der Datei ptp.h.

#define PTP_CHDK_CAPTURE_RAW   0x2

Definiert in Zeile 152 der Datei ptp.h.

#define PTP_CHDK_GETMEM_MODE_BUFFER   0x1

Definiert in Zeile 139 der Datei ptp.h.

#define PTP_CHDK_GETMEM_MODE_DIRECT   0x0

Definiert in Zeile 138 der Datei ptp.h.

#define PTP_CHDK_SCRIPT_FL_FLUSH_CAM_MSGS   0x200

Definiert in Zeile 127 der Datei ptp.h.

#define PTP_CHDK_SCRIPT_FL_FLUSH_HOST_MSGS   0x400

Definiert in Zeile 128 der Datei ptp.h.

#define PTP_CHDK_SCRIPT_FL_NOKILL   0x100

Definiert in Zeile 126 der Datei ptp.h.

#define PTP_CHDK_SCRIPT_STATUS_MSG   0x2

Definiert in Zeile 132 der Datei ptp.h.

#define PTP_CHDK_SCRIPT_STATUS_RUN   0x1

Definiert in Zeile 131 der Datei ptp.h.

#define PTP_CHDK_SCRIPT_SUPPORT_LUA   0x1

Definiert in Zeile 134 der Datei ptp.h.

#define PTP_CHDK_SL_LUA   0

Definiert in Zeile 121 der Datei ptp.h.

#define PTP_CHDK_SL_MASK   0xFF

Definiert in Zeile 123 der Datei ptp.h.

#define PTP_CHDK_SL_UBASIC   1

Definiert in Zeile 122 der Datei ptp.h.

#define PTP_CHDK_TD_CLEAR   0x2

Definiert in Zeile 115 der Datei ptp.h.

#define PTP_CHDK_TD_DOWNLOAD   0x1

Definiert in Zeile 114 der Datei ptp.h.

#define PTP_CHDK_VERSION_MAJOR   2

Definiert in Zeile 9 der Datei ptp.h.

#define PTP_CHDK_VERSION_MINOR   9

Definiert in Zeile 10 der Datei ptp.h.

#define PTP_OC_CHDK   0x9999

Definiert in Zeile 30 der Datei ptp.h.

Dokumentation der Aufzählungstypen

Aufzählungswerte
PTP_CHDK_Version 
PTP_CHDK_GetMemory 
PTP_CHDK_SetMemory 
PTP_CHDK_CallFunction 
PTP_CHDK_TempData 
PTP_CHDK_UploadFile 
PTP_CHDK_DownloadFile 
PTP_CHDK_ExecuteScript 
PTP_CHDK_ScriptStatus 
PTP_CHDK_ScriptSupport 
PTP_CHDK_ReadScriptMsg 
PTP_CHDK_WriteScriptMsg 
PTP_CHDK_GetDisplayData 
PTP_CHDK_RemoteCaptureIsReady 
PTP_CHDK_RemoteCaptureGetData 

Definiert in Zeile 33 der Datei ptp.h.

33  {
34  PTP_CHDK_Version = 0, // return param1 is major version number
35  // return param2 is minor version number
36  PTP_CHDK_GetMemory, // param2 is base address (direct may fail on MMIO etc. Use buffered for those)
37  // param3 is size (in bytes)
38  // param4 is options: 0 read directly, 1 buffer. Other values reserved
39  // return data is memory block
40  PTP_CHDK_SetMemory, // param2 is address
41  // param3 is size (in bytes)
42  // data is new memory block
43  PTP_CHDK_CallFunction, // data is array of function pointer and 32 bit int arguments (max: 10 args prior to protocol 2.5)
44  // return param1 is return value
45  PTP_CHDK_TempData, // data is data to be stored for later
46  // param2 is for the TD flags below
47  PTP_CHDK_UploadFile, // data is 4-byte length of filename, followed by filename and contents
48  PTP_CHDK_DownloadFile, // preceded by PTP_CHDK_TempData with filename
49  // return data are file contents
50  PTP_CHDK_ExecuteScript, // data is script to be executed
51  // param2 is language of script
52  // in proto 2.6 and later, language is the lower byte, rest is used for PTP_CHDK_SCRIPT_FL* flags
53  // return param1 is script id, like a process id
54  // return param2 is status from ptp_chdk_script_error_type
55  PTP_CHDK_ScriptStatus, // Script execution status
56  // return param1 bits
57  // PTP_CHDK_SCRIPT_STATUS_RUN is set if a script running, cleared if not
58  // PTP_CHDK_SCRIPT_STATUS_MSG is set if script messages from script waiting to be read
59  // all other bits and params are reserved for future use
60  PTP_CHDK_ScriptSupport, // Which scripting interfaces are supported in this build
61  // param1 CHDK_PTP_SUPPORT_LUA is set if lua is supported, cleared if not
62  // all other bits and params are reserved for future use
63  PTP_CHDK_ReadScriptMsg, // read next message from camera script system
64  // return param1 is chdk_ptp_s_msg_type
65  // return param2 is message subtype:
66  // for script return and users this is ptp_chdk_script_data_type
67  // for error ptp_chdk_script_error_type
68  // return param3 is script id of script that generated the message
69  // return param4 is length of the message data.
70  // return data is message.
71  // A minimum of 1 bytes of zeros is returned if the message has no data (empty string or type NONE)
72  PTP_CHDK_WriteScriptMsg, // write a message for scripts running on camera
73  // input param2 is target script id, 0=don't care. Messages for a non-running script will be discarded
74  // data length is handled by ptp data phase
75  // input messages do not have type or subtype, they are always a string destined for the script (similar to USER/string)
76  // output param1 is ptp_chdk_script_msg_status
77  PTP_CHDK_GetDisplayData, // Return camera display data
78  // This is defined as separate sub protocol in live_view.h
79  // Changes to the sub-protocol will always be considered a minor change to the main protocol
80  // param2 bitmask of data
81  // output param1 = total size of data
82  // return data is protocol information, frame buffer descriptions and selected display data
83  // Currently a data phase is always returned. Future versions may define other behavior
84  // for values in currently unused parameters.
85  // Direct image capture over USB.
86  // Use lua get_usb_capture_support for available data types, lua init_usb_capture for setup
87  PTP_CHDK_RemoteCaptureIsReady, // Check if data is available
88  // return param1 is status
89  // 0 = not ready
90  // 0x10000000 = remote capture not initialized
91  // otherwise bitmask of PTP_CHDK_CAPTURE_* datatypes
92  // return param2 is image number
93  PTP_CHDK_RemoteCaptureGetData // retrieve data
94  // param2 is bit indicating data type to get
95  // return param1 is length
96  // return param2 more chunks available?
97  // 0 = no more chunks of selected format
98  // return param3 seek required to pos (-1 = no seek)
99 };
Aufzählungswerte
PTP_CHDK_TYPE_UNSUPPORTED 
PTP_CHDK_TYPE_NIL 
PTP_CHDK_TYPE_BOOLEAN 
PTP_CHDK_TYPE_INTEGER 
PTP_CHDK_TYPE_STRING 
PTP_CHDK_TYPE_TABLE 

Definiert in Zeile 102 der Datei ptp.h.

102  {
103  PTP_CHDK_TYPE_UNSUPPORTED = 0, // type name will be returned in data
107  PTP_CHDK_TYPE_STRING, // Empty strings are returned with length=0
108  PTP_CHDK_TYPE_TABLE, // tables are converted to a string by usb_msg_table_to_string,
109  // this function can be overridden in lua to change the format
110  // the string may be empty for an empty table
111 };
Aufzählungswerte
PTP_CHDK_S_ERRTYPE_NONE 
PTP_CHDK_S_ERRTYPE_COMPILE 
PTP_CHDK_S_ERRTYPE_RUN 
PTP_CHDK_S_ERR_SCRIPTRUNNING 

Definiert in Zeile 193 der Datei ptp.h.

193  {
197  // the following are for ExecuteScript status only, not message types
198  PTP_CHDK_S_ERR_SCRIPTRUNNING = 0x1000, // script already running with NOKILL
199 };
Aufzählungswerte
PTP_CHDK_S_MSGSTATUS_OK 
PTP_CHDK_S_MSGSTATUS_NOTRUN 
PTP_CHDK_S_MSGSTATUS_QFULL 
PTP_CHDK_S_MSGSTATUS_BADID 

Definiert in Zeile 202 der Datei ptp.h.

202  {
203  PTP_CHDK_S_MSGSTATUS_OK = 0, // queued ok
204  PTP_CHDK_S_MSGSTATUS_NOTRUN, // no script is running
205  PTP_CHDK_S_MSGSTATUS_QFULL, // queue is full
206  PTP_CHDK_S_MSGSTATUS_BADID, // specified ID is not running
207 };
Aufzählungswerte
PTP_CHDK_S_MSGTYPE_NONE 
PTP_CHDK_S_MSGTYPE_ERR 
PTP_CHDK_S_MSGTYPE_RET 
PTP_CHDK_S_MSGTYPE_USER 

Definiert in Zeile 184 der Datei ptp.h.

184  {
185  PTP_CHDK_S_MSGTYPE_NONE = 0, // no messages waiting
186  PTP_CHDK_S_MSGTYPE_ERR, // error message
187  PTP_CHDK_S_MSGTYPE_RET, // script return value
188  PTP_CHDK_S_MSGTYPE_USER, // message queued by script
189 // TODO chdk console data ?
190 };