📄 cdevent.pas
字号:
unit cdEvent;
interface
uses
cdType;
{****************************************************************************
****************************************************************************
* Canon Digital Camera SDK : Event IDs *
****************************************************************************
****************************************************************************}
{*---------------------------------------------------------------------------
Camera Event Identifiers : cdEventID
----------------------------------------------------------------------------*}
{*////////// Event Code Masks ////////////////////////////////////////////*}
const
cdEVENT_ISSPECIFIC_MASK =$08000000;
cdEVENT_RESERVED_MASK =$07F00000;
cdEVENT_SEVERITY_MASK =$000F0000;
cdEVENT_EVENTID_MASK =$0000FFFF;
{*////////// Event Severity levels ////////////////////////////////////////*}
cdEVENT_SEVERITY_NONE =$00000000;
{* nothing bad happened: this notification is just informational
*}
cdEVENT_SEVERITY_WARNING =$00020000;
{* The camera is going to shut down, or some warning event happened.
More detail information is given in the event code.
If client does not know the event code, it should close device
immediatly.
*}
cdEVENT_SEVERITY_SHUTDOWN =$00040000;
{* the camera has shut down. The Event ID tells the reason of the shut
down.
*}
{*////////// Event Identifiers //////////////////////////////////////////*}
cdEVENT_BATTERY_LEVEL_CHANGED =$0001;
{* event data tells current battery level
*}
BATTERY_LEVEL_MASK =($0000000F);
BATTERY_LEVEL_NORMAL =($00000006);
BATTERY_LEVEL_WEAK =($00000004);
BATTERY_LEVEL_SAFETY_LOW =($00000003);
BATTERY_LEVEL_LB =($00000002);
BATTERY_STATUS_NORMAL =($00000006);
BATTERY_STATUS_WEAK =($00000004);
BATTERY_STATUS_SAFETY_LOW =($00000003);
BATTERY_KIND_MASK =($F0000000);
BATTERY_KIND_UNKNOWN =($00000000);
BATTERY_KIND_AC =($10000000);
BATTERY_KIND_LI =($20000000);
BATTERY_KIND_NIH =($30000000);
BATTERY_KIND_NICD =($40000000);
BATTERY_KIND_ALMN =($50000000);
{* Combining this with cdEVENT_SEVERITY_NONE indicates the notification is
just for information, no action is required.
Combining this with cdEVENT_SEVERITY_WARNING indicates that user should
close device immediately.
Combining this with cdEVENT_SEVERITY_SHUTDOWN indicates that device has
shut down because of Low Battery
*}
cdEVENT_DIAL_CHANGE =$0002;
cdEVENT_CF_GATE_CHANGED =$0003;
{* event data tells whether gate opened *}
cdEVENT_PARAM_CF_GATE_OPEN =($00000000);
{* cdEVENT_PARAM_CF_GATE_CLOSE =($00000001)*}
cdEVENT_BATT_COVER_CHANGED =$0004;
{* event data tells whether cover opened *}
cdEVENT_PARAM_BATT_COVER_OPEN =($00000000);
{* cdEVENT_PARAM_BATT_COVER_CLOSE =($00000001)*}
cdEVENT_CONNECTION_TIME_OUT =$0005;
{* Combining this with cdEVENT_SEVERITY_SHUTDOWN tells that the camera has
already shut down because of the time out.
Combining this with cdEVENT_SEVERITY_WARNING tells that the camera is
going to shut down.
The event data tells how long (in minutes) camera would remain waking up.
*}
cdEVENT_CONNECTION_DISAPPEARED =$000D;
{* USB/IEEE1394 connection is disappeared
*}
cdEVENT_UPDATE_CAMERA_CONDITIONS =$000E;
{* Update Camera conditions event
*}
cdEVENT_CHANGE_LOCK_STATUS =$000F;
{* Used as parameter
*}
cdEVENT_PARAM_DISPLAY_PLAY_OR_NENU =$01000000;
cdEVENT_PARAM_PROCESSING_REC_OR_PREPARE_REC =$02000000;
{* used as lower 3Byte for parameter
*}
cdEVENT_PARAM_LOCK_TYPE1 =$00000001;
cdEVENT_PARAM_LOCK_TYPE2 =$00000002;
cdEVENT_PARAM_LOCK_TYPE3 =$00000004;
cdEVENT_PARAM_LOCK_TYPE4 =$00000008;
cdEVENT_PARAM_LOCK_TYPE5 =$00000010;
cdEVENT_PARAM_LOCK_TYPE6 =$00000020;
cdEVENT_UNRECOVERABLE_ERROR =$0006;
cdEVENT_UNKNOWN_COMMAND_RECEIVED =$0007;
cdEVENT_RELEASE_PARAM_CHANGED =$000B;
{*---------------------------------------------------------------------------
Release control Event Identifiers : cdReleaseEventID
----------------------------------------------------------------------------*}
cdRELEASE_EVENT_RESET_HW_ERROR =(10);
{* Notify hardware error.
The second parameter of this event specifies the kind of error as
follows.
*}
HW_ERROR_PARAM_CAPTURE_FAULT =($00000001); {* Capture faild *}
HW_ERROR_PARAM_LENSE_CLOSE =($00000002); {* Lens closed *}
HW_ERROR_PARAM_CAPTURE_MODE_DEPTH =($00000003); {* DEPTH mode *}
HW_ERROR_PARAM_SENSOR_CLEANING =($00000004); {* Cleaning *}
HW_ERROR_PARAM_SILENT_OPERATION =($00000005); {* PF21 *}
cdRELEASE_EVENT_CHANGED_BY_UI =(27);
{* Notify the capture parameter in the camera is changed by user
operation to camera UI.
The Host PC must get new capture parameter from the camera by
using RELEASE_CONTROL_GET_RELEASE_PARAMS command when this
notification received.
*}
cdRELEASE_EVENT_RELEASE_START =(28);
{* Notify the camera starts the capture operation with asynchronous mode.
*}
cdRESEASE_EVENT_RELEASE_COMPLETE =(29);
{* Notify the camera stop the capture operation with asynchronous mode.
The second parameter of this event specifies the number of released image data.
Data type is cdUInt32.
SDK client have to execute CDGetReleasedData() this number of the times.
*}
cdRELEASE_EVENT_CAM_RELEASE_ON =(30);
{* Notify the release SW is pushed on the camera by User.
Currently this notification is supported by new Powershot only.
When this notification is happened, the camera does not start
the captre.
To capture the image, the host PC must execute the sequence to
capture the image same as PC release operation nomaly.
(Do CDRelease() command.)
*}
cdRELEASE_EVENT_ROTATION_ANGLE_CHANGED =(31);
{* Notify the rotation angle detected by auto rotation sensor has changed.
The second parameter of this event shows the angle.
0: 0 or 180 degree
1: 90 degrees
3: 270 degrees
*}
cdRELEASE_EVENT_ABORT_PC_EVF =(32);
{* Notify the viewfinder function became the use cancel.
*}
cdRELEASE_EVENT_ENABLE_PC_EVF =(33);
{* Notify the view finder function became applicable.
*}
implementation
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -