tmr_filter.h
Go to the documentation of this file.
00001 /* ex: set tabstop=2 shiftwidth=2 expandtab cindent: */
00002 #ifndef _TMR_FILTER_H
00003 #define _TMR_FILTER_H
00004 
00011 /*
00012  * Copyright (c) 2009 ThingMagic, Inc.
00013  *
00014  * Permission is hereby granted, free of charge, to any person obtaining a copy
00015  * of this software and associated documentation files (the "Software"), to deal
00016  * in the Software without restriction, including without limitation the rights
00017  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
00018  * copies of the Software, and to permit persons to whom the Software is
00019  * furnished to do so, subject to the following conditions:
00020  *
00021  * The above copyright notice and this permission notice shall be included in
00022  * all copies or substantial portions of the Software.
00023  * 
00024  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
00025  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
00026  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
00027  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
00028  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
00029  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
00030  * THE SOFTWARE.
00031  */
00032 
00033 #include "tmr_tag_data.h"
00034 #include "tmr_gen2.h"
00035 #include "tmr_iso180006b.h"
00036 
00045 #ifdef  __cplusplus
00046 extern "C" {
00047 #endif
00048 
00050 typedef enum TMR_FilterType
00051 {
00053   TMR_FILTER_TYPE_TAG_DATA          = 0,
00055   TMR_FILTER_TYPE_GEN2_SELECT       = 1, 
00057   TMR_FILTER_TYPE_ISO180006B_SELECT = 2
00058 } TMR_FilterType;
00059 
00064 typedef struct TMR_TagFilter
00065 {
00066   TMR_FilterType type;
00067   union
00068   {
00070     TMR_TagData     tagData;
00072     TMR_GEN2_Select gen2Select;
00074     TMR_ISO180006B_Select iso180006bSelect;
00075   } u;
00076 } TMR_TagFilter;
00077 
00086 bool TMR_TF_match(TMR_TagFilter *filter, TMR_TagData *tag);
00087 
00088 TMR_Status TMR_TF_init_tag(TMR_TagFilter *filter, TMR_TagData *tag);
00089 
00090 TMR_Status TMR_TF_init_gen2_select(TMR_TagFilter *filter, bool invert,
00091                                    TMR_GEN2_Bank bank, uint32_t bitPointer,
00092                                    uint16_t maskBitLength, uint8_t *mask);
00093 
00094 TMR_Status TMR_TF_init_ISO180006B_select(TMR_TagFilter *filter, bool invert,
00095                                          TMR_ISO180006B_SelectOp op,
00096                                          uint8_t address, uint8_t mask,
00097                                          uint8_t wordData[8]);
00098 #ifdef  __cplusplus
00099 }
00100 #endif
00101 
00102 #endif /* _TMR_FILTER_H_ */


thingmagic_rfid
Author(s): Brian Bingham
autogenerated on Thu May 16 2019 03:01:24