![]() |
|
|||||||||||||||||||||||||||||||||||||||||||||
LASER0.
If you attempt to access an invalid laser, like LASER1 on a single-laser JS20, the connection will close. This is fail-fast behavior. If an empty jsProfile were returned, people would spend all day trying to figure out why the profile had no data. Now, they'll simply spend all day trying to figure out why the connection died.
You may be thinking to yourself, Why an enum instead of an int? Good question. The answer is type safety. This way, you can't index an inappropriate laser like -3 - it simply won't compile. You'll have to actively work to index an inappropriate laser instead of having it accidentally happen.
If you still want to use an int, put the enum values into an array like this and pass in the value from the array:
jsLaserIndex laserIndexArray[] = {LASER0, LASER1}; for(int i = 0; i < 2; i++) jsGetProfileN(jc, laserIndexArray[i], &profile);
Functions | |
| JCAM_DLL_API int STDCALL | jsSendProfileRequestN (JCONNECTION const jc, jsLaserIndex const laserIndex) |
| Sends a request for a profile from the specified laser. | |
| JCAM_DLL_API int STDCALL | jsReadProfileN (JCONNECTION const jc, jsProfile *const profile) |
| Reads a profile from the connection. | |
| JCAM_DLL_API int STDCALL | jsGetProfileN (JCONNECTION const jc, jsLaserIndex const laserIndex, jsProfile *const profile) |
| Requests and reads a profile from the specified laser. | |
| JCAM_DLL_API int STDCALL | jsGetProfileFromAllLasers (JCONNECTION const jc, jsProfile *const profiles, size_t const cProfiles) |
| Requests and reads a profile from each laser the scanner has. | |
| JCAM_DLL_API int STDCALL | jsGetImageN (JCONNECTION const jc, jsLaserIndex const laserIndex, jsImage *const image) |
| Requests and reads an image with the specified laser on. | |
| JCAM_DLL_API int STDCALL | jsGetScanN (JCONNECTION const jc, jsLaserIndex const laserIndex, jsScan *const scan) |
| Requests and reads a scan with the specified laser on. | |
| JCAM_DLL_API int STDCALL | 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. | |
|
||||||||||||
|
Sends a request for a profile from the specified laser.
May not be called while the scanner is in Synchronized Scanning Mode. Nothing is read from the connection during this call. Increments the number of outstanding requests for this connection by one.
|
|
||||||||||||
|
Reads a profile from the connection.
May not be called while the scanner is in Synchronized Scanning Mode.
A call to Decrements the number of outstanding requests for this connection by one.
|
|
||||||||||||||||
|
Requests and reads a profile from the specified laser.
May not be called while the scanner is in Synchronized Scanning Mode.
|
|
||||||||||||||||
|
Requests and reads a profile from each laser the scanner has.
May not be called while the scanner is in Synchronized Scanning Mode.
If
|
|
||||||||||||||||
|
Requests and reads an image with the specified laser on.
|
|
||||||||||||||||
|
Requests and reads a scan with the specified laser on.
|
|
||||||||||||||||||||
|
Requests and reads an image and scan with the specified laser on.
|