DHB additional step for performOperation #281

Merged
gaisser merged 12 commits from KSat/fsfw:mueller/DHB-update into development 2020-12-08 15:53:06 +01:00
Owner

Some form improvements and an important change for DeviceHandlerBase: New PERFORM_OPERATION step as an explicit step, which is not related to the communication functionalities,
with the exception of ActionMessages setting the next sent packet for SEND_DATA.

This is an API change, however the adaptions are small (depending on size of polling sequence table).
If this is integrated into the FSFW, all users of the device handlers
have to correct their polling sequence tables to include the step PERFORM_OPERATION .

Example:

Before:

ReturnValue_t pst::pollingSequenceInitDefault(FixedTimeslotTaskIF *thisSequence)
{
	/* Length of a communication cycle */
	uint32_t length = thisSequence->getPeriodMs();

    thisSequence->addSlot(objects::DUMMY_HANDLER,
            length * 0,  DeviceHandlerIF::SEND_WRITE);
    thisSequence->addSlot(objects::DUMMY_HANDLER,
            length * 0.25, DeviceHandlerIF::GET_WRITE);
    thisSequence->addSlot(objects::DUMMY_HANDLER,
            length * 0.5,  DeviceHandlerIF::SEND_READ);
    thisSequence->addSlot(objects::DUMMY_HANDLER,
            length * 0.75, DeviceHandlerIF::GET_READ);

After:

ReturnValue_t pst::pollingSequenceInitDefault(FixedTimeslotTaskIF *thisSequence)
{
	/* Length of a communication cycle */
	uint32_t length = thisSequence->getPeriodMs();

    thisSequence->addSlot(objects::DUMMY_HANDLER,
            length * 0,  DeviceHandlerIF::PERFORM_OPERATION);
    thisSequence->addSlot(objects::DUMMY_HANDLER,
            length * 0.4,  DeviceHandlerIF::SEND_WRITE);
    thisSequence->addSlot(objects::DUMMY_HANDLER,
            length * 0.55, DeviceHandlerIF::GET_WRITE);
    thisSequence->addSlot(objects::DUMMY_HANDLER,
            length * 0.7,  DeviceHandlerIF::SEND_READ);
    thisSequence->addSlot(objects::DUMMY_HANDLER,
            length * 0.85, DeviceHandlerIF::GET_READ);
Some form improvements and an important change for `DeviceHandlerBase`: New `PERFORM_OPERATION` step as an explicit step, which is not related to the communication functionalities, with the exception of ActionMessages setting the next sent packet for SEND_DATA. This is an API change, however the adaptions are small (depending on size of polling sequence table). If this is integrated into the FSFW, all users of the device handlers have to correct their polling sequence tables to include the step `PERFORM_OPERATION` . Example: Before: ```cpp ReturnValue_t pst::pollingSequenceInitDefault(FixedTimeslotTaskIF *thisSequence) { /* Length of a communication cycle */ uint32_t length = thisSequence->getPeriodMs(); thisSequence->addSlot(objects::DUMMY_HANDLER, length * 0, DeviceHandlerIF::SEND_WRITE); thisSequence->addSlot(objects::DUMMY_HANDLER, length * 0.25, DeviceHandlerIF::GET_WRITE); thisSequence->addSlot(objects::DUMMY_HANDLER, length * 0.5, DeviceHandlerIF::SEND_READ); thisSequence->addSlot(objects::DUMMY_HANDLER, length * 0.75, DeviceHandlerIF::GET_READ); ``` After: ```cpp ReturnValue_t pst::pollingSequenceInitDefault(FixedTimeslotTaskIF *thisSequence) { /* Length of a communication cycle */ uint32_t length = thisSequence->getPeriodMs(); thisSequence->addSlot(objects::DUMMY_HANDLER, length * 0, DeviceHandlerIF::PERFORM_OPERATION); thisSequence->addSlot(objects::DUMMY_HANDLER, length * 0.4, DeviceHandlerIF::SEND_WRITE); thisSequence->addSlot(objects::DUMMY_HANDLER, length * 0.55, DeviceHandlerIF::GET_WRITE); thisSequence->addSlot(objects::DUMMY_HANDLER, length * 0.7, DeviceHandlerIF::SEND_READ); thisSequence->addSlot(objects::DUMMY_HANDLER, length * 0.85, DeviceHandlerIF::GET_READ); ```
muellerr added the
feature
API Change
labels 2020-12-01 14:53:27 +01:00
gaisser added this to the ASTP 1.0.0 Local pools milestone 2020-12-01 15:42:10 +01:00
Owner

This implements #129

This implements #129
gaisser added 1 commit 2020-12-08 14:51:40 +01:00
muellerr added 1 commit 2020-12-08 15:35:07 +01:00
muellerr added 1 commit 2020-12-08 15:36:25 +01:00
gaisser merged commit faedd40665 into development 2020-12-08 15:53:06 +01:00
gaisser deleted branch mueller/DHB-update 2020-12-08 15:53:10 +01:00
Sign in to join this conversation.
No description provided.