82 |
} |
} |
83 |
|
|
84 |
public void tripBreaker() { |
public void tripBreaker() { |
85 |
synchronized(this) { |
commonTripBreaker(Notifier.Event.BreakerTripped); |
|
if (currentState != open) { // TODO:Is this conditional necessary ?? |
|
|
open.trip(); |
|
|
currentState = open; |
|
|
|
|
|
notifier.sendNotification(name, Notifier.Event.BreakerTripped); |
|
|
} |
|
|
} |
|
86 |
} |
} |
87 |
|
|
88 |
//a re-trip should basically do the same as a normal trip, but it is here just to differentiate the two different events |
//a re-trip should basically do the same as a normal trip, but it is here just to differentiate the two different events |
89 |
public void retripBreaker() { |
public void retripBreaker() { |
90 |
synchronized(this) { |
commonTripBreaker(Notifier.Event.BreakerRetripped); |
91 |
|
} |
92 |
|
|
93 |
|
private void commonTripBreaker(Notifier.Event event) { |
94 |
|
synchronized(this) { |
95 |
if (currentState != open) { // TODO:Is this conditional necessary ?? |
if (currentState != open) { // TODO:Is this conditional necessary ?? |
96 |
open.trip(); |
open.trip(); |
97 |
currentState = open; |
currentState = open; |
98 |
|
|
99 |
notifier.sendNotification(name, Notifier.Event.BreakerRetripped); |
notifier.sendNotification(name, event); |
100 |
} |
} |
101 |
} |
} |
102 |
} |
} |
103 |
|
|
104 |
public void attemptReset() { |
public void attemptReset() { |