Generic sensors select function.
Returns all sensors in allocatable array sensors
.
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.Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(db_type), | intent(inout) | :: | db |
Database type. |
||
type(sensor_type), | intent(out), | allocatable | :: | sensors(:) |
Returned sensor data array. |
|
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.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. |
Returns all sensors of node node_id
in allocatable array sensors
.
The function returns the following error codes:
E_ALLOC
if memory allocation failed.E_INVALID
if node id is empty.E_DB_BIND
if value binding failed.E_DB_FINALIZE
if statement finalisation 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.Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(db_type), | intent(inout) | :: | db |
Database type. |
||
character(len=*), | intent(in) | :: | node_id |
Node id. |
||
type(sensor_type), | intent(out), | allocatable | :: | sensors(:) |
Returned sensor data array. |
|
integer(kind=i8), | intent(out), | optional | :: | nsensors |
Number of returned sensors. |
Iterator function that returns all sensors of node node_id
in
sensor
. The statement db_stmt
must be finalised once finished.
The function returns the following error codes:
E_INVALID
if node id is empty.E_DB_BIND
if value binding 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.Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(db_type), | intent(inout) | :: | db |
Database type. |
||
type(db_stmt_type), | intent(inout) | :: | db_stmt |
Database statement type. |
||
character(len=*), | intent(in) | :: | node_id |
Node id. |
||
type(sensor_type), | intent(out) | :: | sensor |
Returned sensor data. |