GWSOFT.co.uk  

Site by Graham Wharton 
November 21st 2008 05:49:59 PM 



NOTE : This project is not currently in development and is totally unsupported. These pages are here for information only.

closeCamera

Declaration

extern "C" status_t closeCamera(void);

Description

This function must be implemented in the plugin. This function does not accept any parameters, but returns a status_t error code to indicate the success of the operation. Any of the status_t error codes can be used, but it is suggested that you stick to using B_NO_ERROR for success and B_ERROR for failure.

The Function should attempt to gracefully bring down the connection between the host and the camera. It should leave the camera in it's default state, so that another connection can be made.

Example Implementation - Kodak DC210 Plugin

status_t closeCamera(void) { unsigned char* buffer = new unsigned char[1]; //Send out a string to the camera to return baud rate to default 9600 ComPort->Write("\x41\x00\x96\x00\x00\x00\x00\x1A",8); ComPort->Read(buffer,1); while (buffer[0] == 0xf0) ComPort->Read(buffer,1); //Check for busy byte if (buffer[0] == 0xe2) return(B_ERROR); //Baud rate change was successful else if (buffer[0] == 0xd1) ComPort->SetDataRate(B_9600_BPS); ComPort->Close(); //Shut down and return OK. return(B_NO_ERROR); }
BDCP Developers Home Page