dbAdd_device_uncalibrated: Insert data into 'device' and 'calibration_state' without...

Description Usage Arguments Value See Also Examples

View source: R/db_write.R

Description

This function adds new devices to the database that do not require any calibration. First, it adds the new devices into the device table. It then uses the respective created device.dev_id to add new entries in calibration_state with both calibration_state.calstate_datetime and calibration_state.calstate_parameter being NA.

Usage

1
2
3
4
5
6
7
dbAdd_device_uncalibrated(
  conn,
  dev_name,
  devmod_name,
  dev_identifier = NULL,
  dev_comment = NULL
)

Arguments

conn

Database connection.

dev_name

String vector of name of device.

devmod_name

String vector of name of model.

dev_identifier

String vector of device identifiers, e.g. serial numbers.

dev_comment

String vector of additional comments.

Value

List of data frames of newly added rows.

See Also

dbWriteTable_device and dbWriteTable_calibration_state for the separate functions called by this wrapper.

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
con <- dbConnect_klimageo()
dbWriteTable_device_manufacturer(con, "TSI")
dbWriteTable_device_type(con, "thermometer")
dbWriteTable_device_model(con, "THERMO1000", 1, 1)
dbAdd_device_uncalibrated(con, "My first THERMO1000", 1, "NCC1701-T")
dbDisconnect(con)

## End(Not run)

sebschub/klimageodb documentation built on Sept. 25, 2021, 4:16 p.m.