Compare commits
18 Commits
e12a8cfa29
...
develop
Author | SHA1 | Date | |
---|---|---|---|
42867ad0cb | |||
6381d9a83c | |||
73bf1cc229
|
|||
222f02aefd | |||
e9b4fc9825 | |||
0660457c92
|
|||
7c9b9e4cd8
|
|||
3b0ee7ca31
|
|||
fb2e480705 | |||
b8ae646060 | |||
f307a86d9a
|
|||
8b21dd276d | |||
e00da212cd | |||
a229748aa4 | |||
e6e3753324 | |||
94bd1ba2ab | |||
c5159fb645
|
|||
203c0bac5c
|
@@ -26,6 +26,11 @@ ReturnValue_t DeviceHandlerFailureIsolation::eventReceived(EventMessage* event)
|
|||||||
if (isFdirInActionOrAreWeFaulty(event)) {
|
if (isFdirInActionOrAreWeFaulty(event)) {
|
||||||
return returnvalue::OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
// As mentioned in the function documentation, no FDIR reaction are performed when the device
|
||||||
|
// is in external control.
|
||||||
|
if (owner->getHealth() == HasHealthIF::EXTERNAL_CONTROL) {
|
||||||
|
return returnvalue::OK;
|
||||||
|
}
|
||||||
ReturnValue_t result = returnvalue::FAILED;
|
ReturnValue_t result = returnvalue::FAILED;
|
||||||
switch (event->getEvent()) {
|
switch (event->getEvent()) {
|
||||||
case HasModesIF::MODE_TRANSITION_FAILED:
|
case HasModesIF::MODE_TRANSITION_FAILED:
|
||||||
@@ -186,15 +191,6 @@ void DeviceHandlerFailureIsolation::setFdirState(FDIRState state) {
|
|||||||
fdirState = state;
|
fdirState = state;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DeviceHandlerFailureIsolation::triggerEvent(Event event, uint32_t parameter1,
|
|
||||||
uint32_t parameter2) {
|
|
||||||
// Do not throw error events if fdirState != none.
|
|
||||||
// This will still forward MODE and HEALTH INFO events in any case.
|
|
||||||
if (fdirState == NONE || event::getSeverity(event) == severity::INFO) {
|
|
||||||
FailureIsolationBase::triggerEvent(event, parameter1, parameter2);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
bool DeviceHandlerFailureIsolation::isFdirActionInProgress() { return (fdirState != NONE); }
|
bool DeviceHandlerFailureIsolation::isFdirActionInProgress() { return (fdirState != NONE); }
|
||||||
|
|
||||||
void DeviceHandlerFailureIsolation::startRecovery(Event reason) {
|
void DeviceHandlerFailureIsolation::startRecovery(Event reason) {
|
||||||
|
@@ -17,7 +17,6 @@ class DeviceHandlerFailureIsolation : public FailureIsolationBase {
|
|||||||
uint8_t eventQueueDepth = 10);
|
uint8_t eventQueueDepth = 10);
|
||||||
~DeviceHandlerFailureIsolation();
|
~DeviceHandlerFailureIsolation();
|
||||||
ReturnValue_t initialize();
|
ReturnValue_t initialize();
|
||||||
void triggerEvent(Event event, uint32_t parameter1 = 0, uint32_t parameter2 = 0);
|
|
||||||
bool isFdirActionInProgress();
|
bool isFdirActionInProgress();
|
||||||
virtual ReturnValue_t getParameter(uint8_t domainId, uint8_t uniqueId,
|
virtual ReturnValue_t getParameter(uint8_t domainId, uint8_t uniqueId,
|
||||||
ParameterWrapper* parameterWrapper,
|
ParameterWrapper* parameterWrapper,
|
||||||
@@ -41,6 +40,19 @@ class DeviceHandlerFailureIsolation : public FailureIsolationBase {
|
|||||||
static const uint32_t DEFAULT_MAX_MISSED_REPLY_COUNT = 5;
|
static const uint32_t DEFAULT_MAX_MISSED_REPLY_COUNT = 5;
|
||||||
static const uint32_t DEFAULT_MISSED_REPLY_TIME_MS = 10000;
|
static const uint32_t DEFAULT_MISSED_REPLY_TIME_MS = 10000;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is the default implementation of the eventReceived function.
|
||||||
|
*
|
||||||
|
* It will perform recoveries or failures on a pre-defined set of events. If the user wants
|
||||||
|
* to add handling for custom events, this function should be overriden.
|
||||||
|
*
|
||||||
|
* It should be noted that the default implementation will not perform FDIR reactions if the
|
||||||
|
* handler is faulty or in external control by default. If the user commands the device
|
||||||
|
* manually, this might be related to debugging to testing the device in a low-level way. FDIR
|
||||||
|
* reactions might get in the way of this process by restarting the device or putting it in
|
||||||
|
* the faulty state. If the user still requires FDIR handling in the EXTERNAL_CONTROL case,
|
||||||
|
* this function should be overriden.
|
||||||
|
*/
|
||||||
virtual ReturnValue_t eventReceived(EventMessage* event);
|
virtual ReturnValue_t eventReceived(EventMessage* event);
|
||||||
virtual void eventConfirmed(EventMessage* event);
|
virtual void eventConfirmed(EventMessage* event);
|
||||||
void wasParentsFault(EventMessage* event);
|
void wasParentsFault(EventMessage* event);
|
||||||
|
@@ -11,6 +11,7 @@ FreshDeviceHandlerBase::FreshDeviceHandlerBase(DhbConfig config)
|
|||||||
healthHelper(this, getObjectId()),
|
healthHelper(this, getObjectId()),
|
||||||
paramHelper(this),
|
paramHelper(this),
|
||||||
poolManager(this, nullptr),
|
poolManager(this, nullptr),
|
||||||
|
fdirInstance(config.fdirInstance),
|
||||||
defaultFdirParent(config.defaultFdirParent) {
|
defaultFdirParent(config.defaultFdirParent) {
|
||||||
auto mqArgs = MqArgs(config.objectId, static_cast<void*>(this));
|
auto mqArgs = MqArgs(config.objectId, static_cast<void*>(this));
|
||||||
messageQueue = QueueFactory::instance()->createMessageQueue(
|
messageQueue = QueueFactory::instance()->createMessageQueue(
|
||||||
@@ -30,6 +31,7 @@ FreshDeviceHandlerBase::~FreshDeviceHandlerBase() {
|
|||||||
ReturnValue_t FreshDeviceHandlerBase::performOperation(uint8_t opCode) {
|
ReturnValue_t FreshDeviceHandlerBase::performOperation(uint8_t opCode) {
|
||||||
performDeviceOperationPreQueueHandling(opCode);
|
performDeviceOperationPreQueueHandling(opCode);
|
||||||
handleQueue();
|
handleQueue();
|
||||||
|
fdirInstance->checkForFailures();
|
||||||
performDeviceOperation(opCode);
|
performDeviceOperation(opCode);
|
||||||
poolManager.performHkOperation();
|
poolManager.performHkOperation();
|
||||||
return returnvalue::OK;
|
return returnvalue::OK;
|
||||||
|
@@ -129,7 +129,7 @@ class FreshDeviceHandlerBase : public SystemObject,
|
|||||||
ReturnValue_t executeAction(ActionId_t actionId, MessageQueueId_t commandedBy,
|
ReturnValue_t executeAction(ActionId_t actionId, MessageQueueId_t commandedBy,
|
||||||
const uint8_t* data, size_t size) override = 0;
|
const uint8_t* data, size_t size) override = 0;
|
||||||
// Executable overrides.
|
// Executable overrides.
|
||||||
ReturnValue_t performOperation(uint8_t opCode) override;
|
virtual ReturnValue_t performOperation(uint8_t opCode) override;
|
||||||
ReturnValue_t initializeAfterTaskCreation() override;
|
ReturnValue_t initializeAfterTaskCreation() override;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -148,25 +148,16 @@ void FailureIsolationBase::doConfirmFault(EventMessage* event) {
|
|||||||
ReturnValue_t FailureIsolationBase::confirmFault(EventMessage* event) { return YOUR_FAULT; }
|
ReturnValue_t FailureIsolationBase::confirmFault(EventMessage* event) { return YOUR_FAULT; }
|
||||||
|
|
||||||
void FailureIsolationBase::triggerEvent(Event event, uint32_t parameter1, uint32_t parameter2) {
|
void FailureIsolationBase::triggerEvent(Event event, uint32_t parameter1, uint32_t parameter2) {
|
||||||
// With this mechanism, all events are disabled for a certain device.
|
// By default, we trigger all events and also call the handler function to handle FDIR reactions
|
||||||
// That's not so good for visibility.
|
// which might occur due to these events. This makes all events visible. If the handling of
|
||||||
if (isFdirDisabledForSeverity(event::getSeverity(event))) {
|
// FDIR reaction should be disabled, this should be done through dedicated logic inside the
|
||||||
return;
|
// eventReceived function.
|
||||||
}
|
|
||||||
EventMessage message(event, ownerId, parameter1, parameter2);
|
EventMessage message(event, ownerId, parameter1, parameter2);
|
||||||
EventManagerIF::triggerEvent(&message, eventQueue->getId());
|
EventManagerIF::triggerEvent(&message, eventQueue->getId());
|
||||||
eventReceived(&message);
|
eventReceived(&message);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool FailureIsolationBase::isFdirDisabledForSeverity(EventSeverity_t severity) {
|
bool FailureIsolationBase::isFdirDisabledForSeverity(EventSeverity_t severity) { return false; }
|
||||||
if ((owner != NULL) && (severity != severity::INFO)) {
|
|
||||||
if (owner->getHealth() == HasHealthIF::EXTERNAL_CONTROL) {
|
|
||||||
// External control disables handling of fault messages.
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
void FailureIsolationBase::throwFdirEvent(Event event, uint32_t parameter1, uint32_t parameter2) {
|
void FailureIsolationBase::throwFdirEvent(Event event, uint32_t parameter1, uint32_t parameter2) {
|
||||||
EventMessage message(event, ownerId, parameter1, parameter2);
|
EventMessage message(event, ownerId, parameter1, parameter2);
|
||||||
|
@@ -44,13 +44,13 @@ class FailureIsolationBase : public ConfirmsFailuresIF, public HasParametersIF {
|
|||||||
virtual void wasParentsFault(EventMessage* event);
|
virtual void wasParentsFault(EventMessage* event);
|
||||||
virtual ReturnValue_t confirmFault(EventMessage* event);
|
virtual ReturnValue_t confirmFault(EventMessage* event);
|
||||||
virtual void decrementFaultCounters() = 0;
|
virtual void decrementFaultCounters() = 0;
|
||||||
|
virtual bool isFdirDisabledForSeverity(EventSeverity_t severity);
|
||||||
ReturnValue_t sendConfirmationRequest(EventMessage* event,
|
ReturnValue_t sendConfirmationRequest(EventMessage* event,
|
||||||
MessageQueueId_t destination = MessageQueueIF::NO_QUEUE);
|
MessageQueueId_t destination = MessageQueueIF::NO_QUEUE);
|
||||||
void throwFdirEvent(Event event, uint32_t parameter1 = 0, uint32_t parameter2 = 0);
|
void throwFdirEvent(Event event, uint32_t parameter1 = 0, uint32_t parameter2 = 0);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void doConfirmFault(EventMessage* event);
|
void doConfirmFault(EventMessage* event);
|
||||||
bool isFdirDisabledForSeverity(EventSeverity_t severity);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* FRAMEWORK_FDIR_FAILUREISOLATIONBASE_H_ */
|
#endif /* FRAMEWORK_FDIR */
|
||||||
|
@@ -18,18 +18,13 @@ ReturnValue_t Service9TimeManagement::performService() { return returnvalue::OK;
|
|||||||
ReturnValue_t Service9TimeManagement::handleRequest(uint8_t subservice) {
|
ReturnValue_t Service9TimeManagement::handleRequest(uint8_t subservice) {
|
||||||
switch (subservice) {
|
switch (subservice) {
|
||||||
case Subservice::SET_TIME: {
|
case Subservice::SET_TIME: {
|
||||||
reportCurrentTime();
|
reportCurrentTime(CLOCK_DUMP_BEFORE_SETTING_TIME);
|
||||||
ReturnValue_t result = setTime();
|
ReturnValue_t result = setTime();
|
||||||
reportCurrentTime();
|
reportCurrentTime(CLOCK_DUMP_AFTER_SETTING_TIME);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
case Subservice::DUMP_TIME: {
|
case Subservice::DUMP_TIME: {
|
||||||
timeval newTime;
|
reportCurrentTime();
|
||||||
ReturnValue_t result = Clock::getClock_timeval(&newTime);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
triggerEvent(CLOCK_DUMP, newTime.tv_sec, newTime.tv_usec);
|
|
||||||
return returnvalue::OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
case Subservice::RELATIVE_TIMESHIFT: {
|
case Subservice::RELATIVE_TIMESHIFT: {
|
||||||
@@ -38,7 +33,7 @@ ReturnValue_t Service9TimeManagement::handleRequest(uint8_t subservice) {
|
|||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
reportTime(currentTime);
|
reportTime(CLOCK_DUMP_BEFORE_SETTING_TIME, currentTime);
|
||||||
|
|
||||||
if (currentPacket.getUserDataLen() != 8) {
|
if (currentPacket.getUserDataLen() != 8) {
|
||||||
return AcceptsTelecommandsIF::ILLEGAL_APPLICATION_DATA;
|
return AcceptsTelecommandsIF::ILLEGAL_APPLICATION_DATA;
|
||||||
@@ -66,7 +61,7 @@ ReturnValue_t Service9TimeManagement::handleRequest(uint8_t subservice) {
|
|||||||
}
|
}
|
||||||
result = Clock::setClock(&newTime);
|
result = Clock::setClock(&newTime);
|
||||||
if (result == returnvalue::OK) {
|
if (result == returnvalue::OK) {
|
||||||
reportTime(newTime);
|
reportTime(CLOCK_DUMP_AFTER_SETTING_TIME, newTime);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@@ -93,12 +88,12 @@ ReturnValue_t Service9TimeManagement::setTime() {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Service9TimeManagement::reportCurrentTime() {
|
void Service9TimeManagement::reportCurrentTime(Event event) {
|
||||||
timeval currentTime{};
|
timeval currentTime{};
|
||||||
Clock::getClock(¤tTime);
|
Clock::getClock(¤tTime);
|
||||||
triggerEvent(CLOCK_DUMP, currentTime.tv_sec, currentTime.tv_usec);
|
triggerEvent(event, currentTime.tv_sec, currentTime.tv_usec);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Service9TimeManagement::reportTime(timeval time) {
|
void Service9TimeManagement::reportTime(Event event, timeval time) {
|
||||||
triggerEvent(CLOCK_DUMP, time.tv_sec, time.tv_usec);
|
triggerEvent(event, time.tv_sec, time.tv_usec);
|
||||||
}
|
}
|
||||||
|
@@ -10,14 +10,16 @@ class Service9TimeManagement : public PusServiceBase {
|
|||||||
|
|
||||||
static constexpr uint32_t NANOS_PER_SECOND = 1'000'000'000;
|
static constexpr uint32_t NANOS_PER_SECOND = 1'000'000'000;
|
||||||
|
|
||||||
//!< Clock has been set. P1: old timeval seconds. P2: new timeval seconds.
|
//!< [EXPORT] : [COMMENT] Clock has been set. P1: old timeval seconds. P2: new timeval seconds.
|
||||||
static constexpr Event CLOCK_SET = MAKE_EVENT(0, severity::INFO);
|
static constexpr Event CLOCK_SET = MAKE_EVENT(0, severity::INFO);
|
||||||
//!< Clock dump event. P1: timeval seconds P2: timeval milliseconds.
|
//!< [EXPORT] : [COMMENT] Clock dump event. P1: timeval seconds P2: timeval milliseconds.
|
||||||
static constexpr Event CLOCK_DUMP_LEGACY = MAKE_EVENT(1, severity::INFO);
|
static constexpr Event CLOCK_DUMP_LEGACY = MAKE_EVENT(1, severity::INFO);
|
||||||
//!< Clock could not be set. P1: Returncode.
|
//!< [EXPORT] : [COMMENT] Clock could not be set. P1: Returncode.
|
||||||
static constexpr Event CLOCK_SET_FAILURE = MAKE_EVENT(2, severity::LOW);
|
static constexpr Event CLOCK_SET_FAILURE = MAKE_EVENT(2, severity::LOW);
|
||||||
//!< Clock dump event. P1: timeval seconds P2: timeval microseconds.
|
//!< [EXPORT] : [COMMENT] Clock dump event. P1: timeval seconds P2: timeval microseconds.
|
||||||
static constexpr Event CLOCK_DUMP = MAKE_EVENT(3, severity::INFO);
|
static constexpr Event CLOCK_DUMP = MAKE_EVENT(3, severity::INFO);
|
||||||
|
static constexpr Event CLOCK_DUMP_BEFORE_SETTING_TIME = MAKE_EVENT(4, severity::INFO);
|
||||||
|
static constexpr Event CLOCK_DUMP_AFTER_SETTING_TIME = MAKE_EVENT(5, severity::INFO);
|
||||||
|
|
||||||
static constexpr uint8_t CLASS_ID = CLASS_ID::PUS_SERVICE_9;
|
static constexpr uint8_t CLASS_ID = CLASS_ID::PUS_SERVICE_9;
|
||||||
|
|
||||||
@@ -35,8 +37,8 @@ class Service9TimeManagement : public PusServiceBase {
|
|||||||
*/
|
*/
|
||||||
ReturnValue_t handleRequest(uint8_t subservice) override;
|
ReturnValue_t handleRequest(uint8_t subservice) override;
|
||||||
|
|
||||||
void reportCurrentTime();
|
void reportCurrentTime(Event eventType = CLOCK_DUMP);
|
||||||
void reportTime(timeval time);
|
void reportTime(Event event, timeval time);
|
||||||
|
|
||||||
virtual ReturnValue_t setTime();
|
virtual ReturnValue_t setTime();
|
||||||
|
|
||||||
|
@@ -1,7 +1,6 @@
|
|||||||
#include "SpacePacketReader.h"
|
#include "SpacePacketReader.h"
|
||||||
|
|
||||||
#include "fsfw/serialize/SerializeIF.h"
|
#include "fsfw/serialize/SerializeIF.h"
|
||||||
#include "fsfw/serviceinterface/ServiceInterface.h"
|
|
||||||
|
|
||||||
SpacePacketReader::SpacePacketReader(const uint8_t* setAddress, size_t maxSize_) {
|
SpacePacketReader::SpacePacketReader(const uint8_t* setAddress, size_t maxSize_) {
|
||||||
setInternalFields(setAddress, maxSize_);
|
setInternalFields(setAddress, maxSize_);
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
#ifndef FSFW_TMTCSERVICES_SOURCESEQUENCECOUNTER_H_
|
#ifndef FSFW_TMTCSERVICES_SOURCESEQUENCECOUNTER_H_
|
||||||
#define FSFW_TMTCSERVICES_SOURCESEQUENCECOUNTER_H_
|
#define FSFW_TMTCSERVICES_SOURCESEQUENCECOUNTER_H_
|
||||||
|
|
||||||
#include "fsfw/tmtcpacket/ccsds/SpacePacketReader.h"
|
#include "fsfw/tmtcpacket/ccsds/defs.h"
|
||||||
|
|
||||||
class SourceSequenceCounter {
|
class SourceSequenceCounter {
|
||||||
private:
|
private:
|
||||||
@@ -9,6 +9,7 @@ class SourceSequenceCounter {
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
SourceSequenceCounter(uint16_t initialSequenceCount = 0) : sequenceCount(initialSequenceCount) {}
|
SourceSequenceCounter(uint16_t initialSequenceCount = 0) : sequenceCount(initialSequenceCount) {}
|
||||||
|
|
||||||
void increment() { sequenceCount = (sequenceCount + 1) % (ccsds::LIMIT_SEQUENCE_COUNT); }
|
void increment() { sequenceCount = (sequenceCount + 1) % (ccsds::LIMIT_SEQUENCE_COUNT); }
|
||||||
void decrement() { sequenceCount = (sequenceCount - 1) % (ccsds::LIMIT_SEQUENCE_COUNT); }
|
void decrement() { sequenceCount = (sequenceCount - 1) % (ccsds::LIMIT_SEQUENCE_COUNT); }
|
||||||
uint16_t get() const { return this->sequenceCount; }
|
uint16_t get() const { return this->sequenceCount; }
|
||||||
@@ -25,6 +26,7 @@ class SourceSequenceCounter {
|
|||||||
sequenceCount = newCount;
|
sequenceCount = newCount;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
void set(uint16_t sequenceCount) { this->sequenceCount = sequenceCount; }
|
||||||
|
|
||||||
operator uint16_t() { return this->get(); }
|
operator uint16_t() { return this->get(); }
|
||||||
};
|
};
|
||||||
|
@@ -1,6 +1,8 @@
|
|||||||
#include <fsfw_hal/linux/serial/helper.h>
|
#include <fsfw_hal/linux/serial/helper.h>
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
|
#include <termios.h>
|
||||||
|
|
||||||
|
#include "FSFWConfig.h"
|
||||||
#include "fsfw/serviceinterface.h"
|
#include "fsfw/serviceinterface.h"
|
||||||
|
|
||||||
void serial::setMode(struct termios& options, UartModes mode) {
|
void serial::setMode(struct termios& options, UartModes mode) {
|
||||||
@@ -108,7 +110,7 @@ void serial::setBaudrate(struct termios& options, UartBaudRate baud) {
|
|||||||
#endif // ! __APPLE__
|
#endif // ! __APPLE__
|
||||||
default:
|
default:
|
||||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||||
sif::warning << "UartComIF::configureBaudrate: Baudrate not supported" << std::endl;
|
sif::warning << "serial::configureBaudrate: Baudrate not supported" << std::endl;
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -153,15 +155,17 @@ int serial::readCountersAndErrors(int serialPort, serial_icounter_struct& icount
|
|||||||
}
|
}
|
||||||
|
|
||||||
void serial::setStopbits(struct termios& options, StopBits bits) {
|
void serial::setStopbits(struct termios& options, StopBits bits) {
|
||||||
|
// Regular case: One stop bit.
|
||||||
|
options.c_cflag &= ~CSTOPB;
|
||||||
if (bits == StopBits::TWO_STOP_BITS) {
|
if (bits == StopBits::TWO_STOP_BITS) {
|
||||||
// Use two stop bits
|
// Use two stop bits
|
||||||
options.c_cflag |= CSTOPB;
|
options.c_cflag |= CSTOPB;
|
||||||
} else {
|
|
||||||
// Clear stop field, only one stop bit used in communication
|
|
||||||
options.c_cflag &= ~CSTOPB;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void serial::flushRxBuf(int fd) { tcflush(fd, TCIFLUSH); }
|
void serial::flushRxBuf(int fd) { tcflush(fd, TCIFLUSH); }
|
||||||
|
|
||||||
|
void serial::flushTxBuf(int fd) { tcflush(fd, TCOFLUSH); }
|
||||||
|
|
||||||
void serial::flushTxRxBuf(int fd) { tcflush(fd, TCIOFLUSH); }
|
void serial::flushTxRxBuf(int fd) { tcflush(fd, TCIOFLUSH); }
|
||||||
|
|
||||||
|
@@ -65,6 +65,7 @@ void setParity(struct termios& options, Parity parity);
|
|||||||
void ignoreCtrlLines(struct termios& options);
|
void ignoreCtrlLines(struct termios& options);
|
||||||
|
|
||||||
void flushRxBuf(int fd);
|
void flushRxBuf(int fd);
|
||||||
|
void flushTxBuf(int fd);
|
||||||
void flushTxRxBuf(int fd);
|
void flushTxRxBuf(int fd);
|
||||||
|
|
||||||
int readCountersAndErrors(int serialPort, serial_icounter_struct& icounter);
|
int readCountersAndErrors(int serialPort, serial_icounter_struct& icounter);
|
||||||
|
Reference in New Issue
Block a user