An Event marks a change in device state or an error condition. More...
#include <Event.h>
Public Types | |
enum | { Error = 0, Warning, FocusPressed, FocusReleased, ShutterPressed, ShutterReleased, N900LensClosed = 10000, N900LensOpened, N900SlideOpened, N900SlideClosed, F2LensRemoved = 20000, F2LensInstalled, F2ZoomChanged, F2FocusChanged } |
The list of builtin event types. More... | |
enum | { Unknown = 0, InternalError, DriverError, ImageTargetLocked, ResolutionMismatch, OutOfMemory, FrameLimitHit, LensHistoryError, FlashHistoryError, DemosaicError, ImageLockError, BadCast, FileLoadError, FileLoadWarning, FileSaveError, FileSaveWarning, SensorStoppedError, ParseError, FrameDataError, OutOfRange } |
The list of builtin error and warning codes. More... | |
Public Attributes | |
EventGenerator * | creator |
creator of this Event | |
int | type |
type of this Event | |
int | data |
data associated with this Event | |
Time | time |
Time this Event occured. | |
std::string | description |
A human-readable description of the event. |
An Event marks a change in device state or an error condition.
Retrieve events from the system using getNextEvent.
Definition at line 23 of file Event.h.
anonymous enum |
The list of builtin event types.
Builtin FCam events use positive integers. They are guaranteed not to have collisions and should all be listed here. Custom events should use negative integers, and may collide with other custom events (so you should check the creator and the type).
Error |
An error occurred. |
Warning |
A warning occurred. |
FocusPressed |
The focus button was pressed (typically the shutter button was half-depressed). |
FocusReleased |
The focus button was released. |
ShutterPressed |
The shutter button was pressed. |
ShutterReleased |
The shutter button was released. |
N900LensClosed |
The lens cover on the N900 was closed. |
N900LensOpened |
The lens cover on the N900 was opened. |
N900SlideOpened |
The keyboard on the N900 was slid open. |
N900SlideClosed |
The keyboard on the N900 was slid closed. |
F2LensRemoved |
The lens on the F2 was removed. |
F2LensInstalled |
A new lens was inserted in the F2. |
F2ZoomChanged |
The lens on the F2 was manually zoomed. |
F2FocusChanged |
The lens on the F2 was manually focused. |
anonymous enum |
The list of builtin error and warning codes.
Builtin FCam warning and error codes use positive integers. Custom events should use negative integers.
Unknown |
Should not be used. Indicates the error event is uninitialized. |
InternalError |
Indicates a probable bug inside FCam. Inform the developers. |
DriverError |
Something unexpected happened while communicating with the FCam drivers. |
ImageTargetLocked |
FCam was requested to place image data in an image that was locked. |
ResolutionMismatch |
FCam was requested to place image data in a target of the wrong size. |
OutOfMemory |
A memory allocation failed inside FCam. |
FrameLimitHit |
Too many frames are waiting on the frame queue. Call getFrame more frequently. |
LensHistoryError |
The state of the lens was requested for a time too far in the past or the future. |
FlashHistoryError |
The state of the flash was requested for a time too far in the past or the future. |
DemosaicError |
Could not demosaic this image. |
ImageLockError |
Incorrect usage of Image::lock or Image::unlock. |
BadCast |
A TagValue was cast to a mismatched type. |
FileLoadError |
A file could not be read in succesfully. |
FileLoadWarning |
A file isn't quite as expected. |
FileSaveError |
A file couldn't be written. |
FileSaveWarning |
A file couldn't be saved quite as expected. |
SensorStoppedError |
getFrame called before calling capture or stream |
ParseError |
Could not read a TagValue from a string. |
FrameDataError |
Expected frame data (tags, image data) was not available. |
OutOfRange |
An argument was outside the valid or accurate range of inputs. |