client-c
0.7.4
Main Page
Classes
Files
File List
File Members
ext_kaa_failover_strategy.h
Go to the documentation of this file.
1
2
/*
3
* Copyright 2014-2015 CyberVision, Inc.
4
*
5
* Licensed under the Apache License, Version 2.0 (the "License");
6
* you may not use this file except in compliance with the License.
7
* You may obtain a copy of the License at
8
*
9
* http://www.apache.org/licenses/LICENSE-2.0
10
*
11
* Unless required by applicable law or agreed to in writing, software
12
* distributed under the License is distributed on an "AS IS" BASIS,
13
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
* See the License for the specific language governing permissions and
15
* limitations under the License.
16
*/
17
18
#ifndef EXT_FAILOVER_STRATEGY_H_
19
#define EXT_FAILOVER_STRATEGY_H_
20
21
#include <stddef.h>
22
#include "../kaa_error.h"
23
#include "../platform/time.h"
24
25
#define KAA_FAILOVER_RETRY_PERIOD 2
26
#define KAA_BOOTSTRAP_RESPONSE_PERIOD 5
27
28
typedef
enum
{
29
KAA_NOOP
= 0,
30
KAA_RETRY
,
31
KAA_USE_NEXT_BOOTSTRAP
,
32
KAA_USE_NEXT_OPERATIONS
,
33
KAA_STOP_APP
34
}
kaa_failover_strategy_action_t
;
35
36
typedef
enum
{
37
KAA_BOOTSTRAP_SERVERS_NA
= 0,
38
KAA_OPERATION_SERVERS_NA
,
39
KAA_NO_OPERATION_SERVERS_RECEIVED
,
40
KAA_NO_CONNECTIVITY
41
}
kaa_failover_reason
;
42
43
typedef
struct
{
44
kaa_failover_strategy_action_t
action
;
45
kaa_time_t
retry_period
;
46
}
kaa_failover_decision_t
;
47
56
kaa_failover_decision_t
kaa_failover_strategy_on_failover
(
void
*
self
,
kaa_failover_reason
reason);
57
58
#endif
/* EXT_FAILOVER_STRATEGY_H_ */
kaa_failover_decision_t::retry_period
kaa_time_t retry_period
Definition:
ext_kaa_failover_strategy.h:45
kaa_failover_reason
kaa_failover_reason
Definition:
ext_kaa_failover_strategy.h:36
KAA_NOOP
Definition:
ext_kaa_failover_strategy.h:29
kaa_time_t
long kaa_time_t
Definition:
cc32xx_time.h:23
KAA_NO_OPERATION_SERVERS_RECEIVED
Definition:
ext_kaa_failover_strategy.h:39
kaa_failover_strategy_action_t
kaa_failover_strategy_action_t
Definition:
ext_kaa_failover_strategy.h:28
KAA_NO_CONNECTIVITY
Definition:
ext_kaa_failover_strategy.h:40
kaa_failover_decision_t
Definition:
ext_kaa_failover_strategy.h:43
KAA_USE_NEXT_OPERATIONS
Definition:
ext_kaa_failover_strategy.h:32
kaa_failover_decision_t::action
kaa_failover_strategy_action_t action
Definition:
ext_kaa_failover_strategy.h:44
kaa_failover_strategy_on_failover
kaa_failover_decision_t kaa_failover_strategy_on_failover(void *self, kaa_failover_reason reason)
Returns the decision, depending on the failover reason.
KAA_RETRY
Definition:
ext_kaa_failover_strategy.h:30
KAA_BOOTSTRAP_SERVERS_NA
Definition:
ext_kaa_failover_strategy.h:37
KAA_STOP_APP
Definition:
ext_kaa_failover_strategy.h:33
KAA_OPERATION_SERVERS_NA
Definition:
ext_kaa_failover_strategy.h:38
KAA_USE_NEXT_BOOTSTRAP
Definition:
ext_kaa_failover_strategy.h:31
var
lib
jenkins
workspace
kaa_release_0_7_4
client
client-multi
client-c
src
kaa
platform
ext_kaa_failover_strategy.h
Generated on Tue Dec 29 2015 19:06:54 for client-c by
1.8.7