Main Page   Class Hierarchy   Compound List   File List   Header Files   Compound Members   File Members  

vrpn_nikon_controls.C File Reference


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 Documentation

#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 ()


Function Documentation

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.


Variable Documentation

const char* VALID_REPORT_CHARS

Characters that can start a report of the type we recognize.


Generated at Fri Sep 13 15:03:44 2002 for vrpn by doxygen 1.0.0 written by Dimitri van Heesch, © 1997-1999