1 Writing Channel Access Clients–EPICS Training – K.F – Jul.2003. EPICS Writing Channel Access Clients Kazuro Furukawa, KEK (Marty Kraimer, APS, USPAS1999)

Slides:



Advertisements
Similar presentations
11. 2 Today's Topic ノンブロッキング通信 Non-Blocking Communication 通信の完了を待つ間に他の処理を行う Execute other instructions while waiting for the completion of a communication.
Advertisements

SPIN. Seach Optimization Exhaustive search requires so much time and memory to perform verification realistically, must perform some shortcuts –reduce.
SPSSによるHosmer-Lemeshow検定について
マルチスレッド GUI モデル 小笠原啓 有限会社 IT プランニング. Page 2 ゴール  マルチスレッドな GUI ライブラリを OCaml で。  動きのある UI は近頃必須なので、アニメーションを容易にする仕組みを導 入。  GUI 部品のイベント、見かけを自由にカスタマイズできるように。
レポート書き方. おしいレポート よく調べてある それぞれの、1文の言っていることは正 しい しかし、全体として、何が言いた いのかわからない 内容の重要だが、全体の構成も重 要である.
7.n次の行列式   一般的な(n次の)行列式の定義には、数学的な概念がいろいろ必要である。まずそれらを順に見ていく。
9.線形写像.
時間的に変化する信号. 普通の正弦波 は豊富な情報を含んでいません これだけではラジオのような複雑な情報 を送れない 振幅 a あるいは角速度 ω を時間的に変化 させて情報を送る.
5.連立一次方程式.
相関.
―本日の講義― ・平均と分散 -代表値 -ぱらつき(分散・標準偏差等) ・Excelによる演習
ノイズ. 雑音とも呼ばれる。(音でなくても、雑 音という) 入力データに含まれる、本来ほしくない 成分.
広告付き価格サービ ス 小園一正. はじめに 世の中には様々な表現方法の広告があり ます。その中でも私たち学生にとって身 近にあるものを広告媒体として取り入れ られている。 価格サービス(無料配布のルーズリー フ)を体験したことにより興味を惹かれ るきっかけとなった。主な目的は、これ.
素数判定法 2011/6/20.
フーリエ係数の性質. どこまで足す? 理想的には無限大であるが、実際に はそれは出来ない これをフーリエ解析してみる.
1章 行列と行列式.
本宮市立白岩小学校. 1 はじめに 2 家庭学習プログラム開発の視点 ① 先行学習(予習)を生かした 確かな学力を形成する授業づく り ② 家庭との連携を図った家庭学習の習慣化.
プログラミングⅠ( 1 組) 第 9 回
フーリエ級数. 一般的な波はこのように表せる a,b をフーリエ級数とい う 比率:
プログラミング入門2 第4回 式文 代入式 論理演算子 ループの脱出、スキップ 情報工学科 篠埜 功.
3.エントロピーの性質と各種情報量.
9.通信路符号化手法1 (誤り検出と誤り訂正の原理)
Excelによる積分.
1 6.低次の行列式とその応用. 2 行列式とは 行列式とは、正方行列の特徴を表す一つのスカ ラーである。すなわち、行列式は正方行列からスカ ラーに写す写像の一種とみなすこともできる。 正方行列 スカラー(実数) の行列に対する行列式を、 次の行列式という。 行列 の行列式を とも表す。 行列式と行列の記号.
計算のスピードアップ コンピュータでも、sin、cosの計算は大変です 足し算、引き算、掛け算、割り算は早いです
線形符号(10章).
1 0章 数学基礎. 2 ( 定義)集合 集合については、 3セメスタ開講の「離散数学」で詳しく扱う。 集合 大学では、高校より厳密に議論を行う。そのために、議論の 対象を明確にする必要がある。 ある “ もの ” (基本的な対象、概念)の集まりを、 集合という。 集合に含まれる “ もの ” を、集合の要素または元という。
4.プッシュダウンオートマトンと 文脈自由文法の等価性
1 0章 数学基礎. 2 ( 定義)集合 集合については、 3セメスタ開講の「離散数学」で詳しく扱う。 集合 大学では、高校より厳密に議論を行う。そのために、議論の 対象を明確にする必要がある。 ある “ もの ” (基本的な対象、概念)の集まりを、 集合という。 集合に含まれる “ もの ” を、集合の要素または元という。
信号測定. 正弦波 多くの場合正弦波は 0V の上下で振動する しかし、これでは AD 変換器に入れら れないので、オフ セットを調整して データを取った.
1 9.線形写像. 2 ここでは、行列の積によって、写像を 定義できることをみていく。 また、行列の積によって定義される写 像の性質を調べていく。
通信路(7章).
1 情報理論 2008 年度 4 セメスター. 2 履修にあたって 担当 – 草苅 良至(部屋GI511、内線209 5 ) 教科書 平田廣則著「情報理論のエッセンス」 昭晃堂、 \2,700- ・参考書 今井秀樹著「情報理論」 昭晃堂、 \2,900-
3.プッシュダウンオートマトンと 文脈自由文法
6.符号化法(6章).
ビット. 十進数と二進数 十進数  0から9までの数字を使って 0、1、2、3、4、5、6、7、8、9、 10、11、12 と数える 二進数  0と1を使って 0、1、10、11、100、101、11 0、111 と数える.
3.正方行列(単位行列、逆行列、対称行列、交代行列)
様々な情報源(4章).
プログラミング演習B ML編 第3回 2010/6/15 (コミ) 2010/6/16 (情報・知能) 住井 ~sumii/class/proenb2010/ml3/
伝わるスライド 中野研究室 M2 石川 雅 信. どのようなスライドを作れば良 いか 伝えたいこと.
Analog “ neuronal ” networks in early vision Koch and Yuille et al. Proc Academic National Sciences 1986.
C言語応用 構造体.
Servlet 入門 大岩研究室 川村昌弘. そもそも WEB アプリってなんやね ん n この研究会のテーマは『 WEB アプリケー ションの開発』でした. n じゃぁ WEB アプリケーションって何です か? o WEB アプリってどんなものがありますか? 検索エンジン 乗換え案内サイト 翻訳.
実装の流れと 今後のスケジュール 03k0014 岸原 大祐. システム概要 天気データをもとに、前向き推論をし ていき、親の代わりに子供に服装、持 ち物、気をつけることなどを教える。
ノベルゲームシステムとネット ワークの連携について 1104081 下元 悠嗣. 研究内容 ノベルゲーム専用のスクリプトエンジン 吉里吉里 /KAG にネットワーク機能を追加 することで従来にない特色を持ったシス テムの開発.
プログラミング演習B ML編 第3回 2006/7/4 (通信コース) 2006/7/12 (情報コース) 住井 ~sumii/class/proenb2006/ml3/
HKS Analysis Log Jul 2006 Part1 D.Kawama. 第壱部 HKS Sieve Slit Analysis.
移動エージェントプログラムの 動作表示のためのアニメーション言 語 名古屋大学情報工学コース 坂部研究室 高岸 健.
1 プログラミング言語論 第13回 プログラムの意味論と検証 (2) 表示的意味論 担当:犬塚. 2 表示的意味論 denotational semantics  表示的意味論では、プログラムの要素とそれが 意味するものを対応付ける。 変数 式 文 A B … A+2 2B+C A:=A+2 if.
プログラミングⅠ( 2 組) 第 1 回 / pLB1.pptx.
「ネット社会の歩き方」レッスンキット プレゼンテーション資料集 15. チャットで個人情報は 言わない プレゼンテーション資料 著作権は独立行政法人情報処理推進機構( IPA )及び経済産業省に帰属します。
8.任意のデータ構造 (グラフの表現とアルゴリズム)
プログラミング入門2 第3回 複合文、繰り返し 情報工学科 篠埜 功.
リファクタリング支援のための コードクローンに含まれる識別子の変更内容分析 井上研究室 工藤 良介 1.
メニューに戻る メニューに戻る | 前表示スライド 前表示スライド G*power 3 の web ページ Windows はこちら Mac はこちら ダウンロード後,実行してインストール.
第14回 プログラムの意味論と検証(3) 不動点意味論 担当:犬塚
ことばとコンピュータ 2007 年度 1 学期 第 1 回. 2 ことばとコンピュータ 授業科目名:言語情報処理論 授業題目名:ことばとコンピュータ 履修コード: 5067 教室: 323 一学期開講 授業の進め方 – 基本的に講義中心ですすめ,時々コンピュー タを使う.
プログラミング演習( 1 組) 第 8 回
音の変化を視覚化する サウンドプレイヤーの作成
プログラミングの基礎知識 プログラミングの手順と重要概念 アルゴリズム. プログラミングの手順 コーディング エディタなどでコードを記述 コンパイル・インタープリタ 実行可能な形に翻訳 デバッグ(虫取り、不具合の調整) 完成!
Self-efficacy(自己効力感)について
本文. 考えながら読みましょ う 「いろいろなこと」( 3 行目)は何で すか 「①電話料金はコンビニで支払いをしていま す。いつでも払えますから、便利です。」 「②夕食はコンビニで買います。お弁当やお かずがいろいろありますから。」今、若者に 人気のあるコンビニは、いろいろなことをす るのに非常に便利な場所になった。
IIR 輪講復習 #18 Matrix decompositions and latent semantic indexing.
Writing a Channel Access Client in EPICS Bob Dalesio, April 5, 2000.
Writing a Channel Access Client in EPICS Bob Dalesio, April 5, 2000.
1 Writing Channel Access Clients–EPICS Training – K.Furukawa – Mar EPICS Writing Channel Access Clients Kazuro Furukawa, KEK, ( ) (Marty.
Writing Channel Access Clients
Writing a Channel Access Client in EPICS
Writing Channel Access Clients
Writing Channel Access Clients
Presentation transcript:

1 Writing Channel Access Clients–EPICS Training – K.F – Jul EPICS Writing Channel Access Clients Kazuro Furukawa, KEK (Marty Kraimer, APS, USPAS1999) (Bob Dalesio, LANL, USPAS2003)

2 Writing Channel Access Clients–EPICS Training – K.F – Jul EPICS References u EPICS R3.12 / R3.14 Channel Access Reference Manual 詳細なドキュメント u cadef.h caerr.h - CA の基本インターフェースの記述 u db_access.h データの定義、分かりにくいがロバストなソフトウェアを書くため には重要 u LANL にあるチュートリアルも分かりやすい EPICS Web ページからたどることができる

3 Writing Channel Access Clients–EPICS Training – K.F – Jul EPICS CA between IOC and OPI IOC instrumentation and control hardware DATABASE database access library device drivers Channel Access client Channel Access client user program C program WORKSTATION SNL sequence Channel Access server record support device support database library Channel Access Repeater

4 Writing Channel Access Clients–EPICS Training – K.F – Jul EPICS Overview of Talk u クライアントソフトウェアの例題の紹介 CA API/Macro の簡単な使用例 CA Callback の使用例 ( db_access.h の詳細は省く) SEVCHK SEVCHK(,”message”) リターンコードを検査する Macro もしエラーがあればメッセージを表示して終了する 以下の使用例で使う、試験には便利 実用ソフトウェアでは使用するべきではない

5 Writing Channel Access Clients–EPICS Training – K.F – Jul EPICS Very Simple Example /*caSimpleExample.c*/ #include #include "cadef.h" main(int argc,char **argv) { doubledata; chidmychid; if(argc != 2) { fprintf(stderr,"usage: caExample pvname\n"); exit(1); } SEVCHK(ca_task_initialize(),"ca_task_initialize"); SEVCHK(ca_search(argv[1],&mychid),"ca_search failure"); SEVCHK(ca_pend_io(5.0),"ca_pend_io failure"); SEVCHK(ca_get(DBR_DOUBLE,mychid,(void *)&data),"ca_get failure"); SEVCHK(ca_pend_io(5.0),"ca_pend_io failure"); printf("%s %f\n",argv[1],data); return(0); }

6 Writing Channel Access Clients–EPICS Training – K.F – Jul EPICS caExample /*from stdin read list of PVs to monitor*/ #include #define MAX_PV 1000 #define MAX_PV_NAME_LEN 40 typedef struct{ charvalue[20]; chidmychid; evidmyevid; } MYNODE; u Channel Access に関する宣言等 u Stdin から Process Variable (Record) 名のリストを読み込 み、処理を行う例題

7 Writing Channel Access Clients–EPICS Training – K.F – Jul EPICS CA macros static void printChidInfo(chid chid, char *message) { printf("\n%s\n",message); printf("pv: %s type(%d) nelements(%d) host(%s)", ca_name(chid),ca_field_type(chid), ca_element_count(chid), ca_host_name(chid)); printf(" read(%d) write(%d) state(%d)\n", ca_read_access(chid),ca_write_access(chid), ca_state(chid)); } u chid (Channel ID) を指定すると次の情報が取得できる u ca_name - name u ca_field_type - type as defined in db_access.h u ca_element_count - array size (1 for scalars) u ca_host_name - INET name of host u ca_read_access - Is read access allowed u ca_write_access - Is write access allowed u ca_state - connected, not connected, etc.

8 Writing Channel Access Clients–EPICS Training – K.F – Jul EPICS exception/connection callbacks static void exceptionCallback( struct exception_handler_args args) { chidchid = args.chid; MYNODE*pnode = (MYNODE *)ca_puser(chid); longtype = args.type;/*type of value returned*/ longcount = args.count; longstat = args.stat; printChidInfo(chid,"exceptionCallback"); printf("type(%d) count(%d) stat(%d)\n",type,count,stat); } static void connectionCallback(struct connection_handler_args args) { chidchid = args.chid; MYNODE*pnode = (MYNODE *)ca_puser(chid); printChidInfo(chid,"connectionCallback"); } u exceptionCallback u 以下の callback 以外のイベントが起った場合に呼ばれる u Ioc で発生した Error など u connectionCallback u connect/disconnect が発生する毎に呼ばれる

9 Writing Channel Access Clients–EPICS Training – K.F – Jul EPICS accessRightsCallback static void accessRightsCallback( struct access_rights_handler_args args) { chidchid = args.chid; MYNODE*pnode = (MYNODE *)ca_puser(chid); printChidInfo(chid,"accessRightsCallback"); } u Connect 時 u access rights が変更になった時

10 Writing Channel Access Clients–EPICS Training – K.F – Jul EPICS eventCallback static void eventCallback( struct event_handler_args eha) { chidchid = eha.chid; MYNODE*pnode = (MYNODE *)ca_puser(chid); longtype = eha.type; longcount = eha.count; if(eha.status!=ECA_NORMAL) { printChidInfo(chid,"eventCallback"); } else { char *pdata = (char *)eha.dbr; printf("Event Callback: %s = %s\n", ca_name(eha.chid),pdata); } u Monitor のイベントが発生した時

11 Writing Channel Access Clients–EPICS Training – K.F – Jul EPICS main - start main() { intnpv = 0; MYNODE*pnode; MYNODE*pmynode[MAX_PV]; char*pname[MAX_PV]; inti, status; chartempStr[MAX_PV_NAME_LEN]; char*pstr; while(1) { if(npv >= MAX_PV ) break; pstr = fgets(tempStr,MAX_PV_NAME_LEN,stdin); if(!pstr) break; if(strlen(pstr) <=1) continue; pstr[strlen(pstr)-1] = '\0'; /*strip off newline*/ pname[npv] = calloc(1,strlen(pstr) + 1); strcpy(pname[npv],pstr); pmynode[npv] = (MYNODE *)calloc(1,sizeof(MYNODE)); npv++; } u Stdin から Process Variable (Record) 名のリストを読み込む caExample < file

12 Writing Channel Access Clients–EPICS Training – K.F – Jul EPICS Actual CA calls SEVCHK(ca_task_initialize(), "ca_task_initialize"); SEVCHK(ca_add_exception_event( exceptionCallback,NULL), "ca_add_exception_event"); for(i=0; i<npv; i++) { SEVCHK(ca_search_and_connect( pname[i],&pmynode[i]->mychid, connectionCallback,&pmynode[i]), "ca_search_and_connect"); SEVCHK(ca_replace_access_rights_event( pmynode[i]->mychid, accessRightsCallback), "ca_replace_access_rights_event"); SEVCHK(ca_add_event(DBR_STRING, pmynode[i]->mychid,eventCallback, pmynode[i],&pmynode[i]->myevid), "ca_add_event"); } /* 正常動作時にはこれ以下には到達しない */ SEVCHK(ca_pend_event(0.0),"ca_pend_event"); ca_task_exit(); }

13 Writing Channel Access Clients–EPICS Training – K.F – Jul EPICS Start and End  ca_task_initialize ca_repeater との接続などの処理 (connection management)  ca_add_exception_event CA に異常が起こった場合の処理を行うために Callback を指定しておく u { その他の Code}  ca_task_exit CA に関連して確保した資源を解放する

14 Writing Channel Access Clients–EPICS Training – K.F – Jul EPICS Search u ca_search_and_connect(name,pchid, connectionCallback,userarg) ca_replace_access_rights_event(chid, accessRightsCallback) u 要求は Buffer がいっぱいになるか ca_pend or ca_flush が実行さ れるまで Buffer される u UDP ブロードキャストで Process Variable を探索要求を出す  ( EPICS_CA_AUTO_ADDR_LIST が YES または未設定の場合) u サブネット上の IOC はその Process Variable を収容していれば、要 求に答える u Process Variable を収容している IOC に対して TCP 接続を確立 する u connectionCallback は接続状態が変化すると呼ばれる u accessRightsCallback は Access Right が変更されると呼ばれる u chid に対して対応する userarg を使うことができる

15 Writing Channel Access Clients–EPICS Training – K.F – Jul EPICS I/O u Puts - 多数のバリエーションがある  ca_array_put(type,count,chid,pvalues)... ca_flush_io() Calls are buffered until: buffer full, ca_flush, or ca_pend.  ca_put_callback(type,count,chid, pvalue,putCallback,userarg) putCallback called after all records processed because of put complete processing. u Gets - 同様に多数のバリエーションがある u ca_array_get(type,count,chid,pvalues)... ca_pend_io(timeout) u ca_array_get_callback(type,count,chid,getCallback,user arg)... ca_pend_event(timeout)

16 Writing Channel Access Clients–EPICS Training – K.F – Jul EPICS I/O continued u Monitors - 多数のバリエーションがある  ca_add_masked_array_event(type,count, chid,eventCallback,userarg, pevid,mask) Call this once for each channel to be monitored. Mask allows value changes, alarm changes, archival changes u …  ca_pend_event(timeout) Waits at least timeout seconds

17 Writing Channel Access Clients–EPICS Training – K.F – Jul EPICS Waiting  ca_flush_io() 通常 ca_pend から呼ばれる udp/tcp の Buffer を送り出す  ca_pend_io(timeout) ca_flush_io を呼ぶ。未処理の ca_gets や ca_search が終 了するか、 timeout になるまで待つ  ca_pend_event(timeout) イベントが発生するか timeout になるまで待つ u timeout u 0 は無限に待つという意味 u.0001 などの短い時間を指定すれば、 polling を行うことに使える

18 Writing Channel Access Clients–EPICS Training – K.F – Jul EPICS CA with X u Channel Access uses select() to wait. u File Descriptor Manager can be used. u Channel access provides ca_add_fd_registration u X provides similar facility

19 Writing Channel Access Clients–EPICS Training – K.F – Jul EPICS db_access.h u Describes the data CA can transfer u Hard to understand and use u Provides access to u data types: string, char, short, long, float, double u status, severity, time stamp u arrays u enums (in ioc both menus and DBF_ENUM fields) u complete set of enum choices u control, display, alarm limits u Alarm Acknowledgment

20 Writing Channel Access Clients–EPICS Training – K.F – Jul EPICS ezCa - Easy Channel Access u Goals u Easy to use. u Provide non-callback synchronous model. u Data Types u ezcaByte, ezcaString, ezcaShort, ezcaLong, ezcaFloat, ezcaDouble u Basic Calls u int ezcaGet(pvname, type, nelem, buff) u int ezcaPut(pvname, type, nelem, buff) u int ezcaGetWithStatus(pvname,type, nelem,buff,time,stat,sevr) u Synchronous Groups u int ezcaStartGroup(void) u any combination of get and put u int ezcaEndGroup(void)

21 Writing Channel Access Clients–EPICS Training – K.F – Jul EPICS ezCa continued u Error Handling u ezcaPerror(message) u ezcaGetErrorString(message,errorstring) u ezcaFreeErrorString(errorstring) u Other Groupable Functions u int ezcaGetControlLimits(pvname,type,low,high) u int ezcaGetGraphicLimits(pvname,type,low,high) u int ezcaGetNelem(pvname,nelem) u int ezcaGetPrecision(pvname,precision) u int ezcaGetStatus(pvname,time,stat,sevr)  int ezcaGetUnits(pvname,units) u Monitor Functions u int ezcaSetMonitor(pvname,type) u int ezcaClearMonitor(pvname,type) u int ezcaNewMonitor(pvname,type) u Others

22 Writing Channel Access Clients–EPICS Training – K.F – Jul EPICS Starting Your Practice u mkdir test1 u cd test1 u setenv HOST_ARCH `$EPICS_BASE/../startup/HostArch` u HOST_ARCH=`$EPICS_BASE/../startup/HostArch` export HOST_ARCH u (USER=`whoami` ; export USER) u makeBaseApp.pl –t simple test1 u cd test1App/src u create source code u edit Makefile.Host u gmake (make) u Souce file が一つ (xxxx.c) であれば、 u cd O.linux (or O.solaris, etc) u make xxxx u gmake caExample u caExample ffred

23 Writing Channel Access Clients–EPICS Training – K.F – Jul EPICS Practice Explanation 1 u HOST_ARCH=`$EPICS_BASE/../startup/HostArch` export HOST_ARCH assigning a platform name for EPICS software (backquotes around “$EPICS … HostArch” mean “execute it and use the result”) u USER=`whoami` ; export USER assigning a user name for EPICS software u mkdir test1 ; cd test1 making directory for our test and going into it u makeBaseApp.pl –t example test1 creating environment (directory and config files) for a new EPICS application see the manual “EPICS IOC Applications BuildingEPICS IOC Applications Building and Source Release Controland Source Release Control”

24 Writing Channel Access Clients–EPICS Training – K.F – Jul EPICS u cd test1App/src u 適当な単純な sample code を作る u gmake (make) makeBaseApp.pl が用意した Makefile に従って EPICS 環 境を準備する u cd O.linux ; gmake xxxx もしも Makefile.Host を適当に変更してあればこの Step は必要ない u xxxx プログラムを実行してみる Practice Explanation 2

25 Writing Channel Access Clients–EPICS Training – K.F – Jul EPICS Data Type Conversions in Channel Access DBR _STRING, _DOUBLE, _FLOAT, _LONG, _CHAR, _ENUM Data type conversions are performed in the server Endian and floating point conversions are done in the client Polite clients requests data in native type and perform necessary conversion on the client side

26 Writing Channel Access Clients–EPICS Training – K.F – Jul EPICS Accessing Composite Data Structures Many fields are fetched from the data store in one access: struct dbr_ctrl_floatdata; struct dbr_ctrl_float*pdata = &data; ca_get(DBR_CTRL_FLOAT,mychid,(void *)pdata); printf(“%d %d\n”,pdata->status, pdata->severity); printf(“%d %d\n”,pdata->stamp.secPastEpoch, pdata->stamp.nsec); printf(“%f %f\n”,pdata->high_display_limit,pdata->low_display_limit); printf(“%f %f\n”,pdata->high_warning_limit,pdata->low_warning_limit); printf(“%f %f\n”,pdata->high_alarm_limit,pdata->low_alarm_limit); printf(“%f %f\n”,pdata->high_control_limit,pdata->low_control_limit); printf(“%f %s\n”,pdata->value, pdata->units); *Refer to db_access.h for structures...

27 Writing Channel Access Clients–EPICS Training – K.F – Jul EPICS Error Checking u Error codes and error related macros are in caerr.h u SEVCHK will exit on errors it deems irrecoverable u ECA_NORMAL means the exchange was initiated successfully u SEVCHK exit behavior can be replaced with your own exception handler ca_add_exception_event(…..) u example: status = ca_array_put(data_type,channel_id,pvalue); SEVCHK(status,”additional info in error message”);

28 Writing Channel Access Clients–EPICS Training – K.F – Jul EPICS Caching vs. Queuing u An event handler can either take its actions in the event handler - queuing all data is handled degradation mode is longer delays u Place data into an intermediate buffer and have an alternate thread handle the data caching data can be overwritten degradation mode is intermediate data is discarded u note that buffer in IOC will overwrite the last monitor on the queue when a buffer overflows in the IOC

29 Writing Channel Access Clients–EPICS Training – K.F – Jul EPICS Channel Access Notes u ca_repeater needs to be run once on each workstation u in the database, u a deadband of 0 posts a monitor on any change u a deadband of -1 posts monitors on every scan u R3.15 may limit monitor events u read cadef.h, caerr.h and db_access.h before writing a channel access client u it is most efficient to use native data types and handle data conversions in the client program