Skip to main content

pamoja_controller_evaluate

Function pamoja_controller_evaluate 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn pamoja_controller_evaluate( controller: *mut PamojaController, reading: f32, out_reaction: *mut PamojaReaction, ) -> PamojaStatus
Expand description

Decides what one reading calls for.

§Arguments

  • controller - the decision logic.
  • reading - the reading to evaluate.
  • out_reaction - receives the decision.

§Returns

PamojaStatus::Ok on success, or PamojaStatus::InvalidArgument if either pointer is null.

§Safety

controller must be a live handle from a call that produced one, and out_reaction must be writable.