N1568.h File Reference

N1568 board definitions. More...

#include "../common/common_defs.h"
#include "../common/board_commons.h"

Go to the source code of this file.

Classes

struct  N1568_data
 N1568 board data structure. More...
struct  N1568_channel_status
 N1568 channel status structure. More...

Defines

#define ASW_BUFF_SIZE   2048

Typedefs

typedef enum _N1568_COMMANDS N1568_COMMANDS

Enumerations

enum  _N1568_COMMANDS {
  N1568_CMD_MOD = 0, N1568_CMD_CH, N1568_CMD_CF_TH, N1568_CMD_CFW,
  N1568_CMD_PZ, N1568_CMD_FG, N1568_CMD_CG, N1568_CMD_SH,
  N1568_CMD_CGT, N1568_CMD_IN, N1568_CMD_STR, N1568_CMD_EXP
}
 The board commands. More...

Functions

DLL_API BOOL N1568_open (N1568_data *p_data, const char *com_str)
 N1568 boards data initialization.
DLL_API BOOL N1568_close (N1568_data *p_data)
 N1568 boards closing and resource free.
DLL_API const char * N1568_get_last_answer (N1568_data *p_data)
 Get the answer to the last successfull sent command.
DLL_API BOOL N1568_send_cmd (N1568_data *p_data, N1568_COMMANDS cmd, UINT8 value, N1568_channel_status *channel_status)
 Sends the command to the current channel and gets the channel status.
DLL_API BOOL N1568_set_module (N1568_data *p_data, UINT8 value)
 Set the current module.
DLL_API BOOL N1568_set_channel (N1568_data *p_data, UINT8 value, N1568_channel_status *channel_status)
 Set the current channel id.
DLL_API BOOL N1568_set_input_polarity (N1568_data *p_data, BOOL negative_polarity, N1568_channel_status *channel_status)
 Set the input polarity for the current channel.
DLL_API BOOL N1568_set_shape (N1568_data *p_data, UINT8 value, N1568_channel_status *channel_status)
 Set the shaping time for the current channel.
DLL_API BOOL N1568_set_pole_zero_adj (N1568_data *p_data, UINT8 value, N1568_channel_status *channel_status)
 Set the pole zero adjust value for the current channel.
DLL_API BOOL N1568_set_fine_gain (N1568_data *p_data, UINT8 value, N1568_channel_status *channel_status)
 Set the fine gain value for the current channel.
DLL_API BOOL N1568_set_coarse_gain (N1568_data *p_data, UINT8 value, N1568_channel_status *channel_status)
 Set the coarse gain value for the current channel.
DLL_API BOOL N1568_set_discr_thr (N1568_data *p_data, UINT8 value, N1568_channel_status *channel_status)
 Set the discriminator threshold value for the current channel.
DLL_API BOOL N1568_set_gain_of_timing (N1568_data *p_data, UINT8 value, N1568_channel_status *channel_status)
 Set the gain of the timing section value for the current channel.
DLL_API BOOL N1568_set_stretcher (N1568_data *p_data, BOOL enable, N1568_channel_status *channel_status)
 Enable/Disable the stretcher for the current channel.
DLL_API BOOL N1568_set_cfd_out_width (N1568_data *p_data, UINT8 value, N1568_channel_status *channel_status)
 Set the CFD30% Out Width value for the current channel.
DLL_API BOOL N1568_export (N1568_data *p_data)
 This command allows to copy settings from Ch0 to all other channels.
DLL_API const char * N1568_SW_rev (void)
 Returns the SDK software release.


Detailed Description

N1568 board definitions.

Author:
NDA
Version:
1.0
Date:
09/2008
Provides methods, properties and defines to handle N1568 boards

Definition in file N1568.h.


Define Documentation

#define ASW_BUFF_SIZE   2048

Definition at line 24 of file N1568.h.

Referenced by N1568DemoFrame::DoDirectCmdSend(), and N1568DemoFrame::OnMenuToolsDownload().


Typedef Documentation


Enumeration Type Documentation

The board commands.

Provides an entry for supported command: keep synched with cmd_table N1568_CMD_TABLE[ ]

Enumerator:
N1568_CMD_MOD  Set module command.
N1568_CMD_CH  Set channel command.
N1568_CMD_CF_TH  Discriminator threshold command.
N1568_CMD_CFW  CFD30% Out Width command.
N1568_CMD_PZ  Pole Zero Adjust command.
N1568_CMD_FG  Fine Gain setting command.
N1568_CMD_CG  Coarse Gain setting command.
N1568_CMD_SH  Shape setting command.
N1568_CMD_CGT  Gain of Timing section command.
N1568_CMD_IN  Input polarity setting command.
N1568_CMD_STR  Stretcher enable command.
N1568_CMD_EXP  Export command.

Definition at line 75 of file N1568.h.


Function Documentation

BOOL N1568_close ( N1568_data p_data  ) 

N1568 boards closing and resource free.

Provides specific handling for N1568 boards closing.

Parameters:
p_data Pointer to board data
Returns:
TRUE: board successfully closed
Note:
Must be called when done with any other board specific API.

Referenced by N1568DemoFrame::ConnectToDevice().

BOOL N1568_export ( N1568_data p_data  ) 

This command allows to copy settings from Ch0 to all other channels.

Parameters:
p_data Pointer to board data
Returns:
TRUE: operation successfully completed

Referenced by N1568DemoFrame::DoExport().

const char * N1568_get_last_answer ( N1568_data p_data  ) 

Get the answer to the last successfull sent command.

Parameters:
p_data Pointer to board data
Returns:
The answer buffer

Referenced by N1568DemoFrame::DoDirectCmdSend(), N1568DemoFrame::DoExport(), N1568DemoFrame::DoSetMuxOut(), N1568DemoFrame::OnMenuToolsDownload(), ChannelPanelImpl::OnWriteClicked(), ChannelPanelImpl::ReadFromBoard(), and N1568DemoFrame::SetModuleAddress().

BOOL N1568_open ( N1568_data p_data,
const char *  com_str 
)

N1568 boards data initialization.

Provides specific handling for N1568 boards opening.

Parameters:
p_data Pointer to board data
com_str The serial comunication device string to open e.g COM1.. COM# for Windows or /dev/ttyS0.. /dev/ttyS# or /dev/ttyUSB0.. /dev/ttyUSB# for Linux
Returns:
TRUE: board successfully opened
Note:
Must be called before any other board specific API.

Referenced by N1568DemoFrame::ConnectToDevice().

BOOL N1568_send_cmd ( N1568_data p_data,
N1568_COMMANDS  cmd,
UINT8  value,
N1568_channel_status channel_status 
)

Sends the command to the current channel and gets the channel status.

Parameters:
p_data Pointer to board data
cmd The command id
value The command value
channel_status The channels status after the command execution. This parameter may be NULL (no channel status returned)
Returns:
TRUE: operation successfully completed

BOOL N1568_set_cfd_out_width ( N1568_data p_data,
UINT8  value,
N1568_channel_status channel_status 
)

Set the CFD30% Out Width value for the current channel.

Parameters:
p_data Pointer to board data
value The desired CFD30% Out Width value
channel_status The channels status after the command execution. This parameter may be NULL (no channel status returned)
Returns:
TRUE: operation successfully completed

Referenced by ChannelPanelImpl::OnWriteClicked().

BOOL N1568_set_channel ( N1568_data p_data,
UINT8  value,
N1568_channel_status channel_status 
)

Set the current channel id.

Any other command will direct to this channel

Parameters:
p_data Pointer to board data
value The channel id: valid values are [0..15]
channel_status The channels status after the command execution. This parameter may be NULL (no channel status returned)
Returns:
TRUE: operation successfully completed

Referenced by N1568DemoFrame::DoSetMuxOut(), ChannelPanelImpl::OnWriteClicked(), and ChannelPanelImpl::ReadFromBoard().

BOOL N1568_set_coarse_gain ( N1568_data p_data,
UINT8  value,
N1568_channel_status channel_status 
)

Set the coarse gain value for the current channel.

Parameters:
p_data Pointer to board data
value The desired coarse gain value
channel_status The channels status after the command execution. This parameter may be NULL (no channel status returned)
Returns:
TRUE: operation successfully completed

Referenced by ChannelPanelImpl::OnWriteClicked().

BOOL N1568_set_discr_thr ( N1568_data p_data,
UINT8  value,
N1568_channel_status channel_status 
)

Set the discriminator threshold value for the current channel.

Parameters:
p_data Pointer to board data
value The desired discriminator threshold value
channel_status The channels status after the command execution. This parameter may be NULL (no channel status returned)
Returns:
TRUE: operation successfully completed

Referenced by ChannelPanelImpl::OnWriteClicked().

BOOL N1568_set_fine_gain ( N1568_data p_data,
UINT8  value,
N1568_channel_status channel_status 
)

Set the fine gain value for the current channel.

Parameters:
p_data Pointer to board data
value The desired fine gain value
channel_status The channels status after the command execution. This parameter may be NULL (no channel status returned)
Returns:
TRUE: operation successfully completed

Referenced by ChannelPanelImpl::OnWriteClicked().

BOOL N1568_set_gain_of_timing ( N1568_data p_data,
UINT8  value,
N1568_channel_status channel_status 
)

Set the gain of the timing section value for the current channel.

Parameters:
p_data Pointer to board data
value The desired gain of the timing section value
channel_status The channels status after the command execution. This parameter may be NULL (no channel status returned)
Returns:
TRUE: operation successfully completed

Referenced by ChannelPanelImpl::OnWriteClicked().

BOOL N1568_set_input_polarity ( N1568_data p_data,
BOOL  negative_polarity,
N1568_channel_status channel_status 
)

Set the input polarity for the current channel.

Parameters:
p_data Pointer to board data
negative_polarity The desired input polarity: Set to TRUE for negative input polarity
channel_status The channels status after the command execution. This parameter may be NULL (no channel status returned)
Returns:
TRUE: operation successfully completed

Referenced by ChannelPanelImpl::OnWriteClicked().

BOOL N1568_set_module ( N1568_data p_data,
UINT8  value 
)

Set the current module.

Any other command will direct to this module

Parameters:
p_data Pointer to board data
value The module id: valid values are [0..16]. 16 is the broadcast module.
Returns:
TRUE: operation successfully completed

Referenced by N1568DemoFrame::SetModuleAddress().

BOOL N1568_set_pole_zero_adj ( N1568_data p_data,
UINT8  value,
N1568_channel_status channel_status 
)

Set the pole zero adjust value for the current channel.

Parameters:
p_data Pointer to board data
value The desired pole zero adjust value
channel_status The channels status after the command execution. This parameter may be NULL (no channel status returned)
Returns:
TRUE: operation successfully completed

Referenced by ChannelPanelImpl::OnWriteClicked().

BOOL N1568_set_shape ( N1568_data p_data,
UINT8  value,
N1568_channel_status channel_status 
)

Set the shaping time for the current channel.

Parameters:
p_data Pointer to board data
value The desired shaping time
channel_status The channels status after the command execution. This parameter may be NULL (no channel status returned)
Returns:
TRUE: operation successfully completed

Referenced by ChannelPanelImpl::OnWriteClicked().

BOOL N1568_set_stretcher ( N1568_data p_data,
BOOL  enable,
N1568_channel_status channel_status 
)

Enable/Disable the stretcher for the current channel.

Parameters:
p_data Pointer to board data
enable Set to TRUE to enable the stretcher
channel_status The channels status after the command execution. This parameter may be NULL (no channel status returned)
Returns:
TRUE: operation successfully completed

Referenced by ChannelPanelImpl::OnWriteClicked().

const char * N1568_SW_rev ( void   ) 

Returns the SDK software release.

Returns:
const char*: The SDK revision string

Referenced by N1568DemoFrame::OnAbout().


Generated on Mon Oct 6 09:29:16 2008 for CAEN N1568 Demo by  doxygen 1.5.6