JCam DLL API Reference
jcam_dll.h
Go to the documentation of this file.
1 //Ensures that this file isn't included twice within a translation unit.
2 #ifndef JCAM_DLL
3 #define JCAM_DLL
4 
5 #include <stddef.h>
6 
7 #if defined WIN32
8 #include <atlsafe.h>
9 
10  #if (defined JCAM_DYNAMIC_LIB && ! defined JCAM_STATIC_LIB)
11  // The following ifdef block is the standard way of creating macros which make exporting
12  // from a DLL simpler. All files within this DLL are compiled with the JCAM_DLL_EXPORTS
13  // symbol defined on the command line. This symbol should not be defined on any project
14  // that uses this DLL. This way any other project whose source files include this file see
15  // JCAM_DLL_API functions as being imported from a DLL, whereas this DLL sees symbols
16  // defined with this macro as being exported.
17 
18  #if defined JCAM_DLL_EXPORTS
19  #define JCAM_DLL_API extern "C" __declspec(dllexport)
20  #else
21  #define JCAM_DLL_API __declspec(dllimport)
22  #endif
23 
24  #define STDCALL __stdcall // Declare our calling convention.
25  #elif (! defined JCAM_DYNAMIC_LIB && defined JCAM_STATIC_LIB)
26  #define JCAM_DLL_API
27  #define STDCALL __stdcall
28  #else
29  #error "You need to define either JCAM_DYNAMIC_LIB if you will distribute jcam_dll.dll with your software, or JCAM_STATIC_LIB if you're statically linking with jcam_dll.lib."
30  #endif
31 
32 #else //WIN32
33 
34  #define JCAM_DLL_API
35  #define STDCALL
36  #include <sys/socket.h>
37  #include <netinet/in.h>
38  #include <netinet/tcp.h>
39 #endif //WIN32
40 
41 #ifdef __cplusplus
42  //Tells the compiler to use C symbol naming conventions
43  extern "C" {
44 
45  //Put things in a separate namespace so that there's no chance of collisions
46  namespace joescan {
47 #endif //__cplusplus
48 
49 #ifndef SWIG
50 #define CHECK_ELEMENT_SIZE(element, size) \
51  extern char element ## size[static_cast<int>((sizeof(element) == (size)))]
52 
53 CHECK_ELEMENT_SIZE(char, 1);
54 CHECK_ELEMENT_SIZE(short, 2);
55 CHECK_ELEMENT_SIZE(int, 4);
56 //CHECK_ELEMENT_SIZE(size_t, 4);
57 #endif
58 
59 #ifndef INT8
60 typedef signed char INT8;
63 typedef signed short INT16;
65 typedef signed int INT32;
67 typedef unsigned char UINT8;
69 typedef unsigned short UINT16;
71 typedef unsigned int UINT32;
72 #endif
73 
78 {
89 
91  SYNC_MODE_OVERRUN = 0x00000001,
92 
96  MAX_VERTICAL = 243,
97 
112 };
113 
119 typedef enum jsLaserIndexTag
120 {
122  LASER0 = 0,
124  LASER1 = 1,
126  LASER2 = 2,
128  LASER3 = 3,
130  LASER4 = 4,
131 } jsLaserIndex;
132 
139 typedef void* JCONNECTION;
140 
141 #pragma pack(1) //Tells compiler to use one-byte boundaries for packing structs.
142 
144 typedef struct tagProfileDataPoint
145 {
147  INT32 x;
149  INT32 y;
157  INT32 brightness;
159 
163 typedef struct tagScanDataPoint
164 {
170  INT32 data;
179  INT32 status;
188  INT32 brightness;
189 } ScanDataPoint;
190 
194 typedef struct tagProfile
195 {
204  INT32 location;
208  INT32 laserOnTime;
213  INT32 timeInHead;
223  INT32 inputs;
234  INT32 flags;
236  INT32 laserIndex;
238  INT32 reserved2;
248 } jsProfile;
249 
253 typedef struct tagImage
254 {
258  INT32 reserved1;
260  INT32 reserved2;
270  UINT8 image[MAX_HORIZONTAL * MAX_VERTICAL];
271 } jsImage;
272 
276 typedef struct tagScan
277 {
279  INT32 location;
283  INT32 laserOnTime;
289  INT32 timeInHead;
295  INT32 inputs;
302  INT32 flags;
304  INT32 reserved1;
306  INT32 reserved2;
315 } jsScan;
316 
320 typedef struct tagResponsePacket
321 {
323  UINT8 macAddress[6];
333  UINT32 ipAddress;
335  UINT32 serialNumber;
337  UINT8 cableId;
339  UINT8 status;
341  UINT32 build;
347  INT8 options[OPTIONS_SIZE];
349 
354 {
356  double x;
358  double y;
360  double roll;
362  char date[DATE_LENGTH];
364 
365 #pragma pack() //Use compiler default packing after this.
366 
371 JCAM_DLL_API int STDCALL jsGetJcamDllMajorVersionNumber();
376 JCAM_DLL_API int STDCALL jsGetJcamDllMinorVersionNumber();
390 JCAM_DLL_API JCONNECTION STDCALL jsOpenConnection(char const * const host);
404 JCAM_DLL_API JCONNECTION STDCALL jsOpenConnectionInt(int const host);
419 JCAM_DLL_API JCONNECTION STDCALL jsOpenConnectionBase(char const * const host, UINT32 const cableID);
440 JCAM_DLL_API int STDCALL jsCloseConnection(JCONNECTION const jc);
461 JCAM_DLL_API int STDCALL jsSendProfileRequestN(JCONNECTION const jc, jsLaserIndex const laserIndex);
486 JCAM_DLL_API int STDCALL jsReadProfileN(JCONNECTION const jc, jsProfile * const profile);
502 JCAM_DLL_API int STDCALL jsGetProfileN(JCONNECTION const jc, jsLaserIndex const laserIndex, jsProfile * const profile);
521 JCAM_DLL_API int STDCALL jsGetProfileFromAllLasers(JCONNECTION const jc, jsProfile * const profiles, size_t const cProfiles);
533 JCAM_DLL_API int STDCALL jsGetImage(JCONNECTION const jc, jsImage * const image);
548 JCAM_DLL_API int STDCALL jsGetImageN(JCONNECTION const jc, jsLaserIndex const laserIndex, jsImage * const image);
563 JCAM_DLL_API int STDCALL jsGetScan(JCONNECTION const jc, jsScan * const scan);
578 JCAM_DLL_API int STDCALL jsGetScanN(JCONNECTION const jc, jsLaserIndex const laserIndex, jsScan * const scan);
591 JCAM_DLL_API int STDCALL jsGetImageScan(JCONNECTION const jc, jsImage * const image, jsScan * const scan);
607 JCAM_DLL_API int STDCALL jsGetImageScanN(JCONNECTION const jc, jsLaserIndex const laserIndex, jsImage * const image, jsScan * const scan);
624 JCAM_DLL_API int STDCALL jsGetDiagnosticScan(JCONNECTION const jc, int const cameraExposure, int const laserExposure, const jsLaserIndex laserIndex, jsScan * const scan);
642 JCAM_DLL_API int STDCALL jsGetDiagnosticImageScan(JCONNECTION const jc, int const cameraExposure, int const laserExposure, const jsLaserIndex laserIndex, jsImage * const image, jsScan * const scan);
661 JCAM_DLL_API int STDCALL jsEnterPulseSyncMode(JCONNECTION const jc);
676 JCAM_DLL_API int STDCALL jsEnterEncoderSyncMode(JCONNECTION const jc);
691 JCAM_DLL_API int STDCALL jsEnterTimeSyncMode(JCONNECTION const jc);
692 
709 JCAM_DLL_API int STDCALL jsStartPulseMaster(JCONNECTION const jc, int pulseInterval, int pulseCount);
724 JCAM_DLL_API int STDCALL jsStopPulses(JCONNECTION const jc);
740 JCAM_DLL_API int STDCALL jsSetAlternatingExposure(JCONNECTION const jc, bool const enable, int const exposure1, int const exposure2);
761 JCAM_DLL_API int STDCALL jsHaltSyncMode(JCONNECTION const jc);
783 JCAM_DLL_API int STDCALL jsExitSyncMode(JCONNECTION const jc);
809 JCAM_DLL_API int STDCALL jsSendMultipleProfileRequest(JCONNECTION const jc, UINT32 const nProfiles);
840 JCAM_DLL_API int STDCALL jsReadMultipleProfiles(JCONNECTION const jc, jsProfile * const profiles, UINT32 nProfiles);
861 JCAM_DLL_API int STDCALL jsReadMultipleProfilesTimeout(JCONNECTION const jc, jsProfile * const profiles, UINT32 cProfiles, long timeoutMilliseconds);
881 JCAM_DLL_API int STDCALL jsGetMultipleProfiles(JCONNECTION const jc, jsProfile * const profiles, UINT32 const cProfiles);
901 JCAM_DLL_API int STDCALL jsSendProfileRequest(JCONNECTION const jc);
927 JCAM_DLL_API int STDCALL jsReadProfile(JCONNECTION const jc, jsProfile * const profile);
943 JCAM_DLL_API int STDCALL jsGetProfile(JCONNECTION const jc, jsProfile * const profile);
965 JCAM_DLL_API size_t STDCALL jsGetNumberOfOutstandingRequests(JCONNECTION const jc);
984 JCAM_DLL_API int STDCALL jsCleanUpOutstandingRequests(JCONNECTION const jc);
998 JCAM_DLL_API int STDCALL jsSetEncoderValue(JCONNECTION const jc, UINT16 newEncoderValue);
1012 JCAM_DLL_API int STDCALL jsSetEncoderValue32(JCONNECTION const jc, UINT32 newEncoderValue);
1033 JCAM_DLL_API int STDCALL jsBeginSendParameterFileToScanner(JCONNECTION const jc, char const * const filename);
1057 JCAM_DLL_API int STDCALL jsEndSendParametersToScanner(JCONNECTION const jc);
1058 
1081 JCAM_DLL_API int STDCALL jsSendParameterFileToScanner(JCONNECTION const jc, char const * const filename);
1104 JCAM_DLL_API int STDCALL jsSendParametersToScanner(JCONNECTION const jc, char const * const parameters);
1125 JCAM_DLL_API int STDCALL jsBeginSendParametersToScanner(JCONNECTION const jc, char const * const parameters);
1141 JCAM_DLL_API int STDCALL jsGetParameterFileFromScanner(JCONNECTION const jc, char const * const filename);
1156 JCAM_DLL_API size_t STDCALL jsGetNumberOfErrorMessages(JCONNECTION const jc);
1173 JCAM_DLL_API char const * const STDCALL jsGetErrorMessage(JCONNECTION const jc, size_t i);
1191 JCAM_DLL_API int STDCALL jsReadOldPositionCalibrationsN(JCONNECTION const jc, jsLaserIndex const laserIndex, jsOldCalibrationValue oldCalibrations[], UINT32 nCalibrations);
1192 
1214 JCAM_DLL_API int STDCALL jsOverrideLaserAutoexposure(JCONNECTION const jc, double minLaserOn, double maxLaserOn, double defaultLaserOn,
1215  int staturatedIntensity, int saturatedPercentage, int laserThreshold, bool autoexposeLaser);
1231 JCAM_DLL_API int STDCALL jsOverrideScanWindow(JCONNECTION const jc, double windowTop, double windowBottom, double windowLeft, double windowRight);
1265 JCAM_DLL_API int STDCALL jsOverrideSyncSettings(JCONNECTION const jc, double timeScannedInterval, double encoderPulseInterval,
1266  double encoderScanInterval, int numberOfPhases, bool timeStaggeredScanning,
1267  double laser0Phase, double laser1Phase, double laser2Phase, double laser3Phase, double laser4Phase,
1268  bool untriggeredSyncScanning, bool startScanRisingEdgeTriggered);
1269 
1288 JCAM_DLL_API int STDCALL jsReadScanWindowN(JCONNECTION const jc, jsLaserIndex const laserIndex, int *top, int *bottom, int *left, int *right);
1308 JCAM_DLL_API int STDCALL jsReadPositionCalibrationN(JCONNECTION const jc, jsLaserIndex const laserIndex, double *xOffset, double *yOffset, double *roll);
1326 JCAM_DLL_API int STDCALL jsSendPositionCalibrationN(JCONNECTION const jc, jsLaserIndex const laserIndex, double const xOffset, double const yOffset, double const roll);
1340 JCAM_DLL_API int STDCALL jsGetScannerStatusFromScanner(JCONNECTION const jc);
1355 JCAM_DLL_API int STDCALL jsGetScannerStatusValue(JCONNECTION const jc, size_t i, int *value);
1379 JCAM_DLL_API int STDCALL jsGetStatusDescriptionFromScanner(JCONNECTION const jc, UINT32 i, char * const description, UINT32 description_length);
1396 JCAM_DLL_API int STDCALL jsGetImagePixel(jsImage const * const image, size_t const x, size_t const y);
1410 JCAM_DLL_API int STDCALL jsFindAllScanners(jsResponsePacket responses[], const size_t nResponses);
1411 
1412 #ifdef WIN32
1413 JCAM_DLL_API int STDCALL jsFindAllScannersVB(LPSAFEARRAY lpsaResponses);
1414 #endif
1415 
1431 JCAM_DLL_API int STDCALL jsFindScannerByCableId(int const cableId, jsResponsePacket responses[], const size_t nResponses);
1447 JCAM_DLL_API int STDCALL jsFindScannerBySerialNumber(int const serialNumber, jsResponsePacket responses[], const size_t nResponses);
1462 JCAM_DLL_API int STDCALL jsSetStaticIpInt(UINT32 const serialNumber, UINT32 const staticIpAddress, UINT32 const netmask);
1478 JCAM_DLL_API int STDCALL jsSetStaticIpChar(UINT32 const serialNumber, char const * const staticIpAddress, char const * const netmask);
1492 JCAM_DLL_API int STDCALL jsSetBaseIpInt(UINT32 const serialNumber, UINT32 const baseIpAddress, UINT32 const netmask);
1507 JCAM_DLL_API int STDCALL jsSetBaseIpChar(UINT32 const serialNumber, char const * const baseIpAddress, char const * const netmask);
1525 JCAM_DLL_API int STDCALL jsSetCableId(UINT32 const serialNumber, UINT32 const cableId);
1540 JCAM_DLL_API int STDCALL jsClearCableId(UINT32 const serialNumber);
1541 
1552 JCAM_DLL_API int STDCALL jsIsInSyncMode(JCONNECTION const jc);
1553 
1554 #ifdef __cplusplus
1555  } //namespace joescan {
1556 #endif //__cplusplus
1557 
1558 #if (defined JCAM_STATIC_LIB && defined WIN32)
1559 # include <windef.h>
1560 
1581  BOOL jsInitialize();
1582 
1583 
1595  void jsCleanup();
1596 #endif // (defined JCAM_STATIC_LIB && defined WIN32)
1597 
1598 #ifdef __cplusplus
1599  } //extern "C" {
1600 #endif //__cplusplus
1601 
1602 #endif //JCAM_DLL
double y
The Y offset of the scanner&#39;s position.
Definition: jcam_dll.h:358
A parameter to a function was NULL or out of range.
Definition: jcam_dll.h:84
int jsStartPulseMaster(JCONNECTION const jc, int pulseInterval, int pulseCount)
Causes the scanner to output a pulse train on the Start Scan I/O. The period and number of pulses are...
int jsCleanUpOutstandingRequests(JCONNECTION const jc)
Reads and discards all the profiles in the TCP/IP stack generated by jsSendProfileRequestN() or jsSen...
int jsSetStaticIpChar(UINT32 const serialNumber, char const *const staticIpAddress, char const *const netmask)
Sets a scanner&#39;s static IP address.
int jsGetProfileN(JCONNECTION const jc, jsLaserIndex const laserIndex, jsProfile *const profile)
Requests and reads a profile from the specified laser.
UINT8 currentIpSetup
The current addressing technique the scanner is using.
Definition: jcam_dll.h:331
double x
The X offset of the scanner&#39;s position.
Definition: jcam_dll.h:356
The maximum length of the date field in a jsOldCalibrationValue.
Definition: jcam_dll.h:111
int jsSendProfileRequest(JCONNECTION const jc)
Sends a request for a profile.
int jsEnterEncoderSyncMode(JCONNECTION const jc)
Causes the scanner to enter Encoder Synchronized Scanning Mode.
int jsEndSendParametersToScanner(JCONNECTION const jc)
Completes the sending of parameters. Should always and only be called after a call to jsBeginSendPara...
INT32 y
The y coordinate of the data point in 1000ths of an inch.
Definition: jcam_dll.h:149
INT32 numberHorizontal
The number of horizontal pixels.
Definition: jcam_dll.h:262
INT32 reserved2
Which laser this profile is from.
Definition: jcam_dll.h:238
char const *const jsGetErrorMessage(JCONNECTION const jc, size_t i)
Returns the specified error message.
JCONNECTION jsOpenConnectionInt(int const host)
Opens a connection to the specified host.
int jsSendMultipleProfileRequest(JCONNECTION const jc, UINT32 const nProfiles)
Sends a request for up to nProfiles profiles to the scanner while in Synchronized Scanning Mode...
size_t jsGetNumberOfOutstandingRequests(JCONNECTION const jc)
Returns the number of unread requests from either jsSendProfileRequestN() or jsSendMultipleProfileReq...
int jsGetProfileFromAllLasers(JCONNECTION const jc, jsProfile *const profiles, size_t const cProfiles)
Requests and reads a profile from each laser the scanner has.
int jsReadScanWindowN(JCONNECTION const jc, jsLaserIndex const laserIndex, int *top, int *bottom, int *left, int *right)
Reads the current scan window for the selected laser from the scanner.
BOOL jsInitialize()
Initializes TCP/IP communications.
int jsEnterPulseSyncMode(JCONNECTION const jc)
Causes the scanner to enter Start Scan Triggered Synchronized Scanning Mode.
jsConstants
Constants that avoid the traditional problems of #define constants.
Definition: jcam_dll.h:77
int jsReadProfile(JCONNECTION const jc, jsProfile *const profile)
Reads a profile from the connection.
int jsSendParametersToScanner(JCONNECTION const jc, char const *const parameters)
Sends parameters to the scanhead.
Represents a coordinate and its associated pixel brightness.
Definition: jcam_dll.h:144
int jsGetImageScanN(JCONNECTION const jc, jsLaserIndex const laserIndex, jsImage *const image, jsScan *const scan)
Requests and reads an image and scan with the specified laser on.
INT32 status
A simple representation of the intensity of the pixel.
Definition: jcam_dll.h:179
The scanner is fine.
Definition: jcam_dll.h:105
INT32 sendLocation
The encoder value when the scanner sent the profile.
Definition: jcam_dll.h:206
If this bit is set in a jsProfile&#39;s flags field, then Synchronized Scanning Mode is running the scann...
Definition: jcam_dll.h:91
int jsOverrideScanWindow(JCONNECTION const jc, double windowTop, double windowBottom, double windowLeft, double windowRight)
Override the Scan Window parameters set in param.dat. Values will be lost when a new param...
INT32 laserIndex
Currently unused.
Definition: jcam_dll.h:236
Responses from scanners on the network.
Definition: jcam_dll.h:320
Profile data from the scanner.
Definition: jcam_dll.h:194
INT32 laserOnTime
The number of 10 microsecond units the laser was on.
Definition: jcam_dll.h:208
int jsBeginSendParameterFileToScanner(JCONNECTION const jc, char const *const filename)
Starts sending a parameter file to the scanhead. Must be followed with a called to jsEndSendParameter...
int jsSetStaticIpInt(UINT32 const serialNumber, UINT32 const staticIpAddress, UINT32 const netmask)
Sets a scanner&#39;s static IP address.
struct tagResponsePacket jsResponsePacket
Responses from scanners on the network.
The scanner is scanning.
Definition: jcam_dll.h:107
INT32 inputs
The status of all cable inputs to the scanner.
Definition: jcam_dll.h:223
Closer to the camera than LASER3.
Definition: jcam_dll.h:130
UINT8 cableId
The cable ID of the responding scanner.
Definition: jcam_dll.h:337
void * JCONNECTION
An opaque handle for connections to scanners.
Definition: jcam_dll.h:139
Closer to the camera than LASER2.
Definition: jcam_dll.h:128
INT32 timeInHead
The time since the scanner was turned on.
Definition: jcam_dll.h:289
signed char INT8
Signed 8 bit integer.
Definition: jcam_dll.h:61
unsigned short UINT16
Unsigned 16 bit integer.
Definition: jcam_dll.h:69
INT32 x
The x coordinate of the data point in 1000ths of an inch.
Definition: jcam_dll.h:147
int jsReadMultipleProfilesTimeout(JCONNECTION const jc, jsProfile *const profiles, UINT32 cProfiles, long timeoutMilliseconds)
Requests and reads up to n profiles from the scanner while in either Synchronized Scanning Mode...
int jsSetBaseIpInt(UINT32 const serialNumber, UINT32 const baseIpAddress, UINT32 const netmask)
Sets a scanner&#39;s base IP address.
INT32 sequenceNumber
Sequence number from Synchronized Scanning Mode.
Definition: jcam_dll.h:202
INT32 sendLocation
The encoder value when the scan was sent.
Definition: jcam_dll.h:281
int jsFindScannerByCableId(int const cableId, jsResponsePacket responses[], const size_t nResponses)
Attempts to discover the scanner(s) on the network with the specified Cable ID.
INT32 reserved1
Currently unused.
Definition: jcam_dll.h:258
int jsGetDiagnosticScan(JCONNECTION const jc, int const cameraExposure, int const laserExposure, const jsLaserIndex laserIndex, jsScan *const scan)
Requests and reads a scan with the specified laser and camera timings. This function requires firmwar...
INT32 inputs
The cable input to the scanner.
Definition: jcam_dll.h:295
int jsGetProfile(JCONNECTION const jc, jsProfile *const profile)
Requests and reads a profile from the default laser.
int jsGetImageN(JCONNECTION const jc, jsLaserIndex const laserIndex, jsImage *const image)
Requests and reads an image with the specified laser on.
int jsHaltSyncMode(JCONNECTION const jc)
Causes the scanner to halt Time or Encoder Synchronized Scanning Mode.
int jsEnterTimeSyncMode(JCONNECTION const jc)
Causes the scanner to enter Time Synchronized Scanning Mode.
int jsClearCableId(UINT32 const serialNumber)
Reverts to the cable ID physically wired into a scanner.
int jsReadProfileN(JCONNECTION const jc, jsProfile *const profile)
Reads a profile from the connection.
struct tagProfileDataPoint ProfileDataPoint
Represents a coordinate and its associated pixel brightness.
struct tagOldCalibrationValue jsOldCalibrationValue
Old position calibration parameters sent to the scanner.
int jsIsInSyncMode(JCONNECTION const jc)
Returns if a scanner is in Synchronized Mode.
int jsReadPositionCalibrationN(JCONNECTION const jc, jsLaserIndex const laserIndex, double *xOffset, double *yOffset, double *roll)
Reads the current position calibration for the selected laser from the scanner.
INT32 numberPoints
The number of valid coordinate points in this profile.
Definition: jcam_dll.h:240
struct tagScan jsScan
Scan data from the scanner.
A scanner in Synchronized Scanning Mode has no available profiles.
Definition: jcam_dll.h:86
int jsSetEncoderValue(JCONNECTION const jc, UINT16 newEncoderValue)
Sets the scanner&#39;s internal encoder value.
int jsCloseConnection(JCONNECTION const jc)
Closes a JCONNECTION.
UINT32 serialNumber
The serial number of the responding scanner.
Definition: jcam_dll.h:335
INT32 numberPoints
The number of valid pixel points in this profile.
Definition: jcam_dll.h:308
INT32 timeInHead
The time since the scanner was turned on.
Definition: jcam_dll.h:213
int jsGetParameterFileFromScanner(JCONNECTION const jc, char const *const filename)
Reads the current parameter file from the scanhead and writes them to the specified file...
int jsGetJcamDllMajorVersionNumber()
Returns the major revision number of the DLL.
unsigned int UINT32
Unsigned 32 bit integer.
Definition: jcam_dll.h:71
INT32 exposureTime
How many 10 microsecond units the camera was exposed.
Definition: jcam_dll.h:256
The connection to the scanner is invalid.
Definition: jcam_dll.h:82
int jsStopPulses(JCONNECTION const jc)
Causes the scanner to stop generating a pulse train on the Start Scan I/O.
IP Address is determined by the cable ID.
Definition: jcam_dll.h:101
INT32 location
The encoder value when the scan was taken.
Definition: jcam_dll.h:279
INT32 data
Which subpixel the laser was centered at.
Definition: jcam_dll.h:170
size_t jsGetNumberOfErrorMessages(JCONNECTION const jc)
Returns the number of error messages after a jsSendParameterFileToScanner() call returned OPERATION_F...
INT32 brightness
The actual intensity of the pixel where the laser was detected.
Definition: jcam_dll.h:188
unsigned char UINT8
Unsigned 8 bit integer.
Definition: jcam_dll.h:67
int jsGetImageScan(JCONNECTION const jc, jsImage *const image, jsScan *const scan)
Requests and reads an image and scan.
struct tagImage jsImage
Image data from the scanner.
INT32 reserved2
Currently unused.
Definition: jcam_dll.h:260
int jsGetScannerStatusValue(JCONNECTION const jc, size_t i, int *value)
Gets the specified status value from the data structure inside the JCONNECTION.
int jsGetImagePixel(jsImage const *const image, size_t const x, size_t const y)
Returns a pixel value from an image.
Closer to the camera than LASER1.
Definition: jcam_dll.h:126
CCD sensor dimensions.
Definition: jcam_dll.h:96
int jsGetDiagnosticImageScan(JCONNECTION const jc, int const cameraExposure, int const laserExposure, const jsLaserIndex laserIndex, jsImage *const image, jsScan *const scan)
Requests and reads an image and scan with the specified laser and camera timings. This function requi...
int jsGetMultipleProfiles(JCONNECTION const jc, jsProfile *const profiles, UINT32 const cProfiles)
Requests and reads up to n profiles from the scanner while in either Synchronized Scanning Mode...
signed short INT16
Signed 16 bit integer.
Definition: jcam_dll.h:63
Furthest from the camera.
Definition: jcam_dll.h:122
int jsSendPositionCalibrationN(JCONNECTION const jc, jsLaserIndex const laserIndex, double const xOffset, double const yOffset, double const roll)
Sends a position calibration for the selected laser to the scanner.
Image data from the scanner.
Definition: jcam_dll.h:253
int jsGetScan(JCONNECTION const jc, jsScan *const scan)
Requests and reads a scan.
INT32 numberVertical
The number of vertical pixels.
Definition: jcam_dll.h:264
struct tagScanDataPoint ScanDataPoint
Represents a subpixel point from a scanner and its brightness.
The number of bytes in a jsResponsePacket&#39;s options field.
Definition: jcam_dll.h:109
int jsGetImage(JCONNECTION const jc, jsImage *const image)
Requests and reads an image.
int 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. ...
int jsSendProfileRequestN(JCONNECTION const jc, jsLaserIndex const laserIndex)
Sends a request for a profile from the specified laser.
signed int INT32
Signed 32 bit integer.
Definition: jcam_dll.h:65
int jsExitSyncMode(JCONNECTION const jc)
Causes the scanner to exit Time or Encoder Synchronized Scanning Mode.
INT32 flags
Information from the scanner.
Definition: jcam_dll.h:302
Closer to the camera than LASER0.
Definition: jcam_dll.h:124
Old position calibration parameters sent to the scanner.
Definition: jcam_dll.h:353
int jsReadMultipleProfiles(JCONNECTION const jc, jsProfile *const profiles, UINT32 nProfiles)
Reads up to nProfiles profiles from jc after a jsSendMultipleProfileRequest() call in Synchronized Sc...
int jsFindScannerBySerialNumber(int const serialNumber, jsResponsePacket responses[], const size_t nResponses)
Attempts to discover the scanner on the network with the specified serial number. ...
int jsSetAlternatingExposure(JCONNECTION const jc, bool const enable, int const exposure1, int const exposure2)
Set the alternating exposure parameters. Only works in sync mode. Settings are lost when exiting sync...
int jsGetScanN(JCONNECTION const jc, jsLaserIndex const laserIndex, jsScan *const scan)
Requests and reads a scan with the specified laser on.
JCONNECTION jsOpenConnection(char const *const host)
Opens a connection to the specified host.
int jsSetEncoderValue32(JCONNECTION const jc, UINT32 newEncoderValue)
Sets the scanner&#39;s internal encoder value.
INT32 laserOnTime
The number of 10 microseconds units the laser was on.
Definition: jcam_dll.h:283
int jsGetJcamDllMinorVersionNumber()
Returns the minor revision number of the DLL.
int jsGetScannerStatusFromScanner(JCONNECTION const jc)
Reads status from the scanner into a data structure inside the opaque JCONNECTION.
JCONNECTION jsOpenConnectionBase(char const *const host, UINT32 const cableID)
Opens a connection to the specified scanner using Base IP + Cable ID addressing.
A connection to a scanner timed out.
Definition: jcam_dll.h:88
INT32 reserved2
Currently unused.
Definition: jcam_dll.h:306
An operation was unable to complete.
Definition: jcam_dll.h:80
int jsSetBaseIpChar(UINT32 const serialNumber, char const *const baseIpAddress, char const *const netmask)
Sets a scanner&#39;s base IP address.
INT32 flags
Information from the scanner.
Definition: jcam_dll.h:234
INT32 reserved1
Currently unused.
Definition: jcam_dll.h:304
UINT32 ipAddress
The IP Address of the responding scanner, in network byte order.
Definition: jcam_dll.h:333
struct tagProfile jsProfile
Profile data from the scanner.
int jsReadOldPositionCalibrationsN(JCONNECTION const jc, jsLaserIndex const laserIndex, jsOldCalibrationValue oldCalibrations[], UINT32 nCalibrations)
Reads the specified number of old position calibrations for the selected laser from the scanner...
Static IP Address for a scanner.
Definition: jcam_dll.h:99
int jsOverrideLaserAutoexposure(JCONNECTION const jc, double minLaserOn, double maxLaserOn, double defaultLaserOn, int staturatedIntensity, int saturatedPercentage, int laserThreshold, bool autoexposeLaser)
Override the Laser Autoexposure parameters set in param.dat. Values will be lost when a new param...
UINT8 status
The status of the responding scanner.
Definition: jcam_dll.h:339
double roll
The scanner&#39;s rotation.
Definition: jcam_dll.h:360
UINT32 build
The firmware revision number of the responding scanner.
Definition: jcam_dll.h:341
int jsBeginSendParametersToScanner(JCONNECTION const jc, char const *const parameters)
Starts sending a parameter string to the scanhead. Must be followed with a called to jsEndSendParamet...
jsLaserIndexTag
A type for specifying which laser to use.
Definition: jcam_dll.h:119
int jsOverrideSyncSettings(JCONNECTION const jc, double timeScannedInterval, double encoderPulseInterval, double encoderScanInterval, int numberOfPhases, bool timeStaggeredScanning, double laser0Phase, double laser1Phase, double laser2Phase, double laser3Phase, double laser4Phase, bool untriggeredSyncScanning, bool startScanRisingEdgeTriggered)
Override the Synchronized Scanning parameters set in param.dat. Values will be lost when a new param...
enum jsLaserIndexTag jsLaserIndex
A type for specifying which laser to use.
int jsFindAllScanners(jsResponsePacket responses[], const size_t nResponses)
Attempts to discover all scanners on the network.
int jsSendParameterFileToScanner(JCONNECTION const jc, char const *const filename)
Sends a parameter file to the scanhead.
CCD sensor dimensions.
Definition: jcam_dll.h:94
IP Address is assigned with DHCP.
Definition: jcam_dll.h:103
void jsCleanup()
Gracefully ends TCP/IP communications.
INT32 location
The encoder value when when the scanner created the profile.
Definition: jcam_dll.h:204
INT32 brightness
The intensity of the pixel where the laser was detected.
Definition: jcam_dll.h:157
Represents a subpixel point from a scanner and its brightness.
Definition: jcam_dll.h:163
int jsSetCableId(UINT32 const serialNumber, UINT32 const cableId)
Overrides the cable ID physically wired into a scanner.
Scan data from the scanner.
Definition: jcam_dll.h:276