better printout for parameter code
This commit is contained in:
parent
2d9216ba19
commit
0ccaf27fcb
@ -79,8 +79,8 @@ class GpiodRegularBase : public GpioBase {
|
||||
class GpiodRegularByChip : public GpiodRegularBase {
|
||||
public:
|
||||
GpiodRegularByChip()
|
||||
: GpiodRegularBase(gpio::GpioTypes::GPIO_REGULAR_BY_CHIP, std::string(),
|
||||
gpio::Direction::IN, gpio::Levels::LOW, 0) {}
|
||||
: GpiodRegularBase(gpio::GpioTypes::GPIO_REGULAR_BY_CHIP, std::string(), gpio::Direction::IN,
|
||||
gpio::Levels::LOW, 0) {}
|
||||
|
||||
GpiodRegularByChip(std::string chipname_, int lineNum_, std::string consumer_,
|
||||
gpio::Direction direction_, gpio::Levels initValue_)
|
||||
@ -126,8 +126,8 @@ class GpiodRegularByLineName : public GpiodRegularBase {
|
||||
lineName(lineName_) {}
|
||||
|
||||
GpiodRegularByLineName(std::string lineName_, std::string consumer_)
|
||||
: GpiodRegularBase(gpio::GpioTypes::GPIO_REGULAR_BY_LINE_NAME, consumer_,
|
||||
gpio::Direction::IN, gpio::Levels::LOW),
|
||||
: GpiodRegularBase(gpio::GpioTypes::GPIO_REGULAR_BY_LINE_NAME, consumer_, gpio::Direction::IN,
|
||||
gpio::Levels::LOW),
|
||||
lineName(lineName_) {}
|
||||
|
||||
std::string lineName;
|
||||
|
@ -409,5 +409,4 @@ void SpiComIF::setSpiSpeedAndMode(int spiFd, spi::SpiModes mode, uint32_t speed)
|
||||
if (retval != 0) {
|
||||
utility::handleIoctlError("SpiComIF::setSpiSpeedAndMode: Updating SPI default clock failed");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -66,7 +66,7 @@ class HasParametersIF {
|
||||
* @param newValues
|
||||
* @param startAtIndex Linear index, runs left to right, top to bottom for
|
||||
* matrix indexes.
|
||||
* @return
|
||||
* @return RETURN_OK if parameter is valid and a set function of the parameter wrapper was called.
|
||||
*/
|
||||
virtual ReturnValue_t getParameter(uint8_t domainId, uint8_t uniqueIdentifier,
|
||||
ParameterWrapper *parameterWrapper,
|
||||
|
@ -211,9 +211,13 @@ ReturnValue_t ParameterWrapper::copyFrom(const ParameterWrapper *from,
|
||||
if (data == nullptr) {
|
||||
#if FSFW_VERBOSE_LEVEL >= 1
|
||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||
sif::warning << "ParameterWrapper::copyFrom: Called on read-only variable!" << std::endl;
|
||||
sif::warning << "ParameterWrapper::copyFrom: Called on read-only variable or "
|
||||
"data pointer not set"
|
||||
<< std::endl;
|
||||
#else
|
||||
sif::printWarning("ParameterWrapper::copyFrom: Called on read-only variable!\n");
|
||||
sif::printWarning(
|
||||
"ParameterWrapper::copyFrom: Called on read-only variable "
|
||||
"or data pointer not set\n");
|
||||
#endif
|
||||
#endif /* FSFW_VERBOSE_LEVEL >= 1 */
|
||||
return READONLY;
|
||||
@ -222,9 +226,9 @@ ReturnValue_t ParameterWrapper::copyFrom(const ParameterWrapper *from,
|
||||
if (from->readonlyData == nullptr) {
|
||||
#if FSFW_VERBOSE_LEVEL >= 1
|
||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||
sif::warning << "ParameterWrapper::copyFrom: Source not set!" << std::endl;
|
||||
sif::warning << "ParameterWrapper::copyFrom: Source not set" << std::endl;
|
||||
#else
|
||||
sif::printWarning("ParameterWrapper::copyFrom: Source not set!\n");
|
||||
sif::printWarning("ParameterWrapper::copyFrom: Source not set\n");
|
||||
#endif
|
||||
#endif /* FSFW_VERBOSE_LEVEL >= 1 */
|
||||
return SOURCE_NOT_SET;
|
||||
@ -233,9 +237,9 @@ ReturnValue_t ParameterWrapper::copyFrom(const ParameterWrapper *from,
|
||||
if (type != from->type) {
|
||||
#if FSFW_VERBOSE_LEVEL >= 1
|
||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||
sif::warning << "ParameterWrapper::copyFrom: Datatype missmatch!" << std::endl;
|
||||
sif::warning << "ParameterWrapper::copyFrom: Datatype missmatch" << std::endl;
|
||||
#else
|
||||
sif::printWarning("ParameterWrapper::copyFrom: Datatype missmatch!\n");
|
||||
sif::printWarning("ParameterWrapper::copyFrom: Datatype missmatch\n");
|
||||
#endif
|
||||
#endif /* FSFW_VERBOSE_LEVEL >= 1 */
|
||||
return DATATYPE_MISSMATCH;
|
||||
@ -245,9 +249,9 @@ ReturnValue_t ParameterWrapper::copyFrom(const ParameterWrapper *from,
|
||||
if (rows == 0 or columns == 0) {
|
||||
#if FSFW_VERBOSE_LEVEL >= 1
|
||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||
sif::warning << "ParameterWrapper::copyFrom: Columns or rows zero!" << std::endl;
|
||||
sif::warning << "ParameterWrapper::copyFrom: Columns or rows zero" << std::endl;
|
||||
#else
|
||||
sif::printWarning("ParameterWrapper::copyFrom: Columns or rows zero!\n");
|
||||
sif::printWarning("ParameterWrapper::copyFrom: Columns or rows zero\n");
|
||||
#endif
|
||||
#endif /* FSFW_VERBOSE_LEVEL >= 1 */
|
||||
return COLUMN_OR_ROWS_ZERO;
|
||||
|
@ -169,8 +169,8 @@ class RMAP : public HasReturnvaluesIF {
|
||||
* @param buffer the data to write
|
||||
* @param length length of data
|
||||
* @return
|
||||
* - @c COMMAND_NULLPOINTER datalen was != 0 but data was == NULL
|
||||
* in write command
|
||||
* - @c COMMAND_NULLPOINTER datalen was != 0 but data was ==
|
||||
* NULL in write command
|
||||
* - return codes of RMAPChannelIF::sendCommand()
|
||||
*/
|
||||
static ReturnValue_t sendWriteCommand(RMAPCookie *cookie, const uint8_t *buffer, size_t length);
|
||||
@ -205,8 +205,8 @@ class RMAP : public HasReturnvaluesIF {
|
||||
* @param cookie to cookie to read from
|
||||
* @param expLength the expected maximum length of the reply
|
||||
* @return
|
||||
* - @c COMMAND_NULLPOINTER datalen was != 0 but data was == NULL
|
||||
* in write command, or nullpointer in read command
|
||||
* - @c COMMAND_NULLPOINTER datalen was != 0 but data was ==
|
||||
* NULL in write command, or nullpointer in read command
|
||||
* - return codes of RMAPChannelIF::sendCommand()
|
||||
*/
|
||||
static ReturnValue_t sendReadCommand(RMAPCookie *cookie, uint32_t expLength);
|
||||
|
@ -75,10 +75,10 @@ class RMAPChannelIF {
|
||||
* - @c RETURN_OK
|
||||
* - @c COMMAND_NO_DESCRIPTORS_AVAILABLE no descriptors available for sending
|
||||
* command; command was not sent
|
||||
* - @c COMMAND_BUFFER_FULL no receiver buffer available for expected
|
||||
* len; command was not sent
|
||||
* - @c COMMAND_TOO_BIG the data that was to be sent was too long for the
|
||||
* hw to handle (write command) or the expected len was bigger than maximal expected len (read
|
||||
* - @c COMMAND_BUFFER_FULL no receiver buffer available for
|
||||
* expected len; command was not sent
|
||||
* - @c COMMAND_TOO_BIG the data that was to be sent was too long for
|
||||
* the hw to handle (write command) or the expected len was bigger than maximal expected len (read
|
||||
* command) command was not sent
|
||||
* - @c COMMAND_CHANNEL_DEACTIVATED the channel has no port set
|
||||
* - @c NOT_SUPPORTED if you dont feel like
|
||||
@ -97,8 +97,8 @@ class RMAPChannelIF {
|
||||
* - @c REPLY_NO_REPLY no reply was received
|
||||
* - @c REPLY_NOT_SENT command was not sent, implies no reply
|
||||
* - @c REPLY_NOT_YET_SENT command is still waiting to be sent
|
||||
* - @c WRITE_REPLY_INTERFACE_BUSY Interface is busy (transmission buffer
|
||||
* still being processed)
|
||||
* - @c WRITE_REPLY_INTERFACE_BUSY Interface is busy (transmission
|
||||
* buffer still being processed)
|
||||
* - @c WRITE_REPLY_TRANSMISSION_ERROR Interface encountered errors during last
|
||||
* operation, data could not be processed. (transmission error)
|
||||
* - @c WRITE_REPLY_INVALID_DATA Invalid data (amount / value)
|
||||
|
Loading…
Reference in New Issue
Block a user