Hi. This is the feed program for Cosm. (The previous name of the services is Pachube.)

Dependencies:   mbed ThermistorPack Pachube ConfigFile EthernetNetIf TextLCD HTTPClient_ToBeRemoved FatFileSystem SDFileSystem

Committer:
shintamainjp
Date:
Mon Aug 06 12:37:59 2012 +0000
Revision:
0:521ba375aa0f
Pachube renamed to Cosm.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
shintamainjp 0:521ba375aa0f 1 /*****************************************************************************
shintamainjp 0:521ba375aa0f 2 * randm.h - Random number generator header file.
shintamainjp 0:521ba375aa0f 3 *
shintamainjp 0:521ba375aa0f 4 * Copyright (c) 2003 by Marc Boucher, Services Informatiques (MBSI) inc.
shintamainjp 0:521ba375aa0f 5 * Copyright (c) 1998 Global Election Systems Inc.
shintamainjp 0:521ba375aa0f 6 *
shintamainjp 0:521ba375aa0f 7 * The authors hereby grant permission to use, copy, modify, distribute,
shintamainjp 0:521ba375aa0f 8 * and license this software and its documentation for any purpose, provided
shintamainjp 0:521ba375aa0f 9 * that existing copyright notices are retained in all copies and that this
shintamainjp 0:521ba375aa0f 10 * notice and the following disclaimer are included verbatim in any
shintamainjp 0:521ba375aa0f 11 * distributions. No written agreement, license, or royalty fee is required
shintamainjp 0:521ba375aa0f 12 * for any of the authorized uses.
shintamainjp 0:521ba375aa0f 13 *
shintamainjp 0:521ba375aa0f 14 * THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS *AS IS* AND ANY EXPRESS OR
shintamainjp 0:521ba375aa0f 15 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
shintamainjp 0:521ba375aa0f 16 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
shintamainjp 0:521ba375aa0f 17 * IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
shintamainjp 0:521ba375aa0f 18 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
shintamainjp 0:521ba375aa0f 19 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
shintamainjp 0:521ba375aa0f 20 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
shintamainjp 0:521ba375aa0f 21 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
shintamainjp 0:521ba375aa0f 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
shintamainjp 0:521ba375aa0f 23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
shintamainjp 0:521ba375aa0f 24 *
shintamainjp 0:521ba375aa0f 25 ******************************************************************************
shintamainjp 0:521ba375aa0f 26 * REVISION HISTORY
shintamainjp 0:521ba375aa0f 27 *
shintamainjp 0:521ba375aa0f 28 * 03-01-01 Marc Boucher <marc@mbsi.ca>
shintamainjp 0:521ba375aa0f 29 * Ported to lwIP.
shintamainjp 0:521ba375aa0f 30 * 98-05-29 Guy Lancaster <glanca@gesn.com>, Global Election Systems Inc.
shintamainjp 0:521ba375aa0f 31 * Extracted from avos.
shintamainjp 0:521ba375aa0f 32 *****************************************************************************/
shintamainjp 0:521ba375aa0f 33
shintamainjp 0:521ba375aa0f 34 #ifndef RANDM_H
shintamainjp 0:521ba375aa0f 35 #define RANDM_H
shintamainjp 0:521ba375aa0f 36
shintamainjp 0:521ba375aa0f 37 /***********************
shintamainjp 0:521ba375aa0f 38 *** PUBLIC FUNCTIONS ***
shintamainjp 0:521ba375aa0f 39 ***********************/
shintamainjp 0:521ba375aa0f 40 /*
shintamainjp 0:521ba375aa0f 41 * Initialize the random number generator.
shintamainjp 0:521ba375aa0f 42 */
shintamainjp 0:521ba375aa0f 43 void avRandomInit(void);
shintamainjp 0:521ba375aa0f 44
shintamainjp 0:521ba375aa0f 45 /*
shintamainjp 0:521ba375aa0f 46 * Churn the randomness pool on a random event. Call this early and often
shintamainjp 0:521ba375aa0f 47 * on random and semi-random system events to build randomness in time for
shintamainjp 0:521ba375aa0f 48 * usage. For randomly timed events, pass a null pointer and a zero length
shintamainjp 0:521ba375aa0f 49 * and this will use the system timer and other sources to add randomness.
shintamainjp 0:521ba375aa0f 50 * If new random data is available, pass a pointer to that and it will be
shintamainjp 0:521ba375aa0f 51 * included.
shintamainjp 0:521ba375aa0f 52 */
shintamainjp 0:521ba375aa0f 53 void avChurnRand(char *randData, u32_t randLen);
shintamainjp 0:521ba375aa0f 54
shintamainjp 0:521ba375aa0f 55 /*
shintamainjp 0:521ba375aa0f 56 * Randomize our random seed value. To be called for truely random events
shintamainjp 0:521ba375aa0f 57 * such as user operations and network traffic.
shintamainjp 0:521ba375aa0f 58 */
shintamainjp 0:521ba375aa0f 59 #if MD5_SUPPORT
shintamainjp 0:521ba375aa0f 60 #define avRandomize() avChurnRand(NULL, 0)
shintamainjp 0:521ba375aa0f 61 #else /* MD5_SUPPORT */
shintamainjp 0:521ba375aa0f 62 void avRandomize(void);
shintamainjp 0:521ba375aa0f 63 #endif /* MD5_SUPPORT */
shintamainjp 0:521ba375aa0f 64
shintamainjp 0:521ba375aa0f 65 /*
shintamainjp 0:521ba375aa0f 66 * Use the random pool to generate random data. This degrades to pseudo
shintamainjp 0:521ba375aa0f 67 * random when used faster than randomness is supplied using churnRand().
shintamainjp 0:521ba375aa0f 68 * Thus it's important to make sure that the results of this are not
shintamainjp 0:521ba375aa0f 69 * published directly because one could predict the next result to at
shintamainjp 0:521ba375aa0f 70 * least some degree. Also, it's important to get a good seed before
shintamainjp 0:521ba375aa0f 71 * the first use.
shintamainjp 0:521ba375aa0f 72 */
shintamainjp 0:521ba375aa0f 73 void avGenRand(char *buf, u32_t bufLen);
shintamainjp 0:521ba375aa0f 74
shintamainjp 0:521ba375aa0f 75 /*
shintamainjp 0:521ba375aa0f 76 * Return a new random number.
shintamainjp 0:521ba375aa0f 77 */
shintamainjp 0:521ba375aa0f 78 u32_t avRandom(void);
shintamainjp 0:521ba375aa0f 79
shintamainjp 0:521ba375aa0f 80
shintamainjp 0:521ba375aa0f 81 #endif /* RANDM_H */