Generic sensors select function.
Returns all sensors in allocatable array sensors
. If argument
node_id
is passed, returns only sensors of this node.
The function returns the following error codes:
E_ALLOC
if memory allocation failed.E_DB_NO_ROWS
if no rows are returned.E_DB_PREPARE
if statement preparation failed.E_DB_TYPE
if returned columns are unexpected.E_INVALID
if node id is empty.Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(db_type), | intent(inout) | :: | db |
Database type. |
||
type(sensor_type), | intent(out), | allocatable | :: | sensors(:) |
Returned sensor data array. |
|
character(len=*), | intent(in), | optional | :: | node_id |
Node id. |
|
integer(kind=i8), | intent(out), | optional | :: | nsensors |
Number of returned sensors. |
Iterator function that returns all sensors in sensor
. The
statement db_stmt
must be finalised once finished.
The function returns the following error codes:
E_DB_NO_ROWS
if no rows are returned.E_DB_PREPARE
if statement preparation failed.E_DB_TYPE
if returned columns are unexpected.E_INVALID
if node id is empty.Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(db_type), | intent(inout) | :: | db |
Database type. |
||
type(db_stmt_type), | intent(inout) | :: | db_stmt |
Database statement type. |
||
type(sensor_type), | intent(out) | :: | sensor |
Returned sensor data. |
||
character(len=*), | intent(in), | optional | :: | node_id |
Node id. |