COVESA / capicxx-someip-tools

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

no matching function for call to 'CommonAPI::SomeIP::InputStream::readValue' #21

Open blueye opened 3 years ago

blueye commented 3 years ago

I use the newest CommonAPI and SOME/IP runtime and tools. When build my fidl and fdepl, build errors occur if using SOME/IP. The same fidl run ok if using Dbus.

build errors: /data/code/hello-someip/src-gen/v1/hello/HelloSenderSomeIPStubAdapter.cpp:53:1: required from here /data/code/capicxx-core-runtime/include/CommonAPI/InputStream.hpp:117:46: error: no matching function for call to 'CommonAPI::SomeIP::InputStream::readValue(std::vector<v1::hello::Messages::Position>&, const CommonAPI::EmptyDeployment*&)' return get()->readValue(_value, _depl);

fidl:

package hello

interface HelloSender {
  version {major 1 minor 0}
  method sendGlobalData {
    in {
      Messages.GlobalData msg
    }
    out {
      String message
    }
  }

  method sendMessage {
    in {
      Messages.MessageBase msg
    }
    out {
      String message
    }
  }
}

typeCollection Messages {
    version {
        major 1
        minor 0
    }

    enumeration Availability {
        NotAvailable
        Valid
    }
    enumeration MessageType {
        Position
        GlobalData
    }
    enumeration PropertyType {
        Node
        Probability
    }

    struct Position {
        UInt32 accuracy
        Int32 deviation
    }
    struct MessageBase polymorphic {
    }
    struct PositionMessage extends MessageBase {
        UInt64 timestamp
        Position [ ] positions
    }
    struct PropertyValue polymorphic {
    }

    struct GlobalData {
        PropertyType type
        Availability available
        PropertyValue pv
    }
    struct GlobalDataMessage extends MessageBase {
        GlobalData [ ] data
    }

    struct UInt32PropertyValue extends PropertyValue {
        UInt32 pv
    }
    struct Int32PropertyValue extends PropertyValue {
        Int32 pv
    }

    struct MessageOnBus {
        MessageType type
        MessageBase message
    }

}

fdepl:

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

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

    method sendGlobalData {
        SomeIpMethodID = 123
    }
    method sendMessage {
        SomeIpMethodID = 223
    }
}

define org.genivi.commonapi.someip.deployment for typeCollection hello.Messages {

    struct Position {
        accuracy {}
        deviation {}
    }
    struct MessageBase {
    }
    struct PositionMessage {
        timestamp {}
        positions {}
    }
    struct PropertyValue {
    }

    struct GlobalData {
        type {}
        available {}
        pv {}
    }
    struct GlobalDataMessage {
        data {}
    }

    struct UInt32PropertyValue {
        pv {}
    }
    struct Int32PropertyValue {
        pv {}
    }

    struct MessageOnBus {
        type {}
        message {}
    }

}

define org.genivi.commonapi.someip.deployment for provider as MyService {
    instance hello.HelloSender {
        InstanceId = "test"
        SomeIpInstanceID = 22136
    }
}
blueye commented 3 years ago

@ lutzbichler @dhuss Could u help me to solve this error?

dzvoid commented 3 years ago

@ lutzbichler @dhuss Could u help me to solve this error?

Hi, have you solved this error?

blueye commented 3 years ago

@ lutzbichler @dhuss Could u help me to solve this error?

Hi, have you solved this error?

No, I have no idea about it now.

lucka-me commented 3 years ago

Seems like the same one in #10. We've got a work around but (still) no solution yet.

blueye commented 3 years ago

Seems like the same one in #10. We've got a work around but (still) no solution yet.

Thanks! I will try it.

lucka-me commented 2 years ago

@blueye Hi, I've made some modification in GENIVI/capicxx-someip-runtime#22 to solve this issue, please have a try :relaxed: