Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Info
titleEngine Compatibility

This library has not yet been ported to the New Pico Engine


The event library provides functions for understanding an event and the environment in which it was raised as well as actions for sending events.

...

Code Block
languagejavascript
themeConfluence
rule update_vehicle_data {
  select when fuse updated_vehicle
  pre {
    vid = event:attr("vehicleId");
	keyvalue = event:attr("keyvalue");
    vehicle_info = event:attr("value").decode();
  }
  {send_directive("Updated vehicle data for #{keyvalue} in fleet") with
     id = vid and
     values = vehicle_info and
	 keyvalue = keyvalue and
	 namespace = carvoyant_namespace;
  }
  always {
    set ent:fleet{[keyvalue, vid]} vehicle_info
  }
}

...


Scheduled Event Functions

...