Group Connecting¶
Functions for building and connecting to a ScanSystem. More...
Public Functions¶
Type | Name |
---|---|
EXPORTED bool PRE | jsScanHeadIsConnected (jsScanHead scan_head) Obtains the connection state of a given scan head. |
EXPORTED int32_t PRE | jsScanSystemConnect (jsScanSystem scan_system, int32_t timeout_s) Attempts to connect to all scan heads within the system. |
EXPORTED jsScanSystem PRE | jsScanSystemCreate (jsUnits units) Creates a jsScanSystem used to manage and coordinatejsScanHead objects. |
EXPORTED jsScanHead PRE | jsScanSystemCreateScanHead (jsScanSystem scan_system, uint32_t serial, uint32_t id) Creates a jsScanHead object representing a physical scan head within the system. |
EXPORTED int32_t PRE | jsScanSystemDisconnect (jsScanSystem scan_system) Disconnects all scan heads from a given system. |
EXPORTED int PRE | jsScanSystemDiscover (jsScanSystem scan_system) Performs a network discovery to determine what scan heads are on the network. |
EXPORTED void PRE | jsScanSystemFree (jsScanSystem scan_system) Frees a jsScanSystem and all resources associated with it. In particular, this will free alljsScanHead objects created by this object. |
EXPORTED int PRE | jsScanSystemGetDiscovered (jsScanSystem scan_system, jsDiscovered * results, uint32_t max_results) Obtains a list of all of the scan heads discovered on the network. |
EXPORTED int32_t PRE | jsScanSystemGetNumberScanHeads (jsScanSystem scan_system) Returns the total number of scan heads within a given system. This should equal the number of times jsScanSystemCreateScanHead() was successfully called with a new serial number. |
EXPORTED int PRE | jsScanSystemGetScanSyncDiscovered (jsScanSystem scan_system, jsScanSyncDiscovered * results, uint32_t max_results) Obtains a list of all of the ScanSyncs discovered on the network. |
EXPORTED bool PRE | jsScanSystemIsConnected (jsScanSystem scan_system) Gets connected state for a scan system. |
EXPORTED int PRE | jsScanSystemScanSyncDiscover (jsScanSystem scan_system) Performs a network discovery to determine what ScanSyncs are on the network. |
Detailed Description¶
These function allow you to add ScanHeads to a ScanSystem and Connect or Disconnect.
Public Functions Documentation¶
function jsScanHeadIsConnected¶
Obtains the connection state of a given scan head.
EXPORTED bool PRE jsScanHeadIsConnected (
jsScanHead scan_head
)
Parameters:
scan_head
Reference to scan head.
Returns:
Boolean true
on connected, false
otherwise.
function jsScanSystemConnect¶
Attempts to connect to all scan heads within the system.
EXPORTED int32_t PRE jsScanSystemConnect (
jsScanSystem scan_system,
int32_t timeout_s
)
Parameters:
scan_system
Reference to system owning scan heads to connect to.timeout_s
TCP timeout for all managed scan heads in seconds.
Returns:
The total number of connected scan heads on success, negative value mapping to jsError
on error.
function jsScanSystemCreate¶
Creates a jsScanSystem
used to manage and coordinatejsScanHead
objects.
EXPORTED jsScanSystem PRE jsScanSystemCreate (
jsUnits units
)
Parameters:
units
The units the scan system and all scan heads will use.
Returns:
Positive valued token on success, negative value mapping to jsError
on error.
function jsScanSystemCreateScanHead¶
Creates a jsScanHead
object representing a physical scan head within the system.
EXPORTED jsScanHead PRE jsScanSystemCreateScanHead (
jsScanSystem scan_system,
uint32_t serial,
uint32_t id
)
Note:
This function can only be called when the scan system is disconnected. Once jsScanSystemConnect()
is called, jsScanSystemDisconnect()
must be called if new scan heads are desired to be created.
Parameters:
scan_system
Reference to system that will own the scan head.serial
The serial number of the physical scan head.id
A user defined numerically unique id to assign to this scan head.
Returns:
Positive valued token on success, negative value mapping to jsError
on error.
function jsScanSystemDisconnect¶
Disconnects all scan heads from a given system.
EXPORTED int32_t PRE jsScanSystemDisconnect (
jsScanSystem scan_system
)
Parameters:
scan_system
Reference to system of scan heads.
Returns:
0
on success, negative value jsError
on error.
function jsScanSystemDiscover¶
Performs a network discovery to determine what scan heads are on the network.
EXPORTED int PRE jsScanSystemDiscover (
jsScanSystem scan_system
)
Parameters:
scan_system
The scan system to perform discovery.
Returns:
The total number of discovered scan heads on success, negative value mapping to jsError
on error.
function jsScanSystemFree¶
Frees a jsScanSystem
and all resources associated with it. In particular, this will free alljsScanHead
objects created by this object.
EXPORTED void PRE jsScanSystemFree (
jsScanSystem scan_system
)
Parameters:
scan_system
Reference to system that will be freed.
function jsScanSystemGetDiscovered¶
Obtains a list of all of the scan heads discovered on the network.
EXPORTED int PRE jsScanSystemGetDiscovered (
jsScanSystem scan_system,
jsDiscovered * results,
uint32_t max_results
)
Parameters:
scan_system
The scan system that previously performed discovery.results
Pointer to memory to store discover data. Note, the memory pointed to byresults
must be at leastsizeof(jsDiscovered) * max_results
in total number of bytes.max_results
The maximum number of discovered results to read.
Returns:
The total number of discovered scan heads on success, negative value mapping to jsError
on error.
function jsScanSystemGetNumberScanHeads¶
Returns the total number of scan heads within a given system. This should equal the number of times jsScanSystemCreateScanHead()
was successfully called with a new serial number.
EXPORTED int32_t PRE jsScanSystemGetNumberScanHeads (
jsScanSystem scan_system
)
Parameters:
scan_system
Reference to system that owns the scan heads.
Returns:
The number of scan heads on success, negative value mapping to jsError
on error.
function jsScanSystemGetScanSyncDiscovered¶
Obtains a list of all of the ScanSyncs discovered on the network.
EXPORTED int PRE jsScanSystemGetScanSyncDiscovered (
jsScanSystem scan_system,
jsScanSyncDiscovered * results,
uint32_t max_results
)
Parameters:
scan_system
The scan system that previously performed discovery.results
Pointer to memory to store discover data. Note, the memory pointed to byresults
must be at leastsizeof(jsScanSyncDiscovered) * max_results
in total number of bytes.max_results
The maximum number of discovered results to read.
Returns:
The total number of discovered ScanSyncs on success, negative value mapping to jsError
on error.
function jsScanSystemIsConnected¶
Gets connected state for a scan system.
EXPORTED bool PRE jsScanSystemIsConnected (
jsScanSystem scan_system
)
Note:
A scan system is said to be connected if all of the scan heads associated with it are connected.
Parameters:
scan_system
Reference to system of scan heads.
Returns:
Boolean true
if connected, false
if disconnected.
function jsScanSystemScanSyncDiscover¶
Performs a network discovery to determine what ScanSyncs are on the network.
EXPORTED int PRE jsScanSystemScanSyncDiscover (
jsScanSystem scan_system
)
Parameters:
scan_system
The scan system to perform discovery.
Returns:
The total number of discovered ScanSyncs on success, negative value mapping to jsError
on error.