Skip to content
Snippets Groups Projects
Commit 680d335a authored by Jonathan Hanks's avatar Jonathan Hanks
Browse files

Merge branch 'check_dcuids' into 'master'

Closes #98.  Check for dcuids that are not normal and abort.

Closes #98

See merge request cds/advligorts!82
parents 4b7d14a4 c901a864
No related branches found
No related tags found
1 merge request!82Closes #98. Check for dcuids that are not normal and abort.
......@@ -22,6 +22,9 @@ namespace comm_impl
int i, j, k, offs;
int rm_offs = 0;
auto skip_checks =
daqd.parameters( ).get< bool >( "allow_any_dcuid", false );
// Configure channels from files
if ( daqd.configure_channels_files( ) )
exit( 1 );
......@@ -37,6 +40,17 @@ namespace comm_impl
else
t = cur_dcu != -1 && cur_dcu != daqd.channels[ i ].dcu_id;
if ( cur_dcu >= 0 && !skip_checks )
{
if ( !IS_TP_DCU( cur_dcu ) && !IS_MYRINET_DCU( cur_dcu ) )
{
std::cerr
<< "requested DCUID not in the standard range: "
<< cur_dcu << std::endl;
exit( 1 );
}
}
if ( IS_TP_DCU( daqd.channels[ i ].dcu_id ) && t )
{
// Remember the offset to start of TP/EXC DCU data
......
......@@ -476,18 +476,6 @@ chanConfigCallback( char* channel_name, struct CHAN_PARAM* params, void* user )
if ( IS_GDS_SIGNAL( *ccd ) )
daqd.num_gds_channels++;
}
if ( IS_EPICS_DCU( ccd->dcu_id ) )
{
daqd.num_epics_channels++;
if ( ccd->data_type != DAQ_DATATYPE_FLOAT )
{
system_log( 1,
"EDCU channel `%s' has unsupported data type %d",
ccd->name,
ccd->data_type );
return 0;
}
}
// assign conversion data
ccd->signal_gain = params->gain;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment