takashi kadono / Mbed OS Nucleo_446

Dependencies:   ssd1331

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers ws_bootstrap.h Source File

ws_bootstrap.h

00001 /*
00002  * Copyright (c) 2016-2018, Arm Limited and affiliates.
00003  * SPDX-License-Identifier: Apache-2.0
00004  *
00005  * Licensed under the Apache License, Version 2.0 (the "License");
00006  * you may not use this file except in compliance with the License.
00007  * You may obtain a copy of the License at
00008  *
00009  *     http://www.apache.org/licenses/LICENSE-2.0
00010  *
00011  * Unless required by applicable law or agreed to in writing, software
00012  * distributed under the License is distributed on an "AS IS" BASIS,
00013  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014  * See the License for the specific language governing permissions and
00015  * limitations under the License.
00016  */
00017 
00018 #ifndef WS_BOOTSTRAP_H_
00019 #define WS_BOOTSTRAP_H_
00020 
00021 
00022 typedef enum {
00023     WS_INIT_EVENT = 0,       /**< tasklet initializion event*/
00024     WS_DISCOVERY_START,      /**< discovery start*/
00025     WS_CONFIGURATION_START,  /**< configuration learn start*/
00026     WS_AUTHENTICATION_START, /**< authentication start*/
00027     WS_OPERATION_START,      /**< active operation start*/
00028     WS_ROUTING_READY,        /**< RPL routing connected to BR*/
00029     WS_ADDRESS_ADDED         /**< Address added to IF*/
00030 } ws_bootsrap_event_type_e;
00031 
00032 #ifdef HAVE_WS
00033 
00034 int ws_bootstrap_init(int8_t interface_id, net_6lowpan_mode_e bootstrap_mode);
00035 
00036 void ws_bootstrap_state_machine(protocol_interface_info_entry_t *cur);
00037 
00038 /*State machine transactions*/
00039 void ws_bootstrap_event_discovery_start(protocol_interface_info_entry_t *cur);
00040 
00041 void ws_bootstrap_event_configuration_start(protocol_interface_info_entry_t *cur);
00042 
00043 void ws_bootstrap_event_authentication_start(protocol_interface_info_entry_t *cur);
00044 
00045 void ws_bootstrap_event_operation_start(protocol_interface_info_entry_t *cur);
00046 
00047 void ws_bootstrap_event_routing_ready(protocol_interface_info_entry_t *cur);
00048 
00049 void ws_bootstrap_configuration_trickle_reset(protocol_interface_info_entry_t *cur);
00050 
00051 void ws_bootstrap_seconds_timer(protocol_interface_info_entry_t *cur, uint32_t seconds);
00052 
00053 void ws_bootstrap_trigle_timer(protocol_interface_info_entry_t *cur, uint16_t ticks);
00054 
00055 #else
00056 
00057 #define ws_bootstrap_init(interface_id, bootstrap_mode) (-1)
00058 #define ws_bootstrap_state_machine(cur)
00059 
00060 #endif //HAVE_WS
00061 
00062 #endif /* WS_BOOTSTRAP_H_ */