Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

which returns standard EPICS codes for status and severity plus time of the most recent change of the PV status or value. Time will be set to 0 (UNIX epoch time) when its value is unknown, typically at the beginning of job and may be few first events.

Updating Event Data

User modules can not only read data from event object but also add more data to it. This can be used to exchange information between modules when one module produces some data and another modules use it to calculate their results.

To add data to event one can use Event::put method which accepts smart pointer to the data object and optional source address and string key. There are two overloaded methods in this case:

  • void put(const shared_ptr<T>& data, const std::string& key=std::string())
    Adds object to the event without source address, can be used for generic non-device-specific data such as EventId.
  • void put(const shared_ptr<T>& data, const Pds::Src& source, const std::string& key=std::string())
    Add object and specify its source address, should be used for detector/device-specific data.

Both methods take optional string key which should be used to distinguish different "versions" of the same data such as data after calibration.

Here is an example code which adds one new object:

Code Block

    shared_ptr<Image> img(new Image(...));
    evt.put(img, src, "filtered");