Move the State enum up to the ICommonClock interface so it can be
returned for status/debugging up to clients.
Change-Id: I81fef5b96ffc69a4f2e9801b3744feea099ccd47
sp<ICommonClock> clk = interface_cast<ICommonClock>(binder);
return clk;
}
+
+ enum State {
+ // the device just came up and is trying to discover the master
+ STATE_INITIAL,
+
+ // the device is a client of a master
+ STATE_CLIENT,
+
+ // the device is acting as master
+ STATE_MASTER,
+
+ // the device has lost contact with its master and needs to participate
+ // in the election of a new master
+ STATE_RONIN,
+
+ // the device is waiting for announcement of the newly elected master
+ STATE_WAIT_FOR_ELECTION,
+ };
+
};
class BnCommonClock : public BnInterface<ICommonClock> {