forked from caproto/caproto
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CAproto.html
2538 lines (2290 loc) · 181 KB
/
CAproto.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xml:lang="en"><head><title>Channel Access</title><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></meta><meta content="CosyDoc 2.1.8, Apache Software Foundation 1" name="generator"></meta><style type="text/css">
/* ==========================[ General Styles ]========================== */
body {
font-family: verdana, tahoma, arial, helvetica, sans-serif;
font-size: small;
text-align: left;
background-repeat: repeat-y;
background-position: center;
background-color: white;
color: black;
margin-left: 5%;
margin-right: 5%;
}
img {
border-width: 0px;
}
table {
margin-left: 1%;
width: 98%;
}
/* Cells that carry content (notices, warnings, ...). */
td.content {
width: 100%;
}
/* ==========================[ Heading Styles ]========================== */
h1, h2, h3, h4, h5, h6,
h1 a:visited, h2 a:visited, h3 a:visited,
h4 a:visited, h5 a:visited, h6 a:visited,
h1 a, h2 a, h3 a,
h4 a, h5 a, h6 a {
color: black;
margin-top: 2em;
margin-bottom: 1em;
text-decoration: none;
}
h1 {
color: #003c8c;
font-size: x-large;
font-weight: bold;
text-align: center;
border-bottom: #888 2px solid;
padding-bottom: 10px;
}
h2 {
padding-bottom: 5px;
font-size: medium;
font-weight: bold;
border-bottom: #bbb 2px solid;
}
h3 {
font-size: medium;
font-weight: normal;
font-style: italic;
}
h4 {
font-size: small;
font-weight: bold;
}
h5 {
font-size: small;
font-weight: bolder;
}
h6 {
font-size: small;
font-weight: bold;
font-style: italic;
}
h1 a, h2 a, h3 a,
h4 a, h5 a, h6 a {
color: #003c8c;
}
h1.toc, h2.toc, h3.toc, h4.toc, h5.toc, h6.toc {
text-align: left;
font-size: small;
color: #003c8c;
margin-right: 0%;
margin-bottom: 0%;
}
h1.toc {
margin-left: 3ex;
margin-top: 6px;
border-bottom: black 1px solid;
padding-bottom: 1px;
font-weight: bold;
}
h2.toc {
margin-left: 6ex;
margin-top: 2px;
border-bottom: #bbb 1px solid;
font-size: x-small;
}
h3.toc {
margin-left: 9ex;
margin-top: 2px;
font-size: x-small;
font-weight: bold;
font-style: normal;
}
h4.toc {
margin-left: 15ex;
margin-top: 2px;
font-size: xx-small;
font-weight: normal;
}
h5.toc {
margin-left: 18ex;
margin-top: 1px;
font-size: xx-small;
font-weight: normal;
}
h6.toc {
margin-left: 21ex;
margin-top: 1px;
font-size: xx-small;
font-weight: normal;
}
/* ============================[ Paragraphs ]============================ */
p {
margin-bottom: 0.5em;
margin-top: 0.5em;
text-align: justify;
}
/* ==============================[ Notice ]============================== */
table.notice,
table.warning {
margin-top: 0.5em;
margin-bottom: 0.5em;
}
table tr td.icon {
text-align: center;
vertical-align: middle;
width: 20px;
}
table.warning tr td {
border-left-color: red;
border-top-color: red;
}
table.warning {
border-right-color: red;
border-bottom-color: red;
}
table.notice tr td,
table.warning tr td {
padding-top: 0.5ex;
padding-bottom: 0.5ex;
padding-left: 1ex;
padding-right: 1ex;
margin: 0;
vertical-align: middle;
}
p.figure {
text-align: center;
margin-top: 2ex;
}
p.caption {
text-align: center;
margin-bottom: 1.5ex;
}
p.comment {
color: red;
margin-left: 10%;
margin-right: 10%;
}
p.warning {
background-color: #E0E0E0;
color: black;
}
p.warning tr td {
border-width: 0.02cm;
border-color: red;
}
p.notice {
background-color: #F0F0F0;
color: black;
}
p.notice tr td {
border-width: 0.02cm;
border-color: black;
}
/* ===========================[ Table Styles ]=========================== */
table {
border-left: 1px solid gray;
border-top: 1px solid gray;
border-bottom: 1px solid black;
border-right: 1px solid black;
}
table.code,
table.table {
margin-top: 1.5ex;
margin-bottom: 1.5ex;
}
th {
border-left: 1px solid black;
border-top: 1px solid black;
border-bottom: 1px solid gray;
border-right: 1px solid gray;
text-align: left;
color: black;
background-color: #D8D8E8;
padding-left: 0.5ex;
padding-right: 0.5ex;
padding-top: 0.25ex;
padding-bottom: 0.25ex;
}
td {
border-left: 1px solid black;
border-top: 1px solid black;
border-bottom: 1px solid gray;
border-right: 1px solid gray;
padding-left: 0.5ex;
padding-right: 0.5ex;
padding-top: 0.25ex;
padding-bottom: 0.25ex;
}
th.caption {
text-align: center;
font-weight: normal;
background-color: #CACAD4;
}
span.progress-bar-done {
background-color: #A52A2A;
border: 1px solid black;
}
span.progress-bar-remaining {
border: 1px solid black;
border-left: none;
}
/* ---------------------------[ Frame Table ]---------------------------- */
table#frame {
border: none;
margin: 0;
padding: 0;
}
td#checkpoints {
border: none;
}
td#history {
border: none;
}
td#cosyline {
padding: 0;
border: none;
text-align: right;
background-image: url('http://epics.cosylab.com/images/CosyLine.png');
}
td#content {
border-top: none;
border-right: none;
border-bottom: none;
border-left: none;
color: black;
padding-left: 0.5ex;
padding-right: 0.5ex;
padding-top: 0ex;
}
/* -------------------------------[ Menu ]------------------------------- */
td#menu {
vertical-align: top;
color: black;
background-color: #E0E0E0;
border-top: none;
border-left: none;
border-bottom: none;
border-right: 1px solid gray;
padding-left: 0ex;
padding-right: 0ex;
width: 200px;
}
p#menu-title {
background-color: #CE2B25;
color: white;
font-weight: bold;
}
p.menu-group {
background-color: #CE2B25;
color: white;
padding-top: 1ex;
font-weight: bold;
}
td#menu p {
margin-top: 0;
margin-bottom: 0;
margin-left: 0;
border-bottom: 1px solid gray;
}
td#menu p a {
text-decoration: none;
}
td#menu p a:hover {
color: black;
display: block;
}
td#menu ul {
list-style-type: none;
padding: 0;
}
td#menu ul li ul {
list-style-type: none;
padding-left: 2ex;
}
td#menu li {
font-weight: normal;
}
td#menu li.group {
font-weight: bold;
margin-top: 1em;
}
td#menu li.group ul {
padding: 0;
}
/* ----------------------------[ Checkpoints ]--------------------------- */
td.cpCheckbox {
width: 3ex;
text-align: center;
}
/* -----------------------[ Document Header Table ]---------------------- */
table.title,
table.header {
border: none;
}
table.title tr th,
table.title tr td {
background-color: transparent;
border: none;
}
table.title tr th {
width: 100%;
}
table.header tr th,
table.header tr td {
background-color: transparent;
text-align: left;
font-weight: normal;
border-right: none;
border-left: none;
border-bottom: none;
border-top: #bbb 1px solid;
}
table.header tr td {
font-style: italic;
}
p#title {
text-align: center;
font-size: xx-large;
font-family: palatino linotype, garamond, serif;
padding-bottom: 20px;
border-bottom: #ce2b25 2px solid;
}
p#subject {
text-align: center;
font-size: x-large;
font-family: amyriad web, verdana, tahoma, arial, helvetica, sans-serif;
padding-bottom: 50px;
}
table.header tr th#copyright {
text-align: left;
font-size: x-small;
border-top: #bbb 1px solid;
padding-top: 10px;
}
/* ----------------------[ Document History Table ]---------------------- */
tr.reviewAccepted,
.statusGreen {
background: #D0FFD0;
color: black;
}
tr.reviewRejected,
.statusRed {
background: #FFD0D0;
color: black;
}
.statusUnknown {
background: #F0F080;
color: black;
}
table.document-history {
}
table.document-history tr.retire {
background: lightgray;
}
table.document-history tr td.revision,
table.document-history tr td.date,
table.document-history tr td.author {
text-align: center;
vertical-align: middle;
padding-left: 0.5ex;
padding-right: 0.5ex;
}
table.document-history tr td.section-modification-00,
table.document-history tr td.modification-00 {
border-top: 1px dashed black;
border-bottom: none;
vertical-align: middle;
}
table.document-history tr td.section-modification-01,
table.document-history tr td.modification-01 {
border-top: 1px dashed black;
vertical-align: middle;
}
table.document-history tr td.section-modification-10,
table.document-history tr td.modification-10 {
border-bottom: none;
vertical-align: middle;
}
table.document-history tr td.section-modification-11,
table.document-history tr td.modification-11 {
vertical-align: middle;
}
table.document-history tr td.section-modification-00,
table.document-history tr td.section-modification-01,
table.document-history tr td.section-modification-10,
table.document-history tr td.section-modification-11 {
text-align: center;
}
td.author {
width: 20ex;
}
/* ===============================[ Code ]=============================== */
table.code tr td {
background: #F0F0F0;
color: black;
padding: 0;
}
table.code tr th {
text-align: center;
font-weight: normal;
}
table.code tr td pre {
overflow: auto;
margin-top: 0.5ex;
margin-bottom: 0.5ex;
margin-left: 1ex;
margin-right: 1ex;
}
/* ===============================[ Lists ]============================== */
ol, ul {
}
li {
text-align: justify;
}
/* =============================[ Hyperlinks ]=========================== */
h1 a:hover, h2 a:hover, h3 a:hover,
h4 a:hover, h5 a:hover, h6 a:hover,
a:hover {
color: black;
text-decoration: underline;
}
a.reference {
vertical-align: text-top;
font-size: x-small;
}
.equation tr td {
border-width: 0;
}
span.menu {
color: white;
background: #787996;
font-family: tahoma, sans-serif;
font-size: x-small;
}
span.gui {
border-left-width: 0.025cm;
border-top-width: 0.025cm;
border-right-width: 0.04cm;
border-bottom-width: 0.04cm;
border-style: solid;
font-family: tahoma, sans-serif;
font-size: x-small;
}
span.keystroke {
border-style: groove;
border-color: #E0E0E0;
font-family: tahoma, sans-serif;
font-size: x-small;
}
span.emphasis {
font-style: italic;
}
span.bold {
font-weight: bold;
}
span.underline {
text-decoration: underline;
}
tt.filename {
font-family: tahoma, sans-serif;
font-weight: bold;
}
tt.availability {
font-family: tahoma, sans-serif;
font-weight: normal;
}
tt.keyword {
font-weight: bold;
}
tt.command {
font-family: tahoma, sans-serif;
font-weight: bold;
}
p.description {
text-align: center;
margin-top: 0cm;
}
td.center {
text-align: center;
vertical-align: middle;
}
/* ===============================[ Printer ]============================ */
@media print {
body {
font-family: serif;
}
}
</style><script type="text/javascript">
/*
* A workaround for Microsoft IE7 bug where getAttribute doesn't work as it should.
*/
var getAttribute;
if(navigator.appName == "Microsoft Internet Explorer") {
getAttribute = getAttributeIE7;
} else {
getAttribute = getAttributeOK;
}
// standards compliant browser -- just use provided getAttribute
function getAttributeOK(node, attr) {
return node.getAttribute(attr);
}
// IE7 -- iterate through all the attributes and get the one requested
function getAttributeIE7(node, attr) {
for(j = 0; j < node.attributes.length; ++j) {
var a = node.attributes[j];
if(a.nodeName == attr) {
return a.nodeValue;
}
}
return null;
}
/*
* Scripts for sending e-mail.
*/
function mailTo(part2, part1) {
window.location.href = "mailto:" + part1 + "@" + part2;
}
/*
* 'Rotate': support for rotatable portions of HTML.
*/
// a hash table that stores an array of texts for every rotatable portion
var rotates = new Array();
// initialize rotatable portions
function rotateInit() {
var elems = document.getElementsByTagName("div");
var i;
for(i = 0; i < elems.length; ++i) {
var elem = elems[i];
// portions are defined in <div class="rotate"> tags
if(getAttribute(elem, "class") != "rotate") {
continue;
}
var htmls = new Array();
rotates[elem.id] = htmls;
var j = 0;
// texts are all child nodes
while(true) {
var child = elem.childNodes[j];
if(child == null) {
break;
}
if(child.nodeType == 1 /* element or tag */) {
htmls.push(child.innerHTML);
}
elem.removeChild(child);
}
// set the click handler
elem.onclick = onRotateClick;
// set the default text for the rotatable portion
elem.innerHTML = htmls[0];
}
}
// click handler for a rotatable portion
function onRotateClick(evt) {
var tmp;
if(evt == null) {
// IE 7
tmp = event.srcElement;
} else {
//everybody else
tmp = evt.target;
}
var elem2 = null;
while(tmp != null) {
// don't treat hyperlink clicks
if(tmp.nodeName == "A") {
return;
}
// find the <div class="rotate"> parent
if((tmp.nodeName == "DIV") && (getAttribute(tmp, "class") == "rotate")) {
elem2 = tmp;
break;
}
tmp = tmp.parentNode;
}
if(elem2 == null) {
return;
}
// get the texts for the rotate
var htmls2 = rotates[elem2.id];
// set the next text in the list
var x = htmls2.shift();
htmls2.push(x);
elem2.innerHTML = htmls2[0];
}</script></head>
<body onload="javascript:rotateInit();">
<table id="frame" cellspacing="0"><tr><td id="content">
<table cellspacing="0" class="title"><tr>
<td><img src="/epics/icons/logo101.gif" alt="EPICS"></img></td>
<th><p id="title">Channel Access</p><p id="subject">Protocol Specification</p></th></tr></table>
<div class="rotate" id="rotHeader">
<div>
[ Click here to show document header. ]</div>
<div>
<table cellspacing="0" class="header">
<tr><th>Project:</th><td>JCA-Common</td></tr>
<tr><th>Document Owner:</th><td><a href="javascript:mailTo("cosylab.com","lists-ca-spec");">Channel Access Specification Mailing List</a></td></tr>
<tr><th>Status:</th><td>Released</td></tr>
<tr><th>Availability:</th><td><tt class="availability">cosyjava:/JCA-Common/Documentation/CAproto.html</tt></td></tr>
<tr><th>Creation:</th><td>2003-12-12 (<a href="javascript:mailTo("cosylab.com","klemen.zagar");">Klemen Žagar</a>)</td></tr>
<tr><th>Last Modification:</th><td>2008-02-07 (<a href="javascript:mailTo("cosylab.com","matej.sekoranja");">Matej Šekoranja</a>)</td></tr>
<tr><th id="copyright" colspan="2">Copyright © 2003-2004 Cosylab d.o.o.<br></br></th></tr>
</table>
<h2>License</h2>
<p>This document is distributed under the terms of the <a href="http://www.fsf.org/licenses/fdl.html">GNU Free Documentation License, version 1.2</a>.</p>
<h2>Scope</h2>
<p>This document is a specification of the EPICS Channel Access (CA) protocol.
Structure of messages exchanged between communicating nodes is defined, as well as semantics of the exchange.
The documentation is focused on version 4.11 of the CA protocol, which comes with EPICS 3.14.</p>
<h2 id="secAudience">Audience</h2>
<p>The audience of this document are all developers who need to work with CA at the network layer, without the use of higher-level application programming interfaces.</p>
</div>
</div>
<h2 id="toc">Table of Contents</h2>
<div class="rotate" id="rotContents">
<div>
[ Click here to show Table of Contents. ]</div>
<div>
<h1 class="toc"><a href="CAproto.html#secIntroduction">1. Introduction</a></h1><h2 class="toc"><a href="CAproto.html#secRequirements">1.1. Implementation Requirements</a></h2><h2 class="toc"><a href="CAproto.html#secBasicConcepts">1.2. Basic Concepts</a></h2><h3 class="toc"><a href="CAproto.html#secPVs">1.2.1. Process Variables</a></h3><h3 class="toc"><a href="CAproto.html#secChannels">1.2.2. Channels</a></h3><h3 class="toc"><a href="CAproto.html#secMonitors">1.2.3. Monitors</a></h3><h3 class="toc"><a href="CAproto.html#secClientLibrary">1.2.4. Channel Access Client Library</a></h3><h3 class="toc"><a href="CAproto.html#secRepeater">1.2.5. Repeater</a></h3><h3 class="toc"><a href="CAproto.html#secBeacons">1.2.6. Server Beacons</a></h3><h3 class="toc"><a href="CAproto.html#secVirtualCircuit">1.2.7. Virtual Circuit</a></h3><h3 class="toc"><a href="CAproto.html#secBuffering">1.2.8. Message Buffering</a></h3><h3 class="toc"><a href="CAproto.html#secVersions">1.2.9. Version compatibility</a></h3><h3 class="toc"><a href="CAproto.html#secExceptions">1.2.10. Exceptions</a></h3><h2 class="toc"><a href="CAproto.html#secOverallOperation">1.3. Overall Operation</a></h2><h1 class="toc"><a href="CAproto.html#secTypes">2. Data Types</a></h1><h1 class="toc"><a href="CAproto.html#secMessages">3. Messages</a></h1><h2 class="toc"><a href="CAproto.html#secMessageStructure">3.1. Message Structure</a></h2><h3 class="toc"><a href="CAproto.html#secHeader">3.1.1. Header</a></h3><h3 class="toc"><a href="CAproto.html#secPayload">3.1.2. Payload</a></h3><h2 class="toc"><a href="CAproto.html#secMessageIdentifiers">3.2. Message Identifiers</a></h2><h3 class="toc"><a href="CAproto.html#secCID">3.2.1. CID - Client ID</a></h3><h3 class="toc"><a href="CAproto.html#secSID">3.2.2. SID - Server ID</a></h3><h3 class="toc"><a href="CAproto.html#secSubscriptionID">3.2.3. Subscription ID</a></h3><h3 class="toc"><a href="CAproto.html#secIOID">3.2.4. IOID</a></h3><h1 class="toc"><a href="CAproto.html#secCommandsShared">4. Commands (TCP and UDP)</a></h1><h2 class="toc"><a href="CAproto.html#secCA_PROTO_VERSION">4.0. <tt class="identifier">CA_PROTO_VERSION</tt></a></h2><h3 class="toc"><a href="CAproto.html#secCA_PROTO_VERSIONRequest">4.0.1. Request</a></h3><h3 class="toc"><a href="CAproto.html#secCA_PROTO_VERSIONResponse">4.0.2. Response</a></h3><h2 class="toc"><a href="CAproto.html#secCA_PROTO_SEARCH">4.6. <tt class="identifier">CA_PROTO_SEARCH</tt></a></h2><h3 class="toc"><a href="CAproto.html#secCA_PROTO_SEARCHRequest">4.6.1. Request</a></h3><h3 class="toc"><a href="CAproto.html#secCA_PROTO_SEARCHResponse">4.6.2. Response</a></h3><h2 class="toc"><a href="CAproto.html#secCA_PROTO_NOT_FOUND">4.14. <tt class="identifier">CA_PROTO_NOT_FOUND</tt></a></h2><h3 class="toc"><a href="CAproto.html#secCA_PROTO_NOT_FOUNDResponse">4.14.1. Response</a></h3><h2 class="toc"><a href="CAproto.html#secCA_PROTO_ECHO">4.23. <tt class="identifier">CA_PROTO_ECHO</tt></a></h2><h3 class="toc"><a href="CAproto.html#secCA_PROTO_ECHORequest">4.23.1. Request</a></h3><h3 class="toc"><a href="CAproto.html#secCA_PROTO_ECHOResponse">4.23.2. Response</a></h3><h1 class="toc"><a href="CAproto.html#secCommandsUDP">5. Commands (UDP)</a></h1><h2 class="toc"><a href="CAproto.html#secCA_PROTO_RSRV_IS_UP">5.13. <tt class="identifier">CA_PROTO_RSRV_IS_UP</tt></a></h2><h3 class="toc"><a href="CAproto.html#secCA_PROTO_RSRV_IS_UPResponse">5.13.1. Response</a></h3><h2 class="toc"><a href="CAproto.html#secCA_REPEATER_CONFIRM">5.17. <tt class="identifier">CA_REPEATER_CONFIRM</tt></a></h2><h3 class="toc"><a href="CAproto.html#secCA_REPEATER_CONFIRMResponse">5.17.1. Response</a></h3><h2 class="toc"><a href="CAproto.html#secCA_REPEATER_REGISTER">5.24. <tt class="identifier">CA_REPEATER_REGISTER</tt></a></h2><h3 class="toc"><a href="CAproto.html#secCA_REPEATER_REGISTERRequest">5.24.1. Request</a></h3><h1 class="toc"><a href="CAproto.html#secCommandsTCP">6. Commands (TCP)</a></h1><h2 class="toc"><a href="CAproto.html#secCA_PROTO_EVENT_ADD">6.1. <tt class="identifier">CA_PROTO_EVENT_ADD</tt></a></h2><h3 class="toc"><a href="CAproto.html#secCA_PROTO_EVENT_ADDRequest">6.1.1. Request</a></h3><h3 class="toc"><a href="CAproto.html#secCA_PROTO_EVENT_ADDResponse">6.1.2. Response</a></h3><h2 class="toc"><a href="CAproto.html#secCA_PROTO_EVENT_CANCEL">6.2. <tt class="identifier">CA_PROTO_EVENT_CANCEL</tt></a></h2><h3 class="toc"><a href="CAproto.html#secCA_PROTO_EVENT_CANCELRequest">6.2.1. Request</a></h3><h3 class="toc"><a href="CAproto.html#secCA_PROTO_EVENT_CANCELResponse">6.2.2. Response</a></h3><h2 class="toc"><a href="CAproto.html#secCA_PROTO_READ">6.3. <tt class="identifier">CA_PROTO_READ</tt></a></h2><h3 class="toc"><a href="CAproto.html#secCA_PROTO_READRequest">6.3.1. Request</a></h3><h3 class="toc"><a href="CAproto.html#secCA_PROTO_READResponse">6.3.2. Response</a></h3><h2 class="toc"><a href="CAproto.html#secCA_PROTO_WRITE">6.4. <tt class="identifier">CA_PROTO_WRITE</tt></a></h2><h3 class="toc"><a href="CAproto.html#secCA_PROTO_WRITERequest">6.4.1. Request</a></h3><h2 class="toc"><a href="CAproto.html#secCA_PROTO_SNAPSHOT">6.5. <tt class="identifier">CA_PROTO_SNAPSHOT</tt></a></h2><h2 class="toc"><a href="CAproto.html#secCA_PROTO_BUILD">6.7. <tt class="identifier">CA_PROTO_BUILD</tt></a></h2><h2 class="toc"><a href="CAproto.html#secCA_PROTO_EVENTS_OFF">6.8. <tt class="identifier">CA_PROTO_EVENTS_OFF</tt></a></h2><h3 class="toc"><a href="CAproto.html#secCA_PROTO_EVENTS_OFFRequest">6.8.1. Request</a></h3><h2 class="toc"><a href="CAproto.html#secCA_PROTO_EVENTS_ON">6.9. <tt class="identifier">CA_PROTO_EVENTS_ON</tt></a></h2><h3 class="toc"><a href="CAproto.html#secCA_PROTO_EVENTS_ONRequest">6.9.1. Request</a></h3><h2 class="toc"><a href="CAproto.html#secCA_PROTO_READ_SYNC">6.10. <tt class="identifier">CA_PROTO_READ_SYNC</tt></a></h2><h3 class="toc"><a href="CAproto.html#secCA_PROTO_READ_SYNCRequest">6.10.1. Request</a></h3><h2 class="toc"><a href="CAproto.html#secCA_PROTO_ERROR">6.11. <tt class="identifier">CA_PROTO_ERROR</tt></a></h2><h3 class="toc"><a href="CAproto.html#secCA_PROTO_ERRORResponse">6.11.1. Response</a></h3><h2 class="toc"><a href="CAproto.html#secCA_PROTO_CLEAR_CHANNEL">6.12. <tt class="identifier">CA_PROTO_CLEAR_CHANNEL</tt></a></h2><h3 class="toc"><a href="CAproto.html#secCA_PROTO_CLEAR_CHANNELRequest">6.12.1. Request</a></h3><h3 class="toc"><a href="CAproto.html#secCA_PROTO_CLEAR_CHANNELResponse">6.12.2. Response</a></h3><h2 class="toc"><a href="CAproto.html#secCA_PROTO_READ_NOTIFY">6.15. <tt class="identifier">CA_PROTO_READ_NOTIFY</tt></a></h2><h3 class="toc"><a href="CAproto.html#secCA_PROTO_READ_NOTIFYRequest">6.15.1. Request</a></h3><h3 class="toc"><a href="CAproto.html#secCA_PROTO_READ_NOTIFYResponse">6.15.2. Response</a></h3><h2 class="toc"><a href="CAproto.html#secCA_PROTO_READ_BUILD">6.16. <tt class="identifier">CA_PROTO_READ_BUILD</tt></a></h2><h3 class="toc"><a href="CAproto.html#secCA_PROTO_READ_BUILDRequest">6.16.1. Request</a></h3><h2 class="toc"><a href="CAproto.html#secCA_PROTO_CREATE_CHAN">6.18. <tt class="identifier">CA_PROTO_CREATE_CHAN</tt></a></h2><h3 class="toc"><a href="CAproto.html#secCA_PROTO_CREATE_CHANRequest">6.18.1. Request</a></h3><h3 class="toc"><a href="CAproto.html#secCA_PROTO_CREATE_CHANResponse">6.18.2. Response</a></h3><h2 class="toc"><a href="CAproto.html#secCA_PROTO_WRITE_NOTIFY">6.19. <tt class="identifier">CA_PROTO_WRITE_NOTIFY</tt></a></h2><h3 class="toc"><a href="CAproto.html#secCA_PROTO_WRITE_NOTIFYRequest">6.19.1. Request</a></h3><h3 class="toc"><a href="CAproto.html#secCA_PROTO_WRITE_NOTIFYResponse">6.19.2. Response</a></h3><h2 class="toc"><a href="CAproto.html#secCA_PROTO_CLIENT_NAME">6.20. <tt class="identifier">CA_PROTO_CLIENT_NAME</tt></a></h2><h3 class="toc"><a href="CAproto.html#secCA_PROTO_CLIENT_NAMERequest">6.20.1. Request</a></h3><h2 class="toc"><a href="CAproto.html#secCA_PROTO_HOST_NAME">6.21. <tt class="identifier">CA_PROTO_HOST_NAME</tt></a></h2><h3 class="toc"><a href="CAproto.html#secCA_PROTO_HOST_NAMERequest">6.21.1. Request</a></h3><h2 class="toc"><a href="CAproto.html#secCA_PROTO_ACCESS_RIGHTS">6.22. <tt class="identifier">CA_PROTO_ACCESS_RIGHTS</tt></a></h2><h3 class="toc"><a href="CAproto.html#secCA_PROTO_ACCESS_RIGHTSResponse">6.22.1. Response</a></h3><h2 class="toc"><a href="CAproto.html#secCA_PROTO_SIGNAL">6.25. <tt class="identifier">CA_PROTO_SIGNAL</tt></a></h2><h2 class="toc"><a href="CAproto.html#secCA_PROTO_CREATE_CH_FAIL">6.26. <tt class="identifier">CA_PROTO_CREATE_CH_FAIL</tt></a></h2><h3 class="toc"><a href="CAproto.html#secCA_PROTO_CREATE_CH_FAILResponse">6.26.1. Response</a></h3><h2 class="toc"><a href="CAproto.html#secCA_PROTO_SERVER_DISCONN">6.27. <tt class="identifier">CA_PROTO_SERVER_DISCONN</tt></a></h2><h3 class="toc"><a href="CAproto.html#secCA_PROTO_SERVER_DISCONNResponse">6.27.1. Response</a></h3><h1 class="toc"><a href="CAproto.html#secPayloadDataTypes">7. Payload Data Types</a></h1><h2 class="toc"><a href="CAproto.html#secDBR_STS_STRING">7.7. <tt class="identifier">DBR_STS_STRING</tt></a></h2><h2 class="toc"><a href="CAproto.html#secDBR_STS_SHORT">7.8. <tt class="identifier">DBR_STS_SHORT</tt></a></h2><h2 class="toc"><a href="CAproto.html#secDBR_STS_FLOAT">7.9. <tt class="identifier">DBR_STS_FLOAT</tt></a></h2><h2 class="toc"><a href="CAproto.html#secDBR_STS_ENUM">7.10. <tt class="identifier">DBR_STS_ENUM</tt></a></h2><h2 class="toc"><a href="CAproto.html#secDBR_STS_CHAR">7.11. <tt class="identifier">DBR_STS_CHAR</tt></a></h2><h2 class="toc"><a href="CAproto.html#secDBR_STS_LONG">7.12. <tt class="identifier">DBR_STS_LONG</tt></a></h2><h2 class="toc"><a href="CAproto.html#secDBR_STS_DOUBLE">7.13. <tt class="identifier">DBR_STS_DOUBLE</tt></a></h2><h2 class="toc"><a href="CAproto.html#secDBR_TIME_STRING">7.14. <tt class="identifier">DBR_TIME_STRING</tt></a></h2><h2 class="toc"><a href="CAproto.html#secDBR_TIME_SHORT">7.15. <tt class="identifier">DBR_TIME_SHORT</tt></a></h2><h2 class="toc"><a href="CAproto.html#secDBR_TIME_FLOAT">7.16. <tt class="identifier">DBR_TIME_FLOAT</tt></a></h2><h2 class="toc"><a href="CAproto.html#secDBR_TIME_ENUM">7.17. <tt class="identifier">DBR_TIME_ENUM</tt></a></h2><h2 class="toc"><a href="CAproto.html#secDBR_TIME_CHAR">7.18. <tt class="identifier">DBR_TIME_CHAR</tt></a></h2><h2 class="toc"><a href="CAproto.html#secDBR_TIME_LONG">7.19. <tt class="identifier">DBR_TIME_LONG</tt></a></h2><h2 class="toc"><a href="CAproto.html#secDBR_TIME_DOUBLE">7.20. <tt class="identifier">DBR_TIME_DOUBLE</tt></a></h2><h2 class="toc"><a href="CAproto.html#secDBR_GR_STRING">7.21. <tt class="identifier">DBR_GR_STRING</tt></a></h2><h2 class="toc"><a href="CAproto.html#secDBR_GR_SHORT">7.22. <tt class="identifier">DBR_GR_SHORT</tt></a></h2><h2 class="toc"><a href="CAproto.html#secDBR_GR_INT">7.22. <tt class="identifier">DBR_GR_INT</tt></a></h2><h2 class="toc"><a href="CAproto.html#secDBR_GR_FLOAT">7.23. <tt class="identifier">DBR_GR_FLOAT</tt></a></h2><h2 class="toc"><a href="CAproto.html#secDBR_GR_ENUM">7.24. <tt class="identifier">DBR_GR_ENUM</tt></a></h2><h2 class="toc"><a href="CAproto.html#secDBR_GR_CHAR">7.25. <tt class="identifier">DBR_GR_CHAR</tt></a></h2><h2 class="toc"><a href="CAproto.html#secDBR_GR_LONG">7.26. <tt class="identifier">DBR_GR_LONG</tt></a></h2><h2 class="toc"><a href="CAproto.html#secDBR_GR_DOUBLE">7.27. <tt class="identifier">DBR_GR_DOUBLE</tt></a></h2><h2 class="toc"><a href="CAproto.html#secDBR_CTRL_STRING">7.28. <tt class="identifier">DBR_CTRL_STRING</tt></a></h2><h2 class="toc"><a href="CAproto.html#secDBR_CTRL_SHORT">7.29. <tt class="identifier">DBR_CTRL_SHORT</tt></a></h2><h2 class="toc"><a href="CAproto.html#secDBR_CTRL_INT">7.29. <tt class="identifier">DBR_CTRL_INT</tt></a></h2><h2 class="toc"><a href="CAproto.html#secDBR_CTRL_FLOAT">7.30. <tt class="identifier">DBR_CTRL_FLOAT</tt></a></h2><h2 class="toc"><a href="CAproto.html#secDBR_CTRL_ENUM">7.31. <tt class="identifier">DBR_CTRL_ENUM</tt></a></h2><h2 class="toc"><a href="CAproto.html#secDBR_CTRL_CHAR">7.32. <tt class="identifier">DBR_CTRL_CHAR</tt></a></h2><h2 class="toc"><a href="CAproto.html#secDBR_CTRL_LONG">7.33. <tt class="identifier">DBR_CTRL_LONG</tt></a></h2><h2 class="toc"><a href="CAproto.html#secDBR_CTRL_DOUBLE">7.34. <tt class="identifier">DBR_CTRL_DOUBLE</tt></a></h2><h1 class="toc"><a href="CAproto.html#secConstants">8. Constants</a></h1><h2 class="toc"><a href="CAproto.html#secPorts">8.1. Port numbers</a></h2><h2 class="toc"><a href="CAproto.html#secConstantsOperations">8.2. Representation of constants</a></h2><h2 class="toc"><a href="CAproto.html#secMask">8.3. Monitor Mask</a></h2><h2 class="toc"><a href="CAproto.html#secReplyFlag">8.4. Search Reply Flag</a></h2><h2 class="toc"><a href="CAproto.html#secAccessRights">8.5. Access Rights</a></h2><h1 class="toc"><a href="CAproto.html#secExampleMessage">9. Example message</a></h1><h1 class="toc"><a href="CAproto.html#secVirtualCircuitLifeCycle">10. Virtual Circuit Operation</a></h1><h2 class="toc"><a href="CAproto.html#secVirtualCircuitE">10.1. Establishing virtual circuit</a></h2><h2 class="toc"><a href="CAproto.html#secModesOfOperation">10.2. Basic mode of operation</a></h2><h2 class="toc"><a href="CAproto.html#secVCUnresponsive">10.3. Detecting virtual circuit unresponsiveness</a></h2><h2 class="toc"><a href="CAproto.html#secChannelLifeCycle">10.4. Channel life-cycle</a></h2><h2 class="toc"><a href="CAproto.html#secConnectingChannel">10.5. Connecting a Channel</a></h2><h2 class="toc"><a href="CAproto.html#secReadAndWrite">10.6. Read and Write operations</a></h2><h2 class="toc"><a href="CAproto.html#secSubscriptionsMonitors">10.7. Subscriptions and Monitors</a></h2><h2 class="toc"><a href="CAproto.html#secConnectionEvents">10.8. Connection events</a></h2><h2 class="toc"><a href="CAproto.html#secClosingChannel">10.9. Closing the channel</a></h2><h1 class="toc"><a href="CAproto.html#secRepeaterOperation">11. Repeater Operation</a></h1><h2 class="toc"><a href="CAproto.html#secRepeaterRole">11.1. Role</a></h2><h2 class="toc"><a href="CAproto.html#secRepeaterStartup">11.2. Startup</a></h2><h2 class="toc"><a href="CAproto.html#secClientDetection">11.3. Client detection</a></h2><h2 class="toc"><a href="CAproto.html#secRepeaterFanOut">11.4. Operation</a></h2><h2 class="toc"><a href="CAproto.html#secRepeaterShutdown">11.5. Shutdown</a></h2><h1 class="toc"><a href="CAproto.html#secServerBeacons">12. Server Beacons</a></h1><h1 class="toc"><a href="CAproto.html#secReturnCodes">13. Return Codes</a></h1><h1 class="toc"><a href="CAproto.html#secExampleConversation">14. Example conversation</a></h1><br></br><h1 class="toc"><a href="CAproto.html#glossary">Glossary of Terms</a></h1><h1 class="toc"><a href="CAproto.html#references">References</a></h1><h1 class="toc"><a href="CAproto.html#documentHistory">Document History</a></h1>
<h2>How to Read This Document</h2>
<p>This document's meta-information (authors, revision history, table of contents, ...) can be found above.
What follows below is the body of the document.
The body is composed of several sections, which may be further composed of subsections.</p>
<p>Typographical styles are used to denote entities of different kinds.
For a full list of entities and their respective typographic conventions, please refer to the <a href="http://epics.cosylab.com/cosycvs/CosyDoc/cosydocs/DOC-CosyDoc.html#secSchemaContentStyles">Styles section of the XML Documentation</a> document.</p>
</div>
</div>
<h1><a id="secIntroduction" href="CAproto.html#toc">1. Introduction</a></h1>
<h2><a id="secRequirements" href="CAproto.html#toc">1.1. Implementation Requirements</a></h2>
<p>
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", "OPTIONAL" in this document are to be interpreted as described in <a href="http://www.ietf.org/rfc/rfc2119.txt">RFC 2119: Key words for use in RFCs to Indicate Requirement Levels</a><a class="reference" href="CAproto.html#refRFC2119">[3]</a>.
</p>
<p>
An implementation is not compliant if it fails to satisfy one or more of the MUST or REQUIRED level requirements for the protocols it implements.
An implementation that satisfies all the MUST or REQUIRED level and all the SHOULD level requirements for its protocols is said to be "unconditionally compliant";
one that satisfies all the MUST level requirements but not all the SHOULD level requirements for its protocols is said to be "conditionally compliant."
</p>
<p>
This document is based on the original CA protocol implementation that accompanies EPICS.
Wherever the MAY, OPTIONAL or RECOMMENDED is specified, it implies that experience has shown such behaviour to improve either performance, portability or memory consumption.
</p>
<p>
A protocol implementation that is not unconditionally compliant MUST NOT be used in any production environment or used with EPICS databases controling physical devices.
</p>
<h2><a id="secBasicConcepts" href="CAproto.html#toc">1.2. Basic Concepts</a></h2>
<h3><a id="secPVs" href="CAproto.html#toc">1.2.1. Process Variables</a></h3>
<p>
A Process Variable (PV) is representation of a single value within an EPICS host.
</p>
<h3><a id="secChannels" href="CAproto.html#toc">1.2.2. Channels</a></h3>
<p>
A channel is created whenever a PV is connected using CA.
</p>
<p>
From implementation point of view, a channel is a connection, established over virtual circuit, between server and client through which a single PV is accessed.
Both the client and the server will provide a way of uniquely identifying channels.
These identifiers are explained in section <a href="CAproto.html#secMessageIdentifiers">Message Identifiers
(3.2.)</a>.
</p>
<h3><a id="secMonitors" href="CAproto.html#toc">1.2.3. Monitors</a></h3>
<p>
A monitor is created on a channel as a means of registering for asynchronous change notifications.
CA protocol defines the subscription mechanism through which clients register for notifications.
These changes will then be provided through monitor object or callback, depending on implementation and environment.
Monitors may be filtered to receive only a subset of events, such as value or alarm changes.
Several different monitors may be created for each channel.
</p>
<h3><a id="secClientLibrary" href="CAproto.html#toc">1.2.4. Channel Access Client Library</a></h3>
<p>
A client library implements channel access protocol and exposes it through a programmer-friendly API.
How the protocol and its mechanisms are implemented in the library depends on the programming language and no specific requirements are made with respect to this.
</p>
<h3><a id="secRepeater" href="CAproto.html#toc">1.2.5. Repeater</a></h3>
<p>
Repeater is a standalone process that allows several clients on one machine to share a predefined UDP port for recieving broadcast messages.
Broadcast messages are sent without prior knowledge of which port the CA clients and hosts are listening at, so predefined port numbers are used.
Since most network stack implementations do not allow multiple clients to listen on the same port, repeater is installed to listen on a single port, used for broadcast notifications.
Repeater will fan-out unmodified incoming datagram messages to all the clients on the same host, that have previously registered with the repeater.
</p>
<p>
Typically, a client library will attempt to register with the repeater during startup.
If repeater cannot be found or is not available, the library will attempt to spawn a new repeater process.
Repeater and client communicate using a minimal set of messages over UDP.
</p>
<h3><a id="secBeacons" href="CAproto.html#toc">1.2.6. Server Beacons</a></h3>
<p>
Server beacons are simple protocol messages that allow servers to broadcast their availability.
These messages are sent out periodically to announce their presence.
Additionally, these beacons are used to restore virtual circuits that have lost connections.
</p>
<h3><a id="secVirtualCircuit" href="CAproto.html#toc">1.2.7. Virtual Circuit</a></h3>
<p>
Channel Access protocol is designed to minimize resources used on both client and server.
Virtual circuits minimize number of TCP connections used between clients and servers.
Each client will have exactly one active and open TCP connection to an individual server, regardless of how many channels it accesses over it.
This helps to ensure that servers do not get overwhelmed by too many connections.
</p>
<p>
The life-cycle of a virtual circuit is defined in section <a href="CAproto.html#secVirtualCircuitLifeCycle">Virtual Circuit Operation
(10.)</a>.
</p>
<h3><a id="secBuffering" href="CAproto.html#toc">1.2.8. Message Buffering</a></h3>
<p>
When sending packets over network, channel access allows huge savings to be made by grouping individual messages in a single TCP packet.
This is performed by maintaining per virtual circuit buffers that collect all outgoing messages.
These buffers are flushed upon application's explicit request.
This mechanism is independent of the TCP/IP stack, which maintains its own send queue and defines a maximum frame size.
Messages sent over virtual circuit may be larger than this and will not always be aligned on frame boundary.
Implementation should also be aware that messages received may not yet be available entirely or will be split over several TCP frames.
</p>
<h3><a id="secVersions" href="CAproto.html#toc">1.2.9. Version compatibility</a></h3>
<p>
Certain aspects of Channel Access protocol have changed between releases.
In this document, Channel Access versions are identified using <tt class="identifier">CA_VXYY</tt>, where <tt class="identifier">X</tt> represents single-digit major version number and <tt class="identifier">YY</tt> represents a single- or double-digit minor version number.
Stating that a feature is available in <tt class="identifier">CA_VXYY</tt> implies that any client supporting version <tt class="identifier">XYY</tt> must support the feature.
Implementation must be backward compatible with all versions up to and including its declared supported minor version number.
</p>
<p>
Example: CA_V43, denotes version 4.3 (major version 4, minor version 3).
</p>
<p>
Currently, all protocol definitions are assumed to have major version 4.
Minor version ranges from 1 through 11.
</p>
<h3><a id="secExceptions" href="CAproto.html#toc">1.2.10. Exceptions</a></h3>
<p>
This document uses the concept of exceptions to refer to the mechanism of reporting errors that occur during command request execution.
An exception defines reporting of error condition on the server.
This can occur either due to client problem or due to some unexpected condition on the server (such as running out of resources).
Exceptions are reported either within the command's response or using a specialized message.
Actual form and method (response or asynhronously received message) depends on circumstances where the exception occurs.
Individual commands and messages determine which method is used.
</p>
<h2><a id="secOverallOperation" href="CAproto.html#toc">1.3. Overall Operation</a></h2>
<p>
This section is intended as a quick overview of channel access functionality and behaviour.
For more information, please refer to <a href="http://www.aps.anl.gov/epics/modules/base/R3-14/5-docs/CAref.html">Channel Access Reference Manual</a><a class="reference" href="CAproto.html#refCAReference">[1]</a>.
</p>
<p>
The goal of channel access (CA) is to provide remote access to records and fields managed by <b><i><a id="term:IOC" href="CAproto.html#glossary">IOC</a></i></b>, including search and discovery of hosts and minimal flow contol.
Protocol itself is designed to provide minimal overhead and maximize network throughput for transfer of large number of small data packets.
Additionaly, implementation overhead of the protocol can be kept very small, to allow operation with limited resources.
</p>
<p>
All commands and events in CA are encapsulated in predefined messages, which can be sent in one of three forms:
</p>
<ul>
<li>
As a <span class="bold">beacon</span>, which requires no confirmation.
Used for host discovery and keep-alive notification.
</li>
<li>
As a <span class="bold">request/response pair</span>.
Most commands use this method.
</li>
<li>
As a <span class="bold">subscriber notification</span>, where the client registers with the host and receives updates.
Event notification uses this method to report value changes.
</li>
</ul>
<p>
Communication between server and client is performed by sending command messages over UDP and TCP.
Client will use UDP to search for hosts and PVs, server will use them to notify its startup and shutdown.
Once client requests a specific <b><i><a id="term:PV" href="CAproto.html#glossary">PV</a></i></b> (by specifying its name), UDP message will be broadcast to either a subnet or a list of predefined addresses, and the server which hosts requested PV will respond.
</p>
<p>
Data exchange between client and server is performed over TCP.
After locating the PV, the client will establish a TCP connection to the server.
If more that one PV is found to be on the same server, client will use existing TCP connection.
Reusable TCP connection between client and server is called <b><i><a id="term:Virtualcircuit" href="CAproto.html#glossary">Virtual circuit</a></i></b>.
</p>
<p>
Once a virtual circuit is established or already available, channels can be created to PVs.
</p>
<p>
Let's assume the following setup of PVs and hosts:
</p>
<ul>
<li>PV "A" is located on host IOC1.</li>
<li>PV "B" is located on host IOC2.</li>
<li>PV "C" does not exist on either host.</li>
<li>PV "D" is located both hosts, IOC1 and IOC2.</li>
</ul>
<p>
A typical scenario would be similar to this:
</p>
<ol>
<li>
User application starts and initializes channel access client library.
During initialization, client library might spawn a new repeater process or register with an existing one.
If successful, the library is ready to start using the channel access.
</li>
<li>
Application will start searching for PVs named "A", "B", "C" and "D".
Client will send UDP search packets with "A", "B", "C" and "D" PV names, and wait for an application-specified amount of time.
To which network hosts (broadcast or specific IP) these packets are actually sent depends on configuration of the client.
</li>
<li>
All hosts that receive this message will check their database and if they know about any of these PV names, they will respond using UDP search response message.
Thus, IOC1 will respond with "A" and "D", whereas IOC2 will respond with "B" and "D".
</li>
<li>
For each search packet sent, the client will wait for a predefined ammount of time or until response is received.
</li>
<li>
In this case (assuming no packet loss in the network), the client will establish a virtual circuit (TCP connection) to IOC1 and IOC2.
PV "C" will be assumed to be unavailable at this point and will be ignored.
Since "D" is located on both hosts, client will be unable to distinguish between them.
First response received will be considered to be proper answer and any additional responses will be considered erroneous and reported to user.
</li>
<li>
Once virtual circuits are established, client can access values of "A", "B" and "D".
From now on, all messages for either of the PVs will be sent via a corresponding virtual circuit.
</li>
<li>
If virtual circuit looses TCP connection or the host disconnects, client will notify application appropriately.
Client will also listen for server beacon messages (sent whenever IOC host starts), to be able to restore any lost connections.
Beacons are also used to detect when a host stops responding.
</li>
<li>
Once the application is done using the channel access library, it will gracefully close any open connections.
</li>
</ol>
<h1><a id="secTypes" href="CAproto.html#toc">2. Data Types</a></h1>
<p>
This section defines all primitive data types employed by the CA, as well as their C/C++ equivalents.
These data types are referred to in the subsequent sections.
</p>
<table class="table" cellspacing="0">
<tr class="even">
<th>Type Name</th>
<th>C/C++</th>
<th>Description</th>
</tr>
<tr class="even">
<td class="center"><tt class="identifier">BYTE</tt></td>