Class Solum
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
Generic boolean callback.static interface
Firmware version callback.static interface
Initialization callback.static interface
Solum callbacks.static interface
Mode callback.static interface
Param callback.static interface
Probe info callback.static interface
Progress callback.static interface
Range callback.static interface
Callback when the raw data was retrieved from the probe.static interface
Callback when the raw data request was completed.static interface
ROI callback.static interface
Software update callback.static interface
Status callback.static interface
String list callback.static interface
TGC callback. -
Constructor Summary
ConstructorsConstructorDescriptionSolum
(android.content.Context context, Solum.Listener listener) Deprecated.Solum
(String nativeLibraryDir, Solum.Listener listener) Load the Solum library. -
Method Summary
Modifier and TypeMethodDescriptionvoid
adjustRoi
(RoiFunction roiFn, double x, double y) Move the ROI.void
Connect to a probe that is on the same network as the caller.void
Disconnect from an existing connection.void
enable5v
(boolean enabled) Enable the 5V output on or off.void
getApplications
(String probe, Solum.StringListResult resultFn) Retrieve the available applications for a specific probe model.void
getFirmwareVersion
(Platform platform, Solum.FirmwareVersionResult resultFn) Retrieve the firmware version for a given platform.void
getMode
(Solum.ModeResult resultFn) Retrieve the current imaging mode.void
getParam
(Param param, Solum.ParamResult resultFn) Retrieve an imaging parameter value.void
getProbeInfo
(Solum.ProbeInfoResult resultFn) Retrieve the probe info.void
getProbes
(Solum.StringListResult resultFn) Retrieve the available probe models supported by the API.void
getRange
(Param param, Solum.RangeResult resultFn) Retrieve the range for a specific parameter.void
getRoi
(int count, Solum.RoiResult resultFn) Retrieve the ROI for the current mode if valid.void
getStatus
(Solum.StatusResult resultFn) Retrieve the probe status.void
getTgc
(Solum.TgcResult resultFn) Retrieve the TGC values.void
initialize
(String sslDir, Solum.InitializationResult resultFn) Initialize the Solum library to enable connection.boolean
Check if Solum is currently connected to a probe.boolean
Check if Solum has been initialized.void
loadApplication
(String probe, String application) Load an application with the given probe model.void
Maximize the ROI.void
optimizeWifi
(WifiOpt wifiOpt, Solum.BooleanResult resultFn) Will try and optimize the wireless channel when the probe is running its own network.void
Try to power down the probe if actively connected.void
readRawData
(Solum.ReadRawDataCallback resultFn, Solum.Progress progressFn) Retrieve raw data from a previous request.void
release()
Unload the Solum library, any subsequent call will be no-op.void
requestRawData
(long start, long end, Solum.RequestRawDataCallback resultFn) Request raw data from the probe.void
resetProbe
(ProbeReset probeReset, Solum.BooleanResult resultFn) Perform a probe reset.void
run
(boolean run) Run or stop imaging.void
separateOverlays
(boolean enable) Set a flag to separate overlays into separate images.void
setCertificate
(String cert) Set the certificate for the probe with which to connect.void
setFormat
(ImageFormat format) Set the format for processed images, by default the format will be uncompressed ARGB32.void
Set an imaging mode.void
setOutputSize
(int width, int height) Set the dimensions of the output display for scan conversion.void
Set an imaging parameter.void
setProbeSettings
(ProbeSettings settings) Set the internal probe settings to be applied upon a connection or when an existing connection exists.void
Set the TGC.void
updateSoftware
(Solum.SoftwareUpdateResult resultFn, Solum.Progress progressFn) Perform a software update once connected.void
updateSoftware
(Solum.SoftwareUpdateResult resultFn, Solum.Progress progressFn, Optional<Platform> platform) Perform a software update once connected.
-
Constructor Details
-
Solum
Load the Solum library.- Parameters:
nativeLibraryDir
- full path to the directory where native JNI libraries are stored. The Solum library will look for Qt plugins inside this directory. The path can be obtained from requireContext().getApplicationInfo().nativeLibraryDir.listener
- API callbacks.
-
Solum
Deprecated.This constructor is no longer acceptable, useSolum(String, Listener)
instead.The Context object was used to obtain the path to the native JNI libraries, the new constructor lets user specify their own path if needed. The default path is: requireContext().getApplicationInfo().nativeLibraryDir.
Deprecated in version 10.3.0.
Load the Solum library.- Parameters:
context
- the application context.listener
- API callbacks.
-
-
Method Details
-
release
public void release()Unload the Solum library, any subsequent call will be no-op. -
initialize
Initialize the Solum library to enable connection.- Parameters:
sslDir
- the directory to store security keys.resultFn
- the result callback.
-
isInitialized
public boolean isInitialized()Check if Solum has been initialized.- Returns:
- true if Solum has been initialized.
-
connect
Connect to a probe that is on the same network as the caller.NOTE: the network ID is used when attempting to connect to the probe's Wi-Fi that was auto-joined with Android Wi-Fi Network Request API. It can be obtained from the Network object obtained in the NetworkCallback.onAvailable() callback.
Result will be reported asynchronously in Listener.connectionResult().
- Parameters:
ipAddress
- the IP address of the probe.port
- the probe's TCP port to connect to.networkID
- the Wi-Fi network ID obtained when auto-joining Wi-Fi.
-
disconnect
public void disconnect()Disconnect from an existing connection. -
isConnected
public boolean isConnected()Check if Solum is currently connected to a probe.- Returns:
- true if Solum is connected to a probe.
-
getFirmwareVersion
Retrieve the firmware version for a given platform.- Parameters:
platform
- the platform for which to retrieve the firmware version.resultFn
- the result callback.
-
updateSoftware
Perform a software update once connected.Solum attempts to detect the connected probe's platform to select the appropriate firmware. It is possible the auto-detection fails with error "undetermined hardware version", preventing the update. In that case try to force the update by specifying the platform.
- Parameters:
resultFn
- the result callback.progressFn
- the progress callback.
-
updateSoftware
public void updateSoftware(Solum.SoftwareUpdateResult resultFn, Solum.Progress progressFn, Optional<Platform> platform) Perform a software update once connected.Solum attempts to detect the connected probe's platform to select the appropriate firmware. It is possible the auto-detection fails, preventing the update, in that case Solum will use the supplied platform parameter.
- If auto-detection succeeds, Solum uses the firmware for the detected platform and ignores the supplied platform parameter
- If auto-detection fails and a platform parameter was specified, Solum uses the firmware for the specified platform
- If auto-detection fails and no platform parameter was specified, Solum aborts the update
WARNING: updating a probe with the incorrect firmware could brick it.
Recommended usage:
- Attempt an update without specifying a platform first (let Solum select the appropriate firmware)
- Only if the update fails, try specifying a platform
- Parameters:
resultFn
- the result callback.progressFn
- the progress callback.platform
- upload the firmware for this platform.
-
getProbes
Retrieve the available probe models supported by the API.- Parameters:
resultFn
- the result callback with the list of probe models (result list can be empty).
-
getApplications
Retrieve the available applications for a specific probe model.- Parameters:
probe
- the probe model for which to retrieve applications.resultFn
- the result callback with the list of applications (result list can be empty).
-
loadApplication
Load an application with the given probe model.- Parameters:
probe
- the probe model to load.application
- the application to load.
-
setCertificate
Set the certificate for the probe with which to connect.- Parameters:
cert
- the certificate provided by Clarius.
-
setOutputSize
public void setOutputSize(int width, int height) Set the dimensions of the output display for scan conversion.The output will always result in a 1:1 pixel ratio, depending on geometry of scanning array, and parameters the frame will have various sizes of black borders around the image.
- Parameters:
width
- the number of horizontal pixels in the output.height
- the number of vertical pixels in the output.
-
separateOverlays
public void separateOverlays(boolean enable) Set a flag to separate overlays into separate images.For example if color/power Doppler or strain imaging is enabled, two callbacks will be generated: one with the grayscale frame and the other with the overlay.
- Parameters:
enable
- the enable flag for separating overlays.
-
setProbeSettings
Set the internal probe settings to be applied upon a connection or when an existing connection exists.- Parameters:
settings
- the structure containing the probe settings.
-
setParam
Set an imaging parameter.- Parameters:
param
- the parameter to set.value
- the new parameter value.
-
getParam
Retrieve an imaging parameter value.- Parameters:
param
- the parameter for which to retrieve the value.resultFn
- the result callback.
-
getRange
Retrieve the range for a specific parameter.- Parameters:
param
- the parameter for which to retrieve the range.resultFn
- the result callback.
-
setTgc
Set the TGC.- Parameters:
tgc
- the values to use for the TGC.
-
getTgc
Retrieve the TGC values.- Parameters:
resultFn
- the result callback.
-
getRoi
Retrieve the ROI for the current mode if valid.- Parameters:
count
- the number of points to generate.resultFn
- the result callback.
-
adjustRoi
Move the ROI.- Parameters:
roiFn
- ROI function.x
- the pixel X position.y
- the pixel Y position.
-
maximizeRoi
public void maximizeRoi()Maximize the ROI. -
setMode
Set an imaging mode.- Parameters:
mode
- the imaging mode to set.
-
getMode
Retrieve the current imaging mode.- Parameters:
resultFn
- the result callback.
-
enable5v
public void enable5v(boolean enabled) Enable the 5V output on or off.- Parameters:
enabled
- the enable state: true to turn 5V on, 0 to turn off.
-
setFormat
Set the format for processed images, by default the format will be uncompressed ARGB32.- Parameters:
format
- the format of the image.
-
run
public void run(boolean run) Run or stop imaging.- Parameters:
run
- the run state to set, true to start imaging, false to stop imaging.
-
powerDown
public void powerDown()Try to power down the probe if actively connected. -
getStatus
Retrieve the probe status.- Parameters:
resultFn
- the result callback.
-
getProbeInfo
Retrieve the probe info.- Parameters:
resultFn
- the result callback.
-
requestRawData
Request raw data from the probe.NOTE: probe must be frozen and in a raw data buffering mode in order for the call to succeed.
Usage:
- Request raw data with this function first
- On success, read raw data with
readRawData(ReadRawDataCallback, Progress)
- Parameters:
start
- the first frame to request, as determined by timestamp in nanoseconds, set start and end to 0 to requests all data in buffer.end
- the last frame to request, as determined by timestamp in nanoseconds, set start and end to 0 to requests all data in buffer.resultFn
- the result callback.
-
readRawData
Retrieve raw data from a previous request.NOTE: call
requestRawData(long, long, RequestRawDataCallback)
first.- Parameters:
resultFn
- the result callback.progressFn
- the progress callback.
-
optimizeWifi
Will try and optimize the wireless channel when the probe is running its own network.The function will return a failure if the probe is on an external WLAN as nothing can be optimized, except for switching over to the probe's own network. To switch to the probe's network, see the bluetooth documentation for the wireless management service.
- Parameters:
wifiOpt
- the optimization type to run.resultFn
- the result callback.
-
resetProbe
Perform a probe reset.- Parameters:
probeReset
- the type of probe reset.resultFn
- the result callback.
-
Solum(String, Listener)
instead.