Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
m2mnsdlobserver.h
00001 /* 00002 * Copyright (c) 2015 ARM Limited. All rights reserved. 00003 * SPDX-License-Identifier: Apache-2.0 00004 * Licensed under the Apache License, Version 2.0 (the License); you may 00005 * not use this file except in compliance with the License. 00006 * You may obtain a copy of the License at 00007 * 00008 * http://www.apache.org/licenses/LICENSE-2.0 00009 * 00010 * Unless required by applicable law or agreed to in writing, software 00011 * distributed under the License is distributed on an AS IS BASIS, WITHOUT 00012 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00013 * See the License for the specific language governing permissions and 00014 * limitations under the License. 00015 */ 00016 #ifndef M2M_NSDL_OBSERVER_H 00017 #define M2M_NSDL_OBSERVER_H 00018 00019 #include "include/nsdllinker.h" 00020 00021 //FORWARD DECLARATION 00022 class M2MSecurity; 00023 class M2MServer; 00024 00025 /** 00026 * @brief Observer class for informing NSDL callback to the state machine 00027 */ 00028 00029 class M2MNsdlObserver 00030 { 00031 00032 public : 00033 00034 /** 00035 * @brief Informs that coap message is ready. 00036 * @param data_ptr, Data object of coap message. 00037 * @param data_len, Length of the data object. 00038 * @param address_ptr, Address structure of the server. 00039 */ 00040 virtual void coap_message_ready(uint8_t *data_ptr, 00041 uint16_t data_len, 00042 sn_nsdl_addr_s *address_ptr) = 0; 00043 00044 /** 00045 * @brief Informs that client is registered successfully. 00046 * @param server_object, Server object associated with 00047 * registered server. 00048 */ 00049 virtual void client_registered(M2MServer *server_object) = 0; 00050 00051 /** 00052 * @brief Informs that client registration is updated successfully. 00053 * @param server_object, Server object associated with 00054 * registered server. 00055 */ 00056 virtual void registration_updated(const M2MServer &server_object) = 0; 00057 00058 /** 00059 * @brief Informs that some error occured during 00060 * registration. 00061 * @param error_code, Error code for registration error 00062 * @param retry, Indicates state machine to re-establish connection 00063 * @param full_registration, Indicates that after DTLS handshake continue with a full registration 00064 */ 00065 virtual void registration_error(uint8_t error_code, bool retry = false, bool full_registration = false) = 0; 00066 00067 /** 00068 * @brief Informs that client is unregistered successfully. 00069 */ 00070 virtual void client_unregistered() = 0; 00071 00072 /** 00073 * @brief Informs that client bootstrapping is done. 00074 * @param security_object, M2MSecurity Object which contains information about 00075 * LWM2M server fetched from bootstrap server. 00076 */ 00077 virtual void bootstrap_done() = 0; 00078 00079 /** 00080 * @brief Informs that client bootstrap data has been received and final bootstrap 00081 * finish message has been handled. 00082 */ 00083 virtual void bootstrap_finish() = 0; 00084 00085 /** 00086 * @brief Informs that client bootstrapping is waiting for message to be sent. 00087 * @param security_object, M2MSecurity Object which contains information about 00088 * LWM2M server fetched from bootstrap server. 00089 */ 00090 virtual void bootstrap_wait() = 0; 00091 00092 /** 00093 * @brief Informs that client bootstrapping is waiting for error message to be sent. 00094 * @param reason, Error description. 00095 */ 00096 virtual void bootstrap_error_wait(const char *reason) = 0; 00097 00098 /** 00099 * @brief Informs that some error occured during 00100 * bootstrapping. 00101 * @param reason, Error string explaining the failure reason 00102 */ 00103 virtual void bootstrap_error(const char *reason) = 0; 00104 00105 /** 00106 * @brief Informs that received data has been processed. 00107 */ 00108 virtual void coap_data_processed() = 0; 00109 00110 /** 00111 * @brief Callback informing that the value of the resource object is updated by server. 00112 * @param base Object whose value is updated. 00113 */ 00114 virtual void value_updated(M2MBase *base) = 0; 00115 }; 00116 #endif // M2M_NSDL_OBSERVER_H
Generated on Mon Aug 29 2022 19:53:40 by
1.7.2