cronologic-de / xhptdc8_babel

Wrappers, Utilities and Examples for using the xHPTDC8 with various programming languages.
Mozilla Public License 2.0
0 stars 1 forks source link

User Guide fixes #23

Closed Bassem-Ramzy closed 3 years ago

Bassem-Ramzy commented 3 years ago
  1. Sets up the standard parameters. Gets a set of default parameters for xhptdc8_init(). This must always be used to initialize the xhptdc8_init_parameter() structure.

to be

Sets up the standard parameters. Gets a set of default parameters for xhptdc8_init(). This must always be used to initialize the xhptdc8_manager_init_parameters structure.

Also, setting xhptdc8_manager_init_parameters to have a hyperlink to the structure in the document.

Bassem-Ramzy commented 3 years ago
  1. Opens and initializes the xHPTDC8 board with the given index.

No index is given. Could be

Opens and initializes the xHPTDC8 board with the index given in init->card_index.

Bassem-Ramzy commented 3 years ago

xhptdc8_manager xhptdc8_init(xhptdc8_manager_init_parameters params, int *error_code, char **error_message)

While in interface.h is defined of a different return type

XHPTDC8_API void xhptdc8_init(xhptdc8_manager p_hMgr, xhptdc8_manager_init_parameters params, int *error_code, const char** error_message);

Bassem-Ramzy commented 3 years ago

4.

XHPTDC8_API const char* xhptdc8_device_state_to_str(int state);

Is missing in the user guide

Suggested summary

Returns the state, corresponding to state code 'state', in string format
Bassem-Ramzy commented 3 years ago

5.

The number of potential trigger sources for the timing generators. One for each TDC input plus some specials. See Section 4.5.4 for details.

Section is 4.5.4 Structure xhptdc8_tiger_block

It should be

The number of potential trigger sources for the timing generators. One for each TDC input plus some specials. See Section 4.5.3 for details.

Bassem-Ramzy commented 3 years ago

6.

For the other boards the channel number is incremented by board_id. 10

The channel A of a board has channel number board_id.10

It's not clear what is meant by board_id. 10

Bassem-Ramzy commented 3 years ago

7.

For the forst in the system this

Apparently forst needs to be translated or replaced.

Bassem-Ramzy commented 3 years ago

If the group is to large for the buffer the remaining

To be

If the group is too large for the buffer the remaining

Bassem-Ramzy commented 3 years ago

9.

Returns 8.

Since it's a variable and not a function that returns value, it could be:

It's currently fixed at 8.

Bassem-Ramzy commented 3 years ago

10.

Get information on clocking configuration an status.

to be

Get information on clocking configuration and status.

Bassem-Ramzy commented 3 years ago

11.

const char* xhptdc8_get_last_error_message(xhptdc8_manager hMgr)

Should the following function also be defined in the user guide?

const char* xhptdc8_get_last_error_message(xhptdc8_manager hMgr, int index)
Bassem-Ramzy commented 3 years ago

12.

Need to write brief description about the structure:

Bassem-Ramzy commented 3 years ago

13.

See section 3.3 for additional information. int mode

Should be

See section 3.3 for additional information. int mode

Bassem-Ramzy commented 3 years ago

14.

In multiples of 20 ns/3 = 6,6 ns

Should be

In multiples of 20 ns/3 = 6.6 ns

Bassem-Ramzy commented 3 years ago

15.

the gating blocks and the TiGer are more flexibel.

to be

the gating blocks and the TiGer are more flexible.

Bassem-Ramzy commented 3 years ago

16.

xhptdc8_adc_channel is still missing

Bassem-Ramzy commented 3 years ago

17.

In the user guide:

#define XHPTDC8_VETO_OFF 0
#define XHPTDC8_VETO_INSIDE 1
#define XHPTDC8_VETO_OUTSIDE 2

while in code:

#define XHPTDC8_GROUPING_VETO_OFF 0
#define XHPTDC8_GROUPING_VETO_INSIDE 1
#define XHPTDC8_GROUPING_VETO_OUTSIDE 2

I believe that the code is more meaningful and allows for differentiation from any other future "vetoes".

Bassem-Ramzy commented 3 years ago

18.

There are two parameters M = trigger_period and N = random_exponent

to be ?

There are two parameters M = auto_trigger_period and N = auto_trigger_random_exponent

Bassem-Ramzy commented 3 years ago

19.

Unification of configure:

xhptdc8_trigger xhptdc8_trigger[XHPTDC8_TRIGGER_COUNT] Configures the polarity of the external trigger sources. These are used as inputs for the TiGer blocks and as inputs to the time measurement unit. xhptdc8_tiger_block xhptdc8_tiger_block[XHPTDC8_TIGER_COUNT] Configuration of the timing generators (TiGer). xhptdc8_tiger_block xhptdc8_gating_block[XHPTDC8_GATE_COUNT] Configuration of the gating blocks. xhptdc8_channel xhptdc8_channel[XHPTDC8_CHANNEL_COUNT] Configure the TDC channels.

My recommendation is to use a noun Configuration in all, as it describes the member variable, rather than using a verb, as the variable does no action.

Bassem-Ramzy commented 3 years ago

20.

crono_bool_t alignment_source

Should be:

int alignment_source

to comply with XHPTDC8_ALIGN_RESERVED = 2

Also, additional information from the code might be useful if still valid:

If set to XHPTDC8_ALIGN_TIGER use TiGeR pulse for alignment (pulses are present on LEMO inputs during alignment).
If set to XHPTDC8_ALIGN_PIN use internal alignment pins for alignment (no pulses are present on LEMO inputs during alignment).
If set to XHPTDC8_ALIGN_RESERVED use internal alignment pins for alignment and do not disable after alignment (internal use only).
sulimma commented 3 years ago

You are good at detecting broken details. Thank you. I fixed it all in the user guide.