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 * Copyright (c) 2002 CITEL Technologies Ltd.
shintamainjp 0:521ba375aa0f 3 * All rights reserved.
shintamainjp 0:521ba375aa0f 4 *
shintamainjp 0:521ba375aa0f 5 * Redistribution and use in source and binary forms, with or without
shintamainjp 0:521ba375aa0f 6 * modification, are permitted provided that the following conditions
shintamainjp 0:521ba375aa0f 7 * are met:
shintamainjp 0:521ba375aa0f 8 * 1. Redistributions of source code must retain the above copyright
shintamainjp 0:521ba375aa0f 9 * notice, this list of conditions and the following disclaimer.
shintamainjp 0:521ba375aa0f 10 * 2. Redistributions in binary form must reproduce the above copyright
shintamainjp 0:521ba375aa0f 11 * notice, this list of conditions and the following disclaimer in the
shintamainjp 0:521ba375aa0f 12 * documentation and/or other materials provided with the distribution.
shintamainjp 0:521ba375aa0f 13 * 3. Neither the name of CITEL Technologies Ltd nor the names of its contributors
shintamainjp 0:521ba375aa0f 14 * may be used to endorse or promote products derived from this software
shintamainjp 0:521ba375aa0f 15 * without specific prior written permission.
shintamainjp 0:521ba375aa0f 16 *
shintamainjp 0:521ba375aa0f 17 * THIS SOFTWARE IS PROVIDED BY CITEL TECHNOLOGIES AND CONTRIBUTORS ``AS IS''
shintamainjp 0:521ba375aa0f 18 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
shintamainjp 0:521ba375aa0f 19 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
shintamainjp 0:521ba375aa0f 20 * ARE DISCLAIMED. IN NO EVENT SHALL CITEL TECHNOLOGIES OR CONTRIBUTORS BE LIABLE
shintamainjp 0:521ba375aa0f 21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
shintamainjp 0:521ba375aa0f 22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
shintamainjp 0:521ba375aa0f 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
shintamainjp 0:521ba375aa0f 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
shintamainjp 0:521ba375aa0f 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
shintamainjp 0:521ba375aa0f 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
shintamainjp 0:521ba375aa0f 27 * SUCH DAMAGE.
shintamainjp 0:521ba375aa0f 28 *
shintamainjp 0:521ba375aa0f 29 * This file is a contribution to the lwIP TCP/IP stack.
shintamainjp 0:521ba375aa0f 30 * The Swedish Institute of Computer Science and Adam Dunkels
shintamainjp 0:521ba375aa0f 31 * are specifically granted permission to redistribute this
shintamainjp 0:521ba375aa0f 32 * source code.
shintamainjp 0:521ba375aa0f 33 */
shintamainjp 0:521ba375aa0f 34
shintamainjp 0:521ba375aa0f 35 #ifndef __LWIP_IGMP_H__
shintamainjp 0:521ba375aa0f 36 #define __LWIP_IGMP_H__
shintamainjp 0:521ba375aa0f 37
shintamainjp 0:521ba375aa0f 38 #include "lwip/opt.h"
shintamainjp 0:521ba375aa0f 39 #include "lwip/ip_addr.h"
shintamainjp 0:521ba375aa0f 40 #include "lwip/netif.h"
shintamainjp 0:521ba375aa0f 41 #include "lwip/pbuf.h"
shintamainjp 0:521ba375aa0f 42
shintamainjp 0:521ba375aa0f 43 #if LWIP_IGMP /* don't build if not configured for use in lwipopts.h */
shintamainjp 0:521ba375aa0f 44
shintamainjp 0:521ba375aa0f 45 #ifdef __cplusplus
shintamainjp 0:521ba375aa0f 46 extern "C" {
shintamainjp 0:521ba375aa0f 47 #endif
shintamainjp 0:521ba375aa0f 48
shintamainjp 0:521ba375aa0f 49
shintamainjp 0:521ba375aa0f 50 /* IGMP timer */
shintamainjp 0:521ba375aa0f 51 #define IGMP_TMR_INTERVAL 100 /* Milliseconds */
shintamainjp 0:521ba375aa0f 52 #define IGMP_V1_DELAYING_MEMBER_TMR (1000/IGMP_TMR_INTERVAL)
shintamainjp 0:521ba375aa0f 53 #define IGMP_JOIN_DELAYING_MEMBER_TMR (500 /IGMP_TMR_INTERVAL)
shintamainjp 0:521ba375aa0f 54
shintamainjp 0:521ba375aa0f 55 /* MAC Filter Actions, these are passed to a netif's
shintamainjp 0:521ba375aa0f 56 * igmp_mac_filter callback function. */
shintamainjp 0:521ba375aa0f 57 #define IGMP_DEL_MAC_FILTER 0
shintamainjp 0:521ba375aa0f 58 #define IGMP_ADD_MAC_FILTER 1
shintamainjp 0:521ba375aa0f 59
shintamainjp 0:521ba375aa0f 60
shintamainjp 0:521ba375aa0f 61 /**
shintamainjp 0:521ba375aa0f 62 * igmp group structure - there is
shintamainjp 0:521ba375aa0f 63 * a list of groups for each interface
shintamainjp 0:521ba375aa0f 64 * these should really be linked from the interface, but
shintamainjp 0:521ba375aa0f 65 * if we keep them separate we will not affect the lwip original code
shintamainjp 0:521ba375aa0f 66 * too much
shintamainjp 0:521ba375aa0f 67 *
shintamainjp 0:521ba375aa0f 68 * There will be a group for the all systems group address but this
shintamainjp 0:521ba375aa0f 69 * will not run the state machine as it is used to kick off reports
shintamainjp 0:521ba375aa0f 70 * from all the other groups
shintamainjp 0:521ba375aa0f 71 */
shintamainjp 0:521ba375aa0f 72 struct igmp_group {
shintamainjp 0:521ba375aa0f 73 /** next link */
shintamainjp 0:521ba375aa0f 74 struct igmp_group *next;
shintamainjp 0:521ba375aa0f 75 /** interface on which the group is active */
shintamainjp 0:521ba375aa0f 76 struct netif *netif;
shintamainjp 0:521ba375aa0f 77 /** multicast address */
shintamainjp 0:521ba375aa0f 78 ip_addr_t group_address;
shintamainjp 0:521ba375aa0f 79 /** signifies we were the last person to report */
shintamainjp 0:521ba375aa0f 80 u8_t last_reporter_flag;
shintamainjp 0:521ba375aa0f 81 /** current state of the group */
shintamainjp 0:521ba375aa0f 82 u8_t group_state;
shintamainjp 0:521ba375aa0f 83 /** timer for reporting, negative is OFF */
shintamainjp 0:521ba375aa0f 84 u16_t timer;
shintamainjp 0:521ba375aa0f 85 /** counter of simultaneous uses */
shintamainjp 0:521ba375aa0f 86 u8_t use;
shintamainjp 0:521ba375aa0f 87 };
shintamainjp 0:521ba375aa0f 88
shintamainjp 0:521ba375aa0f 89 /* Prototypes */
shintamainjp 0:521ba375aa0f 90 void igmp_init(void);
shintamainjp 0:521ba375aa0f 91 err_t igmp_start(struct netif *netif);
shintamainjp 0:521ba375aa0f 92 err_t igmp_stop(struct netif *netif);
shintamainjp 0:521ba375aa0f 93 void igmp_report_groups(struct netif *netif);
shintamainjp 0:521ba375aa0f 94 struct igmp_group *igmp_lookfor_group(struct netif *ifp, ip_addr_t *addr);
shintamainjp 0:521ba375aa0f 95 void igmp_input(struct pbuf *p, struct netif *inp, ip_addr_t *dest);
shintamainjp 0:521ba375aa0f 96 err_t igmp_joingroup(ip_addr_t *ifaddr, ip_addr_t *groupaddr);
shintamainjp 0:521ba375aa0f 97 err_t igmp_leavegroup(ip_addr_t *ifaddr, ip_addr_t *groupaddr);
shintamainjp 0:521ba375aa0f 98 void igmp_tmr(void);
shintamainjp 0:521ba375aa0f 99
shintamainjp 0:521ba375aa0f 100 #ifdef __cplusplus
shintamainjp 0:521ba375aa0f 101 }
shintamainjp 0:521ba375aa0f 102 #endif
shintamainjp 0:521ba375aa0f 103
shintamainjp 0:521ba375aa0f 104 #endif /* LWIP_IGMP */
shintamainjp 0:521ba375aa0f 105
shintamainjp 0:521ba375aa0f 106 #endif /* __LWIP_IGMP_H__ */