COVESA / capicxx-someip-tools

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

Warning: SomeIP validation: Attribute "var" has no valid 'SomeIpNotifierEventGroups' specified. #34

Closed mungyujeong closed 1 year ago

mungyujeong commented 1 year ago

When running the code generator, a warning message appears as follows.

The code generates without a problem, but the SomeIPProxy.cpp code gives an error because of the UNDEFINED_EVENTGROUP_ID variable.

How can I solve this?

Default output directory: src-gen-seame/
Using Franca Version 0.13.1.201807231814
Warning: SomeIP validation: Attribute "hum" has no valid 'SomeIpNotifierEventGroups' specified. 
Warning: SomeIP validation: Attribute "tmp" has no valid 'SomeIpNotifierEventGroups' specified. 
Warning: SomeIP validation: Attribute "rpm" has no valid 'SomeIpNotifierEventGroups' specified. 
Warning: SomeIP validation: Attribute "spd" has no valid 'SomeIpNotifierEventGroups' specified. 
Warning: SomeIP validation: Attribute "bat" has no valid 'SomeIpNotifierEventGroups' specified. 
Warning: SomeIP validation: Attribute "ultrasonic" has no valid 'SomeIpNotifierEventGroups' specified. 
SomeIP validation: Validation of deployment finished with: 0 errors, 6 warnings.
Generating code for

interface SEAME { version {major 1 minor 0}

attribute UInt8 hum attribute Int8 tmp attribute UInt16 rpm attribute UInt8 spd attribute UInt8 bat attribute UInt8 ultrasonic }

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

define org.genivi.commonapi.someip.deployment for interface commonapi.SEAME {
  SomeIpServiceID = 4660

  attribute hum {

    // Every attribute must have at least one of [SomeIpGetterID, SomeIpSetterID, SomeIpNotifierID] specified.

    SomeIpGetterID = 3000

    // If an attribute is declared as 'readonly', it must *not* have a 'SomeIpSetterID' specification.

    SomeIpSetterID = 3001

    // If an attribute is declared as 'noSubscriptions', it must *not* have a 'SomeIpNotifierID' specification.

    SomeIpNotifierID = 33000

    // If an attribute has a 'SomeIpNotifierID' specification, the attribute must also have a valid event group
    // specified within the 'SomeIpNotifierEventGroups' setting.
    SomeIpNotifierEventGroups = { 33000 }

    SomeIpAttributeReliable = true
  }
  attribute tmp {
    SomeIpGetterID = 3002
    SomeIpSetterID = 3003
    SomeIpNotifierID = 33001
    SomeIpNotifierEventGroups = { 33001 }

    SomeIpAttributeReliable = true
  }
  attribute rpm {
    SomeIpGetterID = 3004
    SomeIpSetterID = 3005
    SomeIpNotifierID = 33002
    SomeIpNotifierEventGroups = { 33002 }

    SomeIpAttributeReliable = true
  }
  attribute spd {
    SomeIpGetterID = 3006
    SomeIpSetterID = 3007
    SomeIpNotifierID = 33003
    SomeIpNotifierEventGroups = { 33003 }

    SomeIpAttributeReliable = true
  }
  attribute bat {
    SomeIpGetterID = 3008
    SomeIpSetterID = 3009
    SomeIpNotifierID = 33004
    SomeIpNotifierEventGroups = { 33004 }

    SomeIpAttributeReliable = true
  }
  attribute ultrasonic {
    SomeIpGetterID = 3010
    SomeIpSetterID = 3011
    SomeIpNotifierID = 33005
    SomeIpNotifierEventGroups = { 33005 }

    SomeIpAttributeReliable = true
  }
}

define org.genivi.commonapi.someip.deployment for provider as MoonService {
  instance commonapi.SEAME {
    InstanceId = "seame"

    SomeIpInstanceID = 22144
    SomeIpUnicastAddress = "127.0.0.1"
    SomeIpReliableUnicastPort = 31000
  }
}
mungyujeong commented 1 year ago

Change the line in fdepl file. import "platform:/plugin/org.genivi.commonapi.someip/deployment/CommonAPI-SOMEIP_deployment_spec.fdepl"

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