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.
DeviceRebootResource.h
00001 /** 00002 * @file DeviceRebootResource.h 00003 * @brief mbed CoAP Endpoint Device Reboot Resource 00004 * @author Doug Anson 00005 * @version 1.0 00006 * @see 00007 * 00008 * Copyright (c) 2014 00009 * 00010 * Licensed under the Apache License, Version 2.0 (the "License"); 00011 * you may not use this file except in compliance with the License. 00012 * You may obtain a copy of the License at 00013 * 00014 * http://www.apache.org/licenses/LICENSE-2.0 00015 * 00016 * Unless required by applicable law or agreed to in writing, software 00017 * distributed under the License is distributed on an "AS IS" BASIS, 00018 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00019 * See the License for the specific language governing permissions and 00020 * limitations under the License. 00021 */ 00022 00023 #ifndef __DEVICE_REBOOT_RESOURCE_H__ 00024 #define __DEVICE_REBOOT_RESOURCE_H__ 00025 00026 // Base class 00027 #include "mbed-connector-interface/DeviceActionResource.h" 00028 00029 /** DeviceRebootResource class 00030 */ 00031 class DeviceRebootResource : public DeviceActionResource 00032 { 00033 public: 00034 /** 00035 Default constructor 00036 @param logger input logger instance for this resource 00037 @param obj_name input the Light Object name 00038 @param res_name input the Light Resource name 00039 @param dm_responder input the DM responder instance 00040 */ 00041 DeviceRebootResource(const Logger *logger,const char *obj_name,const char *res_name,const void *dm_responder,bool observable = false) : 00042 DeviceActionResource(logger,obj_name,res_name,"reboot",dm_responder,observable) 00043 { 00044 } 00045 00046 /** 00047 do_action() 00048 @param value input input value (DM authentication challenge) 00049 */ 00050 virtual bool do_action(void *args) { 00051 // reboot the device. Input value should the DM authentication challenge) 00052 this->m_dm_responder->rebootDevice(args); 00053 return true; 00054 } 00055 }; 00056 00057 #endif // __DEVICE_REBOOT_RESOURCE_H__
Generated on Wed Jul 13 2022 21:59:32 by
1.7.2