Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to have "reliable/TCP" Attribute Changed Event Notifiers? #47

Open
Broeserl opened this issue Feb 17, 2024 · 1 comment

Comments

@Broeserl
Copy link

Hi,

I am tinkering around with the someip libs and the code generators, but now I found something I don't understand.
Btw. Great work 😄

When I try to make/set an attribute to reliable with SomeIpReliable = true within the fdepl file, the commonapi-someip-generator seems to not take this into account when generating the files.
If I modify manually the generated SomeIPStubAdapter.hpp and the SomeIPProxy.cpp and replace RT_UNRELIABLE with RT_RELIABLE, it works within my tests (checked with Wireshark).

For methods or broadcasts, this works without any changes required.

Now my questions are:

  • Should it work?
    I am asking because I checked the source code of the generator and did not find an test case for this (attribute & reliable)
  • If so, what did I configure wrong? (Please see the fidl & fdepl file below)

Thanks in advance!

Test.fidl

package test

interface Service {
version { major 1 minor 0 }

enumeration ReturnStatus {
        <** @description: the operation was successfully. **>
        OK = 0,
        <** @description: error occured while handling request. **>
        OPERATION_FAILURE = 1
    }

    method payloadToServiceUnreliable{
        in {
            String message
        }
        out {
            ReturnStatus returnStatus
        }
    }

    method payloadToServiceReliable{
        in {
            String message
        }
        out {
            ReturnStatus returnStatus
        }
    }

    method payloadFromServiceUnreliable{
        out {
            String message
            ReturnStatus returnStatus
        }
    }

    method payloadFromServiceReliable{
        out {
            String message
            ReturnStatus returnStatus
        }
    }

    broadcast broadcastUnreliable {
        out {
            String message
        }
    }

    broadcast broadcastReliable {
        out {
            String message
        }
    }

    attribute String notifierUnreliable readonly

    attribute String notifierReliable readonly
}

Test.fdepl

import "platform:/plugin/org.genivi.commonapi.someip/deployment/CommonAPI-4-SOMEIP_deployment_spec.fdepl"
import "../fidl/Test.fidl"

define org.genivi.commonapi.someip.deployment for interface test.Service{

    SomeIpServiceID=1234

    method payloadToServiceUnreliable {
        SomeIpMethodID = 1
    }

    method payloadToServiceReliable {
        SomeIpReliable = true
        SomeIpMethodID = 2
    }

    method payloadFromServiceUnreliable {
        SomeIpMethodID = 3
    }

    method payloadFromServiceReliable {
        SomeIpReliable = true
        SomeIpMethodID = 4
    }

    broadcast broadcastUnreliable {
        SomeIpEventID = 56787
        SomeIpEventGroups = { 1858 }
    }

    broadcast broadcastReliable {
        SomeIpEventID = 56788
        SomeIpReliable = true
        SomeIpEventGroups = { 1859 }
    }

    attribute notifierUnreliable {
        SomeIpNotifierID = 56789
        SomeIpGetterID = 5678
        SomeIpNotifierEventGroups = { 1860 }
    }

    attribute notifierReliable {
        SomeIpNotifierID = 56790
        SomeIpGetterID = 5679
        SomeIpNotifierEventGroups = { 1861 }
        SomeIpReliable = true
    }

}

define org.genivi.commonapi.someip.deployment for provider as Service {
    instance test.Service {
        InstanceId = "test.Service"
        SomeIpInstanceID = 4567
    }
}
@Broeserl
Copy link
Author

I found it myself, after some additional searching in the code.

Deployment.java

		// host 'attributes'
		public Boolean getSomeIpAttributeReliable(FAttribute obj) {
			return target.getBoolean(obj, "SomeIpAttributeReliable");
		}

So if one wants to have an attribute reliable the config parameter is SomeIpAttributeReliable = true instead of SomeIpReliable = true

imho, it is worth mentioning that this is quite hard to find. Maybe it would be an idea to document this somehow/somewhere.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant