Home
last modified time | relevance | path

Searched refs:RawMethod (Results 1 – 6 of 6) sorted by relevance

/external/pigweed/pw_rpc/raw/public/pw_rpc/internal/
Draw_method.h49 class RawMethod : public Method {
53 return std::is_same_v<MethodImplementation<method>, RawMethod>; in matches()
57 static constexpr RawMethod Unary(uint32_t id) { in Unary()
62 return RawMethod(id, UnaryInvoker, Function{.unary = wrapper}); in Unary()
66 static constexpr RawMethod ServerStreaming(uint32_t id) { in ServerStreaming()
72 return RawMethod( in ServerStreaming()
77 static constexpr RawMethod Invalid() { return {0, InvalidInvoker, {}}; } in Invalid()
93 constexpr RawMethod(uint32_t id, Invoker invoker, Function function) in RawMethod() function
99 static_cast<const RawMethod&>(method).CallUnary(call, request); in UnaryInvoker()
105 static_cast<const RawMethod&>(method).CallServerStreaming(call, request); in ServerStreamingInvoker()
[all …]
Draw_method_union.h26 constexpr RawMethodUnion(RawMethod&& method) in RawMethodUnion()
30 constexpr const RawMethod& raw_method() const { return impl_.raw; } in raw_method()
35 RawMethod raw;
42 constexpr RawMethod GetRawMethodFor(uint32_t id) { in GetRawMethodFor()
43 if constexpr (RawMethod::matches<method>()) { in GetRawMethodFor()
44 return GetMethodFor<method, RawMethod, type>(id); in GetRawMethodFor()
46 return InvalidMethod<method, type, RawMethod>(id); in GetRawMethodFor()
/external/pigweed/pw_rpc/raw/
Draw_method_test.cc67 static_assert(RawMethod::template matches<&TestRawService::Unary>());
68 static_assert(RawMethod::template matches<&TestRawService::ServerStreaming>());
69 static_assert(RawMethod::template matches<&TestRawService::StaticUnary>());
71 RawMethod::template matches<&TestRawService::StaticServerStreaming>());
74 static_assert(!RawMethod::template matches<&TestRawService::UnaryWrongArg>());
76 !RawMethod::template matches<&TestRawService::StaticUnaryVoidReturn>());
78 !RawMethod::template matches<&TestRawService::ServerStreamingBadReturn>());
79 static_assert(!RawMethod::template matches<
82 TEST(MethodImplTester, RawMethod) { in TEST() argument
83 constexpr MethodImplTester<RawMethod, TestRawService> method_tester; in TEST()
[all …]
Draw_method.cc52 void RawMethod::CallUnary(ServerCall& call, const Packet& request) const { in CallUnary()
70 void RawMethod::CallServerStreaming(ServerCall& call, in CallServerStreaming()
/external/pigweed/pw_rpc/nanopb/public/pw_rpc/internal/
Dnanopb_method_union.h26 constexpr NanopbMethodUnion(RawMethod&& method) in NanopbMethodUnion()
32 constexpr const RawMethod& raw_method() const { return impl_.raw; } in raw_method()
38 RawMethod raw;
50 if constexpr (RawMethod::matches<method>()) { in GetNanopbOrRawMethodFor()
51 return GetMethodFor<method, RawMethod, type>(id); in GetNanopbOrRawMethodFor()
56 return InvalidMethod<method, type, RawMethod>(id); in GetNanopbOrRawMethodFor()
/external/pigweed/pw_rpc/
Dclient_server_test.cc43 RawMethod::Unary<FakeMethod>(kFakeMethodId),