Joule Modules
Bases: ReaderModule
Read data in from a file or a named pipe. Optionally add timestamps to data (note, this should only be used for real time sources. The 8us difference in example below is the actual time taken to read the file line)
Example
Inputs:
--None--
Outputs:
| name | datatype | elements |
|---|---|---|
| output | float32 | N auto detected from input source |
Data Stream Configs:
/etc/joule/data_stream_configs/output.conf
[Main]
name = File Data
path = /path/to/output
datatype = float32
keep = 1w
# [width] number of elements
[Element1]
name = Data Column 1
[Element2]
name = Data Column 2
#additional elements...
Module Config:
/etc/joule/module_configs/file_reader.conf
[Main]
name = Random Reader
exec_cmd = /opt/joule/bin/joule-file-reader
[Arguments]
timestamps = yes
file = /absolute/file/path
[Outputs]
output = /path/to/output
Bases: ReaderModule
This is a module that generates random numbers. Specify width (number of elements) and the rate in Hz.
Arguments:
| Name | Description |
|---|---|
| width | number of elements |
| rate | data rate in Hz |
Inputs:
--None--
Outputs:
| name | datatype | elements |
|---|---|---|
| output | float32 | N specified by width argument |
Example Data Stream Configs
/etc/joule/data_stream_configs/output.conf
[Main]
name = Random Data
path = /path/to/output
datatype = float32
keep = 1w
# [width] number of elements
[Element1]
name = Random Set 1
[Element2]
name = Random Set 2
#additional elements...
Example Module Config:
/etc/joule/module_configs/random_reader.conf
[Main]
name = Random Reader
exec_cmd = /opt/joule/bin/joule-random-reader
[Arguments]
# number of elements
width = 4
# data rate in Hz
rate = 10
[Outputs]
output = /path/to/output
Bases: FIRFilterModule
Apply a moving average to the input stream with an adjustable window size
Arguments:
| Name | Description |
|---|---|
| window | samples to average, must be odd |
Inputs:
| name | datatype | elements |
|---|---|---|
| input | any | N |
Outputs:
| name | datatype | elements |
|---|---|---|
| output | float32 | N |
Example Data Stream Configs:
/etc/joule/data_stream_configs/input.conf
[Main]
name = Raw Data
path = /path/to/input
datatype = int32
keep = 1w
[Element1]
name = Element 1
[Element2]
name = Element 2
#additional elements...
/etc/joule/data_stream_configs/output.conf
[Main]
name = Filtered Data
path = /path/to/output
datatype = float32
keep = 1w
#same number of elements as input
[Element1]
name = Element 1
[Element2]
name = Element 2
#additional elements...
Example Module Config:
/etc/joule/module_configs/mean_filter.conf
[Main]
name = Mean Filter
exec_cmd = /opt/joule/bin/joule-mean-filter
[Arguments]
# must be odd
window = 11
[Inputs]
input = /path/to/input
[Outputs]
output = /path/to/output