changed name of protocol command

This commit is contained in:
Jeff Hill
2003-04-17 17:17:19 +00:00
parent d8db1abd38
commit 44a57584b7
7 changed files with 42 additions and 58 deletions

View File

@@ -122,7 +122,7 @@ typedef ca_uint32_t caResId;
#define CA_PROTO_READ_NOTIFY 15u /* add a one shot event */
#define CA_PROTO_READ_BUILD 16u /* read and build - obsolete */
#define REPEATER_CONFIRM 17u /* registration confirmation */
#define CA_PROTO_CLAIM_CIU 18u /* client claims resource in server */
#define CA_PROTO_CREATE_CHAN 18u /* client creates channel in server */
#define CA_PROTO_WRITE_NOTIFY 19u /* notify after write chan value */
#define CA_PROTO_CLIENT_NAME 20u /* CA V4.1 identify client */
#define CA_PROTO_HOST_NAME 21u /* CA V4.1 identify client */
@@ -130,7 +130,7 @@ typedef ca_uint32_t caResId;
#define CA_PROTO_ECHO 23u /* CA V4.3 connection verify */
#define REPEATER_REGISTER 24u /* register for repeater fan out */
#define CA_PROTO_SIGNAL 25u /* knock the server out of select */
#define CA_PROTO_CLAIM_CIU_FAILED 26u /* unable to create chan resource in server */
#define CA_PROTO_CREATE_CH_FAIL 26u /* unable to create chan resource in server */
#define CA_PROTO_SERVER_DISCONN 27u /* server deletes PV (or channel) */
#define CA_PROTO_LAST_CMMD CA_PROTO_SERVER_DISCONN

View File

@@ -102,7 +102,7 @@ const cac::pExcepProtoStubTCP cac::tcpExcepJumpTableCAC [] =
&cac::readNotifyExcep, // CA_PROTO_READ_NOTIFY
&cac::defaultExcep, // CA_PROTO_READ_BUILD
&cac::defaultExcep, // REPEATER_CONFIRM
&cac::defaultExcep, // CA_PROTO_CLAIM_CIU
&cac::defaultExcep, // CA_PROTO_CREATE_CHAN
&cac::writeNotifyExcep, // CA_PROTO_WRITE_NOTIFY
&cac::defaultExcep, // CA_PROTO_CLIENT_NAME
&cac::defaultExcep, // CA_PROTO_HOST_NAME
@@ -110,7 +110,7 @@ const cac::pExcepProtoStubTCP cac::tcpExcepJumpTableCAC [] =
&cac::defaultExcep, // CA_PROTO_ECHO
&cac::defaultExcep, // REPEATER_REGISTER
&cac::defaultExcep, // CA_PROTO_SIGNAL
&cac::defaultExcep, // CA_PROTO_CLAIM_CIU_FAILED
&cac::defaultExcep, // CA_PROTO_CREATE_CH_FAIL
&cac::defaultExcep // CA_PROTO_SERVER_DISCONN
};

View File

@@ -885,12 +885,10 @@ void tcpiiu::hostNameSetRequest ( epicsGuard < cacMutex > & locker )
}
comQueSendMsgMinder minder ( this->sendQue, locker );
this->sendQue.pushUInt16 ( CA_PROTO_HOST_NAME ); // cmd
this->sendQue.pushUInt16 ( static_cast < ca_uint16_t > ( postSize ) ); // postsize
this->sendQue.pushUInt16 ( 0u ); // dataType
this->sendQue.pushUInt16 ( 0u ); // count
this->sendQue.pushUInt32 ( 0u ); // cid
this->sendQue.pushUInt32 ( 0u ); // available
this->sendQue.insertRequestHeader (
CA_PROTO_HOST_NAME, postSize,
0u, 0u, 0u, 0u,
CA_V49 ( this->minorProtocolVersion ) );
this->sendQue.pushString ( pName, size );
this->sendQue.pushString ( cacNillBytes, postSize - size );
minder.commit ();
@@ -915,12 +913,10 @@ void tcpiiu::userNameSetRequest ( epicsGuard < cacMutex > & locker )
}
comQueSendMsgMinder minder ( this->sendQue, locker );
this->sendQue.pushUInt16 ( CA_PROTO_CLIENT_NAME ); // cmd
this->sendQue.pushUInt16 ( static_cast <epicsUInt16> ( postSize ) ); // postsize
this->sendQue.pushUInt16 ( 0u ); // dataType
this->sendQue.pushUInt16 ( 0u ); // count
this->sendQue.pushUInt32 ( 0u ); // cid
this->sendQue.pushUInt32 ( 0u ); // available
this->sendQue.insertRequestHeader (
CA_PROTO_CLIENT_NAME, postSize,
0u, 0u, 0u, 0u,
CA_V49 ( this->minorProtocolVersion ) );
this->sendQue.pushString ( pName, size );
this->sendQue.pushString ( cacNillBytes, postSize - size );
minder.commit ();
@@ -932,12 +928,10 @@ void tcpiiu::disableFlowControlRequest ( epicsGuard < cacMutex > & locker )
this->flushRequest ();
}
comQueSendMsgMinder minder ( this->sendQue, locker );
this->sendQue.pushUInt16 ( CA_PROTO_EVENTS_ON ); // cmd
this->sendQue.pushUInt16 ( 0u ); // postsize
this->sendQue.pushUInt16 ( 0u ); // dataType
this->sendQue.pushUInt16 ( 0u ); // count
this->sendQue.pushUInt32 ( 0u ); // cid
this->sendQue.pushUInt32 ( 0u ); // available
this->sendQue.insertRequestHeader (
CA_PROTO_EVENTS_ON, 0u,
0u, 0u, 0u, 0u,
CA_V49 ( this->minorProtocolVersion ) );
minder.commit ();
}
@@ -947,12 +941,10 @@ void tcpiiu::enableFlowControlRequest ( epicsGuard < cacMutex > & locker )
this->flushRequest ();
}
comQueSendMsgMinder minder ( this->sendQue, locker );
this->sendQue.pushUInt16 ( CA_PROTO_EVENTS_OFF ); // cmd
this->sendQue.pushUInt16 ( 0u ); // postsize
this->sendQue.pushUInt16 ( 0u ); // dataType
this->sendQue.pushUInt16 ( 0u ); // count
this->sendQue.pushUInt32 ( 0u ); // cid
this->sendQue.pushUInt32 ( 0u ); // available
this->sendQue.insertRequestHeader (
CA_PROTO_EVENTS_OFF, 0u,
0u, 0u, 0u, 0u,
CA_V49 ( this->minorProtocolVersion ) );
minder.commit ();
}
@@ -966,12 +958,10 @@ void tcpiiu::versionMessage ( epicsGuard < cacMutex > & locker,
}
comQueSendMsgMinder minder ( this->sendQue, locker );
this->sendQue.pushUInt16 ( CA_PROTO_VERSION ); // cmd
this->sendQue.pushUInt16 ( 0u ); // old postsize field
this->sendQue.pushUInt16 ( static_cast <ca_uint16_t> ( priority ) ); // old dataType field
this->sendQue.pushUInt16 ( CA_MINOR_PROTOCOL_REVISION ); // old count field
this->sendQue.pushUInt32 ( 0u ); // ( old cid field )
this->sendQue.pushUInt32 ( 0u ); // ( old available field )
this->sendQue.insertRequestHeader (
CA_PROTO_VERSION, 0u,
priority, CA_MINOR_PROTOCOL_REVISION, 0u, 0u,
CA_V49 ( this->minorProtocolVersion ) );
minder.commit ();
}
@@ -981,12 +971,10 @@ void tcpiiu::echoRequest ( epicsGuard < cacMutex > & locker )
this->flushRequest ();
}
comQueSendMsgMinder minder ( this->sendQue, locker );
this->sendQue.pushUInt16 ( CA_PROTO_ECHO ); // cmd
this->sendQue.pushUInt16 ( 0u ); // postsize
this->sendQue.pushUInt16 ( 0u ); // dataType
this->sendQue.pushUInt16 ( 0u ); // count
this->sendQue.pushUInt32 ( 0u ); // cid
this->sendQue.pushUInt32 ( 0u ); // available
this->sendQue.insertRequestHeader (
CA_PROTO_ECHO, 0u,
0u, 0u, 0u, 0u,
CA_V49 ( this->minorProtocolVersion ) );
minder.commit ();
}
@@ -1078,17 +1066,15 @@ void tcpiiu::createChannelRequest (
}
comQueSendMsgMinder minder ( this->sendQue, guard );
this->sendQue.pushUInt16 ( CA_PROTO_CLAIM_CIU ); // cmd
this->sendQue.pushUInt16 ( static_cast < epicsUInt16 > ( postCnt ) ); // postsize
this->sendQue.pushUInt16 ( 0u ); // dataType
this->sendQue.pushUInt16 ( 0u ); // count
this->sendQue.pushUInt32 ( identity ); // cid
//
// The available field is used (abused)
// here to communicate the minor version number
// starting with CA 4.1.
//
this->sendQue.pushUInt32 ( CA_MINOR_PROTOCOL_REVISION ); // available
this->sendQue.insertRequestHeader (
CA_PROTO_CREATE_CHAN, postCnt,
0u, 0u, identity, CA_MINOR_PROTOCOL_REVISION,
CA_V49 ( this->minorProtocolVersion ) );
if ( nameLength ) {
this->sendQue.pushString ( pName, nameLength );
}
@@ -1102,12 +1088,10 @@ void tcpiiu::clearChannelRequest ( epicsGuard < cacMutex > & locker,
ca_uint32_t sid, ca_uint32_t cid )
{
comQueSendMsgMinder minder ( this->sendQue, locker );
this->sendQue.pushUInt16 ( CA_PROTO_CLEAR_CHANNEL ); // cmd
this->sendQue.pushUInt16 ( 0u ); // postsize
this->sendQue.pushUInt16 ( 0u ); // dataType
this->sendQue.pushUInt16 ( 0u ); // count
this->sendQue.pushUInt32 ( sid ); // cid
this->sendQue.pushUInt32 ( cid ); // available
this->sendQue.insertRequestHeader (
CA_PROTO_CLEAR_CHANNEL, 0u,
0u, 0u, sid, cid,
CA_V49 ( this->minorProtocolVersion ) );
minder.commit ();
}

View File

@@ -39,7 +39,7 @@ caStatus casAsyncPVAttachIOI::cbFuncAsyncIO (
caStatus status;
switch ( this->msg.m_cmmd ) {
case CA_PROTO_CLAIM_CIU:
case CA_PROTO_CREATE_CHAN:
status = this->client.createChanResponse ( guard,
this->msg, this->retVal );
if ( status == S_cas_sendBlocked ) {

View File

@@ -32,7 +32,7 @@ casAsyncReadIOI::casAsyncReadIOI (
casAsyncReadIOI::~casAsyncReadIOI ()
{
this->asyncReadIO.serverInitiatedDestroy ();
if ( this->msg.m_cmmd == CA_PROTO_CLAIM_CIU &&
if ( this->msg.m_cmmd == CA_PROTO_CREATE_CHAN &&
! this->createChannelWasSuccessful ) {
delete & this->chan;
}
@@ -75,7 +75,7 @@ caStatus casAsyncReadIOI::cbFuncAsyncIO (
this->completionStatus );
break;
case CA_PROTO_CLAIM_CIU:
case CA_PROTO_CREATE_CHAN:
unsigned nativeTypeDBR;
status = this->chan.getPVI().bestDBRType ( nativeTypeDBR );
if ( status ) {

View File

@@ -1449,7 +1449,7 @@ caStatus casStrmClient::enumPostponedCreateChanResponse (
assert ( nativeTypeDBR <= 0xffff );
aitIndex nativeCount = chan.getPVI().nativeCount();
assert ( nativeCount <= 0xffffffff );
status = this->out.copyInHeader ( CA_PROTO_CLAIM_CIU, 0,
status = this->out.copyInHeader ( CA_PROTO_CREATE_CHAN, 0,
static_cast <ca_uint16_t> ( nativeTypeDBR ),
static_cast <ca_uint32_t> ( nativeCount ),
hdr.m_cid, chan.getSID(), 0 );
@@ -1502,7 +1502,7 @@ caStatus casStrmClient::channelCreateFailedResp (
caStatus status;
if ( CA_V46 ( this->minor_version_number ) ) {
status = this->out.copyInHeader (
CA_PROTO_CLAIM_CIU_FAILED, 0,
CA_PROTO_CREATE_CH_FAIL, 0,
0, 0, hdr.m_cid, 0, 0 );
if ( status == S_cas_success ) {
this->out.commitMsg ();

View File

@@ -1350,7 +1350,7 @@ LOCAL int claim_ciu_action ( caHdrLargeArray *mp,
}
}
status = cas_copy_in_header (
client, CA_PROTO_CLAIM_CIU, 0u,
client, CA_PROTO_CREATE_CHAN, 0u,
pciu->addr.dbr_field_type, nElem, pciu->cid,
pciu->sid, NULL );
if ( status == ECA_NORMAL ) {