Moved CA_..._PORT static casts from caProto.h into C++ sources.
This commit is contained in:
@@ -81,10 +81,8 @@
|
||||
* "EPICS_CA_SERVER_PORT"
|
||||
*/
|
||||
#define CA_PORT_BASE IPPORT_USERRESERVED + 56U
|
||||
#define CA_SERVER_PORT static_cast <unsigned short> \
|
||||
(CA_PORT_BASE+CA_MAJOR_PROTOCOL_REVISION*2u)
|
||||
#define CA_REPEATER_PORT static_cast <unsigned short> \
|
||||
(CA_PORT_BASE+CA_MAJOR_PROTOCOL_REVISION*2u+1u)
|
||||
#define CA_SERVER_PORT (CA_PORT_BASE+CA_MAJOR_PROTOCOL_REVISION*2u)
|
||||
#define CA_REPEATER_PORT (CA_PORT_BASE+CA_MAJOR_PROTOCOL_REVISION*2u+1u)
|
||||
/*
|
||||
* 1500 (max of ethernet and 802.{2,3} MTU) - 20(IP) - 8(UDP)
|
||||
* (the MTU of Ethernet is currently independent of its speed varient)
|
||||
|
||||
@@ -35,10 +35,12 @@ int main ( int, char ** )
|
||||
int status;
|
||||
|
||||
serverPort =
|
||||
envGetInetPortConfigParam ( &EPICS_CA_SERVER_PORT, CA_SERVER_PORT );
|
||||
envGetInetPortConfigParam ( &EPICS_CA_SERVER_PORT,
|
||||
static_cast <unsigned short> (CA_SERVER_PORT) );
|
||||
|
||||
repeaterPort =
|
||||
envGetInetPortConfigParam ( &EPICS_CA_REPEATER_PORT, CA_REPEATER_PORT );
|
||||
envGetInetPortConfigParam ( &EPICS_CA_REPEATER_PORT,
|
||||
static_cast <unsigned short> (CA_REPEATER_PORT) );
|
||||
|
||||
caStartRepeaterIfNotInstalled ( repeaterPort );
|
||||
|
||||
|
||||
@@ -504,7 +504,8 @@ void ca_repeater ()
|
||||
|
||||
assert ( osiSockAttach() );
|
||||
|
||||
port = envGetInetPortConfigParam ( &EPICS_CA_REPEATER_PORT, CA_REPEATER_PORT );
|
||||
port = envGetInetPortConfigParam ( &EPICS_CA_REPEATER_PORT,
|
||||
static_cast <unsigned short> (CA_REPEATER_PORT) );
|
||||
|
||||
msr = makeSocket ( port, true );
|
||||
if ( msr.sock == INVALID_SOCKET ) {
|
||||
|
||||
@@ -61,10 +61,12 @@ udpiiu::udpiiu ( cac &cac ) :
|
||||
int status;
|
||||
|
||||
this->repeaterPort =
|
||||
envGetInetPortConfigParam ( &EPICS_CA_REPEATER_PORT, CA_REPEATER_PORT );
|
||||
envGetInetPortConfigParam ( &EPICS_CA_REPEATER_PORT,
|
||||
static_cast <unsigned short> (CA_REPEATER_PORT) );
|
||||
|
||||
this->serverPort =
|
||||
envGetInetPortConfigParam ( &EPICS_CA_SERVER_PORT, CA_SERVER_PORT );
|
||||
envGetInetPortConfigParam ( &EPICS_CA_SERVER_PORT,
|
||||
static_cast <unsigned short> (CA_SERVER_PORT) );
|
||||
|
||||
this->sock = socket ( AF_INET, SOCK_DGRAM, IPPROTO_UDP );
|
||||
if ( this->sock == INVALID_SOCKET ) {
|
||||
|
||||
Reference in New Issue
Block a user