Skip to content

why is posOf() a private function? #6

@ghost

Description

Hello,
Please appreciate some help, not sure if this is a design issue or intended to be this way..

I'm trying to implement a RFID reader/access control. The code is checking if the given RFID UID is in the RfidDb, per below:


   int uid = getID(mfrc522.uid.uidByte);

  if (db.contains(uid)) {
      char name[db.maxNameLength()];
      int position = db.posOf(uid);
      db.getName(position,name);
      Serial.println(name);
    }

I would like to retrieve the Name of the record, but using db.getName() I need the 'position' of the record in the database (?). But none of the functions appear to return the position, so how is it possible to retrieve the record? It seems posOf could be public to solve this?

I'm guessing I'm doing something wrong.. but not sure.

Thanks!
Tom

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions