Device Handler Base additional step #277

Closed
muellerr wants to merge 14 commits from KSat:mueller/DHB-DHM into development
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
label 2020-12-01 14:15:01 +01:00
muellerr added the
API Change
label 2020-12-01 14:45:26 +01:00
gaisser added this to the ASTP 1.0.0 Local pools milestone 2020-12-01 14:45:49 +01:00
muellerr closed this pull request 2020-12-01 14:52:21 +01:00
gaisser removed this from the ASTP 1.0.0 Local pools milestone 2020-12-01 14:52:46 +01:00

Pull request closed

Sign in to join this conversation.
No description provided.