#include "../common/common_defs.h"
#include "../common/board_commons.h"
Go to the source code of this file.
Data Structures | |
| struct | N1568_data |
| N1568 board data structure. More... | |
| struct | N1568_channel_status |
| N1568 channel status structure. More... | |
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. | |
Definition in file N1568.h.
| enum _N1568_COMMANDS |
The board commands.
Provides an entry for supported command: keep synched with cmd_table N1568_CMD_TABLE[ ]
| DLL_API BOOL N1568_close | ( | N1568_data * | p_data | ) |
N1568 boards closing and resource free.
Provides specific handling for N1568 boards closing.
| p_data | Pointer to board data |
Definition at line 155 of file N1568.c.
References board_close(), FALSE, N1568_data::m_common_data, N1568_data::m_p_asw_buff, N1568_data::m_p_tmp_asw_buff, and TRUE.
| DLL_API BOOL N1568_export | ( | N1568_data * | p_data | ) |
This command allows to copy settings from Ch0 to all other channels.
| p_data | Pointer to board data |
Definition at line 344 of file N1568.c.
References FALSE, N1568_data::m_asw_buff_len, N1568_data::m_common_data, N1568_data::m_p_asw_buff, N1568_CMD_EXP, receive_buffer(), send_cmd(), and TRUE.
| DLL_API const char* N1568_get_last_answer | ( | N1568_data * | p_data | ) |
Get the answer to the last successfull sent command.
| p_data | Pointer to board data |
Definition at line 183 of file N1568.c.
References N1568_data::m_asw_buff_len, N1568_data::m_p_asw_buff, and N1568_data::m_p_tmp_asw_buff.
| DLL_API BOOL N1568_open | ( | N1568_data * | p_data, | |
| const char * | com_str | |||
| ) |
N1568 boards data initialization.
Provides specific handling for N1568 boards opening.
| p_data | Pointer to board data | |
| com_str | The serial communication device string to open e.g COM1.. COM# for Windows or /dev/ttyS0.. /dev/ttyS# or /dev/ttyUSB0.. /dev/ttyUSB# for Linux |
Definition at line 113 of file N1568.c.
References board_open(), FALSE, N1568_data::m_asw_buff_len, N1568_data::m_common_data, N1568_data::m_p_asw_buff, N1568_data::m_p_tmp_asw_buff, and TRUE.
| 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.
| 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) |
Definition at line 203 of file N1568.c.
References FALSE, N1568_data::m_asw_buff_len, N1568_data::m_common_data, N1568_data::m_p_asw_buff, receive_buffer(), send_cmd(), and TRUE.
Referenced by N1568_set_cfd_out_width(), N1568_set_channel(), N1568_set_coarse_gain(), N1568_set_discr_thr(), N1568_set_fine_gain(), N1568_set_gain_of_timing(), N1568_set_input_polarity(), N1568_set_pole_zero_adj(), N1568_set_shape(), and N1568_set_stretcher().
| 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.
| 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) |
Definition at line 336 of file N1568.c.
References N1568_CMD_CFW, and N1568_send_cmd().
| DLL_API 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
| 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) |
Definition at line 264 of file N1568.c.
References N1568_CMD_CH, and N1568_send_cmd().
| 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.
| 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) |
Definition at line 304 of file N1568.c.
References N1568_CMD_CG, and N1568_send_cmd().
| 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.
| 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) |
Definition at line 312 of file N1568.c.
References N1568_CMD_CF_TH, and N1568_send_cmd().
| 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.
| 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) |
Definition at line 296 of file N1568.c.
References N1568_CMD_FG, and N1568_send_cmd().
| 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.
| 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) |
Definition at line 320 of file N1568.c.
References N1568_CMD_CGT, and N1568_send_cmd().
| 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.
| 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) |
Definition at line 272 of file N1568.c.
References N1568_CMD_IN, and N1568_send_cmd().
| DLL_API BOOL N1568_set_module | ( | N1568_data * | p_data, | |
| UINT8 | value | |||
| ) |
Set the current module.
Any other command will direct to this module
| p_data | Pointer to board data | |
| value | The module id: valid values are [0..16]. 16 is the broadcast module. |
Definition at line 241 of file N1568.c.
References FALSE, N1568_data::m_asw_buff_len, N1568_data::m_common_data, N1568_data::m_p_asw_buff, N1568_CMD_MOD, receive_buffer(), send_cmd(), and TRUE.
| 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.
| 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) |
Definition at line 288 of file N1568.c.
References N1568_CMD_PZ, and N1568_send_cmd().
| 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.
| 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) |
Definition at line 280 of file N1568.c.
References N1568_CMD_SH, and N1568_send_cmd().
| 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.
| 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) |
Definition at line 328 of file N1568.c.
References N1568_CMD_STR, and N1568_send_cmd().
| DLL_API const char* N1568_SW_rev | ( | void | ) |
1.5.6