<< dbsClose retrieve_dbstore dbsMessage >>

retrieve_dbstore >> retrieve_dbstore > dbsWrite

dbsWrite

Write channel data and parameter in dbStore.

Syntax

code = dbsWrite( dbs_des, channel_number, param_struct, data_array, ...)

Input parameters

dbs_des (numeric)

Opened dbStore's descriptor id

channel_number (numeric)

Channel number

param_struct (struct)

Struct array of channel's parameter

the sruct fields are Pname(char),Pvalue(char),Ptype(numeric). Describe it with 'struct([])' when there are not parameter to register. This uses the data name which you applied for to LABCOM.

data_array (numeric array)

Data array of channel

Describe it with 'int16([])' when there are not data to register.

Options

'imagetype',image_type (string)

The data type of channel data.

'image_type' has the next kind.

  • 'INT8' : 8bit integer.
  • 'INT16' : 16bit integer.
  • 'INT32' : 32bit integer.
  • 'INT64' : 64bit integer.
  • 'FLT32' : single precision.
  • 'FLT64' : double precision.
  • 'GRAYn' : n bits gray image.(n:8-16) ex.) GRAY8
  • 'GREYn' : same 'GRAYn'
  • 'RGB' : 24 bit color image. There is a meaning in letter order of 'R','G','B'
  • 'RGBA' : 32 bit color image. There is a meaning in letter order of 'R','G','B','A'

'frames', frames(numeric)

Number of the frames, If you want to use frame constitution.

'verbose'

Verbose operation.

Output parameters

code (numeric)

Result code, 0 is success, other is error.

Description

Write channel data and parameter in dbStore.

Examples

des = dbsOpen('xxx@nifs.ac.jp', 'DATA_X', 213, 1, 'RAW');
if des > 0 then
  pl = initParamList();
  pl = setParam(pl, 'offset', 10.0);
  pl = setParam(pl, 'gain', int32(2));
  data = zeros(1000,1);
  code = dbsWrite( des, 1, pl, data,'verbose');
  if code == 0 then
     code = dbsClose(des);
     if code == 0 then
       mprintf('Success.\n');
     end
  else
     dbsAbort(des);
  end
end

See also

Authors

History

バージョン記述
20.0.0 Initial release.

Report an issue
<< dbsClose retrieve_dbstore dbsMessage >>