[[ header START ]]

Welcome to OS2.GURU site! (eComStation.RU)

Select your language: Russian English Deutch Spanish Italian Portuguese Czech Polish French

Frequently asked questions and answers:
telegram

Форум обсуждение

telegram

Send message

telegram

[ +7-981-8529467 (Санкт-Петербург)

telegram

t.me/os2_guru

OS/2 GURU


ru · en · de · es · it · pt · cz · pl · fr
OS/2 is a greatly different operating system for PC (ArcaOS, eComStation, IBM OS/2 Warp)
Applications, news, reviews, support of users, hardware, questions and answers.
 
[What is OS/2?  News  Install  Update  
 
 
Usage  Future  Community  Projects  

How to buy
russian OS/2 apps?

The concept of
OS/2 development

 
Update

 
Applications

 
Advantages:

 
For developer:

 
(Пайпы программ)

 
Companies:

 
History:

 
(Бонусы)

 
Advice:

 
(Барьеры и решения)

 
Technologies:

 
(Применение в науке, лаборатории, ..)

 

 
Solutions

 
New eComStation:

 
Future:

 
(Ссылки на другие сайты)

 
(Картинка дня)

 
OS/2 artefacts:

 
Gadgets:

Overview Supported hardware Contacts Downloads
  Unsupported Forum Purchase
Publications Links Hall of Fame Success stories
 
Installation   |   Default method   |   Configuration   |   Kiddy method   |   NetDrive plugin   |   REXX library

ThirdEye REXX interface API
 

ThirdEye is not just a useful application for picture downloading, but a technology. PM skinable application, VIO version and the NetDrive plugin demonstrate how powerful OS/2 platform is and give user a choice. One side of this OS/2 power is Rexx - scripting command language with unlimited abilities. To fill in the gap and make the set of available applications complete, we offer ThirdEye REXX interface. In this document you can find quite comprehensive descriptions for each of designed routines.

 
Initialization

First of all. ThirdEye REXX interface is a single dynamic-link library (DLL) - file 3deyeRexx.dll. Here and below I admit that you have basic knowledge about external routines calling in REXX. There are several different ways to load and initialise functions from 3deyeRexx.dll.

  • You can copy it into the directory which name contents in the LIBPATH variable in your CONFIG.SYS. And then call :
CALL RxFuncAdd 'camxInit', '3eyeRexx', 'camxInit'
CALL camxInit ( 'D:\TOOLS\3rdEye\ThirdEye.Key' )
  • Or you put this DLL-file anywhere you want and add the name of the directory it resides to LIBPATH variable. And then perform described above code.
  • Or you can do that following way :
'@SET BEGINLIBPATH=C:\NDFS\ndplugs'
CALL RxFuncAdd 'camxInit', '3eyeRexx', 'camxInit'
CALL camxInit ( 'D:\TOOLS\3rdEye\ThirdEye.Key' )

After one of those steps REXX interface ready to use.

Note. The routine camxInit has one parameter - the full name (with a path) to your ThirdEye registration file. If you indicate wrong filename, none of the other library functions will work.

All functions return status code (error code), except cases when they return information. You have to analyse it to be aware that everything is OK. All possible error codes listed below.

  • RET_OK = 0
  • RET_NOT_ENOUGH_MEM = -1
  • RET_INSUFF_PARAMS = -2
  • RET_NOT_CONNECTED = -3
  • RET_NOT_LOADED = -4
  • RET_CANT_GET_PICTURE = -5
  • RET_CANT_DEL_PICTURE = -6
  • RET_CANT_GET_NUMBER = -7
  • RET_CANT_GET_CAMNAME = -8
  • RET_CANT_TAKE_PIC = -9
  • RET_CANT_SET_DATE = -10

Note : in case of severe and non-recoverable error REXX terminates with a one of standard code, consult REXX manual for additional information.

 
Connect/disconnect your camera

There are four functions in this group :

camxInit(FullKeyFilename)

Description: Initialises working environment for other interface REXX procedures. It registers them, creates all necessary buffers etc.

Parameters:
One mandatory parameter: FullKeyFilename - full filename for you ThirdEye registration.

Return values: RET_OK, RET_NOT_ENOUGH_MEM

Example: CALL camxInit ( 'D:\TOOLS\3rdEye\ThirdEye.Key' )

camxQuit

Description: De-registers all other functions, frees all allocated memory, perhaps finishes a connection if there is any exists.

Parameters: None.

Return values: RET_OK

Example: CALL camxQuit

camxConnect(PortName,ComBaud,CameraNickName)

Description: Establishes a new connection with your camera on the selected port, with a selected baud rate. It closes previously created connection if it was any.

Parameters: All parameters are mandatory.

PortName text string like "COM1", "COM2", etc.

ComBaud number up to 115200 (from standard set of COM port bauds)

CameraNickName is a text string - nickname for your camera from the list. In instance "KODAK210". Current list of supported cameras and their nicknames is here :

Camera Nickname Supported cameras
OLYMPUS Agfa ePhoto 307, 1680; Epson PhotoPC 850Z, 3000Z, Nikon CoolPix 900, 950, 990; Olympus D-220L, D-360L, D-460Z, C-21, C-860L, C-920 Zoom, C-990 Zoom, C-1400L, C-2000Z, C-2100UZ, C-3030 Zoom. Perhaps many others.
KONICA100 Konica Q-M100, Q-M100 V, Q-EZ
KONICA200 Konica Q-M200, HP PhotoSmart C20, C30
HP200 HP PhotoSmart C200
KODAK280 Kodak DC240, DC280, DC3400 and perhaps DC5000.
KODAK210 Kodak DC210, DC215. DC120 possibly (not tested).
DIGITA Kodak DC220, Kodak DC220+, DC260, DC265, DC290. Possibly all Digita project compatible cameras.
CASIOWRIST Casio WQV-1. Possibly WQV-2.
KODAK3200 Kodak DC3200
CANON Powershot A50, S10, S20, S100/ Digital IXUS, IXY Digital, G1.

Powershot A5/A10 possibly (not tested)

FUJI Fuji DS-7, DX-5, DX-7, DX-10, MX-500, MX-600, MX-700, MX-2700, Apple QuickTake 200, Samsung Kenox SSC-350N and possibly others.
CASIOQV10 Casio QV-10 (10A), QV-11, QV-30, QV-70, QV-100, QV-200, QV-300, QV-700, QV-770, QV-5000SX.
KODAK25 Kodak DC20, DC25
RICOH-RDC Ricoh RDC-4300, RDC-4200, RDC-5000, DC-3, DC-4, RDC-7. Philips ESP80SXG, ESP80, ESP70, ESP60, ESP50, ESP2.

Return values: RET_OK, RET_INSUFF_PARAMS, RET_NOT_LOADED, RET_NOT_CONNECTED

Example: CALL camxConnect('COM1',115200,'HP200')

camxDisconnect()

Description: The function closes the existing connection to a camera (if any).

Parameters: None

Return values: RET_OK

Example: CALL camxDisconnect

 
Camera control routines

camxGetCameraName()

Description: returns the name for camera obtained from it. Name is a text string.

Parameters: None.

Return values: text string - camera name, or RET_NOT_CONNECTED, RET_CANT_GET_CAMNAME.

Example: SAY 'Camera full name = ' camxGetCameraName()

camxFramesTaken()

Description: returns the number of pictures taken. Note. It is not possible to get the number of taken pictures for all camera models, so this routine will return it approximately.

Parameters: None.

Return values: number of taken photos, if this number is negative, it is one of error codes : RET_NOT_CONNECTED, RET_CANT_GET_NUMBER.

Example: SAY 'Frames taken = ' camxFramesTaken()

camxFramesLeft()

Description: returns the number of pictures left. Note. It is not possible to get the number of pictures left for all camera models, so this routine will return it approximately.

Parameters: None.

Return values: number of photos left, if this number is negative, it is one of error codes : RET_NOT_CONNECTED, RET_CANT_GET_NUMBER.

Example: SAY 'Frames left = ' camxFramesLeft()

camxGetBatteryState()

Description: returns the battery state for the camera connected in percents (%). It is not possible to get the battery state all camera models, so this routine always returns 100.

Parameters: None.

Return values: number - value of battery state, if this value is negative, it is one of error codes : RET_NOT_CONNECTED, RET_CANT_GET_NUMBER.

Example: SAY 'Camera's battery = ' camxGetBatteryState()

camxGetPictureName(PicNumber)

Description: returns name of selected picture. Note. Not for all camera models it's possible to obtain a picture name, so this routine will return string '(None)' for such models.

Parameters: One mandatory parameter - the picture number to get a name.

Return values: text string - picture name (or '(None)' see note above). In case of error it returns : RET_NOT_CONNECTED, RET_INSUFF_PARAMS.

Example: picname = camxGetPictureName(10)

camxGetPictureSize(PicNumber,Thumbnail)

Description: returns size of selected picture in bytes.

Parameters: routine has two mandatory parameters. First - the picture number to get a size. Second parameter indicates either we want to get size for whole picture of just for its thumbnail. If the second parameter is 0 - return size for a picture, 1 - for a thumbnail.

Return values: value - picture size in bytes, or in case of error, one of those error codes : RET_NOT_CONNECTED, RET_INSUFF_PARAMS, RET_CANT_GET_NUMBER.

Example: picsize = camxGetPictureSize(5,0)

camxGetPictureDate(PicNumber)

Description: returns creation date/time of selected picture. Note. Not for all camera models it is possible to get a picture creation date/time, thus this routine will return current date/time for such sort of camera.

Parameters: routine has one mandatory parameter - the picture number to get a date/time.

Return values: text string in the following format - YYYY/MM/DD/hh/mm/ss. In case of error, one of those error codes : RET_NOT_CONNECTED, RET_INSUFF_PARAMS.

Example: picdate = camxGetPictureDate(14)

camxDelPicture(PicNumber)

Description: deletes the selected picture.

Parameters: routine has one mandatory parameter - the picture number to delete.

Return values: RET_OK, RET_CANT_DEL_PICTURE, RET_INSUFF_PARAMS, RET_NOT_CONNECTED.

Example: CALL camxDelPicture(8)

camxGetPicture(PicNumber,FileName,Thumbnail)

Description: downloads one selected picture.

Parameters: routine has three mandatory parameters. First - the picture number to download. Second parameter - the name of file to write picture to (should be a valid OS/2 file name). If such file already exists, it will be overwritten. Third parameter indicates either we want to get a whole picture of just its thumbnail. If the second parameter is 0 - download a picture, 1 - download a thumbnail.

Return values: RET_OK, RET_NOT_CONNECTED, RET_INSUFF_PARAMS, RET_CANT_GET_PICTURE.

Example: CALL camxGetPicture(8,'dsc008.jpg',0)

camxTakePicture()

Description: makes a shot, takes a picture. Note. Not every camera has such command - 'take a picture', thus this routine does nothing for such type of camera.

Parameters: None.

Return values: RET_OK, RET_NOT_CONNECTED, RET_CANT_TAKE_PIC.

Example: CALL camxTakePicture()

 
Miscellaneous

camxGetVersion()

Description: Returns the version for the current ThirdEye Rexx engine.

Parameters: None

Return values: ThirdEye Rexx version as a text string.

Example: SAY "Rexx version: " camxGetVersion()

camxSetFileDate(FileName,DateTime)

Description: sets the modification date for the selected file.

Parameters: two of them, both are mandatory. First parameter - filename to change a modification date/time. Second is the particular date/time to set to if the following format : YYYY/MM/DD/hh/mm/ss.

Return values: RET_INSUFF_PARAMS, RET_CANT_SET_DATE, RET_OK.

Example: CALL camxSetFileDate('mypicture.jpg','2001/10/15/10/15')

 

Complete example of using those procedures you can find in the ThirdEye Rexx interface: file camxREXX.cmd If you have any suggestions or remarks, you are welcome.

(C) 2001 eCo Software, Russia ThirdEye team
Partial Copyright (C) 2001 Mike A. Potapoff






reliable operating system for PC (IBM OS/2 Warp) :: Estado :: Objetivos :: Mapa de la web :: Contactos :: Libro de visitas
Hits: this page/whole site   eComStation.Ru
Add this banner to your site
© 2001, 2002 eComStation.Ru team

eComStation is a registered trade mark of
Serenity Systems