Skip to content

Commit

Permalink
Merge branch 'release/1.8.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
nsoblath committed Jul 27, 2018
2 parents 6fe382f + bfff268 commit e874383
Show file tree
Hide file tree
Showing 43 changed files with 764 additions and 692 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ cmake_minimum_required (VERSION 3.1)

# Define the project
cmake_policy( SET CMP0048 NEW ) # version in project()
project( Psyllid VERSION 1.7.1 )
project( Psyllid VERSION 1.8.0 )

list( APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/midge/scarab/cmake )
include( PackageBuilder )
Expand Down
16 changes: 16 additions & 0 deletions documentation/server_api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,16 @@ Requests that the server lockout be disabled.
--------
Check that the server receives requests and sends replies. No other action is taken.

``set_condition``
-----------------
Cause the server to move to some defined state as quickly as possible; Psyllid implements conditions 10 and 12, both of which stop any ongoing run.
_Note:_ set_condition is expected to be a broadcast command (routing key target is `broadcast` not `<psyllid-queue>`).


*Payload*

- ``values=[condition (int)]`` -- the integer condition


Psyllid API
===========
Expand Down Expand Up @@ -314,3 +324,9 @@ Put in its deactivated state, in which it is not immediately ready to take data.
``quit-psyllid``
----------------
Instruct the Psyllid executable to exit.

<batch-command-key>
-------------------
All keys listed in the `batch-commands` node of the configuration are bound as command names and may be called.
These add one or more commands to the batch_executor queue; the return code indicates only that the actions were queued, nothing about their execution status.
The command `hard-abort` is defined in the default server_config to execute `stop-run`.
40 changes: 38 additions & 2 deletions documentation/validation_log.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,44 @@ Fixes:
* Fix 2
* Details

Log
---

Version 1.8.0
~~~~~~~~~~~~~~~~~~

Release Date: July 27, 2018
'''''''''''''''''''''''''''

New Features:
'''''''''''''

* ids in skip_buffer are written as true when event_builder switches from skipping to untriggered
* as before, if the capacity of the skip_buffer is greater than the capacity of the pretrigger_buffer only ids that don't fit into pretrigger_buffer are written out as true
* if the capacity of the skip_buffer is smaller than the capacity of the pretrigger_buffer all ids in the skip_buffer are written out as true
* tested by running psyllid with the egg3-reader and checking the logging output. No crash occured and the looging output showed that the correct number of ids were written.
* implementing support for both set_condition and batch actions:
* server_config now defines condition 10 and 12, both call the cmd 'hard-abort'
* server_config now defines a top-level node 'batch-commands' with an entry for 'hard-abort' which calls 'stop-run'
* request_receiver stores the above map (configurable in config file as top-level node 'set-conditions'); responds to set-condition commands by calling the mapped rks as an OP_CMD with empty message body
* this had a bug which is now fixed, it checked for the new name but populated by the old one
* batch_executor stores the batch-commands map (each entry in the node is an array of commands following the same syntax as those run when the system starts
* batch_executor's constructor binds request-receiver commands for each key in the above map to do_batch_cmd_request, which adds the configured array of actions to the batch queue. This is called as `agent cmd <queue>.<key>`.
* batch_executor's execute() method now has an infinite loop option which always tries to empty a concurrent_queue of actions (there are now utility methods plus the above which can populate that queue.
* run_server's thread execution logic changed to account for the above changes to batch_executor's execute()
* the 'batch-actions' top-level node name is changed to 'on-startup' to be more clear
* tested by running psyllid in insectarium and confirming execution of stop run both on `cmd broadcast.set_condition 0` and `cmd psyllid_queue.hard-abort`.
* updating scarab dependency to version v2.1.1
* tested by running psyllid in insectarium in batch mode
* adding condition_variable notice from daq_control to indicate to request_receiver and batch_executor when the nodes are ready
* tested by having batch executor use on-start commands that need to talk to nodes (this previously resulted in crashing)

Fixes:
''''''

* corrected compiler warnings related to use of '%u' vs '%lu' for long unsigned ints in testing
* modified tk_spline (external) spline::set_boundary to be inline (it was triggering gcc warnings because it is unused)


Version 1.7.1:
~~~~~~~~~~~~~~
Expand All @@ -56,8 +94,6 @@ Fixes
* Modified the Frequency Transform node to re-order FFTW output into ascending frequency order (should match Roach packet content order)
* Tested by making psyllid record and write a frequency mask from frequency data that it produced by reading and fourier-transforming the time series from an egg file. The content of the array is now ordered correctly. This was verified by comparing the mask to the gain variation calculated by Katydid.

Log
---

Version 1.7.0:
~~~~~~~~~~~~~~~~~
Expand Down
4 changes: 2 additions & 2 deletions external/tk_spline/tk_spline.hh
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public:
}

// optional, but if called it has to come be before set_points()
void set_boundary(bd_type left, double left_value,
inline void set_boundary(bd_type left, double left_value,
bd_type right, double right_value,
bool force_linear_extrapolation=false);
void set_points(const std::vector<double>& x,
Expand Down Expand Up @@ -268,7 +268,7 @@ std::vector<double> band_matrix::lu_solve(const std::vector<double>& b,
// spline implementation
// -----------------------

void spline::set_boundary(spline::bd_type left, double left_value,
inline void spline::set_boundary(spline::bd_type left, double left_value,
spline::bd_type right, double right_value,
bool force_linear_extrapolation)
{
Expand Down
2 changes: 1 addition & 1 deletion midge
18 changes: 9 additions & 9 deletions source/applications/grab_packet.cc
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,15 @@ int main( int argc, char** argv )
try
{
scarab::param_node t_default_config;
t_default_config.add( "n", new scarab::param_value( 1U ) );
t_default_config.add( "ip", new scarab::param_value( "127.0.0.1" ) );
t_default_config.add( "port", new scarab::param_value( 23530U ) );
t_default_config.add( "interface", new scarab::param_value( "eth1" ) );
t_default_config.add( "timeout", new scarab::param_value( 10U ) );
t_default_config.add( "max-packet-size", new scarab::param_value( 16384U ) );
t_default_config.add( "packet-type", new scarab::param_value( "roach" ) );

scarab::configurator t_configurator( argc, argv, &t_default_config );
t_default_config.add( "n", scarab::param_value( 1U ) );
t_default_config.add( "ip", scarab::param_value( "127.0.0.1" ) );
t_default_config.add( "port", scarab::param_value( 23530U ) );
t_default_config.add( "interface", scarab::param_value( "eth1" ) );
t_default_config.add( "timeout", scarab::param_value( 10U ) );
t_default_config.add( "max-packet-size", scarab::param_value( 16384U ) );
t_default_config.add( "packet-type", scarab::param_value( "roach" ) );

scarab::configurator t_configurator( argc, argv, t_default_config );

unsigned t_n_packets( t_configurator.get< unsigned >( "n" ) );
std::string t_ip( t_configurator.get< std::string >( "ip" ) );
Expand Down
2 changes: 1 addition & 1 deletion source/applications/psyllid.cc
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ int main( int argc, char** argv )
try
{
server_config t_sc;
scarab::configurator t_configurator( argc, argv, &t_sc );
scarab::configurator t_configurator( argc, argv, t_sc );
//scarab::global_config::get_instance()->set_config( t_configurator.config() );

// Run the server
Expand Down
8 changes: 4 additions & 4 deletions source/applications/roach_daq_streaming_1chan.cc
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@ int main( int argc, char** argv )
try
{
scarab::param_node t_default_config;
t_default_config.add( "ip", new scarab::param_value( "127.0.0.1" ) );
t_default_config.add( "port", new scarab::param_value( 23530 ) );
t_default_config.add( "interface", new scarab::param_value( "eth1" ) );
t_default_config.add( "ip", scarab::param_value( "127.0.0.1" ) );
t_default_config.add( "port", scarab::param_value( 23530 ) );
t_default_config.add( "interface", scarab::param_value( "eth1" ) );

scarab::configurator t_configurator( argc, argv, &t_default_config );
scarab::configurator t_configurator( argc, argv, t_default_config );

std::string t_ip( t_configurator.get< std::string >( "ip" ) );
unsigned t_port = t_configurator.get< unsigned >( "port" );
Expand Down
Loading

0 comments on commit e874383

Please sign in to comment.