This is the sample program that can see the decode result of barcode data on Watson IoT.

Dependencies:   AsciiFont DisplayApp GR-PEACH_video LCD_shield_config LWIPBP3595Interface_STA_for_mbed-os USBDevice

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers MinarResourceObserver.h Source File

MinarResourceObserver.h

Go to the documentation of this file.
00001 /**
00002  * @file    MinarResourceObserver.h
00003  * @brief   mbed CoAP DynamicResource Minar-based observer (header)
00004  * @author  Doug Anson/Chris Paola
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 __MINAR_RESOURCE_OBSERVER_H__
00024 #define __MINAR_RESOURCE_OBSERVER_H__
00025 
00026 // mbedConnectorInterface configuration
00027 #include "mbed-connector-interface/mbedConnectorInterface.h"
00028 
00029 // mbed support
00030 #if defined(MCI_USE_YOTTA)
00031     // mbed support
00032     #include "mbed-drivers/mbed.h"
00033 #else
00034     // mbed support
00035     #include "mbed.h"
00036 #endif
00037 
00038 #if defined(MCI_MINAR_SCHEDULER)
00039 
00040 // Base class support
00041 #include "mbed-connector-interface/ResourceObserver.h"
00042 
00043 class MinarResourceObserver : public ResourceObserver {
00044     public:
00045         /**
00046         Default Constructor
00047         @param resource input the resource to observe
00048         @param sleep_time input the time for the observation thread to sleep (in ms)
00049         */
00050         MinarResourceObserver(DynamicResource *resource,int sleep_time = DEFAULT_OBS_PERIOD);
00051 
00052         /**
00053         Destructor
00054         */
00055         virtual ~MinarResourceObserver();
00056 
00057         /**
00058         begin the observation
00059         */
00060         virtual void beginObservation();
00061 
00062         /**
00063         stop the observation
00064         */
00065         virtual void stopObservation();
00066 
00067         /**
00068         perform the observation (iteration)
00069         */
00070         void perform_observation();
00071         
00072         /**
00073         halt the underlying observer mechanism
00074         */
00075         virtual void halt();
00076 
00077     private:
00078 
00079 };
00080 
00081 #endif // MCI_MINAR_SCHEDULER
00082 
00083 #endif // __MINAR_RESOURCE_OBSERVER_H__