File SpinnakerRelayDefs.h¶
File List > include > SpinnakerRelayDefs.h
Go to the documentation of this file
//=============================================================================
// Copyright (c) 2026 FLIR Integrated Imaging Solutions, Inc. All Rights Reserved.
//
// This software is the confidential and proprietary information of FLIR
// Integrated Imaging Solutions, Inc. ("Confidential Information"). You
// shall not disclose such Confidential Information and shall use it only in
// accordance with the terms of the license agreement you entered into
// with FLIR Integrated Imaging Solutions, Inc. (FLIR).
//
// FLIR MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE
// SOFTWARE, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
// PURPOSE, OR NON-INFRINGEMENT. FLIR SHALL NOT BE LIABLE FOR ANY DAMAGES
// SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING
// THIS SOFTWARE OR ITS DERIVATIVES.
//=============================================================================
#ifndef FLIR_SPINNAKER_RELAY_DEFS_H
#define FLIR_SPINNAKER_RELAY_DEFS_H
#include "SpinGenApi/GCString.h"
#include "SpinnakerDefs.h"
namespace Spinnaker
{
namespace Relay
{
enum Role
{
SPINNAKER_ROLE_NOT_SET,
SPINNAKER_ROLE_SENDER,
SPINNAKER_ROLE_RECEIVER,
};
struct ConnectParameters
{
Role role; // Connection role
Spinnaker::GenICam::gcstring receiverIPAddress; // Receiver IPv4 Address
unsigned short receiverPort; // Receiver Port
Spinnaker::GenICam::gcstring senderIPAddress; // Sender IPv4 Address
unsigned short senderPort; // Sender Port
uint64_t timeout; // Connection timeout in milliseconds
ConnectParameters()
{
role = SPINNAKER_ROLE_NOT_SET;
receiverIPAddress = "192.168.0.100";
receiverPort = 8080;
senderIPAddress = "192.168.0.101";
senderPort = 8080;
timeout = EVENT_TIMEOUT_INFINITE;
}
};
struct RelayStatistics
{
/* An Instance refers to the time since SpinnakerRelay::GetStatistics() was called (or since
SpinnakerRelay::Connect() if GetStatistics has not yet been called). */
uint64_t instanceSendSuccessCount; // Number of successful sends from sender
uint64_t instanceSendErrorCount; // Number of error events on sender
uint64_t instanceSendDropCount; // Number of dropped or skipped sends from sender
uint64_t instanceSendDataCount; // Data sent in Bytes
uint64_t instanceRecvSuccessCount; // Number of successful receives from receiver
uint64_t instanceRecvErrorCount; // Number of error events on receiver
uint64_t instanceRecvDropCount; // Number of dropped or skipped receives from receiver
uint64_t instanceRecvDataCount; // Data received in Bytes
/* Total refers to the total time of the SpinnakerRelay connection, or the time since
SpinnakerRelay::ResetStatistics() was called. Note that these stats are reset to 0 on every
SpinnakerRelay::Connect() call. */
uint64_t totalSendSuccessCount; // Number of successful sends from sender
uint64_t totalSendErrorCount; // Number of error events on sender
uint64_t totalSendDropCount; // Number of dropped or skipped sends from sender
uint64_t totalSendDataCount; // Data sent in Bytes
uint64_t totalRecvSuccessCount; // Number of successful receives from receiver
uint64_t totalRecvErrorCount; // Number of error events on receiver
uint64_t totalRecvDropCount; // Number of dropped or skipped receives from receiver
uint64_t totalRecvDataCount; // Data received in Bytes
RelayStatistics()
{
instanceSendSuccessCount = 0;
instanceSendErrorCount = 0;
instanceSendDropCount = 0;
instanceSendDataCount = 0;
instanceRecvSuccessCount = 0;
instanceRecvErrorCount = 0;
instanceRecvDropCount = 0;
instanceRecvDataCount = 0;
totalSendSuccessCount = 0;
totalSendErrorCount = 0;
totalSendDropCount = 0;
totalSendDataCount = 0;
totalRecvSuccessCount = 0;
totalRecvErrorCount = 0;
totalRecvDropCount = 0;
totalRecvDataCount = 0;
}
};
} // namespace Relay
} // namespace Spinnaker
#endif // FLIR_SPINNAKER_RELAY_DEFS_H