Defines | |||
![]() | ![]() | #define | STATUS_RESETTING |
![]() | ![]() | #define | STATUS_SYNCING |
![]() | ![]() | #define | STATUS_READING |
![]() | ![]() | #define | NIK_INFO (msg) |
![]() | ![]() | #define | NIK_WARNING (msg) |
![]() | ![]() | #define | NIK_ERROR (msg) |
![]() | ![]() | #define | TIMEOUT_TIME_INTERVAL |
![]() | ![]() | #define | POLL_INTERVAL |
Functions | |||
![]() | ![]() | unsigned long | duration (struct timeval t1, struct timeval t2) |
![]() | ![]() | const char* | error_code_to_string (const int code) |
![]() | ![]() | Looks up the response from the table in the appendix of the Nikon control manual. | |
![]() | ![]() | int | parse_focus_position_response (const char *inbuf, double &response_pos) |
![]() | ![]() | Parses the response position from the Nikon found in inbuf. If a report is found that sets the response, then 1 is returned from the function call. If no response is found, 0 is returned both from the function and in response_pos. If there is an error response found in the buffer, -1 is returned response_pos is set to the error code that was found. If a report is found that does not set the response but that indicates completion of a command, then 2 is returned and response_pos is not set. If a report is found that indicates it is in the process of doing a command, 3 is returned and response_pos is not set. | |
Variables | |||
![]() | ![]() | const char* | VALID_REPORT_CHARS |
![]() | ![]() | Characters that can start a report of the type we recognize. | |
| #define STATUS_RESETTING () |
| #define STATUS_SYNCING () |
| #define STATUS_READING () |
| #define NIK_INFO (msg) |
| #define NIK_WARNING (msg) |
| #define NIK_ERROR (msg) |
| #define TIMEOUT_TIME_INTERVAL () |
| #define POLL_INTERVAL () |
unsigned long duration (struct timeval t1, struct timeval t2) [static]
|
const char * error_code_to_string (const int code) [static]
|
Looks up the response from the table in the appendix of the Nikon control manual.
int parse_focus_position_response (const char * inbuf, double & response_pos) [static]
|
Parses the response position from the Nikon found in inbuf. If a report is found that sets the response, then 1 is returned from the function call. If no response is found, 0 is returned both from the function and in response_pos. If there is an error response found in the buffer, -1 is returned response_pos is set to the error code that was found. If a report is found that does not set the response but that indicates completion of a command, then 2 is returned and response_pos is not set. If a report is found that indicates it is in the process of doing a command, 3 is returned and response_pos is not set.
| const char* VALID_REPORT_CHARS |
Characters that can start a report of the type we recognize.
1.0.0 written by Dimitri van Heesch,
© 1997-1999