[ Click here to show document header. ]
LicenseThis document is distributed under the terms of the GNU Free Documentation License, version 1.2. ScopeThis 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. AudienceThe 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. Table of Contents1. Introduction1.1. Implementation Requirements1.2. Basic Concepts1.2.1. Process Variables1.2.2. Channels1.2.3. Monitors1.2.4. Channel Access Client Library1.2.5. Repeater1.2.6. Server Beacons1.2.7. Virtual Circuit1.2.8. Message Buffering1.2.9. Version compatibility1.2.10. Exceptions1.3. Overall Operation2. Data Types3. Messages3.1. Message Structure3.1.1. Header3.1.2. Payload3.2. Message Identifiers3.2.1. CID - Client ID3.2.2. SID - Server ID3.2.3. Subscription ID3.2.4. IOID4. Commands (TCP and UDP)4.0. CA_PROTO_VERSION4.0.1. Request4.0.2. Response4.6. CA_PROTO_SEARCH4.6.1. Request4.6.2. Response4.14. CA_PROTO_NOT_FOUND4.14.1. Response4.23. CA_PROTO_ECHO4.23.1. Request4.23.2. Response5. Commands (UDP)5.13. CA_PROTO_RSRV_IS_UP5.13.1. Response5.17. CA_REPEATER_CONFIRM5.17.1. Response5.24. CA_REPEATER_REGISTER5.24.1. Request6. Commands (TCP)6.1. CA_PROTO_EVENT_ADD6.1.1. Request6.1.2. Response6.2. CA_PROTO_EVENT_CANCEL6.2.1. Request6.2.2. Response6.3. CA_PROTO_READ6.3.1. Request6.3.2. Response6.4. CA_PROTO_WRITE6.4.1. Request6.5. CA_PROTO_SNAPSHOT6.7. CA_PROTO_BUILD6.8. CA_PROTO_EVENTS_OFF6.8.1. Request6.9. CA_PROTO_EVENTS_ON6.9.1. Request6.10. CA_PROTO_READ_SYNC6.10.1. Request6.11. CA_PROTO_ERROR6.11.1. Response6.12. CA_PROTO_CLEAR_CHANNEL6.12.1. Request6.12.2. Response6.15. CA_PROTO_READ_NOTIFY6.15.1. Request6.15.2. Response6.16. CA_PROTO_READ_BUILD6.16.1. Request6.18. CA_PROTO_CREATE_CHAN6.18.1. Request6.18.2. Response6.19. CA_PROTO_WRITE_NOTIFY6.19.1. Request6.19.2. Response6.20. CA_PROTO_CLIENT_NAME6.20.1. Request6.21. CA_PROTO_HOST_NAME6.21.1. Request6.22. CA_PROTO_ACCESS_RIGHTS6.22.1. Response6.25. CA_PROTO_SIGNAL6.26. CA_PROTO_CREATE_CH_FAIL6.26.1. Response6.27. CA_PROTO_SERVER_DISCONN6.27.1. Response7. Payload Data Types7.7. DBR_STS_STRING7.8. DBR_STS_SHORT7.9. DBR_STS_FLOAT7.10. DBR_STS_ENUM7.11. DBR_STS_CHAR7.12. DBR_STS_LONG7.13. DBR_STS_DOUBLE7.14. DBR_TIME_STRING7.15. DBR_TIME_SHORT7.16. DBR_TIME_FLOAT7.17. DBR_TIME_ENUM7.18. DBR_TIME_CHAR7.19. DBR_TIME_LONG7.20. DBR_TIME_DOUBLE7.21. DBR_GR_STRING7.22. DBR_GR_SHORT7.22. DBR_GR_INT7.23. DBR_GR_FLOAT7.24. DBR_GR_ENUM7.25. DBR_GR_CHAR7.26. DBR_GR_LONG7.27. DBR_GR_DOUBLE7.28. DBR_CTRL_STRING7.29. DBR_CTRL_SHORT7.29. DBR_CTRL_INT7.30. DBR_CTRL_FLOAT7.31. DBR_CTRL_ENUM7.32. DBR_CTRL_CHAR7.33. DBR_CTRL_LONG7.34. DBR_CTRL_DOUBLE8. Constants8.1. Port numbers8.2. Representation of constants8.3. Monitor Mask8.4. Search Reply Flag8.5. Access Rights9. Example message10. Virtual Circuit Operation10.1. Establishing virtual circuit10.2. Basic mode of operation10.3. Detecting virtual circuit unresponsiveness10.4. Channel life-cycle10.5. Connecting a Channel10.6. Read and Write operations10.7. Subscriptions and Monitors10.8. Connection events10.9. Closing the channel11. Repeater Operation11.1. Role11.2. Startup11.3. Client detection11.4. Operation11.5. Shutdown12. Server Beacons13. Return Codes14. Example conversationGlossary of TermsReferencesDocument HistoryHow to Read This DocumentThis 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. 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 Styles section of the XML Documentation document. When viewing the document in a non-printed form, it is possible to submit comments regarding a given section to the document's owner. This is achieved by clicking the mail icon next to the section title. For this to work, your mail must be configured to properly handle the mailto URLs. 1. Introduction
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Type Name | C/C++ | Description |
|---|---|---|
| BYTE | char | Signed 8-bit integer. |
| UBYTE | unsigned char | Unsigned 8-bit integer. |
| INT16 | short | Signed 16-bit integer. |
| UINT16 | unsigned short | Unsigned 16-bit integer. |
| INT32 | int | Signed 32-bit integer. |
| UINT32 | unsigned int | Unsigned 32-bit integer. |
| FLOAT | float | IEEE 32-bit float. |
| DOUBLE | double | IEEE 64-bit float. |
| STRING[n] | char[] | Array of UBYTEs. If [n] is specified, it indicates maximum allowed number of characters in this string including (if neccessary) termination character. |
| TIMESTAMP | None | Timestamp represented with two UINT32 values. First is number of seconds since 0000 Jan 1, 1990. Second is number of nanoseconds within second |
All values are transmitted over the network in big-endian (network) order. For example: UINT32 3145 (0x00000C49) would be sent over the network represented as 00 00 0C 49.
![[Send e-mail to document owner].](../../../images/Mail.gif)
![[Send e-mail to document owner].](../../../images/Mail.gif)
All channel access messages are composed of a header, followed by the payload.
Header is always present. Its structure is fixed, and contains predefined fields. At the very least, this will be command ID and payload size. Other header fields may carry command-specific meaning. If a field is not used within a certain message, its value must be 0 (0x00).
Payload is a sequence of bytes, which are command and version dependent. Implementation is required to provide proper payload with respect to individual command specification.
Total size of an individual message is limited. With CA versions older than CA_V49, the maximum message size is limited to 16384 (0x4000) bytes. Out of these, header has a fixed size of 16 (0x10) bytes, with the payload having a maximum size of 16368 (0x3ff0) bytes.
Versions CA_V49 and higher may use the extended message form, which allows for larger payloads. The extended message form is indicated by the header fields Payload Size and Data Count being set to 0xffff and 0, respectively. Real payload size and data count are then given as UINT32 type values immediately following the header. Maximum message size is limited by 32-bit unsigned integer representation, 4294967295 (0xffffffff). Maximum payload size is limited to 4294967255 (0xffffffe7).
Extended message form should only be used if payload size actualy exceeds the pre-CA_V49 message size limit of 16368 bytes.
![[Send e-mail to document owner].](../../../images/Mail.gif)
Names of header fields are based on their most common use. Certain messages will use individual fields for purposes other than those described here. These variations are documented for each message individually. All of values in header are unsigned integers.
The common header present in all messages is structured as follows:
| Parameter | Type | Description |
|---|---|---|
| Command | UINT16 | Identifier of the command this message requests. The meaning of other header fields and the payload depends on the command. |
| Payload Size | UINT16 | Size of the payload (in bytes). Must not exceed 0x4000. Value of 0xFFFF indicates extended message. |
| Data Type | UINT16 | Identifier of the data type carried in the payload. Data types are defined in section Payload Data Types (7.). |
| Data Count | UINT16 | Number of elements in the payload. |
| Parameter 1 | UINT32 | Command dependent parameter. |
| Parameter 2 | UINT32 | Command dependent parameter. |
The extended message header (CA_V49 and newer) has the following structure:
| Parameter | Type | Description |
|---|---|---|
| Command | UINT16 | Identifier of the command this message requests. The meaning of other header fields and the payload depends on the command. |
| 0xFFFF | UINT16 | Extended message marker. |
| Data Type | UINT16 | Identifier of the data type carried in the payload. Data types are defined in section Payload Data Types (7.). |
| 0x0000 | UINT16 | Extended message marker. |
| Parameter 1 | UINT32 | Command dependent parameter. |
| Parameter 2 | UINT32 | Command dependent parameter. |
| Payload Size | UINT32 | Size of the payload (in bytes). |
| Data Count | UINT32 | Number of elements in the payload. |
![[Send e-mail to document owner].](../../../images/Mail.gif)
The structure of the payload depends on the type of the message. The size of the payload matches the Payload Size header field.
![]() | If the payload size is not a multiple of 8, zero-padding must be performed to achieve 8-byte alignment. |
![[Send e-mail to document owner].](../../../images/Mail.gif)
Some fields in messages serve as identifiers, which must be properly handled by the implementation. These fields serve as identification tokens in asynchronous communication and must be unique within the context of the client library. Recommended scheme for allocating these values is to create them sequentially starting at 0. All IDs are represented with UINT32.
Overflow must be anticipated! Although it is unlikely that an application will need more than 232 different channel IDs, such an overflow can occur with the IOID identifier (see below).
![[Send e-mail to document owner].](../../../images/Mail.gif)
CID identifies individual channel within client library context. When a message requires the CID, this value must be passed. CID for a given channel may not change within the lifetime of the channel.
Recommended way of allocating CIDs is sequential 0-based indexing. First client library channel reference that is created has value of 0, second 1, etc. Duplicate CIDs within a single active instance of client library are not allowed.
CID value is passed to the server when the channel is actually connected.
Overflow should be potentially handled, since an application with expected long lifetime and frequent channel allocation and destruction might increase the index frequently. The best way to handle it is to ignore the problem until the first overflow. When that occurs, old CIDs should be no longer relevant, and CID value can be restarted from 0, but excluding any already used values.
![[Send e-mail to document owner].](../../../images/Mail.gif)
Performs the same function as CID, but is provided by the server when the channel is connected. SID of channel will never change, unless the channel represented by particular SID is removed from the server during runtime. In that case, the channel will be no longer available.
To handle overflows, the same method could be used as for the Client Channel ID.
![[Send e-mail to document owner].](../../../images/Mail.gif)
When a subscription is created on a channel (monitor), a unique subscription ID must be provided. Client library will use this ID to identify different subscriptions on the same channel. This value will allow the client library to dispatch monitors appropriately.
Any subscription ID is only valid during the subscription's lifespan. After that, IDs may be reused.
![[Send e-mail to document owner].](../../../images/Mail.gif)
Unique ID is given to all read and write messages sent by the client library.
ID passed with the request will be returned in the matching response.
Properly handling the wrapping of identifiers is vital to IOID, since an individual ID is used each time a request is made.
![[Send e-mail to document owner].](../../../images/Mail.gif)
The following commands are sent as either UDP datagrams or TCP messages. Some of the messages are also used within the context of a Virtual Circuit.
![[Send e-mail to document owner].](../../../images/Mail.gif)
Command: CA_PROTO_VERSION
ID: 0 (0x00)
Description: Exchanges client and server protocol versions and desired circuit priority. This is the first message sent when a new TCP (Virtual Circuit) connection is established. Must be sent before any other exchange between client, server and repeater. The communication is not strictly request response, but will be perceived as such by the implementation. When a new TCP connection is established by the client, CA_PROTO_VERSION is sent. Likewise, the server will accept the connection and send the response form back. Sent over UDP or TCP.
![[Send e-mail to document owner].](../../../images/Mail.gif)
Header
| Field | Value | Description |
|---|---|---|
| Command | 0 | Command identifier for CA_PROTO_VERSION. |
| Payload size | 0 | Must be 0. |
| Priority | Desired priority | Virtual circuit priority. |
| Version | Version number | Minor protocol version number. Only used when sent over TCP. |
| Reserved | 0 | Must be 0. |
| Reserved | 0 | Must be 0. |
Compatibility
| Version | Comment |
|---|---|
| >= CA_V411 | Server will send response immediately after establishing a virtual circuit. |
| < CA_V411 | Message does not include minor version number (it is always 0) and is interpreted as an echo command that carries no data. Version exchange is performed immediately after CA_PROTO_CREATE_CHAN (6.18.). |
Comments
![[Send e-mail to document owner].](../../../images/Mail.gif)
Header
| Field | Value | Description |
|---|---|---|
| Command | 0 | Command identifier for CA_PROTO_VERSION. |
| Reserved | 0 | Must be 0. |
| Priority | 0 | Must be 0. |
| Version | Version number | Minor protocol version number. Only used when sent over TCP. |
| Reserved | 0 | Must be 0. |
| Reserved | 0 | Must be 0. |
Compatibility
| Version | Comment |
|---|---|
| >= CA_V411 | Server will not respond to request, but send response immediately after establishing a virtual circuit. |
| < CA_V411 | Message does not include minor version number (it is always 0). |
![[Send e-mail to document owner].](../../../images/Mail.gif)
Command: CA_PROTO_SEARCH
ID: 6 (0x06)
Description: Searches for a given channel name. Sent over UDP or TCP.
![[Send e-mail to document owner].](../../../images/Mail.gif)
Header
| Field | Value | Description |
|---|---|---|
| Command | 6 | Command identifier for CA_PROTO_SEARCH. |
| Payload Size | >= 0 | Padded size of channel name. |
| Reply | Reply Flag | Search Reply Flag (8.4.), indicating whether failed search response should be returned. |
| Version | Version Number | Client minor protocol version number. |
| CID | Channel CID | Client allocated CID. |
| CID | Channel CID | Client allocated CID. |
Payload
| Name | Type | Value | Description |
|---|---|---|---|
| Channel name | STRING | Name of channel to search for. |
Comments
![[Send e-mail to document owner].](../../../images/Mail.gif)
Header
| Field | Value | Description |
|---|---|---|
| Command | 6 | Command identifier for CA_PROTO_SEARCH. |
| Payload Size | 8 | Payload size is constant. |
| Data Type | Port number | TCP Port number of server that responded. |
| Data Count | 0 | Must be 0. |
| SID | 0xffffffff | Temporary SID, SID - Server ID (3.2.2.). |
| CID | Same as request | Channel CID, CID - Client ID (3.2.1.). |
Payload
| Name | Type | Value | Description |
|---|---|---|---|
| Server protocol version | UINT16 | Server protocol version. |
Comments
![[Send e-mail to document owner].](../../../images/Mail.gif)
Command: CA_PROTO_NOT_FOUND
ID: 14 (0x0E)
Description: Indicates that a channel with requested name does not exist. Sent in response to CA_PROTO_SEARCH (4.6.), but only when its DO_REPLY flag was set. Sent over UDP.
![[Send e-mail to document owner].](../../../images/Mail.gif)
Header
| Field | Value | Description |
|---|---|---|
| Command | 14 | Command identifier for CA_PROTO_NOT_FOUND. |
| Reserved | 0 | Must be 0. |
| Reply Flag | DO_REPLY | Same reply flag as in request: always DO_REPLY. |
| Version | Same as request | Client minor protocol version number. |
| CID | Same as request | CID of the channel. |
| CID | Same as request | CID of the channel. |
Comments
![[Send e-mail to document owner].](../../../images/Mail.gif)
Command: CA_PROTO_ECHO
ID: 23 (0x17)
Description: Connection verify used by CA_V43. Sent over TCP.
![[Send e-mail to document owner].](../../../images/Mail.gif)
Header
| Field | Value | Description |
|---|---|---|
| Command | 23 | Command identifier for CA_PROTO_ECHO. |
| Reserved | 0 | Must be 0. |
| Reserved | 0 | Must be 0. |
| Reserved | 0 | Must be 0. |
| Reserved | 0 | Must be 0. |
| Reserved | 0 | Must be 0. |
![[Send e-mail to document owner].](../../../images/Mail.gif)
Header
| Field | Value | Description |
|---|---|---|
| Command | 23 | Command identifier for CA_PROTO_ECHO. |
| Reserved | 0 | Must be 0. |
| Reserved | 0 | Must be 0. |
| Reserved | 0 | Must be 0. |
| Reserved | 0 | Must be 0. |
| Reserved | 0 | Must be 0. |
![[Send e-mail to document owner].](../../../images/Mail.gif)
The following commands are sent as UDP datagrams.
![[Send e-mail to document owner].](../../../images/Mail.gif)
Command: CA_PROTO_RSRV_IS_UP
ID: 13 (0x0D)
Description: Beacon sent by a server when it becomes available. Beacons are also sent out periodically to announce the server is still alive. Another function of beacons is to allow detection of changes in network topology. Sent over UDP.
![[Send e-mail to document owner].](../../../images/Mail.gif)
Header
| Field | Value | Description |
|---|---|---|
| Command | 13 | Command identifier for CA_PROTO_RSRV_IS_UP. |
| Reserved | 0 | Must be 0. |
| Server port | >= 0 | TCP Port the server is listening on. |
| Reserved | 0 | Must be 0. |
| BeaconID | Sequential integers | Sequential Beacon ID. |
| Address | 0 or IP | May contain IP address of the server. |
Comments
![[Send e-mail to document owner].](../../../images/Mail.gif)
Command: CA_REPEATER_CONFIRM
ID: 17 (0x11)
Description: Confirms successful client registration with repeater. Sent over UDP.
![[Send e-mail to document owner].](../../../images/Mail.gif)
Header
| Field | Value | Description |
|---|---|---|
| Command | 17 | Command identifier for CA_REPEATER_CONFIRM. |
| Reserved | 0 | Must be 0. |
| Reserved | 0 | Must be 0. |
| Reserved | 0 | Must be 0. |
| Reserved | 0 | Must be 0. |
| Repeater address | IP address | Address with which the registration succeeded. |
Comments
![[Send e-mail to document owner].](../../../images/Mail.gif)
Command: CA_REPEATER_REGISTER
ID: 24 (0x18)
Description: Requests registration with the repeater. Repeater will confirm successful registration using CA_REPEATER_CONFIRM. Sent over TCP.
![[Send e-mail to document owner].](../../../images/Mail.gif)
Header
| Field | Value | Description |
|---|---|---|
| Command | CA_REPEATER_REGISTER | Command identifier |
| Reserved | 0 | Must be 0 |
| Reserved | 0 | Must be 0 |
| Reserved | 0 | Must be 0 |
| Reserved | 0 | Must be 0 |
| Client IP address | IP address | IP address on which the client is listening |
![[Send e-mail to document owner].](../../../images/Mail.gif)
The following commands are used within the context of Virtual Circuit and are sent using TCP.
![[Send e-mail to document owner].](../../../images/Mail.gif)
Command: CA_PROTO_EVENT_ADD
ID: 1 (0x01)
Description: Creates a subscription on a channel, allowing the client to be notified of changes in value. A request will produce at least one response. Sent over TCP.
![[Send e-mail to document owner].](../../../images/Mail.gif)
Header
| Field | Value | Description |
|---|---|---|
| Command | 1 | Command identifier for CA_PROTO_EVENT_ADD |
| Payload Size | 16 | Payload size is constant |
| Data Type | Desired DBR type of the return value. | |
| Data Count | >= 0 | Desired number of elements |
| SID | SID of the channel. | SID of the channel on which to reqister this subscription. See SID - Server ID (3.2.2.). |
| SubscriptionID | Client provided Subscription ID | Subscription ID identifying this subscription. See Subscription ID (3.2.3.). |
Payload
| Name | Type | Value | Description |
|---|---|---|---|
| Low val | FLOAT32 | 0.0 | Low value |
| High val | FLOAT32 | 0.0 | High value |
| To val | FLOAT32 | 0.0 | To value |
| Mask | UINT16 | Monitor mask | Mask (8.3.) indicating which events to report |
Comments
![[Send e-mail to document owner].](../../../images/Mail.gif)
Header
| Field | Value | Description |
|---|---|---|
| Command | 1 | Command identifier for CA_PROTO_EVENT_ADD |
| Payload Size | >= 0 | Size of the response. |
| Data Type | same as request | Payload data type. |
| Data Count | same as request | Payload data count. |
| Status code | One of ECA codes | Status code (13.) (ECA_NORMAL on success). |
| SubscriptionID | same as request | Subscription ID |
Payload
| Name | Type | Value | Description |
|---|---|---|---|
| Values | DBR | Value stored as DBR type specified in Data Type field. See Payload Data Types (7.). |
Comments
![[Send e-mail to document owner].](../../../images/Mail.gif)
Command: CA_PROTO_EVENT_CANCEL
ID: 2 (0x02)
Description: Clears event subscription. This message will stop event updates for specified channel. Sent over TCP.
![[Send e-mail to document owner].](../../../images/Mail.gif)
Header
| Field | Value | Description |
|---|---|---|
| Command | 2 | Command identifier for CA_PROTO_EVENT_CANCEL. |
| Payload Size | 0 | Must be 0. |
| Data Type | Same value as in corresponding CA_PROTO_EVENT_ADD (6.1.). | |
| Data Count | >= 0 | Same value as in corresponding CA_PROTO_EVENT_ADD (6.1.). |
| SID | SID of channel | Same value as in corresponding CA_PROTO_EVENT_ADD (6.1.). |
| SubscriptionID | Subscription ID | Same value as in corresponding CA_PROTO_EVENT_ADD (6.1.). |
Comments
![[Send e-mail to document owner].](../../../images/Mail.gif)
Header
| Field | Value | Description |
|---|---|---|
| Command | 1 | Command identifier for CA_PROTO_EVENT_ADD. |
| Payload Size | 0 | Must be 0. |
| Data Type | Same as request. | Same value as CA_PROTO_EVENT_ADD request. |
| Data Count | 0 | Must be 0. |
| SID | Same as request. | Same value as CA_PROTO_EVENT_ADD request. |
| SubscriptionID | Same as request. | Same value as CA_PROTO_EVENT_ADD request. |
Comments
![[Send e-mail to document owner].](../../../images/Mail.gif)
Command: CA_PROTO_READ
ID: 3 (0x03)
Description:
Read value of a channel. Sent over TCP.
Deprecated since protocol version 3.13.
![[Send e-mail to document owner].](../../../images/Mail.gif)
Header
| Field | Value | Description |
|---|---|---|
| Command | 3 | Command identifier for CA_PROTO_READ_NOTIFY. |
| Payload Size | 0 | Must be 0. |
| Data Type | DBR type | Desired type of the return value. |
| Data Count | >= 0 | Desired number of elements to read. |
| SID | Channel SID | SID of the channel to read. |
| IOID | Client provided IOID | IOID of this operation. |
Comments
![[Send e-mail to document owner].](../../../images/Mail.gif)
Header
| Field | Value | Description |
|---|---|---|
| Command | 3 | Command identifier for CA_PROTO_READ_NOTIFY. |
| Payload size | Size of payload | Size of DBR formatted data in payload. |
| Data type | DBR type | Payload format. |
| Data count | >= 0 | Payload element count. |
| SID | Same as request | SID of the channel. |
| IOID | Same as request | IOID of this operation. |
Payload
| Name | Type | Value | Description |
|---|---|---|---|
| DBR formatted data | DBR | DBR formatted data | Value stored as DBR type specified in Data type field. Data count specifies number of elements of DBR value field. |
![[Send e-mail to document owner].](../../../images/Mail.gif)
Command: CA_PROTO_WRITE
ID: 4 (0x04)
Description: Writes new channel value. Sent over TCP.
![[Send e-mail to document owner].](../../../images/Mail.gif)
Header
| Field | Value | Description |
|---|---|---|
| Command | CA_PROTO_WRITE | Command identifier |
| Payload size | Size of DBR formatted payload | Size of padded payload |
| Data type | DBR type | Format of payload |
| Data count | ELEMENT_COUNT | Number of elements in payload |
| SID | SID provided by server | Server channel ID |
| IOID | Client provided IOID | Request ID |
Payload
| Name | Type | Value | Description |
|---|---|---|---|
| DBR formatted data | DBR | DBR formatted data | Value stored as DBR type specified in Data type field. Data count specifies number of elements of DBR value field. |
Comments
![[Send e-mail to document owner].](../../../images/Mail.gif)
Command: CA_PROTO_SNAPSHOT
ID: 5 (0x05)
Description: Obsolete.
![[Send e-mail to document owner].](../../../images/Mail.gif)
Command: CA_PROTO_BUILD
ID: 7 (0x07)
Description: Obsolete.
![[Send e-mail to document owner].](../../../images/Mail.gif)
Command: CA_PROTO_EVENTS_OFF
ID: 8 (0x08)
Description: Disables a server from sending any subscription updates over this virtual circuit. Sent over TCP. This mechanism is used by clients with slow CPU to prevent congestion when they are unable to handle all updates recived. Effective automated handling of flow control is beyond the scope of this document.
![[Send e-mail to document owner].](../../../images/Mail.gif)
Header
| Field | Value | Description |
|---|---|---|
| Command | 8 | Command identifier for CA_PROTO_EVENTS_OFF |
| Reserved | 0 | Must be 0. |
| Reserved | 0 | Must be 0. |
| Reserved | 0 | Must be 0. |
| Reserved | 0 | Must be 0. |
| Reserved | 0 | Must be 0. |
Comments
![[Send e-mail to document owner].](../../../images/Mail.gif)
Command: CA_PROTO_EVENTS_ON
ID: 9 (0x09)
Description: Enables the server to resume sending subscription updates for this virtual circuit. Sent over TCP. This mechanism is used by clients with slow CPU to prevent congestion when they are unable to handle all updates recived. Effective automated handling of flow control is beyond the scope of this document.
![[Send e-mail to document owner].](../../../images/Mail.gif)
Header
| Field | Value | Description |
|---|---|---|
| Command | 9 | Command identifier for CA_PROTO_EVENTS_ON |
| Reserved | 0 | Must be 0. |
| Reserved | 0 | Must be 0. |
| Reserved | 0 | Must be 0. |
| Reserved | 0 | Must be 0. |
| Reserved | 0 | Must be 0. |
Comments
![[Send e-mail to document owner].](../../../images/Mail.gif)
Command: CA_PROTO_READ_SYNC
ID: 10 (0x0A)
Description: Deprecated since protocol version 3.13.
![[Send e-mail to document owner].](../../../images/Mail.gif)
Header
| Field | Value | Description |
|---|---|---|
| Command | 10 | Command identifier for CA_PROTO_READ_SYNC. |
| Reserved | 0 | Must be 0. |
| Reserved | 0 | Must be 0. |
| Reserved | 0 | Must be 0. |
| Reserved | 0 | Must be 0. |
| Reserved | 0 | Must be 0. |
![[Send e-mail to document owner].](../../../images/Mail.gif)
Command: CA_PROTO_ERROR
ID: 11 (0x0B)
Description: Sends error message and code. This message is only sent from server to client in response to any request that fails and does not include error code in response. This applies to all asynchronous commands. Error message will contain a copy of original request and textual description of the error. Sent over UDP.
![[Send e-mail to document owner].](../../../images/Mail.gif)
Header
| Field | Value | Description |
|---|---|---|
| Command | 11 | Command identifier for CA_PROTO_ERROR |
| Payload Size | Size of the request header that triggered the error plus size of the error message. | |
| Reserved | 0 | Must be 0. |
| Reserved | 0 | Must be 0. |
| CID | Channel CID | CID of the channel for which request failed, CID - Client ID (3.2.1.). |
| Status Code | One of ECA codes | Error status code (13.). |
Payload
| Name | Type | Value | Description |
|---|---|---|---|
| Original Request | Message Header | Header of the request that caused the error. | |
| Error Message | STRING | A null-terminated string conveying the error message. |
Comments
![[Send e-mail to document owner].](../../../images/Mail.gif)
Command: CA_PROTO_CLEAR_CHANNEL
ID: 12 (0x0C)
Description: Clears a channel. This command will cause server to release the associated channel resources and no longer accept any requests for this SID/CID.
![[Send e-mail to document owner].](../../../images/Mail.gif)
Header
| Field | Value | Description |
|---|---|---|
| Command | 12 | Command identifier of CA_PROTO_CLEAR_COMMAND |
| Reserved | 0 | Must be 0. |
| Reserved | 0 | Must be 0. |
| Reserved | 0 | Must be 0. |
| SID | SID of the channel | SID of channel to clear. |
| CID | CID of the channel | CID of channel to clear. |
![[Send e-mail to document owner].](../../../images/Mail.gif)
Header
| Field | Value | Description |
|---|---|---|
| Command | 12 | Command identifier of CA_PROTO_CLEAR_COMMAND |
| Reserved | 0 | Must be 0. |
| Reserved | 0 | Must be 0. |
| Reserved | 0 | Must be 0. |
| SID | Same as request | SID of cleared channel. |
| CID | Same as request | CID of cleared channel. |
Comments
![[Send e-mail to document owner].](../../../images/Mail.gif)
Command: CA_PROTO_READ_NOTIFY
ID: 15 (0x0F)
Description: Read value of a channel. Sent over TCP.
![[Send e-mail to document owner].](../../../images/Mail.gif)
Header
| Field | Value | Description |
|---|---|---|
| Command | 15 | Command identifier for CA_PROTO_READ_NOTIFY. |
| Payload Size | 0 | Must be 0. |
| Data Type | DBR type | Desired type of the return value. |
| Data Count | >= 0 | Desired number of elements to read. |
| SID | Channel SID | SID of the channel to read. |
| IOID | Client provided IOID | IOID of this operation. |
Comments