diff --git a/README.md b/README.md index d700e9d95b94a3be8829e64fac5e3329740ea871..affa7c9effc9db25f292005f7162ed55b5723bfd 100644 --- a/README.md +++ b/README.md @@ -37,8 +37,13 @@ The daemon caches the data and waits until one of three conditions are met to se - A measurement with different data for a known measurement id is received If one of these conditions is met, the data is sent to the kernel module via the `data_t` struct that is defined in [`common/include/measurement.h`](common/include/measurement.h). -It contains a field for the pre-defined sender id, the count of measurements and the measurements themselves. +It contains a field for the pre-defined sender id, the count of measurements and a pointer to an array that holds the measurements. The sent data contains the latest received measurements for each measurement id. ### Kernel module +To receive data from the userspace, the kernel creates a character device under `/dev/sibyl` where the userspace daemon writes the data to. +The data that is written to the character device is a pointer to a `data_t` struct, on write the kernel copies the data the pointer points to into kernel space. + +When `data_t` is copied, it checkes if the pointer to the measurements array is not `NULL` and the count of measurements in `data_t` is not zero. +If both applies, it also copies the data from the array pointer to the kernel space.