EOSCamera Class Reference
| Inherits from | EOSPropertyObject : EOSObject : NSObject |
| Declared in | EOSCamera.h EOSCamera.m |
Overview
EOSCamera is a class used to represent a camera. It is a subclass of EOSPropertyObject. Instances of this class will typically be created by the [EOSManager getCameras] method.
Tasks
Properties
-
portproperty -
descriptionproperty
Initialization
Managing Sessions
-
isOpenproperty -
– openSession: -
– closeSession:
Managing Volumes
Getting Supported Values
Sending Commands
Managing the State
-
stateproperty -
– setState:error:
Managing the Delegate
Properties
description
A description of the camera.
@property (readonly) NSString *descriptionDiscussion
This is typically the camera’s model name.
Declared In
EOSCamera.hisOpen
Indicates whether the camera has an open session.
@property (readonly) BOOL isOpenDeclared In
EOSCamera.hport
The camera’s port name.
@property (readonly) NSString *portDiscussion
This property is provided by the EDSDK and does not seem to represent a physical port. It appears to be the position of the camera in the camera list. Therefore, this value can change if cameras are disconnected, and should not be used as an indentifier.
Declared In
EOSCamera.hstate
The camera’s current state, as defined in EOSCameraState.
@property (readonly) EOSCameraState stateDiscussion
The camera’s current state, as defined in EOSCameraState.
Declared In
EOSCamera.hInstance Methods
closeSession:
Closes the camera session.
- (BOOL)closeSession:(NSError *__autoreleasing *)errorParameters
- error
If unsuccessful, an instance of NSError describes the problem.
Return Value
YES if successful, otherwise NO.
Declared In
EOSCamera.hdelegate
Returns the camera’s delegate.
- (id<EOSCameraDelegate>)delegateReturn Value
The camera’s delegate, or nil if it doesn’t have a delegate.
See Also
Declared In
EOSCamera.hinitWithCameraRef:
Initializes a newly allocated EOSCamera instance with a reference to an EDSDK camera.
- (id)initWithCameraRef:(EdsCameraRef)cameraRefParameters
- cameraRef
An EDSDK camera reference.
Return Value
The intialized EOSCamera object.
Declared In
EOSCamera.hopenSession:
Opens a session with the camera.
- (BOOL)openSession:(NSError *__autoreleasing *)errorParameters
- error
If unsuccessful, an instance of NSError describes the problem.
Return Value
YES if successful, otherwise NO.
Discussion
This must be performed before accessing properties or sending commands.
Declared In
EOSCamera.hsendCommand:error:
Sends a command to the camera.
- (BOOL)sendCommand:(EOSCameraCommand)command error:(NSError *__autoreleasing *)errorParameters
- command
The command.
- error
If unsuccessful, an instance of NSError describes the problem.
Return Value
YES if successful, otherwise NO.
Discussion
Sends a command to the camera.
Declared In
EOSCamera.hsendCommand:withParameter:error:
Sends a command with a parameter to the camera.
- (BOOL)sendCommand:(EOSCameraCommand)command withParameter:(NSInteger)parameter error:(NSError *__autoreleasing *)errorParameters
- command
The command.
- parameter
A parameter to send with the command.
- error
If unsuccessful, an instance of NSError describes the problem.
Return Value
YES if successful, otherwise NO.
Discussion
Sends a command with a parameter to the camera.
Declared In
EOSCamera.hsetState:error:
Sets the state of the camera.
- (BOOL)setState:(EOSCameraState)state error:(NSError *__autoreleasing *)errorParameters
- state
The target state, as defined in EOSCameraState.
- error
If unsuccessful, an instance of NSError describes the problem.
Return Value
YES if successful, otherwise NO.
Declared In
EOSCamera.hsupportedValuesForProperty:error:
Gets a list of values that the camera supports in it’s current mode, for a given property.
- (NSArray *)supportedValuesForProperty:(EOSProperty)property error:(NSError *__autoreleasing *)errorParameters
- property
The property to get supported values for.
- error
If unsuccessful, an instance of NSError describes the problem.
Return Value
If successful an array containing the supported values as NSNumbers, otherwise nil.
Discussion
Use this to find the supported values for a numeric type property, such as aperture, shutter speed, ISO etc. The list of supported values may change when the camera’s mode is changed.
Declared In
EOSCamera.hvolumeAtIndex:error:
Gets the volume at the specified index.
- (EOSVolume *)volumeAtIndex:(NSUInteger)index error:(NSError *__autoreleasing *)errorParameters
- index
The index of the volume to get.
- error
If unsuccessful, an instance of NSError describes the problem.
Return Value
If successful, an EOSVolume object representing the volume, otherwise nil.
Discussion
Use volumeCount:error: to find the valid index range.
Declared In
EOSCamera.hvolumeCount:
Gets the number of volumes that are mounted on the camera.
- (NSNumber *)volumeCount:(NSError *__autoreleasing *)errorParameters
- error
If unsuccessful, an instance of NSError describes the problem.
Return Value
If successful, the number of volumes, otherwise nil.
Declared In
EOSCamera.hvolumes
Gets all of the volumes that are mounted on the camera.
- (NSArray *)volumesReturn Value
An array containing instances of EOSVolume.
Discussion
If there is an error retrieving a volume, the function will continue without adding it to the array. If you need to check for errors when reteiving each volume, use volumeAtIndex:error: instead.
Declared In
EOSCamera.h