![]() |
|
|||||||||||||||||||||||||||||||||||||||||||||
Here are the valid indexes:
#include "jcam_dll.h" #include <stdio.h> using namespace joescan; int main(int argc, char * argv[]) { JCONNECTION jc; if((jc = jsOpenConnection("192.168.1.205")) == NULL) { printf("Couldn't open connection.\n"); goto CLEANUP; } switch(jsGetScannerStatusFromScanner(jc)) { case INVALID_PARAMETER: printf("Invalid Parameter.\n"); goto CLEANUP; case SCANNER_FAILURE: printf("Scanner Failure in jsGetScannerStatusFromScanner ().\n"); goto CLEANUP; default: printf("Got status from scanner.\n"); break; } size_t i = 0; int value; char statusDescription[128]; bool finished = false; while(finished == false) { switch(jsGetStatusDescriptionFromScanner(jc, i, statusDescription, 128)) { case INVALID_PARAMETER: printf("Invalid Parameter.\n"); break; case SCANNER_FAILURE: printf("Scanner Failure in jsGetStatusDescriptionFromScanner().\n"); goto CLEANUP; default: break; } switch(jsGetScannerStatusValue (jc, i, &value)) { case INVALID_PARAMETER: printf("%2d Invalid parameter -- Out of bounds index.\n", i); finished = true; break; default: printf("%2d %s %d\n", i, statusDescription, value); break; } ++i; } CLEANUP: jsCloseConnection(jc); jc = NULL; return 0; }
Functions | |
| JCAM_DLL_API int STDCALL | jsGetScannerStatusFromScanner (JCONNECTION const jc) |
Reads status from the scanner into a data structure inside the opaque JCONNECTION. | |
| JCAM_DLL_API int STDCALL | jsGetScannerStatusValue (JCONNECTION const jc, size_t i, int *value) |
Gets the specified status value from the data structure inside the JCONNECTION. | |
| JCAM_DLL_API int STDCALL | jsGetStatusDescriptionFromScanner (JCONNECTION const jc, UINT32 i, char *const description, UINT32 description_length) |
| Reads a descriptive text string from the scanner for the particular status index. | |
|
|
Reads status from the scanner into a data structure inside the opaque
|
|
||||||||||||||||
|
Gets the specified status value from the data structure inside the
|
|
||||||||||||||||||||
|
Reads a descriptive text string from the scanner for the particular status index.
The description length should be a minimum of 128 characters. After this call, Invalid indexes will return the string "ERROR unsuported status type".
|