eichi kowata / Mbed 2 deprecated geiger

Dependencies:   EthernetNetIf NTPClient_NetServices mbed ConfigFile

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers appconf.h Source File

appconf.h

00001 /*************************************************************
00002 
00003  History
00004  2011/08/23 - Add nsvlong0,cpmlong0.
00005  2011/08/03 - variable stream number.
00006 
00007 
00008 *************************************************************/
00009 
00010 /**
00011  * =============================================================================
00012  * Application configuration for 'Expansion Board One' example no.2
00013  * http://mbed.org/users/shintamainjp/notebook/starboard_expbrd-one_ex2_en/
00014  * =============================================================================
00015  * Copyright (c) 2010 Shinichiro Nakamura (CuBeatSystems)
00016  *
00017  * Permission is hereby granted, free of charge, to any person obtaining a copy
00018  * of this software and associated documentation files (the "Software"), to deal
00019  * in the Software without restriction, including without limitation the rights
00020  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
00021  * copies of the Software, and to permit persons to whom the Software is
00022  * furnished to do so, subject to the following conditions:
00023  *
00024  * The above copyright notice and this permission notice shall be included in
00025  * all copies or substantial portions of the Software.
00026  *
00027  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
00028  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
00029  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
00030  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
00031  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
00032  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
00033  * THE SOFTWARE.
00034  * =============================================================================
00035  */
00036 
00037 typedef struct {
00038     char apikey[256];
00039     char feedid[128];
00040     int  stream_nsv0;   //  2011/08/03
00041     int  stream_cpm0;   //  2011/08/03
00042 #ifdef DUALGM
00043     int  stream_nsv1;   //  2011/08/03
00044     int  stream_cpm1;   //  2011/08/03
00045 #endif
00046     int  stream_nsvlong0;   //  2011/08/23
00047     int  stream_cpmlong0;   //  2011/08/23
00048 //    int interval;
00049 } appconf_t;
00050 
00051 /**
00052  * Initialize configuration.
00053  *
00054  * @param p A pointer to a application config.
00055  */
00056 void appconf_init(appconf_t *p);
00057 
00058 /**
00059  * Read configuration.
00060  *
00061  * @param filename Filename.
00062  * @param p A pointer to a application config.
00063  * @return Return zero if it succeed.
00064  */
00065 int appconf_read(char *filename, appconf_t *p);
00066 
00067 /**
00068  * Write configuration.
00069  *
00070  * @param filename Filename.
00071  * @param p A pointer to a application config.
00072  * @return Return zero if it succeed.
00073  */
00074 int appconf_write(char *filename, appconf_t *p);