Gallagher Mobile Connect SDK
Public Member Functions | Static Public Attributes | List of all members
com.gallagher.security.mobileaccess.ReaderAction Class Reference

Inherits Parcelable.

Public Member Functions

 ReaderAction (byte id, @NonNull String name)
 
String getName ()
 
byte getId ()
 
String toString ()
 
ReaderActionType getType ()
 

Static Public Attributes

static final ReaderAction requestAccess = new ReaderAction((byte)-1, "Request Access")
 
static final ReaderAction enumerate = new ReaderAction((byte)0, "Enumerate")
 

Detailed Description

Represents an action that can be invoked over Bluetooth, such as locking or unlocking doors in an access zone

Constructor & Destructor Documentation

◆ ReaderAction()

com.gallagher.security.mobileaccess.ReaderAction.ReaderAction ( byte  id,
@NonNull String  name 
)

Create a new ReaderAction given the specified name and id

Parameters
idreader bytes id
namereader name
37 {
38 mId = id;
39 mName = name;
40 }

Member Function Documentation

◆ getId()

byte com.gallagher.security.mobileaccess.ReaderAction.getId ( )

The internal id of the action (for example: 1)

63 {
64 return mId;
65 }

◆ getName()

String com.gallagher.security.mobileaccess.ReaderAction.getName ( )

The name of the action (for example: "Arm")

58 {
59 return mName;
60 }

◆ getType()

ReaderActionType com.gallagher.security.mobileaccess.ReaderAction.getType ( )

A helper method mapping the reader action id to a user friendly enum

75 {
76 switch(mId) {
77 case -1:
78 return ReaderActionType.REQUEST_ACCESS;
79 case 0:
80 return ReaderActionType.ENUMERATE;
81 case 1:
82 return ReaderActionType.ARM;
83 case 2:
84 return ReaderActionType.DISARM;
85 case 3:
86 return ReaderActionType.MODE1;
87 case 4:
88 return ReaderActionType.MODE2;
89 case 5:
90 return ReaderActionType.SCHEDULE;
91 case 6:
92 return ReaderActionType.ARM_MODE1;
93 case 7:
94 return ReaderActionType.ARM_MODE2;
95 case 8:
96 return ReaderActionType.DISARM_MODE1;
97 case 9:
98 return ReaderActionType.DISARM_MODE2;
99 default:
100 return ReaderActionType.OUTPUT;
101 }
102 }

◆ toString()

String com.gallagher.security.mobileaccess.ReaderAction.toString ( )
69 {
70 return String.format(Locale.US, "ReaderAction id=%d name=%s", mId, mName);
71 }

Member Data Documentation

◆ enumerate

final ReaderAction com.gallagher.security.mobileaccess.ReaderAction.enumerate = new ReaderAction((byte)0, "Enumerate")
static

Predefined ReaderAction which enumerates available overrides

◆ requestAccess

final ReaderAction com.gallagher.security.mobileaccess.ReaderAction.requestAccess = new ReaderAction((byte)-1, "Request Access")
static

Predefined ReaderAction which attempts access


The documentation for this class was generated from the following file: