aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/events/CommandResultEventHandler.java
blob: 8ef015841ee0164257f78d00ef6b4ea89cdcab12 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
package org.traccar.events;

import org.traccar.BaseEventHandler;
import org.traccar.model.Event;
import org.traccar.model.Position;

public class CommandResultEventHandler extends BaseEventHandler {

    @Override
    protected Event analizePosition(Position position) {
        Object cmdResult = position.getAttributes().get(Position.KEY_RESULT);
        if (cmdResult != null) {
            return new Event(Event.COMMAND_RESULT, position.getDeviceId(), position.getId());
        }
        return null;
    }

}