Merge remote-tracking branch 'origin/eive/develop' into mueller/master

This commit is contained in:
Robin Müller 2021-08-09 11:12:37 +02:00
commit 22e29144b6
3 changed files with 23 additions and 0 deletions

View File

@ -32,6 +32,17 @@ ReturnValue_t ActionHelper::initialize(MessageQueueIF* queueToUse_) {
setQueueToUse(queueToUse_);
}
if(queueToUse == nullptr) {
#if FSFW_VERBOSE_LEVEL >= 1
#if FSFW_CPP_OSTREAM_ENABLED == 1
sif::warning << "ActionHelper::initialize: No queue set" << std::endl;
#else
sif::printWarning("ActionHelper::initialize: No queue set\n");
#endif
#endif /* FSFW_VERBOSE_LEVEL >= 1 */
return HasReturnvaluesIF::RETURN_FAILED;
}
return HasReturnvaluesIF::RETURN_OK;
}

View File

@ -54,6 +54,11 @@ void SpacePacketBase::setAPID( uint16_t new_apid ) {
this->data->header.packet_id_l = ( new_apid & 0x00FF );
}
void SpacePacketBase::setSequenceFlags( uint8_t sequenceflags ) {
this->data->header.sequence_control_h &= 0x3F;
this->data->header.sequence_control_h |= sequenceflags << 6;
}
uint16_t SpacePacketBase::getPacketSequenceControl( void ) {
return ( (this->data->header.sequence_control_h) << 8 )
+ this->data->header.sequence_control_l;

View File

@ -109,6 +109,13 @@ public:
* ignored.
*/
void setAPID( uint16_t setAPID );
/**
* Sets the sequence flags of a packet, which are bit 17 and 18 in the space packet header.
* @param The sequence flags to set
*/
void setSequenceFlags( uint8_t sequenceflags );
/**
* Returns the CCSDS packet sequence control field, which are the third and
* the fourth byte of the CCSDS primary header.