partition.tmplt 2.65 KB
Newer Older
1
2
3
4
5
@@-- The up to date list of tags available for this template is available here:
@@-- https://taste.tuxfamily.org/wiki/index.php?title=Kazoo_Templates_Documentation#templates.2Fconcurrency_view.2Fsub.2Fpartition.tmplt
@@-- If you are using vim, go over the URL and pres gx in to follow the link
@@-- If you have no internet access you can also use (with vim) Ctrl-W-f or gf in vim to open the text doc:
@@-- $HOME/tool-inst/share/kazoo/doc/templates_concurrency_view_sub_partition.ascii
6
7
8
#ifndef REQUEST_SIZE_H
#define REQUEST_SIZE_H

9
#include <stdint.h>
10
11
12

#include "dataview-uniq.h"

13
// struct used to calculate buffer size for drivers
14
15
16
17
struct GenericLinuxAllParametersStub
{
    union
    {
18
        // input ports
19
20
21
@@TABLE@@
@@IF@@ @_In_Port_Encoding_Name_@ = NATIVE
        uint8_t @_In_Port_Thread_Name_@[sizeof (asn1Scc@_REPLACE_ALL(-/_):In_Port_Type_Name_@)];
22
@@ELSIF@@ @_In_Port_Encoding_Name_@ = UPER
23
24
25
26
27
28
29
        uint8_t @_In_Port_Thread_Name_@[asn1Scc@_REPLACE_ALL(-/_):In_Port_Type_Name_@_REQUIRED_BYTES_FOR_ENCODING];
@@ELSIF@@ @_In_Port_Encoding_Name_@ = ACN
        uint8_t @_In_Port_Thread_Name_@[asn1Scc@_REPLACE_ALL(-/_):In_Port_Type_Name_@_REQUIRED_BYTES_FOR_ACN_ENCODING];
@@ELSE@@
        uint8_t @_In_Port_Thread_Name_@[1];
@@END_IF@@
@@END_TABLE@@
30

31
32
33
34
        // output ports
@@TABLE@@
@@IF@@ @_Out_Port_Encoding_Name_@ = NATIVE
        uint8_t @_Out_Port_Names_@[sizeof (asn1Scc@_REPLACE_ALL(-/_):Out_Port_Type_Name_@)];
35
@@ELSIF@@ @_Out_Port_Encoding_Name_@ = UPER
36
37
38
39
40
41
42
43
44
        uint8_t @_Out_Port_Names_@[asn1Scc@_REPLACE_ALL(-/_):Out_Port_Type_Name_@_REQUIRED_BYTES_FOR_ENCODING];
@@ELSIF@@ @_Out_Port_Encoding_Name_@ = ACN
        uint8_t @_Out_Port_Names_@[asn1Scc@_REPLACE_ALL(-/_):Out_Port_Type_Name_@_REQUIRED_BYTES_FOR_ACN_ENCODING];
@@ELSE@@
        uint8_t @_Out_Port_Names_@[1];
@@END_IF@@
@@END_TABLE@@

        uint8_t dummy_union_field[1];
45
46
47
    } all_types;
};

48
49
// GENERIC_PARTITION_BUFFER_SIZE should be even number
#define GENERIC_PARTITION_BUFFER_SIZE (((sizeof(struct GenericLinuxAllParametersStub) + 1) / 2) * 2)
50

51
52
53
54
55
56
57
58
59
60
61
@_Threads_@
@@TABLE@@
@@IF@@ @_Out_Port_Encoding_Name_@ = NATIVE
#define @_UPPER:Out_Port_Remote_Function_@_@_UPPER:Out_Port_Remote_Port_Name_@_REQUEST_SIZE (sizeof (asn1Scc@_REPLACE_ALL(-/_):Out_Port_Type_Name_@))
@@ELSIF@@ @_Out_Port_Encoding_Name_@ = UPER
#define @_UPPER:Out_Port_Remote_Function_@_@_UPPER:Out_Port_Remote_Port_Name_@_REQUEST_SIZE (asn1Scc@_REPLACE_ALL(-/_):Out_Port_Type_Name_@_REQUIRED_BYTES_FOR_ENCODING)
@@ELSIF@@ @_Out_Port_Encoding_Name_@ = ACN
#define @_UPPER:Out_Port_Remote_Function_@_@_UPPER:Out_Port_Remote_Port_Name_@_REQUEST_SIZE (asn1Scc@_REPLACE_ALL(-/_):Out_Port_Type_Name_@_REQUIRED_BYTES_FOR_ACN_ENCODING)
@@END_IF@@
@@END_TABLE@@

62
#endif