Go to the documentation of this file.
65 #ifndef PROXYCOMMUNICATOR_H
66 #define PROXYCOMMUNICATOR_H
104 return std::shared_ptr<StreamInterface>();
bool isPortOpen() const override
Checks if the associated port is open.
uint32_t defaultInterfaceTimeout() const override
Returns the default timeout needed for this interface.
A list of uint8_t values.
XsResultValue writeRawData(const XsByteArray &data) override
Writes raw data to the communication channel.
OpenPortStage
Port opening stages.
A class that uses serial communication.
std::shared_ptr< StreamInterface > createStreamInterface(const XsPortInfo &pi) override
Creates a stream interface.
bool openPort(const XsPortInfo &portInfo, OpenPortStage stage=OPS_Full, bool detectRs485=false) override
Opens a proxy port.
bool doTransaction(const XsMessage &msg, XsMessage &rcv, uint32_t timeout) override
Write a message and await the reply.
XsPortInfo portInfo() const override
XsResultValue processBufferedData(const XsByteArray &rawIn, std::deque< XsMessage > &messages) override
Read all messages from the buffered read data after adding new data supplied in rawIn.
bool isDockedAt(Communicator *other) const override
Has no effect for the ProxyCommunicator. Always returns false.
void closePort() override
Closes the port.
bool reopenPort(OpenPortStage stage=OPS_Full, bool skipDeviceIdCheck=false) override
Closes and tries to reopen the port.
XsResultValue
Xsens result values.
void handleMessage(const XsMessage &message) override
Handles a message received on the communication channel.
bool allowReprocessing() const override
A base struct for a communication interface.
Contains a descriptor for opening a communication port to an Xsens device.
static XsPortInfo createPortInfo(int channelId)
Creates a default port info object based on the given user-provided channel identifier.
Structure for storing a single message.
uint32_t m_channelLatency
ProxyCommunicator(int channelId, uint32_t channelLatency)
Constructor.
XsResultValue readDataToBuffer(XsByteArray &raw) override
Has no effect for the ProxyCommunicator.
void handleReceivedData(const XsByteArray &data)
Handles data received from the communication channel.
~ProxyCommunicator() override
Destructor.
Class that delegates callbacks to registered XsCallbackHandlerItems.
void flushPort() override
Flushes all remaining data on the open port. Has no effect for the ProxyCommunicator.