Closed GetmanetsIrina closed 6 years ago
@kshala-ford, please advise on the question above.
@robinmk, please advise on SDL-HMI expected behavior for the following cases:
Case 1 | Case 2 |
---|---|
Pre-conditions | Pre-conditions |
not PNG image was added via PutFile | PNG image was added via PutFile |
Steps | Steps |
mob app sends a RPC with uploaded image and isTemplate = true in Image structure |
mob app sends a RPC with uploaded image and isTemplate = true and STATIC image type in Image structure |
Expected | Expected |
SDL -> HMI ? SDL -> app: RPC (resultCode) |
SDL -> HMI ? SDL -> app: RPC (resultCode) |
thanks @KhrystynaDubovyk for bringing this up. According to this comment we now need to identify error cases.
Regarding Case 1
I would say HMI should ignore isTemplate = true
. SDL should simply forward the request to HMI. It's can be seen by the HMI as a PNG file that does not contain any transparent area. The RPC response should be success = true
and resultCode = WARNING
. The response info message can be that isTemplate
was ignored because the provided image does not include alpha/transparent channel.
Reason: Following the goal of SDL proposal 0042 RPCs like Show or CreateInteractionChoiceSet must not fail if it can be avoided.
Regarding Case 2
Similar to Case 1 SDL should simply forward the request to HMI. HMI should ignore the parameter because it only affects dynamic images.
Reason: Static images are already covered by the HMI. I think it should not even send a warning. If the image type is STATIC the HMI should not even check for isTemplate
.
Case 1 Expected | Case 2 Expected |
---|---|
SDL -> HMI including isTemplate if set by app |
SDL -> HMI including isTemplate if set by app |
SDL -> app: RPC success (WARNING). | SDL -> app: RPC success (SUCCESS) |
@robinmk Are you OK with that?
@kshala-ford , Agree for Case 1
@KhrystynaDubovyk ,
What happens today if the referenced image is actually of type 'DYNAMIC' but the request which is sent out from the app specifies it as 'STATIC'? I believe the request would be rejected as 'INVALID_DATA'
If the RPC request references a value which of type 'STATIC' and has the 'isTemplate' flag set to 'True', then I agree with what Kujtim said - Forward the request to HMI and HMI should ignore the 'isTemplate' flag.
@robinmk, @kshala-ford
- What happens today if the referenced image is actually of type 'DYNAMIC' but the request which is sent out from the app specifies it as 'STATIC'?
currently SDL transfers the request to the HMI and gets UNSUPPORTED_RESOURCE response from HMI.
@robinmk, is this behaviour acceptable?
hmm...So HMI checks for the list of static images and finds that it does not support that particular image. Since the app is informed about the failure, the design is acceptable to me. @kshala-ford , what do you think?
@robinmk I'm OK with that
Many thanks.
Question is related to proposal https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0062-template-images.md.
What if
isTemplate = true
parameter will be used with not PNG file? What ifisTemplate = true
parameter will be used with STATIC image type? What is expected SDL and HMI behavior?