COVESA / capicxx-someip-tools

Common API C++ SOMEIP tooling
Mozilla Public License 2.0
76 stars 55 forks source link

Problem describing ISO 17215 (VCIC) sPersistentStorageEntry in Franca IDL deployment file #50

Closed srl100 closed 4 months ago

srl100 commented 5 months ago

I am trying to describe the sPersistentStorageEntry data structure from ISO 17215 in Franca IDL:

Name Type Comment
Flag UInt32 -
Length UInt16 Length of persistent data in bytes
PersistentStorageID UInt16 -
PersistentData UInt8[Length] -
CRC16 UInt16 -

The problem I am having is in specifying the length of PersistentData so that the on-the-wire representation of the data is in the correct order.

According to https://github.com/COVESA/capicxx-someip-tools/blob/master/org.genivi.commonapi.someip/deployment/CommonAPI-SOMEIP_deployment_spec.fdepl I can define PersistentData as an array with a SomeIpArrayLengthWidth=2 to specify a length field of 2 bytes, but how do I specify where in the on-the-wire packet the length field comes? - I would assume that this would be placed immediately before the PersistentData, but in the VCIC specification there is an intervening UInt16 PersistentStorageID, so is there anything in the deployment language that will let me meet this requirement?

srl100 commented 4 months ago

It looks like this is a problem with ISO 17215 rather than with FrancaIDL... according to the AUTOSAR specifications SOME/IP puts the length field of a dynamic length array immediately before the array contents.