Give water to plants if dry amd pla meanwhile music the music vou can define with note length bind and breake also select several instruments for the sound
EthernetNetIf/LPC1768/lwip/include/lwip/snmp_asn1.h@0:5150b09127e3, 2012-09-19 (annotated)
- Committer:
- helmut
- Date:
- Wed Sep 19 14:16:56 2012 +0000
- Revision:
- 0:5150b09127e3
plays mostly music that you can do with notes length breakes and bind; Some already defined; Tool is to start a pump for water to give plant is too dry.; Meanwhie plays music the most part of all
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
helmut | 0:5150b09127e3 | 1 | /** |
helmut | 0:5150b09127e3 | 2 | * @file |
helmut | 0:5150b09127e3 | 3 | * Abstract Syntax Notation One (ISO 8824, 8825) codec. |
helmut | 0:5150b09127e3 | 4 | */ |
helmut | 0:5150b09127e3 | 5 | |
helmut | 0:5150b09127e3 | 6 | /* |
helmut | 0:5150b09127e3 | 7 | * Copyright (c) 2006 Axon Digital Design B.V., The Netherlands. |
helmut | 0:5150b09127e3 | 8 | * All rights reserved. |
helmut | 0:5150b09127e3 | 9 | * |
helmut | 0:5150b09127e3 | 10 | * Redistribution and use in source and binary forms, with or without modification, |
helmut | 0:5150b09127e3 | 11 | * are permitted provided that the following conditions are met: |
helmut | 0:5150b09127e3 | 12 | * |
helmut | 0:5150b09127e3 | 13 | * 1. Redistributions of source code must retain the above copyright notice, |
helmut | 0:5150b09127e3 | 14 | * this list of conditions and the following disclaimer. |
helmut | 0:5150b09127e3 | 15 | * 2. Redistributions in binary form must reproduce the above copyright notice, |
helmut | 0:5150b09127e3 | 16 | * this list of conditions and the following disclaimer in the documentation |
helmut | 0:5150b09127e3 | 17 | * and/or other materials provided with the distribution. |
helmut | 0:5150b09127e3 | 18 | * 3. The name of the author may not be used to endorse or promote products |
helmut | 0:5150b09127e3 | 19 | * derived from this software without specific prior written permission. |
helmut | 0:5150b09127e3 | 20 | * |
helmut | 0:5150b09127e3 | 21 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED |
helmut | 0:5150b09127e3 | 22 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
helmut | 0:5150b09127e3 | 23 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT |
helmut | 0:5150b09127e3 | 24 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, |
helmut | 0:5150b09127e3 | 25 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT |
helmut | 0:5150b09127e3 | 26 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
helmut | 0:5150b09127e3 | 27 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
helmut | 0:5150b09127e3 | 28 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING |
helmut | 0:5150b09127e3 | 29 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY |
helmut | 0:5150b09127e3 | 30 | * OF SUCH DAMAGE. |
helmut | 0:5150b09127e3 | 31 | * |
helmut | 0:5150b09127e3 | 32 | * Author: Christiaan Simons <christiaan.simons@axon.tv> |
helmut | 0:5150b09127e3 | 33 | */ |
helmut | 0:5150b09127e3 | 34 | |
helmut | 0:5150b09127e3 | 35 | #ifndef __LWIP_SNMP_ASN1_H__ |
helmut | 0:5150b09127e3 | 36 | #define __LWIP_SNMP_ASN1_H__ |
helmut | 0:5150b09127e3 | 37 | |
helmut | 0:5150b09127e3 | 38 | #include "lwip/opt.h" |
helmut | 0:5150b09127e3 | 39 | #include "lwip/err.h" |
helmut | 0:5150b09127e3 | 40 | #include "lwip/pbuf.h" |
helmut | 0:5150b09127e3 | 41 | #include "lwip/snmp.h" |
helmut | 0:5150b09127e3 | 42 | |
helmut | 0:5150b09127e3 | 43 | #if LWIP_SNMP |
helmut | 0:5150b09127e3 | 44 | |
helmut | 0:5150b09127e3 | 45 | #ifdef __cplusplus |
helmut | 0:5150b09127e3 | 46 | extern "C" { |
helmut | 0:5150b09127e3 | 47 | #endif |
helmut | 0:5150b09127e3 | 48 | |
helmut | 0:5150b09127e3 | 49 | #define SNMP_ASN1_UNIV (0) /* (!0x80 | !0x40) */ |
helmut | 0:5150b09127e3 | 50 | #define SNMP_ASN1_APPLIC (0x40) /* (!0x80 | 0x40) */ |
helmut | 0:5150b09127e3 | 51 | #define SNMP_ASN1_CONTXT (0x80) /* ( 0x80 | !0x40) */ |
helmut | 0:5150b09127e3 | 52 | |
helmut | 0:5150b09127e3 | 53 | #define SNMP_ASN1_CONSTR (0x20) /* ( 0x20) */ |
helmut | 0:5150b09127e3 | 54 | #define SNMP_ASN1_PRIMIT (0) /* (!0x20) */ |
helmut | 0:5150b09127e3 | 55 | |
helmut | 0:5150b09127e3 | 56 | /* universal tags */ |
helmut | 0:5150b09127e3 | 57 | #define SNMP_ASN1_INTEG 2 |
helmut | 0:5150b09127e3 | 58 | #define SNMP_ASN1_OC_STR 4 |
helmut | 0:5150b09127e3 | 59 | #define SNMP_ASN1_NUL 5 |
helmut | 0:5150b09127e3 | 60 | #define SNMP_ASN1_OBJ_ID 6 |
helmut | 0:5150b09127e3 | 61 | #define SNMP_ASN1_SEQ 16 |
helmut | 0:5150b09127e3 | 62 | |
helmut | 0:5150b09127e3 | 63 | /* application specific (SNMP) tags */ |
helmut | 0:5150b09127e3 | 64 | #define SNMP_ASN1_IPADDR 0 /* octet string size(4) */ |
helmut | 0:5150b09127e3 | 65 | #define SNMP_ASN1_COUNTER 1 /* u32_t */ |
helmut | 0:5150b09127e3 | 66 | #define SNMP_ASN1_GAUGE 2 /* u32_t */ |
helmut | 0:5150b09127e3 | 67 | #define SNMP_ASN1_TIMETICKS 3 /* u32_t */ |
helmut | 0:5150b09127e3 | 68 | #define SNMP_ASN1_OPAQUE 4 /* octet string */ |
helmut | 0:5150b09127e3 | 69 | |
helmut | 0:5150b09127e3 | 70 | /* context specific (SNMP) tags */ |
helmut | 0:5150b09127e3 | 71 | #define SNMP_ASN1_PDU_GET_REQ 0 |
helmut | 0:5150b09127e3 | 72 | #define SNMP_ASN1_PDU_GET_NEXT_REQ 1 |
helmut | 0:5150b09127e3 | 73 | #define SNMP_ASN1_PDU_GET_RESP 2 |
helmut | 0:5150b09127e3 | 74 | #define SNMP_ASN1_PDU_SET_REQ 3 |
helmut | 0:5150b09127e3 | 75 | #define SNMP_ASN1_PDU_TRAP 4 |
helmut | 0:5150b09127e3 | 76 | |
helmut | 0:5150b09127e3 | 77 | err_t snmp_asn1_dec_type(struct pbuf *p, u16_t ofs, u8_t *type); |
helmut | 0:5150b09127e3 | 78 | err_t snmp_asn1_dec_length(struct pbuf *p, u16_t ofs, u8_t *octets_used, u16_t *length); |
helmut | 0:5150b09127e3 | 79 | err_t snmp_asn1_dec_u32t(struct pbuf *p, u16_t ofs, u16_t len, u32_t *value); |
helmut | 0:5150b09127e3 | 80 | err_t snmp_asn1_dec_s32t(struct pbuf *p, u16_t ofs, u16_t len, s32_t *value); |
helmut | 0:5150b09127e3 | 81 | err_t snmp_asn1_dec_oid(struct pbuf *p, u16_t ofs, u16_t len, struct snmp_obj_id *oid); |
helmut | 0:5150b09127e3 | 82 | err_t snmp_asn1_dec_raw(struct pbuf *p, u16_t ofs, u16_t len, u16_t raw_len, u8_t *raw); |
helmut | 0:5150b09127e3 | 83 | |
helmut | 0:5150b09127e3 | 84 | void snmp_asn1_enc_length_cnt(u16_t length, u8_t *octets_needed); |
helmut | 0:5150b09127e3 | 85 | void snmp_asn1_enc_u32t_cnt(u32_t value, u16_t *octets_needed); |
helmut | 0:5150b09127e3 | 86 | void snmp_asn1_enc_s32t_cnt(s32_t value, u16_t *octets_needed); |
helmut | 0:5150b09127e3 | 87 | void snmp_asn1_enc_oid_cnt(u8_t ident_len, s32_t *ident, u16_t *octets_needed); |
helmut | 0:5150b09127e3 | 88 | err_t snmp_asn1_enc_type(struct pbuf *p, u16_t ofs, u8_t type); |
helmut | 0:5150b09127e3 | 89 | err_t snmp_asn1_enc_length(struct pbuf *p, u16_t ofs, u16_t length); |
helmut | 0:5150b09127e3 | 90 | err_t snmp_asn1_enc_u32t(struct pbuf *p, u16_t ofs, u16_t octets_needed, u32_t value); |
helmut | 0:5150b09127e3 | 91 | err_t snmp_asn1_enc_s32t(struct pbuf *p, u16_t ofs, u16_t octets_needed, s32_t value); |
helmut | 0:5150b09127e3 | 92 | err_t snmp_asn1_enc_oid(struct pbuf *p, u16_t ofs, u8_t ident_len, s32_t *ident); |
helmut | 0:5150b09127e3 | 93 | err_t snmp_asn1_enc_raw(struct pbuf *p, u16_t ofs, u16_t raw_len, u8_t *raw); |
helmut | 0:5150b09127e3 | 94 | |
helmut | 0:5150b09127e3 | 95 | #ifdef __cplusplus |
helmut | 0:5150b09127e3 | 96 | } |
helmut | 0:5150b09127e3 | 97 | #endif |
helmut | 0:5150b09127e3 | 98 | |
helmut | 0:5150b09127e3 | 99 | #endif /* LWIP_SNMP */ |
helmut | 0:5150b09127e3 | 100 | |
helmut | 0:5150b09127e3 | 101 | #endif /* __LWIP_SNMP_ASN1_H__ */ |