nScopeAPI  v0.8
Functions
nScopeAPI_analogInputs.h File Reference

contains function headers for controlling the nScope analog inputs More...

Functions

NSCOPE_API ErrorType nScope_set_channels_on (ScopeHandle nScope, bool ch1on, bool ch2on, bool ch3on, bool ch4on)
 Set the channel states (on/off) for all channels. More...
 
NSCOPE_API ErrorType nScope_get_channels_on (ScopeHandle nScope, bool *channelsOn)
 Get the channel states (on/off) for all channels. More...
 
NSCOPE_API ErrorType nScope_get_num_channels_on (ScopeHandle nScope, int *numChannelsOn)
 Get the number of channels currently on. More...
 
NSCOPE_API ErrorType nScope_set_ChX_on (ScopeHandle nScope, int ch, bool channelOn)
 Set a channel state on or off. More...
 
NSCOPE_API ErrorType nScope_get_ChX_on (ScopeHandle nScope, int ch, bool *channelOn)
 Get the on/off state of a given channel. More...
 
NSCOPE_API ErrorType nScope_set_channel_gains (ScopeHandle nScope, double ch1Gain, double ch2Gain, double ch3Gain, double ch4Gain)
 Set the channel gains for all channels. More...
 
NSCOPE_API ErrorType nScope_get_channel_gains (ScopeHandle nScope, double *channelGains)
 Get the channel gains for all channels. More...
 
NSCOPE_API ErrorType nScope_set_ChX_gain (ScopeHandle nScope, int ch, double channelGain)
 Set a given channel's gain. More...
 
NSCOPE_API ErrorType nScope_get_ChX_gain (ScopeHandle nScope, int ch, double *channelGain)
 Get the gain of a given channel. More...
 
NSCOPE_API ErrorType nScope_set_channel_levels (ScopeHandle nScope, double ch1Level, double ch2Level, double ch3Level, double ch4Level)
 Set the channel levels for all channels. More...
 
NSCOPE_API ErrorType nScope_get_channel_levels (ScopeHandle nScope, double *channelLevels)
 Get the channel levels for all channels. More...
 
NSCOPE_API ErrorType nScope_set_ChX_level (ScopeHandle nScope, int ch, double channelLevel)
 Set a given channel's level. More...
 
NSCOPE_API ErrorType nScope_get_ChX_level (ScopeHandle nScope, int ch, double *channelLevel)
 Get the level of a given channel. More...
 

Documentation

contains function headers for controlling the nScope analog inputs

Function Documentation

NSCOPE_API ErrorType nScope_get_channel_gains ( ScopeHandle  nScope,
double *  channelGains 
)

Get the channel gains for all channels.

Returns
nScope ErrorType
Parameters
[in]nScopeScopeHandle object
[out]channelGainspointer to an array of doubles for retreiving the gain for each channel
NSCOPE_API ErrorType nScope_get_channel_levels ( ScopeHandle  nScope,
double *  channelLevels 
)

Get the channel levels for all channels.

Returns
nScope ErrorType
Parameters
[in]nScopeScopeHandle object
[out]channelLevelspointer to an array of doubles for retreiving the level for each channel
NSCOPE_API ErrorType nScope_get_channels_on ( ScopeHandle  nScope,
bool *  channelsOn 
)

Get the channel states (on/off) for all channels.

A true state means the channel is on and will sample if a request is sent

Returns
nScope ErrorType
Parameters
[in]nScopepointer to nScope handle
[out]channelsOnpointer to an array of booleans for retreiving the on state for each channel
NSCOPE_API ErrorType nScope_get_ChX_gain ( ScopeHandle  nScope,
int  ch,
double *  channelGain 
)

Get the gain of a given channel.

Returns
nScope ErrorType
Parameters
[in]nScopeScopeHandle object
[in]chchannel number to query
[out]channelGainpointer to double to store the channel gain
NSCOPE_API ErrorType nScope_get_ChX_level ( ScopeHandle  nScope,
int  ch,
double *  channelLevel 
)

Get the level of a given channel.

Returns
nScope ErrorType
Parameters
[in]nScopeScopeHandle object
[in]chchannel number to query
[out]channelLevelpointer to double to store the channel level
NSCOPE_API ErrorType nScope_get_ChX_on ( ScopeHandle  nScope,
int  ch,
bool *  channelOn 
)

Get the on/off state of a given channel.

Returns
nScope ErrorType
Parameters
[in]nScopeScopeHandle object
[in]chchannel number to query
[out]channelOnpointer to bool to store whether the channel is on or off
NSCOPE_API ErrorType nScope_get_num_channels_on ( ScopeHandle  nScope,
int *  numChannelsOn 
)

Get the number of channels currently on.

Returns
nScope ErrorType
Parameters
[in]nScopeScopeHandle
[out]numChannelsOnpointer to a variable for retreiving the number of channels on
NSCOPE_API ErrorType nScope_set_channel_gains ( ScopeHandle  nScope,
double  ch1Gain,
double  ch2Gain,
double  ch3Gain,
double  ch4Gain 
)

Set the channel gains for all channels.

A gain of 1 indicates

Returns
nScope ErrorType
Parameters
[in]nScopeScopeHandle object
[in]ch1Gainchannel 1 gain
[in]ch2Gainchannel 2 gain
[in]ch3Gainchannel 3 gain
[in]ch4Gainchannel 4 gain
NSCOPE_API ErrorType nScope_set_channel_levels ( ScopeHandle  nScope,
double  ch1Level,
double  ch2Level,
double  ch3Level,
double  ch4Level 
)

Set the channel levels for all channels.

Level means:

Returns
nScope ErrorType
Parameters
[in]nScopeScopeHandle object
[in]ch1Levelchannel 1 level
[in]ch2Levelchannel 2 level
[in]ch3Levelchannel 3 level
[in]ch4Levelchannel 4 level
NSCOPE_API ErrorType nScope_set_channels_on ( ScopeHandle  nScope,
bool  ch1on,
bool  ch2on,
bool  ch3on,
bool  ch4on 
)

Set the channel states (on/off) for all channels.

A true state means the channel is on and will sample if a request is sent

Returns
nScope ErrorType
Parameters
[in]nScopenScope handle
[in]ch1ontrue: turn channel 1 on, false: turn it off
[in]ch2ontrue: turn channel 2 on, false: turn it off
[in]ch3ontrue: turn channel 3 on, false: turn it off
[in]ch4ontrue: turn channel 4 on, false: turn it off
NSCOPE_API ErrorType nScope_set_ChX_gain ( ScopeHandle  nScope,
int  ch,
double  channelGain 
)

Set a given channel's gain.

Returns
nScope ErrorType
Parameters
[in]nScopeScopeHandle object
[in]chchannel number to set on or off
[in]channelGainthe desired gain of the channel
NSCOPE_API ErrorType nScope_set_ChX_level ( ScopeHandle  nScope,
int  ch,
double  channelLevel 
)

Set a given channel's level.

Returns
nScope ErrorType
Parameters
[in]nScopeScopeHandle object
[in]chchannel number to set on or off
[out]channelLevelthe desired level of the channel
NSCOPE_API ErrorType nScope_set_ChX_on ( ScopeHandle  nScope,
int  ch,
bool  channelOn 
)

Set a channel state on or off.

A true state means the channel is on and will sample if a request is sent

Returns
nScope ErrorType
Parameters
[in]nScopeScopeHandle object
[in]chchannel number to set on or off
[in]channelOntrue: turn the channel on, false: turn the channel off