1 /* |
|
2 * Generated by erpcgen 1.13.0 on Fri Nov 22 15:03:08 2024. |
|
3 * |
|
4 * AUTOGENERATED - DO NOT EDIT |
|
5 */ |
|
6 |
|
7 |
|
8 #include <new> |
|
9 #include "c_erpc_PLCObject_server.h" |
|
10 #include "erpc_PLCObject_server.hpp" |
|
11 #include "erpc_manually_constructed.hpp" |
|
12 |
|
13 using namespace erpc; |
|
14 using namespace std; |
|
15 using namespace erpcShim; |
|
16 |
|
17 |
|
18 class BeremizPLCObjectService_server: public BeremizPLCObjectService_interface |
|
19 { |
|
20 public: |
|
21 virtual ~BeremizPLCObjectService_server() {}; |
|
22 |
|
23 |
|
24 uint32_t AppendChunkToBlob(const binary_t * data, const binary_t * blobID, binary_t * newBlobID) |
|
25 { |
|
26 uint32_t result; |
|
27 result = ::AppendChunkToBlob(data, blobID, newBlobID); |
|
28 |
|
29 return result; |
|
30 } |
|
31 |
|
32 uint32_t GetLogMessage(uint8_t level, uint32_t msgID, log_message * message) |
|
33 { |
|
34 uint32_t result; |
|
35 result = ::GetLogMessage(level, msgID, message); |
|
36 |
|
37 return result; |
|
38 } |
|
39 |
|
40 uint32_t GetPLCID(PSKID * plcID) |
|
41 { |
|
42 uint32_t result; |
|
43 result = ::GetPLCID(plcID); |
|
44 |
|
45 return result; |
|
46 } |
|
47 |
|
48 uint32_t GetPLCstatus(PLCstatus * status) |
|
49 { |
|
50 uint32_t result; |
|
51 result = ::GetPLCstatus(status); |
|
52 |
|
53 return result; |
|
54 } |
|
55 |
|
56 uint32_t GetTraceVariables(uint32_t debugToken, TraceVariables * traces) |
|
57 { |
|
58 uint32_t result; |
|
59 result = ::GetTraceVariables(debugToken, traces); |
|
60 |
|
61 return result; |
|
62 } |
|
63 |
|
64 uint32_t MatchMD5(const char * MD5, bool * match) |
|
65 { |
|
66 uint32_t result; |
|
67 result = ::MatchMD5(MD5, match); |
|
68 |
|
69 return result; |
|
70 } |
|
71 |
|
72 uint32_t NewPLC(const char * md5sum, const binary_t * plcObjectBlobID, const list_extra_file_1_t * extrafiles, bool * success) |
|
73 { |
|
74 uint32_t result; |
|
75 result = ::NewPLC(md5sum, plcObjectBlobID, extrafiles, success); |
|
76 |
|
77 return result; |
|
78 } |
|
79 |
|
80 uint32_t PurgeBlobs(void) |
|
81 { |
|
82 uint32_t result; |
|
83 result = ::PurgeBlobs(); |
|
84 |
|
85 return result; |
|
86 } |
|
87 |
|
88 uint32_t RepairPLC(void) |
|
89 { |
|
90 uint32_t result; |
|
91 result = ::RepairPLC(); |
|
92 |
|
93 return result; |
|
94 } |
|
95 |
|
96 uint32_t ResetLogCount(void) |
|
97 { |
|
98 uint32_t result; |
|
99 result = ::ResetLogCount(); |
|
100 |
|
101 return result; |
|
102 } |
|
103 |
|
104 uint32_t SeedBlob(const binary_t * seed, binary_t * blobID) |
|
105 { |
|
106 uint32_t result; |
|
107 result = ::SeedBlob(seed, blobID); |
|
108 |
|
109 return result; |
|
110 } |
|
111 |
|
112 uint32_t SetTraceVariablesList(const list_trace_order_1_t * orders, int32_t * debugtoken) |
|
113 { |
|
114 uint32_t result; |
|
115 result = ::SetTraceVariablesList(orders, debugtoken); |
|
116 |
|
117 return result; |
|
118 } |
|
119 |
|
120 uint32_t StartPLC(void) |
|
121 { |
|
122 uint32_t result; |
|
123 result = ::StartPLC(); |
|
124 |
|
125 return result; |
|
126 } |
|
127 |
|
128 uint32_t StopPLC(bool * success) |
|
129 { |
|
130 uint32_t result; |
|
131 result = ::StopPLC(success); |
|
132 |
|
133 return result; |
|
134 } |
|
135 |
|
136 uint32_t ExtendedCall(const char * method, const binary_t * argument, binary_t * answer) |
|
137 { |
|
138 uint32_t result; |
|
139 result = ::ExtendedCall(method, argument, answer); |
|
140 |
|
141 return result; |
|
142 } |
|
143 }; |
|
144 |
|
145 ERPC_MANUALLY_CONSTRUCTED_STATIC(BeremizPLCObjectService_service, s_BeremizPLCObjectService_service); |
|
146 ERPC_MANUALLY_CONSTRUCTED_STATIC(BeremizPLCObjectService_server, s_BeremizPLCObjectService_server); |
|
147 |
|
148 erpc_service_t create_BeremizPLCObjectService_service(void) |
|
149 { |
|
150 erpc_service_t service; |
|
151 |
|
152 #if ERPC_ALLOCATION_POLICY == ERPC_ALLOCATION_POLICY_DYNAMIC |
|
153 service = new (nothrow) BeremizPLCObjectService_service(new (nothrow)BeremizPLCObjectService_server()); |
|
154 #else |
|
155 if (s_BeremizPLCObjectService_service.isUsed()) |
|
156 { |
|
157 service = NULL; |
|
158 } |
|
159 else |
|
160 { |
|
161 s_BeremizPLCObjectService_server.construct(); |
|
162 s_BeremizPLCObjectService_service.construct(s_BeremizPLCObjectService_server.get()); |
|
163 service = s_BeremizPLCObjectService_service.get(); |
|
164 } |
|
165 #endif |
|
166 |
|
167 return service; |
|
168 } |
|
169 |
|
170 void destroy_BeremizPLCObjectService_service(erpc_service_t service) |
|
171 { |
|
172 #if ERPC_ALLOCATION_POLICY == ERPC_ALLOCATION_POLICY_DYNAMIC |
|
173 if (service) |
|
174 { |
|
175 delete (BeremizPLCObjectService_server *)(((BeremizPLCObjectService_service *)service)->getHandler()); |
|
176 delete (BeremizPLCObjectService_service *)service; |
|
177 } |
|
178 #else |
|
179 (void)service; |
|
180 erpc_assert(service == s_BeremizPLCObjectService_service.get()); |
|
181 s_BeremizPLCObjectService_service.destroy(); |
|
182 s_BeremizPLCObjectService_server.destroy(); |
|
183 #endif |
|
184 } |
|
185 |
|