void FASCN200BitFormat::setSystemCode(unsigned short systemCode)
 {
     std::shared_ptr<NumberDataField> field = std::dynamic_pointer_cast<NumberDataField>(getFieldFromName("SystemCode"));
     field->setValue(systemCode);
     d_formatLinear.d_systemCode = systemCode;
 }
 unsigned long long FASCN200BitFormat::getPersonIdentifier() const
 {
     std::shared_ptr<NumberDataField> field = std::dynamic_pointer_cast<NumberDataField>(getFieldFromName("PersonIdentifier"));
     return static_cast<unsigned long long>(field->getValue());
 }
 void Wiegand26Format::setFacilityCode(unsigned char facilityCode)
 {
     std::shared_ptr<NumberDataField> field = std::dynamic_pointer_cast<NumberDataField>(getFieldFromName("FacilityCode"));
     field->setValue(facilityCode);
     d_formatLinear.d_facilityCode = facilityCode;
 }
示例#4
0
 void ASCIIFormat::setPadding(unsigned char padding)
 {
     std::shared_ptr<ASCIIDataField> field = std::dynamic_pointer_cast<ASCIIDataField>(getFieldFromName("Value"));
     field->setPaddingChar(padding);
     d_formatLinear.d_padding = padding;
 }
 FASCNPOAssociationCategory FASCN200BitFormat::getPOACategory() const
 {
     std::shared_ptr<NumberDataField> field = std::dynamic_pointer_cast<NumberDataField>(getFieldFromName("POACategory"));
     return static_cast<FASCNPOAssociationCategory>(field->getValue());
 }
 void FASCN200BitFormat::setAgencyCode(unsigned short agencyCode)
 {
     std::shared_ptr<NumberDataField> field = std::dynamic_pointer_cast<NumberDataField>(getFieldFromName("AgencyCode"));
     field->setValue(agencyCode);
     d_formatLinear.d_agencyCode = agencyCode;
 }
示例#7
0
 string ASCIIFormat::getASCIIValue()
 {
     std::shared_ptr<ASCIIDataField> field = std::dynamic_pointer_cast<ASCIIDataField>(getFieldFromName("Value"));
     return field->getValue();
 }
 unsigned short FASCN200BitFormat::getOrganizationalIdentifier() const
 {
     std::shared_ptr<NumberDataField> field = std::dynamic_pointer_cast<NumberDataField>(getFieldFromName("OrganizationalIdentifier"));
     return static_cast<unsigned short>(field->getValue());
 }
	unsigned short int Wiegand37WithFacilityFormat::getFacilityCode() const
	{
		boost::shared_ptr<NumberDataField> field = boost::dynamic_pointer_cast<NumberDataField>(getFieldFromName("FacilityCode"));
		return static_cast<unsigned short int>(field->getValue());
	}
	void Wiegand37WithFacilityFormat::setFacilityCode(unsigned short int facilityCode)
	{
		boost::shared_ptr<NumberDataField> field = boost::dynamic_pointer_cast<NumberDataField>(getFieldFromName("FacilityCode"));
		field->setValue(facilityCode);
		d_formatLinear.d_facilityCode = facilityCode;
	}
	FASCNOrganizationalCategory FASCN200BitFormat::getOrganizationalCategory() const
	{
		boost::shared_ptr<NumberDataField> field = boost::dynamic_pointer_cast<NumberDataField>(getFieldFromName("OrganizationalCategory"));
		return static_cast<FASCNOrganizationalCategory>(field->getValue());
	}
示例#12
0
 std::vector<unsigned char> RawFormat::getRawData() const
 {
     std::shared_ptr<BinaryDataField> field = std::dynamic_pointer_cast<BinaryDataField>(getFieldFromName("RawData"));
     return field->getValue();
 }
示例#13
0
 void RawFormat::setRawData(std::vector<unsigned char>& data)
 {
     std::shared_ptr<BinaryDataField> field = std::dynamic_pointer_cast<BinaryDataField>(getFieldFromName("RawData"));
     field->setDataLength(static_cast<unsigned int>(data.size() * 8));
     field->setValue(data);
     d_rawData = data;
 }
 void FASCN200BitFormat::setPersonIdentifier(unsigned long long personIdentifier)
 {
     std::shared_ptr<NumberDataField> field = std::dynamic_pointer_cast<NumberDataField>(getFieldFromName("PersonIdentifier"));
     field->setValue(personIdentifier);
     d_formatLinear.d_personIdentifier = personIdentifier;
 }
示例#15
0
 void ASCIIFormat::setASCIIValue(string value)
 {
     std::shared_ptr<ASCIIDataField> field = std::dynamic_pointer_cast<ASCIIDataField>(getFieldFromName("Value"));
     field->setValue(value);
     d_asciiValue = value;
 }
 void FASCN200BitFormat::setOrganizationalCategory(FASCNOrganizationalCategory orgCategory)
 {
     std::shared_ptr<NumberDataField> field = std::dynamic_pointer_cast<NumberDataField>(getFieldFromName("OrganizationalCategory"));
     field->setValue(orgCategory);
     d_formatLinear.d_orgCategory = orgCategory;
 }
示例#17
0
 unsigned int ASCIIFormat::getASCIILength() const
 {
     std::shared_ptr<ASCIIDataField> field = std::dynamic_pointer_cast<ASCIIDataField>(getFieldFromName("Value"));
     return (field->getDataLength() + 7) / 8;
 }
 void FASCN200BitFormat::setOrganizationalIdentifier(unsigned short orgIdentifier)
 {
     std::shared_ptr<NumberDataField> field = std::dynamic_pointer_cast<NumberDataField>(getFieldFromName("OrganizationalIdentifier"));
     field->setValue(orgIdentifier);
     d_formatLinear.d_orgIdentifier = orgIdentifier;
 }
示例#19
0
 void ASCIIFormat::setASCIILength(unsigned int length)
 {
     std::shared_ptr<ASCIIDataField> field = std::dynamic_pointer_cast<ASCIIDataField>(getFieldFromName("Value"));
     field->setDataLength(length * 8);
     d_formatLinear.d_asciiLength = length;
 }
 void FASCN200BitFormat::setPOACategory(FASCNPOAssociationCategory poaCategory)
 {
     std::shared_ptr<NumberDataField> field = std::dynamic_pointer_cast<NumberDataField>(getFieldFromName("POACategory"));
     field->setValue(poaCategory);
     d_formatLinear.d_poaCategory = poaCategory;
 }
示例#21
0
 unsigned char ASCIIFormat::getPadding()
 {
     std::shared_ptr<ASCIIDataField> field = std::dynamic_pointer_cast<ASCIIDataField>(getFieldFromName("Value"));
     return field->getPaddingChar();
 }
 unsigned short FASCN200BitFormat::getSystemCode() const
 {
     std::shared_ptr<NumberDataField> field = std::dynamic_pointer_cast<NumberDataField>(getFieldFromName("SystemCode"));
     return static_cast<unsigned short>(field->getValue());
 }
 unsigned char Wiegand26Format::getFacilityCode() const
 {
     std::shared_ptr<NumberDataField> field = std::dynamic_pointer_cast<NumberDataField>(getFieldFromName("FacilityCode"));
     return static_cast<unsigned char>(field->getValue());
 }