The PSION Organiser II Homepage
Forum Home Forum Home Help Help Search Search Members Members Login Login Register Register

Welcome, Guest. Please Login or Register.
Why register?
   The Psion Organiser II Forum
   User Forum
   Help
(Moderator: Mikesan)
   Source Code Request
« No topic | Next topic »
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print
   Author  Topic: Source Code Request  (Read 231 times)
Mikesan
Administrator




   
WWW

Posts: 252
Source Code Request
« on: Aug 21st, 2018, 2:47pm »
Quote Quote Modify Modify

I'm looking for "SCANM.OPL" for the Workabout MX.  I've got Scanm.opo - that comes with resources that you can find pretty easily, but the source code is a different matter.
 
What does it do?  It provides support for the internal 1223 Laser scanner on a Workabout MX that has one.
 
Actually, any drivers, or software for the Workabout would be welcome.
 
Anyone?
POISN
Power Member




   


Posts: 51
Re: Source Code Request
« Reply #1 on: Oct 8th, 2019, 3:02am »
Quote Quote Modify Modify

I just saw this. I haven't been here in a long time. I couldn't attach the file.
 

#define E_FILE_PENDING -46
 
#define C_SCANDYL 0
/* Method numbers in this category */
#define O_DESTROY 0
#define O_SC_ATTEND 13
#define O_SC_CANCELSCANNERREAD 11
#define O_SC_CHANGEPORT 19
#define O_SC_CLOSESCANNER 9
#define O_SC_DECODE 16
#define O_SC_GETLIBVERSION 2
#define O_SC_GETPARAMS 14
#define O_SC_GETSCANNERPARAMS 15
#define O_SC_GETSCANNERTYPE 3
#define O_SC_INITIALISESCANNER 5
#define O_SC_INITLIB 1
#define O_SC_OPENSCANNER 8
#define O_SC_QUEUESCANNERREAD 10
#define O_SC_RESETPARAMS 6
#define O_SC_SCANA 17
#define O_SC_SCANBEEP 18
#define O_SC_SENDSCANNER 12
#define O_SC_SETSCANNERTYPE 4
#define O_SC_UPDATEPARAMS 7
 
/* Class constants */
#define WA_LASER_SCANNER 1
#define WA_CCD_SCANNER 2
#define WA_BARCODE_WAND 3
#define WA_1223_SCANNER 4
#define GOODBEEP 0
#define BADBEEP 1
#define TIMEOUTBEEP 2
 
#define STORECAP 227
#define PARAMSEND 198
 
 
PROC ScLoad%:
  LOCAL link%,rval%,ScanH%
  link% = 1
  rval% = LOADLIB(ScanH%, "\scanner", link%)
  IF rval% :RETURN rval% :ENDIF
  ScanObj% = NEWOBJH(ScanH%, C_SCANDYL)
  IF ScanObj%=0 :RETURN -1 :ENDIF
  SEND(ScanObj%, O_SC_INITLIB)
  rval% = SEND(ScanObj%, O_SC_GETLIBVERSION)
  SEND(ScanObj%, O_SC_GETSCANNERTYPE)
  RETURN rval%
ENDP
 
 
 
PROC ScInit%:
  LOCAL rval%, pptr%, i%
  rval% = SEND(ScanObj%, O_SC_INITIALISESCANNER)
  PAUSE 4
  IF rval% :RETURN rval% :ENDIF
  pptr% = SEND(ScanObj%, O_SC_GETPARAMS)
  i% = 1
  DO
  Params%(i%) = PEEKB (pptr%)
  i% = i% + 1
  pptr% = pptr% + 1
  UNTIL i% > 11
  RETURN 0
ENDP
 
 
PROC ScScanA%:(pstat%)
  LOCAL rval%,cptr%
  cptr% = UADD(ADDR(ScanBuf$),1)
  rval% = SEND(ScanObj%, O_SC_SCANA, #cptr%, ScanLen%, #pstat%)
  RETURN rval%
ENDP
 
 
 
 
 
PROC ScScanF%:
  LOCAL rval%, cptr%
  cptr% = UADD(ADDR(ScanBuf$),1)
  rval% = SEND(ScanObj%, O_SC_DECODE, #cptr%, ScanLen%)
  IF rval%
  ScanLen% = 0
  ENDIF
  POKEB ADDR(ScanBuf$),ScanLen%
  RETURN rval%
ENDP
 
 
PROC ScSaveP%:
  LOCAL rval%,pptr%,i%
  pptr% = SEND(ScanObj%, O_SC_GETPARAMS)
  i% = 1
  DO
  POKEB pptr%, Params%(i%)
  i% = i% + 1
  pptr% = pptr% + 1
  UNTIL i% > 11
  rval% = SEND(ScanObj%, O_SC_UPDATEPARAMS)
  RETURN rval%
ENDP
 
 
 
PROC ScCancel:
  SEND(ScanObj%, O_SC_CANCELSCANNERREAD)
  SEND(ScanObj%, O_SC_CLOSESCANNER)
ENDP
 
PROC ScScanS%:
  LOCAL rval%,cptr%,stat%
  cptr% = UADD(ADDR(ScanBuf$),1)
  stat% = 1
  rval% = SEND(ScanObj%, O_SC_SCANA, #cptr%, ScanLen%, stat%)
  IF rval%
  ScanBuf$ = ""
  ScanLen% = 0
  RETURN rval%
  ENDIF
  IOWAITSTAT stat%
  IF stat%
  ScanLen% = 0
  ENDIF
  POKEB ADDR(ScanBuf$),ScanLen%
  RETURN stat%
ENDP
 
PROC ScBeep:(Code%)
  SEND(ScanObj%, O_SC_SCANBEEP, #Code%)
ENDP
 
PROC ScUnLd%:
  LOCAL rval%
  rval% = 0
  IF ScanObj%
  SEND(ScanObj%, O_DESTROY)
  ENDIF
  IF ScanH%
  rval% = UNLOADLIB(ScanH%)
  ENDIF
  ScanObj% = 0
  ScanH% = 0
  RETURN rval%
ENDP
 
PROC ScConf%:(comd$)
  LOCAL t%, rval%, op%, l%, ptr$(100)
  ptr$ = comd$
  t% = SEND(ScanObj%, O_SC_GETSCANNERTYPE)
  IF t% = WA_LASER_SCANNER
  op% = STORECAP
  ELSE
  op% = PARAMSEND
  ENDIF
  rval% = SEND(ScanObj%, O_SC_ATTEND)
  IF rval% = 0
  l% = LEN(ptr$)
  rval% = SEND(ScanObj%, O_SC_SENDSCANNER, #op%, ptr$, #l%)
  IF (t% <> WA_BARCODE_WAND) AND (t% <> WA_CCD_SCANNER)
  SEND(ScanObj%, O_SC_CLOSESCANNER)
  ENDIF
  ENDIF
  RETURN rval%
ENDP
 
« Last Edit: Oct 10th, 2019, 6:25am by POISN »
theBot
Administrator




   
WWW

Posts: 47
Re: Source Code Request
« Reply #2 on: Nov 20th, 2019, 2:25pm »
Quote Quote Modify Modify

Thanks!
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print

« No topic | Next topic »

The Psion Organiser II Forum » Powered by YaBB 1 Gold - SP 1.1!
YaBB 2000-2002,
Xnull. All Rights Reserved.
top