nScopeAPI  v0.8
Functions
nScopeAPI.h File Reference

Main header file that includes the entire API. More...

Functions

NSCOPE_API ErrorType nScope_open (bool powerOn, ScopeHandle *nScope_p)
 Open a connected nScope device and initialize it. More...
 
NSCOPE_API ErrorType nScope_close (ScopeHandle *nScope_p)
 Close and clean a connected nScope device. More...
 
NSCOPE_API ErrorType nScope_clean (ScopeHandle *nScope_p)
 Clean up an nScope device. More...
 
NSCOPE_API ErrorType nScope_initialize (ScopeHandle nScope)
 Initialize an nScope with the default configuration. More...
 
NSCOPE_API ErrorType nScope_get_power_usage (ScopeHandle nScope, double *powerUsage)
 Read how much power is being used by nScope. More...
 
NSCOPE_API ErrorType nScope_get_power_state (ScopeHandle nScope, PowerState *powerState)
 Read the PowerState of the nScope. More...
 
NSCOPE_API ErrorType nScope_find_firmware_loader ()
 find the firmware loader More...
 
NSCOPE_API ErrorType nScope_write_to_loader ()
 write the firmware to the loader More...
 
NSCOPE_API ErrorType nScope_load_firmware ()
 load the nScope with current firmware More...
 
NSCOPE_API ErrorType nScope_check_API_version (double *apiVersion)
 check the version of this API More...
 
NSCOPE_API ErrorType nScope_check_FW_version (double *fwVersion)
 check the version of the connected firmware More...
 
NSCOPE_API ErrorType nScope_check_API_build (int *buildNo)
 check the build number of this API More...
 

Documentation

Main header file that includes the entire API.

Function Documentation

NSCOPE_API ErrorType nScope_check_API_build ( int *  buildNo)

check the build number of this API

Returns
ErrorType
Parameters
[out]apiVersionpointer to a variable to store the current API build
NSCOPE_API ErrorType nScope_check_API_version ( double *  apiVersion)

check the version of this API

Returns
ErrorType
Parameters
[out]apiVersionpointer to a variable to store the current API version
NSCOPE_API ErrorType nScope_check_FW_version ( double *  fwVersion)

check the version of the connected firmware

Returns
ErrorType
Parameters
[out]fwVersionpointer to a variable to store the current firmware version
NSCOPE_API ErrorType nScope_clean ( ScopeHandle nScope_p)

Clean up an nScope device.

This function cleans the memory that was used for an nScope object. This function is called by nScope_close(), so it is only needed when nScope is disconnected for an unknown reason.

Returns
ErrorType
Parameters
[in]nScope_ppointer to a ScopeHandle object
NSCOPE_API ErrorType nScope_close ( ScopeHandle nScope_p)

Close and clean a connected nScope device.

Returns
ErrorType
Parameters
[in]nScope_ppointer to a ScopeHandle object
NSCOPE_API ErrorType nScope_find_firmware_loader ( )

find the firmware loader

Returns
ErrorType
NSCOPE_API ErrorType nScope_get_power_state ( ScopeHandle  nScope,
PowerState powerState 
)

Read the PowerState of the nScope.

Returns
ErrorType
Parameters
[in]nScopenScope handle
[out]powerStatepointer to a variable to store nScope's current power state
NSCOPE_API ErrorType nScope_get_power_usage ( ScopeHandle  nScope,
double *  powerUsage 
)

Read how much power is being used by nScope.

Returns
ErrorType
Parameters
[in]nScopenScope handle
[out]powerUsagepointer to a variable to store the amount of power being used by nScope in watts
NSCOPE_API ErrorType nScope_initialize ( ScopeHandle  nScope)

Initialize an nScope with the default configuration.

This function is called by nScope_open(), so it's only needed to reset the configuration if it ever reaches an unknown state.

The default configuration is:

Returns
ErrorType
Parameters
[in]nScopenScope handle
NSCOPE_API ErrorType nScope_load_firmware ( )

load the nScope with current firmware

calls both nScope_find_firmware_loader() and nScope_write_to_loader()

Returns
ErrorType
NSCOPE_API ErrorType nScope_open ( bool  powerOn,
ScopeHandle nScope_p 
)

Open a connected nScope device and initialize it.

Looks for a nScope device, connects to it, then runs nScope_initialize() Stores the resulting ScopeHandle object in *nScope_p

Returns
ErrorType
Parameters
[in]powerOntrue turns nScope on when first opened, false leaves nScope in its current state
[out]nScope_pa pointer to a ScopeHandle object
NSCOPE_API ErrorType nScope_write_to_loader ( )

write the firmware to the loader

Returns
ErrorType