📄 rfidreaderinstanceobject.h
字号:
/*
Copyright (c) 2008, Intel Corporation.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation and/or
other materials provided with the distribution.
* Neither the name of Intel Corporation nor the names of its contributors
may be used to endorse or promote products derived from this software without
specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
OF SUCH DAMAGE.
*/
//==============================================================================
// RfidReaderInstanceObject.h
// Declaration of class RfidReaderInstance
//==============================================================================
#pragma once
#ifndef DllExport
#define DllExport // __declspec( dllimport )
#endif
#include "inc/Base/base_InstanceObject.h"#include "inc/Base/base_Property.h"
#include "RfidReaderProperty.h"#include "RfidReaderFactory.h"
using namespace Intel::Mobile::Base;
//==============================================================================
namespace Intel
{
namespace Mobile
{
namespace Rfid
{
class RfidReaderClass;
class RfidReaderCollection;
class RfidReaderFactory;
struct TagInfo
{
TagInfo():TagId(""){};
StringObject TagId;
TagTypeEnum TagType;
bool TagSecured;
};
typedef VectorObject<TagInfo> TagInfoArray;
typedef VectorObject<unsigned char> ByteArray;
class DllExport RfidReaderInstance : public Intel::Mobile::Base::InstanceObject
{
friend class RfidReaderClass;
friend class RfidReaderCollection;
friend class RfidReaderFactory;
private:
RfidReaderInstance( void *pImpl );
public:
virtual ~RfidReaderInstance();
virtual StringObject GetType() const;
StringObject GetKey () const;
public: // Public accessible properties
Intel::Mobile::Base::StringProperty Manufacturer;
Intel::Mobile::Base::StringProperty Name;
Intel::Mobile::Base::StringProperty SerialNumber;
Intel::Mobile::Base::StringProperty FirmwareRevision;
ConnectionInterfaceEnumProperty ConnectionInterface;
BaudRateEnumProperty BaudRate;
Intel::Mobile::Base::IntProperty SerialPort;
Intel::Mobile::Base::StringArrayProperty Protocols;
Intel::Mobile::Base::StringArrayProperty SupportedProtocols;
Intel::Mobile::Base::BoolProperty Enabled;
Intel::Mobile::Base::IntProperty PowerLevel;
Intel::Mobile::Base::IntArrayProperty OperatingFrequencies;
public:
bool StartReadingTags();
bool StopReadingTags();
bool ReadTags(unsigned __int32 SearchTime, TagInfoArray* TagInfo);
bool ReadUserData(ByteArray* Data);
bool ReadUserData(StringObject TagId, ByteArray* Data);
bool ReadUserData(StringObject TagId, StringObject Password, ByteArray* Data);
bool WriteUserData(ByteArray& Data);
bool WriteUserData(StringObject TagId, ByteArray& Data);
bool WriteUserData(StringObject TagId, StringObject Password, ByteArray& Data);
bool EraseUserData();
bool EraseUserData(StringObject TagId);
bool EraseUserData(StringObject TagId, StringObject Password);
bool WriteTagId(StringObject NewTagId);
bool ReadEpc(StringObject* EpcId);
bool ReadEpc(StringObject TagId, StringObject* EpcId);
bool WriteEpc(StringObject EpcId);
bool WriteEpc(StringObject TagId, StringObject EpcId);
bool ReadTagField(StringObject FieldName, ByteArray* FieldValue);
bool ReadTagField(StringObject TagId, StringObject FieldName, ByteArray* FieldValue);
bool WriteTagField(StringObject FieldName, ByteArray FieldValue);
bool WriteTagField(StringObject TagId, StringObject FieldName, ByteArray FieldValue);
bool LockTag();
bool LockTag(StringObject TagId);
bool LockTag(StringObject TagId, StringObject Password);
bool PermanentlyLockTag();
bool PermanentlyLockTag(StringObject TagId);
bool PermanentlyLockTag(StringObject TagId, StringObject Password);
bool UnlockTag();
bool UnlockTag(StringObject TagId);
bool UnlockTag(StringObject TagId, StringObject Password);
bool PermanentlyUnlockTag();
bool PermanentlyUnlockTag(StringObject TagId);
bool PermanentlyUnlockTag(StringObject TagId, StringObject Password);
bool KillTag();
bool KillTag(StringObject TagId);
bool KillTag(StringObject TagId, StringObject Password);
bool SetTagPassword(StringObject NewPassword);
bool SetTagPassword(StringObject TagId, StringObject NewPassword);
bool RemoveTagPassword(StringObject OldPassword);
bool RemoveTagPassword(StringObject TagId, StringObject OldPassword);
bool ChangeTagPassword(StringObject OldPassword, StringObject NewPassword);
bool ChangeTagPassword(StringObject TagId, StringObject OldPassword, StringObject NewPassword);
bool QuietTag(StringObject TagId);
bool Open();
bool Close();
private:
bool m_bOpened;
unsigned int m_nOpenCount;
public:
EventProperty TagFound;
EventProperty DeviceAvailable;
private:
bool CheckInstance();
};
}
}
}
//==============================================================================
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -