It could be very useful if a user could easily configure fanuc-driver to collect one or more parameters (using rdparam) from machine.
It’d be nice if the user could:
- provide a name for this dynamic collector;
- provide a structure of the returned data:
- this would be more useful when multiple parameters would be watched in a single collector;
- order of
parameter_id items and data_type items must match;
- in
format, one would use $1 to get the value of the first (0th) parameter value, $2 the second one, etc;
- when
format is not defined:
- for single parameter,
fanuc-driver would return {$collector_name: $1};
- for multiple parameters,
fanuc-driver would return {$collector_name: [$1, $2, ...]};
For example, the configuration could look something like this:
# Single parameter: configuration
some_collector_name:
parameter_id: 1234
data_type: string # 'string' | 'number' | 'boolean' and possibly some others
# Multiple parameters: configuration
another_collector_name:
parameter_id:
- 1234
- 4321
data_type: # 'string' | 'number' | 'boolean' and possibly some others
- string
- number
format: '{"some_name": $1, "another_name": $2}'
Example of the returned data:
// Single parameter
{
some_collector_name: 'some_value'
}
// Multiple parameters
{
another_collector_name: {
some_name: 'some_value',
another_name: 4543
}
}
It could be very useful if a user could easily configure
fanuc-driverto collect one or more parameters (usingrdparam) from machine.It’d be nice if the user could:
parameter_iditems anddata_typeitems must match;format, one would use$1to get the value of the first (0th) parameter value,$2the second one, etc;formatis not defined:fanuc-driverwould return{$collector_name: $1};fanuc-driverwould return{$collector_name: [$1, $2, ...]};For example, the configuration could look something like this:
Example of the returned data: