replaced tabs with spaces
This commit is contained in:
@ -87,7 +87,7 @@ std::size_t readSize(ByteBuffer* buffer) {
|
|||||||
string deserializeString(ByteBuffer* buffer) {
|
string deserializeString(ByteBuffer* buffer) {
|
||||||
|
|
||||||
std::size_t size = /*SerializeHelper::*/readSize(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)
|
// entire string is in buffer, simply create a string out of it (copy)
|
||||||
std::size_t pos = buffer->getPosition();
|
std::size_t pos = buffer->getPosition();
|
||||||
@ -339,8 +339,8 @@ bool discoverServers(double timeOut)
|
|||||||
sendBuffer.putByte(PVA_MAGIC);
|
sendBuffer.putByte(PVA_MAGIC);
|
||||||
sendBuffer.putByte(PVA_CLIENT_PROTOCOL_REVISION);
|
sendBuffer.putByte(PVA_CLIENT_PROTOCOL_REVISION);
|
||||||
sendBuffer.putByte((EPICS_BYTE_ORDER == EPICS_ENDIAN_BIG) ? 0x80 : 0x00); // data + 7-bit endianess
|
sendBuffer.putByte((EPICS_BYTE_ORDER == EPICS_ENDIAN_BIG) ? 0x80 : 0x00); // data + 7-bit endianess
|
||||||
sendBuffer.putByte((int8_t)CMD_SEARCH); // search
|
sendBuffer.putByte((int8_t)CMD_SEARCH); // search
|
||||||
sendBuffer.putInt(4+1+3+16+2+1+2); // "zero" payload
|
sendBuffer.putInt(4+1+3+16+2+1+2); // "zero" payload
|
||||||
|
|
||||||
sendBuffer.putInt(0); // sequenceId
|
sendBuffer.putInt(0); // sequenceId
|
||||||
sendBuffer.putByte((int8_t)0x81); // reply required // TODO unicast vs multicast; for now we mark ourselves as unicast
|
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);
|
encodeAsIPv6Address(&sendBuffer, &responseAddress);
|
||||||
sendBuffer.putShort((int16_t)ntohs(responseAddress.ia.sin_port));
|
sendBuffer.putShort((int16_t)ntohs(responseAddress.ia.sin_port));
|
||||||
|
|
||||||
sendBuffer.putByte((int8_t)0x00); // protocol count
|
sendBuffer.putByte((int8_t)0x00); // protocol count
|
||||||
sendBuffer.putShort((int16_t)0); // name count
|
sendBuffer.putShort((int16_t)0); // name count
|
||||||
|
|
||||||
bool oneOK = false;
|
bool oneOK = false;
|
||||||
for (size_t i = 0; i < broadcastAddresses.size(); i++)
|
for (size_t i = 0; i < broadcastAddresses.size(); i++)
|
||||||
@ -503,16 +503,16 @@ void usage (void)
|
|||||||
|
|
||||||
/*+**************************************************************************
|
/*+**************************************************************************
|
||||||
*
|
*
|
||||||
* Function: main
|
* Function: main
|
||||||
*
|
*
|
||||||
* Description: pvlist main()
|
* Description: pvlist main()
|
||||||
* Evaluate command line options, ...
|
* Evaluate command line options, ...
|
||||||
*
|
*
|
||||||
* Arg(s) In: [options] [<server>]...
|
* Arg(s) In: [options] [<server>]...
|
||||||
*
|
*
|
||||||
* 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)
|
||||||
*
|
*
|
||||||
**************************************************************************-*/
|
**************************************************************************-*/
|
||||||
|
|
||||||
|
@ -35,8 +35,8 @@ typedef std::tr1::shared_ptr<ValueAlarmDbd> ValueAlarmDbdPtr;
|
|||||||
|
|
||||||
struct CaAlarm
|
struct CaAlarm
|
||||||
{
|
{
|
||||||
dbr_short_t status;
|
dbr_short_t status;
|
||||||
dbr_short_t severity;
|
dbr_short_t severity;
|
||||||
CaAlarm() : status(0), severity(0) {}
|
CaAlarm() : status(0), severity(0) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -58,7 +58,7 @@ struct CaControl
|
|||||||
|
|
||||||
struct CaValueAlarm
|
struct CaValueAlarm
|
||||||
{
|
{
|
||||||
double upper_alarm_limit;
|
double upper_alarm_limit;
|
||||||
double upper_warning_limit;
|
double upper_warning_limit;
|
||||||
double lower_warning_limit;
|
double lower_warning_limit;
|
||||||
double lower_alarm_limit;
|
double lower_alarm_limit;
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
#ifdef monitorEpicsExportSharedSymbols
|
#ifdef monitorEpicsExportSharedSymbols
|
||||||
# define epicsExportSharedSymbols
|
# define epicsExportSharedSymbols
|
||||||
# undef monitorEpicsExportSharedSymbols
|
# undef monitorEpicsExportSharedSymbols
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <pv/requester.h>
|
#include <pv/requester.h>
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
#ifdef pvAccessEpicsExportSharedSymbols
|
#ifdef pvAccessEpicsExportSharedSymbols
|
||||||
# define epicsExportSharedSymbols
|
# define epicsExportSharedSymbols
|
||||||
# undef pvAccessEpicsExportSharedSymbols
|
# undef pvAccessEpicsExportSharedSymbols
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <pv/pvaVersion.h>
|
#include <pv/pvaVersion.h>
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
#ifdef pipelineServerEpicsExportSharedSymbols
|
#ifdef pipelineServerEpicsExportSharedSymbols
|
||||||
# define epicsExportSharedSymbols
|
# define epicsExportSharedSymbols
|
||||||
# undef pipelineServerEpicsExportSharedSymbols
|
# undef pipelineServerEpicsExportSharedSymbols
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <pv/pvAccess.h>
|
#include <pv/pvAccess.h>
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
#ifdef pipelineServiceEpicsExportSharedSymbols
|
#ifdef pipelineServiceEpicsExportSharedSymbols
|
||||||
# define epicsExportSharedSymbols
|
# define epicsExportSharedSymbols
|
||||||
# undef pipelineServiceEpicsExportSharedSymbols
|
# undef pipelineServiceEpicsExportSharedSymbols
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <pv/pvAccess.h>
|
#include <pv/pvAccess.h>
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
#ifdef pvaConstantsepicsExportSharedSymbols
|
#ifdef pvaConstantsepicsExportSharedSymbols
|
||||||
# define epicsExportSharedSymbols
|
# define epicsExportSharedSymbols
|
||||||
# undef pvaConstantsepicsExportSharedSymbols
|
# undef pvaConstantsepicsExportSharedSymbols
|
||||||
#endif
|
#endif
|
||||||
#include <shareLib.h>
|
#include <shareLib.h>
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
#ifdef pvaVersionEpicsExportSharedSymbols
|
#ifdef pvaVersionEpicsExportSharedSymbols
|
||||||
# define epicsExportSharedSymbols
|
# define epicsExportSharedSymbols
|
||||||
# undef pvaVersionEpicsExportSharedSymbols
|
# undef pvaVersionEpicsExportSharedSymbols
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <shareLib.h>
|
#include <shareLib.h>
|
||||||
@ -38,12 +38,12 @@ class epicsShareClass Version {
|
|||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
* Default constructor.
|
* Default constructor.
|
||||||
* @param productName product name.
|
* @param productName product name.
|
||||||
* @param implementationLangugage implementation language.
|
* @param implementationLangugage implementation language.
|
||||||
* @param majorVersion major version.
|
* @param majorVersion major version.
|
||||||
* @param minorVersion minor version.
|
* @param minorVersion minor version.
|
||||||
* @param maintenanceVersion maintenance version.
|
* @param maintenanceVersion maintenance version.
|
||||||
* @param developmentFlag development indicator flag.
|
* @param developmentFlag development indicator flag.
|
||||||
*/
|
*/
|
||||||
Version(std::string const & productName,
|
Version(std::string const & productName,
|
||||||
std::string const & implementationLangugage,
|
std::string const & implementationLangugage,
|
||||||
|
@ -209,7 +209,7 @@ void ChannelSearchManager::initializeSendBuffer()
|
|||||||
m_sendBuffer.putByte(PVA_CLIENT_PROTOCOL_REVISION);
|
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((EPICS_BYTE_ORDER == EPICS_ENDIAN_BIG) ? 0x80 : 0x00); // data + 7-bit endianess
|
||||||
m_sendBuffer.putByte(CMD_SEARCH);
|
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);
|
m_sendBuffer.putInt(m_sequenceNumber);
|
||||||
|
|
||||||
// multicast vs unicast mask
|
// multicast vs unicast mask
|
||||||
@ -230,7 +230,7 @@ void ChannelSearchManager::initializeSendBuffer()
|
|||||||
|
|
||||||
MockTransportSendControl control;
|
MockTransportSendControl control;
|
||||||
SerializeHelper::serializeString("tcp", &m_sendBuffer, &control);
|
SerializeHelper::serializeString("tcp", &m_sendBuffer, &control);
|
||||||
m_sendBuffer.putShort((int16_t)0); // count
|
m_sendBuffer.putShort((int16_t)0); // count
|
||||||
}
|
}
|
||||||
|
|
||||||
void ChannelSearchManager::flushSendBuffer()
|
void ChannelSearchManager::flushSendBuffer()
|
||||||
|
@ -363,7 +363,7 @@ bool AbstractCodec::readToBuffer(
|
|||||||
}
|
}
|
||||||
|
|
||||||
// assumption: remainingBytes < MAX_ENSURE_DATA_BUFFER_SIZE &&
|
// assumption: remainingBytes < MAX_ENSURE_DATA_BUFFER_SIZE &&
|
||||||
// requiredBytes < (socketBuffer.capacity() - 1)
|
// requiredBytes < (socketBuffer.capacity() - 1)
|
||||||
|
|
||||||
//
|
//
|
||||||
// copy unread part to the beginning of the buffer
|
// copy unread part to the beginning of the buffer
|
||||||
@ -427,7 +427,7 @@ void AbstractCodec::ensureData(std::size_t size) {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
// to large for buffer...
|
// 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;
|
std::ostringstream msg;
|
||||||
msg << "requested for buffer size " << size
|
msg << "requested for buffer size " << size
|
||||||
<< ", but maximum " << MAX_ENSURE_DATA_SIZE << " is allowed.";
|
<< ", but maximum " << MAX_ENSURE_DATA_SIZE << " is allowed.";
|
||||||
@ -471,7 +471,7 @@ void AbstractCodec::ensureData(std::size_t size) {
|
|||||||
{
|
{
|
||||||
// TODO check flags
|
// TODO check flags
|
||||||
//if (flags && SEGMENTED_FLAGS_MASK == 0)
|
//if (flags && SEGMENTED_FLAGS_MASK == 0)
|
||||||
// throw IllegalStateException("segmented message expected,
|
// throw IllegalStateException("segmented message expected,
|
||||||
//but current message flag does not indicate it");
|
//but current message flag does not indicate it");
|
||||||
|
|
||||||
|
|
||||||
@ -596,15 +596,15 @@ void AbstractCodec::startMessage(
|
|||||||
std::size_t ensureCapacity,
|
std::size_t ensureCapacity,
|
||||||
epics::pvData::int32 payloadSize) {
|
epics::pvData::int32 payloadSize) {
|
||||||
_lastMessageStartPosition =
|
_lastMessageStartPosition =
|
||||||
std::numeric_limits<size_t>::max(); // TODO revise this
|
std::numeric_limits<size_t>::max(); // TODO revise this
|
||||||
ensureBuffer(
|
ensureBuffer(
|
||||||
PVA_MESSAGE_HEADER_SIZE + ensureCapacity + _nextMessagePayloadOffset);
|
PVA_MESSAGE_HEADER_SIZE + ensureCapacity + _nextMessagePayloadOffset);
|
||||||
_lastMessageStartPosition = _sendBuffer.getPosition();
|
_lastMessageStartPosition = _sendBuffer.getPosition();
|
||||||
_sendBuffer.putByte(PVA_MAGIC);
|
_sendBuffer.putByte(PVA_MAGIC);
|
||||||
_sendBuffer.putByte(_clientServerFlag ? PVA_SERVER_PROTOCOL_REVISION : PVA_CLIENT_PROTOCOL_REVISION);
|
_sendBuffer.putByte(_clientServerFlag ? PVA_SERVER_PROTOCOL_REVISION : PVA_CLIENT_PROTOCOL_REVISION);
|
||||||
_sendBuffer.putByte(
|
_sendBuffer.putByte(
|
||||||
(_lastSegmentedMessageType | _byteOrderFlag | _clientServerFlag)); // data message
|
(_lastSegmentedMessageType | _byteOrderFlag | _clientServerFlag)); // data message
|
||||||
_sendBuffer.putByte(command); // command
|
_sendBuffer.putByte(command); // command
|
||||||
_sendBuffer.putInt(payloadSize);
|
_sendBuffer.putInt(payloadSize);
|
||||||
|
|
||||||
// apply offset
|
// apply offset
|
||||||
@ -619,13 +619,13 @@ void AbstractCodec::putControlMessage(
|
|||||||
epics::pvData::int32 data) {
|
epics::pvData::int32 data) {
|
||||||
|
|
||||||
_lastMessageStartPosition =
|
_lastMessageStartPosition =
|
||||||
std::numeric_limits<size_t>::max(); // TODO revise this
|
std::numeric_limits<size_t>::max(); // TODO revise this
|
||||||
ensureBuffer(PVA_MESSAGE_HEADER_SIZE);
|
ensureBuffer(PVA_MESSAGE_HEADER_SIZE);
|
||||||
_sendBuffer.putByte(PVA_MAGIC);
|
_sendBuffer.putByte(PVA_MAGIC);
|
||||||
_sendBuffer.putByte(_clientServerFlag ? PVA_SERVER_PROTOCOL_REVISION : PVA_CLIENT_PROTOCOL_REVISION);
|
_sendBuffer.putByte(_clientServerFlag ? PVA_SERVER_PROTOCOL_REVISION : PVA_CLIENT_PROTOCOL_REVISION);
|
||||||
_sendBuffer.putByte((0x01 | _byteOrderFlag | _clientServerFlag)); // control message
|
_sendBuffer.putByte((0x01 | _byteOrderFlag | _clientServerFlag)); // control message
|
||||||
_sendBuffer.putByte(command); // command
|
_sendBuffer.putByte(command); // command
|
||||||
_sendBuffer.putInt(data); // data
|
_sendBuffer.putInt(data); // data
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -687,8 +687,8 @@ void AbstractCodec::endMessage(bool hasMoreSegments) {
|
|||||||
{
|
{
|
||||||
sendBuffer.put(PVAConstants.PVA_MAGIC);
|
sendBuffer.put(PVAConstants.PVA_MAGIC);
|
||||||
sendBuffer.put(PVAConstants.PVA_VERSION);
|
sendBuffer.put(PVAConstants.PVA_VERSION);
|
||||||
sendBuffer.put((byte)(0x01 | byteOrderFlag)); // control data
|
sendBuffer.put((byte)(0x01 | byteOrderFlag)); // control data
|
||||||
sendBuffer.put((byte)0); // marker
|
sendBuffer.put((byte)0); // marker
|
||||||
sendBuffer.putInt((int)(totalBytesSent + position +
|
sendBuffer.putInt((int)(totalBytesSent + position +
|
||||||
PVAConstants.PVA_MESSAGE_HEADER_SIZE));
|
PVAConstants.PVA_MESSAGE_HEADER_SIZE));
|
||||||
nextMarkerPosition = position + markerPeriodBytes;
|
nextMarkerPosition = position + markerPeriodBytes;
|
||||||
@ -845,9 +845,9 @@ void AbstractCodec::processSendQueue()
|
|||||||
if (_sendBuffer.getPosition() > 0)
|
if (_sendBuffer.getPosition() > 0)
|
||||||
flush(true);
|
flush(true);
|
||||||
|
|
||||||
sendCompleted(); // do not schedule sending
|
sendCompleted(); // do not schedule sending
|
||||||
|
|
||||||
if (terminated()) // termination
|
if (terminated()) // termination
|
||||||
break;
|
break;
|
||||||
// termination (we want to process even if shutdown)
|
// termination (we want to process even if shutdown)
|
||||||
_sendQueue.pop_front(sender);
|
_sendQueue.pop_front(sender);
|
||||||
@ -1528,8 +1528,8 @@ void BlockingServerTCPTransportCodec::send(ByteBuffer* buffer,
|
|||||||
buffer->putByte(PVA_SERVER_PROTOCOL_REVISION);
|
buffer->putByte(PVA_SERVER_PROTOCOL_REVISION);
|
||||||
buffer->putByte(
|
buffer->putByte(
|
||||||
0x01 | 0x40 | ((EPICS_BYTE_ORDER == EPICS_ENDIAN_BIG)
|
0x01 | 0x40 | ((EPICS_BYTE_ORDER == EPICS_ENDIAN_BIG)
|
||||||
? 0x80 : 0x00)); // control + server + endian
|
? 0x80 : 0x00)); // control + server + endian
|
||||||
buffer->putByte(CMD_SET_ENDIANESS); // set byte order
|
buffer->putByte(CMD_SET_ENDIANESS); // set byte order
|
||||||
buffer->putInt(0);
|
buffer->putInt(0);
|
||||||
|
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
#ifdef beaconHandlerEpicsExportSharedSymbols
|
#ifdef beaconHandlerEpicsExportSharedSymbols
|
||||||
# define epicsExportSharedSymbols
|
# define epicsExportSharedSymbols
|
||||||
# undef beaconHandlerEpicsExportSharedSymbols
|
# undef beaconHandlerEpicsExportSharedSymbols
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <pv/pvaDefs.h>
|
#include <pv/pvaDefs.h>
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
|
|
||||||
#ifdef blockingTCPEpicsExportSharedSymbols
|
#ifdef blockingTCPEpicsExportSharedSymbols
|
||||||
# define epicsExportSharedSymbols
|
# define epicsExportSharedSymbols
|
||||||
# undef blockingTCPEpicsExportSharedSymbols
|
# undef blockingTCPEpicsExportSharedSymbols
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <pv/pvaConstants.h>
|
#include <pv/pvaConstants.h>
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
#ifdef blockingUDPEpicsExportSharedSymbols
|
#ifdef blockingUDPEpicsExportSharedSymbols
|
||||||
# define epicsExportSharedSymbols
|
# define epicsExportSharedSymbols
|
||||||
# undef blockingUDPEpicsExportSharedSymbols
|
# undef blockingUDPEpicsExportSharedSymbols
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <shareLib.h>
|
#include <shareLib.h>
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
#ifdef channelSearchManagerEpicsExportSharedSymbols
|
#ifdef channelSearchManagerEpicsExportSharedSymbols
|
||||||
# define epicsExportSharedSymbols
|
# define epicsExportSharedSymbols
|
||||||
# undef channelSearchManagerEpicsExportSharedSymbols
|
# undef channelSearchManagerEpicsExportSharedSymbols
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <pv/pvaDefs.h>
|
#include <pv/pvaDefs.h>
|
||||||
@ -43,8 +43,8 @@ public:
|
|||||||
/**
|
/**
|
||||||
* Search response from server (channel found).
|
* Search response from server (channel found).
|
||||||
* @param guid server GUID.
|
* @param guid server GUID.
|
||||||
* @param minorRevision server minor PVA revision.
|
* @param minorRevision server minor PVA revision.
|
||||||
* @param serverAddress server address.
|
* @param serverAddress server address.
|
||||||
*/
|
*/
|
||||||
// TODO make serverAddress an URI or similar
|
// TODO make serverAddress an URI or similar
|
||||||
virtual void searchResponse(const ServerGUID & guid, int8_t minorRevision, osiSockAddr* serverAddress) = 0;
|
virtual void searchResponse(const ServerGUID & guid, int8_t minorRevision, osiSockAddr* serverAddress) = 0;
|
||||||
@ -81,10 +81,10 @@ public:
|
|||||||
/**
|
/**
|
||||||
* Search response from server (channel found).
|
* Search response from server (channel found).
|
||||||
* @param guid server GUID.
|
* @param guid server GUID.
|
||||||
* @param cid client channel ID.
|
* @param cid client channel ID.
|
||||||
* @param seqNo search sequence number.
|
* @param seqNo search sequence number.
|
||||||
* @param minorRevision server minor PVA revision.
|
* @param minorRevision server minor PVA revision.
|
||||||
* @param serverAddress server address.
|
* @param serverAddress server address.
|
||||||
*/
|
*/
|
||||||
void searchResponse(const ServerGUID & guid, pvAccessID cid, int32_t seqNo, int8_t minorRevision, osiSockAddr* serverAddress);
|
void searchResponse(const ServerGUID & guid, pvAccessID cid, int32_t seqNo, int8_t minorRevision, osiSockAddr* serverAddress);
|
||||||
/**
|
/**
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
#ifdef remoteEpicsExportSharedSymbols
|
#ifdef remoteEpicsExportSharedSymbols
|
||||||
# define epicsExportSharedSymbols
|
# define epicsExportSharedSymbols
|
||||||
# undef remoteEpicsExportSharedSymbols
|
# undef remoteEpicsExportSharedSymbols
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <pv/pvaConstants.h>
|
#include <pv/pvaConstants.h>
|
||||||
|
@ -88,7 +88,7 @@
|
|||||||
|
|
||||||
#ifdef securityEpicsExportSharedSymbols
|
#ifdef securityEpicsExportSharedSymbols
|
||||||
# define epicsExportSharedSymbols
|
# define epicsExportSharedSymbols
|
||||||
# undef securityEpicsExportSharedSymbols
|
# undef securityEpicsExportSharedSymbols
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <pv/pvaDefs.h>
|
#include <pv/pvaDefs.h>
|
||||||
|
@ -38,7 +38,7 @@ public:
|
|||||||
* @param payloadBuffer data buffer.
|
* @param payloadBuffer data buffer.
|
||||||
* @param control deserialization control.
|
* @param control deserialization control.
|
||||||
* @param existingStructure if deserialized Field matches <code>existingStrcuture</code> Field, then
|
* @param existingStructure if deserialized Field matches <code>existingStrcuture</code> Field, then
|
||||||
* <code>existingStructure</code> instance is returned. <code>null</code> value is allowed.
|
* <code>existingStructure</code> instance is returned. <code>null</code> value is allowed.
|
||||||
* @return PVStructure instance, can be <code>null</code>.
|
* @return PVStructure instance, can be <code>null</code>.
|
||||||
*/
|
*/
|
||||||
static epics::pvData::PVStructure::shared_pointer deserializeStructureAndCreatePVStructure(epics::pvData::ByteBuffer* payloadBuffer,
|
static epics::pvData::PVStructure::shared_pointer deserializeStructureAndCreatePVStructure(epics::pvData::ByteBuffer* payloadBuffer,
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
#ifdef transportRegistryEpicsExportSharedSymbols
|
#ifdef transportRegistryEpicsExportSharedSymbols
|
||||||
# define epicsExportSharedSymbols
|
# define epicsExportSharedSymbols
|
||||||
# undef transportRegistryEpicsExportSharedSymbols
|
# undef transportRegistryEpicsExportSharedSymbols
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <pv/remote.h>
|
#include <pv/remote.h>
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
#ifdef clientContextImplEpicsExportSharedSymbols
|
#ifdef clientContextImplEpicsExportSharedSymbols
|
||||||
# define epicsExportSharedSymbols
|
# define epicsExportSharedSymbols
|
||||||
# undef clientContextImplEpicsExportSharedSymbols
|
# undef clientContextImplEpicsExportSharedSymbols
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <pv/pvAccess.h>
|
#include <pv/pvAccess.h>
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
#include <pv/valueBuilder.h>
|
#include <pv/valueBuilder.h>
|
||||||
#ifdef rpcClientEpicsExportSharedSymbols
|
#ifdef rpcClientEpicsExportSharedSymbols
|
||||||
# define epicsExportSharedSymbols
|
# define epicsExportSharedSymbols
|
||||||
# undef rpcClientEpicsExportSharedSymbols
|
# undef rpcClientEpicsExportSharedSymbols
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <pv/rpcService.h>
|
#include <pv/rpcService.h>
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
#ifdef rpcServerEpicsExportSharedSymbols
|
#ifdef rpcServerEpicsExportSharedSymbols
|
||||||
# define epicsExportSharedSymbols
|
# define epicsExportSharedSymbols
|
||||||
# undef rpcServerEpicsExportSharedSymbols
|
# undef rpcServerEpicsExportSharedSymbols
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <pv/pvAccess.h>
|
#include <pv/pvAccess.h>
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
#ifdef rpcServiceEpicsExportSharedSymbols
|
#ifdef rpcServiceEpicsExportSharedSymbols
|
||||||
# define epicsExportSharedSymbols
|
# define epicsExportSharedSymbols
|
||||||
# undef rpcServiceEpicsExportSharedSymbols
|
# undef rpcServiceEpicsExportSharedSymbols
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <pv/pvAccess.h>
|
#include <pv/pvAccess.h>
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
#ifdef beaconEmitterEpicsExportSharedSymbols
|
#ifdef beaconEmitterEpicsExportSharedSymbols
|
||||||
# define epicsExportSharedSymbols
|
# define epicsExportSharedSymbols
|
||||||
# undef beaconEmitterEpicsExportSharedSymbols
|
# undef beaconEmitterEpicsExportSharedSymbols
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <pv/remote.h>
|
#include <pv/remote.h>
|
||||||
@ -49,10 +49,10 @@ public:
|
|||||||
/**
|
/**
|
||||||
* Constructor.
|
* Constructor.
|
||||||
* @param protocol a protocol (transport) name to report.
|
* @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.
|
* @param context PVA context.
|
||||||
*/
|
*/
|
||||||
// BeaconEmitter(std::sting const & protocol,
|
// BeaconEmitter(std::sting const & protocol,
|
||||||
// Transport::shared_pointer const & transport, ServerContextImpl::shared_pointer const & context);
|
// Transport::shared_pointer const & transport, ServerContextImpl::shared_pointer const & context);
|
||||||
BeaconEmitter(std::string const & protocol,
|
BeaconEmitter(std::string const & protocol,
|
||||||
Transport::shared_pointer const & transport, std::tr1::shared_ptr<ServerContextImpl>& context);
|
Transport::shared_pointer const & transport, std::tr1::shared_ptr<ServerContextImpl>& context);
|
||||||
|
@ -54,7 +54,7 @@ public:
|
|||||||
* Constructor.
|
* Constructor.
|
||||||
* @param context PVA context.
|
* @param context PVA context.
|
||||||
*/
|
*/
|
||||||
// DefaultBeaconServerStatusProvider(ServerContext::shared_pointer const & context);
|
// DefaultBeaconServerStatusProvider(ServerContext::shared_pointer const & context);
|
||||||
DefaultBeaconServerStatusProvider(std::tr1::shared_ptr<ServerContext> const & context);
|
DefaultBeaconServerStatusProvider(std::tr1::shared_ptr<ServerContext> const & context);
|
||||||
/**
|
/**
|
||||||
* Destructor.
|
* Destructor.
|
||||||
|
@ -48,8 +48,8 @@ public:
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Run server (process events).
|
* Run server (process events).
|
||||||
* @param seconds time in seconds the server will process events (method will block), if <code>0</code>
|
* @param seconds time in seconds the server will process events (method will block), if <code>0</code>
|
||||||
* the method would block until <code>destroy()</code> is called.
|
* the method would block until <code>destroy()</code> is called.
|
||||||
* @throws BaseException if server is already destroyed.
|
* @throws BaseException if server is already destroyed.
|
||||||
*/
|
*/
|
||||||
virtual void run(epics::pvData::uint32 seconds) = 0;
|
virtual void run(epics::pvData::uint32 seconds) = 0;
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
#ifdef serverContextImplEpicsExportSharedSymbols
|
#ifdef serverContextImplEpicsExportSharedSymbols
|
||||||
# define epicsExportSharedSymbols
|
# define epicsExportSharedSymbols
|
||||||
# undef serverContextImplEpicsExportSharedSymbols
|
# undef serverContextImplEpicsExportSharedSymbols
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <pv/blockingUDP.h>
|
#include <pv/blockingUDP.h>
|
||||||
|
@ -1072,28 +1072,28 @@ void ServerGetHandler::handleResponse(osiSockAddr* responseFrom,
|
|||||||
} \
|
} \
|
||||||
catch (std::exception &e) { \
|
catch (std::exception &e) { \
|
||||||
Status status(Status::STATUSTYPE_FATAL, e.what()); \
|
Status status(Status::STATUSTYPE_FATAL, e.what()); \
|
||||||
BaseChannelRequester::sendFailureMessage((int8)cmd, _transport, _ioid, (int8)QOS_INIT, status); \
|
BaseChannelRequester::sendFailureMessage((int8)cmd, _transport, _ioid, (int8)QOS_INIT, status); \
|
||||||
destroy(); \
|
destroy(); \
|
||||||
} \
|
} \
|
||||||
catch (...) { \
|
catch (...) { \
|
||||||
Status status(Status::STATUSTYPE_FATAL, "unknown exception caught"); \
|
Status status(Status::STATUSTYPE_FATAL, "unknown exception caught"); \
|
||||||
BaseChannelRequester::sendFailureMessage((int8)cmd, _transport, _ioid, (int8)QOS_INIT, status); \
|
BaseChannelRequester::sendFailureMessage((int8)cmd, _transport, _ioid, (int8)QOS_INIT, status); \
|
||||||
destroy(); \
|
destroy(); \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define DESERIALIZE_EXCEPTION_GUARD(code) \
|
#define DESERIALIZE_EXCEPTION_GUARD(code) \
|
||||||
try { \
|
try { \
|
||||||
code; \
|
code; \
|
||||||
} \
|
} \
|
||||||
catch (std::exception &e) { \
|
catch (std::exception &e) { \
|
||||||
Status status(Status::STATUSTYPE_ERROR, e.what()); \
|
Status status(Status::STATUSTYPE_ERROR, e.what()); \
|
||||||
BaseChannelRequester::sendFailureMessage((int8)command, transport, ioid, qosCode, status); \
|
BaseChannelRequester::sendFailureMessage((int8)command, transport, ioid, qosCode, status); \
|
||||||
throw; \
|
throw; \
|
||||||
} \
|
} \
|
||||||
catch (...) { \
|
catch (...) { \
|
||||||
Status status(Status::STATUSTYPE_ERROR, "unknown exception caught"); \
|
Status status(Status::STATUSTYPE_ERROR, "unknown exception caught"); \
|
||||||
BaseChannelRequester::sendFailureMessage((int8)command, transport, ioid, qosCode, status); \
|
BaseChannelRequester::sendFailureMessage((int8)command, transport, ioid, qosCode, status); \
|
||||||
throw; \
|
throw; \
|
||||||
}
|
}
|
||||||
|
|
||||||
ServerChannelGetRequesterImpl::ServerChannelGetRequesterImpl(ServerContextImpl::shared_pointer const & context, ServerChannel::shared_pointer const & channel, const pvAccessID ioid, Transport::shared_pointer const & transport) :
|
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))
|
if (!request->startRequest(qosCode))
|
||||||
{
|
{
|
||||||
BaseChannelRequester::sendFailureMessage((int8)CMD_MONITOR, transport, ioid, qosCode, BaseChannelRequester::otherRequestPendingStatus);
|
BaseChannelRequester::sendFailureMessage((int8)CMD_MONITOR, transport, ioid, qosCode, BaseChannelRequester::otherRequestPendingStatus);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -361,13 +361,13 @@ int discoverInterfaces(IfaceNodeVector &list, SOCKET socket, const osiSockAddr *
|
|||||||
|
|
||||||
int discoverInterfaces(IfaceNodeVector &list, SOCKET socket, const osiSockAddr *pMatchAddr)
|
int discoverInterfaces(IfaceNodeVector &list, SOCKET socket, const osiSockAddr *pMatchAddr)
|
||||||
{
|
{
|
||||||
int status;
|
int status;
|
||||||
INTERFACE_INFO *pIfinfo;
|
INTERFACE_INFO *pIfinfo;
|
||||||
INTERFACE_INFO *pIfinfoList;
|
INTERFACE_INFO *pIfinfoList;
|
||||||
unsigned nelem;
|
unsigned nelem;
|
||||||
int numifs;
|
int numifs;
|
||||||
DWORD cbBytesReturned;
|
DWORD cbBytesReturned;
|
||||||
int match;
|
int match;
|
||||||
|
|
||||||
/* only valid for winsock 2 and above
|
/* only valid for winsock 2 and above
|
||||||
TODO resolve dllimport compilation problem and uncomment this check
|
TODO resolve dllimport compilation problem and uncomment this check
|
||||||
|
@ -91,7 +91,7 @@ void IntrospectionRegistry::serialize(FieldConstPtr const & field, ByteBuffer* b
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
control->ensureBuffer(3);
|
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);
|
buffer->putShort(key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
#include <pv/pvType.h>
|
#include <pv/pvType.h>
|
||||||
|
|
||||||
#ifdef hexDumpEpicsExportSharedSymbols
|
#ifdef hexDumpEpicsExportSharedSymbols
|
||||||
# define epicsExportSharedSymbols
|
# define epicsExportSharedSymbols
|
||||||
# undef hexDumpEpicsExportSharedSymbols
|
# undef hexDumpEpicsExportSharedSymbols
|
||||||
#endif
|
#endif
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
#ifdef introspectionRegistryEpicsExportSharedSymbols
|
#ifdef introspectionRegistryEpicsExportSharedSymbols
|
||||||
# define epicsExportSharedSymbols
|
# define epicsExportSharedSymbols
|
||||||
# undef introspectionRegistryEpicsExportSharedSymbols
|
# undef introspectionRegistryEpicsExportSharedSymbols
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// TODO check for memory leaks
|
// TODO check for memory leaks
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
#ifdef referenceCountingLockEpicsExportSharedSymbols
|
#ifdef referenceCountingLockEpicsExportSharedSymbols
|
||||||
# define epicsExportSharedSymbols
|
# define epicsExportSharedSymbols
|
||||||
# undef referenceCountingLockEpicsExportSharedSymbols
|
# undef referenceCountingLockEpicsExportSharedSymbols
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace epics {
|
namespace epics {
|
||||||
@ -52,11 +52,11 @@ public:
|
|||||||
* NOTE: Argument msecs is currently not supported due to
|
* NOTE: Argument msecs is currently not supported due to
|
||||||
* Darwin OS not supporting pthread_mutex_timedlock. May be changed in the future.
|
* Darwin OS not supporting pthread_mutex_timedlock. May be changed in the future.
|
||||||
*
|
*
|
||||||
* @param msecs the number of milleseconds to wait.
|
* @param msecs the number of milleseconds to wait.
|
||||||
* An argument less than or equal to zero means not to wait at all.
|
* An argument less than or equal to zero means not to wait at all.
|
||||||
*
|
*
|
||||||
* @return <code>true</code> if acquired, <code>false</code> otherwise.
|
* @return <code>true</code> if acquired, <code>false</code> otherwise.
|
||||||
* NOTE: currently this routine always returns true. Look above for explanation.
|
* NOTE: currently this routine always returns true. Look above for explanation.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
bool acquire(epics::pvData::int64 msecs);
|
bool acquire(epics::pvData::int64 msecs);
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
#ifdef requesterEpicsExportSharedSymbols
|
#ifdef requesterEpicsExportSharedSymbols
|
||||||
# define epicsExportSharedSymbols
|
# define epicsExportSharedSymbols
|
||||||
# undef requesterEpicsExportSharedSymbols
|
# undef requesterEpicsExportSharedSymbols
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
@ -14,71 +14,71 @@ using namespace epics::pvData;
|
|||||||
|
|
||||||
ReferenceCountingLock::ReferenceCountingLock(): _references(1)
|
ReferenceCountingLock::ReferenceCountingLock(): _references(1)
|
||||||
{
|
{
|
||||||
/* pthread_mutexattr_t mutexAttribute;
|
/* pthread_mutexattr_t mutexAttribute;
|
||||||
int32 retval = pthread_mutexattr_init(&mutexAttribute);
|
int32 retval = pthread_mutexattr_init(&mutexAttribute);
|
||||||
if(retval != 0)
|
if(retval != 0)
|
||||||
{
|
{
|
||||||
//string errMsg = "Error: pthread_mutexattr_init failed: " + string(strerror(retval));
|
//string errMsg = "Error: pthread_mutexattr_init failed: " + string(strerror(retval));
|
||||||
assert(false);
|
assert(false);
|
||||||
}
|
}
|
||||||
retval = pthread_mutexattr_settype(&mutexAttribute, PTHREAD_MUTEX_RECURSIVE);
|
retval = pthread_mutexattr_settype(&mutexAttribute, PTHREAD_MUTEX_RECURSIVE);
|
||||||
if(retval == 0)
|
if(retval == 0)
|
||||||
{
|
{
|
||||||
retval = pthread_mutex_init(_mutex, &mutexAttribute);
|
retval = pthread_mutex_init(_mutex, &mutexAttribute);
|
||||||
if(retval != 0)
|
if(retval != 0)
|
||||||
{
|
{
|
||||||
//string errMsg = "Error: pthread_mutex_init failed: " + string(strerror(retval));
|
//string errMsg = "Error: pthread_mutex_init failed: " + string(strerror(retval));
|
||||||
assert(false);
|
assert(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//string errMsg = "Error: pthread_mutexattr_settype failed: " + string(strerror(retval));
|
//string errMsg = "Error: pthread_mutexattr_settype failed: " + string(strerror(retval));
|
||||||
assert(false);
|
assert(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
pthread_mutexattr_destroy(&mutexAttribute);*/
|
pthread_mutexattr_destroy(&mutexAttribute);*/
|
||||||
}
|
}
|
||||||
|
|
||||||
ReferenceCountingLock::~ReferenceCountingLock()
|
ReferenceCountingLock::~ReferenceCountingLock()
|
||||||
{
|
{
|
||||||
// pthread_mutex_destroy(_mutex);
|
// pthread_mutex_destroy(_mutex);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ReferenceCountingLock::acquire(int64 /*msecs*/)
|
bool ReferenceCountingLock::acquire(int64 /*msecs*/)
|
||||||
{
|
{
|
||||||
_mutex.lock();
|
_mutex.lock();
|
||||||
return true;
|
return true;
|
||||||
/* struct timespec deltatime;
|
/* struct timespec deltatime;
|
||||||
if(msecs > 0)
|
if(msecs > 0)
|
||||||
{
|
{
|
||||||
deltatime.tv_sec = msecs / 1000;
|
deltatime.tv_sec = msecs / 1000;
|
||||||
deltatime.tv_nsec = (msecs % 1000) * 1000;
|
deltatime.tv_nsec = (msecs % 1000) * 1000;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
deltatime.tv_sec = 0;
|
deltatime.tv_sec = 0;
|
||||||
deltatime.tv_nsec = 0;
|
deltatime.tv_nsec = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32 retval = pthread_mutex_timedlock(_mutex, &deltatime);
|
int32 retval = pthread_mutex_timedlock(_mutex, &deltatime);
|
||||||
if(retval == 0)
|
if(retval == 0)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
void ReferenceCountingLock::release()
|
void ReferenceCountingLock::release()
|
||||||
{
|
{
|
||||||
_mutex.unlock();
|
_mutex.unlock();
|
||||||
/* int retval = pthread_mutex_unlock(_mutex);
|
/* int retval = pthread_mutex_unlock(_mutex);
|
||||||
if(retval != 0)
|
if(retval != 0)
|
||||||
{
|
{
|
||||||
//string errMsg = "Error: pthread_mutex_unlock failed: " + string(strerror(retval));
|
//string errMsg = "Error: pthread_mutex_unlock failed: " + string(strerror(retval));
|
||||||
//TODO do something?
|
//TODO do something?
|
||||||
}*/
|
}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO use atomic primitive impl.
|
// TODO use atomic primitive impl.
|
||||||
|
@ -54,7 +54,7 @@ const std::string ChannelAccessIFTest::TEST_ARRAY_CHANNEL_NAME = "testArray1";
|
|||||||
template <typename T>
|
template <typename T>
|
||||||
inline bool compareWithTol(const T v1, const T v2, const T tol)
|
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() {
|
int ChannelAccessIFTest::runAllTest() {
|
||||||
|
@ -138,7 +138,7 @@ public:
|
|||||||
std::size_t startPos = _readBuffer->getPosition();
|
std::size_t startPos = _readBuffer->getPosition();
|
||||||
//buffer.put(readBuffer);
|
//buffer.put(readBuffer);
|
||||||
//while (buffer.hasRemaining() && readBuffer.hasRemaining())
|
//while (buffer.hasRemaining() && readBuffer.hasRemaining())
|
||||||
// buffer.put(readBuffer.get());
|
// buffer.put(readBuffer.get());
|
||||||
|
|
||||||
std::size_t bufferRemaining = buffer->getRemaining();
|
std::size_t bufferRemaining = buffer->getRemaining();
|
||||||
std::size_t readBufferRemaining =
|
std::size_t readBufferRemaining =
|
||||||
@ -164,7 +164,7 @@ public:
|
|||||||
|
|
||||||
int write(ByteBuffer *buffer) {
|
int write(ByteBuffer *buffer) {
|
||||||
if (_disconnected)
|
if (_disconnected)
|
||||||
return -1; // TODO: not by the JavaDoc API spec
|
return -1; // TODO: not by the JavaDoc API spec
|
||||||
|
|
||||||
if (_throwExceptionOnSend)
|
if (_throwExceptionOnSend)
|
||||||
throw io_exception("text IO exception");
|
throw io_exception("text IO exception");
|
||||||
@ -1312,7 +1312,7 @@ private:
|
|||||||
{
|
{
|
||||||
testDiag("BEGIN TEST %s:", CURRENT_FUNCTION);
|
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 <= 3;
|
||||||
firstMessagePayloadSize++)
|
firstMessagePayloadSize++)
|
||||||
{
|
{
|
||||||
@ -1763,7 +1763,7 @@ private:
|
|||||||
{
|
{
|
||||||
testDiag("BEGIN TEST %s:", CURRENT_FUNCTION);
|
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 <= 3;
|
||||||
firstMessagePayloadSize++)
|
firstMessagePayloadSize++)
|
||||||
{
|
{
|
||||||
@ -1925,7 +1925,7 @@ private:
|
|||||||
testDiag("BEGIN TEST %s:", CURRENT_FUNCTION);
|
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 <= 3;
|
||||||
firstMessagePayloadSize++)
|
firstMessagePayloadSize++)
|
||||||
{
|
{
|
||||||
@ -2566,7 +2566,7 @@ private:
|
|||||||
|
|
||||||
void writePollOne() {
|
void writePollOne() {
|
||||||
testDiag("In %s", CURRENT_FUNCTION);
|
testDiag("In %s", CURRENT_FUNCTION);
|
||||||
_codec.processWrite(); // this should return immediately
|
_codec.processWrite(); // this should return immediately
|
||||||
|
|
||||||
// now we fake reading
|
// now we fake reading
|
||||||
_codec._writeBuffer.flip();
|
_codec._writeBuffer.flip();
|
||||||
|
@ -204,7 +204,7 @@ public:
|
|||||||
printf("%d %d %d %d %.3f\n", channels, arraySize, iterations, runs, sum/runs);
|
printf("%d %d %d %d %.3f\n", channels, arraySize, iterations, runs, sum/runs);
|
||||||
|
|
||||||
Lock guard(waitLoopPtrMutex);
|
Lock guard(waitLoopPtrMutex);
|
||||||
waitLoopEvent->signal(); // all done
|
waitLoopEvent->signal(); // all done
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (channelCount == 0)
|
else if (channelCount == 0)
|
||||||
|
@ -196,7 +196,7 @@ public:
|
|||||||
printf("%d %d %d %d %.3f\n", channels, arraySize, iterations, runs, sum/runs);
|
printf("%d %d %d %d %.3f\n", channels, arraySize, iterations, runs, sum/runs);
|
||||||
|
|
||||||
Lock guard(waitLoopPtrMutex);
|
Lock guard(waitLoopPtrMutex);
|
||||||
waitLoopEvent->signal(); // all done
|
waitLoopEvent->signal(); // all done
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (channelCount == 0)
|
else if (channelCount == 0)
|
||||||
|
@ -2503,7 +2503,7 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
class MockServerChannelProvider : public ChannelProvider,
|
class MockServerChannelProvider : public ChannelProvider,
|
||||||
public std::tr1::enable_shared_from_this<MockServerChannelProvider>
|
public std::tr1::enable_shared_from_this<MockServerChannelProvider>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
Reference in New Issue
Block a user