cmvr_head/packages/erpc-1.14.0/erpcgen/test/test_name_py.yml

61 lines
964 B
YAML
Raw Normal View History

2025-12-30 15:44:41 +08:00
---
name: name annotation test
desc: This test @name annotation on different symbols
idl: |
@name("EnumName")
enum {
A @name(D),
B,
C
}
@name("StructName")
struct S{
int32 a @name("d");
int32 b;
int32 c
}
@name("type")
type T = S
@name(I)
interface K
{
@py:name(function)
oneway functionName(S a @name(m))
@c:name(function2)
oneway functionName2(S a @name(m))
}
lang: py
test/common.py:
- class EnumName
- D
- StructName
- d=None
- self.d = d
- self.d = codec.read_int32()
- if self.d is None
- codec.write_int32(self.d)
- self.d
test/client.py:
- def function(self, m)
- if m is None
- m._write(codec)
- def functionName2(self, m)
test/server.py:
- _handle_function
- m = common.StructName()._read(codec)
- self._handler.function(m)
- self._handler.functionName2(m)
test/interface.py:
- class II(
- def function(self, m)
- def functionName2(self, m)