vsomeip icon indicating copy to clipboard operation
vsomeip copied to clipboard

SOMEIP TestStub Enhanced Testability Service (ETS)

Open xuguoxuan opened this issue 6 years ago • 10 comments

Could you please give some idea of SOMEIP ETS? It satisfies the "OPEN Alliance Automotive Ethernet ECU Test Specification" . Thank you very much!

xuguoxuan avatar Aug 28 '19 03:08 xuguoxuan

can anyone please share some experience for this issue?

xuguoxuan avatar Apr 02 '20 13:04 xuguoxuan

I already have passed ETS 3.0/2.0 with vsomeip3. [email protected]

deansay avatar Jul 10 '20 11:07 deansay

I already have passed ETS 3.0/2.0 with vsomeip3. QQ276564084

Could you tell us if you had written your own ETS? Was it based directly on vsomeip library or maybe some other like CommonAPI?

splywaczyk avatar Jan 19 '21 20:01 splywaczyk

it's based directly on vsomeip library.

deansay avatar Jan 20 '21 11:01 deansay

@deansay - did you implement ETS by yourself? I'm trying to do it but wondering for example how parse a payload for triggerEventUINT8. There are three arguments which are passed to this method but there is no type so actually it is not known if for example start has 1,2 or 4 bytes.

splywaczyk avatar Jan 25 '21 14:01 splywaczyk

  1. The three arguments data type defined as uint32 which are delay, duration, debounce time.
  2. Then you need to follow Figure 8: triggerEventUINT8Reliable(), that is the same thing.

for example.

void service_ETS::thread_EventUINT8(uint32_t start, uint32_t duration, uint32_t debounce)
{
    log(zDebug, "start");
    std::this_thread::sleep_for(std::chrono::seconds(start));
    log(zDebug, "sleep for start:%d",start);
    uint32_t current = 0;
    while(current < duration){
        std::this_thread::sleep_for(std::chrono::seconds(debounce));
        log(zDebug, "sleep for debounce:%d",debounce);
        current += debounce;
        std::shared_ptr<vsomeip::payload> its_payload
            = vsomeip::runtime::get()->create_payload();
        std::vector<vsomeip::byte_t> its_payload_data;
        set_uint8(its_payload_data, current);
        its_payload->set_data(its_payload_data);
        app->notify(ETS_SERVICE_ID0, ETS_INSTANCE_ID1, TestEventUINT8, its_payload);
        log(zDebug, "notify current:%d", current);
    }
    log(zDebug, "end");
}

void service_ETS::on_triggerEventUINT8(const std::shared_ptr<message> &_response)
{
    log(zDebug, "start");

    uint32_t start    = get_uint32(_response->get_payload()->get_data());
    uint32_t duration = get_uint32(&_response->get_payload()->get_data()[4]);
    uint32_t debounce = get_uint32(&_response->get_payload()->get_data()[8]);

    log(zDebug, "start: %d duration: %d debounce: %d", start, duration, debounce);

    if(_response->get_message_type() != message_type_e::MT_REQUEST_NO_RETURN){
        log(zDebug, "this message is not a F&F request.");
        return;
    }
    log(zDebug, "create thread for EventUINT8");
    std::thread start_thread(std::bind(&service_ETS::thread_EventUINT8, this, start, duration, debounce));
    start_thread.detach();

    log(zDebug, "end");
}

deansay avatar Jan 29 '21 07:01 deansay

@deansay - this is what I expected. Thanks for the clarification :)

splywaczyk avatar Jan 29 '21 08:01 splywaczyk

@deansay @splywaczyk

Hello, What functions need to be implemented in ETS?

How to implement the interface 'suspendInterface' in ETS service?

Do you have any suggestions or sample code?

I hope you can help me. Thank you very much.

yunfeiyangcc avatar Apr 20 '21 13:04 yunfeiyangcc

Hello, What functions need to be implemented in ETS?

All defined in OPEN Alliance Automotive Ethernet ECU Test Specification - TC8 ECU Test specification

How to implement the interface 'suspendInterface' in ETS service?

Specification says that: This method allows to suspend the Enhanced Testability Service; thus, forcing the DUT to stop offering the service and start to reoffer the service after a given time. It takes two parameters:

  • start - wait time before the service should be stopped
  • duration - wait time before the service should be offered again

so in pseudocode it could look like this:

void suspendInterface(uint start, uint duration)
{
    sleep(start);
    stopOfferService();
    sleep(duration);
    startOfferService();
}

splywaczyk avatar Apr 20 '21 20:04 splywaczyk

@deansay @splywaczyk

Hello, my test for [SOMEIPSRV_SD_MESSAGE_07] case in TC8 is always failed。

Do you have any suggestions or vsomeip.json for pass this case?

I hope you can help me. Thank you very much.

image

LccGitHub avatar Feb 21 '22 07:02 LccGitHub

could you give some examples for ets cases,i want to learn this project

SwanYing avatar Aug 29 '23 07:08 SwanYing

Hi, Kindly request you to share the SOMEIP TestStub Enhanced Testability Service (ETS) cases for learning!...

Thanks

bfzravi avatar Feb 15 '24 14:02 bfzravi