diff --git a/pvtoolsSrc/pvlist.cpp b/pvtoolsSrc/pvlist.cpp index 632aabb..28df5a6 100644 --- a/pvtoolsSrc/pvlist.cpp +++ b/pvtoolsSrc/pvlist.cpp @@ -87,7 +87,7 @@ std::size_t readSize(ByteBuffer* buffer) { string deserializeString(ByteBuffer* buffer) { std::size_t size = /*SerializeHelper::*/readSize(buffer); - if(size!=(size_t)-1) // TODO null strings check, to be removed in the future + if(size!=(size_t)-1) // TODO null strings check, to be removed in the future { // entire string is in buffer, simply create a string out of it (copy) std::size_t pos = buffer->getPosition(); @@ -339,8 +339,8 @@ bool discoverServers(double timeOut) sendBuffer.putByte(PVA_MAGIC); sendBuffer.putByte(PVA_CLIENT_PROTOCOL_REVISION); sendBuffer.putByte((EPICS_BYTE_ORDER == EPICS_ENDIAN_BIG) ? 0x80 : 0x00); // data + 7-bit endianess - sendBuffer.putByte((int8_t)CMD_SEARCH); // search - sendBuffer.putInt(4+1+3+16+2+1+2); // "zero" payload + sendBuffer.putByte((int8_t)CMD_SEARCH); // search + sendBuffer.putInt(4+1+3+16+2+1+2); // "zero" payload sendBuffer.putInt(0); // sequenceId sendBuffer.putByte((int8_t)0x81); // reply required // TODO unicast vs multicast; for now we mark ourselves as unicast @@ -351,8 +351,8 @@ bool discoverServers(double timeOut) encodeAsIPv6Address(&sendBuffer, &responseAddress); sendBuffer.putShort((int16_t)ntohs(responseAddress.ia.sin_port)); - sendBuffer.putByte((int8_t)0x00); // protocol count - sendBuffer.putShort((int16_t)0); // name count + sendBuffer.putByte((int8_t)0x00); // protocol count + sendBuffer.putShort((int16_t)0); // name count bool oneOK = false; for (size_t i = 0; i < broadcastAddresses.size(); i++) @@ -503,16 +503,16 @@ void usage (void) /*+************************************************************************** * - * Function: main + * Function: main * - * Description: pvlist main() - * Evaluate command line options, ... + * Description: pvlist main() + * Evaluate command line options, ... * - * Arg(s) In: [options] []... + * Arg(s) In: [options] []... * - * Arg(s) Out: none + * Arg(s) Out: none * - * Return(s): Standard return code (0=success, 1=error) + * Return(s): Standard return code (0=success, 1=error) * **************************************************************************-*/ diff --git a/src/ca/dbdToPv.h b/src/ca/dbdToPv.h index 1c9a0fa..0039053 100644 --- a/src/ca/dbdToPv.h +++ b/src/ca/dbdToPv.h @@ -35,8 +35,8 @@ typedef std::tr1::shared_ptr ValueAlarmDbdPtr; struct CaAlarm { - dbr_short_t status; - dbr_short_t severity; + dbr_short_t status; + dbr_short_t severity; CaAlarm() : status(0), severity(0) {} }; @@ -58,7 +58,7 @@ struct CaControl struct CaValueAlarm { - double upper_alarm_limit; + double upper_alarm_limit; double upper_warning_limit; double lower_warning_limit; double lower_alarm_limit; diff --git a/src/client/pv/monitor.h b/src/client/pv/monitor.h index 878edd2..9aed3ec 100644 --- a/src/client/pv/monitor.h +++ b/src/client/pv/monitor.h @@ -26,7 +26,7 @@ #ifdef monitorEpicsExportSharedSymbols # define epicsExportSharedSymbols -# undef monitorEpicsExportSharedSymbols +# undef monitorEpicsExportSharedSymbols #endif #include diff --git a/src/client/pv/pvAccess.h b/src/client/pv/pvAccess.h index 1903612..df97a69 100644 --- a/src/client/pv/pvAccess.h +++ b/src/client/pv/pvAccess.h @@ -22,7 +22,7 @@ #ifdef pvAccessEpicsExportSharedSymbols # define epicsExportSharedSymbols -# undef pvAccessEpicsExportSharedSymbols +# undef pvAccessEpicsExportSharedSymbols #endif #include diff --git a/src/pipelineService/pv/pipelineServer.h b/src/pipelineService/pv/pipelineServer.h index b4bcbcb..d782eb5 100644 --- a/src/pipelineService/pv/pipelineServer.h +++ b/src/pipelineService/pv/pipelineServer.h @@ -16,7 +16,7 @@ #ifdef pipelineServerEpicsExportSharedSymbols # define epicsExportSharedSymbols -# undef pipelineServerEpicsExportSharedSymbols +# undef pipelineServerEpicsExportSharedSymbols #endif #include diff --git a/src/pipelineService/pv/pipelineService.h b/src/pipelineService/pv/pipelineService.h index d7af2f6..af57407 100644 --- a/src/pipelineService/pv/pipelineService.h +++ b/src/pipelineService/pv/pipelineService.h @@ -19,7 +19,7 @@ #ifdef pipelineServiceEpicsExportSharedSymbols # define epicsExportSharedSymbols -# undef pipelineServiceEpicsExportSharedSymbols +# undef pipelineServiceEpicsExportSharedSymbols #endif #include diff --git a/src/pva/pv/pvaConstants.h b/src/pva/pv/pvaConstants.h index b4423e9..5aafe1e 100644 --- a/src/pva/pv/pvaConstants.h +++ b/src/pva/pv/pvaConstants.h @@ -18,7 +18,7 @@ #ifdef pvaConstantsepicsExportSharedSymbols # define epicsExportSharedSymbols -# undef pvaConstantsepicsExportSharedSymbols +# undef pvaConstantsepicsExportSharedSymbols #endif #include diff --git a/src/pva/pv/pvaVersion.h b/src/pva/pv/pvaVersion.h index 993a5e4..51d433e 100644 --- a/src/pva/pv/pvaVersion.h +++ b/src/pva/pv/pvaVersion.h @@ -17,7 +17,7 @@ #ifdef pvaVersionEpicsExportSharedSymbols # define epicsExportSharedSymbols -# undef pvaVersionEpicsExportSharedSymbols +# undef pvaVersionEpicsExportSharedSymbols #endif #include @@ -38,12 +38,12 @@ class epicsShareClass Version { public: /** * Default constructor. - * @param productName product name. - * @param implementationLangugage implementation language. - * @param majorVersion major version. - * @param minorVersion minor version. - * @param maintenanceVersion maintenance version. - * @param developmentFlag development indicator flag. + * @param productName product name. + * @param implementationLangugage implementation language. + * @param majorVersion major version. + * @param minorVersion minor version. + * @param maintenanceVersion maintenance version. + * @param developmentFlag development indicator flag. */ Version(std::string const & productName, std::string const & implementationLangugage, diff --git a/src/remote/channelSearchManager.cpp b/src/remote/channelSearchManager.cpp index ec97ae8..d562670 100644 --- a/src/remote/channelSearchManager.cpp +++ b/src/remote/channelSearchManager.cpp @@ -209,7 +209,7 @@ void ChannelSearchManager::initializeSendBuffer() m_sendBuffer.putByte(PVA_CLIENT_PROTOCOL_REVISION); m_sendBuffer.putByte((EPICS_BYTE_ORDER == EPICS_ENDIAN_BIG) ? 0x80 : 0x00); // data + 7-bit endianess m_sendBuffer.putByte(CMD_SEARCH); - m_sendBuffer.putInt(4+1+3+16+2+1); // "zero" payload + m_sendBuffer.putInt(4+1+3+16+2+1); // "zero" payload m_sendBuffer.putInt(m_sequenceNumber); // multicast vs unicast mask @@ -230,7 +230,7 @@ void ChannelSearchManager::initializeSendBuffer() MockTransportSendControl control; SerializeHelper::serializeString("tcp", &m_sendBuffer, &control); - m_sendBuffer.putShort((int16_t)0); // count + m_sendBuffer.putShort((int16_t)0); // count } void ChannelSearchManager::flushSendBuffer() diff --git a/src/remote/codec.cpp b/src/remote/codec.cpp index 23bb929..b3aaeba 100644 --- a/src/remote/codec.cpp +++ b/src/remote/codec.cpp @@ -363,7 +363,7 @@ bool AbstractCodec::readToBuffer( } // assumption: remainingBytes < MAX_ENSURE_DATA_BUFFER_SIZE && - // requiredBytes < (socketBuffer.capacity() - 1) + // requiredBytes < (socketBuffer.capacity() - 1) // // copy unread part to the beginning of the buffer @@ -427,7 +427,7 @@ void AbstractCodec::ensureData(std::size_t size) { return; // to large for buffer... - if (size > MAX_ENSURE_DATA_SIZE) {// half for SPLIT, half for SEGMENTED + if (size > MAX_ENSURE_DATA_SIZE) {// half for SPLIT, half for SEGMENTED std::ostringstream msg; msg << "requested for buffer size " << size << ", but maximum " << MAX_ENSURE_DATA_SIZE << " is allowed."; @@ -471,7 +471,7 @@ void AbstractCodec::ensureData(std::size_t size) { { // TODO check flags //if (flags && SEGMENTED_FLAGS_MASK == 0) - // throw IllegalStateException("segmented message expected, + // throw IllegalStateException("segmented message expected, //but current message flag does not indicate it"); @@ -596,15 +596,15 @@ void AbstractCodec::startMessage( std::size_t ensureCapacity, epics::pvData::int32 payloadSize) { _lastMessageStartPosition = - std::numeric_limits::max(); // TODO revise this + std::numeric_limits::max(); // TODO revise this ensureBuffer( PVA_MESSAGE_HEADER_SIZE + ensureCapacity + _nextMessagePayloadOffset); _lastMessageStartPosition = _sendBuffer.getPosition(); _sendBuffer.putByte(PVA_MAGIC); _sendBuffer.putByte(_clientServerFlag ? PVA_SERVER_PROTOCOL_REVISION : PVA_CLIENT_PROTOCOL_REVISION); _sendBuffer.putByte( - (_lastSegmentedMessageType | _byteOrderFlag | _clientServerFlag)); // data message - _sendBuffer.putByte(command); // command + (_lastSegmentedMessageType | _byteOrderFlag | _clientServerFlag)); // data message + _sendBuffer.putByte(command); // command _sendBuffer.putInt(payloadSize); // apply offset @@ -619,13 +619,13 @@ void AbstractCodec::putControlMessage( epics::pvData::int32 data) { _lastMessageStartPosition = - std::numeric_limits::max(); // TODO revise this + std::numeric_limits::max(); // TODO revise this ensureBuffer(PVA_MESSAGE_HEADER_SIZE); _sendBuffer.putByte(PVA_MAGIC); _sendBuffer.putByte(_clientServerFlag ? PVA_SERVER_PROTOCOL_REVISION : PVA_CLIENT_PROTOCOL_REVISION); - _sendBuffer.putByte((0x01 | _byteOrderFlag | _clientServerFlag)); // control message - _sendBuffer.putByte(command); // command - _sendBuffer.putInt(data); // data + _sendBuffer.putByte((0x01 | _byteOrderFlag | _clientServerFlag)); // control message + _sendBuffer.putByte(command); // command + _sendBuffer.putInt(data); // data } @@ -687,8 +687,8 @@ void AbstractCodec::endMessage(bool hasMoreSegments) { { sendBuffer.put(PVAConstants.PVA_MAGIC); sendBuffer.put(PVAConstants.PVA_VERSION); - sendBuffer.put((byte)(0x01 | byteOrderFlag)); // control data - sendBuffer.put((byte)0); // marker + sendBuffer.put((byte)(0x01 | byteOrderFlag)); // control data + sendBuffer.put((byte)0); // marker sendBuffer.putInt((int)(totalBytesSent + position + PVAConstants.PVA_MESSAGE_HEADER_SIZE)); nextMarkerPosition = position + markerPeriodBytes; @@ -845,9 +845,9 @@ void AbstractCodec::processSendQueue() if (_sendBuffer.getPosition() > 0) flush(true); - sendCompleted(); // do not schedule sending + sendCompleted(); // do not schedule sending - if (terminated()) // termination + if (terminated()) // termination break; // termination (we want to process even if shutdown) _sendQueue.pop_front(sender); @@ -1528,8 +1528,8 @@ void BlockingServerTCPTransportCodec::send(ByteBuffer* buffer, buffer->putByte(PVA_SERVER_PROTOCOL_REVISION); buffer->putByte( 0x01 | 0x40 | ((EPICS_BYTE_ORDER == EPICS_ENDIAN_BIG) - ? 0x80 : 0x00)); // control + server + endian - buffer->putByte(CMD_SET_ENDIANESS); // set byte order + ? 0x80 : 0x00)); // control + server + endian + buffer->putByte(CMD_SET_ENDIANESS); // set byte order buffer->putInt(0); diff --git a/src/remote/pv/beaconHandler.h b/src/remote/pv/beaconHandler.h index 04e5b44..cc77b76 100644 --- a/src/remote/pv/beaconHandler.h +++ b/src/remote/pv/beaconHandler.h @@ -19,7 +19,7 @@ #ifdef beaconHandlerEpicsExportSharedSymbols # define epicsExportSharedSymbols -# undef beaconHandlerEpicsExportSharedSymbols +# undef beaconHandlerEpicsExportSharedSymbols #endif #include diff --git a/src/remote/pv/blockingTCP.h b/src/remote/pv/blockingTCP.h index 8868cd0..7c18517 100644 --- a/src/remote/pv/blockingTCP.h +++ b/src/remote/pv/blockingTCP.h @@ -29,7 +29,7 @@ #ifdef blockingTCPEpicsExportSharedSymbols # define epicsExportSharedSymbols -# undef blockingTCPEpicsExportSharedSymbols +# undef blockingTCPEpicsExportSharedSymbols #endif #include diff --git a/src/remote/pv/blockingUDP.h b/src/remote/pv/blockingUDP.h index fe22c00..22a6165 100644 --- a/src/remote/pv/blockingUDP.h +++ b/src/remote/pv/blockingUDP.h @@ -24,7 +24,7 @@ #ifdef blockingUDPEpicsExportSharedSymbols # define epicsExportSharedSymbols -# undef blockingUDPEpicsExportSharedSymbols +# undef blockingUDPEpicsExportSharedSymbols #endif #include diff --git a/src/remote/pv/channelSearchManager.h b/src/remote/pv/channelSearchManager.h index 7a628bd..5d8b5bb 100644 --- a/src/remote/pv/channelSearchManager.h +++ b/src/remote/pv/channelSearchManager.h @@ -16,7 +16,7 @@ #ifdef channelSearchManagerEpicsExportSharedSymbols # define epicsExportSharedSymbols -# undef channelSearchManagerEpicsExportSharedSymbols +# undef channelSearchManagerEpicsExportSharedSymbols #endif #include @@ -43,8 +43,8 @@ public: /** * Search response from server (channel found). * @param guid server GUID. - * @param minorRevision server minor PVA revision. - * @param serverAddress server address. + * @param minorRevision server minor PVA revision. + * @param serverAddress server address. */ // TODO make serverAddress an URI or similar virtual void searchResponse(const ServerGUID & guid, int8_t minorRevision, osiSockAddr* serverAddress) = 0; @@ -81,10 +81,10 @@ public: /** * Search response from server (channel found). * @param guid server GUID. - * @param cid client channel ID. - * @param seqNo search sequence number. - * @param minorRevision server minor PVA revision. - * @param serverAddress server address. + * @param cid client channel ID. + * @param seqNo search sequence number. + * @param minorRevision server minor PVA revision. + * @param serverAddress server address. */ void searchResponse(const ServerGUID & guid, pvAccessID cid, int32_t seqNo, int8_t minorRevision, osiSockAddr* serverAddress); /** diff --git a/src/remote/pv/remote.h b/src/remote/pv/remote.h index 3fb6013..1c0fcac 100644 --- a/src/remote/pv/remote.h +++ b/src/remote/pv/remote.h @@ -26,7 +26,7 @@ #ifdef remoteEpicsExportSharedSymbols # define epicsExportSharedSymbols -# undef remoteEpicsExportSharedSymbols +# undef remoteEpicsExportSharedSymbols #endif #include diff --git a/src/remote/pv/security.h b/src/remote/pv/security.h index b60bb27..8e083f2 100644 --- a/src/remote/pv/security.h +++ b/src/remote/pv/security.h @@ -88,7 +88,7 @@ #ifdef securityEpicsExportSharedSymbols # define epicsExportSharedSymbols -# undef securityEpicsExportSharedSymbols +# undef securityEpicsExportSharedSymbols #endif #include diff --git a/src/remote/pv/serializationHelper.h b/src/remote/pv/serializationHelper.h index dd0b9d0..1b4b11a 100644 --- a/src/remote/pv/serializationHelper.h +++ b/src/remote/pv/serializationHelper.h @@ -38,7 +38,7 @@ public: * @param payloadBuffer data buffer. * @param control deserialization control. * @param existingStructure if deserialized Field matches existingStrcuture Field, then - * existingStructure instance is returned. null value is allowed. + * existingStructure instance is returned. null value is allowed. * @return PVStructure instance, can be null. */ static epics::pvData::PVStructure::shared_pointer deserializeStructureAndCreatePVStructure(epics::pvData::ByteBuffer* payloadBuffer, diff --git a/src/remote/pv/transportRegistry.h b/src/remote/pv/transportRegistry.h index 60b547f..b7e571b 100644 --- a/src/remote/pv/transportRegistry.h +++ b/src/remote/pv/transportRegistry.h @@ -26,7 +26,7 @@ #ifdef transportRegistryEpicsExportSharedSymbols # define epicsExportSharedSymbols -# undef transportRegistryEpicsExportSharedSymbols +# undef transportRegistryEpicsExportSharedSymbols #endif #include diff --git a/src/remoteClient/pv/clientContextImpl.h b/src/remoteClient/pv/clientContextImpl.h index 7c04f69..77fe1e4 100644 --- a/src/remoteClient/pv/clientContextImpl.h +++ b/src/remoteClient/pv/clientContextImpl.h @@ -16,7 +16,7 @@ #ifdef clientContextImplEpicsExportSharedSymbols # define epicsExportSharedSymbols -# undef clientContextImplEpicsExportSharedSymbols +# undef clientContextImplEpicsExportSharedSymbols #endif #include diff --git a/src/rpcClient/pv/rpcClient.h b/src/rpcClient/pv/rpcClient.h index 0202b1b..9c4523b 100644 --- a/src/rpcClient/pv/rpcClient.h +++ b/src/rpcClient/pv/rpcClient.h @@ -17,7 +17,7 @@ #include #ifdef rpcClientEpicsExportSharedSymbols # define epicsExportSharedSymbols -# undef rpcClientEpicsExportSharedSymbols +# undef rpcClientEpicsExportSharedSymbols #endif #include diff --git a/src/rpcService/pv/rpcServer.h b/src/rpcService/pv/rpcServer.h index 46f24e1..4862c6a 100644 --- a/src/rpcService/pv/rpcServer.h +++ b/src/rpcService/pv/rpcServer.h @@ -16,7 +16,7 @@ #ifdef rpcServerEpicsExportSharedSymbols # define epicsExportSharedSymbols -# undef rpcServerEpicsExportSharedSymbols +# undef rpcServerEpicsExportSharedSymbols #endif #include diff --git a/src/rpcService/pv/rpcService.h b/src/rpcService/pv/rpcService.h index c572557..292c9e5 100644 --- a/src/rpcService/pv/rpcService.h +++ b/src/rpcService/pv/rpcService.h @@ -19,7 +19,7 @@ #ifdef rpcServiceEpicsExportSharedSymbols # define epicsExportSharedSymbols -# undef rpcServiceEpicsExportSharedSymbols +# undef rpcServiceEpicsExportSharedSymbols #endif #include diff --git a/src/server/pv/beaconEmitter.h b/src/server/pv/beaconEmitter.h index cdc68d9..985889e 100644 --- a/src/server/pv/beaconEmitter.h +++ b/src/server/pv/beaconEmitter.h @@ -20,7 +20,7 @@ #ifdef beaconEmitterEpicsExportSharedSymbols # define epicsExportSharedSymbols -# undef beaconEmitterEpicsExportSharedSymbols +# undef beaconEmitterEpicsExportSharedSymbols #endif #include @@ -49,10 +49,10 @@ public: /** * Constructor. * @param protocol a protocol (transport) name to report. - * @param transport transport to be used to send beacons. + * @param transport transport to be used to send beacons. * @param context PVA context. */ -// BeaconEmitter(std::sting const & protocol, +// BeaconEmitter(std::sting const & protocol, // Transport::shared_pointer const & transport, ServerContextImpl::shared_pointer const & context); BeaconEmitter(std::string const & protocol, Transport::shared_pointer const & transport, std::tr1::shared_ptr& context); diff --git a/src/server/pv/beaconServerStatusProvider.h b/src/server/pv/beaconServerStatusProvider.h index e79925a..d14d871 100644 --- a/src/server/pv/beaconServerStatusProvider.h +++ b/src/server/pv/beaconServerStatusProvider.h @@ -54,7 +54,7 @@ public: * Constructor. * @param context PVA context. */ -// DefaultBeaconServerStatusProvider(ServerContext::shared_pointer const & context); +// DefaultBeaconServerStatusProvider(ServerContext::shared_pointer const & context); DefaultBeaconServerStatusProvider(std::tr1::shared_ptr const & context); /** * Destructor. diff --git a/src/server/pv/serverContext.h b/src/server/pv/serverContext.h index 8eae4cf..bbe361f 100644 --- a/src/server/pv/serverContext.h +++ b/src/server/pv/serverContext.h @@ -48,8 +48,8 @@ public: /** * Run server (process events). - * @param seconds time in seconds the server will process events (method will block), if 0 - * the method would block until destroy() is called. + * @param seconds time in seconds the server will process events (method will block), if 0 + * the method would block until destroy() is called. * @throws BaseException if server is already destroyed. */ virtual void run(epics::pvData::uint32 seconds) = 0; diff --git a/src/server/pv/serverContextImpl.h b/src/server/pv/serverContextImpl.h index aabe7d1..c148c18 100644 --- a/src/server/pv/serverContextImpl.h +++ b/src/server/pv/serverContextImpl.h @@ -10,7 +10,7 @@ #ifdef serverContextImplEpicsExportSharedSymbols # define epicsExportSharedSymbols -# undef serverContextImplEpicsExportSharedSymbols +# undef serverContextImplEpicsExportSharedSymbols #endif #include diff --git a/src/server/responseHandlers.cpp b/src/server/responseHandlers.cpp index 6534f1e..4db3ea0 100644 --- a/src/server/responseHandlers.cpp +++ b/src/server/responseHandlers.cpp @@ -1072,28 +1072,28 @@ void ServerGetHandler::handleResponse(osiSockAddr* responseFrom, } \ catch (std::exception &e) { \ Status status(Status::STATUSTYPE_FATAL, e.what()); \ - BaseChannelRequester::sendFailureMessage((int8)cmd, _transport, _ioid, (int8)QOS_INIT, status); \ - destroy(); \ + BaseChannelRequester::sendFailureMessage((int8)cmd, _transport, _ioid, (int8)QOS_INIT, status); \ + destroy(); \ } \ catch (...) { \ Status status(Status::STATUSTYPE_FATAL, "unknown exception caught"); \ - BaseChannelRequester::sendFailureMessage((int8)cmd, _transport, _ioid, (int8)QOS_INIT, status); \ - destroy(); \ + BaseChannelRequester::sendFailureMessage((int8)cmd, _transport, _ioid, (int8)QOS_INIT, status); \ + destroy(); \ } #define DESERIALIZE_EXCEPTION_GUARD(code) \ try { \ - code; \ + code; \ } \ catch (std::exception &e) { \ Status status(Status::STATUSTYPE_ERROR, e.what()); \ - BaseChannelRequester::sendFailureMessage((int8)command, transport, ioid, qosCode, status); \ - throw; \ + BaseChannelRequester::sendFailureMessage((int8)command, transport, ioid, qosCode, status); \ + throw; \ } \ catch (...) { \ Status status(Status::STATUSTYPE_ERROR, "unknown exception caught"); \ - BaseChannelRequester::sendFailureMessage((int8)command, transport, ioid, qosCode, status); \ - throw; \ + BaseChannelRequester::sendFailureMessage((int8)command, transport, ioid, qosCode, status); \ + throw; \ } ServerChannelGetRequesterImpl::ServerChannelGetRequesterImpl(ServerContextImpl::shared_pointer const & context, ServerChannel::shared_pointer const & channel, const pvAccessID ioid, Transport::shared_pointer const & transport) : @@ -1835,8 +1835,8 @@ void ServerMonitorHandler::handleResponse(osiSockAddr* responseFrom, /* if (!request->startRequest(qosCode)) { - BaseChannelRequester::sendFailureMessage((int8)CMD_MONITOR, transport, ioid, qosCode, BaseChannelRequester::otherRequestPendingStatus); - return; + BaseChannelRequester::sendFailureMessage((int8)CMD_MONITOR, transport, ioid, qosCode, BaseChannelRequester::otherRequestPendingStatus); + return; } */ diff --git a/src/utils/inetAddressUtil.cpp b/src/utils/inetAddressUtil.cpp index dbe3b12..e547cd1 100644 --- a/src/utils/inetAddressUtil.cpp +++ b/src/utils/inetAddressUtil.cpp @@ -361,13 +361,13 @@ int discoverInterfaces(IfaceNodeVector &list, SOCKET socket, const osiSockAddr * int discoverInterfaces(IfaceNodeVector &list, SOCKET socket, const osiSockAddr *pMatchAddr) { - int status; + int status; INTERFACE_INFO *pIfinfo; INTERFACE_INFO *pIfinfoList; - unsigned nelem; - int numifs; - DWORD cbBytesReturned; - int match; + unsigned nelem; + int numifs; + DWORD cbBytesReturned; + int match; /* only valid for winsock 2 and above TODO resolve dllimport compilation problem and uncomment this check diff --git a/src/utils/introspectionRegistry.cpp b/src/utils/introspectionRegistry.cpp index b5aef77..dc33f91 100644 --- a/src/utils/introspectionRegistry.cpp +++ b/src/utils/introspectionRegistry.cpp @@ -91,7 +91,7 @@ void IntrospectionRegistry::serialize(FieldConstPtr const & field, ByteBuffer* b } else { control->ensureBuffer(3); - buffer->putByte(FULL_WITH_ID_TYPE_CODE); // could also be a mask + buffer->putByte(FULL_WITH_ID_TYPE_CODE); // could also be a mask buffer->putShort(key); } } diff --git a/src/utils/pv/hexDump.h b/src/utils/pv/hexDump.h index 06d384f..e72da71 100644 --- a/src/utils/pv/hexDump.h +++ b/src/utils/pv/hexDump.h @@ -16,7 +16,7 @@ #include -#ifdef hexDumpEpicsExportSharedSymbols +#ifdef hexDumpEpicsExportSharedSymbols # define epicsExportSharedSymbols # undef hexDumpEpicsExportSharedSymbols #endif diff --git a/src/utils/pv/introspectionRegistry.h b/src/utils/pv/introspectionRegistry.h index 01fa575..b980d59 100644 --- a/src/utils/pv/introspectionRegistry.h +++ b/src/utils/pv/introspectionRegistry.h @@ -26,7 +26,7 @@ #ifdef introspectionRegistryEpicsExportSharedSymbols # define epicsExportSharedSymbols -# undef introspectionRegistryEpicsExportSharedSymbols +# undef introspectionRegistryEpicsExportSharedSymbols #endif // TODO check for memory leaks diff --git a/src/utils/pv/referenceCountingLock.h b/src/utils/pv/referenceCountingLock.h index 2228b0f..7b4b429 100644 --- a/src/utils/pv/referenceCountingLock.h +++ b/src/utils/pv/referenceCountingLock.h @@ -18,7 +18,7 @@ #ifdef referenceCountingLockEpicsExportSharedSymbols # define epicsExportSharedSymbols -# undef referenceCountingLockEpicsExportSharedSymbols +# undef referenceCountingLockEpicsExportSharedSymbols #endif namespace epics { @@ -52,11 +52,11 @@ public: * NOTE: Argument msecs is currently not supported due to * Darwin OS not supporting pthread_mutex_timedlock. May be changed in the future. * - * @param msecs the number of milleseconds to wait. - * An argument less than or equal to zero means not to wait at all. + * @param msecs the number of milleseconds to wait. + * An argument less than or equal to zero means not to wait at all. * - * @return true if acquired, false otherwise. - * NOTE: currently this routine always returns true. Look above for explanation. + * @return true if acquired, false otherwise. + * NOTE: currently this routine always returns true. Look above for explanation. * */ bool acquire(epics::pvData::int64 msecs); diff --git a/src/utils/pv/requester.h b/src/utils/pv/requester.h index fb43708..33d4db1 100644 --- a/src/utils/pv/requester.h +++ b/src/utils/pv/requester.h @@ -20,7 +20,7 @@ #ifdef requesterEpicsExportSharedSymbols # define epicsExportSharedSymbols -# undef requesterEpicsExportSharedSymbols +# undef requesterEpicsExportSharedSymbols #endif diff --git a/src/utils/referenceCountingLock.cpp b/src/utils/referenceCountingLock.cpp index e2c1e74..f1a4085 100644 --- a/src/utils/referenceCountingLock.cpp +++ b/src/utils/referenceCountingLock.cpp @@ -14,71 +14,71 @@ using namespace epics::pvData; ReferenceCountingLock::ReferenceCountingLock(): _references(1) { - /* pthread_mutexattr_t mutexAttribute; - int32 retval = pthread_mutexattr_init(&mutexAttribute); - if(retval != 0) - { - //string errMsg = "Error: pthread_mutexattr_init failed: " + string(strerror(retval)); - assert(false); - } - retval = pthread_mutexattr_settype(&mutexAttribute, PTHREAD_MUTEX_RECURSIVE); - if(retval == 0) - { - retval = pthread_mutex_init(_mutex, &mutexAttribute); - if(retval != 0) - { - //string errMsg = "Error: pthread_mutex_init failed: " + string(strerror(retval)); - assert(false); - } - } - else - { - //string errMsg = "Error: pthread_mutexattr_settype failed: " + string(strerror(retval)); - assert(false); - } + /* pthread_mutexattr_t mutexAttribute; + int32 retval = pthread_mutexattr_init(&mutexAttribute); + if(retval != 0) + { + //string errMsg = "Error: pthread_mutexattr_init failed: " + string(strerror(retval)); + assert(false); + } + retval = pthread_mutexattr_settype(&mutexAttribute, PTHREAD_MUTEX_RECURSIVE); + if(retval == 0) + { + retval = pthread_mutex_init(_mutex, &mutexAttribute); + if(retval != 0) + { + //string errMsg = "Error: pthread_mutex_init failed: " + string(strerror(retval)); + assert(false); + } + } + else + { + //string errMsg = "Error: pthread_mutexattr_settype failed: " + string(strerror(retval)); + assert(false); + } - pthread_mutexattr_destroy(&mutexAttribute);*/ + pthread_mutexattr_destroy(&mutexAttribute);*/ } ReferenceCountingLock::~ReferenceCountingLock() { -// pthread_mutex_destroy(_mutex); +// pthread_mutex_destroy(_mutex); } bool ReferenceCountingLock::acquire(int64 /*msecs*/) { _mutex.lock(); return true; - /* struct timespec deltatime; - if(msecs > 0) - { - deltatime.tv_sec = msecs / 1000; - deltatime.tv_nsec = (msecs % 1000) * 1000; - } - else - { - deltatime.tv_sec = 0; - deltatime.tv_nsec = 0; - } + /* struct timespec deltatime; + if(msecs > 0) + { + deltatime.tv_sec = msecs / 1000; + deltatime.tv_nsec = (msecs % 1000) * 1000; + } + else + { + deltatime.tv_sec = 0; + deltatime.tv_nsec = 0; + } - int32 retval = pthread_mutex_timedlock(_mutex, &deltatime); - if(retval == 0) - { - return true; - } - return false; + int32 retval = pthread_mutex_timedlock(_mutex, &deltatime); + if(retval == 0) + { + return true; + } + return false; */ } void ReferenceCountingLock::release() { _mutex.unlock(); - /* int retval = pthread_mutex_unlock(_mutex); - if(retval != 0) - { - //string errMsg = "Error: pthread_mutex_unlock failed: " + string(strerror(retval)); - //TODO do something? - }*/ + /* int retval = pthread_mutex_unlock(_mutex); + if(retval != 0) + { + //string errMsg = "Error: pthread_mutex_unlock failed: " + string(strerror(retval)); + //TODO do something? + }*/ } // TODO use atomic primitive impl. diff --git a/testApp/remote/channelAccessIFTest.cpp b/testApp/remote/channelAccessIFTest.cpp index d35597b..97f545c 100644 --- a/testApp/remote/channelAccessIFTest.cpp +++ b/testApp/remote/channelAccessIFTest.cpp @@ -54,7 +54,7 @@ const std::string ChannelAccessIFTest::TEST_ARRAY_CHANNEL_NAME = "testArray1"; template inline bool compareWithTol(const T v1, const T v2, const T tol) { - return (std::fabs(v1 - v2) <= tol); + return (std::fabs(v1 - v2) <= tol); } int ChannelAccessIFTest::runAllTest() { diff --git a/testApp/remote/testCodec.cpp b/testApp/remote/testCodec.cpp index 8af85f2..ce99443 100644 --- a/testApp/remote/testCodec.cpp +++ b/testApp/remote/testCodec.cpp @@ -138,7 +138,7 @@ public: std::size_t startPos = _readBuffer->getPosition(); //buffer.put(readBuffer); //while (buffer.hasRemaining() && readBuffer.hasRemaining()) - // buffer.put(readBuffer.get()); + // buffer.put(readBuffer.get()); std::size_t bufferRemaining = buffer->getRemaining(); std::size_t readBufferRemaining = @@ -164,7 +164,7 @@ public: int write(ByteBuffer *buffer) { if (_disconnected) - return -1; // TODO: not by the JavaDoc API spec + return -1; // TODO: not by the JavaDoc API spec if (_throwExceptionOnSend) throw io_exception("text IO exception"); @@ -1312,7 +1312,7 @@ private: { testDiag("BEGIN TEST %s:", CURRENT_FUNCTION); - for (int32_t firstMessagePayloadSize = 1; // cannot be zero + for (int32_t firstMessagePayloadSize = 1; // cannot be zero firstMessagePayloadSize <= 3; firstMessagePayloadSize++) { @@ -1763,7 +1763,7 @@ private: { testDiag("BEGIN TEST %s:", CURRENT_FUNCTION); - for (int32_t firstMessagePayloadSize = 1; // cannot be zero + for (int32_t firstMessagePayloadSize = 1; // cannot be zero firstMessagePayloadSize <= 3; firstMessagePayloadSize++) { @@ -1925,7 +1925,7 @@ private: testDiag("BEGIN TEST %s:", CURRENT_FUNCTION); - for (int32_t firstMessagePayloadSize = 1; // cannot be zero + for (int32_t firstMessagePayloadSize = 1; // cannot be zero firstMessagePayloadSize <= 3; firstMessagePayloadSize++) { @@ -2566,7 +2566,7 @@ private: void writePollOne() { testDiag("In %s", CURRENT_FUNCTION); - _codec.processWrite(); // this should return immediately + _codec.processWrite(); // this should return immediately // now we fake reading _codec._writeBuffer.flip(); diff --git a/testApp/remote/testGetPerformance.cpp b/testApp/remote/testGetPerformance.cpp index c427140..f3edfb2 100644 --- a/testApp/remote/testGetPerformance.cpp +++ b/testApp/remote/testGetPerformance.cpp @@ -204,7 +204,7 @@ public: printf("%d %d %d %d %.3f\n", channels, arraySize, iterations, runs, sum/runs); Lock guard(waitLoopPtrMutex); - waitLoopEvent->signal(); // all done + waitLoopEvent->signal(); // all done } } else if (channelCount == 0) diff --git a/testApp/remote/testMonitorPerformance.cpp b/testApp/remote/testMonitorPerformance.cpp index 6b76a5f..997d488 100644 --- a/testApp/remote/testMonitorPerformance.cpp +++ b/testApp/remote/testMonitorPerformance.cpp @@ -196,7 +196,7 @@ public: printf("%d %d %d %d %.3f\n", channels, arraySize, iterations, runs, sum/runs); Lock guard(waitLoopPtrMutex); - waitLoopEvent->signal(); // all done + waitLoopEvent->signal(); // all done } } else if (channelCount == 0) diff --git a/testApp/remote/testServer.cpp b/testApp/remote/testServer.cpp index 1ee958f..25436da 100644 --- a/testApp/remote/testServer.cpp +++ b/testApp/remote/testServer.cpp @@ -2503,7 +2503,7 @@ private: }; -class MockServerChannelProvider : public ChannelProvider, +class MockServerChannelProvider : public ChannelProvider, public std::tr1::enable_shared_from_this { public: