supla-device
Loading...
Searching...
No Matches
srpc.h
1/*
2 Copyright (C) AC SOFTWARE SP. Z O.O.
3
4 This program is free software; you can redistribute it and/or
5 modify it under the terms of the GNU General Public License
6 as published by the Free Software Foundation; either version 2
7 of the License, or (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 */
18#ifndef supladex_H_
19#define supladex_H_
20
21#include <stddef.h>
22#include <stdio.h>
23
24#include "eh.h"
25#include "proto.h"
26#if defined(ESP32)
27#include <esp8266-compat.h>
28#endif
29
30#ifdef __ANDROID__
31#define SRPC_EXCLUDE_DEVICE
32#endif /*__ANDROID__*/
33
34#if defined(ESP8266) || defined(ESP32)
35
36#if defined(ARDUINO_ARCH_ESP8266) || defined(ARDUINO_ARCH_ESP32)
37#define SRPC_WITHOUT_OUT_QUEUE
38#define SRPC_WITHOUT_IN_QUEUE
39#define PACKET_INTEGRITY_BUFFER_DISABLED
40#endif /* defined(ARDUINO_ARCH_ESP8266) || defined(ARDUINO_ARCH_ESP32) */
41
42#define SRPC_EXCLUDE_CLIENT
43#define SRPC_ICACHE_FLASH ICACHE_FLASH_ATTR
44
45#if !defined(ESP32)
46#include <mem.h>
47#include <os_type.h>
48#endif
49#else
50#define SRPC_ICACHE_FLASH
51#endif
52
53#if defined(__AVR__) || defined(ARDUINO) || defined(SUPLA_DEVICE)
54#define SRPC_EXCLUDE_CLIENT
55#define SRPC_WITHOUT_OUT_QUEUE
56#define SRPC_WITHOUT_IN_QUEUE
57#define PACKET_INTEGRITY_BUFFER_DISABLED
58#endif /*__AVR__*/
59
60#ifdef __cplusplus
61extern "C" {
62#endif
63
64typedef _supla_int_t (*_func_srpc_DataRW)(void *buf, _supla_int_t count,
65 void *user_params);
66typedef void (*_func_srpc_event_OnRemoteCallReceived)(
67 void *_srpc, unsigned _supla_int_t rr_id, unsigned _supla_int_t call_id,
68 void *user_params, unsigned char proto_version);
69typedef void (*_func_srpc_event_BeforeCall)(void *_srpc,
70 unsigned _supla_int_t call_id,
71 void *user_params);
72typedef void (*_func_srpc_event_OnVersionError)(void *_srpc,
73 unsigned char remote_version,
74 void *user_params);
75typedef void (*_func_srpc_event_OnMinVersionRequired)(
76 void *_srpc, unsigned _supla_int_t call_id, unsigned char min_version,
77 void *user_params);
78
79typedef struct {
80 _func_srpc_DataRW data_read;
81 _func_srpc_DataRW data_write;
82 _func_srpc_event_OnRemoteCallReceived on_remote_call_received;
83 _func_srpc_event_OnVersionError on_version_error;
84 _func_srpc_event_BeforeCall before_async_call;
85 _func_srpc_event_OnMinVersionRequired on_min_version_required;
86
87 TEventHandler *eh;
88
89 void *user_params;
91
93 TDCS_SuplaPingServer *dcs_ping;
94 TSDC_SuplaPingServerResult *sdc_ping_result;
95 TSDC_SuplaGetVersionResult *sdc_getversion_result;
96 TSDC_SuplaVersionError *sdc_version_error;
97 TDCS_SuplaSetActivityTimeout *dcs_set_activity_timeout;
98 TSDC_SuplaSetActivityTimeoutResult *sdc_set_activity_timeout_result;
99 TDS_SuplaRegisterDevice *ds_register_device;
100 TDS_SuplaRegisterDevice_B *ds_register_device_b;
101 TDS_SuplaRegisterDevice_C *ds_register_device_c;
102 TDS_SuplaRegisterDevice_D *ds_register_device_d;
103 TDS_SuplaRegisterDevice_E *ds_register_device_e;
104 TDS_SuplaRegisterDevice_F *ds_register_device_f;
105 TDS_SuplaRegisterDevice_G *ds_register_device_g;
106 TSD_SuplaRegisterDeviceResult *sd_register_device_result;
107 TSD_SuplaRegisterDeviceResult_B *sd_register_device_result_b;
108 TCS_SuplaRegisterClient *cs_register_client;
109 TCS_SuplaRegisterClient_B *cs_register_client_b;
110 TCS_SuplaRegisterClient_C *cs_register_client_c;
111 TCS_SuplaRegisterClient_D *cs_register_client_d;
112 TSC_SuplaRegisterClientResult *sc_register_client_result;
113 TSC_SuplaRegisterClientResult_B *sc_register_client_result_b;
114 TSC_SuplaRegisterClientResult_C *sc_register_client_result_c;
115 TSC_SuplaRegisterClientResult_D *sc_register_client_result_d;
116 TDS_SuplaDeviceChannelValue *ds_device_channel_value;
117 TDS_SuplaDeviceChannelValue_B *ds_device_channel_value_b;
118 TDS_SuplaDeviceChannelValue_C *ds_device_channel_value_c;
119 TDS_SuplaDeviceChannelExtendedValue *ds_device_channel_extendedvalue;
120 TSC_SuplaLocation *sc_location;
121 TSC_SuplaLocationPack *sc_location_pack;
122 TSC_SuplaChannelPack *sc_channel_pack;
123 TSC_SuplaChannelPack_B *sc_channel_pack_b;
124 TSC_SuplaChannelPack_C *sc_channel_pack_c;
125 TSC_SuplaChannelPack_D *sc_channel_pack_d;
126 TSC_SuplaChannelPack_E *sc_channel_pack_e;
127 TSC_SuplaChannelValue *sc_channel_value;
128 TSC_SuplaChannelValue_B *sc_channel_value_b;
129 TSC_SuplaEvent *sc_event;
130 TSD_SuplaChannelNewValue *sd_channel_new_value;
131 TSD_SuplaChannelGroupNewValue *sd_channelgroup_new_value;
132 TDS_SuplaChannelNewValueResult *ds_channel_new_value_result;
133 TCS_SuplaChannelNewValue *cs_channel_new_value;
134 TCS_SuplaChannelNewValue_B *cs_channel_new_value_b;
135 TDS_FirmwareUpdateParams *ds_firmware_update_params;
136 TSD_FirmwareUpdate_UrlResult *sc_firmware_update_url_result;
137 TSDC_RegistrationEnabled *sdc_reg_enabled;
138 TSC_SuplaChannelGroupPack *sc_channelgroup_pack;
139 TSC_SuplaChannelGroupPack_B *sc_channelgroup_pack_b;
140 TSC_SuplaChannelGroupRelationPack *sc_channelgroup_relation_pack;
141 TSC_SuplaChannelRelationPack *sc_channel_relation_pack;
142 TSC_SuplaChannelValuePack *sc_channelvalue_pack;
143 TSC_SuplaChannelValuePack_B *sc_channelvalue_pack_b;
144 TSC_SuplaChannelExtendedValuePack *sc_channelextendedvalue_pack;
145 TCS_SuplaNewValue *cs_new_value;
146 TSC_OAuthTokenRequestResult *sc_oauth_tokenrequest_result;
147 TCS_SuperUserAuthorizationRequest *cs_superuser_authorization_request;
148 TSC_SuperUserAuthorizationResult *sc_superuser_authorization_result;
149 TCS_DeviceCalCfgRequest *cs_device_calcfg_request;
150 TCS_DeviceCalCfgRequest_B *cs_device_calcfg_request_b;
151 TSC_DeviceCalCfgResult *sc_device_calcfg_result;
152 TSD_DeviceCalCfgRequest *sd_device_calcfg_request;
153 TDS_DeviceCalCfgResult *ds_device_calcfg_result;
154 TSDC_UserLocalTimeResult *sdc_user_localtime_result;
155 TCSD_ChannelStateRequest *csd_channel_state_request;
156 TDSC_ChannelState *dsc_channel_state;
157 TCS_ChannelBasicCfgRequest *cs_channel_basic_cfg_request;
158 TSC_ChannelBasicCfg *sc_channel_basic_cfg;
159 TCS_SetChannelFunction *cs_set_channel_function;
160 TSC_SetChannelFunctionResult *sc_set_channel_function_result;
161 TDCS_SetCaption *dcs_set_caption;
162 TSCD_SetCaptionResult *scd_set_caption_result;
163 TSC_ClientsReconnectRequestResult *sc_clients_reconnect_result;
164 TCS_SetRegistrationEnabled *cs_set_registration_enabled;
165 TSC_SetRegistrationEnabledResult *sc_set_registration_enabled_result;
166 TCS_DeviceReconnectRequest *cs_device_reconnect_request;
167 TSC_DeviceReconnectRequestResult *sc_device_reconnect_request_result;
168 TSD_ChannelFunctions *sd_channel_functions;
169 TDS_GetChannelConfigRequest *ds_get_channel_config_request;
170 TSD_ChannelConfig *sd_channel_config;
171 TDS_ActionTrigger *ds_action_trigger;
172 TCS_TimerArmRequest *cs_timer_arm_request;
173 TSC_SuplaScenePack *sc_scene_pack;
174 TSC_SuplaSceneStatePack *sc_scene_state_pack;
175 TCS_Action *cs_action;
176 TCS_ActionWithAuth *cs_action_with_auth;
177 TSC_ActionExecutionResult *sc_action_execution_result;
178 TCS_GetChannelValueWithAuth *cs_get_value_with_auth;
179 TSC_GetChannelValueResult *sc_get_value_result;
180 TDS_RegisterPushNotification *ds_register_push_notification;
181 TDS_PushNotification *ds_push_notification;
182 TCS_RegisterPnClientToken *cs_register_pn_client_token;
183 TSC_RegisterPnClientTokenResult *sc_register_pn_client_token_result;
184 TSDS_SetChannelConfig *sds_set_channel_config_request;
185 TSDS_SetChannelConfigResult *sds_set_channel_config_result;
186 TSD_ChannelConfigFinished *sd_channel_config_finished;
187 TSDS_SetDeviceConfig *sds_set_device_config_request;
188 TSDS_SetDeviceConfigResult *sds_set_device_config_result;
189 TSCS_ChannelConfig *scs_channel_config;
190 TCS_GetChannelConfigRequest *cs_get_channel_config_request;
191 TSC_ChannelConfigUpdateOrResult *sc_channel_config_update_or_result;
192 TSC_DeviceConfigUpdateOrResult *sc_device_config_update_or_result;
193 TCS_GetDeviceConfigRequest *cs_get_device_config_request;
194 TDS_SubdeviceDetails *ds_subdevice_details;
195 TSC_SuplaChannelStatePack *sc_channel_state_pack;
196};
197
198typedef struct {
199 unsigned _supla_int_t call_id;
200 unsigned _supla_int_t rr_id;
201
202 union TsrpcDataPacketData data;
204
205void SRPC_ICACHE_FLASH srpc_params_init(TsrpcParams *params);
206
207void *SRPC_ICACHE_FLASH srpc_init(TsrpcParams *params);
208void SRPC_ICACHE_FLASH srpc_free(void *_srpc);
209
210void SRPC_ICACHE_FLASH srpc_lock(void *_srpc);
211void SRPC_ICACHE_FLASH srpc_unlock(void *_srpc);
212
213char SRPC_ICACHE_FLASH srpc_input_dataexists(void *_srpc);
214char SRPC_ICACHE_FLASH srpc_output_dataexists(void *_srpc);
215unsigned char SRPC_ICACHE_FLASH srpc_out_queue_item_count(void *srpc);
216
217char SRPC_ICACHE_FLASH srpc_iterate(void *_srpc);
218char SRPC_ICACHE_FLASH srpc_iterate_device(void *_srpc);
219
220char SRPC_ICACHE_FLASH srpc_getdata(void *_srpc, TsrpcReceivedData *rd,
221 unsigned _supla_int_t rr_id);
222
223void SRPC_ICACHE_FLASH srpc_rd_free(TsrpcReceivedData *rd);
224
225unsigned char SRPC_ICACHE_FLASH srpc_get_proto_version(void *_srpc);
226void SRPC_ICACHE_FLASH srpc_set_proto_version(void *_srpc,
227 unsigned char version);
228
229unsigned char SRPC_ICACHE_FLASH
230srpc_call_min_version_required(void *_srpc, unsigned _supla_int_t call_id);
231unsigned char SRPC_ICACHE_FLASH
232srpc_call_allowed(void *_srpc, unsigned _supla_int_t call_id);
233
234// device/client <-> server
235_supla_int_t SRPC_ICACHE_FLASH srpc_dcs_async_getversion(void *_srpc);
236_supla_int_t SRPC_ICACHE_FLASH srpc_sdc_async_getversion_result(
237 void *_srpc, char SoftVer[SUPLA_SOFTVER_MAXSIZE]);
238_supla_int_t SRPC_ICACHE_FLASH
239srpc_sdc_async_versionerror(void *_srpc, unsigned char remote_version);
240_supla_int_t SRPC_ICACHE_FLASH srpc_dcs_async_ping_server(void *_srpc);
241_supla_int_t SRPC_ICACHE_FLASH srpc_sdc_async_ping_server_result(void *_srpc);
242_supla_int_t SRPC_ICACHE_FLASH srpc_dcs_async_set_activity_timeout(
243 void *_srpc, TDCS_SuplaSetActivityTimeout *dcs_set_activity_timeout);
244_supla_int_t SRPC_ICACHE_FLASH srpc_dcs_async_set_activity_timeout_result(
245 void *_srpc,
246 TSDC_SuplaSetActivityTimeoutResult *sdc_set_activity_timeout_result);
247_supla_int_t SRPC_ICACHE_FLASH
248srpc_dcs_async_get_registration_enabled(void *_srpc);
249_supla_int_t SRPC_ICACHE_FLASH srpc_sdc_async_get_registration_enabled_result(
250 void *_srpc, TSDC_RegistrationEnabled *reg_enabled);
251_supla_int_t SRPC_ICACHE_FLASH srpc_dcs_async_get_user_localtime(void *_srpc);
252_supla_int_t SRPC_ICACHE_FLASH srpc_sdc_async_get_user_localtime_result(
253 void *_srpc, TSDC_UserLocalTimeResult *localtime);
254_supla_int_t SRPC_ICACHE_FLASH srpc_csd_async_get_channel_state(
255 void *_srpc, TCSD_ChannelStateRequest *request);
256_supla_int_t SRPC_ICACHE_FLASH
257srpc_csd_async_channel_state_result(void *_srpc, TDSC_ChannelState *state);
258
259_supla_int_t SRPC_ICACHE_FLASH
260srpc_dcs_async_set_channel_caption(void *_srpc, TDCS_SetCaption *caption);
261_supla_int_t SRPC_ICACHE_FLASH srpc_scd_async_set_channel_caption_result(
262 void *_srpc, TSCD_SetCaptionResult *caption);
263
264#ifndef SRPC_EXCLUDE_DEVICE
265// device <-> server
266_supla_int_t SRPC_ICACHE_FLASH srpc_ds_async_registerdevice(
267 void *_srpc, TDS_SuplaRegisterDevice *registerdevice);
268_supla_int_t SRPC_ICACHE_FLASH srpc_ds_async_registerdevice_b(
269 void *_srpc, TDS_SuplaRegisterDevice_B *registerdevice); // ver. >= 2
270_supla_int_t SRPC_ICACHE_FLASH srpc_ds_async_registerdevice_c(
271 void *_srpc, TDS_SuplaRegisterDevice_C *registerdevice); // ver. >= 6
272_supla_int_t SRPC_ICACHE_FLASH srpc_ds_async_registerdevice_d(
273 void *_srpc, TDS_SuplaRegisterDevice_D *registerdevice); // ver. >= 7
274_supla_int_t SRPC_ICACHE_FLASH srpc_ds_async_registerdevice_e(
275 void *_srpc, TDS_SuplaRegisterDevice_E *registerdevice); // ver. >= 10
276_supla_int_t SRPC_ICACHE_FLASH srpc_ds_async_registerdevice_f(
277 void *_srpc, TDS_SuplaRegisterDevice_F *registerdevice); // ver. >= 23
278_supla_int_t SRPC_ICACHE_FLASH srpc_ds_async_registerdevice_g(
279 void *_srpc, TDS_SuplaRegisterDevice_G *registerdevice); // ver. >= 25
280_supla_int_t SRPC_ICACHE_FLASH srpc_sd_async_registerdevice_result(
281 void *_srpc, TSD_SuplaRegisterDeviceResult *registerdevice_result);
282_supla_int_t SRPC_ICACHE_FLASH srpc_sd_async_registerdevice_result_b(
283 void *_srpc,
284 TSD_SuplaRegisterDeviceResult_B *registerdevice_result); // ver. >= 25
285_supla_int_t SRPC_ICACHE_FLASH srpc_ds_async_registerdevice_in_chunks(
286 void *_srpc, TDS_SuplaRegisterDeviceHeader *registerdevice,
287 TDS_SuplaDeviceChannel_D *(*get_channel_data_callback)(int)); // ver. >= 23
288_supla_int_t SRPC_ICACHE_FLASH srpc_ds_async_registerdevice_in_chunks_g(
289 void *_srpc, TDS_SuplaRegisterDeviceHeader *registerdevice,
290 TDS_SuplaDeviceChannel_E *(*get_channel_data_callback)(int)); // ver. >= 25
291
292_supla_int_t SRPC_ICACHE_FLASH srpc_ds_async_channel_value_changed(
293 void *_srpc, unsigned char channel_number, char *value);
294_supla_int_t SRPC_ICACHE_FLASH
295srpc_ds_async_channel_value_changed_b(void *_srpc, unsigned char channel_number,
296 char *value, unsigned char offline);
297_supla_int_t SRPC_ICACHE_FLASH srpc_ds_async_channel_value_changed_c(
298 void *_srpc, unsigned char channel_number, char *value,
299 unsigned char offline, unsigned _supla_int_t validity_time_sec);
300_supla_int_t SRPC_ICACHE_FLASH srpc_ds_async_channel_extendedvalue_changed(
301 void *_srpc, unsigned char channel_number,
303_supla_int_t SRPC_ICACHE_FLASH
304srpc_sd_async_set_channel_value(void *_srpc, TSD_SuplaChannelNewValue *value);
305_supla_int_t SRPC_ICACHE_FLASH srpc_sd_async_set_channelgroup_value(
306 void *_srpc, TSD_SuplaChannelGroupNewValue *value); // ver. >= 13
307_supla_int_t SRPC_ICACHE_FLASH
308srpc_ds_async_set_channel_result(void *_srpc, unsigned char ChannelNumber,
309 _supla_int_t SenderID, char Success);
310_supla_int_t SRPC_ICACHE_FLASH srpc_sd_async_get_firmware_update_url(
311 void *_srpc, TDS_FirmwareUpdateParams *params);
312_supla_int_t SRPC_ICACHE_FLASH srpc_sd_async_get_firmware_update_url_result(
313 void *_srpc, TSD_FirmwareUpdate_UrlResult *result);
314_supla_int_t SRPC_ICACHE_FLASH srpc_sd_async_device_calcfg_request(
315 void *_srpc, TSD_DeviceCalCfgRequest *request);
316_supla_int_t SRPC_ICACHE_FLASH
317srpc_ds_async_device_calcfg_result(void *_srpc, TDS_DeviceCalCfgResult *result);
318_supla_int_t SRPC_ICACHE_FLASH srpc_ds_async_get_channel_functions(void *_srpc);
319_supla_int_t SRPC_ICACHE_FLASH srpc_sd_async_get_channel_functions_result(
320 void *_srpc, TSD_ChannelFunctions *result);
321_supla_int_t SRPC_ICACHE_FLASH srpc_ds_async_get_channel_config_request(
322 void *_srpc, TDS_GetChannelConfigRequest *request);
323_supla_int_t SRPC_ICACHE_FLASH
324srpc_sd_async_get_channel_config_result(void *_srpc, TSD_ChannelConfig *config);
325_supla_int_t SRPC_ICACHE_FLASH
326srpc_ds_async_action_trigger(void *_srpc, TDS_ActionTrigger *action_trigger);
327_supla_int_t SRPC_ICACHE_FLASH srpc_ds_async_register_push_notification(
328 void *_srpc, TDS_RegisterPushNotification *reg);
329_supla_int_t SRPC_ICACHE_FLASH
330srpc_ds_async_send_push_notification(void *_srpc, TDS_PushNotification *push);
331_supla_int_t SRPC_ICACHE_FLASH srpc_sd_async_set_channel_config_request(
332 void *_srpc, TSDS_SetChannelConfig *config);
333_supla_int_t SRPC_ICACHE_FLASH srpc_ds_async_set_channel_config_result(
334 void *_srpc, TSDS_SetChannelConfigResult *result);
335_supla_int_t SRPC_ICACHE_FLASH srpc_ds_async_set_channel_config_request(
336 void *_srpc, TSDS_SetChannelConfig *config);
337_supla_int_t SRPC_ICACHE_FLASH srpc_sd_async_set_channel_config_result(
338 void *_srpc, TSDS_SetChannelConfigResult *result);
339_supla_int_t SRPC_ICACHE_FLASH srpc_sd_async_channel_config_finished(
340 void *_srpc, TSD_ChannelConfigFinished *fin);
341_supla_int_t SRPC_ICACHE_FLASH srpc_sd_async_set_device_config_request(
342 void *_srpc, TSDS_SetDeviceConfig *config);
343_supla_int_t SRPC_ICACHE_FLASH srpc_ds_async_set_device_config_result(
344 void *_srpc, TSDS_SetDeviceConfigResult *result);
345_supla_int_t SRPC_ICACHE_FLASH srpc_ds_async_set_device_config_request(
346 void *_srpc, TSDS_SetDeviceConfig *config);
347_supla_int_t SRPC_ICACHE_FLASH srpc_sd_async_set_device_config_result(
348 void *_srpc, TSDS_SetDeviceConfigResult *result);
349_supla_int_t SRPC_ICACHE_FLASH
350srpc_ds_async_set_subdevice_details(void *_srpc, TDS_SubdeviceDetails *reg);
351#endif /*SRPC_EXCLUDE_DEVICE*/
352
353#ifndef SRPC_EXCLUDE_CLIENT
354// client <-> server
355_supla_int_t SRPC_ICACHE_FLASH srpc_cs_async_registerclient(
356 void *_srpc, TCS_SuplaRegisterClient *registerclient);
357_supla_int_t SRPC_ICACHE_FLASH srpc_cs_async_registerclient_b(
358 void *_srpc, TCS_SuplaRegisterClient_B *registerclient); // ver. >= 6
359_supla_int_t SRPC_ICACHE_FLASH srpc_cs_async_registerclient_c(
360 void *_srpc, TCS_SuplaRegisterClient_C *registerclient); // ver. >= 7
361_supla_int_t SRPC_ICACHE_FLASH srpc_cs_async_registerclient_d(
362 void *_srpc, TCS_SuplaRegisterClient_D *registerclient); // ver. >= 11
363_supla_int_t SRPC_ICACHE_FLASH srpc_sc_async_registerclient_result(
364 void *_srpc, TSC_SuplaRegisterClientResult *registerclient_result);
365_supla_int_t SRPC_ICACHE_FLASH srpc_sc_async_registerclient_result_b(
366 void *_srpc,
367 TSC_SuplaRegisterClientResult_B *registerclient_result); // ver. >= 9
368_supla_int_t SRPC_ICACHE_FLASH srpc_sc_async_registerclient_result_c(
369 void *_srpc,
370 TSC_SuplaRegisterClientResult_C *registerclient_result); // ver. >= 17
371_supla_int_t SRPC_ICACHE_FLASH srpc_sc_async_registerclient_result_d(
372 void *_srpc,
373 TSC_SuplaRegisterClientResult_D *registerclient_result); // ver. >= 19
374_supla_int_t SRPC_ICACHE_FLASH
375srpc_sc_async_location_update(void *_srpc, TSC_SuplaLocation *location);
376_supla_int_t SRPC_ICACHE_FLASH srpc_sc_async_locationpack_update(
377 void *_srpc, TSC_SuplaLocationPack *location_pack);
378_supla_int_t SRPC_ICACHE_FLASH srpc_sc_async_channelpack_update(
379 void *_srpc, TSC_SuplaChannelPack *channel_pack);
380_supla_int_t SRPC_ICACHE_FLASH srpc_sc_async_channelpack_update_b(
381 void *_srpc, TSC_SuplaChannelPack_B *channel_pack); // ver. >= 8
382_supla_int_t SRPC_ICACHE_FLASH srpc_sc_async_channelpack_update_c(
383 void *_srpc, TSC_SuplaChannelPack_C *channel_pack); // ver. >= 10
384_supla_int_t SRPC_ICACHE_FLASH srpc_sc_async_channelpack_update_d(
385 void *_srpc, TSC_SuplaChannelPack_D *channel_pack); // ver. >= 15
386_supla_int_t SRPC_ICACHE_FLASH srpc_sc_async_channelpack_update_e(
387 void *_srpc, TSC_SuplaChannelPack_E *channel_pack); // ver. >= 23
388_supla_int_t SRPC_ICACHE_FLASH srpc_sc_async_channel_value_update(
389 void *_srpc, TSC_SuplaChannelValue *channel_item_value);
390_supla_int_t SRPC_ICACHE_FLASH srpc_sc_async_channel_value_update_b(
391 void *_srpc, TSC_SuplaChannelValue_B *channel_item_value);
392_supla_int_t SRPC_ICACHE_FLASH srpc_sc_async_channelgroup_pack_update(
393 void *_srpc, TSC_SuplaChannelGroupPack *channelgroup_pack); // ver. >= 9
394_supla_int_t SRPC_ICACHE_FLASH srpc_sc_async_channelgroup_pack_update_b(
395 void *_srpc, TSC_SuplaChannelGroupPack_B *channelgroup_pack); // ver. >= 10
396_supla_int_t SRPC_ICACHE_FLASH srpc_sc_async_channelgroup_relation_pack_update(
398 *channelgroup_relation_pack); // ver. >= 9
399_supla_int_t SRPC_ICACHE_FLASH srpc_sc_async_channel_relation_pack_update(
400 void *_srpc, TSC_SuplaChannelRelationPack *relation_pack); // ver. >= 21
401_supla_int_t SRPC_ICACHE_FLASH srpc_sc_async_channelvalue_pack_update(
402 void *_srpc, TSC_SuplaChannelValuePack *channelvalue_pack); // ver. >= 9
403_supla_int_t SRPC_ICACHE_FLASH srpc_sc_async_channelvalue_pack_update_b(
404 void *_srpc, TSC_SuplaChannelValuePack_B *channelvalue_pack); // ver. >= 15
405_supla_int_t SRPC_ICACHE_FLASH srpc_sc_async_channelextendedvalue_pack_update(
406 void *_srpc,
407 TSC_SuplaChannelExtendedValuePack *extendedvalue_pack); // ver. >= 10
408_supla_int_t SRPC_ICACHE_FLASH srpc_sc_async_channel_state_pack_update(
409 void *_srpc, TSC_SuplaChannelStatePack *state_pack); // ver. >= 26
410_supla_int_t SRPC_ICACHE_FLASH srpc_cs_async_get_next(void *_srpc);
411_supla_int_t SRPC_ICACHE_FLASH srpc_sc_async_event(void *_srpc,
412 TSC_SuplaEvent *event);
413_supla_int_t SRPC_ICACHE_FLASH
414srpc_cs_async_set_channel_value(void *_srpc, TCS_SuplaChannelNewValue *value);
415_supla_int_t SRPC_ICACHE_FLASH
416srpc_cs_async_set_value(void *_srpc, TCS_SuplaNewValue *value); // ver. >= 9
417_supla_int_t SRPC_ICACHE_FLASH srpc_cs_async_set_channel_value_b(
418 void *_srpc, TCS_SuplaChannelNewValue_B *value);
419_supla_int_t SRPC_ICACHE_FLASH srpc_cs_async_oauth_token_request(void *_srpc);
420_supla_int_t SRPC_ICACHE_FLASH srpc_cs_async_oauth_token_request_result(
421 void *_srpc, TSC_OAuthTokenRequestResult *result);
422_supla_int_t SRPC_ICACHE_FLASH srpc_cs_async_superuser_authorization_request(
423 void *_srpc, TCS_SuperUserAuthorizationRequest *request);
424_supla_int_t SRPC_ICACHE_FLASH
425srpc_cs_async_get_superuser_authorization_result(void *_srpc);
426_supla_int_t SRPC_ICACHE_FLASH srpc_sc_async_superuser_authorization_result(
427 void *_srpc, TSC_SuperUserAuthorizationResult *result);
428_supla_int_t SRPC_ICACHE_FLASH srpc_cs_async_device_calcfg_request(
429 void *_srpc, TCS_DeviceCalCfgRequest *request);
430_supla_int_t SRPC_ICACHE_FLASH srpc_cs_async_device_calcfg_request_b(
431 void *_srpc, TCS_DeviceCalCfgRequest_B *request);
432_supla_int_t SRPC_ICACHE_FLASH
433srpc_sc_async_device_calcfg_result(void *_srpc, TSC_DeviceCalCfgResult *result);
434_supla_int_t SRPC_ICACHE_FLASH
435srpc_cs_async_get_channel_basic_cfg(void *_srpc, _supla_int_t ChannelID);
436_supla_int_t SRPC_ICACHE_FLASH srpc_sc_async_channel_basic_cfg_result(
437 void *_srpc, TSC_ChannelBasicCfg *basic_cfg);
438_supla_int_t SRPC_ICACHE_FLASH
439srpc_cs_async_set_channel_function(void *_srpc, TCS_SetChannelFunction *func);
440_supla_int_t SRPC_ICACHE_FLASH srpc_sc_async_set_channel_function_result(
441 void *_srpc, TSC_SetChannelFunctionResult *result);
442_supla_int_t SRPC_ICACHE_FLASH
443srpc_cs_async_set_channel_group_caption(void *_srpc, TDCS_SetCaption *caption);
444_supla_int_t SRPC_ICACHE_FLASH srpc_sc_async_set_channel_group_caption_result(
445 void *_srpc, TSCD_SetCaptionResult *caption);
446_supla_int_t SRPC_ICACHE_FLASH
447srpc_cs_async_set_location_caption(void *_srpc, TDCS_SetCaption *caption);
448_supla_int_t SRPC_ICACHE_FLASH srpc_sc_async_set_location_caption_result(
449 void *_srpc, TSCD_SetCaptionResult *caption);
450_supla_int_t SRPC_ICACHE_FLASH srpc_cs_async_set_scene_caption(
451 void *_srpc, TDCS_SetCaption *caption); // ver. >= 19
452_supla_int_t SRPC_ICACHE_FLASH srpc_sc_async_set_scene_caption_result(
453 void *_srpc, TSCD_SetCaptionResult *caption); // ver. >= 19
454_supla_int_t SRPC_ICACHE_FLASH
455srpc_cs_async_clients_reconnect_request(void *_srpc);
456_supla_int_t SRPC_ICACHE_FLASH srpc_sc_async_clients_reconnect_request_result(
457 void *_srpc, TSC_ClientsReconnectRequestResult *result);
458_supla_int_t SRPC_ICACHE_FLASH srpc_cs_async_set_registration_enabled(
459 void *_srpc, TCS_SetRegistrationEnabled *reg_enabled);
460_supla_int_t SRPC_ICACHE_FLASH srpc_sc_async_set_registration_enabled_result(
461 void *_srpc, TSC_SetRegistrationEnabledResult *result);
462_supla_int_t SRPC_ICACHE_FLASH srpc_cs_async_device_reconnect_request(
463 void *_srpc, TCS_DeviceReconnectRequest *request);
464_supla_int_t SRPC_ICACHE_FLASH srpc_sc_async_device_reconnect_request_result(
465 void *_srpc, TSC_DeviceReconnectRequestResult *result);
466_supla_int_t SRPC_ICACHE_FLASH
467srpc_cs_async_timer_arm(void *_srpc, TCS_TimerArmRequest *request);
468_supla_int_t SRPC_ICACHE_FLASH srpc_sc_async_scene_pack_update(
469 void *_srpc, TSC_SuplaScenePack *scene_pack); // ver. >= 18
470_supla_int_t SRPC_ICACHE_FLASH srpc_sc_async_scene_state_pack_update(
471 void *_srpc, TSC_SuplaSceneStatePack *scene_status_pack); // ver. >= 18
472_supla_int_t SRPC_ICACHE_FLASH srpc_cs_async_execute_action(void *_srpc,
473 TCS_Action *action);
474_supla_int_t SRPC_ICACHE_FLASH
475srpc_cs_async_execute_action_with_auth(void *_srpc, TCS_ActionWithAuth *action);
476_supla_int_t SRPC_ICACHE_FLASH srpc_sc_async_action_execution_result(
477 void *_srpc, TSC_ActionExecutionResult *result);
478_supla_int_t SRPC_ICACHE_FLASH srpc_cs_async_get_channel_value_with_auth(
479 void *_srpc, TCS_GetChannelValueWithAuth *vwa);
480_supla_int_t SRPC_ICACHE_FLASH srpc_sc_async_get_channel_value_result(
481 void *_srpc, TSC_GetChannelValueResult *result);
482_supla_int_t SRPC_ICACHE_FLASH srpc_cs_async_register_pn_client_token(
483 void *_srpc, TCS_RegisterPnClientToken *reg);
484_supla_int_t SRPC_ICACHE_FLASH srpc_sc_async_register_pn_client_token_result(
485 void *_srpc, TSC_RegisterPnClientTokenResult *result);
486_supla_int_t SRPC_ICACHE_FLASH srpc_cs_async_get_channel_config_request(
487 void *_srpc, TCS_GetChannelConfigRequest *request);
488_supla_int_t SRPC_ICACHE_FLASH srpc_sc_async_channel_config_update_or_result(
489 void *_srpc, TSC_ChannelConfigUpdateOrResult *config);
490_supla_int_t SRPC_ICACHE_FLASH srpc_cs_async_set_channel_config_request(
491 void *_srpc, TSCS_ChannelConfig *config);
492_supla_int_t SRPC_ICACHE_FLASH srpc_cs_async_get_device_config_request(
493 void *_srpc, TCS_GetDeviceConfigRequest *request);
494_supla_int_t SRPC_ICACHE_FLASH srpc_sc_async_device_config_update_or_result(
495 void *_srpc, TSC_DeviceConfigUpdateOrResult *config);
496#endif /*SRPC_EXCLUDE_CLIENT*/
497
498#ifndef SRPC_EXCLUDE_EXTENDEDVALUE_TOOLS
499
500#ifdef USE_DEPRECATED_EMEV_V2
501
502_supla_int_t SRPC_ICACHE_FLASH
503srpc_evtool_emev_v2to3(const TElectricityMeter_ExtendedValue_V2 *v2,
505
506_supla_int_t SRPC_ICACHE_FLASH
507srpc_evtool_emev_v3to2(const TElectricityMeter_ExtendedValue_V3 *v3,
508 TElectricityMeter_ExtendedValue_V2 *v2);
509
510_supla_int_t SRPC_ICACHE_FLASH srpc_evtool_v3_emextended2extended(
513
514_supla_int_t SRPC_ICACHE_FLASH
515srpc_evtool_v3_extended2emextended(const TSuplaChannelExtendedValue *ev,
517
518_supla_int_t srpc_evtool_extended2emextended_latest(
521
522#ifdef USE_DEPRECATED_EMEV_V1
523_supla_int_t SRPC_ICACHE_FLASH
524srpc_evtool_v1_emextended2extended(const TElectricityMeter_ExtendedValue *em_ev,
526_supla_int_t SRPC_ICACHE_FLASH
527srpc_evtool_v1_extended2emextended(const TSuplaChannelExtendedValue *ev,
528 TElectricityMeter_ExtendedValue *em_ev);
529
530_supla_int_t SRPC_ICACHE_FLASH
531srpc_evtool_emev_v1to2(const TElectricityMeter_ExtendedValue *v1,
532 TElectricityMeter_ExtendedValue_V2 *v2);
533_supla_int_t SRPC_ICACHE_FLASH
534srpc_evtool_emev_v2to1(const TElectricityMeter_ExtendedValue_V2 *v2,
535 TElectricityMeter_ExtendedValue *v1);
536
537#endif /*USE_DEPRECATED_EMEV_V1*/
538
539_supla_int_t SRPC_ICACHE_FLASH srpc_evtool_v2_emextended2extended(
540 const TElectricityMeter_ExtendedValue_V2 *em_ev,
542_supla_int_t SRPC_ICACHE_FLASH
543srpc_evtool_v2_extended2emextended(const TSuplaChannelExtendedValue *ev,
544 TElectricityMeter_ExtendedValue_V2 *em_ev);
545
546_supla_int_t SRPC_ICACHE_FLASH srpc_evtool_v1_extended2thermostatextended(
548_supla_int_t SRPC_ICACHE_FLASH srpc_evtool_v1_thermostatextended2extended(
550
551#endif /*USE_DEPRECATED_EMEV_V2*/
552
553#ifndef SRPC_EXCLUDE_CLIENT
554_supla_int_t SRPC_ICACHE_FLASH srpc_evtool_v1_icextended2extended(
557_supla_int_t SRPC_ICACHE_FLASH
558srpc_evtool_v1_extended2icextended(const TSuplaChannelExtendedValue *ev,
560_supla_int_t SRPC_ICACHE_FLASH srpc_evtool_value_add(
562_supla_int_t SRPC_ICACHE_FLASH
563srpc_evtool_value_get(TSuplaChannelExtendedValue *ev, unsigned short index,
565#endif /*SRPC_EXCLUDE_CLIENT*/
566
567#endif /*SRPC_EXCLUDE_EXTENDEDVALUE_TOOLS*/
568
569#ifdef __cplusplus
570}
571#endif
572
573#endif /* supladex_H_ */
Definition proto.h:2541
Definition proto.h:1640
Definition proto.h:1623
Definition proto.h:2612
Definition proto.h:2229
Definition proto.h:2220
Definition proto.h:2707
Definition proto.h:2877
Definition proto.h:1662
Definition proto.h:2791
Definition proto.h:3689
Definition proto.h:2658
Definition proto.h:2696
Definition proto.h:2094
Definition proto.h:1781
Definition proto.h:1775
Definition proto.h:1787
Definition proto.h:1678
Definition proto.h:1691
Definition proto.h:1704
Definition proto.h:1667
Definition proto.h:3561
Definition proto.h:2669
Definition proto.h:682
Definition proto.h:703
Definition proto.h:2575
Definition proto.h:3610
Definition proto.h:2256
Definition proto.h:1807
Definition proto.h:2903
Definition proto.h:3635
Definition proto.h:3624
Definition proto.h:3650
Definition proto.h:1192
Definition proto.h:1142
Definition proto.h:1150
Definition proto.h:1135
Definition proto.h:917
Definition proto.h:943
Definition proto.h:1044
Definition proto.h:971
Definition proto.h:986
Definition proto.h:1004
Definition proto.h:1022
Definition proto.h:1064
Definition proto.h:1086
Definition proto.h:779
Definition proto.h:1950
Definition eh.h:38
Definition proto.h:2680
Definition proto.h:2884
Definition proto.h:1645
Definition proto.h:2638
Definition proto.h:2895
Definition proto.h:2692
Definition proto.h:2238
Definition proto.h:2784
Definition proto.h:2711
Definition proto.h:1652
Definition proto.h:1996
Definition proto.h:1840
Definition proto.h:3694
Definition proto.h:2663
Definition proto.h:2703
Definition proto.h:2099
Definition proto.h:1246
Definition proto.h:1453
Definition proto.h:1444
Definition proto.h:1470
Definition proto.h:1301
Definition proto.h:1386
Definition proto.h:1395
Definition proto.h:1404
Definition proto.h:1273
Definition proto.h:1501
Definition proto.h:3698
Definition proto.h:1236
Definition proto.h:1226
Definition proto.h:1209
Definition proto.h:1199
Definition proto.h:1794
Definition proto.h:764
Definition proto.h:755
Definition proto.h:1730
Definition proto.h:1744
Definition proto.h:1759
Definition proto.h:1718
Definition proto.h:1522
Definition proto.h:1544
Definition proto.h:1828
Definition proto.h:669
Definition proto.h:698
Definition proto.h:676
Definition proto.h:2528
Definition proto.h:2928
Definition proto.h:2767
Definition proto.h:2755
Definition proto.h:2935
Definition proto.h:2912
Definition proto.h:2716
Definition proto.h:2246
Definition proto.h:1823
Definition proto.h:1179
Definition proto.h:1167
Definition proto.h:1121
Definition proto.h:1108
Definition proto.h:749
Definition proto.h:2510
Definition srpc.h:79
Definition srpc.h:198
Definition srpc.h:92