int16 beaconSeqId -> int8 flags + int8 beaconSeqId

This commit is contained in:
Matej Sekoranja
2014-11-17 12:14:52 +01:00
parent e462f9af53
commit 4e53da07c8
3 changed files with 10 additions and 5 deletions

View File

@@ -2877,7 +2877,8 @@ namespace epics {
GUID guid;
payloadBuffer->get(guid.value, 0, sizeof(guid.value));
int16 sequentalID = payloadBuffer->getShort();
/*int8 qosCode =*/ payloadBuffer->getByte();
int8 sequentalID = payloadBuffer->getByte();
int16 changeCount = payloadBuffer->getShort();
osiSockAddr serverAddress;

View File

@@ -78,8 +78,12 @@ void BeaconEmitter::send(ByteBuffer* buffer, TransportSendControl* control)
control->startMessage((int8)0, 12+2+2+16+2);
buffer->put(_guid.value, 0, sizeof(_guid.value));
buffer->putShort(_beaconSequenceID);
// TODO qos/flags (e.g. multicast/unicast)
buffer->putByte(0);
buffer->putByte(_beaconSequenceID);
// TODO for now fixed changeCount
buffer->putShort(0);
@@ -124,7 +128,7 @@ void BeaconEmitter::start()
void BeaconEmitter::reschedule()
{
const double period = (_beaconSequenceID >= _beaconCountLimit) ? _slowBeaconPeriod : _fastBeaconPeriod;
const double period = (_beaconSequenceID >= _beaconCountLimit) ? _slowBeaconPeriod : _fastBeaconPeriod;
if (period > 0)
{
_timer->scheduleAfterDelay(shared_from_this(), period);

View File

@@ -107,7 +107,7 @@ namespace epics { namespace pvAccess {
/**
* Beacon sequence ID.
*/
epics::pvData::int16 _beaconSequenceID;
epics::pvData::int8 _beaconSequenceID;
/**
* Server GUID.