File joescan_pinchot.h¶
FileList > api > src > joescan_pinchot.h
Go to the source code of this file
This file contains the interface for the client software used to control scanning for JoeScan products.
Copyright (c) JoeScan Inc. All Rights Reserved.
Licensed under the BSD 3 Clause License. See LICENSE.txt in the project root for license information.
Author:
JoeScan
#include <limits.h>#include <stdbool.h>#include <stdint.h>
Classes¶
| Type | Name |
|---|---|
| struct | jsBrightnessCorrection_BETA Structure used to adjust and scale the brightness values returned with scan data. The brightness is corrected in the following manner: |
| struct | jsCameraImage This structure is used to return a grayscale image capture from the scan head. |
| struct | jsCoordinate A spatial coordinate point in scan system units. |
| struct | jsDiscovered Structure used to provide information as to scan heads discovered on the network. |
| struct | jsExclusionMask Structure used to define which pixels in the camera to exclude from scan data. |
| struct | jsProfile Scan data is returned from the scan head through profiles; each profile returning a single scan line at a given moment in time. |
| struct | jsProfileData A data point within a returned profile's data. |
| struct | jsRawProfile A Raw Profile is the most basic type of profile returned back from a scan head. The data is left unprocessed with the contents being dependent on the jsDataFormat that the scan head is configured for. |
| struct | jsScanHeadCapabilities Structure used to communicate the various capabilities and limits of a given scan head type. |
| struct | jsScanHeadConfiguration Structure used to configure a scan head's operating parameters. |
| struct | jsScanHeadStatus Structure used to hold information pertaining to the scan head. |
| struct | jsScanSyncDiscovered |
| struct | jsScanSyncStatus Structure used to hold the status of a ScanSync. |
Public Types¶
| Type | Name |
|---|---|
| enum | jsCableOrientation The camera orientation for a given scan head; the orientation selected influences the coordinate system of returned data. |
| enum | jsCamera Data type for identifying a camera on the scan head. |
| enum int64_t | jsConstants Constant values used with this API. |
| enum | jsDataFormat Enumerated value representing the types of data and the formats it can take. For full resolution data formats, every data entry will be filled within the returned profile's data array. Selecting half or quarter resolution will result in every other or every fourth entry in thedata array to be filled respectively. |
| enum | jsDiagnosticMode Data type for setting fixed camera & laser exposure or to use the auto exposure algorithm when obtaining diagnostic profiles and images. |
| enum | jsEncoder Data type for identifying an encoder and indexing into the encoder_values field injsProfile andjsRawProfile . |
| enum | jsError Enumerated value for possible errors returned from API functions. |
| enum | jsLaser Data type for identifying a laser on the scan head. |
| enum | jsProfileFlags |
| typedef int64_t | jsScanHead Opaque reference to an object in software that represents as single physical scan head. |
| enum | jsScanHeadState |
| enum | jsScanHeadType Enumerated value identifying the scan head type. |
| typedef int64_t | jsScanSystem Opaque reference to an object in software used to manage a complete system of scan heads. |
| enum | jsScanWindowType Enumerated value identifying the scan head window type. |
| enum | jsUnits The units that a given scan system and all associated scan heads will use for configuration and returned data. |
Public Functions¶
| Type | Name |
|---|---|
| int32_t | jsScanSystemDisableIdleScanning (jsScanSystem scan_system) Disable idle scanning for the scan system. |
| jsScanHead | jsScanSystemGetScanHeadBySerial (jsScanSystem scan_system, uint32_t serial) Obtains a reference to an existing jsScanHead object. |
Macros¶
| Type | Name |
|---|---|
| DEPRECATED |
|
| EXPORTED |
|
| NOT_EXPORTED |
|
POST \_\_attribute\_\_((sysv\_abi)) |
|
| PRE |
|
jsProfileIsValid (profile) /* multi line expression */Macro function to check if jsProfile has been filled with data from the scan head. |
|
jsRawProfileIsValid (profile) /* multi line expression */Macro function to check if jsRawProfile has been filled with data from the scan head. |
Public Types Documentation¶
jsCableOrientation¶
The camera orientation for a given scan head; the orientation selected influences the coordinate system of returned data.
enum jsCableOrientation {
JS_CABLE_ORIENTATION_INVALID = 0,
JS_CABLE_ORIENTATION_DOWNSTREAM = 1,
JS_CABLE_ORIENTATION_UPSTREAM = 2,
JS_CABLE_ORIENTATION_FORCE_INT32_SIZE = INT32_MAX
};
jsCamera¶
Data type for identifying a camera on the scan head.
enum jsCamera {
JS_CAMERA_INVALID = 0,
JS_CAMERA_A = 1,
JS_CAMERA_B,
JS_CAMERA_MAX,
JS_CAMERA_FORCE_INT32_SIZE = INT32_MAX
};
jsConstants¶
Constant values used with this API.
enum jsConstants {
JS_SCAN_HEAD_TYPE_STR_MAX_LEN = 32,
JS_CLIENT_NAME_STR_MAX_LEN = 128,
JS_SCAN_HEAD_DATA_COLUMNS_MAX_LEN = 1456,
JS_PROFILE_DATA_LEN = JS_SCAN_HEAD_DATA_COLUMNS_MAX_LEN,
JS_RAW_PROFILE_DATA_LEN = JS_SCAN_HEAD_DATA_COLUMNS_MAX_LEN,
JS_CAMERA_IMAGE_DATA_MAX_WIDTH = JS_SCAN_HEAD_DATA_COLUMNS_MAX_LEN,
JS_CAMERA_IMAGE_DATA_MAX_HEIGHT = 1088,
JS_CAMERA_IMAGE_DATA_LEN =
JS_CAMERA_IMAGE_DATA_MAX_HEIGHT * JS_CAMERA_IMAGE_DATA_MAX_WIDTH,
JS_PROFILE_DATA_INVALID_XY = INT_MIN,
JS_PROFILE_DATA_INVALID_BRIGHTNESS = 0,
JS_SCAN_HEAD_PROFILES_MAX = 1000,
JS_SCAN_HEAD_INVALID_SERIAL = 0,
JS_SCANSYNC_INVALID_SERIAL = 0,
JS_SCANSYNC_INVALID_ENCODER = INT64_MAX
};
Note:
The int64_t is required to force the enum to hold 64 bit values.
jsDataFormat¶
Enumerated value representing the types of data and the formats it can take. For full resolution data formats, every data entry will be filled within the returned profile's data array. Selecting half or quarter resolution will result in every other or every fourth entry in thedata array to be filled respectively.
enum jsDataFormat {
JS_DATA_FORMAT_INVALID = 0,
JS_DATA_FORMAT_XY_BRIGHTNESS_FULL,
JS_DATA_FORMAT_XY_BRIGHTNESS_HALF,
JS_DATA_FORMAT_XY_BRIGHTNESS_QUARTER,
JS_DATA_FORMAT_XY_FULL,
JS_DATA_FORMAT_XY_HALF,
JS_DATA_FORMAT_XY_QUARTER,
JS_DATA_FORMAT_FORCE_INT32_SIZE = INT32_MAX
};
jsDiagnosticMode¶
Data type for setting fixed camera & laser exposure or to use the auto exposure algorithm when obtaining diagnostic profiles and images.
enum jsDiagnosticMode {
JS_DIAGNOSTIC_MODE_INVALID = 0,
JS_DIAGNOSTIC_FIXED_EXPOSURE,
JS_DIAGNOSTIC_AUTO_EXPOSURE,
JS_DIAGNOSTIC_FORCE_INT32_SIZE = INT32_MAX
};
jsEncoder¶
Data type for identifying an encoder and indexing into the encoder_values field injsProfile andjsRawProfile .
enum jsEncoder {
JS_ENCODER_MAIN = 0,
JS_ENCODER_AUX_1,
JS_ENCODER_AUX_2,
JS_ENCODER_MAX,
JS_ENCODER_FORCE_INT32_SIZE = INT32_MAX
};
jsError¶
Enumerated value for possible errors returned from API functions.
enum jsError {
JS_ERROR_NONE = 0,
JS_ERROR_INTERNAL = -1,
JS_ERROR_NULL_ARGUMENT = -2,
JS_ERROR_INVALID_ARGUMENT = -3,
JS_ERROR_NOT_CONNECTED = -4,
JS_ERROR_CONNECTED = -5,
JS_ERROR_NOT_SCANNING = -6,
JS_ERROR_SCANNING = -7,
JS_ERROR_VERSION_COMPATIBILITY = -8,
JS_ERROR_ALREADY_EXISTS = -9,
JS_ERROR_NO_MORE_ROOM = -10,
JS_ERROR_NETWORK = -11,
JS_ERROR_NOT_DISCOVERED = -12,
JS_ERROR_USE_CAMERA_FUNCTION = -13,
JS_ERROR_USE_LASER_FUNCTION = -14,
JS_ERROR_FRAME_SCANNING = -15,
JS_ERROR_NOT_FRAME_SCANNING = -16,
JS_ERROR_FRAME_SCANNING_INVALID_PHASE_TABLE = -17,
JS_ERROR_PHASE_TABLE_EMPTY = -18,
JS_ERROR_DEPRECATED = -19,
JS_ERROR_INVALID_SCAN_SYSTEM = -20,
JS_ERROR_INVALID_SCAN_HEAD = -21,
JS_ERROR_UNKNOWN = -22,
JS_ERROR_FORCE_INT32_SIZE = INT32_MAX
};
Note:
These values can be converted to a string value by using the jsGetError function.
jsLaser¶
Data type for identifying a laser on the scan head.
enum jsLaser {
JS_LASER_INVALID = 0,
JS_LASER_1 = 1,
JS_LASER_2,
JS_LASER_3,
JS_LASER_4,
JS_LASER_5,
JS_LASER_6,
JS_LASER_7,
JS_LASER_8,
JS_LASER_MAX,
JS_LASER_FORCE_INT32_SIZE = INT32_MAX
};
jsProfileFlags¶
enum jsProfileFlags {
JS_PROFILE_FLAG_ENCODER_MAIN_FAULT_A = 1 << 0,
JS_PROFILE_FLAG_ENCODER_MAIN_FAULT_B = 1 << 1,
JS_PROFILE_FLAG_ENCODER_MAIN_FAULT_Y = 1 << 2,
JS_PROFILE_FLAG_ENCODER_MAIN_FAULT_Z = 1 << 3,
JS_PROFILE_FLAG_ENCODER_MAIN_OVERRUN = 1 << 4,
JS_PROFILE_FLAG_ENCODER_MAIN_TERMINATION_ENABLE = 1 << 5,
JS_PROFILE_FLAG_ENCODER_MAIN_INDEX_Z = 1 << 6,
JS_PROFILE_FLAG_ENCODER_MAIN_SYNC = 1 << 7,
JS_PROFILE_FLAG_ENCODER_MAIN_AUX_Y = 1 << 8,
JS_PROFILE_FLAG_ENCODER_MAIN_FAULT_SYNC = 1 << 9,
JS_PROFILE_FLAG_ENCODER_MAIN_LASER_DISABLE = 1 << 10,
JS_PROFILE_FLAG_ENCODER_MAIN_FAULT_LASER_DISABLE = 1 << 11,
JS_PROFILE_FLAGS_FORCE_INT32_SIZE = INT32_MAX
};
jsScanHead¶
Opaque reference to an object in software that represents as single physical scan head.
typedef int64_t jsScanHead;
jsScanHeadState¶
enum jsScanHeadState {
JS_SCAN_HEAD_STATE_INVALID = 0,
JS_SCAN_HEAD_STATE_IDLE = 1,
JS_SCAN_HEAD_STATE_STANDBY = 1,
JS_SCAN_HEAD_STATE_CONNECTED = 2,
JS_SCAN_HEAD_STATE_SCANNING = 3,
JS_SCAN_HEAD_STATE_SCANNING_IDLE = 4,
JS_SCAN_HEAD_STATE_FORCE_INT32_SIZE = INT32_MAX
};
jsScanHeadType¶
Enumerated value identifying the scan head type.
enum jsScanHeadType {
JS_SCAN_HEAD_INVALID_TYPE = 0,
JS_SCAN_HEAD_JS50WX = 1,
JS_SCAN_HEAD_JS50WSC = 2,
JS_SCAN_HEAD_JS50X6B20 = 3,
JS_SCAN_HEAD_JS50X6B30 = 4,
JS_SCAN_HEAD_JS50MX = 5,
JS_SCAN_HEAD_JS50Z820 = 6,
JS_SCAN_HEAD_JS50Z830 = 7,
JS_SCAN_HEAD_TYPE_FORCE_INT32_SIZE = INT32_MAX
};
jsScanSystem¶
Opaque reference to an object in software used to manage a complete system of scan heads.
typedef int64_t jsScanSystem;
jsScanWindowType¶
Enumerated value identifying the scan head window type.
enum jsScanWindowType {
JS_SCAN_WINDOW_INVALID = 0,
JS_SCAN_WINDOW_UNCONSTRAINED = 1,
JS_SCAN_WINDOW_RECTANGULAR = 2,
JS_SCAN_WINDOW_POLYGONAL = 3,
JS_SCAN_WINDOW_FORCE_INT32_SIZE = INT32_MAX
};
jsUnits¶
The units that a given scan system and all associated scan heads will use for configuration and returned data.
enum jsUnits {
JS_UNITS_INVALID = 0,
JS_UNITS_INCHES = 1,
JS_UNITS_MILLIMETER = 2,
JS_UNITS_FORCE_INT32_SIZE = INT32_MAX
};
Public Functions Documentation¶
jsScanSystemDisableIdleScanning¶
Disable idle scanning for the scan system.
int32_t jsScanSystemDisableIdleScanning(
jsScanSystem scan_system
)
Parameters:
scan_systemReference to scan system.
Returns:
0 on success, negative value mapping to jsError on error.
jsScanSystemGetScanHeadBySerial¶
Obtains a reference to an existing jsScanHead object.
jsScanHead jsScanSystemGetScanHeadBySerial(
jsScanSystem scan_system,
uint32_t serial
)
Parameters:
scan_systemReference to system that owns the scan head.serialThe serial number of the physical scan head.
Returns:
Positive valued token on success, negative value mapping to jsError on error.
Macro Definition Documentation¶
DEPRECATED¶
#define DEPRECATED
EXPORTED¶
#define EXPORTED
NOT_EXPORTED¶
#define NOT\_EXPORTED
POST¶
#define POST `__attribute__((sysv_abi))`
PRE¶
#define PRE
jsProfileIsValid¶
Macro function to check if jsProfile has been filled with data from the scan head.
#define jsProfileIsValid (
profile
) `/* multi line expression */`
Parameters:
profileThe profile to check.
Returns:
Boolean true if has valid data, false otherwise.
jsRawProfileIsValid¶
Macro function to check if jsRawProfile has been filled with data from the scan head.
#define jsRawProfileIsValid (
profile
) `/* multi line expression */`
Parameters:
profileThe profile to check.
Returns:
Boolean true if has valid data, false otherwise.