PROFINET IO Controller Stack 1.0.0
Modern C++ implementation of a PROFINET IO Controller stack
Loading...
Searching...
No Matches
TestRpcDevice Class Reference
+ Collaboration diagram for TestRpcDevice:

Classes

struct  ControlRequest
 
struct  ControlResponse
 

Public Types

enum class  ResponseMode {
  ConnectOk , ConnectPnioError , RpcFault , RpcReject ,
  ConnectTimeout , ConnectIgnoreRequestThenRespond , Read , Write ,
  AlarmCr , Iocr
}
 

Public Member Functions

 TestRpcDevice (ResponseMode mode)
 
 ~TestRpcDevice ()
 
void Start ()
 
void Stop ()
 
std::size_t RequestCount () const
 
bool SawExpectedConnect () const
 
bool SawAlarmCr () const
 
bool SawInputIocr () const
 
bool SawOutputIocr () const
 
bool SawExpectedSubmodule () const
 
bool SawRead () const
 
bool SawWrite () const
 
std::uint16_t ReadIndex () const
 
std::uint16_t WriteIndex () const
 
Bytes LastWritePayload () const
 
bool WaitForConnect (std::chrono::milliseconds timeout=std::chrono::milliseconds{1000})
 Wait until the simulated device has received a valid CONNECT.
 
void SendApplicationReadyRequest (const std::array< std::uint8_t, uuidLenght > &arUuid, std::uint16_t sessionKey)
 Send an ApplicationReady request from the simulated device.
 
bool WaitForApplicationReadyResponse (std::chrono::milliseconds timeout=std::chrono::milliseconds{1000}) const
 Wait until an ApplicationReady response was received.
 
bool ReceivedApplicationReadyResponse () const
 Check whether the simulated device received an ApplicationReady response.
 
std::optional< ControlResponse > ApplicationReadyResponse () const
 Return the parsed ApplicationReady response.
 
std::optional< ControlRequest > LastApplicationReadyRequest () const
 Return the last ApplicationReady request sent by the device.
 
std::optional< PNRPCHeader > LastApplicationReadyRpcRequest () const
 Return the raw RPC ApplicationReady request.
 
std::optional< PNRPCHeader > LastApplicationReadyRpcResponse () const
 Return the raw RPC ApplicationReady response.
 
std::optional< PNNRDData > LastApplicationReadyResponseNrd () const
 Return the NRD contained in the ApplicationReady response.
 
PNRPCHeader SendRpcRequest (std::uint16_t operation, const Bytes &payload={}, std::optional< PNRPCHeader > packetTemplate=std::nullopt)
 Send an arbitrary RPC REQUEST to the controller.
 
void SendRpcResponse (std::uint16_t operation, const Bytes &payload={}, std::optional< PNRPCHeader > packetTemplate=std::nullopt)
 Send an arbitrary RPC RESPONSE to the controller.
 
void SendControlRequest (std::uint16_t blockType, std::uint16_t controlCommand, const std::array< std::uint8_t, uuidLenght > &arUuid, std::uint16_t sessionKey, std::uint16_t controlBlockProperties=0)
 Send an arbitrary PROFINET CONTROL request.
 

Private Member Functions

void Run ()
 
void HandleRequest (const Bytes &bytes, const asio::ip::udp::endpoint &sender)
 
void SendRpcResponse (const PNRPCHeader &response, const asio::ip::udp::endpoint &remote)
 
asio::ip::udp::endpoint ControllerCControlEndpoint () const
 
void HandleRpcFault (const PNRPCHeader &request, const asio::ip::udp::endpoint &sender)
 
void HandleRpcReject (const PNRPCHeader &request, const asio::ip::udp::endpoint &sender)
 
void HandleConnectPnioError (const PNRPCHeader &request, const asio::ip::udp::endpoint &sender)
 
void HandleConnect (const PNRPCHeader &request, const asio::ip::udp::endpoint &sender, bool sendRequestBeforeResponse, bool checkAlarmCr)
 
void HandleRead (const PNRPCHeader &request, const asio::ip::udp::endpoint &sender)
 
void HandleWrite (const PNRPCHeader &request, const asio::ip::udp::endpoint &sender)
 
void HandleApplicationReadyResponse (const PNRPCHeader &response)
 
void SendPacket (const PNRPCHeader &packet)
 

Static Private Member Functions

static Bytes BuildApplicationReadyRequestPayload (const std::array< std::uint8_t, uuidLenght > &arUuid, std::uint16_t sessionKey)
 
static std::optional< ControlRequest > ParseControlRequest (const PNRPCHeader &request)
 
static std::optional< ControlResponse > ParseControlResponse (const PNRPCHeader &response)
 
static Bytes BuildControlRequestPayload (std::uint16_t blockType, std::uint16_t controlCommand, const std::array< std::uint8_t, uuidLenght > &arUuid, std::uint16_t sessionKey, std::uint16_t controlBlockProperties)
 

Private Attributes

ResponseMode mode
 
asio::io_context ioContext
 
asio::ip::udp::socket socket
 
std::thread worker
 
std::atomic_bool running {false}
 
std::atomic< std::size_t > requestCount {0}
 
std::atomic_bool connected {false}
 
std::atomic_bool sawExpectedConnect {false}
 
std::atomic_bool sawAlarmCr {false}
 
std::atomic_bool sawInputIocr {false}
 
std::atomic_bool sawOutputIocr {false}
 
std::atomic_bool sawExpectedSubmodule {false}
 
std::atomic_bool sawRead {false}
 
std::atomic_bool sawWrite {false}
 
std::atomic< std::uint16_t > readIndex {0}
 
std::atomic< std::uint16_t > writeIndex {0}
 
std::mutex mutex
 
Bytes lastWritePayload
 
std::mutex stateMutex
 
std::condition_variable stateCondition
 
asio::ip::udp::endpoint controllerEndpoint
 
std::optional< PNRPCHeader > lastConnectRequest
 
std::optional< PNRPCHeader > lastApplicationReadyRequestRpc
 
std::optional< PNRPCHeader > lastApplicationReadyResponseRpc
 
std::optional< ControlRequest > applicationReadyRequest
 
std::optional< ControlResponse > applicationReadyResponse
 

Detailed Description

Definition at line 357 of file test_rpc_Integration.cpp.

Member Enumeration Documentation

◆ ResponseMode

enum class TestRpcDevice::ResponseMode
strong
Enumerator
ConnectOk 
ConnectPnioError 
RpcFault 
RpcReject 
ConnectTimeout 
ConnectIgnoreRequestThenRespond 
Read 
Write 
AlarmCr 
Iocr 

Definition at line 380 of file test_rpc_Integration.cpp.

Constructor & Destructor Documentation

◆ TestRpcDevice()

TestRpcDevice::TestRpcDevice ( ResponseMode  mode)
inlineexplicit

Definition at line 394 of file test_rpc_Integration.cpp.

◆ ~TestRpcDevice()

TestRpcDevice::~TestRpcDevice ( )
inline

Definition at line 400 of file test_rpc_Integration.cpp.

References Stop().

+ Here is the call graph for this function:

Member Function Documentation

◆ ApplicationReadyResponse()

std::optional< ControlResponse > TestRpcDevice::ApplicationReadyResponse ( ) const
inline

Return the parsed ApplicationReady response.

Definition at line 622 of file test_rpc_Integration.cpp.

References applicationReadyResponse, and stateMutex.

◆ BuildApplicationReadyRequestPayload()

◆ BuildControlRequestPayload()

static Bytes TestRpcDevice::BuildControlRequestPayload ( std::uint16_t  blockType,
std::uint16_t  controlCommand,
const std::array< std::uint8_t, uuidLenght > &  arUuid,
std::uint16_t  sessionKey,
std::uint16_t  controlBlockProperties 
)
inlinestaticprivate

◆ ControllerCControlEndpoint()

asio::ip::udp::endpoint TestRpcDevice::ControllerCControlEndpoint ( ) const
inlineprivate

Definition at line 983 of file test_rpc_Integration.cpp.

References controllerEndpoint, profinet::rpc::RPC_PORT, and stateMutex.

Referenced by SendPacket().

+ Here is the caller graph for this function:

◆ HandleApplicationReadyResponse()

void TestRpcDevice::HandleApplicationReadyResponse ( const PNRPCHeader &  response)
inlineprivate

Definition at line 1494 of file test_rpc_Integration.cpp.

References applicationReadyResponse, lastApplicationReadyResponseRpc, ParseControlResponse(), stateCondition, and stateMutex.

Referenced by HandleRequest().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ HandleConnect()

void TestRpcDevice::HandleConnect ( const PNRPCHeader &  request,
const asio::ip::udp::endpoint &  sender,
bool  sendRequestBeforeResponse,
bool  checkAlarmCr 
)
inlineprivate

◆ HandleConnectPnioError()

void TestRpcDevice::HandleConnectPnioError ( const PNRPCHeader &  request,
const asio::ip::udp::endpoint &  sender 
)
inlineprivate

Definition at line 1021 of file test_rpc_Integration.cpp.

References MakePnioStatusResponse(), MakeRpcResponse(), and SendRpcResponse().

Referenced by HandleRequest().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ HandleRead()

void TestRpcDevice::HandleRead ( const PNRPCHeader &  request,
const asio::ip::udp::endpoint &  sender 
)
inlineprivate

Definition at line 1202 of file test_rpc_Integration.cpp.

References ExtractNrdPayload(), profinet::PNIODHeader::index, profinet::PNIODHeader::length, MakePnioStatusResponse(), MakeRpcResponse(), profinet::PNRPCHeader::operationNumber, profinet::PNIODHeader::Parse(), profinet::PNIODHeader::payload, profinet::PNRPCHeader::READ, readIndex, sawRead, SendRpcResponse(), and profinet::PNIODHeader::ToBytes().

Referenced by HandleRequest().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ HandleRequest()

void TestRpcDevice::HandleRequest ( const Bytes &  bytes,
const asio::ip::udp::endpoint &  sender 
)
inlineprivate

Definition at line 859 of file test_rpc_Integration.cpp.

References AlarmCr, ConnectIgnoreRequestThenRespond, ConnectOk, ConnectPnioError, ConnectTimeout, profinet::PNRPCHeader::CONTROL, HandleApplicationReadyResponse(), HandleConnect(), HandleConnectPnioError(), HandleRead(), HandleRpcFault(), HandleRpcReject(), HandleWrite(), Iocr, mode, profinet::PNRPCHeader::operationNumber, profinet::PNRPCHeader::packetType, profinet::PNRPCHeader::Parse(), Read, profinet::PNRPCHeader::REQUEST, requestCount, profinet::PNRPCHeader::RESPONSE, RpcFault, RpcReject, and Write.

Referenced by Run().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ HandleRpcFault()

void TestRpcDevice::HandleRpcFault ( const PNRPCHeader &  request,
const asio::ip::udp::endpoint &  sender 
)
inlineprivate

Definition at line 1003 of file test_rpc_Integration.cpp.

References MakeRpcFault(), and SendRpcResponse().

Referenced by HandleRequest().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ HandleRpcReject()

void TestRpcDevice::HandleRpcReject ( const PNRPCHeader &  request,
const asio::ip::udp::endpoint &  sender 
)
inlineprivate

Definition at line 1012 of file test_rpc_Integration.cpp.

References MakeRpcReject(), and SendRpcResponse().

Referenced by HandleRequest().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ HandleWrite()

void TestRpcDevice::HandleWrite ( const PNRPCHeader &  request,
const asio::ip::udp::endpoint &  sender 
)
inlineprivate

Definition at line 1269 of file test_rpc_Integration.cpp.

References ExtractNrdPayload(), profinet::PNIODHeader::index, lastWritePayload, MakePnioStatusResponse(), MakeRpcResponse(), mutex, profinet::PNRPCHeader::operationNumber, profinet::PNIODHeader::Parse(), profinet::PNIODHeader::payload, sawWrite, SendRpcResponse(), profinet::PNRPCHeader::WRITE, and writeIndex.

Referenced by HandleRequest().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ LastApplicationReadyRequest()

std::optional< ControlRequest > TestRpcDevice::LastApplicationReadyRequest ( ) const
inline

Return the last ApplicationReady request sent by the device.

Definition at line 631 of file test_rpc_Integration.cpp.

References applicationReadyRequest, and stateMutex.

◆ LastApplicationReadyResponseNrd()

std::optional< PNNRDData > TestRpcDevice::LastApplicationReadyResponseNrd ( ) const
inline

Return the NRD contained in the ApplicationReady response.

Definition at line 658 of file test_rpc_Integration.cpp.

References lastApplicationReadyResponseRpc, profinet::PNNRDData::Parse(), and stateMutex.

+ Here is the call graph for this function:

◆ LastApplicationReadyRpcRequest()

std::optional< PNRPCHeader > TestRpcDevice::LastApplicationReadyRpcRequest ( ) const
inline

Return the raw RPC ApplicationReady request.

Definition at line 640 of file test_rpc_Integration.cpp.

References lastApplicationReadyRequestRpc, and stateMutex.

◆ LastApplicationReadyRpcResponse()

std::optional< PNRPCHeader > TestRpcDevice::LastApplicationReadyRpcResponse ( ) const
inline

Return the raw RPC ApplicationReady response.

Definition at line 649 of file test_rpc_Integration.cpp.

References lastApplicationReadyResponseRpc, and stateMutex.

◆ LastWritePayload()

Bytes TestRpcDevice::LastWritePayload ( ) const
inline

Definition at line 515 of file test_rpc_Integration.cpp.

References lastWritePayload, and mutex.

◆ ParseControlRequest()

static std::optional< ControlRequest > TestRpcDevice::ParseControlRequest ( const PNRPCHeader &  request)
inlinestaticprivate

◆ ParseControlResponse()

static std::optional< ControlResponse > TestRpcDevice::ParseControlResponse ( const PNRPCHeader &  response)
inlinestaticprivate

◆ ReadIndex()

std::uint16_t TestRpcDevice::ReadIndex ( ) const
inline

Definition at line 505 of file test_rpc_Integration.cpp.

References readIndex.

◆ ReceivedApplicationReadyResponse()

bool TestRpcDevice::ReceivedApplicationReadyResponse ( ) const
inline

Check whether the simulated device received an ApplicationReady response.

Definition at line 613 of file test_rpc_Integration.cpp.

References applicationReadyResponse, and stateMutex.

◆ RequestCount()

std::size_t TestRpcDevice::RequestCount ( ) const
inline

Definition at line 465 of file test_rpc_Integration.cpp.

References requestCount.

Referenced by TEST_F(), and TEST_F().

+ Here is the caller graph for this function:

◆ Run()

void TestRpcDevice::Run ( )
inlineprivate

Definition at line 821 of file test_rpc_Integration.cpp.

References buffer, HandleRequest(), profinet::RECEIVE_BUFFER_LENGTH, running, and socket.

Referenced by Start().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SawAlarmCr()

bool TestRpcDevice::SawAlarmCr ( ) const
inline

Definition at line 475 of file test_rpc_Integration.cpp.

References sawAlarmCr.

Referenced by TEST_F().

+ Here is the caller graph for this function:

◆ SawExpectedConnect()

bool TestRpcDevice::SawExpectedConnect ( ) const
inline

Definition at line 470 of file test_rpc_Integration.cpp.

References sawExpectedConnect.

Referenced by TEST_F(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().

+ Here is the caller graph for this function:

◆ SawExpectedSubmodule()

bool TestRpcDevice::SawExpectedSubmodule ( ) const
inline

Definition at line 490 of file test_rpc_Integration.cpp.

References sawExpectedSubmodule.

Referenced by TEST_F().

+ Here is the caller graph for this function:

◆ SawInputIocr()

bool TestRpcDevice::SawInputIocr ( ) const
inline

Definition at line 480 of file test_rpc_Integration.cpp.

References sawInputIocr.

Referenced by TEST_F().

+ Here is the caller graph for this function:

◆ SawOutputIocr()

bool TestRpcDevice::SawOutputIocr ( ) const
inline

Definition at line 485 of file test_rpc_Integration.cpp.

References sawOutputIocr.

Referenced by TEST_F().

+ Here is the caller graph for this function:

◆ SawRead()

bool TestRpcDevice::SawRead ( ) const
inline

Definition at line 495 of file test_rpc_Integration.cpp.

References sawRead.

◆ SawWrite()

bool TestRpcDevice::SawWrite ( ) const
inline

Definition at line 500 of file test_rpc_Integration.cpp.

References sawWrite.

◆ SendApplicationReadyRequest()

void TestRpcDevice::SendApplicationReadyRequest ( const std::array< std::uint8_t, uuidLenght > &  arUuid,
std::uint16_t  sessionKey 
)
inline

Send an ApplicationReady request from the simulated device.

The request is sent from the simulated device's ephemeral UDP port to the controller's CControl listener on RPC_PORT.

Parameters
arUuidApplication Relationship UUID.
sessionKeySession key belonging to the AR.

Definition at line 554 of file test_rpc_Integration.cpp.

References applicationReadyRequest, profinet::rpc::BLOCK_IOD_CONTROL_APP_READY_REQ, connected, profinet::rpc::CONTROL_CMD_APP_READY, lastApplicationReadyRequestRpc, lastConnectRequest, ParseControlRequest(), SendControlRequest(), stateCondition, and stateMutex.

+ Here is the call graph for this function:

◆ SendControlRequest()

void TestRpcDevice::SendControlRequest ( std::uint16_t  blockType,
std::uint16_t  controlCommand,
const std::array< std::uint8_t, uuidLenght > &  arUuid,
std::uint16_t  sessionKey,
std::uint16_t  controlBlockProperties = 0 
)
inline

Send an arbitrary PROFINET CONTROL request.

Parameters
blockTypePROFINET control block type.
controlCommandPROFINET control command.
arUuidApplication Relationship UUID.
sessionKeyApplication Relationship session key.
controlBlockPropertiesControl block properties.

This is used by integration tests to inject device-originated CONTROL requests such as ApplicationReady or other control operations.

Definition at line 776 of file test_rpc_Integration.cpp.

References applicationReadyRequest, profinet::rpc::BLOCK_IOD_CONTROL_APP_READY_REQ, BuildControlRequestPayload(), profinet::PNRPCHeader::CONTROL, lastApplicationReadyRequestRpc, MakeNrdResponse(), ParseControlRequest(), SendRpcRequest(), stateCondition, and stateMutex.

Referenced by SendApplicationReadyRequest().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SendPacket()

void TestRpcDevice::SendPacket ( const PNRPCHeader &  packet)
inlineprivate

Definition at line 1518 of file test_rpc_Integration.cpp.

References ControllerCControlEndpoint(), socket, and profinet::PNRPCHeader::ToBytes().

+ Here is the call graph for this function:

◆ SendRpcRequest()

PNRPCHeader TestRpcDevice::SendRpcRequest ( std::uint16_t  operation,
const Bytes &  payload = {},
std::optional< PNRPCHeader >  packetTemplate = std::nullopt 
)
inline

Send an arbitrary RPC REQUEST to the controller.

Parameters
operationRPC operation number.
payloadOptional RPC payload.
packetTemplateOptional RPC packet to use as a template.

When no template is supplied, the most recently received CONNECT request is used so that the generated packet has valid RPC correlation UUIDs.

Returns
the packet it sends

Definition at line 688 of file test_rpc_Integration.cpp.

Referenced by SendControlRequest().

+ Here is the caller graph for this function:

◆ SendRpcResponse() [1/2]

void TestRpcDevice::SendRpcResponse ( const PNRPCHeader &  response,
const asio::ip::udp::endpoint &  remote 
)
inlineprivate

Definition at line 966 of file test_rpc_Integration.cpp.

References socket, and profinet::PNRPCHeader::ToBytes().

+ Here is the call graph for this function:

◆ SendRpcResponse() [2/2]

void TestRpcDevice::SendRpcResponse ( std::uint16_t  operation,
const Bytes &  payload = {},
std::optional< PNRPCHeader >  packetTemplate = std::nullopt 
)
inline

Send an arbitrary RPC RESPONSE to the controller.

Parameters
operationRPC operation number.
payloadOptional RPC payload.
packetTemplateOptional RPC packet to use as a template.

The response uses the supplied packet as a template or, when omitted, the most recently received CONNECT request.

Definition at line 732 of file test_rpc_Integration.cpp.

Referenced by HandleConnect(), HandleConnectPnioError(), HandleRead(), HandleRpcFault(), HandleRpcReject(), and HandleWrite().

+ Here is the caller graph for this function:

◆ Start()

void TestRpcDevice::Start ( )
inline

Definition at line 405 of file test_rpc_Integration.cpp.

References Run(), running, socket, and worker.

Referenced by TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Stop()

void TestRpcDevice::Stop ( )
inline

Definition at line 438 of file test_rpc_Integration.cpp.

References running, socket, stateCondition, and worker.

Referenced by ~TestRpcDevice(), and TEST_F().

+ Here is the caller graph for this function:

◆ WaitForApplicationReadyResponse()

bool TestRpcDevice::WaitForApplicationReadyResponse ( std::chrono::milliseconds  timeout = std::chrono::milliseconds{1000}) const
inline

Wait until an ApplicationReady response was received.

Parameters
timeoutMaximum time to wait.
Returns
True when the response was received.

Definition at line 597 of file test_rpc_Integration.cpp.

◆ WaitForConnect()

bool TestRpcDevice::WaitForConnect ( std::chrono::milliseconds  timeout = std::chrono::milliseconds{1000})
inline

Wait until the simulated device has received a valid CONNECT.

Parameters
timeoutMaximum time to wait.
Returns
True if CONNECT was received before timeout.

Definition at line 528 of file test_rpc_Integration.cpp.

◆ WriteIndex()

std::uint16_t TestRpcDevice::WriteIndex ( ) const
inline

Definition at line 510 of file test_rpc_Integration.cpp.

References writeIndex.

Member Data Documentation

◆ applicationReadyRequest

std::optional<ControlRequest> TestRpcDevice::applicationReadyRequest
private

◆ applicationReadyResponse

std::optional<ControlResponse> TestRpcDevice::applicationReadyResponse
private

◆ connected

std::atomic_bool TestRpcDevice::connected {false}
private

Definition at line 1581 of file test_rpc_Integration.cpp.

Referenced by HandleConnect(), and SendApplicationReadyRequest().

◆ controllerEndpoint

asio::ip::udp::endpoint TestRpcDevice::controllerEndpoint
private

Definition at line 1600 of file test_rpc_Integration.cpp.

Referenced by ControllerCControlEndpoint(), and HandleConnect().

◆ ioContext

asio::io_context TestRpcDevice::ioContext
private

Definition at line 1574 of file test_rpc_Integration.cpp.

◆ lastApplicationReadyRequestRpc

std::optional<PNRPCHeader> TestRpcDevice::lastApplicationReadyRequestRpc
private

◆ lastApplicationReadyResponseRpc

std::optional<PNRPCHeader> TestRpcDevice::lastApplicationReadyResponseRpc
private

◆ lastConnectRequest

std::optional<PNRPCHeader> TestRpcDevice::lastConnectRequest
private

Definition at line 1602 of file test_rpc_Integration.cpp.

Referenced by HandleConnect(), and SendApplicationReadyRequest().

◆ lastWritePayload

Bytes TestRpcDevice::lastWritePayload
private

Definition at line 1595 of file test_rpc_Integration.cpp.

Referenced by HandleWrite(), and LastWritePayload().

◆ mode

ResponseMode TestRpcDevice::mode
private

Definition at line 1572 of file test_rpc_Integration.cpp.

Referenced by HandleConnect(), and HandleRequest().

◆ mutex

std::mutex TestRpcDevice::mutex
mutableprivate

Definition at line 1594 of file test_rpc_Integration.cpp.

Referenced by HandleWrite(), and LastWritePayload().

◆ readIndex

std::atomic<std::uint16_t> TestRpcDevice::readIndex {0}
private

Definition at line 1591 of file test_rpc_Integration.cpp.

Referenced by HandleRead(), and ReadIndex().

◆ requestCount

std::atomic<std::size_t> TestRpcDevice::requestCount {0}
private

Definition at line 1579 of file test_rpc_Integration.cpp.

Referenced by HandleRequest(), and RequestCount().

◆ running

std::atomic_bool TestRpcDevice::running {false}
private

Definition at line 1578 of file test_rpc_Integration.cpp.

Referenced by Run(), Start(), and Stop().

◆ sawAlarmCr

std::atomic_bool TestRpcDevice::sawAlarmCr {false}
private

Definition at line 1584 of file test_rpc_Integration.cpp.

Referenced by HandleConnect(), and SawAlarmCr().

◆ sawExpectedConnect

std::atomic_bool TestRpcDevice::sawExpectedConnect {false}
private

Definition at line 1583 of file test_rpc_Integration.cpp.

Referenced by HandleConnect(), and SawExpectedConnect().

◆ sawExpectedSubmodule

std::atomic_bool TestRpcDevice::sawExpectedSubmodule {false}
private

Definition at line 1587 of file test_rpc_Integration.cpp.

Referenced by HandleConnect(), and SawExpectedSubmodule().

◆ sawInputIocr

std::atomic_bool TestRpcDevice::sawInputIocr {false}
private

Definition at line 1585 of file test_rpc_Integration.cpp.

Referenced by HandleConnect(), and SawInputIocr().

◆ sawOutputIocr

std::atomic_bool TestRpcDevice::sawOutputIocr {false}
private

Definition at line 1586 of file test_rpc_Integration.cpp.

Referenced by HandleConnect(), and SawOutputIocr().

◆ sawRead

std::atomic_bool TestRpcDevice::sawRead {false}
private

Definition at line 1588 of file test_rpc_Integration.cpp.

Referenced by HandleRead(), and SawRead().

◆ sawWrite

std::atomic_bool TestRpcDevice::sawWrite {false}
private

Definition at line 1589 of file test_rpc_Integration.cpp.

Referenced by HandleWrite(), and SawWrite().

◆ socket

asio::ip::udp::socket TestRpcDevice::socket
private

Definition at line 1575 of file test_rpc_Integration.cpp.

Referenced by HandleConnect(), Run(), SendPacket(), SendRpcResponse(), Start(), and Stop().

◆ stateCondition

std::condition_variable TestRpcDevice::stateCondition
mutableprivate

◆ stateMutex

◆ worker

std::thread TestRpcDevice::worker
private

Definition at line 1576 of file test_rpc_Integration.cpp.

Referenced by Start(), and Stop().

◆ writeIndex

std::atomic<std::uint16_t> TestRpcDevice::writeIndex {0}
private

Definition at line 1592 of file test_rpc_Integration.cpp.

Referenced by HandleWrite(), and WriteIndex().


The documentation for this class was generated from the following file: